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 Hex
- type MultiSwapAsset
- type MultiSwapAssets
- type Sender
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 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