Documentation ¶
Overview ¶
Package currency is the currency model, based on mitum.
Index ¶
- Constants
- Variables
- func CalculateItemsFee(getStateFunc base.GetStateFunc, items []AmountsItem) (map[CurrencyID]base.State, map[CurrencyID][2]Big, error)
- func CheckEnoughBalance(holder base.Address, required map[CurrencyID][2]Big, ...) (map[CurrencyID]base.State, error)
- func DecodeStateValue(b []byte, enc encoder.Encoder) (base.StateValue, error)
- func IsStateAccountKey(key string) bool
- func IsStateBalanceKey(key string) bool
- func IsStateCurrencyDesignKey(key string) bool
- func IsValidOperationFact(fact base.Fact, networkID []byte) error
- func NewAccountStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
- func NewBalanceStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
- func NewCurrencyDesignStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
- func NewFeeOperationProcessor(height base.Height, getStateFunc base.GetStateFunc) (base.OperationProcessor, error)
- func NewFeeToken(feeer Feeer, height base.Height) []byte
- func StateBalanceKeyPrefix(a base.Address, cid CurrencyID) string
- func StateKeyAccount(a base.Address) string
- func StateKeyBalance(a base.Address, cid CurrencyID) string
- func StateKeyCurrencyDesign(cid CurrencyID) string
- type Account
- func LoadStateAccountValue(st base.State) (Account, error)
- func NewAccount(address base.Address, keys AccountKeys) (Account, error)
- func NewAccountFromKeys(keys AccountKeys) (Account, error)
- func NewEthAccountFromKeys(keys AccountKeys) (Account, error)
- func ZeroAccount(cid CurrencyID) (Account, error)
- func (ac Account) Address() base.Address
- func (ac Account) Bytes() []byte
- func (ac *Account) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ac *Account) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (ac Account) EncodeJSON() AccountJSONMarshaler
- func (ac Account) GenerateHash() util.Hash
- func (ac Account) Hash() util.Hash
- func (ac Account) Keys() AccountKeys
- func (ac Account) MarshalBSON() ([]byte, error)
- func (ac Account) MarshalJSON() ([]byte, error)
- func (ac Account) SetKeys(keys AccountKeys) (Account, error)
- type AccountBSONUnmarshaler
- type AccountJSONMarshaler
- type AccountJSONUnmarshaler
- type AccountKey
- type AccountKeys
- type AccountStateValue
- func (s *AccountStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *AccountStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (a AccountStateValue) HashBytes() []byte
- func (a AccountStateValue) Hint() hint.Hint
- func (a AccountStateValue) IsValid([]byte) error
- func (s AccountStateValue) MarshalBSON() ([]byte, error)
- func (s AccountStateValue) MarshalJSON() ([]byte, error)
- type AccountStateValueBSONUnmarshaler
- type AccountStateValueJSONMarshaler
- type AccountStateValueJSONUnmarshaler
- type AccountStateValueMerger
- type AddFee
- type Address
- type Addresses
- type Amount
- func (am Amount) Big() Big
- func (am Amount) Bytes() []byte
- func (am Amount) Currency() CurrencyID
- func (am *Amount) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (am *Amount) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (am Amount) Equal(b Amount) bool
- func (am Amount) GenerateHash() util.Hash
- func (am Amount) Hash() util.Hash
- func (am Amount) IsEmpty() bool
- func (am Amount) IsValid([]byte) error
- func (am Amount) MarshalBSON() ([]byte, error)
- func (am Amount) MarshalJSON() ([]byte, error)
- func (am Amount) String() string
- func (am Amount) WithBig(big Big) Amount
- type AmountBSONUnmarshaler
- type AmountJSONMarshaler
- type AmountJSONUnmarshaler
- type AmountsItem
- type BalanceStateValue
- func (s *BalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *BalanceStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (b BalanceStateValue) HashBytes() []byte
- func (b BalanceStateValue) Hint() hint.Hint
- func (b BalanceStateValue) IsValid([]byte) error
- func (s BalanceStateValue) MarshalBSON() ([]byte, error)
- func (s BalanceStateValue) MarshalJSON() ([]byte, error)
- type BalanceStateValueBSONUnmarshaler
- type BalanceStateValueJSONMarshaler
- type BalanceStateValueJSONUnmarshaler
- type BalanceStateValueMerger
- type BaseAccountKey
- func (ky BaseAccountKey) Bytes() []byte
- func (ky *BaseAccountKey) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ky *BaseAccountKey) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (ky BaseAccountKey) Equal(b AccountKey) bool
- func (ky BaseAccountKey) IsValid([]byte) error
- func (ky BaseAccountKey) Key() base.Publickey
- func (ky BaseAccountKey) MarshalBSON() ([]byte, error)
- func (ky BaseAccountKey) MarshalJSON() ([]byte, error)
- func (ky BaseAccountKey) Weight() uint
- type BaseAccountKeys
- func (ks BaseAccountKeys) Bytes() []byte
- func (ks *BaseAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (ks *BaseAccountKeys) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (ks BaseAccountKeys) Equal(b AccountKeys) bool
- func (ks BaseAccountKeys) GenerateHash() (util.Hash, error)
- func (ks BaseAccountKeys) GenerateKeccakHash() (util.Hash, error)
- func (ks BaseAccountKeys) Hash() util.Hash
- func (ks BaseAccountKeys) IsValid([]byte) error
- func (ks BaseAccountKeys) Key(k base.Publickey) (AccountKey, bool)
- func (ks BaseAccountKeys) Keys() []AccountKey
- func (ks BaseAccountKeys) MarshalBSON() ([]byte, error)
- func (ks BaseAccountKeys) MarshalJSON() ([]byte, error)
- func (ks BaseAccountKeys) Threshold() uint
- type BaseCreateAccountsItem
- func (it BaseCreateAccountsItem) Address() (base.Address, error)
- func (it BaseCreateAccountsItem) AddressType() hint.Type
- func (it BaseCreateAccountsItem) Amounts() []Amount
- func (it BaseCreateAccountsItem) Bytes() []byte
- func (it *BaseCreateAccountsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseCreateAccountsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (it BaseCreateAccountsItem) IsValid([]byte) error
- func (it BaseCreateAccountsItem) Keys() AccountKeys
- func (it BaseCreateAccountsItem) MarshalBSON() ([]byte, error)
- func (it BaseCreateAccountsItem) MarshalJSON() ([]byte, error)
- func (it BaseCreateAccountsItem) Rebuild() CreateAccountsItem
- type BaseFactBSONUnmarshaler
- type BaseNode
- func (n BaseNode) Address() base.Address
- func (n *BaseNode) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (n *BaseNode) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (n BaseNode) HashBytes() []byte
- func (n BaseNode) IsValid([]byte) error
- func (n BaseNode) MarshalBSON() ([]byte, error)
- func (n BaseNode) MarshalJSON() ([]byte, error)
- func (n BaseNode) Publickey() base.Publickey
- type BaseNodeBSONUnMarshaler
- type BaseNodeJSONMarshaler
- type BaseNodeJSONUnmarshaler
- type BaseNodeOperation
- func (op *BaseNodeOperation) AddNodeSigns(signs []base.NodeSign) (added bool, _ error)
- func (op *BaseNodeOperation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op BaseNodeOperation) IsValid(networkID []byte) error
- func (op *BaseNodeOperation) NodeSign(priv base.Privatekey, networkID base.NetworkID, node base.Address) error
- func (op BaseNodeOperation) NodeSigns() []base.NodeSign
- func (op *BaseNodeOperation) SetNodeSigns(signs []base.NodeSign) error
- type BaseOperation
- func (op *BaseOperation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *BaseOperation) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op BaseOperation) Fact() base.Fact
- func (op BaseOperation) Hash() util.Hash
- func (op BaseOperation) HashBytes() []byte
- func (op BaseOperation) IsValid(networkID []byte) error
- func (op BaseOperation) JSONMarshaler() BaseOperationJSONMarshaler
- func (op BaseOperation) MarshalBSON() ([]byte, error)
- func (op BaseOperation) MarshalJSON() ([]byte, error)
- func (BaseOperation) PreProcess(ctx context.Context, _ base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (BaseOperation) Process(context.Context, base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- func (op *BaseOperation) SetFact(fact base.Fact)
- func (op *BaseOperation) SetHash(h util.Hash)
- func (op *BaseOperation) Sign(priv base.Privatekey, networkID base.NetworkID) error
- func (op BaseOperation) Signs() []base.Sign
- type BaseOperationBSONUnmarshaler
- type BaseOperationJSONMarshaler
- type BaseOperationJSONUnmarshaler
- type BaseOperationProcessor
- type BaseState
- func (s BaseState) BSONM() bson.M
- func (s *BaseState) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (s *BaseState) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (s BaseState) Hash() util.Hash
- func (s BaseState) Height() base.Height
- func (s BaseState) IsValid([]byte) error
- func (s BaseState) Key() string
- func (s BaseState) MarshalBSON() ([]byte, error)
- func (s BaseState) MarshalJSON() ([]byte, error)
- func (s BaseState) Operations() []util.Hash
- func (s BaseState) Previous() util.Hash
- func (s BaseState) Value() base.StateValue
- type BaseStateBSONUnmarshaler
- type BaseStateMergeValue
- type BaseStateValueMerger
- func (s *BaseStateValueMerger) AddOperations(ops []util.Hash)
- func (s *BaseStateValueMerger) Close() error
- func (s *BaseStateValueMerger) Hash() util.Hash
- func (s *BaseStateValueMerger) Height() base.Height
- func (s *BaseStateValueMerger) Key() string
- func (s *BaseStateValueMerger) MarshalJSON() ([]byte, error)
- func (s *BaseStateValueMerger) Merge(value base.StateValue, ops []util.Hash) error
- func (s *BaseStateValueMerger) Operations() []util.Hash
- func (s *BaseStateValueMerger) Previous() util.Hash
- func (s *BaseStateValueMerger) SetValue(v base.StateValue)
- func (s *BaseStateValueMerger) Value() base.StateValue
- type BaseStringAddress
- type BaseTransfersItem
- func (it BaseTransfersItem) Amounts() []Amount
- func (it BaseTransfersItem) Bytes() []byte
- func (it *BaseTransfersItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *BaseTransfersItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (it BaseTransfersItem) IsValid([]byte) error
- func (it BaseTransfersItem) MarshalBSON() ([]byte, error)
- func (it BaseTransfersItem) MarshalJSON() ([]byte, error)
- func (it BaseTransfersItem) Rebuild() TransfersItem
- func (it BaseTransfersItem) Receiver() base.Address
- type BaseTransfersItemJSONUnpacker
- type Big
- func (a Big) Add(b Big) Big
- func (a Big) Compare(b Big) int
- func (a Big) Div(b Big) Big
- func (a Big) Equal(b Big) bool
- func (Big) IsValid([]byte) error
- func (a Big) IsZero() bool
- func (a Big) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (a Big) MarshalJSON() ([]byte, error)
- func (a Big) Mul(b Big) Big
- func (a Big) MulFloat64(b float64) Big
- func (a Big) MulInt64(b int64) Big
- func (a Big) Neg() Big
- func (a Big) OverNil() bool
- func (a Big) OverZero() bool
- func (a Big) String() string
- func (a Big) Sub(b Big) Big
- func (a *Big) UnmarshalBSONValue(t bsontype.Type, b []byte) error
- func (a *Big) UnmarshalJSON(b []byte) error
- type CreateAccounts
- func (op *CreateAccounts) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *CreateAccounts) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op *CreateAccounts) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op CreateAccounts) MarshalBSON() ([]byte, error)
- func (op CreateAccounts) MarshalJSON() ([]byte, error)
- func (CreateAccounts) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type CreateAccountsFact
- func (fact CreateAccountsFact) Addresses() ([]base.Address, error)
- func (fact CreateAccountsFact) Bytes() []byte
- func (fact *CreateAccountsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *CreateAccountsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact CreateAccountsFact) GenerateHash() util.Hash
- func (fact CreateAccountsFact) Hash() util.Hash
- func (fact CreateAccountsFact) IsValid(b []byte) error
- func (fact CreateAccountsFact) Items() []CreateAccountsItem
- func (fact CreateAccountsFact) MarshalBSON() ([]byte, error)
- func (fact CreateAccountsFact) MarshalJSON() ([]byte, error)
- func (fact CreateAccountsFact) Rebuild() CreateAccountsFact
- func (fact CreateAccountsFact) Sender() base.Address
- func (fact CreateAccountsFact) Targets() ([]base.Address, error)
- func (fact CreateAccountsFact) Token() base.Token
- type CreateAccountsFactBSONUnmarshaler
- type CreateAccountsFactJSONMarshaler
- type CreateAccountsFactJSONUnMarshaler
- type CreateAccountsItem
- type CreateAccountsItemBSONUnmarshaler
- type CreateAccountsItemJSONMarshaler
- type CreateAccountsItemJSONUnMarshaler
- type CreateAccountsItemMultiAmounts
- 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 CreateAccountsItemSingleAmount
- 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 CurrencyDesign
- func (de CurrencyDesign) AddAggregate(b Big) (CurrencyDesign, error)
- func (de CurrencyDesign) Aggregate() Big
- func (de CurrencyDesign) Bytes() []byte
- func (de CurrencyDesign) 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 CurrencyID
- 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() 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() 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 EthAddress
- func (ca *EthAddress) DecodeBSON(b []byte, _ *bsonenc.Encoder) error
- func (ca *EthAddress) DecodeJSON(b []byte, _ *jsonenc.Encoder) error
- func (ca EthAddress) IsValid([]byte) error
- func (ca EthAddress) MarshalBSONValue() (bsontype.Type, []byte, error)
- func (ca EthAddress) MarshalText() ([]byte, error)
- type FeeOperation
- type FeeOperationFact
- func (fact FeeOperationFact) Amounts() []Amount
- func (fact FeeOperationFact) Bytes() []byte
- func (fact *FeeOperationFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *FeeOperationFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact FeeOperationFact) Hash() util.Hash
- func (fact FeeOperationFact) IsValid([]byte) error
- func (fact FeeOperationFact) MarshalBSON() ([]byte, error)
- func (fact FeeOperationFact) MarshalJSON() ([]byte, error)
- func (fact FeeOperationFact) Token() base.Token
- type FeeOperationFactBSONUnmarshaler
- type FeeOperationFactJSONMarshaler
- type FeeOperationFactJSONUnMarshaler
- type FeeOperationProcessor
- func (opp *FeeOperationProcessor) PreProcess(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) (context.Context, base.OperationProcessReasonError, error)
- func (opp *FeeOperationProcessor) Process(ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- 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) Fee(Big) (Big, error)
- func (fa FixedFeeer) IsValid([]byte) error
- func (fa FixedFeeer) MarshalBSON() ([]byte, error)
- func (fa FixedFeeer) MarshalJSON() ([]byte, error)
- func (fa FixedFeeer) Min() Big
- func (fa FixedFeeer) Receiver() base.Address
- func (FixedFeeer) Type() string
- type FixedFeeerBSONUnmarshaler
- type FixedFeeerJSONMarshaler
- type FixedFeeerJSONUnmarshaler
- type GenesisCurrencies
- func (op *GenesisCurrencies) DecodeBSON(b []byte, enc *bsonenc.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() 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 NewCurrencyPolicyUpdaterProcessor(threshold base.Threshold) GetNewProcessor
- func NewCurrencyRegisterProcessor(threshold base.Threshold) GetNewProcessor
- func NewKeyUpdaterProcessor() GetNewProcessor
- func NewSuffrageInflationProcessor(threshold base.Threshold) GetNewProcessor
- func NewTransfersProcessor() GetNewProcessor
- type HashGenerator
- type KeyBSONUnmarshaler
- type KeyJSONMarshaler
- type KeyJSONUnmarshaler
- type KeyUpdater
- func (op *KeyUpdater) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *KeyUpdater) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op *KeyUpdater) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op KeyUpdater) MarshalBSON() ([]byte, error)
- func (op KeyUpdater) MarshalJSON() ([]byte, error)
- func (KeyUpdater) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type KeyUpdaterFact
- func (fact KeyUpdaterFact) Addresses() ([]base.Address, error)
- func (fact KeyUpdaterFact) Bytes() []byte
- func (fact KeyUpdaterFact) Currency() CurrencyID
- func (fact *KeyUpdaterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *KeyUpdaterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact KeyUpdaterFact) GenerateHash() util.Hash
- func (fact KeyUpdaterFact) Hash() util.Hash
- func (fact KeyUpdaterFact) IsValid(b []byte) error
- func (fact KeyUpdaterFact) Keys() AccountKeys
- func (fact KeyUpdaterFact) MarshalBSON() ([]byte, error)
- func (fact KeyUpdaterFact) MarshalJSON() ([]byte, error)
- func (fact KeyUpdaterFact) Rebuild() KeyUpdaterFact
- func (fact KeyUpdaterFact) Target() base.Address
- func (fact KeyUpdaterFact) Token() base.Token
- type KeyUpdaterFactBSONUnmarshaler
- type KeyUpdaterFactJSONMarshaler
- type KeyUpdaterFactJSONUnMarshaler
- 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 KeysBSONUnmarshaler
- type KeysJSONMarshaler
- type KeysJSONUnMarshaler
- type MEPrivatekey
- func (k MEPrivatekey) Bytes() []byte
- func (k MEPrivatekey) Equal(b base.PKKey) bool
- func (k MEPrivatekey) IsValid([]byte) error
- func (k MEPrivatekey) MarshalText() ([]byte, error)
- func (k MEPrivatekey) Publickey() base.Publickey
- func (k MEPrivatekey) Sign(b []byte) (base.Signature, error)
- func (k MEPrivatekey) String() string
- func (k *MEPrivatekey) UnmarshalText(b []byte) error
- type MEPublickey
- func (k MEPublickey) Bytes() []byte
- func (k MEPublickey) Equal(b base.PKKey) bool
- func (k MEPublickey) IsValid([]byte) error
- func (k MEPublickey) MarshalText() ([]byte, error)
- func (k MEPublickey) String() string
- func (k *MEPublickey) UnmarshalText(b []byte) error
- func (k MEPublickey) Verify(input []byte, sig base.Signature) error
- type NilFeeer
- func (NilFeeer) Bytes() []byte
- func (NilFeeer) Fee(Big) (Big, error)
- func (fa NilFeeer) IsValid([]byte) error
- func (fa NilFeeer) MarshalBSON() ([]byte, error)
- func (fa NilFeeer) MarshalJSON() ([]byte, error)
- func (NilFeeer) Min() 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) Fee(a Big) (Big, error)
- func (fa RatioFeeer) IsValid([]byte) error
- func (fa RatioFeeer) MarshalBSON() ([]byte, error)
- func (fa RatioFeeer) MarshalJSON() ([]byte, error)
- func (fa RatioFeeer) Min() Big
- func (fa RatioFeeer) Receiver() base.Address
- func (RatioFeeer) Type() string
- type RatioFeeerBSONUnmarshaler
- type RatioFeeerJSONMarshaler
- type RatioFeeerJSONUnmarshaler
- type StringAddress
- type SuffrageInflation
- func (op *SuffrageInflation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *SuffrageInflation) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (SuffrageInflation) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type SuffrageInflationFact
- func (fact SuffrageInflationFact) Bytes() []byte
- func (fact *SuffrageInflationFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *SuffrageInflationFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact SuffrageInflationFact) GenerateHash() util.Hash
- func (fact SuffrageInflationFact) Hash() util.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() base.Token
- type SuffrageInflationFactBSONUnmarshaler
- type SuffrageInflationFactJSONMarshaler
- type SuffrageInflationFactJSONUnmarshaler
- type SuffrageInflationItem
- func (it SuffrageInflationItem) Amount() Amount
- func (it SuffrageInflationItem) Bytes() []byte
- func (it *SuffrageInflationItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (it *SuffrageInflationItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (it SuffrageInflationItem) IsValid([]byte) error
- func (it SuffrageInflationItem) MarshalBSON() ([]byte, error)
- func (it SuffrageInflationItem) MarshalJSON() ([]byte, error)
- func (it SuffrageInflationItem) Receiver() base.Address
- type SuffrageInflationItemBSONUnmarshaler
- type SuffrageInflationItemJSONMarshaler
- type SuffrageInflationItemJSONUnmarshaler
- 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 Transfers
- func (op *Transfers) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (op *Transfers) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (op *Transfers) HashSign(priv base.Privatekey, networkID base.NetworkID) error
- func (op Transfers) MarshalBSON() ([]byte, error)
- func (op Transfers) MarshalJSON() ([]byte, error)
- func (Transfers) Process(ctx context.Context, getStateFunc base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
- type TransfersFact
- func (fact TransfersFact) Addresses() ([]base.Address, error)
- func (fact TransfersFact) Bytes() []byte
- func (fact *TransfersFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
- func (fact *TransfersFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
- func (fact TransfersFact) GenerateHash() util.Hash
- func (fact TransfersFact) Hash() util.Hash
- func (fact TransfersFact) IsValid(b []byte) error
- func (fact TransfersFact) Items() []TransfersItem
- func (fact TransfersFact) MarshalBSON() ([]byte, error)
- func (fact TransfersFact) MarshalJSON() ([]byte, error)
- func (fact TransfersFact) Rebuild() TransfersFact
- func (fact TransfersFact) Sender() base.Address
- func (fact TransfersFact) Token() base.Token
- type TransfersFactBSONUnmarshaler
- type TransfersFactJSONUnmarshaler
- type TransfersItem
- type TransfersItemBSONUnmarshaler
- type TransfersItemJSONPacker
- type TransfersItemMultiAmounts
- 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 TransfersItemSingleAmount
- 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)
Constants ¶
View Source
const ( FeeerNil = "nil" FeeerFixed = "fixed" FeeerRatio = "ratio" )
Variables ¶
View Source
var ( AddressHint = hint.MustNewHint("mca-v0.0.1") EthAddressHint = hint.MustNewHint("eca-v0.0.1") ZeroAddressSuffix = "-X" )
View Source
var ( MaxAddressSize = 100 MinAddressSize = base.AddressTypeSize + 3 REStringAddressString = `[a-zA-Z0-9][\w\-\.\!\$\*\@]*[a-zA-Z0-9]` )
View Source
var ( NilBig = NewBig(-1) NilBigString = big.NewInt(-1).String() ZeroBig = NewBig(0) )
View Source
var ( CreateAccountsFactHint = hint.MustNewHint("mitum-currency-create-accounts-operation-fact-v0.0.1") CreateAccountsHint = hint.MustNewHint("mitum-currency-create-accounts-operation-v0.0.1") )
View Source
var ( MinLengthCurrencyID = 3 MaxLengthCurrencyID = 10 ReValidCurrencyID = regexp.MustCompile(`^[A-Z0-9][A-Z0-9_\.\!\$\*\@]*[A-Z0-9]$`) )
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 ( FeeOperationFactHint = hint.MustNewHint("mitum-currency-fee-operation-fact-v0.0.1") FeeOperationHint = hint.MustNewHint("mitum-currency-fee-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 ( KeyUpdaterFactHint = hint.MustNewHint("mitum-currency-keyupdater-operation-fact-v0.0.1") KeyUpdaterHint = hint.MustNewHint("mitum-currency-keyupdater-operation-v0.0.1") )
View Source
var ( AccountKeyHint = hint.MustNewHint("mitum-currency-key-v0.0.1") AccountKeysHint = hint.MustNewHint("mitum-currency-keys-v0.0.1") )
View Source
var ( MEPrivatekeyHint = hint.MustNewHint("epr-v0.0.1") MEPublickeyHint = hint.MustNewHint("epu-v0.0.1") )
View Source
var ( AccountStateValueHint = hint.MustNewHint("account-state-value-v0.0.1") BalanceStateValueHint = hint.MustNewHint("balance-state-value-v0.0.1") CurrencyDesignStateValueHint = hint.MustNewHint("currency-design-state-value-v0.0.1") )
View Source
var ( StateKeyAccountSuffix = ":account" StateKeyBalanceSuffix = ":balance" StateKeyCurrencyDesignPrefix = "currencydesign:" )
View Source
var ( SuffrageInflationFactHint = hint.MustNewHint("mitum-currency-suffrage-inflation-operation-fact-v0.0.1") SuffrageInflationHint = hint.MustNewHint("mitum-currency-suffrage-inflation-operation-v0.0.1") )
View Source
var ( TransfersFactHint = hint.MustNewHint("mitum-currency-transfers-operation-fact-v0.0.1") TransfersHint = hint.MustNewHint("mitum-currency-transfers-operation-v0.0.1") )
View Source
var (
AccountHint = hint.MustNewHint("mitum-currency-account-v0.0.1")
)
View Source
var (
AmountHint = hint.MustNewHint("mitum-currency-amount-v0.0.1")
)
View Source
var BaseStateHint = hint.MustNewHint("currency-base-state-v0.0.1")
View Source
var (
CreateAccountsItemMultiAmountsHint = hint.MustNewHint("mitum-currency-create-accounts-multiple-amounts-v0.0.1")
)
View Source
var (
CreateAccountsItemSingleAmountHint = hint.MustNewHint("mitum-currency-create-accounts-single-amount-v0.0.1")
)
View Source
var (
CurrencyDesignHint = hint.MustNewHint("mitum-currency-currency-design-v0.0.1")
)
View Source
var (
CurrencyPolicyHint = hint.MustNewHint("mitum-currency-currency-policy-v0.0.1")
)
View Source
var MaxAccountKeyInKeys = 10
View Source
var MaxCreateAccountsItems uint = 1000
View Source
var MaxTransferItems uint = 10
View Source
var NodeHint = hint.MustNewHint("currency-node-v0.0.1")
View Source
var StringAddressHint = hint.MustNewHint("sas-v2")
View Source
var (
SuffrageInflationItemHint = hint.MustNewHint("mitum-currency-suffrage-inflation-item-v0.0.1")
)
View Source
var (
TransfersItemMultiAmountsHint = hint.MustNewHint("mitum-currency-transfers-item-multi-amounts-v0.0.1")
)
View Source
var (
TransfersItemSingleAmountHint = hint.MustNewHint("mitum-currency-transfers-item-single-amount-v0.0.1")
)
View Source
var UnlimitedMaxFeeAmount = NewBig(-1)
Functions ¶
func CalculateItemsFee ¶
func CalculateItemsFee(getStateFunc base.GetStateFunc, items []AmountsItem) (map[CurrencyID]base.State, map[CurrencyID][2]Big, error)
func CheckEnoughBalance ¶
func CheckEnoughBalance( holder base.Address, required map[CurrencyID][2]Big, getStateFunc base.GetStateFunc, ) (map[CurrencyID]base.State, error)
func DecodeStateValue ¶
func IsStateAccountKey ¶
func IsStateBalanceKey ¶
func NewAccountStateMergeValue ¶
func NewAccountStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
func NewBalanceStateMergeValue ¶
func NewBalanceStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
func NewCurrencyDesignStateMergeValue ¶
func NewCurrencyDesignStateMergeValue(key string, stv base.StateValue) base.StateMergeValue
func NewFeeOperationProcessor ¶
func NewFeeOperationProcessor( height base.Height, getStateFunc base.GetStateFunc, ) (base.OperationProcessor, error)
func StateBalanceKeyPrefix ¶
func StateBalanceKeyPrefix(a base.Address, cid CurrencyID) string
func StateKeyAccount ¶
func StateKeyBalance ¶
func StateKeyBalance(a base.Address, cid CurrencyID) string
func StateKeyCurrencyDesign ¶
func StateKeyCurrencyDesign(cid CurrencyID) string
Types ¶
type Account ¶
type Account struct { hint.BaseHinter // contains filtered or unexported fields }
func NewAccount ¶
func NewAccount(address base.Address, keys AccountKeys) (Account, error)
func NewAccountFromKeys ¶
func NewAccountFromKeys(keys AccountKeys) (Account, error)
func NewEthAccountFromKeys ¶
func NewEthAccountFromKeys(keys AccountKeys) (Account, error)
func ZeroAccount ¶
func ZeroAccount(cid CurrencyID) (Account, error)
func (Account) EncodeJSON ¶
func (ac Account) EncodeJSON() AccountJSONMarshaler
func (Account) GenerateHash ¶
func (Account) Keys ¶
func (ac Account) Keys() AccountKeys
func (Account) MarshalBSON ¶
func (Account) MarshalJSON ¶
type AccountBSONUnmarshaler ¶
type AccountJSONMarshaler ¶
type AccountJSONMarshaler struct { hint.BaseHinter Hash util.Hash `json:"hash"` Address base.Address `json:"address"` Keys AccountKeys `json:"keys"` }
type AccountJSONUnmarshaler ¶
type AccountJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` Hash valuehash.HashDecoder `json:"hash"` Address string `json:"address"` Keys json.RawMessage `json:"keys"` }
type AccountKey ¶
type AccountKeys ¶
type AccountKeys interface { hint.Hinter util.IsValider util.Byter util.Hasher Threshold() uint Keys() []AccountKey Key(base.Publickey) (AccountKey, bool) Equal(AccountKeys) bool }
func StateKeysValue ¶
func StateKeysValue(st base.State) (AccountKeys, error)
type AccountStateValue ¶
type AccountStateValue struct { hint.BaseHinter Account Account }
func NewAccountStateValue ¶
func NewAccountStateValue(account Account) AccountStateValue
func (*AccountStateValue) DecodeBSON ¶
func (s *AccountStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*AccountStateValue) DecodeJSON ¶
func (s *AccountStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (AccountStateValue) HashBytes ¶
func (a AccountStateValue) HashBytes() []byte
func (AccountStateValue) Hint ¶
func (a AccountStateValue) Hint() hint.Hint
func (AccountStateValue) IsValid ¶
func (a AccountStateValue) IsValid([]byte) error
func (AccountStateValue) MarshalBSON ¶
func (s AccountStateValue) MarshalBSON() ([]byte, error)
func (AccountStateValue) MarshalJSON ¶
func (s AccountStateValue) MarshalJSON() ([]byte, error)
type AccountStateValueJSONMarshaler ¶
type AccountStateValueJSONMarshaler struct { hint.BaseHinter Account Account `json:"account"` }
type AccountStateValueJSONUnmarshaler ¶
type AccountStateValueJSONUnmarshaler struct {
AC json.RawMessage `json:"account"`
}
type AccountStateValueMerger ¶
type AccountStateValueMerger struct {
*BaseStateValueMerger
}
type AddFee ¶
type AddFee map[CurrencyID][2]Big
type Address ¶
type Address struct {
base.BaseStringAddress
}
func NewAddress ¶
func NewAddressFromKeys ¶
func NewAddressFromKeys(keys AccountKeys) (Address, error)
func ZeroAddress ¶
func ZeroAddress(cid CurrencyID) Address
func (Address) MarshalBSONValue ¶
func (Address) MarshalText ¶
type Amount ¶
type Amount struct { hint.BaseHinter // contains filtered or unexported fields }
func MustNewAmount ¶
func MustNewAmount(big Big, cid CurrencyID) Amount
func NewAmount ¶
func NewAmount(big Big, cid CurrencyID) Amount
func NewZeroAmount ¶
func NewZeroAmount(cid CurrencyID) Amount
func (Amount) Currency ¶
func (am Amount) Currency() CurrencyID
func (Amount) GenerateHash ¶
func (Amount) MarshalBSON ¶
func (Amount) MarshalJSON ¶
type AmountBSONUnmarshaler ¶
type AmountJSONMarshaler ¶
type AmountJSONMarshaler struct { AmountBig string `json:"amount"` Currency CurrencyID `json:"currency"` hint.BaseHinter }
type AmountJSONUnmarshaler ¶
type AmountsItem ¶
type AmountsItem interface {
Amounts() []Amount
}
type BalanceStateValue ¶
type BalanceStateValue struct { hint.BaseHinter Amount Amount }
func NewBalanceStateValue ¶
func NewBalanceStateValue(amount Amount) BalanceStateValue
func (*BalanceStateValue) DecodeBSON ¶
func (s *BalanceStateValue) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BalanceStateValue) DecodeJSON ¶
func (s *BalanceStateValue) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BalanceStateValue) HashBytes ¶
func (b BalanceStateValue) HashBytes() []byte
func (BalanceStateValue) Hint ¶
func (b BalanceStateValue) Hint() hint.Hint
func (BalanceStateValue) IsValid ¶
func (b BalanceStateValue) IsValid([]byte) error
func (BalanceStateValue) MarshalBSON ¶
func (s BalanceStateValue) MarshalBSON() ([]byte, error)
func (BalanceStateValue) MarshalJSON ¶
func (s BalanceStateValue) MarshalJSON() ([]byte, error)
type BalanceStateValueJSONMarshaler ¶
type BalanceStateValueJSONMarshaler struct { hint.BaseHinter Amount Amount `json:"amount"` }
type BalanceStateValueJSONUnmarshaler ¶
type BalanceStateValueJSONUnmarshaler struct {
AM json.RawMessage `json:"amount"`
}
type BalanceStateValueMerger ¶
type BalanceStateValueMerger struct {
*BaseStateValueMerger
}
type BaseAccountKey ¶
type BaseAccountKey struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseAccountKey ¶
func NewBaseAccountKey(k base.Publickey, w uint) (BaseAccountKey, error)
func (BaseAccountKey) Bytes ¶
func (ky BaseAccountKey) Bytes() []byte
func (*BaseAccountKey) DecodeBSON ¶
func (ky *BaseAccountKey) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseAccountKey) DecodeJSON ¶
func (ky *BaseAccountKey) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseAccountKey) Equal ¶
func (ky BaseAccountKey) Equal(b AccountKey) bool
func (BaseAccountKey) IsValid ¶
func (ky BaseAccountKey) IsValid([]byte) error
func (BaseAccountKey) Key ¶
func (ky BaseAccountKey) Key() base.Publickey
func (BaseAccountKey) MarshalBSON ¶
func (ky BaseAccountKey) MarshalBSON() ([]byte, error)
func (BaseAccountKey) MarshalJSON ¶
func (ky BaseAccountKey) MarshalJSON() ([]byte, error)
func (BaseAccountKey) Weight ¶
func (ky BaseAccountKey) Weight() uint
type BaseAccountKeys ¶
type BaseAccountKeys struct { hint.BaseHinter // contains filtered or unexported fields }
func EmptyBaseAccountKeys ¶
func EmptyBaseAccountKeys() BaseAccountKeys
func NewBaseAccountKeys ¶
func NewBaseAccountKeys(keys []AccountKey, threshold uint) (BaseAccountKeys, error)
func (BaseAccountKeys) Bytes ¶
func (ks BaseAccountKeys) Bytes() []byte
func (*BaseAccountKeys) DecodeBSON ¶
func (ks *BaseAccountKeys) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseAccountKeys) DecodeJSON ¶
func (ks *BaseAccountKeys) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseAccountKeys) Equal ¶
func (ks BaseAccountKeys) Equal(b AccountKeys) bool
func (BaseAccountKeys) GenerateHash ¶
func (ks BaseAccountKeys) GenerateHash() (util.Hash, error)
func (BaseAccountKeys) GenerateKeccakHash ¶
func (ks BaseAccountKeys) GenerateKeccakHash() (util.Hash, error)
func (BaseAccountKeys) Hash ¶
func (ks BaseAccountKeys) Hash() util.Hash
func (BaseAccountKeys) IsValid ¶
func (ks BaseAccountKeys) IsValid([]byte) error
func (BaseAccountKeys) Key ¶
func (ks BaseAccountKeys) Key(k base.Publickey) (AccountKey, bool)
func (BaseAccountKeys) Keys ¶
func (ks BaseAccountKeys) Keys() []AccountKey
func (BaseAccountKeys) MarshalBSON ¶
func (ks BaseAccountKeys) MarshalBSON() ([]byte, error)
func (BaseAccountKeys) MarshalJSON ¶
func (ks BaseAccountKeys) MarshalJSON() ([]byte, error)
func (BaseAccountKeys) Threshold ¶
func (ks BaseAccountKeys) Threshold() uint
type BaseCreateAccountsItem ¶
type BaseCreateAccountsItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseCreateAccountsItem ¶
func NewBaseCreateAccountsItem(ht hint.Hint, keys AccountKeys, amounts []Amount, addrHint hint.Type) BaseCreateAccountsItem
func (BaseCreateAccountsItem) Address ¶
func (it BaseCreateAccountsItem) Address() (base.Address, error)
func (BaseCreateAccountsItem) AddressType ¶
func (it BaseCreateAccountsItem) AddressType() hint.Type
func (BaseCreateAccountsItem) Amounts ¶
func (it BaseCreateAccountsItem) Amounts() []Amount
func (BaseCreateAccountsItem) Bytes ¶
func (it BaseCreateAccountsItem) Bytes() []byte
func (*BaseCreateAccountsItem) DecodeBSON ¶
func (it *BaseCreateAccountsItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseCreateAccountsItem) DecodeJSON ¶
func (it *BaseCreateAccountsItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseCreateAccountsItem) IsValid ¶
func (it BaseCreateAccountsItem) IsValid([]byte) error
func (BaseCreateAccountsItem) Keys ¶
func (it BaseCreateAccountsItem) Keys() AccountKeys
func (BaseCreateAccountsItem) MarshalBSON ¶
func (it BaseCreateAccountsItem) MarshalBSON() ([]byte, error)
func (BaseCreateAccountsItem) MarshalJSON ¶
func (it BaseCreateAccountsItem) MarshalJSON() ([]byte, error)
func (BaseCreateAccountsItem) Rebuild ¶
func (it BaseCreateAccountsItem) Rebuild() CreateAccountsItem
type BaseFactBSONUnmarshaler ¶
type BaseNode ¶
type BaseNode struct { util.IsValider util.DefaultJSONMarshaled hint.BaseHinter // contains filtered or unexported fields }
func (BaseNode) MarshalBSON ¶
func (BaseNode) MarshalJSON ¶
type BaseNodeBSONUnMarshaler ¶
type BaseNodeJSONMarshaler ¶
type BaseNodeJSONUnmarshaler ¶
type BaseNodeOperation ¶
type BaseNodeOperation struct {
BaseOperation
}
func NewBaseNodeOperation ¶
func NewBaseNodeOperation(ht hint.Hint, fact base.Fact) BaseNodeOperation
func (*BaseNodeOperation) AddNodeSigns ¶
func (op *BaseNodeOperation) AddNodeSigns(signs []base.NodeSign) (added bool, _ error)
func (*BaseNodeOperation) DecodeBSON ¶
func (op *BaseNodeOperation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (BaseNodeOperation) IsValid ¶
func (op BaseNodeOperation) IsValid(networkID []byte) error
func (*BaseNodeOperation) NodeSign ¶
func (op *BaseNodeOperation) NodeSign(priv base.Privatekey, networkID base.NetworkID, node base.Address) error
func (BaseNodeOperation) NodeSigns ¶
func (op BaseNodeOperation) NodeSigns() []base.NodeSign
func (*BaseNodeOperation) SetNodeSigns ¶
func (op *BaseNodeOperation) SetNodeSigns(signs []base.NodeSign) error
type BaseOperation ¶
type BaseOperation struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseOperation ¶
func NewBaseOperation( ht hint.Hint, fact base.Fact, ) BaseOperation
func (*BaseOperation) DecodeBSON ¶
func (op *BaseOperation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseOperation) DecodeJSON ¶
func (op *BaseOperation) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseOperation) Fact ¶
func (op BaseOperation) Fact() base.Fact
func (BaseOperation) Hash ¶
func (op BaseOperation) Hash() util.Hash
func (BaseOperation) HashBytes ¶
func (op BaseOperation) HashBytes() []byte
func (BaseOperation) IsValid ¶
func (op BaseOperation) IsValid(networkID []byte) error
func (BaseOperation) JSONMarshaler ¶
func (op BaseOperation) JSONMarshaler() BaseOperationJSONMarshaler
func (BaseOperation) MarshalBSON ¶
func (op BaseOperation) MarshalBSON() ([]byte, error)
func (BaseOperation) MarshalJSON ¶
func (op BaseOperation) MarshalJSON() ([]byte, error)
func (BaseOperation) PreProcess ¶
func (BaseOperation) PreProcess(ctx context.Context, _ base.GetStateFunc) ( context.Context, base.OperationProcessReasonError, error, )
func (BaseOperation) Process ¶
func (BaseOperation) Process(context.Context, base.GetStateFunc) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
func (*BaseOperation) SetFact ¶
func (op *BaseOperation) SetFact(fact base.Fact)
func (*BaseOperation) SetHash ¶
func (op *BaseOperation) SetHash(h util.Hash)
func (*BaseOperation) Sign ¶
func (op *BaseOperation) Sign(priv base.Privatekey, networkID base.NetworkID) error
func (BaseOperation) Signs ¶
func (op BaseOperation) Signs() []base.Sign
type BaseOperationJSONUnmarshaler ¶
type BaseOperationJSONUnmarshaler struct { Hash valuehash.HashDecoder `json:"hash"` Fact json.RawMessage `json:"fact"` Signs []json.RawMessage `json:"signs"` }
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 BaseState ¶
type BaseState struct { util.DefaultJSONMarshaled hint.BaseHinter // contains filtered or unexported fields }
func NewBaseState ¶
func (BaseState) MarshalBSON ¶
func (BaseState) MarshalJSON ¶
func (BaseState) Operations ¶
func (BaseState) Value ¶
func (s BaseState) Value() base.StateValue
type BaseStateMergeValue ¶
type BaseStateMergeValue struct { base.StateValue // contains filtered or unexported fields }
func NewBaseStateMergeValue ¶
func NewBaseStateMergeValue( key string, value base.StateValue, merger func(base.Height, base.State) base.StateValueMerger, ) BaseStateMergeValue
func (BaseStateMergeValue) Key ¶
func (v BaseStateMergeValue) Key() string
func (BaseStateMergeValue) Merger ¶
func (v BaseStateMergeValue) Merger(height base.Height, st base.State) base.StateValueMerger
func (BaseStateMergeValue) Value ¶
func (v BaseStateMergeValue) Value() base.StateValue
type BaseStateValueMerger ¶
type BaseStateValueMerger struct { base.State sync.RWMutex // contains filtered or unexported fields }
func NewBaseStateValueMerger ¶
func (*BaseStateValueMerger) AddOperations ¶
func (s *BaseStateValueMerger) AddOperations(ops []util.Hash)
func (*BaseStateValueMerger) Close ¶
func (s *BaseStateValueMerger) Close() error
func (*BaseStateValueMerger) Hash ¶
func (s *BaseStateValueMerger) Hash() util.Hash
func (*BaseStateValueMerger) Height ¶
func (s *BaseStateValueMerger) Height() base.Height
func (*BaseStateValueMerger) Key ¶
func (s *BaseStateValueMerger) Key() string
func (*BaseStateValueMerger) MarshalJSON ¶
func (s *BaseStateValueMerger) MarshalJSON() ([]byte, error)
func (*BaseStateValueMerger) Merge ¶
func (s *BaseStateValueMerger) Merge(value base.StateValue, ops []util.Hash) error
func (*BaseStateValueMerger) Operations ¶
func (s *BaseStateValueMerger) Operations() []util.Hash
func (*BaseStateValueMerger) Previous ¶
func (s *BaseStateValueMerger) Previous() util.Hash
func (*BaseStateValueMerger) SetValue ¶
func (s *BaseStateValueMerger) SetValue(v base.StateValue)
func (*BaseStateValueMerger) Value ¶
func (s *BaseStateValueMerger) Value() base.StateValue
type BaseStringAddress ¶
type BaseStringAddress struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseStringAddressWithHint ¶
func NewBaseStringAddressWithHint(ht hint.Hint, s string) BaseStringAddress
func (BaseStringAddress) Bytes ¶
func (ad BaseStringAddress) Bytes() []byte
func (BaseStringAddress) IsValid ¶
func (ad BaseStringAddress) IsValid([]byte) error
func (BaseStringAddress) MarshalText ¶
func (ad BaseStringAddress) MarshalText() ([]byte, error)
func (BaseStringAddress) String ¶
func (ad BaseStringAddress) String() string
type BaseTransfersItem ¶
type BaseTransfersItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewBaseTransfersItem ¶
func (BaseTransfersItem) Amounts ¶
func (it BaseTransfersItem) Amounts() []Amount
func (BaseTransfersItem) Bytes ¶
func (it BaseTransfersItem) Bytes() []byte
func (*BaseTransfersItem) DecodeBSON ¶
func (it *BaseTransfersItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*BaseTransfersItem) DecodeJSON ¶
func (it *BaseTransfersItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (BaseTransfersItem) IsValid ¶
func (it BaseTransfersItem) IsValid([]byte) error
func (BaseTransfersItem) MarshalBSON ¶
func (it BaseTransfersItem) MarshalBSON() ([]byte, error)
func (BaseTransfersItem) MarshalJSON ¶
func (it BaseTransfersItem) MarshalJSON() ([]byte, error)
func (BaseTransfersItem) Rebuild ¶
func (it BaseTransfersItem) Rebuild() TransfersItem
func (BaseTransfersItem) Receiver ¶
func (it BaseTransfersItem) Receiver() base.Address
type BaseTransfersItemJSONUnpacker ¶
type BaseTransfersItemJSONUnpacker struct { Hint hint.Hint `json:"_hint"` Receiver string `json:"receiver"` Amounts json.RawMessage `json:"amounts"` }
type Big ¶
func MustBigFromString ¶
func NewBigFromBigInt ¶
func NewBigFromInterface ¶
func NewBigFromString ¶
func (Big) MarshalJSON ¶
func (Big) MulFloat64 ¶
func (*Big) UnmarshalJSON ¶
type CreateAccounts ¶
type CreateAccounts struct {
BaseOperation
}
func NewCreateAccounts ¶
func NewCreateAccounts(fact CreateAccountsFact) (CreateAccounts, error)
func (*CreateAccounts) DecodeBSON ¶
func (op *CreateAccounts) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateAccounts) DecodeJSON ¶
func (op *CreateAccounts) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (*CreateAccounts) HashSign ¶
func (op *CreateAccounts) HashSign(priv base.Privatekey, networkID base.NetworkID) error
func (CreateAccounts) MarshalBSON ¶
func (op CreateAccounts) MarshalBSON() ([]byte, error)
func (CreateAccounts) MarshalJSON ¶
func (op CreateAccounts) MarshalJSON() ([]byte, error)
func (CreateAccounts) Process ¶
func (CreateAccounts) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type CreateAccountsFact ¶
func NewCreateAccountsFact ¶
func NewCreateAccountsFact( token []byte, sender base.Address, items []CreateAccountsItem, ) CreateAccountsFact
func (CreateAccountsFact) Addresses ¶
func (fact CreateAccountsFact) Addresses() ([]base.Address, error)
func (CreateAccountsFact) Bytes ¶
func (fact CreateAccountsFact) Bytes() []byte
func (*CreateAccountsFact) DecodeBSON ¶
func (fact *CreateAccountsFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*CreateAccountsFact) DecodeJSON ¶
func (fact *CreateAccountsFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (CreateAccountsFact) GenerateHash ¶
func (fact CreateAccountsFact) GenerateHash() util.Hash
func (CreateAccountsFact) Hash ¶
func (fact CreateAccountsFact) Hash() util.Hash
func (CreateAccountsFact) IsValid ¶
func (fact CreateAccountsFact) IsValid(b []byte) error
func (CreateAccountsFact) Items ¶
func (fact CreateAccountsFact) Items() []CreateAccountsItem
func (CreateAccountsFact) MarshalBSON ¶
func (fact CreateAccountsFact) MarshalBSON() ([]byte, error)
func (CreateAccountsFact) MarshalJSON ¶
func (fact CreateAccountsFact) MarshalJSON() ([]byte, error)
func (CreateAccountsFact) Rebuild ¶
func (fact CreateAccountsFact) Rebuild() CreateAccountsFact
func (CreateAccountsFact) Sender ¶
func (fact CreateAccountsFact) Sender() base.Address
func (CreateAccountsFact) Targets ¶
func (fact CreateAccountsFact) Targets() ([]base.Address, error)
func (CreateAccountsFact) Token ¶
func (fact CreateAccountsFact) Token() base.Token
type CreateAccountsFactJSONMarshaler ¶
type CreateAccountsFactJSONMarshaler struct { base.BaseFactJSONMarshaler Sender base.Address `json:"sender"` Items []CreateAccountsItem `json:"items"` }
type CreateAccountsFactJSONUnMarshaler ¶
type CreateAccountsFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Sender string `json:"sender"` Items json.RawMessage `json:"items"` }
type CreateAccountsItem ¶
type CreateAccountsItem interface { hint.Hinter util.IsValider AmountsItem Bytes() []byte Keys() AccountKeys Address() (base.Address, error) Rebuild() CreateAccountsItem AddressType() hint.Type }
type CreateAccountsItemJSONMarshaler ¶
type CreateAccountsItemJSONMarshaler struct { hint.BaseHinter Keys AccountKeys `json:"keys"` Amounts []Amount `json:"amounts"` AddrType hint.Type `json:"addrtype"` }
type CreateAccountsItemJSONUnMarshaler ¶
type CreateAccountsItemJSONUnMarshaler struct { Hint hint.Hint `json:"_hint"` Keys json.RawMessage `json:"keys"` Amounts json.RawMessage `json:"amounts"` AddrType string `json:"addrtype"` }
type CreateAccountsItemMultiAmounts ¶
type CreateAccountsItemMultiAmounts struct {
BaseCreateAccountsItem
}
func NewCreateAccountsItemMultiAmounts ¶
func NewCreateAccountsItemMultiAmounts(keys AccountKeys, amounts []Amount, addrType hint.Type) CreateAccountsItemMultiAmounts
func (CreateAccountsItemMultiAmounts) IsValid ¶
func (it CreateAccountsItemMultiAmounts) IsValid([]byte) error
func (CreateAccountsItemMultiAmounts) Rebuild ¶
func (it CreateAccountsItemMultiAmounts) Rebuild() CreateAccountsItem
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 CreateAccountsItemSingleAmount ¶
type CreateAccountsItemSingleAmount struct {
BaseCreateAccountsItem
}
func NewCreateAccountsItemSingleAmount ¶
func NewCreateAccountsItemSingleAmount(keys AccountKeys, amount Amount, addrType hint.Type) CreateAccountsItemSingleAmount
func (CreateAccountsItemSingleAmount) IsValid ¶
func (it CreateAccountsItemSingleAmount) IsValid([]byte) error
func (CreateAccountsItemSingleAmount) Rebuild ¶
func (it CreateAccountsItemSingleAmount) Rebuild() CreateAccountsItem
type CreateAccountsProcessor ¶
type CreateAccountsProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
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 CurrencyDesign ¶
type CurrencyDesign struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCurrencyDesign ¶
func NewCurrencyDesign(amount Amount, genesisAccount base.Address, po CurrencyPolicy) CurrencyDesign
func StateCurrencyDesignValue ¶
func StateCurrencyDesignValue(st base.State) (CurrencyDesign, error)
func (CurrencyDesign) AddAggregate ¶
func (de CurrencyDesign) AddAggregate(b Big) (CurrencyDesign, error)
func (CurrencyDesign) Aggregate ¶
func (de CurrencyDesign) Aggregate() Big
func (CurrencyDesign) Bytes ¶
func (de CurrencyDesign) Bytes() []byte
func (CurrencyDesign) Currency ¶
func (de CurrencyDesign) 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 Amount `json:"amount"` Genesis 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"` Genesis 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 {
CD json.RawMessage `json:"currencydesign"`
}
type CurrencyDesignStateValueMerger ¶
type CurrencyDesignStateValueMerger struct {
*BaseStateValueMerger
}
type CurrencyID ¶
type CurrencyID string
func (CurrencyID) Bytes ¶
func (cid CurrencyID) Bytes() []byte
func (CurrencyID) IsValid ¶
func (cid CurrencyID) IsValid([]byte) error
func (CurrencyID) String ¶
func (cid CurrencyID) String() string
type CurrencyPolicy ¶
type CurrencyPolicy struct { hint.BaseHinter // contains filtered or unexported fields }
func NewCurrencyPolicy ¶
func NewCurrencyPolicy(newAccountMinBalance 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() 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 NewAccountMin string `json:"new_account_min_balance"` Feeer Feeer `json:"feeer"` }
type CurrencyPolicyJSONUnmarshaler ¶
type CurrencyPolicyJSONUnmarshaler struct { Hint hint.Hint `json:"_hint"` NewAccountMin string `json:"new_account_min_balance"` Feeer json.RawMessage `json:"feeer"` }
type CurrencyPolicyUpdater ¶
type CurrencyPolicyUpdater struct {
BaseNodeOperation
}
func NewCurrencyPolicyUpdater ¶
func NewCurrencyPolicyUpdater(fact CurrencyPolicyUpdaterFact, memo string) (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 CurrencyID, policy CurrencyPolicy) CurrencyPolicyUpdaterFact
func (CurrencyPolicyUpdaterFact) Bytes ¶
func (fact CurrencyPolicyUpdaterFact) Bytes() []byte
func (CurrencyPolicyUpdaterFact) Currency ¶
func (fact CurrencyPolicyUpdaterFact) 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 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 {
BaseNodeOperation
}
func NewCurrencyRegister ¶
func NewCurrencyRegister(fact CurrencyRegisterFact, memo string) (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 EthAddress ¶
type EthAddress struct {
base.BaseStringAddress
}
func NewEthAddress ¶
func NewEthAddress(s string) EthAddress
func NewEthAddressFromKeys ¶
func NewEthAddressFromKeys(keys AccountKeys) (EthAddress, error)
func (*EthAddress) DecodeBSON ¶
func (ca *EthAddress) DecodeBSON(b []byte, _ *bsonenc.Encoder) error
func (*EthAddress) DecodeJSON ¶
func (ca *EthAddress) DecodeJSON(b []byte, _ *jsonenc.Encoder) error
func (EthAddress) IsValid ¶
func (ca EthAddress) IsValid([]byte) error
func (EthAddress) MarshalBSONValue ¶
func (ca EthAddress) MarshalBSONValue() (bsontype.Type, []byte, error)
func (EthAddress) MarshalText ¶
func (ca EthAddress) MarshalText() ([]byte, error)
type FeeOperation ¶
type FeeOperation struct {
BaseOperation
}
func NewFeeOperation ¶
func NewFeeOperation(fact FeeOperationFact) (FeeOperation, error)
func (*FeeOperation) DecodeBSON ¶
func (op *FeeOperation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*FeeOperation) HashSign ¶
func (op *FeeOperation) HashSign(priv base.Privatekey, networkID base.NetworkID) error
type FeeOperationFact ¶
func NewFeeOperationFact ¶
func NewFeeOperationFact(height base.Height, ams map[CurrencyID]Big) FeeOperationFact
func (FeeOperationFact) Amounts ¶
func (fact FeeOperationFact) Amounts() []Amount
func (FeeOperationFact) Bytes ¶
func (fact FeeOperationFact) Bytes() []byte
func (*FeeOperationFact) DecodeBSON ¶
func (fact *FeeOperationFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*FeeOperationFact) DecodeJSON ¶
func (fact *FeeOperationFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (FeeOperationFact) Hash ¶
func (fact FeeOperationFact) Hash() util.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() base.Token
type FeeOperationFactJSONMarshaler ¶
type FeeOperationFactJSONMarshaler struct { base.BaseFactJSONMarshaler Amounts []Amount `json:"amounts"` }
type FeeOperationFactJSONUnMarshaler ¶
type FeeOperationFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler AM json.RawMessage `json:"amounts"` }
type FeeOperationProcessor ¶
type FeeOperationProcessor struct {
*base.BaseOperationProcessor
}
func (*FeeOperationProcessor) PreProcess ¶
func (opp *FeeOperationProcessor) PreProcess( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc, ) (context.Context, base.OperationProcessReasonError, error)
func (*FeeOperationProcessor) Process ¶
func (opp *FeeOperationProcessor) Process( ctx context.Context, op base.Operation, getStateFunc base.GetStateFunc) ( []base.StateMergeValue, base.OperationProcessReasonError, error, )
type FixedFeeer ¶
type FixedFeeer struct { hint.BaseHinter // contains filtered or unexported fields }
func NewFixedFeeer ¶
func NewFixedFeeer(receiver base.Address, amount Big) FixedFeeer
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) 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() Big
func (FixedFeeer) Receiver ¶
func (fa FixedFeeer) Receiver() base.Address
func (FixedFeeer) Type ¶
func (FixedFeeer) Type() string
type FixedFeeerJSONMarshaler ¶
type FixedFeeerJSONMarshaler struct { hint.BaseHinter Receiver base.Address `json:"receiver"` Amount string `json:"amount"` }
type GenesisCurrencies ¶
type GenesisCurrencies struct {
BaseOperation
}
func NewGenesisCurrencies ¶
func NewGenesisCurrencies( fact GenesisCurrenciesFact, ) GenesisCurrencies
func (*GenesisCurrencies) DecodeBSON ¶
func (op *GenesisCurrencies) DecodeBSON(b []byte, enc *bsonenc.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 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() 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 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 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
type HashGenerator ¶
type KeyBSONUnmarshaler ¶
type KeyJSONMarshaler ¶
type KeyJSONMarshaler struct { hint.BaseHinter Weight uint `json:"weight"` Key base.Publickey `json:"key"` }
type KeyJSONUnmarshaler ¶
type KeyUpdater ¶
type KeyUpdater struct {
BaseOperation
}
func NewKeyUpdater ¶
func NewKeyUpdater(fact KeyUpdaterFact) (KeyUpdater, error)
func (*KeyUpdater) DecodeBSON ¶
func (op *KeyUpdater) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*KeyUpdater) DecodeJSON ¶
func (op *KeyUpdater) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (*KeyUpdater) HashSign ¶
func (op *KeyUpdater) HashSign(priv base.Privatekey, networkID base.NetworkID) error
func (KeyUpdater) MarshalBSON ¶
func (op KeyUpdater) MarshalBSON() ([]byte, error)
func (KeyUpdater) MarshalJSON ¶
func (op KeyUpdater) MarshalJSON() ([]byte, error)
func (KeyUpdater) Process ¶
func (KeyUpdater) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type KeyUpdaterFact ¶
func NewKeyUpdaterFact ¶
func NewKeyUpdaterFact( token []byte, target base.Address, keys AccountKeys, currency CurrencyID, ) KeyUpdaterFact
func (KeyUpdaterFact) Bytes ¶
func (fact KeyUpdaterFact) Bytes() []byte
func (KeyUpdaterFact) Currency ¶
func (fact KeyUpdaterFact) Currency() CurrencyID
func (*KeyUpdaterFact) DecodeBSON ¶
func (fact *KeyUpdaterFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*KeyUpdaterFact) DecodeJSON ¶
func (fact *KeyUpdaterFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (KeyUpdaterFact) GenerateHash ¶
func (fact KeyUpdaterFact) GenerateHash() util.Hash
func (KeyUpdaterFact) Hash ¶
func (fact KeyUpdaterFact) Hash() util.Hash
func (KeyUpdaterFact) IsValid ¶
func (fact KeyUpdaterFact) IsValid(b []byte) error
func (KeyUpdaterFact) Keys ¶
func (fact KeyUpdaterFact) Keys() AccountKeys
func (KeyUpdaterFact) MarshalBSON ¶
func (fact KeyUpdaterFact) MarshalBSON() ([]byte, error)
func (KeyUpdaterFact) MarshalJSON ¶
func (fact KeyUpdaterFact) MarshalJSON() ([]byte, error)
func (KeyUpdaterFact) Rebuild ¶
func (fact KeyUpdaterFact) Rebuild() KeyUpdaterFact
func (KeyUpdaterFact) Target ¶
func (fact KeyUpdaterFact) Target() base.Address
func (KeyUpdaterFact) Token ¶
func (fact KeyUpdaterFact) Token() base.Token
type KeyUpdaterFactJSONMarshaler ¶
type KeyUpdaterFactJSONMarshaler struct { base.BaseFactJSONMarshaler Target base.Address `json:"target"` Keys AccountKeys `json:"keys"` Currency CurrencyID `json:"currency"` }
type KeyUpdaterFactJSONUnMarshaler ¶
type KeyUpdaterFactJSONUnMarshaler struct { base.BaseFactJSONUnmarshaler Target string `json:"target"` Keys json.RawMessage `json:"keys"` Currency string `json:"currency"` }
type KeyUpdaterProcessor ¶
type KeyUpdaterProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
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 KeysBSONUnmarshaler ¶
type KeysJSONMarshaler ¶
type KeysJSONMarshaler struct { hint.BaseHinter Hash util.Hash `json:"hash"` Keys []AccountKey `json:"keys"` Threshold uint `json:"threshold"` }
type KeysJSONUnMarshaler ¶
type KeysJSONUnMarshaler struct { Hint hint.Hint `json:"_hint"` Hash valuehash.HashDecoder `json:"hash"` Keys json.RawMessage `json:"keys"` Threshold uint `json:"threshold"` }
type MEPrivatekey ¶
type MEPrivatekey struct { hint.BaseHinter // contains filtered or unexported fields }
MEPrivatekey is the default privatekey of mitum, it is based on BTC Privatekey.
func LoadMEPrivatekey ¶
func LoadMEPrivatekey(s string) (MEPrivatekey, error)
func NewMEPrivatekey ¶
func NewMEPrivatekey() MEPrivatekey
func NewMEPrivatekeyFromSeed ¶
func NewMEPrivatekeyFromSeed(s string) (MEPrivatekey, error)
func ParseMEPrivatekey ¶
func ParseMEPrivatekey(s string) (MEPrivatekey, error)
func (MEPrivatekey) Bytes ¶
func (k MEPrivatekey) Bytes() []byte
func (MEPrivatekey) IsValid ¶
func (k MEPrivatekey) IsValid([]byte) error
func (MEPrivatekey) MarshalText ¶
func (k MEPrivatekey) MarshalText() ([]byte, error)
func (MEPrivatekey) Publickey ¶
func (k MEPrivatekey) Publickey() base.Publickey
func (MEPrivatekey) String ¶
func (k MEPrivatekey) String() string
func (*MEPrivatekey) UnmarshalText ¶
func (k *MEPrivatekey) UnmarshalText(b []byte) error
type MEPublickey ¶
type MEPublickey struct { hint.BaseHinter // contains filtered or unexported fields }
MEPublickey is the default publickey of mitum, it is based on BTC Privatekey.
func LoadMEPublickey ¶
func LoadMEPublickey(s string) (MEPublickey, error)
func NewMEPublickey ¶
func NewMEPublickey(k *ecdsa.PublicKey) MEPublickey
func ParseMEPublickey ¶
func ParseMEPublickey(s string) (MEPublickey, error)
func (MEPublickey) Bytes ¶
func (k MEPublickey) Bytes() []byte
func (MEPublickey) IsValid ¶
func (k MEPublickey) IsValid([]byte) error
func (MEPublickey) MarshalText ¶
func (k MEPublickey) MarshalText() ([]byte, error)
func (MEPublickey) String ¶
func (k MEPublickey) String() string
func (*MEPublickey) UnmarshalText ¶
func (k *MEPublickey) UnmarshalText(b []byte) error
type NilFeeer ¶
type NilFeeer struct {
hint.BaseHinter
}
func NewNilFeeer ¶
func NewNilFeeer() NilFeeer
func (NilFeeer) MarshalBSON ¶
func (NilFeeer) MarshalJSON ¶
func (*NilFeeer) UnmarsahlBSON ¶
func (*NilFeeer) UnmarsahlJSON ¶
type OperationProcessor ¶
type OperationProcessor struct { // id string sync.RWMutex *logging.Logging *base.BaseOperationProcessor GetStateFunc base.GetStateFunc CollectFee func(*OperationProcessor, AddFee) error // 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 NewRatioFeeer(receiver base.Address, ratio float64, min, max Big) RatioFeeer
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) 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() Big
func (RatioFeeer) Receiver ¶
func (fa RatioFeeer) Receiver() base.Address
func (RatioFeeer) Type ¶
func (RatioFeeer) Type() string
type RatioFeeerJSONMarshaler ¶
type StringAddress ¶
type StringAddress struct {
BaseStringAddress
}
func NewStringAddress ¶
func NewStringAddress(s string) StringAddress
func ParseStringAddress ¶
func ParseStringAddress(s string) (StringAddress, error)
func (StringAddress) IsValid ¶
func (ad StringAddress) IsValid([]byte) error
func (StringAddress) MarshalBSONValue ¶
func (ad StringAddress) MarshalBSONValue() (bsontype.Type, []byte, error)
func (*StringAddress) UnmarshalText ¶
func (ad *StringAddress) UnmarshalText(b []byte) error
type SuffrageInflation ¶
type SuffrageInflation struct {
BaseNodeOperation
}
func NewSuffrageInflation ¶
func NewSuffrageInflation( fact SuffrageInflationFact, ) (SuffrageInflation, error)
func (*SuffrageInflation) DecodeBSON ¶
func (op *SuffrageInflation) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInflation) DecodeJSON ¶
func (op *SuffrageInflation) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (SuffrageInflation) Process ¶
func (SuffrageInflation) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type SuffrageInflationFact ¶
func NewSuffrageInflationFact ¶
func NewSuffrageInflationFact(token []byte, items []SuffrageInflationItem) SuffrageInflationFact
func (SuffrageInflationFact) Bytes ¶
func (fact SuffrageInflationFact) Bytes() []byte
func (*SuffrageInflationFact) DecodeBSON ¶
func (fact *SuffrageInflationFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInflationFact) DecodeJSON ¶
func (fact *SuffrageInflationFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (SuffrageInflationFact) GenerateHash ¶
func (fact SuffrageInflationFact) GenerateHash() util.Hash
func (SuffrageInflationFact) Hash ¶
func (fact SuffrageInflationFact) Hash() util.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() base.Token
type SuffrageInflationFactJSONMarshaler ¶
type SuffrageInflationFactJSONMarshaler struct { base.BaseFactJSONMarshaler Items []SuffrageInflationItem `json:"items"` }
type SuffrageInflationFactJSONUnmarshaler ¶
type SuffrageInflationFactJSONUnmarshaler struct { base.BaseFactJSONUnmarshaler Items []json.RawMessage `json:"items"` }
type SuffrageInflationItem ¶
type SuffrageInflationItem struct { hint.BaseHinter // contains filtered or unexported fields }
func NewSuffrageInflationItem ¶
func NewSuffrageInflationItem(receiver base.Address, amount Amount) SuffrageInflationItem
func (SuffrageInflationItem) Amount ¶
func (it SuffrageInflationItem) Amount() Amount
func (SuffrageInflationItem) Bytes ¶
func (it SuffrageInflationItem) Bytes() []byte
func (*SuffrageInflationItem) DecodeBSON ¶
func (it *SuffrageInflationItem) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*SuffrageInflationItem) DecodeJSON ¶
func (it *SuffrageInflationItem) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (SuffrageInflationItem) IsValid ¶
func (it SuffrageInflationItem) IsValid([]byte) error
func (SuffrageInflationItem) MarshalBSON ¶
func (it SuffrageInflationItem) MarshalBSON() ([]byte, error)
func (SuffrageInflationItem) MarshalJSON ¶
func (it SuffrageInflationItem) MarshalJSON() ([]byte, error)
func (SuffrageInflationItem) Receiver ¶
func (it SuffrageInflationItem) Receiver() base.Address
type SuffrageInflationItemJSONMarshaler ¶
type SuffrageInflationItemJSONMarshaler struct { hint.BaseHinter Receiver base.Address `json:"receiver"` Amount Amount `json:"amount"` }
type SuffrageInflationItemJSONUnmarshaler ¶
type SuffrageInflationItemJSONUnmarshaler struct { HT hint.Hint `json:"_hint"` Receiver string `json:"receiver"` Amount json.RawMessage `json:"amount"` }
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 []TransfersItem `json:"items"` }
type Transfers ¶
type Transfers struct {
BaseOperation
}
func NewTransfers ¶
func NewTransfers(fact TransfersFact) (Transfers, error)
func (*Transfers) DecodeBSON ¶
func (*Transfers) DecodeJSON ¶
func (Transfers) MarshalBSON ¶
func (Transfers) MarshalJSON ¶
func (Transfers) Process ¶
func (Transfers) Process( ctx context.Context, getStateFunc base.GetStateFunc, ) ([]base.StateMergeValue, base.OperationProcessReasonError, error)
type TransfersFact ¶
func NewTransfersFact ¶
func NewTransfersFact( token []byte, sender base.Address, items []TransfersItem, ) TransfersFact
func (TransfersFact) Bytes ¶
func (fact TransfersFact) Bytes() []byte
func (*TransfersFact) DecodeBSON ¶
func (fact *TransfersFact) DecodeBSON(b []byte, enc *bsonenc.Encoder) error
func (*TransfersFact) DecodeJSON ¶
func (fact *TransfersFact) DecodeJSON(b []byte, enc *jsonenc.Encoder) error
func (TransfersFact) GenerateHash ¶
func (fact TransfersFact) GenerateHash() util.Hash
func (TransfersFact) Hash ¶
func (fact TransfersFact) Hash() util.Hash
func (TransfersFact) IsValid ¶
func (fact TransfersFact) IsValid(b []byte) error
func (TransfersFact) Items ¶
func (fact TransfersFact) Items() []TransfersItem
func (TransfersFact) MarshalBSON ¶
func (fact TransfersFact) MarshalBSON() ([]byte, error)
func (TransfersFact) MarshalJSON ¶
func (fact TransfersFact) MarshalJSON() ([]byte, error)
func (TransfersFact) Rebuild ¶
func (fact TransfersFact) Rebuild() TransfersFact
func (TransfersFact) Sender ¶
func (fact TransfersFact) Sender() base.Address
func (TransfersFact) Token ¶
func (fact TransfersFact) Token() base.Token
type TransfersFactJSONUnmarshaler ¶
type TransfersFactJSONUnmarshaler struct { base.BaseFactJSONUnmarshaler Sender string `json:"sender"` Items json.RawMessage `json:"items"` }
type TransfersItem ¶
type TransfersItem interface { hint.Hinter util.IsValider AmountsItem Bytes() []byte Receiver() base.Address Rebuild() TransfersItem }
type TransfersItemJSONPacker ¶
type TransfersItemJSONPacker struct { hint.BaseHinter Receiver base.Address `json:"receiver"` Amounts []Amount `json:"amounts"` }
type TransfersItemMultiAmounts ¶
type TransfersItemMultiAmounts struct {
BaseTransfersItem
}
func NewTransfersItemMultiAmounts ¶
func NewTransfersItemMultiAmounts(receiver base.Address, amounts []Amount) TransfersItemMultiAmounts
func (TransfersItemMultiAmounts) IsValid ¶
func (it TransfersItemMultiAmounts) IsValid([]byte) error
func (TransfersItemMultiAmounts) Rebuild ¶
func (it TransfersItemMultiAmounts) Rebuild() TransfersItem
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 TransfersItemSingleAmount ¶
type TransfersItemSingleAmount struct {
BaseTransfersItem
}
func NewTransfersItemSingleAmount ¶
func NewTransfersItemSingleAmount(receiver base.Address, amount Amount) TransfersItemSingleAmount
func (TransfersItemSingleAmount) IsValid ¶
func (it TransfersItemSingleAmount) IsValid([]byte) error
func (TransfersItemSingleAmount) Rebuild ¶
func (it TransfersItemSingleAmount) Rebuild() TransfersItem
type TransfersProcessor ¶
type TransfersProcessor struct { *base.BaseOperationProcessor // contains filtered or unexported fields }
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, )
Source Files ¶
- account.go
- account_bson.go
- account_encode.go
- account_json.go
- address.go
- address_bson.go
- address_decoder.go
- address_json.go
- amount.go
- amount_bson.go
- amount_encode.go
- amount_json.go
- base_node.go
- base_operation.go
- base_operation_bson.go
- base_operation_json.go
- base_state.go
- base_state_bson.go
- base_string_address.go
- big.go
- big_bson.go
- big_json.go
- create_accounts.go
- create_accounts_bson.go
- create_accounts_encode.go
- create_accounts_item.go
- create_accounts_item_bson.go
- create_accounts_item_encode.go
- create_accounts_item_json.go
- create_accounts_json.go
- create_accounts_multi_amounts.go
- create_accounts_process.go
- create_accounts_single_amount.go
- currency.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
- doc.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
- key_updater.go
- key_updater_bson.go
- key_updater_encode.go
- key_updater_json.go
- key_updater_process.go
- keys.go
- keys_bson.go
- keys_encode.go
- keys_json.go
- memo.go
- operation_processor.go
- pk_priv.go
- pk_pub.go
- signs.go
- state.go
- state_bson.go
- state_json.go
- string_address.go
- suffrage_inflation.go
- suffrage_inflation_bson.go
- suffrage_inflation_item.go
- suffrage_inflation_item_bson.go
- suffrage_inflation_item_encode.go
- suffrage_inflation_item_json.go
- suffrage_inflation_json.go
- suffrage_inflation_process.go
- transfers.go
- transfers_bson.go
- transfers_encode.go
- transfers_item.go
- transfers_item_bson.go
- transfers_item_encode.go
- transfers_item_json.go
- transfers_json.go
- transfers_multi_amounts.go
- transfers_process.go
- transfers_single_amount.go
Click to show internal directories.
Click to hide internal directories.