Documentation ¶
Index ¶
- type UTXOSet
- type Wallet
- func (w *Wallet) AddUTXO(utxo *ava.UTXO)
- func (w *Wallet) Balance(assetID ids.ID) uint64
- func (w *Wallet) Codec() codec.Codec
- func (w *Wallet) CreateAddress() (ids.ShortID, error)
- func (w *Wallet) CreateTx(assetID ids.ID, amount uint64, destAddr ids.ShortID) (*avm.Tx, error)
- func (w *Wallet) GenerateTxs(numTxs int, assetID ids.ID) error
- func (w *Wallet) GetAddress() (ids.ShortID, error)
- func (w *Wallet) ImportKey(sk *crypto.PrivateKeySECP256K1R)
- func (w *Wallet) NextTx() *avm.Tx
- func (w *Wallet) RemoveUTXO(utxoID ids.ID)
- func (w *Wallet) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UTXOSet ¶
type UTXOSet struct { // List of UTXOs in this set // This can be used to iterate over. It should not be modified externally. UTXOs []*ava.UTXO // contains filtered or unexported fields }
UTXOSet ...
func (*UTXOSet) PrefixedString ¶
PrefixedString returns a string with each new line prefixed with [prefix]
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet is a holder for keys and UTXOs for the Ava DAG.
func (*Wallet) AddUTXO ¶
AddUTXO adds a new UTXO to this wallet if this wallet may spend it The UTXO's output must be an OutputPayment
func (*Wallet) CreateAddress ¶
CreateAddress returns a new address. It also saves the address and the private key that controls it so the address can be used later
func (*Wallet) GenerateTxs ¶
GenerateTxs generates the transactions that will be sent during the test Generate them all on test initialization so tx generation is not bottleneck in testing
func (*Wallet) GetAddress ¶
GetAddress returns one of the addresses this wallet manages. If no address exists, one will be created.
func (*Wallet) ImportKey ¶
func (w *Wallet) ImportKey(sk *crypto.PrivateKeySECP256K1R)
ImportKey imports a private key into this wallet