types

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: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DepositRecordHint = hint.MustNewHint("mitum-payment-deposit-record-v0.0.1")
View Source
var DesignHint = hint.MustNewHint("mitum-payment-design-v0.0.1")
View Source
var SettingHint = hint.MustNewHint("mitum-payment-setting-v0.0.1")

Functions

This section is empty.

Types

type DepositRecord

type DepositRecord struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDepositRecord

func NewDepositRecord(
	address base.Address,
) DepositRecord

func NewEmptyDepositRecord

func NewEmptyDepositRecord() DepositRecord

func (DepositRecord) Address

func (d DepositRecord) Address() base.Address

func (DepositRecord) Amount

func (d DepositRecord) Amount(cid string) *common.Big

func (DepositRecord) Bytes

func (d DepositRecord) Bytes() []byte

func (*DepositRecord) DecodeBSON

func (d *DepositRecord) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*DepositRecord) DecodeJSON

func (d *DepositRecord) DecodeJSON(b []byte, enc encoder.Encoder) error

func (DepositRecord) IsValid

func (d DepositRecord) IsValid([]byte) error

func (DepositRecord) Items

func (d DepositRecord) Items() map[string]DepositRecordItem

func (DepositRecord) MarshalBSON

func (d DepositRecord) MarshalBSON() ([]byte, error)

func (DepositRecord) MarshalJSON

func (d DepositRecord) MarshalJSON() ([]byte, error)

func (*DepositRecord) SetItem

func (d *DepositRecord) SetItem(cid string, am common.Big, ts uint64)

func (DepositRecord) TransferredAt

func (d DepositRecord) TransferredAt(cid string) *uint64

type DepositRecordBSONUnmarshaler

type DepositRecordBSONUnmarshaler struct {
	Hint    string                       `bson:"_hint"`
	Address string                       `bson:"address"`
	Items   map[string]DepositRecordItem `bson:"items"`
}

type DepositRecordItem

type DepositRecordItem struct {
	Amount        common.Big `bson:"amount" json:"amount"`
	TransferredAt uint64     `bson:"transferred_at" json:"transferred_at"`
}

func NewDepositRecordItem

func NewDepositRecordItem(am common.Big, ts uint64) DepositRecordItem

func (DepositRecordItem) IsValid

func (d DepositRecordItem) IsValid([]byte) error

type DepositRecordJSONMarshaler

type DepositRecordJSONMarshaler struct {
	hint.BaseHinter
	Address base.Address                 `json:"address"`
	Items   map[string]DepositRecordItem `json:"items"`
}

type DepositRecordJSONUnmarshaler

type DepositRecordJSONUnmarshaler struct {
	Hint    hint.Hint                    `json:"_hint"`
	Address string                       `json:"address"`
	Items   map[string]DepositRecordItem `json:"items"`
}

type Design

type Design struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewDesign

func NewDesign() Design

func (Design) AccountSetting

func (de Design) AccountSetting(account string) *Setting

func (Design) AccountSettings

func (de Design) AccountSettings() map[string]Setting

func (*Design) AddAccountSetting

func (de *Design) AddAccountSetting(setting Setting) error

func (Design) Bytes

func (de Design) Bytes() []byte

func (*Design) DecodeBSON

func (de *Design) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Design) DecodeJSON

func (de *Design) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Design) GenerateHash

func (de Design) GenerateHash() util.Hash

func (Design) Hash

func (de Design) Hash() util.Hash

func (Design) IsValid

func (de Design) IsValid([]byte) error

func (Design) MarshalBSON

func (de Design) MarshalBSON() ([]byte, error)

func (Design) MarshalJSON

func (de Design) MarshalJSON() ([]byte, error)

func (*Design) RemoveAccountSetting

func (de *Design) RemoveAccountSetting(account base.Address) error

func (*Design) UpdateAccountSetting

func (de *Design) UpdateAccountSetting(account Setting) error

type DesignBSONUnmarshaler

type DesignBSONUnmarshaler struct {
	Hint     string   `bson:"_hint"`
	Accounts bson.Raw `bson:"transfer_settings"`
}

type DesignJSONMarshaler

type DesignJSONMarshaler struct {
	hint.BaseHinter
	Accounts map[string]Setting `json:"transfer_settings"`
}

type DesignJSONUnmarshaler

type DesignJSONUnmarshaler struct {
	Hint     hint.Hint       `json:"_hint"`
	Accounts json.RawMessage `json:"transfer_settings"`
}

type Setting

type Setting struct {
	hint.BaseHinter
	// contains filtered or unexported fields
}

func NewSettings

func NewSettings(
	address base.Address,
) Setting

func (Setting) Address

func (s Setting) Address() base.Address

func (Setting) Bytes

func (s Setting) Bytes() []byte

func (*Setting) DecodeBSON

func (s *Setting) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Setting) DecodeJSON

func (s *Setting) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Setting) IsValid

func (s Setting) IsValid([]byte) error

func (Setting) Items

func (s Setting) Items() map[string]SettingItem

func (Setting) MarshalBSON

func (s Setting) MarshalBSON() ([]byte, error)

func (Setting) MarshalJSON

func (s Setting) MarshalJSON() ([]byte, error)

func (Setting) PeriodTime

func (s Setting) PeriodTime(cid string) *[3]uint64

func (*Setting) Remove

func (s *Setting) Remove(cid string) error

func (*Setting) SetItem

func (s *Setting) SetItem(cid string, tLimit common.Big, startTime, endTime, duration uint64)

func (Setting) TransferLimit

func (s Setting) TransferLimit(cid string) *common.Big

type SettingBSONUnmarshaler

type SettingBSONUnmarshaler struct {
	Hint    string                 `bson:"_hint"`
	Address string                 `bson:"address"`
	Items   map[string]SettingItem `bson:"items"`
}

type SettingItem

type SettingItem struct {
	TransferLimit common.Big `bson:"transfer_limit" json:"transfer_limit"`
	StartTime     uint64     `bson:"start_time" json:"start_time"`
	EndTime       uint64     `bson:"end_time" json:"end_time"`
	Duration      uint64     `bson:"duration" json:"duration"`
}

func NewSettingItem

func NewSettingItem(tL common.Big, st, et, dur uint64) SettingItem

func (SettingItem) IsValid

func (t SettingItem) IsValid([]byte) error

type SettingJSONMarshaler

type SettingJSONMarshaler struct {
	hint.BaseHinter
	Address base.Address           `json:"address"`
	Items   map[string]SettingItem `json:"items"`
}

type SettingJSONUnmarshaler

type SettingJSONUnmarshaler struct {
	Hint    hint.Hint              `json:"_hint"`
	Address string                 `json:"address"`
	Items   map[string]SettingItem `json:"items"`
}

Jump to

Keyboard shortcuts

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