extension

package
v3.0.0-alpha.0...-8a23bfa Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2025 License: GPL-3.0 Imports: 19 Imported by: 12

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CreateContractAccountFactHint = hint.MustNewHint("mitum-extension-create-contract-account-operation-fact-v0.0.1")
	CreateContractAccountHint     = hint.MustNewHint("mitum-extension-create-contract-account-operation-v0.0.1")
)
View Source
var (
	UpdateHandlerFactHint = hint.MustNewHint("mitum-extension-update-handler-operation-fact-v0.0.1")
	UpdateHandlerHint     = hint.MustNewHint("mitum-extension-update-handler-operation-v0.0.1")
)
View Source
var (
	UpdateRecipientFactHint = hint.MustNewHint("mitum-extension-update-recipient-operation-fact-v0.0.1")
	UpdateRecipientHint     = hint.MustNewHint("mitum-extension-update-recipient-operation-v0.0.1")
)
View Source
var (
	WithdrawFactHint = hint.MustNewHint("mitum-extension-withdraw-operation-fact-v0.0.1")
	WithdrawHint     = hint.MustNewHint("mitum-extension-withdraw-operation-v0.0.1")
)
View Source
var (
	CreateContractAccountItemMultiAmountsHint = hint.MustNewHint("mitum-extension-create-contract-account-multiple-amounts-v0.0.1")
)
View Source
var (
	CreateContractAccountItemSingleAmountHint = hint.MustNewHint("mitum-extension-create-contract-account-single-amount-v0.0.1")
)
View Source
var MaxCreateContractAccountItems uint = 1000
View Source
var MaxWithdrawItems uint = 1000
View Source
var UpdateHandlerProcessorPool = sync.Pool{
	New: func() interface{} {
		return new(UpdateHandlerProcessor)
	},
}
View Source
var UpdateRecipientProcessorPool = sync.Pool{
	New: func() interface{} {
		return new(UpdateRecipientProcessor)
	},
}
View Source
var (
	WithdrawItemMultiAmountsHint = hint.MustNewHint("mitum-extension-contract-account-withdraw-multi-amounts-v0.0.1")
)
View Source
var (
	WithdrawItemSingleAmountHint = hint.MustNewHint("mitum-extension-contract-account-withdraw-single-amount-v0.0.1")
)

Functions

func NewCreateContractAccountProcessor

func NewCreateContractAccountProcessor() types.GetNewProcessor

func NewUpdateHandlerProcessor

func NewUpdateHandlerProcessor() types.GetNewProcessor

func NewUpdateRecipientProcessor

func NewUpdateRecipientProcessor() types.GetNewProcessor

func NewWithdrawProcessor

func NewWithdrawProcessor() types.GetNewProcessor

Types

type BaseCreateContractAccountItem

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

func NewBaseCreateContractAccountItem

func NewBaseCreateContractAccountItem(ht hint.Hint, keys types.AccountKeys, amounts []types.Amount) BaseCreateContractAccountItem

func (BaseCreateContractAccountItem) Address

func (BaseCreateContractAccountItem) Amounts

func (BaseCreateContractAccountItem) Bytes

func (it BaseCreateContractAccountItem) Bytes() []byte

func (*BaseCreateContractAccountItem) DecodeBSON

func (it *BaseCreateContractAccountItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*BaseCreateContractAccountItem) DecodeJSON

