Documentation
¶
Index ¶
- Constants
- func ConvertToAsset(in []*MultiSwapAsset) ([]*pb.Asset, error)
- func IsValidAddressLen(val []byte) bool
- type Address
- func (a *Address) Bytes() []byte
- func (a *Address) Equal(b *Address) bool
- func (a *Address) IsUserIDSame(b *Address) bool
- func (a *Address) MarshalJSON() ([]byte, error)
- func (a *Address) String() string
- func (a *Address) UnmarshalJSON(data []byte) error
- func (a *Address) UnmarshalText(text []byte) error
- func (a *Address) ValidateWithStub(stub shim.ChaincodeStubInterface) error
- type BytesDecoder
- type BytesEncoder
- type Hex
- type MultiSwapAsset
- type MultiSwapAssets
- type Sender
- type StubBytesDecoder
- type StubBytesEncoder
- type Validator
- type ValidatorWithStub
Constants ¶
const AddressLength = 32
AddressLength is expected bytes len for business entity Address
Variables ¶
This section is empty.
Functions ¶
func ConvertToAsset ¶
func ConvertToAsset(in []*MultiSwapAsset) ([]*pb.Asset, error)
ConvertToAsset converts MultiSwapAsset to Asset
func IsValidAddressLen ¶
IsValidAddressLen checks if address length is valid
Types ¶
type Address ¶
Address might be more complicated structure contains fields like isIndustrial bool or isMultisig bool
func AddrFromBase58Check ¶
AddrFromBase58Check creates address from base58 string
func AddrFromBytes ¶
AddrFromBytes creates address from bytes
func (*Address) IsUserIDSame ¶
IsUserIDSame checks if userIDs are the same
func (*Address) MarshalJSON ¶
MarshalJSON marshals address to json
func (*Address) UnmarshalJSON ¶
UnmarshalJSON unmarshals address from json
func (*Address) UnmarshalText ¶ added in v0.0.2
func (*Address) ValidateWithStub ¶ added in v0.0.2
func (a *Address) ValidateWithStub(stub shim.ChaincodeStubInterface) error
Validate checks if the address is blacklisted by querying the account information from the provided ChaincodeStubInterface.
type BytesDecoder ¶ added in v0.0.3
BytesDecoder defines an interface for decoding an object from bytes.
type BytesEncoder ¶ added in v0.0.3
BytesEncoder defines an interface for encoding an object to bytes.
type MultiSwapAsset ¶
type MultiSwapAsset struct {
Group string `json:"group,omitempty"`
Amount string `json:"amount,omitempty"`
}
MultiSwapAsset is a wrapper for asset
type MultiSwapAssets ¶
type MultiSwapAssets struct {
Assets []*MultiSwapAsset
}
MultiSwapAssets is a wrapper for asset
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender is a wrapper for address
func NewSenderFromAddr ¶
NewSenderFromAddr creates sender from address
func (*Sender) UnmarshalText ¶ added in v0.0.2
type StubBytesDecoder ¶ added in v0.0.3
type StubBytesDecoder interface {
DecodeFromBytesWithStub(shim.ChaincodeStubInterface, []byte) error
}
BytesDecoder defines an interface for decoding an object from bytes with a stub.
type StubBytesEncoder ¶ added in v0.0.3
type StubBytesEncoder interface {
EncodeToBytesWithStub(shim.ChaincodeStubInterface) ([]byte, error)
}
BytesEncoder defines an interface for encoding an object to bytes with a stub.
type Validator ¶ added in v0.0.3
type Validator interface {
Validate() error
}
Validator is an interface that can be implemented by types that can validate themselves.
type ValidatorWithStub ¶ added in v0.0.3
type ValidatorWithStub interface {
ValidateWithStub(stub shim.ChaincodeStubInterface) error
}
ValidatorWithStub is an interface that can be implemented by types that can validate themselves.