Versions in this module Expand all Collapse all v0 v0.1.0 Apr 19, 2020 Changes in this version + var ID = ids.NewID([32]byte{ ... }) + type APIAccount struct + Address ids.ShortID + Balance json.Uint64 + type Account struct + func (a Account) Balance() uint64 + func (a Account) CreateTx(amount uint64, destination ids.ShortID, ctx *snow.Context, ...) (*Tx, Account, error) + func (a Account) ID() ids.ShortID + func (a Account) Nonce() uint64 + func (a Account) Receive(tx *Tx, ctx *snow.Context) (Account, error) + func (a Account) Send(tx *Tx, ctx *snow.Context) (Account, error) + func (a Account) String() string + func (a Account) Verify() error + func (a Account) VerifyReceive(tx *Tx, ctx *snow.Context) error + func (a Account) VerifySend(tx *Tx, ctx *snow.Context) error + type Block struct + func (b *Block) Bytes() []byte + func (b *Block) ID() ids.ID + func (b *Block) ParentID() ids.ID + func (b *Block) Txs() []*Tx + type BuildGenesisArgs struct + Accounts []APIAccount + type BuildGenesisReply struct + Bytes formatting.CB58 + type Builder struct + ChainID ids.ID + NetworkID uint32 + func (b Builder) NewAccount(id ids.ShortID, nonce, balance uint64) Account + func (b Builder) NewBlock(parentID ids.ID, txs []*Tx) (*Block, error) + func (b Builder) NewTx(key *crypto.PrivateKeySECP256K1R, nonce, amount uint64, ...) (*Tx, error) + type Codec struct + func (c *Codec) MarshalAccount(account Account) ([]byte, error) + func (c *Codec) MarshalAccounts(accounts []Account) ([]byte, error) + func (c *Codec) MarshalBlock(block *Block) ([]byte, error) + func (c *Codec) MarshalGenesis(accounts []Account) ([]byte, error) + func (c *Codec) MarshalTx(tx *Tx) ([]byte, error) + func (c *Codec) MarshalUnsignedTx(tx *Tx) ([]byte, error) + func (c *Codec) UnmarshalAccount(b []byte) (Account, error) + func (c *Codec) UnmarshalAccounts(b []byte) ([]Account, error) + func (c *Codec) UnmarshalBlock(b []byte) (*Block, error) + func (c *Codec) UnmarshalGenesis(b []byte) ([]Account, error) + func (c *Codec) UnmarshalTx(b []byte) (*Tx, error) + type CodecID uint32 + const CustomID + const GenericID + const NoID + func (c CodecID) String() string + func (c CodecID) Verify() error + type Factory struct + func (f *Factory) New() (interface{}, error) + type GetAccountArgs struct + Address ids.ShortID + type GetAccountReply struct + Balance json.Uint64 + Nonce json.Uint64 + type IssueTxArgs struct + Tx formatting.CB58 + type IssueTxReply struct + TxID ids.ID + type Keychain struct + Addrs ids.ShortSet + Keys []*crypto.PrivateKeySECP256K1R + func NewKeychain(networkID uint32, chainID ids.ID) *Keychain + func (kc *Keychain) Add(key *crypto.PrivateKeySECP256K1R) + func (kc *Keychain) Addresses() ids.ShortSet + func (kc *Keychain) Get(id ids.ShortID) (*crypto.PrivateKeySECP256K1R, bool) + func (kc *Keychain) New() (*crypto.PrivateKeySECP256K1R, error) + func (kc *Keychain) PrefixedString(prefix string) string + func (kc *Keychain) Spend(account Account, amount uint64, destination ids.ShortID) (*Tx, Account, error) + func (kc *Keychain) String() string + type LiveBlock struct + func (lb *LiveBlock) Accept() + func (lb *LiveBlock) Bytes() []byte + func (lb *LiveBlock) ID() ids.ID + func (lb *LiveBlock) Parent() snowman.Block + func (lb *LiveBlock) Reject() + func (lb *LiveBlock) Status() choices.Status + func (lb *LiveBlock) Verify() error + func (lb *LiveBlock) VerifyBlock() error + func (lb *LiveBlock) VerifyState() error + type Service struct + func (service *Service) GetAccount(_ *http.Request, args *GetAccountArgs, reply *GetAccountReply) error + func (service *Service) IssueTx(_ *http.Request, args *IssueTxArgs, reply *IssueTxReply) error + type StaticService struct + func (*StaticService) BuildGenesis(_ *http.Request, args *BuildGenesisArgs, reply *BuildGenesisReply) error + type Tx struct + func (tx *Tx) Amount() uint64 + func (tx *Tx) Bytes() []byte + func (tx *Tx) ID() ids.ID + func (tx *Tx) Key(ctx *snow.Context) crypto.PublicKey + func (tx *Tx) Nonce() uint64 + func (tx *Tx) To() ids.ShortID + func (tx *Tx) Verify(ctx *snow.Context) error + type VM struct + func (vm *VM) BuildBlock() (snowman.Block, error) + func (vm *VM) CreateHandlers() map[string]*common.HTTPHandler + func (vm *VM) CreateStaticHandlers() map[string]*common.HTTPHandler + func (vm *VM) FlushTxs() + func (vm *VM) GetAccount(db database.Database, address ids.ShortID) Account + func (vm *VM) GetBlock(id ids.ID) (snowman.Block, error) + func (vm *VM) Initialize(ctx *snow.Context, db database.Database, genesisBytes []byte, ...) error + func (vm *VM) IssueTx(b []byte, onDecide func(choices.Status)) (ids.ID, error) + func (vm *VM) LastAccepted() ids.ID + func (vm *VM) ParseBlock(b []byte) (snowman.Block, error) + func (vm *VM) SetPreference(preferred ids.ID) + func (vm *VM) Shutdown()