client

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0, Apache-2.0 Imports: 23 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigCmd

func ConfigCmd(defaultCLIHome string) *cobra.Command

ConfigCmd returns a CLI command to interactively create an application CLI config file.

func Paginate

func Paginate(numObjs, page, limit, defLimit int) (start, end int)

Paginate returns the correct starting and ending index for a paginated query, given that client provides a desired page and limit of objects and the handler provides the total number of objects. If the start page is invalid, non-positive values are returned signaling the request is invalid.

NOTE: The start page is assumed to be 1-indexed.

func ReadPageRequest added in v1.3.0

func ReadPageRequest(flagSet *pflag.FlagSet) (*query.PageRequest, error)

ReadPageRequest reads and builds the necessary page request flags for pagination.

func RegisterRoutes

func RegisterRoutes(cliCtx context.CLIContext, r *mux.Router)

Register routes

func ValidateCmd

func ValidateCmd(cmd *cobra.Command, args []string) error

ValidateCmd returns unknown command error or Help display if help flag set

Types

type Account added in v1.3.0

type Account interface {
	GetAddress() sdk.AccAddress
	GetPubKey() crypto.PubKey // can return nil.
	GetAccountNumber() uint64
	GetSequence() uint64
}

Account defines a read-only version of the auth module's AccountI.

type AccountRetriever added in v1.3.0

type AccountRetriever interface {
	GetAccount(clientCtx clictx.CLIContext, addr sdk.AccAddress) (Account, error)
	GetAccountWithHeight(clientCtx clictx.CLIContext, addr sdk.AccAddress) (Account, int64, error)
	EnsureExists(clientCtx clictx.CLIContext, addr sdk.AccAddress) error
	GetAccountNumberSequence(clientCtx clictx.CLIContext, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error)
}

AccountRetriever defines the interfaces required by transactions to ensure an account exists and to be able to query for account fields necessary for signing.

type TxBuilder added in v1.3.0

type TxBuilder interface {
	GetTx() signingtypes.Tx

	SetMsgs(msgs ...ibcmsg.Msg) error
	SetSignatures(signatures ...signing.SignatureV2) error
	SetMemo(memo string)
	SetFeeAmount(amount sdk.CoinAdapters)
	SetGasLimit(limit uint64)
	SetTimeoutHeight(height uint64)
	SetFeeGranter(feeGranter sdk.AccAddress)
}

TxBuilder defines an interface which an application-defined concrete transaction type must implement. Namely, it must be able to set messages, generate signatures, and provide canonical bytes to sign over. The transaction must also know how to encode itself.

type TxConfig added in v1.3.0

type TxConfig interface {
	TxEncodingConfig

	NewTxBuilder() TxBuilder
	WrapTxBuilder(tx ibcmsg.Tx) (TxBuilder, error)
	SignModeHandler() signingtypes.SignModeHandler
}

TxConfig defines an interface a client can utilize to generate an application-defined concrete transaction type. The type returned must implement TxBuilder.

type TxEncodingConfig added in v1.3.0

type TxEncodingConfig interface {
	TxEncoder() ibcmsg.IBCTxEncoder
	TxDecoder() ibcmsg.IbcTxDecoder
	TxJSONEncoder() ibcmsg.IBCTxEncoder
	//TxJSONDecoder() sdk.TxDecoder
	MarshalSignatureJSON([]signing.SignatureV2) ([]byte, error)

	UnmarshalSignatureJSON([]byte) ([]signing.SignatureV2, error)
}

TxEncodingConfig defines an interface that contains transaction encoders and decoders

Directories

Path Synopsis
grpc
reflection
Package reflection is a reverse proxy.
Package reflection is a reverse proxy.
lcd
statik
Package statik contains static assets.
Package statik contains static assets.

Jump to

Keyboard shortcuts

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