Documentation
¶
Index ¶
- Variables
- type TransferInput
- type TransferOutput
- type TransferTx
- type UTXO
- type Wallet
- func (w *Wallet) AddUTXO(utxo *UTXO)
- func (w *Wallet) CreateTransferTx(to ids.ShortID, assetID ids.ID, amount uint64, memo []byte) (*TransferTx, error)
- func (w *Wallet) GenerateKey() (ids.ShortID, error)
- func (w *Wallet) GetAddress() (ids.ShortID, error)
- func (w *Wallet) GetAllAddresses() []ids.ShortID
- func (w *Wallet) GetBLSKey() (*bls.SecretKey, error)
- func (w *Wallet) GetBalance(assetID ids.ID) uint64
- func (w *Wallet) GetUTXOs(assetID ids.ID, amount uint64) ([]*UTXO, uint64, error)
- func (w *Wallet) ImportKey(privateKey crypto.PrivateKey) (ids.ShortID, error)
- func (w *Wallet) RemoveUTXO(utxoID ids.ID)
- func (w *Wallet) SetBLSKey(key *bls.SecretKey)
- func (w *Wallet) Sign(ctx context.Context, tx chain.Transaction) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type TransferInput ¶
TransferInput represents an input to a transfer transaction
type TransferOutput ¶
TransferOutput represents an output from a transfer transaction
type TransferTx ¶
type TransferTx struct {
NetworkID uint32
ChainID ids.ID
Inputs []TransferInput
Outputs []TransferOutput
Memo []byte
}
TransferTx represents a transfer transaction
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet manages keys and transactions for personal usage
func (*Wallet) CreateTransferTx ¶
func (w *Wallet) CreateTransferTx( to ids.ShortID, assetID ids.ID, amount uint64, memo []byte, ) (*TransferTx, error)
CreateTransferTx creates a transfer transaction
func (*Wallet) GenerateKey ¶
GenerateKey generates a new key and adds it to the wallet
func (*Wallet) GetAddress ¶
GetAddress returns a wallet address
func (*Wallet) GetAllAddresses ¶
GetAllAddresses returns all wallet addresses
func (*Wallet) GetBalance ¶
GetBalance returns the balance for a specific asset
func (*Wallet) RemoveUTXO ¶
RemoveUTXO removes a UTXO from the wallet
Click to show internal directories.
Click to hide internal directories.