Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Wallet ¶
type Wallet interface { // The wallet configuration WalletConfig() *v1.WalletConfig // Creates a new account CreateAccount(name string, addrPrefix string, networkName string) error // Gets an account by name GetAccount(name string) (account.WalletAccount, error) // Gets Primary account PrimaryAccount() (account.WalletAccount, error) // Gets all accounts ListAccounts() ([]account.WalletAccount, error) // Signs a transaction for Cosmos compatible blockchains SignTx(memo string, msgs ...sdk.Msg) ([]byte, error) }
`Wallet` is an interface that has a method `WalletConfig` that returns a `*v1.WalletConfig` and a method `CreateAccount` that takes a `string`, a `string`, and a `string` and returns an `error`. @property WalletConfig - This is the configuration of the wallet. @property {error} CreateAccount - Creates a new account @property GetAccount - Returns the account with the given name. @property PrimaryAccount - The primary account is the account that is used to sign transactions. @property ListAccounts - Returns a list of all accounts in the wallet
func NewWalletFromConfig ¶
func NewWalletFromConfig(walletConf *v1.WalletConfig) (Wallet, error)
`NewWalletFromConfig` takes a `WalletConfig` and returns a `Wallet` and an error