Documentation ¶
Index ¶
- type Client
- type Wallet
- func (w *Wallet) AccAddress() string
- func (w *Wallet) BroadcastTxAsync(data *types.TransactionData) (types.TransactionResponse, error)
- func (w *Wallet) BroadcastTxCommit(data *types.TransactionData) (types.TransactionResponse, error)
- func (w *Wallet) BroadcastTxSync(data *types.TransactionData) (types.TransactionResponse, error)
- func (w *Wallet) BuildTx(data *types.TransactionData) (sdk.AccountI, sdkclient.TxBuilder, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { GetTxConfig() sdkclient.TxConfig GetAccountPrefix() string GetChainID() (string, error) GetAccount(address string) (sdk.AccountI, error) GetFees(gas int64) sdk.Coins SimulateTx(tx signing.Tx) (uint64, error) BroadcastTxAsync(tx signing.Tx) (*sdk.TxResponse, error) BroadcastTxSync(tx signing.Tx) (*sdk.TxResponse, error) BroadcastTxCommit(tx signing.Tx) (*sdk.TxResponse, error) }
type Wallet ¶
type Wallet struct {
// contains filtered or unexported fields
}
Wallet represents a Cosmos wallet that should be used to create and send transactions to the chain
func NewWallet ¶
func NewWallet(accountCfg *types.AccountConfig, client Client) (*Wallet, error)
NewWallet allows to build a new Wallet instance
func (*Wallet) AccAddress ¶
AccAddress returns the address of the account that is going to be used to sign the transactions
func (*Wallet) BroadcastTxAsync ¶
func (w *Wallet) BroadcastTxAsync(data *types.TransactionData) (types.TransactionResponse, error)
BroadcastTxAsync creates and signs a transaction with the provided messages and fees, then broadcasts it using the async method
func (*Wallet) BroadcastTxCommit ¶
func (w *Wallet) BroadcastTxCommit(data *types.TransactionData) (types.TransactionResponse, error)
BroadcastTxCommit creates and signs a transaction with the provided messages and fees, then broadcasts it using the commit method
func (*Wallet) BroadcastTxSync ¶
func (w *Wallet) BroadcastTxSync(data *types.TransactionData) (types.TransactionResponse, error)
BroadcastTxSync creates and signs a transaction with the provided messages and fees, then broadcasts it using the sync method
Click to show internal directories.
Click to hide internal directories.