func (it *BaseCreateContractAccountItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (BaseCreateContractAccountItem) IsValid

func (BaseCreateContractAccountItem) Keys

func (BaseCreateContractAccountItem) MarshalBSON

func (it BaseCreateContractAccountItem) MarshalBSON() ([]byte, error)

func (BaseCreateContractAccountItem) MarshalJSON

func (it BaseCreateContractAccountItem) MarshalJSON() ([]byte, error)

func (BaseCreateContractAccountItem) Rebuild

type BaseWithdrawItem

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

func NewBaseWithdrawItem

func NewBaseWithdrawItem(ht hint.Hint, target base.Address, amounts []types.Amount) BaseWithdrawItem

func (BaseWithdrawItem) Amounts

func (it BaseWithdrawItem) Amounts() []types.Amount

func (BaseWithdrawItem) Bytes

func (it BaseWithdrawItem) Bytes() []byte

func (*BaseWithdrawItem) DecodeBSON

func (it *BaseWithdrawItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*BaseWithdrawItem) DecodeJSON

func (it *BaseWithdrawItem) DecodeJSON(b []byte, enc encoder.Encoder) error

func (BaseWithdrawItem) IsValid

func (it BaseWithdrawItem) IsValid([]byte) error

func (BaseWithdrawItem) MarshalBSON

func (it BaseWithdrawItem) MarshalBSON() ([]byte, error)

func (BaseWithdrawItem) MarshalJSON

func (it BaseWithdrawItem) MarshalJSON() ([]byte, error)

func (BaseWithdrawItem) Rebuild

func (it BaseWithdrawItem) Rebuild() WithdrawItem

func (BaseWithdrawItem) Target

func (it BaseWithdrawItem) Target() base.Address

type BaseWithdrawItemBSONUnmarshaler

type BaseWithdrawItemBSONUnmarshaler struct {
	Hint    string   `bson:"_hint"`
	Target  string   `bson:"target"`
	Amounts bson.Raw `bson:"amounts"`
}

type BaseWithdrawItemJSONMarshaler

type BaseWithdrawItemJSONMarshaler struct {
	hint.BaseHinter
	Target  base.Address   `json:"target"`
	Amounts []types.Amount `json:"amounts"`
}

type BaseWithdrawItemJSONUnmarshaler

type BaseWithdrawItemJSONUnmarshaler struct {
	Hint    hint.Hint       `json:"_hint"`
	Target  string          `json:"target"`
	Amounts json.RawMessage `json:"amounts"`
}

type CreateContractAccount

type CreateContractAccount struct {
	extras.ExtendedOperation
}

func (*CreateContractAccount) DecodeBSON

func (op *CreateContractAccount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CreateContractAccount) DecodeJSON

func (op *CreateContractAccount) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CreateContractAccount) MarshalBSON

func (op CreateContractAccount) MarshalBSON() ([]byte, error)

func (CreateContractAccount) MarshalJSON

func (op CreateContractAccount) MarshalJSON() ([]byte, error)

type CreateContractAccountFact

type CreateContractAccountFact struct {
	base.BaseFact
	// contains filtered or unexported fields
}

func NewCreateContractAccountFact

func NewCreateContractAccountFact(token []byte, sender base.Address, items []CreateContractAccountItem) CreateContractAccountFact

func (CreateContractAccountFact) Addresses

func (fact CreateContractAccountFact) Addresses() ([]base.Address, error)

func (CreateContractAccountFact) Bytes

func (fact CreateContractAccountFact) Bytes() []byte

func (*CreateContractAccountFact) DecodeBSON

func (fact *CreateContractAccountFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*CreateContractAccountFact) DecodeJSON

