Documentation ¶
Index ¶
- type UTXOSet
- type Wallet
- func (w *Wallet) AddUTXO(utxo *spdagvm.UTXO)
- func (w *Wallet) Balance() uint64
- func (w *Wallet) CreateAddress() ids.ShortID
- func (w *Wallet) GetAddress() ids.ShortID
- func (w *Wallet) ImportKey(sk *crypto.PrivateKeySECP256K1R)
- func (w *Wallet) Send(amount uint64, locktime uint64, destAddr ids.ShortID) *spdagvm.Tx
- 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 []*spdagvm.UTXO // contains filtered or unexported fields }
UTXOSet ...
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) 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
Click to show internal directories.
Click to hide internal directories.