tx

package
v0.0.0-...-9d09d82 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package tx carries the logic to create, sign and broadcast transactions to a Cosmos SDK based blockchain.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeDefaultTxConfig

func MakeDefaultTxConfig() (sdkclient.TxConfig, error)

Types

type Client

type Client interface {
	SendTx(ctx context.Context, transaction Transaction) (*sdk.TxResponse, error)
}

func NewClient

func NewClient(authClient authtypes.QueryClient, txServiceClient tx.ServiceClient, chainID string) Client

type Option

type Option func(*transaction)

func WithFeeAmount

func WithFeeAmount(amount types.Coins) Option

func WithGasLimit

func WithGasLimit(limit uint64) Option

func WithMemo

func WithMemo(memo string) Option

func WithMsgs

func WithMsgs(msgs ...types.Msg) Option

func WithSigner

func WithSigner(signer keys.Keyring) Option

type Transaction

type Transaction interface {
	Sender() string
	GetSignedTx(ctx context.Context, accNum, accSeq uint64, chainID string) ([]byte, error)
}

func NewTransaction

func NewTransaction(txConfig sdkclient.TxConfig, opts ...Option) Transaction

Jump to

Keyboard shortcuts

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