Documentation ¶
Index ¶
- type Account
- func (a *Account) AddAccountTokenKey(transID, txID int64, keyOfAccountToken string) (err error)
- func (a *Account) AddToBalance(amount bn.Number) error
- func (a *Account) Copy() *Account
- func (a *Account) Encode() ([]byte, error)
- func (a *Account) Equal(accOther *Account) bool
- func (a *Account) GetBalance() bn.Number
- func (a *Account) SetBalance(value bn.Number)
- func (a Account) String() string
- func (a *Account) SubtractFromBalance(amount bn.Number) error
- func (a *Account) Tagged() query.Tagged
- type ByteCode
- func (bc ByteCode) Bytes() []byte
- func (bc ByteCode) Marshal() ([]byte, error)
- func (bc ByteCode) MarshalJSON() ([]byte, error)
- func (bc ByteCode) MarshalText() ([]byte, error)
- func (bc ByteCode) MarshalTo(data []byte) (int, error)
- func (bc ByteCode) MustTokens() []string
- func (bc ByteCode) Size() int
- func (bc ByteCode) String() string
- func (bc ByteCode) Tokens() ([]string, error)
- func (bc *ByteCode) Unmarshal(data []byte) error
- func (bc *ByteCode) UnmarshalJSON(data []byte) error
- func (bc *ByteCode) UnmarshalText(text []byte) error
- type TaggedAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶
type Account struct { Address crypto.BVMAddress `json:"address"` //账户地址 PubKey types.PubKey `json:"pubKey"` //账户公钥 Balance bn.Number `json:"balance"` BVMToken goCrypto.Address `json:"bvmToken"` // bvm 可操作的代币 BVMCode ByteCode `json:"bvmCode"` WASMCode ByteCode `json:"wasmCode,omitempty"` }
Account - 账户,可以是 bvm 合约账户也可以是用户账户 作为用户账户的时候,只存取 balance(实际是balanceOfToken) ,因为已经确定了代币(BVMToken)(也可以是本币) 作为 bvm 合约账户需要存 BVMToken BVMCode/WASMCode
func (*Account) AddAccountTokenKey ¶
func (*Account) GetBalance ¶
func (*Account) SetBalance ¶
type ByteCode ¶
type ByteCode []byte
func (ByteCode) MarshalJSON ¶
func (ByteCode) MarshalText ¶
func (ByteCode) MustTokens ¶
func (*ByteCode) UnmarshalJSON ¶
func (*ByteCode) UnmarshalText ¶
type TaggedAccount ¶
Click to show internal directories.
Click to hide internal directories.