Documentation ¶
Index ¶
- Variables
- func ErrStringStateNotFound(k string) string
- func IsStateDesignKey(key string) bool
- func IsStateTokenBalanceKey(key string) bool
- func StateDesignValue(st base.State) (*types.Design, error)
- func StateKeyDesign(contract base.Address) string
- func StateKeyTokenBalance(contract base.Address, address base.Address) string
- func StateKeyTokenPrefix(contract base.Address) string
- func StateTokenBalanceValue(st base.State) (common.Big, error)
- type AddTokenBalanceStateValue
- type DeductTokenBalanceStateValue
- type DesignStateValue
- func (s *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (s DesignStateValue) HashBytes() []byte
- func (s DesignStateValue) Hint() hint.Hint
- func (s DesignStateValue) IsValid([]byte) error
- func (s DesignStateValue) MarshalBSON() ([]byte, error)
- func (s DesignStateValue) MarshalJSON() ([]byte, error)
- type DesignStateValueBSONUnmarshaler
- type DesignStateValueJSONMarshaler
- type DesignStateValueJSONUnmarshaler
- type StateKeyGenerator
- type TokenBalanceStateValue
- func (s *TokenBalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *TokenBalanceStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (s TokenBalanceStateValue) HashBytes() []byte
- func (s TokenBalanceStateValue) Hint() hint.Hint
- func (s TokenBalanceStateValue) IsValid([]byte) error
- func (s TokenBalanceStateValue) MarshalBSON() ([]byte, error)
- func (s TokenBalanceStateValue) MarshalJSON() ([]byte, error)
- type TokenBalanceStateValueBSONUnmarshaler
- type TokenBalanceStateValueJSONMarshaler
- type TokenBalanceStateValueJSONUnmarshaler
- type TokenBalanceStateValueMerger
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DesignStateValueHint = hint.MustNewHint("mitum-token-design-state-value-v0.0.1") DesignSuffix = "design" )
View Source
var ( TokenBalanceStateValueHint = hint.MustNewHint("mitum-token-balance-state-value-v0.0.1") TokenBalanceSuffix = "tokenbalance" )
View Source
var TokenPrefix = "token"
Functions ¶
func ErrStringStateNotFound ¶
func IsStateDesignKey ¶
func IsStateTokenBalanceKey ¶
func StateKeyDesign ¶
func StateKeyTokenBalance ¶
func StateKeyTokenPrefix ¶
Types ¶
type AddTokenBalanceStateValue ¶
func NewAddTokenBalanceStateValue ¶
func NewAddTokenBalanceStateValue(amount common.Big) AddTokenBalanceStateValue
func (AddTokenBalanceStateValue) HashBytes ¶
func (b AddTokenBalanceStateValue) HashBytes() []byte
func (AddTokenBalanceStateValue) IsValid ¶
func (b AddTokenBalanceStateValue) IsValid([]byte) error
type DeductTokenBalanceStateValue ¶
func NewDeductTokenBalanceStateValue ¶
func NewDeductTokenBalanceStateValue(amount common.Big) DeductTokenBalanceStateValue
func (DeductTokenBalanceStateValue) HashBytes ¶
func (b DeductTokenBalanceStateValue) HashBytes() []byte
func (DeductTokenBalanceStateValue) IsValid ¶
func (b DeductTokenBalanceStateValue) IsValid([]byte) error
type DesignStateValue ¶
type DesignStateValue struct { hint.BaseHinter // contains filtered or unexported fields }
func NewDesignStateValue ¶
func NewDesignStateValue(design types.Design) DesignStateValue
func (*DesignStateValue) DecodeBSON ¶
func (s *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*DesignStateValue) DecodeJSON ¶
func (s *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (DesignStateValue) HashBytes ¶
func (s DesignStateValue) HashBytes() []byte
func (DesignStateValue) Hint ¶
func (s DesignStateValue) Hint() hint.Hint
func (DesignStateValue) IsValid ¶
func (s DesignStateValue) IsValid([]byte) error
func (DesignStateValue) MarshalBSON ¶
func (s DesignStateValue) MarshalBSON() ([]byte, error)
func (DesignStateValue) MarshalJSON ¶
func (s DesignStateValue) MarshalJSON() ([]byte, error)
type DesignStateValueJSONMarshaler ¶
type DesignStateValueJSONMarshaler struct { hint.BaseHinter Design types.Design `json:"design"` }
type DesignStateValueJSONUnmarshaler ¶
type DesignStateValueJSONUnmarshaler struct {
Design json.RawMessage `json:"design"`
}
type StateKeyGenerator ¶
type StateKeyGenerator struct {
// contains filtered or unexported fields
}
func NewStateKeyGenerator ¶
func NewStateKeyGenerator(contract base.Address) StateKeyGenerator
func (StateKeyGenerator) Design ¶
func (g StateKeyGenerator) Design() string
func (StateKeyGenerator) TokenBalance ¶
func (g StateKeyGenerator) TokenBalance(address base.Address) string
type TokenBalanceStateValue ¶
type TokenBalanceStateValue struct { hint.BaseHinter Amount common.Big }
func NewTokenBalanceStateValue ¶
func NewTokenBalanceStateValue(amount common.Big) TokenBalanceStateValue
func (*TokenBalanceStateValue) DecodeBSON ¶
func (s *TokenBalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*TokenBalanceStateValue) DecodeJSON ¶
func (s *TokenBalanceStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (TokenBalanceStateValue) HashBytes ¶
func (s TokenBalanceStateValue) HashBytes() []byte
func (TokenBalanceStateValue) Hint ¶
func (s TokenBalanceStateValue) Hint() hint.Hint
func (TokenBalanceStateValue) IsValid ¶
func (s TokenBalanceStateValue) IsValid([]byte) error
func (TokenBalanceStateValue) MarshalBSON ¶
func (s TokenBalanceStateValue) MarshalBSON() ([]byte, error)
func (TokenBalanceStateValue) MarshalJSON ¶
func (s TokenBalanceStateValue) MarshalJSON() ([]byte, error)
type TokenBalanceStateValueJSONMarshaler ¶
type TokenBalanceStateValueJSONMarshaler struct { hint.BaseHinter Amount common.Big `json:"amount"` }
type TokenBalanceStateValueJSONUnmarshaler ¶
type TokenBalanceStateValueJSONUnmarshaler struct {
Amount string `json:"amount"`
}
type TokenBalanceStateValueMerger ¶
type TokenBalanceStateValueMerger struct { *common.BaseStateValueMerger sync.Mutex // contains filtered or unexported fields }
func (*TokenBalanceStateValueMerger) CloseValue ¶
func (s *TokenBalanceStateValueMerger) CloseValue() (base.State, error)
func (*TokenBalanceStateValueMerger) Merge ¶
func (s *TokenBalanceStateValueMerger) Merge(value base.StateValue, ops util.Hash) error
Click to show internal directories.
Click to hide internal directories.