state

package
v0.0.0-...-a82b3ad Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 5, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DesignStateValueHint  = hint.MustNewHint("mitum-payment-design-state-value-v0.0.1")
	PaymentStateKeyPrefix = "payment"
	DesignStateKeySuffix  = "design"
)
View Source
var (
	DepositRecordStateValueHint = hint.MustNewHint("mitum-payment-deposit-record-state-value-v0.0.1")
	DepositRecordStateKeySuffix = "depositrecord"
)

Functions

func DepositRecordStateKey

func DepositRecordStateKey(addr string, acAddr string) string

func DesignStateKey

func DesignStateKey(addr string) string

func GetDepositRecordFromState

func GetDepositRecordFromState(st base.State) (*types.DepositRecord, error)

func GetDesignFromState

func GetDesignFromState(st base.State) (types.Design, error)

func IsDepositRecordStateKey

func IsDepositRecordStateKey(key string) bool

func IsDesignStateKey

func IsDesignStateKey(key string) bool

func PaymentStateKey

func PaymentStateKey(addr string) string

Types

type DepositRecordStateValue

type DepositRecordStateValue struct {
	hint.BaseHinter
	Record types.DepositRecord
}

func NewDepositRecordStateValue

func NewDepositRecordStateValue(record types.DepositRecord) DepositRecordStateValue

func (*DepositRecordStateValue) DecodeBSON

func (sv *DepositRecordStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DepositRecordStateValue) DecodeJSON

func (sv *DepositRecordStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DepositRecordStateValue) HashBytes

func (sv DepositRecordStateValue) HashBytes() []byte

func (DepositRecordStateValue) Hint

func (sv DepositRecordStateValue) Hint() hint.Hint

func (DepositRecordStateValue) IsValid

func (sv DepositRecordStateValue) IsValid([]byte) error

func (DepositRecordStateValue) MarshalBSON

func (sv DepositRecordStateValue) MarshalBSON() ([]byte, error)

func (DepositRecordStateValue) MarshalJSON

func (sv DepositRecordStateValue) MarshalJSON() ([]byte, error)

type DepositRecordStateValueBSONUnmarshaler

type DepositRecordStateValueBSONUnmarshaler struct {
	Hint          string   `bson:"_hint"`
	DepositRecord bson.Raw `bson:"deposit_record"`
}

type DepositRecordStateValueJSONMarshaler

type DepositRecordStateValueJSONMarshaler struct {
	hint.BaseHinter
	Record types.DepositRecord `json:"deposit_record"`
}

type DepositRecordStateValueJSONUnmarshaler

type DepositRecordStateValueJSONUnmarshaler struct {
	Hint          hint.Hint       `json:"_hint"`
	DepositRecord json.RawMessage `json:"deposit_record"`
}

type DesignStateValue

type DesignStateValue struct {
	hint.BaseHinter
	Design types.Design
}

func NewDesignStateValue

func NewDesignStateValue(design types.Design) DesignStateValue

func (*DesignStateValue) DecodeBSON

func (sv *DesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DesignStateValue) DecodeJSON

func (sv *DesignStateValue) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DesignStateValue) HashBytes

func (sv DesignStateValue) HashBytes() []byte

func (DesignStateValue) Hint

func (sv DesignStateValue) Hint() hint.Hint

func (DesignStateValue) IsValid

func (sv DesignStateValue) IsValid([]byte) error

func (DesignStateValue) MarshalBSON

func (sv DesignStateValue) MarshalBSON() ([]byte, error)

func (DesignStateValue) MarshalJSON

func (sv DesignStateValue) MarshalJSON() ([]byte, error)

type DesignStateValueBSONUnmarshaler

type DesignStateValueBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Design bson.Raw `bson:"design"`
}

type DesignStateValueJSONMarshaler

type DesignStateValueJSONMarshaler struct {
	hint.BaseHinter
	Design types.Design `json:"design"`
}

type DesignStateValueJSONUnmarshaler

type DesignStateValueJSONUnmarshaler struct {
	Hint   hint.Hint       `json:"_hint"`
	Design json.RawMessage `json:"design"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL