client

package
v0.0.0-...-397cea1 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseQueryResponse

func ParseQueryResponse(bz []byte) (sdk.SimulationResponse, error)

func ReadTxFromFile

func ReadTxFromFile(ctx client.Context, filename string) (tx sdk.Tx, err error)

ReadTxFromFile read and decode a StdTx from the given filename. Can pass "-" to read from stdin.

func ReadTxsFromFile

func ReadTxsFromFile(ctx client.Context, filename string) (txs []sdk.Tx, err error)

ReadTxsFromFile read and decode a multi transactions (must be in Txs format) from the given filename. Can pass "-" to read from stdin.

func SignTx

func SignTx(txFactory tx.Factory, clientCtx client.Context, name string, txBuilder client.TxBuilder, offline, overwriteSig bool) error

SignTx signs a transaction managed by the TxBuilder using a `name` key stored in Keybase. The new signature is appended to the TxBuilder when overwrite=false or overwritten otherwise. Don't perform online validation or lookups if offline is true.

func SignTxWithSignerAddress

func SignTxWithSignerAddress(txFactory tx.Factory, clientCtx client.Context, addr sdk.AccAddress,
	name string, txBuilder client.TxBuilder, offline, overwrite bool,
) (err error)

SignTxWithSignerAddress attaches a signature to a transaction. Don't perform online validation or lookups if offline is true, else populate account and sequence numbers from a foreign account. This function should only be used when signing with a multisig. For normal keys, please use SignTx directly.

Types

type BatchScanner

type BatchScanner struct {
	*bufio.Scanner
	// contains filtered or unexported fields
}

BatchScanner provides a convenient interface for reading batch data such as a file of newline-delimited JSON encoded StdTx.

func NewBatchScanner

func NewBatchScanner(cfg client.TxConfig, r io.Reader) *BatchScanner

NewBatchScanner returns a new BatchScanner to read newline-delimited StdTx transactions from r.

func ReadTxsFromInput

func ReadTxsFromInput(txCfg client.TxConfig, filenames ...string) (scanner *BatchScanner, err error)

ReadTxsFromInput reads multiples txs from the given filename(s). Can pass "-" to read from stdin. Unlike ReadTxFromFile, this function does not decode the txs.

func (*BatchScanner) Scan

func (bs *BatchScanner) Scan() bool

Scan advances the Scanner to the next line.

func (BatchScanner) Tx

func (bs BatchScanner) Tx() sdk.Tx

Tx returns the most recent Tx unmarshalled by a call to Scan.

func (BatchScanner) UnmarshalErr

func (bs BatchScanner) UnmarshalErr() error

UnmarshalErr returns the first unmarshalling error that was encountered by the scanner.

type GasEstimateResponse

type GasEstimateResponse struct {
	GasEstimate uint64 `json:"gas_estimate" yaml:"gas_estimate"`
}

GasEstimateResponse defines a response definition for tx gas estimation.

func (GasEstimateResponse) String

func (gr GasEstimateResponse) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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