Documentation ¶
Index ¶
- Constants
- Variables
- func CalculateItemsFee(cp *CurrencyPool, 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]currency.AmountState, error)
- func IsStateBalanceKey(key string, suffix StateKeyBalanceSuffix) bool
- func IsStateContractAccountKey(key string) bool
- func IsStateCurrencyDesignKey(key string) bool
- func NewCreateAccountsProcessor(cp *CurrencyPool) currency.GetNewProcessor
- func NewCreateContractAccountsProcessor(cp *CurrencyPool) currency.GetNewProcessor
- func NewCurrencyPolicyUpdaterProcessor(cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold) currency.GetNewProcessor
- func NewCurrencyRegisterProcessor(cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold) currency.GetNewProcessor
- func NewFeeOperationProcessor(cp *CurrencyPool, op FeeOperation) state.Processor
- func NewFeeToken(feeer Feeer, height base.Height) []byte
- func NewKeyUpdaterProcessor(cp *CurrencyPool) currency.GetNewProcessor
- func NewSuffrageInflationProcessor(cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold) currency.GetNewProcessor
- func NewTransfersProcessor(cp *CurrencyPool) currency.GetNewProcessor
- func NewWithdrawsProcessor(cp *CurrencyPool) currency.GetNewProcessor
- func SetStateBalanceValue(st state.State, v AmountValue) (state.State, error)
- func SetStateContractAccountValue(st state.State, v ContractAccount) (state.State, error)
- func SetStateCurrencyDesignValue(st state.State, v CurrencyDesign) (state.State, error)
- func StateBalanceKeyPrefix(a base.Address, id ContractID, cid currency.CurrencyID) string
- func StateKeyBalance(a base.Address, id ContractID, cid currency.CurrencyID, ...) string
- func StateKeyContractAccount(a base.Address) string
- func StateKeyCurrencyDesign(cid currency.CurrencyID) string
- type AmountState
- func (st AmountState) Add(a currency.Big) AmountState
- func (st AmountState) AddFee(fee currency.Big) AmountState
- func (st AmountState) Clear() state.State
- func (st AmountState) Currency() currency.CurrencyID
- func (st AmountState) Fee() currency.Big
- func (AmountState) Hint() hint.Hint
- func (st AmountState) IsValid(b []byte) error
- func (st AmountState) MarshalBSON() ([]byte, error)
- func (st AmountState) MarshalJSON() ([]byte, error)
- func (st AmountState) Merge(b state.State) (state.State, error)
- func (st AmountState) SetContractID(cid ContractID) AmountState
- func (st AmountState) SetHash(h valuehash.Hash) (state.State, error)
- func (st AmountState) SetHeight(h base.Height) state.State
- func (st AmountState) SetOperation(ops []valuehash.Hash) state.State
- func (st AmountState) SetPreviousHeight(h base.Height) (state.State, error)
- func (st AmountState) SetValue(v state.Value) (state.State, error)
- func (st AmountState) Sub(a currency.Big) AmountState
- type AmountValue
- func MustNewAmountValue(big currency.Big, cid currency.CurrencyID, id ContractID) AmountValue
- func NewAmountValue(big currency.Big, cid currency.CurrencyID, id ContractID) AmountValue
- func NewAmountValuefromAmount(am currency.Amount, id ContractID) AmountValue
- func NewZeroAmountValue(cid currency.CurrencyID, id ContractID) AmountValue
- func StateBalanceValue(st state.State) (AmountValue, error)
- func (am AmountValue) Add(b currency.Big) (AmountValue, error)
- func (am AmountValue) Amount() currency.Amount
- func (am AmountValue) Bytes() []byte
- func (am AmountValue) Equal(b AmountValue) bool
- func (am AmountValue) GenerateHash() valuehash.Hash
- func (am AmountValue) Hash() valuehash.Hash
- func (am AmountValue) ID() ContractID
- func (am AmountValue) IsEmpty() bool
- func (am AmountValue) IsValid([]byte) error
- func (am AmountValue) MarshalBSON() ([]byte, error)
- func (am AmountValue) MarshalJSON() ([]byte, error)
- func (am AmountValue) String() string
- func (am AmountValue) Sub(b currency.Big) (AmountValue, error)
- func (am *AmountValue) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (am *AmountValue) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- func (am AmountValue) WithBig(big currency.Big) AmountValue
- type AmountValueBSONPacker
- type AmountValueBSONUnpacker
- type AmountValueJSONPacker
- type AmountValueJSONUnpacker
- type AmountsItem
- type BaseCreateContractAccountsItem
- func (it BaseCreateContractAccountsItem) Address() (base.Address, error)
- func (it BaseCreateContractAccountsItem) Amounts() []currency.Amount
- func (it BaseCreateContractAccountsItem) Bytes() []byte
- 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
- func (it *BaseCreateContractAccountsItem) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseCreateContractAccountsItem) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type BaseWithdrawsItem
- func (it BaseWithdrawsItem) Amounts() []currency.Amount
- func (it BaseWithdrawsItem) Bytes() []byte
- 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
- func (it *BaseWithdrawsItem) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseWithdrawsItem) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type BaseWithdrawsItemBSONUnpacker
- type BaseWithdrawsItemJSONUnpacker
- type ContractAccount
- func (cs ContractAccount) Bytes() []byte
- func (cs ContractAccount) Equal(b ContractAccount) bool
- func (cs ContractAccount) GenerateHash() valuehash.Hash
- func (cs ContractAccount) Hash() valuehash.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)
- func (cs *ContractAccount) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (cs *ContractAccount) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type ContractAccountKeys
- func (ks ContractAccountKeys) Bytes() []byte
- func (ks ContractAccountKeys) Equal(b currency.AccountKeys) bool
- func (ks ContractAccountKeys) GenerateHash() (valuehash.Hash, error)
- func (ks ContractAccountKeys) Hash() valuehash.Hash
- func (ks ContractAccountKeys) IsValid([]byte) error
- func (ks ContractAccountKeys) Key(k key.Publickey) (currency.AccountKey, bool)
- func (ks ContractAccountKeys) Keys() []currency.AccountKey
- func (ks ContractAccountKeys) Threshold() uint
- type ContractAccountStatusBSONUnpacker
- type ContractAccountStatusJSONPacker
- type ContractAccountStatusJSONUnpacker
- type ContractID
- type CreateAccountsItemProcessor
- type CreateAccountsProcessor
- type CreateContractAccounts
- type CreateContractAccountsFact
- func (fact CreateContractAccountsFact) Addresses() ([]base.Address, error)
- func (fact CreateContractAccountsFact) Bytes() []byte
- func (fact CreateContractAccountsFact) GenerateHash() valuehash.Hash
- func (fact CreateContractAccountsFact) Hash() valuehash.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() []byte
- func (fact *CreateContractAccountsFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CreateContractAccountsFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type CreateContractAccountsFactBSONUnpacker
- type CreateContractAccountsFactJSONPacker
- type CreateContractAccountsFactJSONUnpacker
- type CreateContractAccountsItem
- type CreateContractAccountsItemBSONUnpacker
- type CreateContractAccountsItemJSONPacker
- type CreateContractAccountsItemJSONUnpacker
- type CreateContractAccountsItemMultiAmounts
- type CreateContractAccountsItemProcessor
- func (opp *CreateContractAccountsItemProcessor) Close() error
- func (opp *CreateContractAccountsItemProcessor) PreProcess(getState func(key string) (state.State, bool, error), ...) error
- func (opp *CreateContractAccountsItemProcessor) Process(_ func(key string) (state.State, bool, error), ...) ([]state.State, error)
- type CreateContractAccountsItemSingleAmount
- type CreateContractAccountsProcessor
- func (opp *CreateContractAccountsProcessor) Close() error
- func (opp *CreateContractAccountsProcessor) PreProcess(getState func(key string) (state.State, bool, error), ...) (state.Processor, error)
- func (opp *CreateContractAccountsProcessor) Process(getState func(key string) (state.State, bool, error), ...) error
- type CurrencyDesign
- func (de CurrencyDesign) AddAggregate(b currency.Big) (CurrencyDesign, error)
- func (de CurrencyDesign) Aggregate() currency.Big
- func (de CurrencyDesign) Bytes() []byte
- 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) SetGenesisAccount(a base.Address) CurrencyDesign
- func (de CurrencyDesign) SetPolicy(po CurrencyPolicy) CurrencyDesign
- func (de *CurrencyDesign) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (de *CurrencyDesign) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type CurrencyDesignBSONUnpacker
- type CurrencyDesignJSONPacker
- type CurrencyDesignJSONUnpacker
- type CurrencyPolicy
- func (po CurrencyPolicy) Bytes() []byte
- 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 (po *CurrencyPolicy) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (po *CurrencyPolicy) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type CurrencyPolicyBSONUnpacker
- type CurrencyPolicyJSONPacker
- type CurrencyPolicyJSONUnpacker
- type CurrencyPolicyUpdater
- type CurrencyPolicyUpdaterFact
- func (fact CurrencyPolicyUpdaterFact) Bytes() []byte
- func (fact CurrencyPolicyUpdaterFact) Currency() currency.CurrencyID
- func (fact CurrencyPolicyUpdaterFact) GenerateHash() valuehash.Hash
- func (fact CurrencyPolicyUpdaterFact) Hash() valuehash.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() []byte
- func (fact *CurrencyPolicyUpdaterFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CurrencyPolicyUpdaterFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type CurrencyPolicyUpdaterFactBSONUnpacker
- type CurrencyPolicyUpdaterFactJSONPacker
- type CurrencyPolicyUpdaterFactJSONUnpacker
- type CurrencyPolicyUpdaterProcessor
- type CurrencyPool
- func (cp *CurrencyPool) CIDs() []currency.CurrencyID
- func (cp *CurrencyPool) Clear()
- func (cp *CurrencyPool) Designs() map[currency.CurrencyID]CurrencyDesign
- func (cp *CurrencyPool) Exists(cid currency.CurrencyID) bool
- func (cp *CurrencyPool) Feeer(cid currency.CurrencyID) (Feeer, bool)
- func (cp *CurrencyPool) Get(cid currency.CurrencyID) (CurrencyDesign, bool)
- func (cp *CurrencyPool) Policy(cid currency.CurrencyID) (CurrencyPolicy, bool)
- func (cp *CurrencyPool) Set(st state.State) error
- func (cp *CurrencyPool) State(cid currency.CurrencyID) (state.State, bool)
- func (cp *CurrencyPool) States() map[currency.CurrencyID]state.State
- func (cp *CurrencyPool) TraverseDesign(callback func(cid currency.CurrencyID, de CurrencyDesign) bool)
- func (cp *CurrencyPool) TraverseState(callback func(cid currency.CurrencyID, de state.State) bool)
- type CurrencyRegister
- type CurrencyRegisterFact
- func (fact CurrencyRegisterFact) Bytes() []byte
- func (fact CurrencyRegisterFact) Currency() CurrencyDesign
- func (fact CurrencyRegisterFact) GenerateHash() valuehash.Hash
- func (fact CurrencyRegisterFact) Hash() valuehash.Hash
- func (fact CurrencyRegisterFact) IsValid(b []byte) error
- func (fact CurrencyRegisterFact) MarshalBSON() ([]byte, error)
- func (fact CurrencyRegisterFact) MarshalJSON() ([]byte, error)
- func (fact CurrencyRegisterFact) Token() []byte
- func (fact *CurrencyRegisterFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CurrencyRegisterFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type CurrencyRegisterFactBSONUnpacker
- type CurrencyRegisterFactJSONPacker
- type CurrencyRegisterFactJSONUnpacker
- type CurrencyRegisterProcessor
- type FeeOperation
- func (FeeOperation) AddFactSigns(...base.FactSign) (base.FactSignUpdater, error)
- func (op FeeOperation) Fact() base.Fact
- func (op FeeOperation) GenerateHash() valuehash.Hash
- func (op FeeOperation) Hash() valuehash.Hash
- func (op FeeOperation) IsValid([]byte) error
- func (FeeOperation) LastSignedAt() time.Time
- func (op FeeOperation) MarshalBSON() ([]byte, error)
- func (op FeeOperation) MarshalJSON() ([]byte, error)
- func (FeeOperation) Process(func(key string) (state.State, bool, error), ...) error
- func (FeeOperation) Signs() []base.FactSign
- func (op *FeeOperation) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *FeeOperation) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type FeeOperationBSONUnpacker
- type FeeOperationFact
- func (fact FeeOperationFact) Amounts() []currency.Amount
- func (fact FeeOperationFact) Bytes() []byte
- func (fact FeeOperationFact) Hash() valuehash.Hash
- func (fact FeeOperationFact) IsValid([]byte) error
- func (fact FeeOperationFact) MarshalBSON() ([]byte, error)
- func (fact FeeOperationFact) MarshalJSON() ([]byte, error)
- func (fact FeeOperationFact) Token() []byte
- func (fact *FeeOperationFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *FeeOperationFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type FeeOperationFactBSONUnpacker
- type FeeOperationFactJSONPacker
- type FeeOperationFactJSONUnpacker
- type FeeOperationJSONPacker
- type FeeOperationJSONUnpacker
- type FeeOperationProcessor
- type Feeer
- type FixedFeeer
- func (fa FixedFeeer) Bytes() []byte
- 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
- func (fa *FixedFeeer) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *FixedFeeer) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type FixedFeeerBSONUnpacker
- type FixedFeeerJSONPacker
- type FixedFeeerJSONUnpacker
- type GenesisCurrencies
- func (op GenesisCurrencies) IsValid(networkID []byte) error
- func (op GenesisCurrencies) MarshalBSON() ([]byte, error)
- func (op GenesisCurrencies) MarshalJSON() ([]byte, error)
- func (op GenesisCurrencies) Process(getState func(key string) (state.State, bool, error), ...) error
- func (op *GenesisCurrencies) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *GenesisCurrencies) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type GenesisCurrenciesFact
- func (fact GenesisCurrenciesFact) Address() (base.Address, error)
- func (fact GenesisCurrenciesFact) Bytes() []byte
- func (fact GenesisCurrenciesFact) Currencies() []CurrencyDesign
- func (fact GenesisCurrenciesFact) GenerateHash() valuehash.Hash
- func (fact GenesisCurrenciesFact) GenesisNodeKey() key.Publickey
- func (fact GenesisCurrenciesFact) Hash() valuehash.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() []byte
- func (fact *GenesisCurrenciesFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *GenesisCurrenciesFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type GenesisCurrenciesFactBSONUnpacker
- type GenesisCurrenciesFactJSONPacker
- type GenesisCurrenciesFactJSONUnpacker
- type KeyUpdaterProcessor
- 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 RatioFeeer
- func (fa RatioFeeer) Bytes() []byte
- 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
- func (fa *RatioFeeer) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fa *RatioFeeer) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type RatioFeeerBSONUnpacker
- type RatioFeeerJSONPacker
- type RatioFeeerJSONUnpacker
- type StateKeyBalanceSuffix
- type SuffrageInflation
- type SuffrageInflationFact
- func (fact SuffrageInflationFact) Bytes() []byte
- func (fact SuffrageInflationFact) GenerateHash() valuehash.Hash
- func (fact SuffrageInflationFact) Hash() valuehash.Hash
- func (fact SuffrageInflationFact) IsValid(b []byte) error
- func (fact SuffrageInflationFact) Items() []SuffrageInflationItem
- func (fact SuffrageInflationFact) MarshalBSON() ([]byte, error)
- func (fact SuffrageInflationFact) MarshalJSON() ([]byte, error)
- func (fact SuffrageInflationFact) Token() []byte
- func (fact *SuffrageInflationFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *SuffrageInflationFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type SuffrageInflationFactBSONUnpacker
- type SuffrageInflationFactJSONPacker
- type SuffrageInflationFactJSONUnpacker
- type SuffrageInflationItem
- func (item SuffrageInflationItem) Amount() currency.Amount
- func (item SuffrageInflationItem) Bytes() []byte
- func (item SuffrageInflationItem) IsValid([]byte) error
- func (item SuffrageInflationItem) MarshalBSON() ([]byte, error)
- func (item SuffrageInflationItem) MarshalJSON() ([]byte, error)
- func (item SuffrageInflationItem) Receiver() base.Address
- type SuffrageInflationItemPacker
- type SuffrageInflationItemUnpacker
- type SuffrageInflationProcessor
- type TransfersItemProcessor
- type TransfersProcessor
- type Withdraws
- type WithdrawsFact
- func (fact WithdrawsFact) Addresses() ([]base.Address, error)
- func (fact WithdrawsFact) Bytes() []byte
- func (fact WithdrawsFact) GenerateHash() valuehash.Hash
- func (fact WithdrawsFact) Hash() valuehash.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() []byte
- func (fact *WithdrawsFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *WithdrawsFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
- type WithdrawsFactBSONUnpacker
- type WithdrawsFactJSONPacker
- type WithdrawsItem
- type WithdrawsItemJSONPacker
- type WithdrawsItemMultiAmounts
- type WithdrawsItemProcessor
- type WithdrawsItemSingleAmount
- type WithdrawsProcessor
Constants ¶
View Source
const ( FeeerNil = "nil" FeeerFixed = "fixed" FeeerRatio = "ratio" )
Variables ¶
View Source
var ( AmountValueType = hint.Type("mitum-currency-amount-value") AmountValueHint = hint.NewHint(AmountValueType, "v0.0.1") AmountValueHinter = AmountValue{BaseHinter: hint.NewBaseHinter(AmountValueHint)} )
View Source
var ( ContractAccountType = hint.Type("mitum-currency-contract-account-status") ContractAccountHint = hint.NewHint(ContractAccountType, "v0.0.1") ContractAccountHinter = ContractAccount{BaseHinter: hint.NewBaseHinter(ContractAccountHint)} )
View Source
var ( MinLengthContractID = 3 MaxLengthContractID = 10 ReValidContractID = regexp.MustCompile(`^[A-Z0-9][A-Z0-9-_\.\!\$\*\@]*[A-Z0-9]$`) )
View Source
var ( CreateContractAccountsFactType = hint.Type("mitum-currency-create-contract-accounts-operation-fact") CreateContractAccountsFactHint = hint.NewHint(CreateContractAccountsFactType, "v0.0.1") CreateContractAccountsFactHinter = CreateContractAccountsFact{BaseHinter: hint.NewBaseHinter(CreateContractAccountsFactHint)} CreateContractAccountsType = hint.Type("mitum-currency-create-contract-accounts-operation") CreateContractAccountsHint = hint.NewHint(CreateContractAccountsType, "v0.0.1") CreateContractAccountsHinter = CreateContractAccounts{BaseOperation: operationHinter(CreateContractAccountsHint)} )
View Source
var ( CreateContractAccountsItemMultiAmountsType = hint.Type("mitum-currency-create-contract-accounts-multiple-amounts") CreateContractAccountsItemMultiAmountsHint = hint.NewHint(CreateContractAccountsItemMultiAmountsType, "v0.0.1") CreateContractAccountsItemMultiAmountsHinter = CreateContractAccountsItemMultiAmounts{ BaseCreateContractAccountsItem: BaseCreateContractAccountsItem{ BaseHinter: hint.NewBaseHinter(CreateContractAccountsItemMultiAmountsHint), }, } )
View Source
var ( CreateContractAccountsItemSingleAmountType = hint.Type("mitum-currency-create-contract-accounts-single-amount") CreateContractAccountsItemSingleAmountHint = hint.NewHint(CreateContractAccountsItemSingleAmountType, "v0.0.1") CreateContractAccountsItemSingleAmountHinter = CreateContractAccountsItemSingleAmount{ BaseCreateContractAccountsItem: BaseCreateContractAccountsItem{ BaseHinter: hint.NewBaseHinter(CreateContractAccountsItemSingleAmountHint), }, } )
View Source
var ( CurrencyDesignType = hint.Type("mitum-extension-currency-design") CurrencyDesignHint = hint.NewHint(CurrencyDesignType, "v0.0.1") CurrencyDesignHinter = CurrencyDesign{BaseHinter: hint.NewBaseHinter(CurrencyDesignHint)} )
View Source
var ( CurrencyPolicyType = hint.Type("mitum-extension-currency-policy") CurrencyPolicyHint = hint.NewHint(CurrencyPolicyType, "v0.0.1") CurrencyPolicyHinter = CurrencyPolicy{BaseHinter: hint.NewBaseHinter(CurrencyPolicyHint)} )
View Source
var ( CurrencyPolicyUpdaterFactType = hint.Type("mitum-currency-currency-policy-updater-operation-fact") CurrencyPolicyUpdaterFactHint = hint.NewHint(CurrencyPolicyUpdaterFactType, "v0.0.1") CurrencyPolicyUpdaterFactHinter = CurrencyPolicyUpdaterFact{ BaseHinter: hint.NewBaseHinter(CurrencyPolicyUpdaterFactHint), } CurrencyPolicyUpdaterType = hint.Type("mitum-currency-currency-policy-updater-operation") CurrencyPolicyUpdaterHint = hint.NewHint(CurrencyPolicyUpdaterType, "v0.0.1") CurrencyPolicyUpdaterHinter = CurrencyPolicyUpdater{BaseOperation: operationHinter(CurrencyPolicyUpdaterHint)} )
View Source
var ( CurrencyRegisterFactType = hint.Type("mitum-currency-currency-register-operation-fact") CurrencyRegisterFactHint = hint.NewHint(CurrencyRegisterFactType, "v0.0.1") CurrencyRegisterFactHinter = CurrencyRegisterFact{BaseHinter: hint.NewBaseHinter(CurrencyRegisterFactHint)} CurrencyRegisterType = hint.Type("mitum-currency-currency-register-operation") CurrencyRegisterHint = hint.NewHint(CurrencyRegisterType, "v0.0.1") CurrencyRegisterHinter = CurrencyRegister{BaseOperation: operationHinter(CurrencyRegisterHint)} )
View Source
var ( FeeOperationFactType = hint.Type("mitum-currency-fee-operation-fact") FeeOperationFactHint = hint.NewHint(FeeOperationFactType, "v0.0.1") FeeOperationFactHinter = FeeOperationFact{BaseHinter: hint.NewBaseHinter(FeeOperationFactHint)} FeeOperationType = hint.Type("mitum-currency-fee-operation") FeeOperationHint = hint.NewHint(FeeOperationType, "v0.0.1") FeeOperationHinter = FeeOperation{BaseHinter: hint.NewBaseHinter(FeeOperationHint)} )
View Source
var ( NilFeeerType = hint.Type("mitum-extension-nil-feeer") NilFeeerHint = hint.NewHint(NilFeeerType, "v0.0.1") NilFeeerHinter = NilFeeer{BaseHinter: hint.NewBaseHinter(NilFeeerHint)} FixedFeeerType = hint.Type("mitum-extension-fixed-feeer") FixedFeeerHint = hint.NewHint(FixedFeeerType, "v0.0.1") FixedFeeerHinter = FixedFeeer{BaseHinter: hint.NewBaseHinter(FixedFeeerHint)} RatioFeeerType = hint.Type("mitum-extension-ratio-feeer") RatioFeeerHint = hint.NewHint(RatioFeeerType, "v0.0.1") RatioFeeerHinter = RatioFeeer{BaseHinter: hint.NewBaseHinter(RatioFeeerHint)} )
View Source
var ( GenesisCurrenciesFactType = hint.Type("mitum-currency-genesis-currencies-operation-fact") GenesisCurrenciesFactHint = hint.NewHint(GenesisCurrenciesFactType, "v0.0.1") GenesisCurrenciesFactHinter = GenesisCurrenciesFact{BaseHinter: hint.NewBaseHinter(GenesisCurrenciesFactHint)} GenesisCurrenciesType = hint.Type("mitum-currency-genesis-currencies-operation") GenesisCurrenciesHint = hint.NewHint(GenesisCurrenciesType, "v0.0.1") GenesisCurrenciesHinter = GenesisCurrencies{BaseOperation: operation.EmptyBaseOperation(GenesisCurrenciesHint)} )
View Source
var ( ContractAccountKeysType = hint.Type("mitum-currency-contract-account-keys") ContractAccountKeysHint = hint.NewHint(ContractAccountKeysType, "v0.0.1") ContractAccountKeysHinter = ContractAccountKeys{BaseHinter: hint.NewBaseHinter(ContractAccountKeysHint)} )
View Source
var ( SuffrageInflationFactType = hint.Type("mitum-currency-suffrage-inflation-operation-fact") SuffrageInflationFactHint = hint.NewHint(SuffrageInflationFactType, "v0.0.1") SuffrageInflationFactHinter = SuffrageInflationFact{BaseHinter: hint.NewBaseHinter(SuffrageInflationFactHint)} SuffrageInflationType = hint.Type("mitum-currency-suffrage-inflation-operation") SuffrageInflationHint = hint.NewHint(SuffrageInflationType, "v0.0.1") SuffrageInflationHinter = SuffrageInflation{BaseOperation: operationHinter(SuffrageInflationHint)} )
View Source
var ( WithdrawsFactType = hint.Type("mitum-currency-contract-account-withdraw-operation-fact") WithdrawsFactHint = hint.NewHint(WithdrawsFactType, "v0.0.1") WithdrawsFactHinter = WithdrawsFact{BaseHinter: hint.NewBaseHinter(WithdrawsFactHint)} WithdrawsType = hint.Type("mitum-currency-contract-account-withdraw-operation") WithdrawsHint = hint.NewHint(WithdrawsType, "v0.0.1") WithdrawsHinter = Withdraws{BaseOperation: operationHinter(WithdrawsHint)} )
View Source
var ( WithdrawsItemMultiAmountsType = hint.Type("mitum-currency-withdraws-item-multi-amounts") WithdrawsItemMultiAmountsHint = hint.NewHint(WithdrawsItemMultiAmountsType, "v0.0.1") WithdrawsItemMultiAmountsHinter = WithdrawsItemMultiAmounts{ BaseWithdrawsItem: BaseWithdrawsItem{BaseHinter: hint.NewBaseHinter(WithdrawsItemMultiAmountsHint)}, } )
View Source
var ( WithdrawsItemSingleAmountType = hint.Type("mitum-currency-withdraws-item-single-amount") WithdrawsItemSingleAmountHint = hint.NewHint(WithdrawsItemSingleAmountType, "v0.0.1") WithdrawsItemSingleAmountHinter = WithdrawsItemSingleAmount{ BaseWithdrawsItem: BaseWithdrawsItem{BaseHinter: hint.NewBaseHinter(WithdrawsItemSingleAmountHint)}, } )
View Source
var MaxCreateContractAccountsItems uint = 10
View Source
var MaxWithdrawsItems uint = 10
View Source
var (
StateKeyContractAccountSuffix = ":contractaccount"
)
View Source
var StateKeyCurrencyDesignPrefix = "extensioncurrencydesign:"
View Source
var UnlimitedMaxFeeAmount = currency.NewBig(-1)
Functions ¶
func CalculateItemsFee ¶
func CalculateItemsFee(cp *CurrencyPool, items []currency.AmountsItem) (map[currency.CurrencyID][2]currency.Big, error)
func CheckEnoughBalance ¶
func IsStateBalanceKey ¶
func IsStateBalanceKey(key string, suffix StateKeyBalanceSuffix) bool
func NewCreateAccountsProcessor ¶
func NewCreateAccountsProcessor(cp *CurrencyPool) currency.GetNewProcessor
func NewCreateContractAccountsProcessor ¶
func NewCreateContractAccountsProcessor(cp *CurrencyPool) currency.GetNewProcessor
func NewCurrencyPolicyUpdaterProcessor ¶
func NewCurrencyPolicyUpdaterProcessor( cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold, ) currency.GetNewProcessor
func NewCurrencyRegisterProcessor ¶
func NewCurrencyRegisterProcessor(cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold) currency.GetNewProcessor
func NewFeeOperationProcessor ¶
func NewFeeOperationProcessor(cp *CurrencyPool, op FeeOperation) state.Processor
func NewKeyUpdaterProcessor ¶
func NewKeyUpdaterProcessor(cp *CurrencyPool) currency.GetNewProcessor
func NewSuffrageInflationProcessor ¶
func NewSuffrageInflationProcessor(cp *CurrencyPool, pubs []key.Publickey, threshold base.Threshold) currency.GetNewProcessor
func NewTransfersProcessor ¶
func NewTransfersProcessor(cp *CurrencyPool) currency.GetNewProcessor
func NewWithdrawsProcessor ¶
func NewWithdrawsProcessor(cp *CurrencyPool) currency.GetNewProcessor
func SetStateBalanceValue ¶
func StateBalanceKeyPrefix ¶
func StateBalanceKeyPrefix(a base.Address, id ContractID, cid currency.CurrencyID) string
func StateKeyBalance ¶
func StateKeyBalance(a base.Address, id ContractID, cid currency.CurrencyID, suffix StateKeyBalanceSuffix) string
func StateKeyContractAccount ¶
func StateKeyCurrencyDesign ¶
func StateKeyCurrencyDesign(cid currency.CurrencyID) string
Types ¶
type AmountState ¶
func NewAmountState ¶
func NewAmountState(st state.State, cid currency.CurrencyID, id ContractID) AmountState
func (AmountState) Add ¶
func (st AmountState) Add(a currency.Big) AmountState
func (AmountState) AddFee ¶
func (st AmountState) AddFee(fee currency.Big) AmountState
func (AmountState) Clear ¶
func (st AmountState) Clear() state.State
func (AmountState) Currency ¶
func (st AmountState) Currency() currency.CurrencyID
func (AmountState) Fee ¶
func (st AmountState) Fee() currency.Big
func (AmountState) Hint ¶
func (AmountState) Hint() hint.Hint
func (AmountState) IsValid ¶
func (st AmountState) IsValid(b []byte) error
func (AmountState) MarshalBSON ¶
func (st AmountState) MarshalBSON() ([]byte, error)
func (AmountState) MarshalJSON ¶
func (st AmountState) MarshalJSON() ([]byte, error)
func (AmountState) SetContractID ¶
func (st AmountState) SetContractID(cid ContractID) AmountState
func (AmountState) SetOperation ¶
func (st AmountState) SetOperation(ops []valuehash.Hash) state.State
func (AmountState) SetPreviousHeight ¶
func (AmountState) Sub ¶
func (st AmountState) Sub(a currency.Big) AmountState
type AmountValue ¶
type AmountValue struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewAmountValue ¶
func MustNewAmountValue(big currency.Big, cid currency.CurrencyID, id ContractID) AmountValue
func NewAmountValue ¶
func NewAmountValue(big currency.Big, cid currency.CurrencyID, id ContractID) AmountValue
func NewAmountValuefromAmount ¶
func NewAmountValuefromAmount(am currency.Amount, id ContractID) AmountValue
func NewZeroAmountValue ¶
func NewZeroAmountValue(cid currency.CurrencyID, id ContractID) AmountValue
func StateBalanceValue ¶
func StateBalanceValue(st state.State) (AmountValue, error)
func (AmountValue) Add ¶
func (am AmountValue) Add(b currency.Big) (AmountValue, error)
func (AmountValue) Amount ¶
func (am AmountValue) Amount() currency.Amount
func (AmountValue) Bytes ¶
func (am AmountValue) Bytes() []byte
func (AmountValue) Equal ¶
func (am AmountValue) Equal(b AmountValue) bool
func (AmountValue) GenerateHash ¶
func (am AmountValue) GenerateHash() valuehash.Hash
func (AmountValue) Hash ¶
func (am AmountValue) Hash() valuehash.Hash
func (AmountValue) ID ¶
func (am AmountValue) ID() ContractID
func (AmountValue) IsEmpty ¶
func (am AmountValue) IsEmpty() bool
func (AmountValue) IsValid ¶
func (am AmountValue) IsValid([]byte) error
func (AmountValue) MarshalBSON ¶
func (am AmountValue) MarshalBSON() ([]byte, error)
func (AmountValue) MarshalJSON ¶
func (am AmountValue) MarshalJSON() ([]byte, error)
func (AmountValue) String ¶
func (am AmountValue) String() string
func (AmountValue) Sub ¶
func (am AmountValue) Sub(b currency.Big) (AmountValue, error)
func (*AmountValue) UnpackBSON ¶
func (am *AmountValue) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*AmountValue) UnpackJSON ¶
func (am *AmountValue) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
func (AmountValue) WithBig ¶
func (am AmountValue) WithBig(big currency.Big) AmountValue
type AmountValueBSONPacker ¶
type AmountValueBSONPacker struct { AM currency.Amount `bson:"amount"` CI ContractID `bson:"contractid"` }
type AmountValueBSONUnpacker ¶
type AmountValueJSONPacker ¶
type AmountValueJSONPacker struct { jsonenc.HintedHead AM currency.Amount `json:"amount"` CI ContractID `json:"contractid"` }
type AmountValueJSONUnpacker ¶
type AmountValueJSONUnpacker struct { HT hint.Hint `json:"_hint"` AM json.RawMessage `json:"amount"` CI string `json:"contractid"` }
type AmountsItem ¶
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) 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
func (*BaseCreateContractAccountsItem) UnpackBSON ¶
func (it *BaseCreateContractAccountsItem) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseCreateContractAccountsItem) UnpackJSON ¶
func (it *BaseCreateContractAccountsItem) UnpackJSON(b []byte, enc *jsonenc.Encoder) 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) 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
func (*BaseWithdrawsItem) UnpackBSON ¶
func (it *BaseWithdrawsItem) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseWithdrawsItem) UnpackJSON ¶
func (it *BaseWithdrawsItem) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type BaseWithdrawsItemBSONUnpacker ¶
type BaseWithdrawsItemBSONUnpacker struct { TG base.AddressDecoder `bson:"target"` AM bson.Raw `bson:"amounts"` }
type BaseWithdrawsItemJSONUnpacker ¶
type BaseWithdrawsItemJSONUnpacker struct { TG base.AddressDecoder `json:"target"` AM 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 state.State) (ContractAccount, error)
func (ContractAccount) Bytes ¶
func (cs ContractAccount) Bytes() []byte
func (ContractAccount) Equal ¶
func (cs ContractAccount) Equal(b ContractAccount) bool
func (ContractAccount) GenerateHash ¶
func (cs ContractAccount) GenerateHash() valuehash.Hash
func (ContractAccount) Hash ¶
func (cs ContractAccount) Hash() valuehash.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)
func (*ContractAccount) UnpackBSON ¶
func (cs *ContractAccount) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*ContractAccount) UnpackJSON ¶
func (cs *ContractAccount) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type ContractAccountKeys ¶
type ContractAccountKeys struct { hint.BaseHinter // contains filtered or unexported fields }
func NewContractAccountKeys ¶
func NewContractAccountKeys() ContractAccountKeys
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() (valuehash.Hash, error)
func (ContractAccountKeys) Hash ¶
func (ks ContractAccountKeys) Hash() valuehash.Hash
func (ContractAccountKeys) IsValid ¶
func (ks ContractAccountKeys) IsValid([]byte) error
func (ContractAccountKeys) Key ¶
func (ks ContractAccountKeys) Key(k key.Publickey) (currency.AccountKey, bool)
func (ContractAccountKeys) Keys ¶
func (ks ContractAccountKeys) Keys() []currency.AccountKey
func (ContractAccountKeys) Threshold ¶
func (ks ContractAccountKeys) Threshold() uint
type ContractAccountStatusBSONUnpacker ¶
type ContractAccountStatusBSONUnpacker struct { IA bool `bson:"isactive"` OW base.AddressDecoder `bson:"owner"` }
type ContractAccountStatusJSONPacker ¶
type ContractAccountStatusJSONPacker struct { jsonenc.HintedHead IA bool `json:"isactive"` OW base.Address `json:"owner"` }
type ContractAccountStatusJSONUnpacker ¶
type ContractAccountStatusJSONUnpacker struct { IA bool `json:"isactive"` OW base.AddressDecoder `json:"owner"` }
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 ¶
type CreateAccountsProcessor ¶
type CreateAccountsProcessor struct { currency.CreateAccounts // contains filtered or unexported fields }
func (*CreateAccountsProcessor) Close ¶
func (opp *CreateAccountsProcessor) Close() error
func (*CreateAccountsProcessor) PreProcess ¶
type CreateContractAccounts ¶
type CreateContractAccounts struct {
currency.BaseOperation
}
func NewCreateContractAccounts ¶
func NewCreateContractAccounts(fact CreateContractAccountsFact, fs []base.FactSign, memo string) (CreateContractAccounts, error)
func (*CreateContractAccounts) UnpackBSON ¶
func (op *CreateContractAccounts) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccounts) UnpackJSON ¶
func (op *CreateContractAccounts) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CreateContractAccountsFact ¶
type CreateContractAccountsFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCreateContractAccountsFact ¶
func NewCreateContractAccountsFact(token []byte, owner 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) GenerateHash ¶
func (fact CreateContractAccountsFact) GenerateHash() valuehash.Hash
func (CreateContractAccountsFact) Hash ¶
func (fact CreateContractAccountsFact) Hash() valuehash.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() []byte
func (*CreateContractAccountsFact) UnpackBSON ¶
func (fact *CreateContractAccountsFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateContractAccountsFact) UnpackJSON ¶
func (fact *CreateContractAccountsFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CreateContractAccountsFactJSONPacker ¶
type CreateContractAccountsFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` SD base.Address `json:"sender"` IT []CreateContractAccountsItem `json:"items"` }
type CreateContractAccountsFactJSONUnpacker ¶
type CreateContractAccountsFactJSONUnpacker struct { H valuehash.Bytes `json:"hash"` TK []byte `json:"token"` SD base.AddressDecoder `json:"sender"` IT json.RawMessage `json:"items"` }
type CreateContractAccountsItem ¶
type CreateContractAccountsItem interface { hint.Hinter isvalid.IsValider AmountsItem Bytes() []byte Keys() currency.AccountKeys Address() (base.Address, error) Rebuild() CreateContractAccountsItem }
type CreateContractAccountsItemJSONPacker ¶
type CreateContractAccountsItemJSONPacker struct { jsonenc.HintedHead KS currency.AccountKeys `json:"keys"` AS []currency.Amount `json:"amounts"` }
type CreateContractAccountsItemJSONUnpacker ¶
type CreateContractAccountsItemJSONUnpacker struct { KS json.RawMessage `json:"keys"` AM 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 ¶
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 { CreateContractAccounts // contains filtered or unexported fields }
func (*CreateContractAccountsProcessor) Close ¶
func (opp *CreateContractAccountsProcessor) Close() error
func (*CreateContractAccountsProcessor) PreProcess ¶
type CurrencyDesign ¶
type CurrencyDesign struct { hint.BaseHinter currency.Amount // contains filtered or unexported fields }
func NewCurrencyDesign ¶
func NewCurrencyDesign(amount currency.Amount, genesisAccount base.Address, po CurrencyPolicy) CurrencyDesign
func StateCurrencyDesignValue ¶
func StateCurrencyDesignValue(st state.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) Bytes ¶
func (de CurrencyDesign) Bytes() []byte
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) SetGenesisAccount ¶
func (de CurrencyDesign) SetGenesisAccount(a base.Address) CurrencyDesign
func (CurrencyDesign) SetPolicy ¶
func (de CurrencyDesign) SetPolicy(po CurrencyPolicy) CurrencyDesign
func (*CurrencyDesign) UnpackBSON ¶
func (de *CurrencyDesign) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyDesign) UnpackJSON ¶
func (de *CurrencyDesign) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyDesignJSONPacker ¶
type CurrencyDesignJSONPacker struct { jsonenc.HintedHead AM currency.Amount `json:"amount"` GA base.Address `json:"genesis_account"` PO CurrencyPolicy `json:"policy"` AG currency.Big `json:"aggregate"` }
type CurrencyDesignJSONUnpacker ¶
type CurrencyDesignJSONUnpacker struct { AM currency.Amount `json:"amount"` GA base.AddressDecoder `json:"genesis_account"` PO json.RawMessage `json:"policy"` AG currency.Big `json:"aggregate"` }
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) 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) UnpackBSON ¶
func (po *CurrencyPolicy) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicy) UnpackJSON ¶
func (po *CurrencyPolicy) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyPolicyJSONPacker ¶
type CurrencyPolicyJSONPacker struct { jsonenc.HintedHead MN currency.Big `json:"new_account_min_balance"` FE Feeer `json:"feeer"` }
type CurrencyPolicyJSONUnpacker ¶
type CurrencyPolicyJSONUnpacker struct { MN currency.Big `json:"new_account_min_balance"` FE json.RawMessage `json:"feeer"` }
type CurrencyPolicyUpdater ¶
type CurrencyPolicyUpdater struct {
currency.BaseOperation
}
func NewCurrencyPolicyUpdater ¶
func NewCurrencyPolicyUpdater( fact CurrencyPolicyUpdaterFact, fs []base.FactSign, memo string, ) (CurrencyPolicyUpdater, error)
func (*CurrencyPolicyUpdater) UnpackBSON ¶
func (op *CurrencyPolicyUpdater) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicyUpdater) UnpackJSON ¶
func (op *CurrencyPolicyUpdater) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyPolicyUpdaterFact ¶
type CurrencyPolicyUpdaterFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCurrencyPolicyUpdaterFact ¶
func NewCurrencyPolicyUpdaterFact(token []byte, cid currency.CurrencyID, policy CurrencyPolicy) CurrencyPolicyUpdaterFact
func (CurrencyPolicyUpdaterFact) Bytes ¶
func (fact CurrencyPolicyUpdaterFact) Bytes() []byte
func (CurrencyPolicyUpdaterFact) Currency ¶
func (fact CurrencyPolicyUpdaterFact) Currency() currency.CurrencyID
func (CurrencyPolicyUpdaterFact) GenerateHash ¶
func (fact CurrencyPolicyUpdaterFact) GenerateHash() valuehash.Hash
func (CurrencyPolicyUpdaterFact) Hash ¶
func (fact CurrencyPolicyUpdaterFact) Hash() valuehash.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() []byte
func (*CurrencyPolicyUpdaterFact) UnpackBSON ¶
func (fact *CurrencyPolicyUpdaterFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyPolicyUpdaterFact) UnpackJSON ¶
func (fact *CurrencyPolicyUpdaterFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyPolicyUpdaterFactJSONPacker ¶
type CurrencyPolicyUpdaterFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` CI currency.CurrencyID `json:"currency"` PO CurrencyPolicy `json:"policy"` }
type CurrencyPolicyUpdaterProcessor ¶
type CurrencyPolicyUpdaterProcessor struct { CurrencyPolicyUpdater // contains filtered or unexported fields }
func (*CurrencyPolicyUpdaterProcessor) Close ¶
func (opp *CurrencyPolicyUpdaterProcessor) Close() error
func (*CurrencyPolicyUpdaterProcessor) PreProcess ¶
type CurrencyPool ¶
func NewCurrencyPool ¶
func NewCurrencyPool() *CurrencyPool
func (*CurrencyPool) CIDs ¶
func (cp *CurrencyPool) CIDs() []currency.CurrencyID
func (*CurrencyPool) Clear ¶
func (cp *CurrencyPool) Clear()
func (*CurrencyPool) Designs ¶
func (cp *CurrencyPool) Designs() map[currency.CurrencyID]CurrencyDesign
func (*CurrencyPool) Exists ¶
func (cp *CurrencyPool) Exists(cid currency.CurrencyID) bool
func (*CurrencyPool) Feeer ¶
func (cp *CurrencyPool) Feeer(cid currency.CurrencyID) (Feeer, bool)
func (*CurrencyPool) Get ¶
func (cp *CurrencyPool) Get(cid currency.CurrencyID) (CurrencyDesign, bool)
func (*CurrencyPool) Policy ¶
func (cp *CurrencyPool) Policy(cid currency.CurrencyID) (CurrencyPolicy, bool)
func (*CurrencyPool) State ¶
func (cp *CurrencyPool) State(cid currency.CurrencyID) (state.State, bool)
func (*CurrencyPool) States ¶
func (cp *CurrencyPool) States() map[currency.CurrencyID]state.State
func (*CurrencyPool) TraverseDesign ¶
func (cp *CurrencyPool) TraverseDesign(callback func(cid currency.CurrencyID, de CurrencyDesign) bool)
func (*CurrencyPool) TraverseState ¶
func (cp *CurrencyPool) TraverseState(callback func(cid currency.CurrencyID, de state.State) bool)
type CurrencyRegister ¶
type CurrencyRegister struct {
currency.BaseOperation
}
func NewCurrencyRegister ¶
func NewCurrencyRegister(fact CurrencyRegisterFact, fs []base.FactSign, memo string) (CurrencyRegister, error)
func (*CurrencyRegister) UnpackBSON ¶
func (op *CurrencyRegister) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyRegister) UnpackJSON ¶
func (op *CurrencyRegister) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyRegisterFact ¶
type CurrencyRegisterFact struct { hint.BaseHinter // contains filtered or unexported fields }
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) GenerateHash ¶
func (fact CurrencyRegisterFact) GenerateHash() valuehash.Hash
func (CurrencyRegisterFact) Hash ¶
func (fact CurrencyRegisterFact) Hash() valuehash.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() []byte
func (*CurrencyRegisterFact) UnpackBSON ¶
func (fact *CurrencyRegisterFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*CurrencyRegisterFact) UnpackJSON ¶
func (fact *CurrencyRegisterFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type CurrencyRegisterFactJSONPacker ¶
type CurrencyRegisterFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` CR CurrencyDesign `json:"currency"` }
type CurrencyRegisterFactJSONUnpacker ¶
type CurrencyRegisterFactJSONUnpacker struct { H valuehash.Bytes `json:"hash"` TK []byte `json:"token"` CR json.RawMessage `json:"currency"` }
type CurrencyRegisterProcessor ¶
type CurrencyRegisterProcessor struct { CurrencyRegister // contains filtered or unexported fields }
func (*CurrencyRegisterProcessor) Close ¶
func (opp *CurrencyRegisterProcessor) Close() error
func (*CurrencyRegisterProcessor) PreProcess ¶
type FeeOperation ¶
type FeeOperation struct { hint.BaseHinter // contains filtered or unexported fields }
func NewFeeOperation ¶
func NewFeeOperation(fact FeeOperationFact) FeeOperation
func (FeeOperation) AddFactSigns ¶
func (FeeOperation) AddFactSigns(...base.FactSign) (base.FactSignUpdater, error)
func (FeeOperation) Fact ¶
func (op FeeOperation) Fact() base.Fact
func (FeeOperation) GenerateHash ¶
func (op FeeOperation) GenerateHash() valuehash.Hash
func (FeeOperation) Hash ¶
func (op FeeOperation) Hash() valuehash.Hash
func (FeeOperation) IsValid ¶
func (op FeeOperation) IsValid([]byte) error
func (FeeOperation) LastSignedAt ¶
func (FeeOperation) LastSignedAt() time.Time
func (FeeOperation) MarshalBSON ¶
func (op FeeOperation) MarshalBSON() ([]byte, error)
func (FeeOperation) MarshalJSON ¶
func (op FeeOperation) MarshalJSON() ([]byte, error)
func (FeeOperation) Signs ¶
func (FeeOperation) Signs() []base.FactSign
func (*FeeOperation) UnpackBSON ¶
func (op *FeeOperation) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*FeeOperation) UnpackJSON ¶
func (op *FeeOperation) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type FeeOperationFact ¶
type FeeOperationFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewFeeOperationFact ¶
func NewFeeOperationFact(height base.Height, ams map[currency.CurrencyID]currency.Big) FeeOperationFact
func (FeeOperationFact) Amounts ¶
func (fact FeeOperationFact) Amounts() []currency.Amount
func (FeeOperationFact) Bytes ¶
func (fact FeeOperationFact) Bytes() []byte
func (FeeOperationFact) Hash ¶
func (fact FeeOperationFact) Hash() valuehash.Hash
func (FeeOperationFact) IsValid ¶
func (fact FeeOperationFact) IsValid([]byte) error
func (FeeOperationFact) MarshalBSON ¶
func (fact FeeOperationFact) MarshalBSON() ([]byte, error)
func (FeeOperationFact) MarshalJSON ¶
func (fact FeeOperationFact) MarshalJSON() ([]byte, error)
func (FeeOperationFact) Token ¶
func (fact FeeOperationFact) Token() []byte
func (*FeeOperationFact) UnpackBSON ¶
func (fact *FeeOperationFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*FeeOperationFact) UnpackJSON ¶
func (fact *FeeOperationFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type FeeOperationFactJSONUnpacker ¶
type FeeOperationFactJSONUnpacker struct { H valuehash.Bytes `json:"hash"` TK []byte `json:"token"` AM json.RawMessage `json:"amounts"` }
type FeeOperationJSONPacker ¶
type FeeOperationJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` FT FeeOperationFact `json:"fact"` }
type FeeOperationJSONUnpacker ¶
type FeeOperationJSONUnpacker struct { H valuehash.Bytes `json:"hash"` FT json.RawMessage `json:"fact"` }
type FeeOperationProcessor ¶
type FeeOperationProcessor struct { FeeOperation // contains filtered or unexported fields }
type FixedFeeer ¶
type FixedFeeer struct { hint.BaseHinter // contains filtered or unexported fields }
func NewFixedFeeer ¶
func (FixedFeeer) Bytes ¶
func (fa FixedFeeer) Bytes() []byte
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
func (*FixedFeeer) UnpackBSON ¶
func (fa *FixedFeeer) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*FixedFeeer) UnpackJSON ¶
func (fa *FixedFeeer) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type FixedFeeerBSONUnpacker ¶
type FixedFeeerJSONPacker ¶
type FixedFeeerJSONUnpacker ¶
type GenesisCurrencies ¶
type GenesisCurrencies struct {
operation.BaseOperation
}
func NewGenesisCurrencies ¶
func NewGenesisCurrencies( genesisNodeKey key.Privatekey, keys currency.AccountKeys, cs []CurrencyDesign, networkID base.NetworkID, ) (GenesisCurrencies, 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) UnpackBSON ¶
func (op *GenesisCurrencies) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*GenesisCurrencies) UnpackJSON ¶
func (op *GenesisCurrencies) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type GenesisCurrenciesFact ¶
type GenesisCurrenciesFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewGenesisCurrenciesFact ¶
func NewGenesisCurrenciesFact( token []byte, genesisNodeKey key.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) GenerateHash ¶
func (fact GenesisCurrenciesFact) GenerateHash() valuehash.Hash
func (GenesisCurrenciesFact) GenesisNodeKey ¶
func (fact GenesisCurrenciesFact) GenesisNodeKey() key.Publickey
func (GenesisCurrenciesFact) Hash ¶
func (fact GenesisCurrenciesFact) Hash() valuehash.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() []byte
func (*GenesisCurrenciesFact) UnpackBSON ¶
func (fact *GenesisCurrenciesFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*GenesisCurrenciesFact) UnpackJSON ¶
func (fact *GenesisCurrenciesFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type GenesisCurrenciesFactJSONPacker ¶
type GenesisCurrenciesFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` GK key.Publickey `json:"genesis_node_key"` KS currency.AccountKeys `json:"keys"` CS []CurrencyDesign `json:"currencies"` }
type GenesisCurrenciesFactJSONUnpacker ¶
type GenesisCurrenciesFactJSONUnpacker struct { H valuehash.Bytes `json:"hash"` TK []byte `json:"token"` GK key.PublickeyDecoder `json:"genesis_node_key"` KS json.RawMessage `json:"keys"` CS json.RawMessage `json:"currencies"` }
type KeyUpdaterProcessor ¶
type KeyUpdaterProcessor struct { currency.KeyUpdater // contains filtered or unexported fields }
func (*KeyUpdaterProcessor) Close ¶
func (opp *KeyUpdaterProcessor) Close() error
func (*KeyUpdaterProcessor) PreProcess ¶
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 RatioFeeer ¶
type RatioFeeer struct { hint.BaseHinter // contains filtered or unexported fields }
func NewRatioFeeer ¶
func (RatioFeeer) Bytes ¶
func (fa RatioFeeer) Bytes() []byte
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
func (*RatioFeeer) UnpackBSON ¶
func (fa *RatioFeeer) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*RatioFeeer) UnpackJSON ¶
func (fa *RatioFeeer) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type RatioFeeerBSONUnpacker ¶
type RatioFeeerJSONPacker ¶
type RatioFeeerJSONUnpacker ¶
type StateKeyBalanceSuffix ¶
type StateKeyBalanceSuffix string
type SuffrageInflation ¶
type SuffrageInflation struct {
currency.BaseOperation
}
func NewSuffrageInflation ¶
func NewSuffrageInflation(fact SuffrageInflationFact, fs []base.FactSign, memo string) (SuffrageInflation, error)
func (*SuffrageInflation) UnpackBSON ¶
func (op *SuffrageInflation) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInflation) UnpackJSON ¶
func (op *SuffrageInflation) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type SuffrageInflationFact ¶
type SuffrageInflationFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewSuffrageInflationFact ¶
func NewSuffrageInflationFact(token []byte, items []SuffrageInflationItem) SuffrageInflationFact
func (SuffrageInflationFact) Bytes ¶
func (fact SuffrageInflationFact) Bytes() []byte
func (SuffrageInflationFact) GenerateHash ¶
func (fact SuffrageInflationFact) GenerateHash() valuehash.Hash
func (SuffrageInflationFact) Hash ¶
func (fact SuffrageInflationFact) Hash() valuehash.Hash
func (SuffrageInflationFact) IsValid ¶
func (fact SuffrageInflationFact) IsValid(b []byte) error
func (SuffrageInflationFact) Items ¶
func (fact SuffrageInflationFact) Items() []SuffrageInflationItem
func (SuffrageInflationFact) MarshalBSON ¶
func (fact SuffrageInflationFact) MarshalBSON() ([]byte, error)
func (SuffrageInflationFact) MarshalJSON ¶
func (fact SuffrageInflationFact) MarshalJSON() ([]byte, error)
func (SuffrageInflationFact) Token ¶
func (fact SuffrageInflationFact) Token() []byte
func (*SuffrageInflationFact) UnpackBSON ¶
func (fact *SuffrageInflationFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInflationFact) UnpackJSON ¶
func (fact *SuffrageInflationFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type SuffrageInflationFactJSONPacker ¶
type SuffrageInflationFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` IS []SuffrageInflationItem `json:"items"` }
type SuffrageInflationFactJSONUnpacker ¶
type SuffrageInflationFactJSONUnpacker struct { H valuehash.Bytes `json:"hash"` TK []byte `json:"token"` IS []json.RawMessage `json:"items"` }
type SuffrageInflationItem ¶
type SuffrageInflationItem struct {
// contains filtered or unexported fields
}
func NewSuffrageInflationItem ¶
func NewSuffrageInflationItem(receiver base.Address, amount currency.Amount) SuffrageInflationItem
func (SuffrageInflationItem) Amount ¶
func (item SuffrageInflationItem) Amount() currency.Amount
func (SuffrageInflationItem) Bytes ¶
func (item SuffrageInflationItem) Bytes() []byte
func (SuffrageInflationItem) IsValid ¶
func (item SuffrageInflationItem) IsValid([]byte) error
func (SuffrageInflationItem) MarshalBSON ¶
func (item SuffrageInflationItem) MarshalBSON() ([]byte, error)
func (SuffrageInflationItem) MarshalJSON ¶
func (item SuffrageInflationItem) MarshalJSON() ([]byte, error)
func (SuffrageInflationItem) Receiver ¶
func (item SuffrageInflationItem) Receiver() base.Address
type SuffrageInflationItemUnpacker ¶
type SuffrageInflationItemUnpacker struct { RC base.AddressDecoder `bson:"receiver" json:"receiver"` AM currency.Amount `bson:"amount" json:"amount"` }
type SuffrageInflationProcessor ¶
type SuffrageInflationProcessor struct { SuffrageInflation // contains filtered or unexported fields }
func (*SuffrageInflationProcessor) Close ¶
func (opp *SuffrageInflationProcessor) Close() error
func (*SuffrageInflationProcessor) PreProcess ¶
type TransfersItemProcessor ¶
type TransfersItemProcessor struct {
// contains filtered or unexported fields
}
func (*TransfersItemProcessor) Close ¶
func (opp *TransfersItemProcessor) Close() error
func (*TransfersItemProcessor) PreProcess ¶
type TransfersProcessor ¶
func (*TransfersProcessor) Close ¶
func (opp *TransfersProcessor) Close() error
func (*TransfersProcessor) PreProcess ¶
type Withdraws ¶
type Withdraws struct {
currency.BaseOperation
}
func NewWithdraws ¶
func (*Withdraws) UnpackBSON ¶
type WithdrawsFact ¶
type WithdrawsFact struct { hint.BaseHinter // contains filtered or unexported fields }
func NewWithdrawsFact ¶
func NewWithdrawsFact(token []byte, sender base.Address, items []WithdrawsItem) WithdrawsFact
func (WithdrawsFact) Bytes ¶
func (fact WithdrawsFact) Bytes() []byte
func (WithdrawsFact) GenerateHash ¶
func (fact WithdrawsFact) GenerateHash() valuehash.Hash
func (WithdrawsFact) Hash ¶
func (fact WithdrawsFact) Hash() valuehash.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() []byte
func (*WithdrawsFact) UnpackBSON ¶
func (fact *WithdrawsFact) UnpackBSON(b []byte, enc *bsonenc.Encoder) error
func (*WithdrawsFact) UnpackJSON ¶
func (fact *WithdrawsFact) UnpackJSON(b []byte, enc *jsonenc.Encoder) error
type WithdrawsFactJSONPacker ¶
type WithdrawsFactJSONPacker struct { jsonenc.HintedHead H valuehash.Hash `json:"hash"` TK []byte `json:"token"` SD base.Address `json:"sender"` IT []WithdrawsItem `json:"items"` }
type WithdrawsItem ¶
type WithdrawsItem interface { hint.Hinter isvalid.IsValider AmountsItem Bytes() []byte Target() base.Address Rebuild() WithdrawsItem }
type WithdrawsItemJSONPacker ¶
type WithdrawsItemMultiAmounts ¶
type WithdrawsItemMultiAmounts struct {
BaseWithdrawsItem
}
func NewWithdrawsItemMultiAmounts ¶
func NewWithdrawsItemMultiAmounts(receiver 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 ¶
type WithdrawsItemSingleAmount ¶
type WithdrawsItemSingleAmount struct {
BaseWithdrawsItem
}
func NewWithdrawsItemSingleAmount ¶
func NewWithdrawsItemSingleAmount(receiver 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 { Withdraws // contains filtered or unexported fields }
func (*WithdrawsProcessor) Close ¶
func (opp *WithdrawsProcessor) Close() error
func (*WithdrawsProcessor) PreProcess ¶
Source Files ¶
- amount.go
- amount_bson.go
- amount_encode.go
- amount_json.go
- amount_state.go
- amount_state_bson.go
- amount_state_json.go
- contract_account.go
- contract_account_bson.go
- contract_account_encode.go
- contract_account_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_pool.go
- currency_register.go
- currency_register_bson.go
- currency_register_encode.go
- currency_register_json.go
- currency_register_process.go
- fee.go
- fee_bson.go
- fee_encode.go
- fee_json.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
- keys.go
- keyupdater_process.go
- operation.go
- signs.go
- state.go
- suffrage_inflation.go
- suffrage_inflation_bson.go
- suffrage_inflation_encode.go
- suffrage_inflation_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_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.