wallet

package
v0.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2023 License: MIT Imports: 13 Imported by: 11

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Wallet

type Wallet struct {
	TxConfig sdkclient.TxConfig
	Client   *client.Client
	// 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.Client, txConfig sdkclient.TxConfig) (*Wallet, error)

NewWallet allows to build a new Wallet instance

func (*Wallet) AccAddress

func (w *Wallet) AccAddress() string

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) (*sdk.TxResponse, 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) (*sdk.TxResponse, 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) (*sdk.TxResponse, error)

BroadcastTxSync creates and signs a transaction with the provided messages and fees, then broadcasts it using the sync method

func (*Wallet) BuildTx

func (w *Wallet) BuildTx(data *types.TransactionData) (sdkclient.TxBuilder, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL