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) CheckWithStub(stub shim.ChaincodeStubInterface) error
- func (a *Address) Empty() bool
- 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
- type BytesDecoder
- type BytesEncoder
- type Checker
- type CheckerWithStub
- type Hex
- type MultiSwapAsset
- type MultiSwapAssets
- type Sender
- type StubBytesDecoder
- type StubBytesEncoder
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) CheckWithStub ¶ added in v0.0.4
func (a *Address) CheckWithStub(stub shim.ChaincodeStubInterface) error
CheckWithStub checks if the address is blacklisted by querying the account information from the provided ChaincodeStubInterface.
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
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 Checker ¶ added in v0.0.4
type Checker interface {
Check() error
}
Checker is an interface that can be implemented by types that can check themselves.
type CheckerWithStub ¶ added in v0.0.4
type CheckerWithStub interface {
CheckWithStub(stub shim.ChaincodeStubInterface) error
}
CheckerWithStub is an interface that can be implemented by types that can check themselves.
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.