Versions in this module Expand all Collapse all v1 v1.0.0 Jun 26, 2019 Changes in this version + var ErrAccountKeyNotModifiable = errors.New("account key is not modifiable") + var ErrUndefinedAccountType = errors.New("undefined account type") + type Account interface + DeepCopy func() Account + Empty func() bool + Equal func(Account) bool + GetBalance func() *big.Int + GetHumanReadable func() bool + GetNonce func() uint64 + SetBalance func(b *big.Int) + SetHumanReadable func(b bool) + SetNonce func(n uint64) + String func() string + Type func() AccountType + UpdateKey func(newKey accountkey.AccountKey, currentBlockNumber uint64) error + func NewAccountWithMap(t AccountType, values map[AccountValueKeyType]interface{}) (Account, error) + func NewAccountWithType(t AccountType) (Account, error) + type AccountCommon struct + func (e *AccountCommon) DecodeRLP(s *rlp.Stream) error + func (e *AccountCommon) DeepCopy() *AccountCommon + func (e *AccountCommon) Empty() bool + func (e *AccountCommon) EncodeRLP(w io.Writer) error + func (e *AccountCommon) Equal(ta *AccountCommon) bool + func (e *AccountCommon) GetBalance() *big.Int + func (e *AccountCommon) GetHumanReadable() bool + func (e *AccountCommon) GetKey() accountkey.AccountKey + func (e *AccountCommon) GetNonce() uint64 + func (e *AccountCommon) MarshalJSON() ([]byte, error) + func (e *AccountCommon) ReplaceKey(newKey accountkey.AccountKey, currentBlockNumber uint64) error + func (e *AccountCommon) SetBalance(b *big.Int) + func (e *AccountCommon) SetHumanReadable(h bool) + func (e *AccountCommon) SetKey(k accountkey.AccountKey) + func (e *AccountCommon) SetNonce(n uint64) + func (e *AccountCommon) String() string + func (e *AccountCommon) UnmarshalJSON(b []byte) error + func (e *AccountCommon) UpdateKey(newKey accountkey.AccountKey, currentBlockNumber uint64) error + type AccountSerializer struct + func NewAccountSerializer() *AccountSerializer + func NewAccountSerializerWithAccount(a Account) *AccountSerializer + func (ser *AccountSerializer) DecodeRLP(s *rlp.Stream) error + func (ser *AccountSerializer) EncodeRLP(w io.Writer) error + func (ser *AccountSerializer) GetAccount() Account + func (ser *AccountSerializer) MarshalJSON() ([]byte, error) + func (ser *AccountSerializer) UnmarshalJSON(b []byte) error + type AccountType uint8 + const ExternallyOwnedAccountType + const LegacyAccountType + const SmartContractAccountType + func (a AccountType) String() string + type AccountValueKeyType uint + const AccountValueKeyAccountKey + const AccountValueKeyBalance + const AccountValueKeyCodeFormat + const AccountValueKeyCodeHash + const AccountValueKeyHumanReadable + const AccountValueKeyNonce + const AccountValueKeyStorageRoot + type AccountWithKey interface + GetKey func() accountkey.AccountKey + SetKey func(key accountkey.AccountKey) + func GetAccountWithKey(a Account) AccountWithKey + type ExternallyOwnedAccount struct + func (e *ExternallyOwnedAccount) DeepCopy() Account + func (e *ExternallyOwnedAccount) Dump() + func (e *ExternallyOwnedAccount) Equal(a Account) bool + func (e *ExternallyOwnedAccount) String() string + func (e *ExternallyOwnedAccount) Type() AccountType + type LegacyAccount struct + Balance *big.Int + CodeHash []byte + Nonce uint64 + Root common.Hash + func (a *LegacyAccount) DeepCopy() Account + func (a *LegacyAccount) Dump() + func (a *LegacyAccount) Empty() bool + func (a *LegacyAccount) Equal(b Account) bool + func (a *LegacyAccount) GetBalance() *big.Int + func (a *LegacyAccount) GetCodeHash() []byte + func (a *LegacyAccount) GetHumanReadable() bool + func (a *LegacyAccount) GetNonce() uint64 + func (a *LegacyAccount) GetStorageRoot() common.Hash + func (a *LegacyAccount) SetBalance(b *big.Int) + func (a *LegacyAccount) SetCodeHash(h []byte) + func (a *LegacyAccount) SetHumanReadable(b bool) + func (a *LegacyAccount) SetNonce(n uint64) + func (a *LegacyAccount) SetStorageRoot(h common.Hash) + func (a *LegacyAccount) String() string + func (a *LegacyAccount) Type() AccountType + func (a *LegacyAccount) UpdateKey(newKey accountkey.AccountKey, currentBlockNumber uint64) error + type ProgramAccount interface + GetCodeFormat func() params.CodeFormat + GetCodeHash func() []byte + GetStorageRoot func() common.Hash + SetCodeFormat func(cf params.CodeFormat) + SetCodeHash func(h []byte) + SetStorageRoot func(h common.Hash) + func GetProgramAccount(a Account) ProgramAccount + type SmartContractAccount struct + func (sca *SmartContractAccount) DecodeRLP(s *rlp.Stream) error + func (sca *SmartContractAccount) DeepCopy() Account + func (sca *SmartContractAccount) Empty() bool + func (sca *SmartContractAccount) EncodeRLP(w io.Writer) error + func (sca *SmartContractAccount) Equal(a Account) bool + func (sca *SmartContractAccount) GetCodeFormat() params.CodeFormat + func (sca *SmartContractAccount) GetCodeHash() []byte + func (sca *SmartContractAccount) GetStorageRoot() common.Hash + func (sca *SmartContractAccount) MarshalJSON() ([]byte, error) + func (sca *SmartContractAccount) SetCodeFormat(cf params.CodeFormat) + func (sca *SmartContractAccount) SetCodeHash(h []byte) + func (sca *SmartContractAccount) SetStorageRoot(h common.Hash) + func (sca *SmartContractAccount) String() string + func (sca *SmartContractAccount) Type() AccountType + func (sca *SmartContractAccount) UnmarshalJSON(b []byte) error + func (sca *SmartContractAccount) UpdateKey(newKey accountkey.AccountKey, currentBlockNumber uint64) error