Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateItemsFee(getStateFunc base.GetStateFunc, items []currency.AmountsItem) (map[currency.CurrencyID][2]currency.Big, error)
- func CheckEnoughBalance(holder base.Address, required map[currency.CurrencyID][2]currency.Big, ...) (map[currency.CurrencyID]base.StateMergeValue, error)
- func IsStateContractAccountKey(key string) bool
- func IsStateCurrencyDesignKey(key string) bool
- func NewContractAccountStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
- func NewCurrencyDesignStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
- func NewFeeToken(feeer Feeer, height base.Height) []byte
- func StateKeyContractAccount(a base.Address) string
- func StateKeyCurrencyDesign(cid currency.CurrencyID) string
- type BaseCreateContractAccountsItem
- func (it BaseCreateContractAccountsItem) Address() (base.Address, error)
- func (it BaseCreateContractAccountsItem) Amounts() []currency.Amount
- func (it BaseCreateContractAccountsItem) Bytes() []byte
- func (it *BaseCreateContractAccountsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseCreateContractAccountsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (it BaseCreateContractAccountsItem) IsValid([]byte) error
- func (it BaseCreateContractAccountsItem) Keys() currency.AccountKeys
- func (it BaseCreateContractAccountsItem) MarshalBSON() ([]byte, error)
- func (it BaseCreateContractAccountsItem) MarshalJSON() ([]byte, error)
- func (it BaseCreateContractAccountsItem) Rebuild() CreateContractAccountsItem
- type BaseOperationProcessor
- type BaseWithdrawsItem
- func (it BaseWithdrawsItem) Amounts() []currency.Amount
- func (it BaseWithdrawsItem) Bytes() []byte
- func (it *BaseWithdrawsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseWithdrawsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (it BaseWithdrawsItem) IsValid([]byte) error
- func (it BaseWithdrawsItem) MarshalBSON() ([]byte, error)
- func (it BaseWithdrawsItem) MarshalJSON() ([]byte, error)
- func (it BaseWithdrawsItem) Rebuild() WithdrawsItem
- func (it BaseWithdrawsItem) Target() base.Address
- type BaseWithdrawsItemJSONUnpacker
- type ContractAccount
- func (cs ContractAccount) Bytes() []byte
- func (cs *ContractAccount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ca *ContractAccount) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (cs ContractAccount) Equal(b ContractAccount) bool
- func (cs ContractAccount) GenerateHash() util.Hash
- func (cs ContractAccount) Hash() util.Hash
- func (cs ContractAccount) IsActive() bool
- func (cs ContractAccount) IsValid([]byte) error
- func (cs ContractAccount) MarshalBSON() ([]byte, error)
- func (cs ContractAccount) MarshalJSON() ([]byte, error)
- func (cs ContractAccount) Owner() base.Address
- func (cs ContractAccount) SetIsActive(b bool) ContractAccount
- func (cs ContractAccount) SetOwner(a base.Address) (ContractAccount, error)
- type ContractAccountBSONUnmarshaler
- type ContractAccountJSONMarshaler
- type ContractAccountJSONUnmarshaler
- type ContractAccountKeys
- func (ks ContractAccountKeys) Bytes() []byte
- func (ks ContractAccountKeys) Equal(b currency.AccountKeys) bool
- func (ks ContractAccountKeys) GenerateHash() (util.Hash, error)
- func (ks ContractAccountKeys) Hash() util.Hash
- func (ks ContractAccountKeys) IsValid([]byte) error
- func (ks ContractAccountKeys) Key(k base.Publickey) (currency.AccountKey, bool)
- func (ks ContractAccountKeys) Keys() []currency.AccountKey
- func (ks ContractAccountKeys) Threshold() uint
- type ContractAccountStateValue
- func (s *ContractAccountStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *ContractAccountStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (c ContractAccountStateValue) HashBytes() []byte
- func (c ContractAccountStateValue) Hint() hint.Hint
- func (c ContractAccountStateValue) IsValid([]byte) error
- func (s ContractAccountStateValue) MarshalBSON() ([]byte, error)
- func (s ContractAccountStateValue) MarshalJSON() ([]byte, error)
- type ContractAccountStateValueBSONUnmarshaler
- type ContractAccountStateValueJSONMarshaler
- type ContractAccountStateValueJSONUnmarshaler
- type ContractAccountStateValueMerger
- type ContractID
- type CreateAccountsItemProcessor
- func (opp *CreateAccountsItemProcessor) Close() error
- func (opp *CreateAccountsItemProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) error
- func (opp *CreateAccountsItemProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, error)
- type CreateAccountsProcessor
- func (opp *CreateAccountsProcessor) Close() error
- func (opp *CreateAccountsProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CreateAccountsProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CreateContractAccounts
- func (op *CreateContractAccounts) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *CreateContractAccounts) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op *CreateContractAccounts) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op CreateContractAccounts) MarshalBSON() ([]byte, error)
- func (op CreateContractAccounts) MarshalJSON() ([]byte, error)
- func (CreateContractAccounts) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CreateContractAccountsFact
- func (fact CreateContractAccountsFact) Addresses() ([]base.Address, error)
- func (fact CreateContractAccountsFact) Bytes() []byte
- func (fact *CreateContractAccountsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CreateContractAccountsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact CreateContractAccountsFact) GenerateHash() util.Hash
- func (fact CreateContractAccountsFact) Hash() util.Hash
- func (fact CreateContractAccountsFact) IsValid(b []byte) error
- func (fact CreateContractAccountsFact) Items() []CreateContractAccountsItem
- func (fact CreateContractAccountsFact) MarshalBSON() ([]byte, error)
- func (fact CreateContractAccountsFact) MarshalJSON() ([]byte, error)
- func (fact CreateContractAccountsFact) Rebuild() CreateContractAccountsFact
- func (fact CreateContractAccountsFact) Sender() base.Address
- func (fact CreateContractAccountsFact) Targets() ([]base.Address, error)
- func (fact CreateContractAccountsFact) Token() base.Token
- type CreateContractAccountsFactBSONUnmarshaler
- type CreateContractAccountsFactJSONMarshaler
- type CreateContractAccountsFactJSONUnMarshaler
- type CreateContractAccountsItem
- type CreateContractAccountsItemBSONUnmarshaler
- type CreateContractAccountsItemJSONMarshaler
- type CreateContractAccountsItemJSONUnMarshaler
- type CreateContractAccountsItemMultiAmounts
- type CreateContractAccountsItemProcessor
- func (opp *CreateContractAccountsItemProcessor) Close() error
- func (opp *CreateContractAccountsItemProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) error
- func (opp *CreateContractAccountsItemProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, error)
- type CreateContractAccountsItemSingleAmount
- type CreateContractAccountsProcessor
- func (opp *CreateContractAccountsProcessor) Close() error
- func (opp *CreateContractAccountsProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CreateContractAccountsProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CurrencyDesign
- func (de CurrencyDesign) AddAggregate(b currency.Big) (CurrencyDesign, error)
- func (de CurrencyDesign) Aggregate() currency.Big
- func (de CurrencyDesign) Amount() currency.Amount
- func (de CurrencyDesign) Bytes() []byte
- func (de CurrencyDesign) Currency() currency.CurrencyID
- func (de *CurrencyDesign) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *CurrencyDesign) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (de CurrencyDesign) GenesisAccount() base.Address
- func (de CurrencyDesign) IsValid([]byte) error
- func (de CurrencyDesign) MarshalBSON() ([]byte, error)
- func (de CurrencyDesign) MarshalJSON() ([]byte, error)
- func (de CurrencyDesign) Policy() CurrencyPolicy
- func (de CurrencyDesign) SetPolicy(po CurrencyPolicy) CurrencyDesign
- type CurrencyDesignBSONUnmarshaler
- type CurrencyDesignJSONMarshaler
- type CurrencyDesignJSONUnmarshaler
- type CurrencyDesignStateValue
- func (s *CurrencyDesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *CurrencyDesignStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (c CurrencyDesignStateValue) HashBytes() []byte
- func (c CurrencyDesignStateValue) Hint() hint.Hint
- func (c CurrencyDesignStateValue) IsValid([]byte) error
- func (s CurrencyDesignStateValue) MarshalBSON() ([]byte, error)
- func (s CurrencyDesignStateValue) MarshalJSON() ([]byte, error)
- type CurrencyDesignStateValueBSONUnmarshaler
- type CurrencyDesignStateValueJSONMarshaler
- type CurrencyDesignStateValueJSONUnmarshaler
- type CurrencyDesignStateValueMerger
- type CurrencyPolicy
- func (po CurrencyPolicy) Bytes() []byte
- func (po *CurrencyPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (po *CurrencyPolicy) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (po CurrencyPolicy) Feeer() Feeer
- func (po CurrencyPolicy) IsValid([]byte) error
- func (po CurrencyPolicy) MarshalBSON() ([]byte, error)
- func (po CurrencyPolicy) MarshalJSON() ([]byte, error)
- func (po CurrencyPolicy) NewAccountMinBalance() currency.Big
- func (CurrencyPolicy) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CurrencyPolicyBSONUnmarshaler
- type CurrencyPolicyJSONMarshaler
- type CurrencyPolicyJSONUnmarshaler
- type CurrencyPolicyUpdater
- type CurrencyPolicyUpdaterFact
- func (fact CurrencyPolicyUpdaterFact) Bytes() []byte
- func (fact CurrencyPolicyUpdaterFact) Currency() currency.CurrencyID
- func (fact *CurrencyPolicyUpdaterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CurrencyPolicyUpdaterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact CurrencyPolicyUpdaterFact) GenerateHash() util.Hash
- func (fact CurrencyPolicyUpdaterFact) Hash() util.Hash
- func (fact CurrencyPolicyUpdaterFact) IsValid(b []byte) error
- func (fact CurrencyPolicyUpdaterFact) MarshalBSON() ([]byte, error)
- func (fact CurrencyPolicyUpdaterFact) MarshalJSON() ([]byte, error)
- func (fact CurrencyPolicyUpdaterFact) Policy() CurrencyPolicy
- func (fact CurrencyPolicyUpdaterFact) Token() base.Token
- type CurrencyPolicyUpdaterFactBSONUnmarshaler
- type CurrencyPolicyUpdaterFactJSONMarshaler
- type CurrencyPolicyUpdaterFactJSONUnMarshaler
- type CurrencyPolicyUpdaterProcessor
- func (opp *CurrencyPolicyUpdaterProcessor) Close() error
- func (opp *CurrencyPolicyUpdaterProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CurrencyPolicyUpdaterProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CurrencyRegister
- func (op *CurrencyRegister) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *CurrencyRegister) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op CurrencyRegister) MarshalBSON() ([]byte, error)
- func (op CurrencyRegister) MarshalJSON() ([]byte, error)
- func (CurrencyRegister) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CurrencyRegisterFact
- func (fact CurrencyRegisterFact) Bytes() []byte
- func (fact CurrencyRegisterFact) Currency() CurrencyDesign
- func (fact *CurrencyRegisterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CurrencyRegisterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact CurrencyRegisterFact) GenerateHash() util.Hash
- func (fact CurrencyRegisterFact) Hash() util.Hash
- func (fact CurrencyRegisterFact) IsValid(b []byte) error
- func (fact CurrencyRegisterFact) MarshalBSON() ([]byte, error)
- func (fact CurrencyRegisterFact) MarshalJSON() ([]byte, error)
- func (fact CurrencyRegisterFact) Token() base.Token
- type CurrencyRegisterFactBSONUnmarshaler
- type CurrencyRegisterFactJSONMarshaler
- type CurrencyRegisterFactJSONUnMarshaler
- type CurrencyRegisterProcessor
- func (opp *CurrencyRegisterProcessor) Close() error
- func (opp *CurrencyRegisterProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *CurrencyRegisterProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type DuplicationType
- type Feeer
- type FixedFeeer
- func (fa FixedFeeer) Bytes() []byte
- func (fa *FixedFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *FixedFeeer) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fa FixedFeeer) ExchangeMin() currency.Big
- func (fa FixedFeeer) Fee(currency.Big) (currency.Big, error)
- func (fa FixedFeeer) IsValid([]byte) error
- func (fa FixedFeeer) MarshalBSON() ([]byte, error)
- func (fa FixedFeeer) MarshalJSON() ([]byte, error)
- func (fa FixedFeeer) Min() currency.Big
- func (fa FixedFeeer) Receiver() base.Address
- func (FixedFeeer) Type() string
- type FixedFeeerBSONUnpacker
- type FixedFeeerJSONMarshaler
- type FixedFeeerJSONUnmarshaler
- type GenesisCurrencies
- func (op *GenesisCurrencies) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *GenesisCurrencies) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op GenesisCurrencies) IsValid(networkID []byte) error
- func (op GenesisCurrencies) MarshalBSON() ([]byte, error)
- func (op GenesisCurrencies) MarshalJSON() ([]byte, error)
- func (GenesisCurrencies) PreProcess(ctx context.Context, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (op GenesisCurrencies) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type GenesisCurrenciesFact
- func (fact GenesisCurrenciesFact) Address() (base.Address, error)
- func (fact GenesisCurrenciesFact) Bytes() []byte
- func (fact GenesisCurrenciesFact) Currencies() []CurrencyDesign
- func (fact *GenesisCurrenciesFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *GenesisCurrenciesFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact GenesisCurrenciesFact) GenerateHash() util.Hash
- func (fact GenesisCurrenciesFact) GenesisNodeKey() base.Publickey
- func (fact GenesisCurrenciesFact) Hash() util.Hash
- func (fact GenesisCurrenciesFact) IsValid(b []byte) error
- func (fact GenesisCurrenciesFact) Keys() currency.AccountKeys
- func (fact GenesisCurrenciesFact) MarshalBSON() ([]byte, error)
- func (fact GenesisCurrenciesFact) MarshalJSON() ([]byte, error)
- func (fact GenesisCurrenciesFact) Token() base.Token
- type GenesisCurrenciesFactBSONUnMarshaler
- type GenesisCurrenciesFactJSONMarshaler
- type GenesisCurrenciesFactJSONUnMarshaler
- type GetNewProcessor
- func NewCreateAccountsProcessor() GetNewProcessor
- func NewCreateContractAccountsProcessor() GetNewProcessor
- func NewCurrencyPolicyUpdaterProcessor(threshold base.Threshold) GetNewProcessor
- func NewCurrencyRegisterProcessor(threshold base.Threshold) GetNewProcessor
- func NewKeyUpdaterProcessor() GetNewProcessor
- func NewSuffrageInflationProcessor(threshold base.Threshold) GetNewProcessor
- func NewTransfersProcessor() GetNewProcessor
- func NewWithdrawsProcessor() GetNewProcessor
- type KeyUpdaterProcessor
- func (opp *KeyUpdaterProcessor) Close() error
- func (opp *KeyUpdaterProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *KeyUpdaterProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type NilFeeer
- func (NilFeeer) Bytes() []byte
- func (NilFeeer) ExchangeMin() currency.Big
- func (NilFeeer) Fee(currency.Big) (currency.Big, error)
- func (fa NilFeeer) IsValid([]byte) error
- func (fa NilFeeer) MarshalBSON() ([]byte, error)
- func (fa NilFeeer) MarshalJSON() ([]byte, error)
- func (NilFeeer) Min() currency.Big
- func (NilFeeer) Receiver() base.Address
- func (NilFeeer) Type() string
- func (fa *NilFeeer) UnmarsahlBSON(b []byte) error
- func (fa *NilFeeer) UnmarsahlJSON(b []byte) error
- type OperationProcessor
- func (opr *OperationProcessor) Cancel() error
- func (opr *OperationProcessor) Close() error
- func (opr *OperationProcessor) New(height base.Height, getStateFunc base.GetStateFunc, ...) (*OperationProcessor, error)
- func (opr *OperationProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opr *OperationProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- func (opr *OperationProcessor) SetProcessor(hint hint.Hint, newProcessor GetNewProcessor) (base.OperationProcessor, error)
- type RatioFeeer
- func (fa RatioFeeer) Bytes() []byte
- func (fa *RatioFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *RatioFeeer) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fa RatioFeeer) ExchangeMin() currency.Big
- func (fa RatioFeeer) Fee(a currency.Big) (currency.Big, error)
- func (fa RatioFeeer) IsValid([]byte) error
- func (fa RatioFeeer) MarshalBSON() ([]byte, error)
- func (fa RatioFeeer) MarshalJSON() ([]byte, error)
- func (fa RatioFeeer) Min() currency.Big
- func (fa RatioFeeer) Receiver() base.Address
- func (RatioFeeer) Type() string
- type RatioFeeerBSONUnpacker
- type RatioFeeerJSONMarshaler
- type RatioFeeerJSONUnmarshaler
- type SuffrageInflationProcessor
- func (opp *SuffrageInflationProcessor) Close() error
- func (opp *SuffrageInflationProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *SuffrageInflationProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type TransferFactJSONMarshaler
- type TransfersItemProcessor
- func (opp *TransfersItemProcessor) Close() error
- func (opp *TransfersItemProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) error
- func (opp *TransfersItemProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, error)
- type TransfersProcessor
- func (opp *TransfersProcessor) Close() error
- func (opp *TransfersProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *TransfersProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type Withdraws
- func (op *Withdraws) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *Withdraws) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op *Withdraws) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op Withdraws) MarshalBSON() ([]byte, error)
- func (op Withdraws) MarshalJSON() ([]byte, error)
- func (Withdraws) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type WithdrawsFact
- func (fact WithdrawsFact) Addresses() ([]base.Address, error)
- func (fact WithdrawsFact) Bytes() []byte
- func (fact *WithdrawsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *WithdrawsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact WithdrawsFact) GenerateHash() util.Hash
- func (fact WithdrawsFact) Hash() util.Hash
- func (fact WithdrawsFact) IsValid(b []byte) error
- func (fact WithdrawsFact) Items() []WithdrawsItem
- func (fact WithdrawsFact) MarshalBSON() ([]byte, error)
- func (fact WithdrawsFact) MarshalJSON() ([]byte, error)
- func (fact WithdrawsFact) Rebuild() WithdrawsFact
- func (fact WithdrawsFact) Sender() base.Address
- func (fact WithdrawsFact) Token() base.Token
- type WithdrawsFactBSONUnmarshaler
- type WithdrawsFactJSONUnmarshaler
- type WithdrawsItem
- type WithdrawsItemBSONUnmarshaler
- type WithdrawsItemJSONMarshaler
- type WithdrawsItemMultiAmounts
- type WithdrawsItemProcessor
- func (opp *WithdrawsItemProcessor) Close() error
- func (opp *WithdrawsItemProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) error
- func (opp *WithdrawsItemProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, error)
- type WithdrawsItemSingleAmount
- type WithdrawsProcessor
- func (opp *WithdrawsProcessor) Close() error
- func (opp *WithdrawsProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *WithdrawsProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
Constants ¶
View Source
const ( FeeerNil = "nil" FeeerFixed = "fixed" FeeerRatio = "ratio" )
Variables ¶
View Source
var ( MinLengthContractID = 3 MaxLengthContractID = 10 ReValidContractID = regexp.MustCompile(`^[A-Z0-9][A-Z0-9-_\.\!\$\*\@]*[A-Z0-9]$`) )
View Source
var ( CreateContractAccountsFactHint = hint.MustNewHint("mitum-currency-create-contract-accounts-operation-fact-v0.0.1") CreateContractAccountsHint = hint.MustNewHint("mitum-currency-create-contract-accounts-operation-v0.0.1") )
View Source
var ( CurrencyPolicyUpdaterFactHint = hint.MustNewHint("mitum-currency-currency-policy-updater-operation-fact-v0.0.1") CurrencyPolicyUpdaterHint = hint.MustNewHint("mitum-currency-currency-policy-updater-operation-v0.0.1") )
View Source
var ( CurrencyRegisterFactHint = hint.MustNewHint("mitum-currency-currency-register-operation-fact-v0.0.1") CurrencyRegisterHint = hint.MustNewHint("mitum-currency-currency-register-operation-v0.0.1") )
View Source
var ( NilFeeerHint = hint.MustNewHint("mitum-currency-nil-feeer-v0.0.1") FixedFeeerHint = hint.MustNewHint("mitum-currency-fixed-feeer-v0.0.1") RatioFeeerHint = hint.MustNewHint("mitum-currency-ratio-feeer-v0.0.1") )
View Source
var ( GenesisCurrenciesFactHint = hint.MustNewHint("mitum-currency-genesis-currencies-operation-fact-v0.0.1") GenesisCurrenciesHint = hint.MustNewHint("mitum-currency-genesis-currencies-operation-v0.0.1") )
View Source
var ( WithdrawsFactHint = hint.MustNewHint("mitum-currency-contract-account-withdraws-operation-fact-v0.0.1") WithdrawsHint = hint.MustNewHint("mitum-currency-contract-account-withdraws-operation-v0.0.1") )
View Source
var ContractAccountHint = hint.MustNewHint("mitum-currency-contract-account-status-v0.0.1")
View Source
var ContractAccountKeysHint = hint.MustNewHint("mitum-currency-contract-account-keys-v0.0.1")
View Source
var ContractAccountStateValueHint = hint.MustNewHint("contract-account-state-value-v0.0.1")
View Source
var (
CreateContractAccountsItemMultiAmountsHint = hint.MustNewHint("mitum-currency-create-contract-accounts-multiple-amounts-v0.0.1")
)
View Source
var (
CreateContractAccountsItemSingleAmountHint = hint.MustNewHint("mitum-currency-create-contract-accounts-single-amount-v0.0.1")
)
View Source
var (
CurrencyDesignHint = hint.MustNewHint("mitum-currency-currency-design-v0.0.1")
)
View Source
var CurrencyDesignStateValueHint = hint.MustNewHint("currency-design-state-value-v0.0.1")
View Source
var (
CurrencyPolicyHint = hint.MustNewHint("mitum-currency-currency-policy-v0.0.1")
)
View Source
var MaxCreateContractAccountsItems uint = 10
View Source
var MaxWithdrawsItems uint = 10
View Source
var StateKeyContractAccountSuffix = ":contractaccount"
View Source
var StateKeyCurrencyDesignPrefix = "currencydesign:"
View Source
var UnlimitedMaxFeeAmount = currency.NewBig(-1)
View Source
var (
WithdrawsItemMultiAmountsHint = hint.MustNewHint("mitum-currency-contract-account-withdraws-multi-amounts-v0.0.1")
)
View Source
var (
WithdrawsItemSingleAmountHint = hint.MustNewHint("mitum-currency-contract-account-withdraws-single-amount-v0.0.1")
)
Functions ¶
func CalculateItemsFee ¶
func CalculateItemsFee(getStateFunc base.GetStateFunc, items []currency.AmountsItem) (map[currency.CurrencyID][2]currency.Big, error)
func CheckEnoughBalance ¶
func CheckEnoughBalance( holder base.Address, required map[currency.CurrencyID][2]currency.Big, getStateFunc base.GetStateFunc, ) (map[currency.CurrencyID]base.StateMergeValue, error)
func NewContractAccountStateMergeValue ¶
func NewContractAccountStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
func NewCurrencyDesignStateMergeValue ¶
func NewCurrencyDesignStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
func StateKeyContractAccount ¶
func StateKeyCurrencyDesign ¶
func StateKeyCurrencyDesign(cid currency.CurrencyID) string
Types ¶
type BaseCreateContractAccountsItem ¶
type BaseCreateContractAccountsItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseCreateContractAccountsItem ¶
func NewBaseCreateContractAccountsItem(ht hint.Hint, keys currency.AccountKeys, amounts []currency.Amount) BaseCreateContractAccountsItem
func (BaseCreateContractAccountsItem) Address ¶
func (it BaseCreateContractAccountsItem) Address() (base.Address, error)
func (BaseCreateContractAccountsItem) Amounts ¶
func (it BaseCreateContractAccountsItem) Amounts() []currency.Amount
func (BaseCreateContractAccountsItem) Bytes ¶
func (it BaseCreateContractAccountsItem) Bytes() []byte
func (*BaseCreateContractAccountsItem) DecodeBSON ¶
func (it *BaseCreateContractAccountsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseCreateContractAccountsItem) DecodeJSON ¶
func (it *BaseCreateContractAccountsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseCreateContractAccountsItem) IsValid ¶
func (it BaseCreateContractAccountsItem) IsValid([]byte) error
func (BaseCreateContractAccountsItem) Keys ¶
func (it BaseCreateContractAccountsItem) Keys() currency.AccountKeys
func (BaseCreateContractAccountsItem) MarshalBSON ¶
func (it BaseCreateContractAccountsItem) MarshalBSON() ([]byte, error)
func (BaseCreateContractAccountsItem) MarshalJSON ¶
func (it BaseCreateContractAccountsItem) MarshalJSON() ([]byte, error)
func (BaseCreateContractAccountsItem) Rebuild ¶
func (it BaseCreateContractAccountsItem) Rebuild() CreateContractAccountsItem
type BaseOperationProcessor ¶
type BaseOperationProcessor interface { PreProcess(base.Operation, base.GetStateFunc) (base.OperationProcessReasonError, error) Process(base.Operation, base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error) Close() error }
type BaseWithdrawsItem ¶
type BaseWithdrawsItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseWithdrawsItem ¶
func (BaseWithdrawsItem) Amounts ¶
func (it BaseWithdrawsItem) Amounts() []currency.Amount
func (BaseWithdrawsItem) Bytes ¶
func (it BaseWithdrawsItem) Bytes() []byte
func (*BaseWithdrawsItem) DecodeBSON ¶
func (it *BaseWithdrawsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseWithdrawsItem) DecodeJSON ¶
func (it *BaseWithdrawsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseWithdrawsItem) IsValid ¶
func (it BaseWithdrawsItem) IsValid([]byte) error
func (BaseWithdrawsItem) MarshalBSON ¶
func (it BaseWithdrawsItem) MarshalBSON() ([]byte, error)
func (BaseWithdrawsItem) MarshalJSON ¶
func (it BaseWithdrawsItem) MarshalJSON() ([]byte, error)
func (BaseWithdrawsItem) Rebuild ¶
func (it BaseWithdrawsItem) Rebuild() WithdrawsItem
func (BaseWithdrawsItem) Target ¶
func (it BaseWithdrawsItem) Target() base.Address
type BaseWithdrawsItemJSONUnpacker ¶
type BaseWithdrawsItemJSONUnpacker struct { Hint hint.Hint `json:"_hint"` Target string `json:"target"` Amounts json.RawMessage `json:"amounts"` }
type ContractAccount ¶
type ContractAccount struct { hint.BaseHinter // contains filtered or unexported fields }
func NewContractAccount ¶
func NewContractAccount(owner base.Address, isActive bool) ContractAccount
func StateContractAccountValue ¶
func StateContractAccountValue(st base.State) (ContractAccount, error)
func (ContractAccount) Bytes ¶
func (cs ContractAccount) Bytes() []byte
func (*ContractAccount) DecodeBSON ¶
func (cs *ContractAccount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*ContractAccount) DecodeJSON ¶
func (ca *ContractAccount) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (ContractAccount) Equal ¶
func (cs ContractAccount) Equal(b ContractAccount) bool
func (ContractAccount) GenerateHash ¶
func (cs ContractAccount) GenerateHash() util.Hash
func (ContractAccount) Hash ¶
func (cs ContractAccount) Hash() util.Hash
func (ContractAccount) IsActive ¶
func (cs ContractAccount) IsActive() bool
func (ContractAccount) IsValid ¶
func (cs ContractAccount) IsValid([]byte) error
func (ContractAccount) MarshalBSON ¶
func (cs ContractAccount) MarshalBSON() ([]byte, error)
func (ContractAccount) MarshalJSON ¶
func (cs ContractAccount) MarshalJSON() ([]byte, error)
func (ContractAccount) Owner ¶
func (cs ContractAccount) Owner() base.Address
func (ContractAccount) SetIsActive ¶
func (cs ContractAccount) SetIsActive(b bool) ContractAccount
func (ContractAccount) SetOwner ¶
func (cs ContractAccount) SetOwner(a base.Address) (ContractAccount, error)
type ContractAccountJSONMarshaler ¶
type ContractAccountJSONMarshaler struct { hint.BaseHinter IsActive bool `json:"isactive"` Owner base.Address `json:"owner"` }
type ContractAccountKeys ¶
type ContractAccountKeys struct { hint.BaseHinter // contains filtered or unexported fields }
func EmptyBaseAccountKeys ¶
func EmptyBaseAccountKeys() ContractAccountKeys
func NewContractAccountKeys ¶
func NewContractAccountKeys() (ContractAccountKeys, error)
func (ContractAccountKeys) Bytes ¶
func (ks ContractAccountKeys) Bytes() []byte
func (ContractAccountKeys) Equal ¶
func (ks ContractAccountKeys) Equal(b currency.AccountKeys) bool
func (ContractAccountKeys) GenerateHash ¶
func (ks ContractAccountKeys) GenerateHash() (util.Hash, error)
func (ContractAccountKeys) Hash ¶
func (ks ContractAccountKeys) Hash() util.Hash
func (ContractAccountKeys) IsValid ¶
func (ks ContractAccountKeys) IsValid([]byte) error
func (ContractAccountKeys) Key ¶
func (ks ContractAccountKeys) Key(k base.Publickey) (currency.AccountKey, bool)
func (ContractAccountKeys) Keys ¶
func (ks ContractAccountKeys) Keys() []currency.AccountKey
func (ContractAccountKeys) Threshold ¶
func (ks ContractAccountKeys) Threshold() uint
type ContractAccountStateValue ¶
type ContractAccountStateValue struct { hint.BaseHinter // contains filtered or unexported fields }
func NewContractAccountStateValue ¶
func NewContractAccountStateValue(account ContractAccount) ContractAccountStateValue
func (*ContractAccountStateValue) DecodeBSON ¶
func (s *ContractAccountStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*ContractAccountStateValue) DecodeJSON ¶
func (s *ContractAccountStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (ContractAccountStateValue) HashBytes ¶
func (c ContractAccountStateValue) HashBytes() []byte
func (ContractAccountStateValue) Hint ¶
func (c ContractAccountStateValue) Hint() hint.Hint
func (ContractAccountStateValue) IsValid ¶
func (c ContractAccountStateValue) IsValid([]byte) error
func (ContractAccountStateValue) MarshalBSON ¶
func (s ContractAccountStateValue) MarshalBSON() ([]byte, error)
func (ContractAccountStateValue) MarshalJSON ¶
func (s ContractAccountStateValue) MarshalJSON() ([]byte, error)
type ContractAccountStateValueJSONMarshaler ¶
type ContractAccountStateValueJSONMarshaler struct { hint.BaseHinter ContractAccount ContractAccount `json:"contractaccount"` }
type ContractAccountStateValueJSONUnmarshaler ¶
type ContractAccountStateValueJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` ContractAccount json.RawMessage `json:"contractaccount"` }
type ContractAccountStateValueMerger ¶
type ContractAccountStateValueMerger struct {
*base.BaseStateValueMerger
}
type ContractID ¶
type ContractID string
func (ContractID) Bytes ¶
func (cid ContractID) Bytes() []byte
func (ContractID) IsValid ¶
func (cid ContractID) IsValid([]byte) error
func (ContractID) String ¶
func (cid ContractID) String() string
type CreateAccountsItemProcessor ¶
type CreateAccountsItemProcessor struct {
// contains filtered or unexported fields
}
func (*CreateAccountsItemProcessor) Close ¶
func (opp *CreateAccountsItemProcessor) Close() error
func (*CreateAccountsItemProcessor) PreProcess ¶
func (opp *CreateAccountsItemProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) error
func (*CreateAccountsItemProcessor) Process ¶
func (opp *CreateAccountsItemProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, error)
type CreateAccountsProcessor ¶
type CreateAccountsProcessor struct {
*base.BaseOperationProcessor
}
func (*CreateAccountsProcessor) Close ¶
func (opp *CreateAccountsProcessor) Close() error
func (*CreateAccountsProcessor) PreProcess ¶
func (opp *CreateAccountsProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CreateAccountsProcessor) Process ¶
func (opp *CreateAccountsProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type CreateContractAccounts ¶
type CreateContractAccounts struct {
currency.BaseOperation
}
func NewCreateContractAccounts ¶
func NewCreateContractAccounts(fact CreateContractAccountsFact) (CreateContractAccounts, error)
func (*CreateContractAccounts) DecodeBSON ¶
func (op *CreateContractAccounts) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccounts) DecodeJSON ¶
func (op *CreateContractAccounts) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (*CreateContractAccounts) HashSign ¶
func (op *CreateContractAccounts) HashSign(priv base.Privatekey, networkID base.NetworkID) error
func (CreateContractAccounts) MarshalBSON ¶
func (op CreateContractAccounts) MarshalBSON() ([]byte, error)
func (CreateContractAccounts) MarshalJSON ¶
func (op CreateContractAccounts) MarshalJSON() ([]byte, error)
func (CreateContractAccounts) Process ¶
func (CreateContractAccounts) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type CreateContractAccountsFact ¶
func NewCreateContractAccountsFact ¶
func NewCreateContractAccountsFact(token []byte, sender base.Address, items []CreateContractAccountsItem) CreateContractAccountsFact
func (CreateContractAccountsFact) Addresses ¶
func (fact CreateContractAccountsFact) Addresses() ([]base.Address, error)
func (CreateContractAccountsFact) Bytes ¶
func (fact CreateContractAccountsFact) Bytes() []byte
func (*CreateContractAccountsFact) DecodeBSON ¶
func (fact *CreateContractAccountsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccountsFact) DecodeJSON ¶
func (fact *CreateContractAccountsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CreateContractAccountsFact) GenerateHash ¶
func (fact CreateContractAccountsFact) GenerateHash() util.Hash
func (CreateContractAccountsFact) Hash ¶
func (fact CreateContractAccountsFact) Hash() util.Hash
func (CreateContractAccountsFact) IsValid ¶
func (fact CreateContractAccountsFact) IsValid(b []byte) error
func (CreateContractAccountsFact) Items ¶
func (fact CreateContractAccountsFact) Items() []CreateContractAccountsItem
func (CreateContractAccountsFact) MarshalBSON ¶
func (fact CreateContractAccountsFact) MarshalBSON() ([]byte, error)
func (CreateContractAccountsFact) MarshalJSON ¶
func (fact CreateContractAccountsFact) MarshalJSON() ([]byte, error)
func (CreateContractAccountsFact) Rebuild ¶
func (fact CreateContractAccountsFact) Rebuild() CreateContractAccountsFact
func (CreateContractAccountsFact) Sender ¶
func (fact CreateContractAccountsFact) Sender() base.Address
func (CreateContractAccountsFact) Targets ¶
func (fact CreateContractAccountsFact) Targets() ([]base.Address, error)
func (CreateContractAccountsFact) Token ¶
func (fact CreateContractAccountsFact) Token() base.Token
type CreateContractAccountsFactJSONMarshaler ¶
type CreateContractAccountsFactJSONMarshaler struct { base.BaseFactJSONMarshaler Owner base.Address `json:"sender"` Items []CreateContractAccountsItem `json:"items"` }
type CreateContractAccountsFactJSONUnMarshaler ¶
type CreateContractAccountsFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Owner string `json:"sender"` Items json.RawMessage `json:"items"` }
type CreateContractAccountsItem ¶
type CreateContractAccountsItem interface { hint.Hinter util.IsValider currency.AmountsItem Bytes() []byte Keys() currency.AccountKeys Address() (base.Address, error) Rebuild() CreateContractAccountsItem }
type CreateContractAccountsItemJSONMarshaler ¶
type CreateContractAccountsItemJSONMarshaler struct { hint.BaseHinter Keys currency.AccountKeys `json:"keys"` Amounts []currency.Amount `json:"amounts"` }
type CreateContractAccountsItemJSONUnMarshaler ¶
type CreateContractAccountsItemJSONUnMarshaler struct { Hint hint.Hint `json:"_hint"` Keys json.RawMessage `json:"keys"` Amounts json.RawMessage `json:"amounts"` }
type CreateContractAccountsItemMultiAmounts ¶
type CreateContractAccountsItemMultiAmounts struct {
BaseCreateContractAccountsItem
}
func NewCreateContractAccountsItemMultiAmounts ¶
func NewCreateContractAccountsItemMultiAmounts(keys currency.AccountKeys, amounts []currency.Amount) CreateContractAccountsItemMultiAmounts
func (CreateContractAccountsItemMultiAmounts) IsValid ¶
func (it CreateContractAccountsItemMultiAmounts) IsValid([]byte) error
func (CreateContractAccountsItemMultiAmounts) Rebuild ¶
func (it CreateContractAccountsItemMultiAmounts) Rebuild() CreateContractAccountsItem
type CreateContractAccountsItemProcessor ¶
type CreateContractAccountsItemProcessor struct {
// contains filtered or unexported fields
}
func (*CreateContractAccountsItemProcessor) Close ¶
func (opp *CreateContractAccountsItemProcessor) Close() error
func (*CreateContractAccountsItemProcessor) PreProcess ¶
func (opp *CreateContractAccountsItemProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) error
func (*CreateContractAccountsItemProcessor) Process ¶
func (opp *CreateContractAccountsItemProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, error)
type CreateContractAccountsItemSingleAmount ¶
type CreateContractAccountsItemSingleAmount struct {
BaseCreateContractAccountsItem
}
func NewCreateContractAccountsItemSingleAmount ¶
func NewCreateContractAccountsItemSingleAmount(keys currency.AccountKeys, amount currency.Amount) CreateContractAccountsItemSingleAmount
func (CreateContractAccountsItemSingleAmount) IsValid ¶
func (it CreateContractAccountsItemSingleAmount) IsValid([]byte) error
func (CreateContractAccountsItemSingleAmount) Rebuild ¶
func (it CreateContractAccountsItemSingleAmount) Rebuild() CreateContractAccountsItem
type CreateContractAccountsProcessor ¶
type CreateContractAccountsProcessor struct {
*base.BaseOperationProcessor
}
func (*CreateContractAccountsProcessor) Close ¶
func (opp *CreateContractAccountsProcessor) Close() error
func (*CreateContractAccountsProcessor) PreProcess ¶
func (opp *CreateContractAccountsProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CreateContractAccountsProcessor) Process ¶
func (opp *CreateContractAccountsProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type CurrencyDesign ¶
type CurrencyDesign struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCurrencyDesign ¶
func NewCurrencyDesign(amount currency.Amount, genesisAccount base.Address, po CurrencyPolicy) CurrencyDesign
func StateCurrencyDesignValue ¶
func StateCurrencyDesignValue(st base.State) (CurrencyDesign, error)
func (CurrencyDesign) AddAggregate ¶
func (de CurrencyDesign) AddAggregate(b currency.Big) (CurrencyDesign, error)
func (CurrencyDesign) Aggregate ¶
func (de CurrencyDesign) Aggregate() currency.Big
func (CurrencyDesign) Amount ¶
func (de CurrencyDesign) Amount() currency.Amount
func (CurrencyDesign) Bytes ¶
func (de CurrencyDesign) Bytes() []byte
func (CurrencyDesign) Currency ¶
func (de CurrencyDesign) Currency() currency.CurrencyID
func (*CurrencyDesign) DecodeBSON ¶
func (de *CurrencyDesign) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyDesign) DecodeJSON ¶
func (de *CurrencyDesign) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyDesign) GenesisAccount ¶
func (de CurrencyDesign) GenesisAccount() base.Address
func (CurrencyDesign) IsValid ¶
func (de CurrencyDesign) IsValid([]byte) error
func (CurrencyDesign) MarshalBSON ¶
func (de CurrencyDesign) MarshalBSON() ([]byte, error)
func (CurrencyDesign) MarshalJSON ¶
func (de CurrencyDesign) MarshalJSON() ([]byte, error)
func (CurrencyDesign) Policy ¶
func (de CurrencyDesign) Policy() CurrencyPolicy
func (CurrencyDesign) SetPolicy ¶
func (de CurrencyDesign) SetPolicy(po CurrencyPolicy) CurrencyDesign
type CurrencyDesignJSONMarshaler ¶
type CurrencyDesignJSONMarshaler struct { hint.BaseHinter Amount currency.Amount `json:"amount"` GenesisAccount base.Address `json:"genesis_account"` Policy CurrencyPolicy `json:"policy"` Aggregate string `json:"aggregate"` }
type CurrencyDesignJSONUnmarshaler ¶
type CurrencyDesignJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` Amount json.RawMessage `json:"amount"` GenesisAccount string `json:"genesis_account"` Policy json.RawMessage `json:"policy"` Aggregate string `json:"aggregate"` }
type CurrencyDesignStateValue ¶
type CurrencyDesignStateValue struct { hint.BaseHinter CurrencyDesign CurrencyDesign }
func NewCurrencyDesignStateValue ¶
func NewCurrencyDesignStateValue(currencyDesign CurrencyDesign) CurrencyDesignStateValue
func (*CurrencyDesignStateValue) DecodeBSON ¶
func (s *CurrencyDesignStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyDesignStateValue) DecodeJSON ¶
func (s *CurrencyDesignStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyDesignStateValue) HashBytes ¶
func (c CurrencyDesignStateValue) HashBytes() []byte
func (CurrencyDesignStateValue) Hint ¶
func (c CurrencyDesignStateValue) Hint() hint.Hint
func (CurrencyDesignStateValue) IsValid ¶
func (c CurrencyDesignStateValue) IsValid([]byte) error
func (CurrencyDesignStateValue) MarshalBSON ¶
func (s CurrencyDesignStateValue) MarshalBSON() ([]byte, error)
func (CurrencyDesignStateValue) MarshalJSON ¶
func (s CurrencyDesignStateValue) MarshalJSON() ([]byte, error)
type CurrencyDesignStateValueJSONMarshaler ¶
type CurrencyDesignStateValueJSONMarshaler struct { hint.BaseHinter CurrencyDesign CurrencyDesign `json:"currencydesign"` }
type CurrencyDesignStateValueJSONUnmarshaler ¶
type CurrencyDesignStateValueJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` CurrencyDesign json.RawMessage `json:"currencydesign"` }
type CurrencyDesignStateValueMerger ¶
type CurrencyDesignStateValueMerger struct {
*base.BaseStateValueMerger
}
type CurrencyPolicy ¶
type CurrencyPolicy struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCurrencyPolicy ¶
func NewCurrencyPolicy(newAccountMinBalance currency.Big, feeer Feeer) CurrencyPolicy
func (CurrencyPolicy) Bytes ¶
func (po CurrencyPolicy) Bytes() []byte
func (*CurrencyPolicy) DecodeBSON ¶
func (po *CurrencyPolicy) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicy) DecodeJSON ¶
func (po *CurrencyPolicy) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyPolicy) Feeer ¶
func (po CurrencyPolicy) Feeer() Feeer
func (CurrencyPolicy) IsValid ¶
func (po CurrencyPolicy) IsValid([]byte) error
func (CurrencyPolicy) MarshalBSON ¶
func (po CurrencyPolicy) MarshalBSON() ([]byte, error)
func (CurrencyPolicy) MarshalJSON ¶
func (po CurrencyPolicy) MarshalJSON() ([]byte, error)
func (CurrencyPolicy) NewAccountMinBalance ¶
func (po CurrencyPolicy) NewAccountMinBalance() currency.Big
func (CurrencyPolicy) Process ¶
func (CurrencyPolicy) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type CurrencyPolicyJSONMarshaler ¶
type CurrencyPolicyJSONMarshaler struct { hint.BaseHinter MinBalance string `json:"new_account_min_balance"` Feeer Feeer `json:"feeer"` }
type CurrencyPolicyJSONUnmarshaler ¶
type CurrencyPolicyJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` MinBalance string `json:"new_account_min_balance"` Feeer json.RawMessage `json:"feeer"` }
type CurrencyPolicyUpdater ¶
type CurrencyPolicyUpdater struct {
currency.BaseNodeOperation
}
func NewCurrencyPolicyUpdater ¶
func NewCurrencyPolicyUpdater(fact CurrencyPolicyUpdaterFact) (CurrencyPolicyUpdater, error)
func (*CurrencyPolicyUpdater) DecodeBSON ¶
func (op *CurrencyPolicyUpdater) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicyUpdater) DecodeJSON ¶
func (op *CurrencyPolicyUpdater) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyPolicyUpdater) MarshalBSON ¶
func (op CurrencyPolicyUpdater) MarshalBSON() ([]byte, error)
func (CurrencyPolicyUpdater) MarshalJSON ¶
func (op CurrencyPolicyUpdater) MarshalJSON() ([]byte, error)
type CurrencyPolicyUpdaterFact ¶
func NewCurrencyPolicyUpdaterFact ¶
func NewCurrencyPolicyUpdaterFact(token []byte, currency currency.CurrencyID, policy CurrencyPolicy) CurrencyPolicyUpdaterFact
func (CurrencyPolicyUpdaterFact) Bytes ¶
func (fact CurrencyPolicyUpdaterFact) Bytes() []byte
func (CurrencyPolicyUpdaterFact) Currency ¶
func (fact CurrencyPolicyUpdaterFact) Currency() currency.CurrencyID
func (*CurrencyPolicyUpdaterFact) DecodeBSON ¶
func (fact *CurrencyPolicyUpdaterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicyUpdaterFact) DecodeJSON ¶
func (fact *CurrencyPolicyUpdaterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyPolicyUpdaterFact) GenerateHash ¶
func (fact CurrencyPolicyUpdaterFact) GenerateHash() util.Hash
func (CurrencyPolicyUpdaterFact) Hash ¶
func (fact CurrencyPolicyUpdaterFact) Hash() util.Hash
func (CurrencyPolicyUpdaterFact) IsValid ¶
func (fact CurrencyPolicyUpdaterFact) IsValid(b []byte) error
func (CurrencyPolicyUpdaterFact) MarshalBSON ¶
func (fact CurrencyPolicyUpdaterFact) MarshalBSON() ([]byte, error)
func (CurrencyPolicyUpdaterFact) MarshalJSON ¶
func (fact CurrencyPolicyUpdaterFact) MarshalJSON() ([]byte, error)
func (CurrencyPolicyUpdaterFact) Policy ¶
func (fact CurrencyPolicyUpdaterFact) Policy() CurrencyPolicy
func (CurrencyPolicyUpdaterFact) Token ¶
func (fact CurrencyPolicyUpdaterFact) Token() base.Token
type CurrencyPolicyUpdaterFactJSONMarshaler ¶
type CurrencyPolicyUpdaterFactJSONMarshaler struct { base.BaseFactJSONMarshaler Currency currency.CurrencyID `json:"currency"` Policy CurrencyPolicy `json:"policy"` }
type CurrencyPolicyUpdaterFactJSONUnMarshaler ¶
type CurrencyPolicyUpdaterFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Currency string `json:"currency"` Policy json.RawMessage `json:"policy"` }
type CurrencyPolicyUpdaterProcessor ¶
type CurrencyPolicyUpdaterProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*CurrencyPolicyUpdaterProcessor) Close ¶
func (opp *CurrencyPolicyUpdaterProcessor) Close() error
func (*CurrencyPolicyUpdaterProcessor) PreProcess ¶
func (opp *CurrencyPolicyUpdaterProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CurrencyPolicyUpdaterProcessor) Process ¶
func (opp *CurrencyPolicyUpdaterProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type CurrencyRegister ¶
type CurrencyRegister struct {
currency.BaseNodeOperation
}
func NewCurrencyRegister ¶
func NewCurrencyRegister(fact CurrencyRegisterFact) (CurrencyRegister, error)
func (*CurrencyRegister) DecodeBSON ¶
func (op *CurrencyRegister) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyRegister) DecodeJSON ¶
func (op *CurrencyRegister) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyRegister) MarshalBSON ¶
func (op CurrencyRegister) MarshalBSON() ([]byte, error)
func (CurrencyRegister) MarshalJSON ¶
func (op CurrencyRegister) MarshalJSON() ([]byte, error)
func (CurrencyRegister) Process ¶
func (CurrencyRegister) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type CurrencyRegisterFact ¶
func NewCurrencyRegisterFact ¶
func NewCurrencyRegisterFact(token []byte, de CurrencyDesign) CurrencyRegisterFact
func (CurrencyRegisterFact) Bytes ¶
func (fact CurrencyRegisterFact) Bytes() []byte
func (CurrencyRegisterFact) Currency ¶
func (fact CurrencyRegisterFact) Currency() CurrencyDesign
func (*CurrencyRegisterFact) DecodeBSON ¶
func (fact *CurrencyRegisterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyRegisterFact) DecodeJSON ¶
func (fact *CurrencyRegisterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CurrencyRegisterFact) GenerateHash ¶
func (fact CurrencyRegisterFact) GenerateHash() util.Hash
func (CurrencyRegisterFact) Hash ¶
func (fact CurrencyRegisterFact) Hash() util.Hash
func (CurrencyRegisterFact) IsValid ¶
func (fact CurrencyRegisterFact) IsValid(b []byte) error
func (CurrencyRegisterFact) MarshalBSON ¶
func (fact CurrencyRegisterFact) MarshalBSON() ([]byte, error)
func (CurrencyRegisterFact) MarshalJSON ¶
func (fact CurrencyRegisterFact) MarshalJSON() ([]byte, error)
func (CurrencyRegisterFact) Token ¶
func (fact CurrencyRegisterFact) Token() base.Token
type CurrencyRegisterFactJSONMarshaler ¶
type CurrencyRegisterFactJSONMarshaler struct { base.BaseFactJSONMarshaler Currency CurrencyDesign `json:"currency"` }
type CurrencyRegisterFactJSONUnMarshaler ¶
type CurrencyRegisterFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Currency json.RawMessage `json:"currency"` }
type CurrencyRegisterProcessor ¶
type CurrencyRegisterProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*CurrencyRegisterProcessor) Close ¶
func (opp *CurrencyRegisterProcessor) Close() error
func (*CurrencyRegisterProcessor) PreProcess ¶
func (opp *CurrencyRegisterProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*CurrencyRegisterProcessor) Process ¶
func (opp *CurrencyRegisterProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type DuplicationType ¶
type DuplicationType string
const ( DuplicationTypeSender DuplicationType = "sender" DuplicationTypeCurrency DuplicationType = "currency" )
type FixedFeeer ¶
type FixedFeeer struct { hint.BaseHinter // contains filtered or unexported fields }
func NewFixedFeeer ¶
func (FixedFeeer) Bytes ¶
func (fa FixedFeeer) Bytes() []byte
func (*FixedFeeer) DecodeBSON ¶
func (fa *FixedFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*FixedFeeer) DecodeJSON ¶
func (fa *FixedFeeer) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (FixedFeeer) ExchangeMin ¶
func (fa FixedFeeer) ExchangeMin() currency.Big
func (FixedFeeer) IsValid ¶
func (fa FixedFeeer) IsValid([]byte) error
func (FixedFeeer) MarshalBSON ¶
func (fa FixedFeeer) MarshalBSON() ([]byte, error)
func (FixedFeeer) MarshalJSON ¶
func (fa FixedFeeer) MarshalJSON() ([]byte, error)
func (FixedFeeer) Min ¶
func (fa FixedFeeer) Min() currency.Big
func (FixedFeeer) Receiver ¶
func (fa FixedFeeer) Receiver() base.Address
func (FixedFeeer) Type ¶
func (FixedFeeer) Type() string
type FixedFeeerBSONUnpacker ¶
type FixedFeeerJSONMarshaler ¶
type GenesisCurrencies ¶
type GenesisCurrencies struct {
currency.BaseOperation
}
func NewGenesisCurrencies ¶
func NewGenesisCurrencies(fact GenesisCurrenciesFact) GenesisCurrencies
func (*GenesisCurrencies) DecodeBSON ¶
func (op *GenesisCurrencies) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*GenesisCurrencies) DecodeJSON ¶
func (op *GenesisCurrencies) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (GenesisCurrencies) IsValid ¶
func (op GenesisCurrencies) IsValid(networkID []byte) error
func (GenesisCurrencies) MarshalBSON ¶
func (op GenesisCurrencies) MarshalBSON() ([]byte, error)
func (GenesisCurrencies) MarshalJSON ¶
func (op GenesisCurrencies) MarshalJSON() ([]byte, error)
func (GenesisCurrencies) PreProcess ¶
func (GenesisCurrencies) PreProcess( ctx context.Context, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (GenesisCurrencies) Process ¶
func (op GenesisCurrencies) Process( ctx context.Context, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type GenesisCurrenciesFact ¶
func NewGenesisCurrenciesFact ¶
func NewGenesisCurrenciesFact( token []byte, genesisNodeKey base.Publickey, keys currency.AccountKeys, cs []CurrencyDesign, ) GenesisCurrenciesFact
func (GenesisCurrenciesFact) Address ¶
func (fact GenesisCurrenciesFact) Address() (base.Address, error)
func (GenesisCurrenciesFact) Bytes ¶
func (fact GenesisCurrenciesFact) Bytes() []byte
func (GenesisCurrenciesFact) Currencies ¶
func (fact GenesisCurrenciesFact) Currencies() []CurrencyDesign
func (*GenesisCurrenciesFact) DecodeBSON ¶
func (fact *GenesisCurrenciesFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*GenesisCurrenciesFact) DecodeJSON ¶
func (fact *GenesisCurrenciesFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (GenesisCurrenciesFact) GenerateHash ¶
func (fact GenesisCurrenciesFact) GenerateHash() util.Hash
func (GenesisCurrenciesFact) GenesisNodeKey ¶
func (fact GenesisCurrenciesFact) GenesisNodeKey() base.Publickey
func (GenesisCurrenciesFact) Hash ¶
func (fact GenesisCurrenciesFact) Hash() util.Hash
func (GenesisCurrenciesFact) IsValid ¶
func (fact GenesisCurrenciesFact) IsValid(b []byte) error
func (GenesisCurrenciesFact) Keys ¶
func (fact GenesisCurrenciesFact) Keys() currency.AccountKeys
func (GenesisCurrenciesFact) MarshalBSON ¶
func (fact GenesisCurrenciesFact) MarshalBSON() ([]byte, error)
func (GenesisCurrenciesFact) MarshalJSON ¶
func (fact GenesisCurrenciesFact) MarshalJSON() ([]byte, error)
func (GenesisCurrenciesFact) Token ¶
func (fact GenesisCurrenciesFact) Token() base.Token
type GenesisCurrenciesFactJSONMarshaler ¶
type GenesisCurrenciesFactJSONMarshaler struct { base.BaseFactJSONMarshaler GenesisNodeKey base.Publickey `json:"genesis_node_key"` Keys currency.AccountKeys `json:"keys"` Currencies []CurrencyDesign `json:"currencies"` }
type GenesisCurrenciesFactJSONUnMarshaler ¶
type GenesisCurrenciesFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler GenesisNodeKey string `json:"genesis_node_key"` Keys json.RawMessage `json:"keys"` Currencies json.RawMessage `json:"currencies"` }
type GetNewProcessor ¶
type GetNewProcessor func( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc) (base.OperationProcessor, error)
func NewCreateAccountsProcessor ¶
func NewCreateAccountsProcessor() GetNewProcessor
func NewCreateContractAccountsProcessor ¶
func NewCreateContractAccountsProcessor() GetNewProcessor
func NewCurrencyPolicyUpdaterProcessor ¶
func NewCurrencyPolicyUpdaterProcessor(threshold base.Threshold) GetNewProcessor
func NewCurrencyRegisterProcessor ¶
func NewCurrencyRegisterProcessor(threshold base.Threshold) GetNewProcessor
func NewKeyUpdaterProcessor ¶
func NewKeyUpdaterProcessor() GetNewProcessor
func NewSuffrageInflationProcessor ¶
func NewSuffrageInflationProcessor(threshold base.Threshold) GetNewProcessor
func NewTransfersProcessor ¶
func NewTransfersProcessor() GetNewProcessor
func NewWithdrawsProcessor ¶
func NewWithdrawsProcessor() GetNewProcessor
type KeyUpdaterProcessor ¶
type KeyUpdaterProcessor struct {
*base.BaseOperationProcessor
}
func (*KeyUpdaterProcessor) Close ¶
func (opp *KeyUpdaterProcessor) Close() error
func (*KeyUpdaterProcessor) PreProcess ¶
func (opp *KeyUpdaterProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*KeyUpdaterProcessor) Process ¶
func (opp *KeyUpdaterProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type NilFeeer ¶
type NilFeeer struct {
hint.BaseHinter
}
func NewNilFeeer ¶
func NewNilFeeer() NilFeeer
func (NilFeeer) ExchangeMin ¶
func (NilFeeer) MarshalBSON ¶
func (NilFeeer) MarshalJSON ¶
func (*NilFeeer) UnmarsahlBSON ¶
func (*NilFeeer) UnmarsahlJSON ¶
type OperationProcessor ¶
type OperationProcessor struct { sync.RWMutex *logging.Logging *base.BaseOperationProcessor GetStateFunc base.GetStateFunc // contains filtered or unexported fields }
func NewOperationProcessor ¶
func NewOperationProcessor() *OperationProcessor
func (*OperationProcessor) Cancel ¶
func (opr *OperationProcessor) Cancel() error
func (*OperationProcessor) Close ¶
func (opr *OperationProcessor) Close() error
func (*OperationProcessor) New ¶
func (opr *OperationProcessor) New( height base.Height, getStateFunc base.GetStateFunc, newPreProcessConstraintFunc base.NewOperationProcessorProcessFunc, newProcessConstraintFunc base.NewOperationProcessorProcessFunc) (*OperationProcessor, error)
func (*OperationProcessor) PreProcess ¶
func (opr *OperationProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
func (*OperationProcessor) Process ¶
func (opr *OperationProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
func (*OperationProcessor) SetProcessor ¶
func (opr *OperationProcessor) SetProcessor( hint hint.Hint, newProcessor GetNewProcessor, ) (base.OperationProcessor, error)
type RatioFeeer ¶
type RatioFeeer struct { hint.BaseHinter // contains filtered or unexported fields }
func NewRatioFeeer ¶
func (RatioFeeer) Bytes ¶
func (fa RatioFeeer) Bytes() []byte
func (*RatioFeeer) DecodeBSON ¶
func (fa *RatioFeeer) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*RatioFeeer) DecodeJSON ¶
func (fa *RatioFeeer) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (RatioFeeer) ExchangeMin ¶
func (fa RatioFeeer) ExchangeMin() currency.Big
func (RatioFeeer) IsValid ¶
func (fa RatioFeeer) IsValid([]byte) error
func (RatioFeeer) MarshalBSON ¶
func (fa RatioFeeer) MarshalBSON() ([]byte, error)
func (RatioFeeer) MarshalJSON ¶
func (fa RatioFeeer) MarshalJSON() ([]byte, error)
func (RatioFeeer) Min ¶
func (fa RatioFeeer) Min() currency.Big
func (RatioFeeer) Receiver ¶
func (fa RatioFeeer) Receiver() base.Address
func (RatioFeeer) Type ¶
func (RatioFeeer) Type() string
type RatioFeeerBSONUnpacker ¶
type RatioFeeerJSONMarshaler ¶
type SuffrageInflationProcessor ¶
type SuffrageInflationProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
func (*SuffrageInflationProcessor) Close ¶
func (opp *SuffrageInflationProcessor) Close() error
func (*SuffrageInflationProcessor) PreProcess ¶
func (opp *SuffrageInflationProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*SuffrageInflationProcessor) Process ¶
func (opp *SuffrageInflationProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type TransferFactJSONMarshaler ¶
type TransferFactJSONMarshaler struct { base.BaseFactJSONMarshaler Sender base.Address `json:"sender"` Items []WithdrawsItem `json:"items"` }
type TransfersItemProcessor ¶
type TransfersItemProcessor struct {
// contains filtered or unexported fields
}
func (*TransfersItemProcessor) Close ¶
func (opp *TransfersItemProcessor) Close() error
func (*TransfersItemProcessor) PreProcess ¶
func (opp *TransfersItemProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) error
func (*TransfersItemProcessor) Process ¶
func (opp *TransfersItemProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, error)
type TransfersProcessor ¶
type TransfersProcessor struct {
*base.BaseOperationProcessor
}
func (*TransfersProcessor) Close ¶
func (opp *TransfersProcessor) Close() error
func (*TransfersProcessor) PreProcess ¶
func (opp *TransfersProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*TransfersProcessor) Process ¶
func (opp *TransfersProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type Withdraws ¶
type Withdraws struct {
currency.BaseOperation
}
func NewWithdraws ¶
func NewWithdraws(fact WithdrawsFact) (Withdraws, error)
func (*Withdraws) DecodeBSON ¶
func (*Withdraws) DecodeJSON ¶
func (Withdraws) MarshalBSON ¶
func (Withdraws) MarshalJSON ¶
func (Withdraws) Process ¶
func (Withdraws) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type WithdrawsFact ¶
func NewWithdrawsFact ¶
func NewWithdrawsFact(token []byte, sender base.Address, items []WithdrawsItem) WithdrawsFact
func (WithdrawsFact) Bytes ¶
func (fact WithdrawsFact) Bytes() []byte
func (*WithdrawsFact) DecodeBSON ¶
func (fact *WithdrawsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*WithdrawsFact) DecodeJSON ¶
func (fact *WithdrawsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (WithdrawsFact) GenerateHash ¶
func (fact WithdrawsFact) GenerateHash() util.Hash
func (WithdrawsFact) Hash ¶
func (fact WithdrawsFact) Hash() util.Hash
func (WithdrawsFact) IsValid ¶
func (fact WithdrawsFact) IsValid(b []byte) error
func (WithdrawsFact) Items ¶
func (fact WithdrawsFact) Items() []WithdrawsItem
func (WithdrawsFact) MarshalBSON ¶
func (fact WithdrawsFact) MarshalBSON() ([]byte, error)
func (WithdrawsFact) MarshalJSON ¶
func (fact WithdrawsFact) MarshalJSON() ([]byte, error)
func (WithdrawsFact) Rebuild ¶
func (fact WithdrawsFact) Rebuild() WithdrawsFact
func (WithdrawsFact) Sender ¶
func (fact WithdrawsFact) Sender() base.Address
func (WithdrawsFact) Token ¶
func (fact WithdrawsFact) Token() base.Token
type WithdrawsFactJSONUnmarshaler ¶
type WithdrawsFactJSONUnmarshaler struct { base.BaseFactJSONUnmarshaler Sender string `json:"sender"` Items json.RawMessage `json:"items"` }
type WithdrawsItem ¶
type WithdrawsItem interface { hint.Hinter util.IsValider currency.AmountsItem Bytes() []byte Target() base.Address Rebuild() WithdrawsItem }
type WithdrawsItemMultiAmounts ¶
type WithdrawsItemMultiAmounts struct {
BaseWithdrawsItem
}
func NewWithdrawsItemMultiAmounts ¶
func NewWithdrawsItemMultiAmounts(target base.Address, amounts []currency.Amount) WithdrawsItemMultiAmounts
func (WithdrawsItemMultiAmounts) IsValid ¶
func (it WithdrawsItemMultiAmounts) IsValid([]byte) error
func (WithdrawsItemMultiAmounts) Rebuild ¶
func (it WithdrawsItemMultiAmounts) Rebuild() WithdrawsItem
type WithdrawsItemProcessor ¶
type WithdrawsItemProcessor struct {
// contains filtered or unexported fields
}
func (*WithdrawsItemProcessor) Close ¶
func (opp *WithdrawsItemProcessor) Close() error
func (*WithdrawsItemProcessor) PreProcess ¶
func (opp *WithdrawsItemProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) error
func (*WithdrawsItemProcessor) Process ¶
func (opp *WithdrawsItemProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, error)
type WithdrawsItemSingleAmount ¶
type WithdrawsItemSingleAmount struct {
BaseWithdrawsItem
}
func NewWithdrawsItemSingleAmount ¶
func NewWithdrawsItemSingleAmount(target base.Address, amount currency.Amount) WithdrawsItemSingleAmount
func (WithdrawsItemSingleAmount) IsValid ¶
func (it WithdrawsItemSingleAmount) IsValid([]byte) error
func (WithdrawsItemSingleAmount) Rebuild ¶
func (it WithdrawsItemSingleAmount) Rebuild() WithdrawsItem
type WithdrawsProcessor ¶
type WithdrawsProcessor struct {
*base.BaseOperationProcessor
}
func (*WithdrawsProcessor) Close ¶
func (opp *WithdrawsProcessor) Close() error
func (*WithdrawsProcessor) PreProcess ¶
func (opp *WithdrawsProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*WithdrawsProcessor) Process ¶
func (opp *WithdrawsProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
Source Files ¶
- contract_account_status.go
- contract_account_status_bson.go
- contract_account_status_encode.go
- contract_account_status_json.go
- create_accounts_process.go
- create_contract_accounts.go
- create_contract_accounts_bson.go
- create_contract_accounts_encode.go
- create_contract_accounts_item.go
- create_contract_accounts_item_bson.go
- create_contract_accounts_item_encode.go
- create_contract_accounts_item_json.go
- create_contract_accounts_json.go
- create_contract_accounts_multi_amounts.go
- create_contract_accounts_process.go
- create_contract_accounts_single_amount.go
- currency_design.go
- currency_design_bson.go
- currency_design_encode.go
- currency_design_json.go
- currency_policy.go
- currency_policy_bson.go
- currency_policy_encode.go
- currency_policy_json.go
- currency_policy_updater.go
- currency_policy_updater_bson.go
- currency_policy_updater_encode.go
- currency_policy_updater_json.go
- currency_policy_updater_process.go
- currency_register.go
- currency_register_bson.go
- currency_register_encode.go
- currency_register_json.go
- currency_register_process.go
- feeer.go
- feeer_bson.go
- feeer_encode.go
- feeer_json.go
- genesis_currencies.go
- genesis_currencies_bson.go
- genesis_currencies_encode.go
- genesis_currencies_json.go
- genesis_currencies_process.go
- key_updater_process.go
- keys.go
- operation_processor.go
- signs.go
- state.go
- state_bson.go
- state_json.go
- suffrage_inflation_process.go
- transfers_process.go
- withdraws.go
- withdraws_bson.go
- withdraws_encode.go
- withdraws_item.go
- withdraws_item_bson.go
- withdraws_item_encode.go
- withdraws_item_json.go
- withdraws_json.go
- withdraws_multi_amounts.go
- withdraws_process.go
- withdraws_single_amount.go
Click to show internal directories.
Click to hide internal directories.