Documentation ¶
Index ¶
- Variables
- func ErrStringStateNotFound(k string) string
- func IsStateDesignKey(key string) bool
- func IsStatePointBalanceKey(key string) bool
- func StateDesignValue(st base.State) (*types.Design, error)
- func StateKeyDesign(contract base.Address) string
- func StateKeyPointBalance(contract base.Address, address base.Address) string
- func StateKeyPointPrefix(contract base.Address) string
- func StatePointBalanceValue(st base.State) (common.Big, error)
- type AddPointBalanceStateValue
- type DeductPointBalanceStateValue
- 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 PointBalanceStateValue
- func (s *PointBalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *PointBalanceStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
- func (s PointBalanceStateValue) HashBytes() []byte
- func (s PointBalanceStateValue) Hint() hint.Hint
- func (s PointBalanceStateValue) IsValid([]byte) error
- func (s PointBalanceStateValue) MarshalBSON() ([]byte, error)
- func (s PointBalanceStateValue) MarshalJSON() ([]byte, error)
- type PointBalanceStateValueBSONUnmarshaler
- type PointBalanceStateValueJSONMarshaler
- type PointBalanceStateValueJSONUnmarshaler
- type PointBalanceStateValueMerger
- type StateKeyGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DesignStateValueHint = hint.MustNewHint("mitum-point-design-state-value-v0.0.1") DesignSuffix = "design" )
View Source
var ( PointBalanceStateValueHint = hint.MustNewHint("mitum-point-balance-state-value-v0.0.1") PointBalanceSuffix = "pointbalance" )
View Source
var PointPrefix = "point"
Functions ¶
func ErrStringStateNotFound ¶
func IsStateDesignKey ¶
func IsStatePointBalanceKey ¶
func StateKeyDesign ¶
func StateKeyPointBalance ¶
func StateKeyPointPrefix ¶
Types ¶
type AddPointBalanceStateValue ¶
func NewAddPointBalanceStateValue ¶
func NewAddPointBalanceStateValue(amount common.Big) AddPointBalanceStateValue
func (AddPointBalanceStateValue) HashBytes ¶
func (b AddPointBalanceStateValue) HashBytes() []byte
func (AddPointBalanceStateValue) IsValid ¶
func (b AddPointBalanceStateValue) IsValid([]byte) error
type DeductPointBalanceStateValue ¶
func NewDeductPointBalanceStateValue ¶
func NewDeductPointBalanceStateValue(amount common.Big) DeductPointBalanceStateValue
func (DeductPointBalanceStateValue) HashBytes ¶
func (b DeductPointBalanceStateValue) HashBytes() []byte
func (DeductPointBalanceStateValue) IsValid ¶
func (b DeductPointBalanceStateValue) 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 PointBalanceStateValue ¶
type PointBalanceStateValue struct { hint.BaseHinter Amount common.Big }
func NewPointBalanceStateValue ¶
func NewPointBalanceStateValue(amount common.Big) PointBalanceStateValue
func (*PointBalanceStateValue) DecodeBSON ¶
func (s *PointBalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*PointBalanceStateValue) DecodeJSON ¶
func (s *PointBalanceStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error
func (PointBalanceStateValue) HashBytes ¶
func (s PointBalanceStateValue) HashBytes() []byte
func (PointBalanceStateValue) Hint ¶
func (s PointBalanceStateValue) Hint() hint.Hint
func (PointBalanceStateValue) IsValid ¶
func (s PointBalanceStateValue) IsValid([]byte) error
func (PointBalanceStateValue) MarshalBSON ¶
func (s PointBalanceStateValue) MarshalBSON() ([]byte, error)
func (PointBalanceStateValue) MarshalJSON ¶
func (s PointBalanceStateValue) MarshalJSON() ([]byte, error)
type PointBalanceStateValueJSONMarshaler ¶
type PointBalanceStateValueJSONMarshaler struct { hint.BaseHinter Amount common.Big `json:"amount"` }
type PointBalanceStateValueJSONUnmarshaler ¶
type PointBalanceStateValueJSONUnmarshaler struct {
Amount string `json:"amount"`
}
type PointBalanceStateValueMerger ¶
type PointBalanceStateValueMerger struct { *common.BaseStateValueMerger sync.Mutex // contains filtered or unexported fields }
func (*PointBalanceStateValueMerger) CloseValue ¶
func (s *PointBalanceStateValueMerger) CloseValue() (base.State, error)
func (*PointBalanceStateValueMerger) Merge ¶
func (s *PointBalanceStateValueMerger) Merge(value base.StateValue, ops util.Hash) error
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) PointBalance ¶
func (g StateKeyGenerator) PointBalance(address base.Address) string
Click to show internal directories.
Click to hide internal directories.