Documentation ¶
Index ¶
- Variables
- type Accounts
- func (a *Accounts) AppendPublicKey(address flow.Address, publicKey flow.AccountPublicKey) error
- func (a *Accounts) Create(publicKeys []flow.AccountPublicKey) (flow.Address, error)
- func (a *Accounts) Exists(address flow.Address) (bool, error)
- func (a *Accounts) Get(address flow.Address) (*flow.Account, error)
- func (a Accounts) GetAddressGeneratorState() (flow.AddressGenerator, error)
- func (a *Accounts) GetCode(address flow.Address) ([]byte, error)
- func (a *Accounts) GetPublicKey(address flow.Address, keyIndex uint64) (flow.AccountPublicKey, error)
- func (a *Accounts) GetPublicKeyCount(address flow.Address) (uint64, error)
- func (a *Accounts) GetPublicKeys(address flow.Address) (publicKeys []flow.AccountPublicKey, err error)
- func (a Accounts) InitAddressGeneratorState()
- func (a Accounts) SetAddressGeneratorState(state flow.AddressGenerator)
- func (a *Accounts) SetAllPublicKeys(address flow.Address, publicKeys []flow.AccountPublicKey) error
- func (a *Accounts) SetCode(address flow.Address, code []byte) error
- func (a *Accounts) SetPublicKey(address flow.Address, keyIndex uint64, publicKey flow.AccountPublicKey) (encodedPublicKey []byte, err error)
- func (a *Accounts) SetPublicKeyCount(address flow.Address, count uint64)
- func (a *Accounts) TouchCode(address flow.Address)
- type Ledger
- type MapLedger
- type UUIDs
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrAccountNotFound = errors.New("account not found") ErrAccountPublicKeyNotFound = errors.New("account public key not found") )
Functions ¶
This section is empty.
Types ¶
type Accounts ¶
type Accounts struct {
// contains filtered or unexported fields
}
func (*Accounts) AppendPublicKey ¶
func (Accounts) GetAddressGeneratorState ¶
func (a Accounts) GetAddressGeneratorState() (flow.AddressGenerator, error)
func (*Accounts) GetPublicKey ¶
func (*Accounts) GetPublicKeyCount ¶
func (*Accounts) GetPublicKeys ¶
func (Accounts) InitAddressGeneratorState ¶
func (a Accounts) InitAddressGeneratorState()
func (Accounts) SetAddressGeneratorState ¶
func (a Accounts) SetAddressGeneratorState(state flow.AddressGenerator)
func (*Accounts) SetAllPublicKeys ¶
func (*Accounts) SetPublicKey ¶
func (*Accounts) SetPublicKeyCount ¶
type Ledger ¶
type Ledger interface { Set(owner, controller, key string, value flow.RegisterValue) Get(owner, controller, key string) (flow.RegisterValue, error) Touch(owner, controller, key string) Delete(owner, controller, key string) }
A Ledger is the storage interface used by the virtual machine to read and write register values.
type MapLedger ¶
type MapLedger struct { Registers map[string]flow.RegisterValue RegisterTouches map[string]bool }
A MapLedger is a naive ledger storage implementation backed by a simple map.
This implementation is designed for testing purposes.
func NewMapLedger ¶
func NewMapLedger() *MapLedger
func (MapLedger) Get ¶
func (m MapLedger) Get(owner, controller, key string) (flow.RegisterValue, error)
Click to show internal directories.
Click to hide internal directories.