func (fact *CreateContractAccountFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (CreateContractAccountFact) FactUser

func (fact CreateContractAccountFact) FactUser() base.Address

func (CreateContractAccountFact) FeeBase

func (fact CreateContractAccountFact) FeeBase() map[types.CurrencyID][]common.Big

func (CreateContractAccountFact) FeePayer

func (fact CreateContractAccountFact) FeePayer() base.Address

func (CreateContractAccountFact) GenerateHash

func (fact CreateContractAccountFact) GenerateHash() util.Hash

func (CreateContractAccountFact) Hash

func (fact CreateContractAccountFact) Hash() util.Hash

func (CreateContractAccountFact) IsValid

func (fact CreateContractAccountFact) IsValid(b []byte) error

func (CreateContractAccountFact) Items

func (CreateContractAccountFact) MarshalBSON

func (fact CreateContractAccountFact) MarshalBSON() ([]byte, error)

func (CreateContractAccountFact) MarshalJSON

func (fact CreateContractAccountFact) MarshalJSON() ([]byte, error)

func (CreateContractAccountFact) Rebuild

func (CreateContractAccountFact) Sender

func (fact CreateContractAccountFact) Sender() base.Address

func (CreateContractAccountFact) Signer

func (fact CreateContractAccountFact) Signer() base.Address

func (CreateContractAccountFact) Targets

func (fact CreateContractAccountFact) Targets() ([]base.Address, error)

func (CreateContractAccountFact) Token

func (fact CreateContractAccountFact) Token() base.Token

type CreateContractAccountFactBSONUnmarshaler

type CreateContractAccountFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type CreateContractAccountFactJSONMarshaler

type CreateContractAccountFactJSONMarshaler struct {
	base.BaseFactJSONMarshaler
	Owner base.Address                `json:"sender"`
	Items []CreateContractAccountItem `json:"items"`
}

type CreateContractAccountFactJSONUnMarshaler

type CreateContractAccountFactJSONUnMarshaler struct {
	base.BaseFactJSONUnmarshaler
	Owner string          `json:"sender"`
	Items json.RawMessage `json:"items"`
}

type CreateContractAccountItem

type CreateContractAccountItem interface {
	hint.Hinter
	util.IsValider
	currency.AmountsItem
	Bytes() []byte
	Keys() types.AccountKeys
	Address() (base.Address, error)
	Rebuild() CreateContractAccountItem
}

type CreateContractAccountItemBSONUnmarshaler

type CreateContractAccountItemBSONUnmarshaler struct {
	Hint    string   `bson:"_hint"`
	Keys    bson.Raw `bson:"keys"`
	Amounts bson.Raw `bson:"amounts"`
}

type CreateContractAccountItemJSONMarshaler

type CreateContractAccountItemJSONMarshaler struct {
	hint.BaseHinter
	Keys    types.AccountKeys `json:"keys"`
	Amounts []types.Amount    `json:"amounts"`
}

type CreateContractAccountItemJSONUnMarshaler

type CreateContractAccountItemJSONUnMarshaler struct {
	Hint    hint.Hint       `json:"_hint"`
	Keys    json.RawMessage `json:"keys"`
	Amounts json.RawMessage `json:"amounts"`
}

type CreateContractAccountItemMultiAmounts

type CreateContractAccountItemMultiAmounts struct {
	BaseCreateContractAccountItem
}

func NewCreateContractAccountItemMultiAmounts

func NewCreateContractAccountItemMultiAmounts(keys types.AccountKeys, amounts []types.Amount) CreateContractAccountItemMultiAmounts

func (CreateContractAccountItemMultiAmounts) IsValid

func (CreateContractAccountItemMultiAmounts) Rebuild

type CreateContractAccountItemProcessor

type CreateContractAccountItemProcessor struct {
	// contains filtered or unexported fields
}

func (*CreateContractAccountItemProcessor) Close

func (*CreateContractAccountItemProcessor) PreProcess

func (opp *CreateContractAccountItemProcessor) PreProcess(
	_ context.Context, _ base.Operation, getStateFunc base.GetStateFunc,
) error

func (*CreateContractAccountItemProcessor) Process

type CreateContractAccountItemSingleAmount

type CreateContractAccountItemSingleAmount struct {
	BaseCreateContractAccountItem
}

func NewCreateContractAccountItemSingleAmount

func NewCreateContractAccountItemSingleAmount(keys types.AccountKeys, amount types.Amount) CreateContractAccountItemSingleAmount

func (CreateContractAccountItemSingleAmount) IsValid

func (CreateContractAccountItemSingleAmount) Rebuild

type CreateContractAccountProcessor

type CreateContractAccountProcessor struct {
	*base.BaseOperationProcessor
	// contains filtered or unexported fields
}

func (*CreateContractAccountProcessor) Close

func (*CreateContractAccountProcessor) PreProcess

func (*CreateContractAccountProcessor) Process

type TestCreateContractAccountProcessor

type TestCreateContractAccountProcessor struct {
	*test.BaseTestOperationProcessorWithItem[CreateContractAccount, CreateContractAccountItem]
}

func NewTestCreateContractAccountProcessor

func NewTestCreateContractAccountProcessor(
	tp *test.TestProcessor,
) TestCreateContractAccountProcessor

func (*TestCreateContractAccountProcessor) Create

func (*TestCreateContractAccountProcessor) Decode

func (*TestCreateContractAccountProcessor) IsValid

func (*TestCreateContractAccountProcessor) LoadOperation

func (*TestCreateContractAccountProcessor) MakeItem

func (*TestCreateContractAccountProcessor) MakeOperation

func (*TestCreateContractAccountProcessor) Print

func (*TestCreateContractAccountProcessor) RunPreProcess

func (*TestCreateContractAccountProcessor) RunProcess

func (*TestCreateContractAccountProcessor) SetAccount

func (*TestCreateContractAccountProcessor) SetAmount

func (*TestCreateContractAccountProcessor) SetContractAccount

func (t *TestCreateContractAccountProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestCreateContractAccountProcessor

func (*TestCreateContractAccountProcessor) SetCurrency

type TestUpdateHandlerProcessor

type TestUpdateHandlerProcessor struct {
	*test.BaseTestOperationProcessorNoItem[UpdateHandler]
}

func NewTestUpdateHandlerProcessor

func NewTestUpdateHandlerProcessor(
	tp *test.TestProcessor,
) TestUpdateHandlerProcessor

func (*TestUpdateHandlerProcessor) Create

func (*TestUpdateHandlerProcessor) Decode

func (*TestUpdateHandlerProcessor) IsValid

func (*TestUpdateHandlerProcessor) LoadOperation

func (t *TestUpdateHandlerProcessor) LoadOperation(fileName string,
) *TestUpdateHandlerProcessor

func (*TestUpdateHandlerProcessor) MakeOperation

func (t *TestUpdateHandlerProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, contract base.Address, handlers []test.Account, currency types.CurrencyID,
) *TestUpdateHandlerProcessor

func (*TestUpdateHandlerProcessor) Print

func (*TestUpdateHandlerProcessor) RunPreProcess

func (*TestUpdateHandlerProcessor) RunProcess

func (*TestUpdateHandlerProcessor) SetAccount

func (t *TestUpdateHandlerProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestUpdateHandlerProcessor

func (*TestUpdateHandlerProcessor) SetAmount

func (*TestUpdateHandlerProcessor) SetContractAccount

func (t *TestUpdateHandlerProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestUpdateHandlerProcessor

func (*TestUpdateHandlerProcessor) SetCurrency

func (t *TestUpdateHandlerProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool,
) *TestUpdateHandlerProcessor

type TestWithdrawProcessor

type TestWithdrawProcessor struct {
	*test.BaseTestOperationProcessorWithItem[Withdraw, WithdrawItem]
}

func NewTestWithdrawProcessor

func NewTestWithdrawProcessor(
	tp *test.TestProcessor,
) TestWithdrawProcessor

func (*TestWithdrawProcessor) Create

func (*TestWithdrawProcessor) Decode

func (t *TestWithdrawProcessor) Decode(fileName string) *TestWithdrawProcessor

func (*TestWithdrawProcessor) IsValid

func (*TestWithdrawProcessor) LoadOperation

func (t *TestWithdrawProcessor) LoadOperation(fileName string) *TestWithdrawProcessor

func (*TestWithdrawProcessor) MakeItem

func (t *TestWithdrawProcessor) MakeItem(
	target test.Account, amounts []types.Amount, targetItems []WithdrawItem,
) *TestWithdrawProcessor

func (*TestWithdrawProcessor) MakeOperation

func (t *TestWithdrawProcessor) MakeOperation(
	sender base.Address, privatekey base.Privatekey, items []WithdrawItem,
) *TestWithdrawProcessor

func (*TestWithdrawProcessor) Print

func (*TestWithdrawProcessor) RunPreProcess

func (t *TestWithdrawProcessor) RunPreProcess() *TestWithdrawProcessor

func (*TestWithdrawProcessor) RunProcess

func (*TestWithdrawProcessor) SetAccount

func (t *TestWithdrawProcessor) SetAccount(
	priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool) *TestWithdrawProcessor

func (*TestWithdrawProcessor) SetAmount

func (*TestWithdrawProcessor) SetContractAccount

func (t *TestWithdrawProcessor) SetContractAccount(
	owner base.Address, priv string, amount int64, cid types.CurrencyID, target []test.Account, inState bool,
) *TestWithdrawProcessor

func (*TestWithdrawProcessor) SetCurrency

func (t *TestWithdrawProcessor) SetCurrency(
	cid string, am int64, addr base.Address, target []types.CurrencyID, instate bool) *TestWithdrawProcessor

type UpdatHandlerFactJSONUnMarshaler

type UpdatHandlerFactJSONUnMarshaler struct {
	base.BaseFactJSONUnmarshaler
	Sender   string   `json:"sender"`
	Contract string   `json:"contract"`
	Handlers []string `json:"handlers"`
	Currency string   `json:"currency"`
}

type UpdatRecipientsFactJSONUnMarshaler

type UpdatRecipientsFactJSONUnMarshaler struct {
	base.BaseFactJSONUnmarshaler
	Sender     string   `json:"sender"`
	Contract   string   `json:"contract"`
	Recipients []string `json:"recipients"`
	Currency   string   `json:"currency"`
}

type UpdateHandler

type UpdateHandler struct {
	extras.ExtendedOperation
}

func NewUpdateHandler

func NewUpdateHandler(fact UpdateHandlerFact) (UpdateHandler, error)

func (*UpdateHandler) DecodeBSON

func (op *UpdateHandler) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateHandler) DecodeJSON

func (op *UpdateHandler) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateHandler) MarshalBSON

func (op UpdateHandler) MarshalBSON() ([]byte, error)

func (UpdateHandler) MarshalJSON

func (op UpdateHandler) MarshalJSON() ([]byte, error)

type UpdateHandlerFact

type UpdateHandlerFact struct {
	base.BaseFact
	// contains filtered or unexported fields
}

func NewUpdateHandlerFact

func NewUpdateHandlerFact(
	token []byte,
	sender,
	contract base.Address,
	handlers []base.Address,
	currency types.CurrencyID,
) UpdateHandlerFact

func (UpdateHandlerFact) Addresses

func (fact UpdateHandlerFact) Addresses() ([]base.Address, error)

func (UpdateHandlerFact) Bytes

func (fact UpdateHandlerFact) Bytes() []byte

func (UpdateHandlerFact) Contract

func (fact UpdateHandlerFact) Contract() base.Address

func (UpdateHandlerFact) ContractOwnerOnly

func (fact UpdateHandlerFact) ContractOwnerOnly() [][2]base.Address

func (UpdateHandlerFact) Currency

func (fact UpdateHandlerFact) Currency() types.CurrencyID

func (*UpdateHandlerFact) DecodeBSON

func (fact *UpdateHandlerFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateHandlerFact) DecodeJSON

func (fact *UpdateHandlerFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateHandlerFact) FactUser

func (fact UpdateHandlerFact) FactUser() base.Address

func (UpdateHandlerFact) FeeBase

func (fact UpdateHandlerFact) FeeBase() map[types.CurrencyID][]common.Big

func (UpdateHandlerFact) FeePayer

func (fact UpdateHandlerFact) FeePayer() base.Address

func (UpdateHandlerFact) GenerateHash

func (fact UpdateHandlerFact) GenerateHash() util.Hash

func (UpdateHandlerFact) Handlers

func (fact UpdateHandlerFact) Handlers() []base.Address

func (UpdateHandlerFact) Hash

func (fact UpdateHandlerFact) Hash() util.Hash

func (UpdateHandlerFact) IsValid

func (fact UpdateHandlerFact) IsValid(b []byte) error

func (UpdateHandlerFact) MarshalBSON

func (fact UpdateHandlerFact) MarshalBSON() ([]byte, error)

func (UpdateHandlerFact) MarshalJSON

func (fact UpdateHandlerFact) MarshalJSON() ([]byte, error)

func (UpdateHandlerFact) Sender

func (fact UpdateHandlerFact) Sender() base.Address

func (UpdateHandlerFact) Signer

func (fact UpdateHandlerFact) Signer() base.Address

func (UpdateHandlerFact) Token

func (fact UpdateHandlerFact) Token() base.Token

type UpdateHandlerFactBSONUnmarshaler

type UpdateHandlerFactBSONUnmarshaler struct {
	Hint     string   `bson:"_hint"`
	Sender   string   `bson:"sender"`
	Contract string   `bson:"contract"`
	Handlers []string `bson:"handlers"`
	Currency string   `bson:"currency"`
}

type UpdateHandlerFactJSONMarshaler

type UpdateHandlerFactJSONMarshaler struct {
	base.BaseFactJSONMarshaler
	Sender   base.Address     `json:"sender"`
	Contract base.Address     `json:"contract"`
	Handlers []base.Address   `json:"handlers"`
	Currency types.CurrencyID `json:"currency"`
}

type UpdateHandlerProcessor

type UpdateHandlerProcessor struct {
	*base.BaseOperationProcessor
	// contains filtered or unexported fields
}

func (*UpdateHandlerProcessor) Close

func (opp *UpdateHandlerProcessor) Close() error

func (*UpdateHandlerProcessor) PreProcess

func (*UpdateHandlerProcessor) Process

type UpdateRecipient

type UpdateRecipient struct {
	extras.ExtendedOperation
}

func NewUpdateRecipient

func NewUpdateRecipient(fact UpdateRecipientFact) (UpdateRecipient, error)

func (*UpdateRecipient) DecodeBSON

func (op *UpdateRecipient) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateRecipient) DecodeJSON

func (op *UpdateRecipient) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateRecipient) MarshalBSON

