Documentation ¶
Index ¶
- type Client
- func (c *Client) Close()
- func (c *Client) CreateWallet(name, password string) (*Wallet, string, error)
- func (c *Client) DeleteWallet(id string) error
- func (c *Client) RestoreWallet(name, password, mnemonic string) (*Wallet, error)
- func (c *Client) SaveWallet(w *Wallet) error
- func (c *Client) Wallet(id string) (*Wallet, error)
- func (c *Client) Wallets() ([]*Wallet, error)
- type DB
- type Options
- type Wallet
- func (w *Wallet) AddAddress() (cardano.Address, error)
- func (w *Wallet) Addresses() ([]cardano.Address, error)
- func (w *Wallet) Balance() (*cardano.Value, error)
- func (w *Wallet) Keys() (crypto.PrvKey, crypto.PrvKey)
- func (w *Wallet) Transfer(receiver cardano.Address, amount *cardano.Value) (*cardano.Hash32, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a clean interface for creating, saving and deleting Wallets.
func NewClient ¶
NewClient builds a new Client using cardano-cli as the default connection to the Blockhain.
It uses BadgerDB as the default Wallet storage.
func (*Client) CreateWallet ¶
CreateWallet creates a new Wallet using a secure entropy and password, returning a Wallet with its corresponding 24 word mnemonic
func (*Client) DeleteWallet ¶
DeleteWallet removes a Wallet with the given id from the Client's storage.
func (*Client) RestoreWallet ¶
RestoreWallet restores a Wallet from a mnemonic and password.
func (*Client) SaveWallet ¶
SaveWallet saves a Wallet in the Client's storage.
Click to show internal directories.
Click to hide internal directories.