func (op UpdateRecipient) MarshalBSON() ([]byte, error)

func (UpdateRecipient) MarshalJSON

func (op UpdateRecipient) MarshalJSON() ([]byte, error)

type UpdateRecipientFact

type UpdateRecipientFact struct {
	base.BaseFact
	// contains filtered or unexported fields
}

func NewUpdateRecipientFact

func NewUpdateRecipientFact(
	token []byte,
	sender,
	contract base.Address,
	recipients []base.Address,
	currency types.CurrencyID,
) UpdateRecipientFact

func (UpdateRecipientFact) Addresses

func (fact UpdateRecipientFact) Addresses() ([]base.Address, error)

func (UpdateRecipientFact) Bytes

func (fact UpdateRecipientFact) Bytes() []byte

func (UpdateRecipientFact) Contract

func (fact UpdateRecipientFact) Contract() base.Address

func (UpdateRecipientFact) ContractOwnerOnly

func (fact UpdateRecipientFact) ContractOwnerOnly() [][2]base.Address

func (UpdateRecipientFact) Currency

func (fact UpdateRecipientFact) Currency() types.CurrencyID

func (*UpdateRecipientFact) DecodeBSON

func (fact *UpdateRecipientFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*UpdateRecipientFact) DecodeJSON

func (fact *UpdateRecipientFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (UpdateRecipientFact) FactUser

func (fact UpdateRecipientFact) FactUser() base.Address

func (UpdateRecipientFact) FeeBase

func (fact UpdateRecipientFact) FeeBase() map[types.CurrencyID][]common.Big

func (UpdateRecipientFact) FeePayer

func (fact UpdateRecipientFact) FeePayer() base.Address

func (UpdateRecipientFact) GenerateHash

func (fact UpdateRecipientFact) GenerateHash() util.Hash

func (UpdateRecipientFact) Hash

func (fact UpdateRecipientFact) Hash() util.Hash

func (UpdateRecipientFact) IsValid

func (fact UpdateRecipientFact) IsValid(b []byte) error

func (UpdateRecipientFact) MarshalBSON

func (fact UpdateRecipientFact) MarshalBSON() ([]byte, error)

func (UpdateRecipientFact) MarshalJSON

func (fact UpdateRecipientFact) MarshalJSON() ([]byte, error)

func (UpdateRecipientFact) Recipients

func (fact UpdateRecipientFact) Recipients() []base.Address

func (UpdateRecipientFact) Sender

func (fact UpdateRecipientFact) Sender() base.Address

func (UpdateRecipientFact) Signer

func (fact UpdateRecipientFact) Signer() base.Address

func (UpdateRecipientFact) Token

func (fact UpdateRecipientFact) Token() base.Token

type UpdateRecipientProcessor

type UpdateRecipientProcessor struct {
	*base.BaseOperationProcessor
	// contains filtered or unexported fields
}

func (*UpdateRecipientProcessor) Close

func (opp *UpdateRecipientProcessor) Close() error

func (*UpdateRecipientProcessor) PreProcess

func (*UpdateRecipientProcessor) Process

type UpdateRecipientsFactBSONUnmarshaler

type UpdateRecipientsFactBSONUnmarshaler struct {
	Hint       string   `bson:"_hint"`
	Sender     string   `bson:"sender"`
	Contract   string   `bson:"contract"`
	Recipients []string `bson:"recipients"`
	Currency   string   `bson:"currency"`
}

type UpdateRecipientsFactJSONMarshaler

type UpdateRecipientsFactJSONMarshaler struct {
	base.BaseFactJSONMarshaler
	Sender     base.Address     `json:"sender"`
	Contract   base.Address     `json:"contract"`
	Recipients []base.Address   `json:"recipients"`
	Currency   types.CurrencyID `json:"currency"`
}

type Withdraw

type Withdraw struct {
	extras.ExtendedOperation
}

func NewWithdraw

func NewWithdraw(fact WithdrawFact) (Withdraw, error)

func (*Withdraw) DecodeBSON

func (op *Withdraw) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*Withdraw) DecodeJSON

func (op *Withdraw) DecodeJSON(b []byte, enc encoder.Encoder) error

func (Withdraw) MarshalBSON

func (op Withdraw) MarshalBSON() ([]byte, error)

func (Withdraw) MarshalJSON

func (op Withdraw) MarshalJSON() ([]byte, error)

type WithdrawFact

type WithdrawFact struct {
	base.BaseFact
	// contains filtered or unexported fields
}

func NewWithdrawFact

func NewWithdrawFact(token []byte, sender base.Address, items []WithdrawItem) WithdrawFact

func (WithdrawFact) Addresses

func (fact WithdrawFact) Addresses() ([]base.Address, error)

func (WithdrawFact) Bytes

func (fact WithdrawFact) Bytes() []byte

func (WithdrawFact) ContractOwnerOnly

func (fact WithdrawFact) ContractOwnerOnly() [][2]base.Address

func (*WithdrawFact) DecodeBSON

func (fact *WithdrawFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error

func (*WithdrawFact) DecodeJSON

func (fact *WithdrawFact) DecodeJSON(b []byte, enc encoder.Encoder) error

func (WithdrawFact) FactUser

func (fact WithdrawFact) FactUser() base.Address

func (WithdrawFact) FeeBase

func (fact WithdrawFact) FeeBase() map[types.CurrencyID][]common.Big

func (WithdrawFact) FeePayer

func (fact WithdrawFact) FeePayer() base.Address

func (WithdrawFact) GenerateHash

func (fact WithdrawFact) GenerateHash() util.Hash

func (WithdrawFact) Hash

func (fact WithdrawFact) Hash() util.Hash

func (WithdrawFact) IsValid

func (fact WithdrawFact) IsValid(b []byte) error

func (WithdrawFact) Items

func (fact WithdrawFact) Items() []WithdrawItem

func (WithdrawFact) MarshalBSON

func (fact WithdrawFact) MarshalBSON() ([]byte, error)

func (WithdrawFact) MarshalJSON

func (fact WithdrawFact) MarshalJSON() ([]byte, error)

func (WithdrawFact) Rebuild

func (fact WithdrawFact) Rebuild() WithdrawFact

func (WithdrawFact) Sender

func (fact WithdrawFact) Sender() base.Address

func (WithdrawFact) Signer

func (fact WithdrawFact) Signer() base.Address

func (WithdrawFact) Token

func (fact WithdrawFact) Token() base.Token

type WithdrawFactBSONUnmarshaler

type WithdrawFactBSONUnmarshaler struct {
	Hint   string   `bson:"_hint"`
	Sender string   `bson:"sender"`
	Items  bson.Raw `bson:"items"`
}

type WithdrawFactJSONMarshaler

type WithdrawFactJSONMarshaler struct {
	base.BaseFactJSONMarshaler
	Sender base.Address   `json:"sender"`
	Items  []WithdrawItem `json:"items"`
}

type WithdrawFactJSONUnmarshaler

type WithdrawFactJSONUnmarshaler struct {
	base.BaseFactJSONUnmarshaler
	Sender string          `json:"sender"`
	Items  json.RawMessage `json:"items"`
}

type WithdrawItem

type WithdrawItem interface {
	hint.Hinter
	util.IsValider
	currency.AmountsItem
	Bytes() []byte
	Target() base.Address
	Rebuild() WithdrawItem
}

type WithdrawItemMultiAmounts

type WithdrawItemMultiAmounts struct {
	BaseWithdrawItem
}

func NewWithdrawItemMultiAmounts

func NewWithdrawItemMultiAmounts(target base.Address, amounts []types.Amount) WithdrawItemMultiAmounts

func (WithdrawItemMultiAmounts) IsValid

func (it WithdrawItemMultiAmounts) IsValid([]byte) error

func (WithdrawItemMultiAmounts) Rebuild

type WithdrawItemProcessor

type WithdrawItemProcessor struct {
	// contains filtered or unexported fields
}

func (*WithdrawItemProcessor) Close

func (opp *WithdrawItemProcessor) Close()

func (*WithdrawItemProcessor) PreProcess

func (opp *WithdrawItemProcessor) PreProcess(
	_ context.Context, _ base.Operation, getStateFunc base.GetStateFunc,
) error

func (*WithdrawItemProcessor) Process

type WithdrawItemSingleAmount

type WithdrawItemSingleAmount struct {
	BaseWithdrawItem
}

func NewWithdrawItemSingleAmount

func NewWithdrawItemSingleAmount(target base.Address, amount types.Amount) WithdrawItemSingleAmount

func (WithdrawItemSingleAmount) IsValid

func (it WithdrawItemSingleAmount) IsValid([]byte) error

func (WithdrawItemSingleAmount) Rebuild

type WithdrawProcessor

type WithdrawProcessor struct {
	*base.BaseOperationProcessor
	// contains filtered or unexported fields
}

func (*WithdrawProcessor) Close

func (opp *WithdrawProcessor) Close() error

func (*WithdrawProcessor) PreProcess

func (*WithdrawProcessor) Process

Jump to

Keyboard shortcuts

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