tx

package
v0.50.10-lsm Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2024 License: Apache-2.0 Imports: 25 Imported by: 308

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBankKeeperCoinMetadataQueryFn added in v0.50.1

func NewBankKeeperCoinMetadataQueryFn(bk BankKeeper) textual.CoinMetadataQueryFn

NewBankKeeperCoinMetadataQueryFn creates a new Textual struct using the given BankKeeper to retrieve coin metadata.

This function should be used in the server (app.go) and is already injected thanks to app wiring for app_v2.

func NewGRPCCoinMetadataQueryFn added in v0.50.1

func NewGRPCCoinMetadataQueryFn(grpcConn grpc.ClientConnInterface) textual.CoinMetadataQueryFn

NewGRPCCoinMetadataQueryFn returns a new Textual instance where the metadata queries are done via gRPC using the provided GRPC client connection. In the SDK, you can pass a client.Context as the GRPC connection.

Example:

clientCtx := client.GetClientContextFromCmd(cmd)
txt := tx.NewTextualWithGRPCConn(clientCtx)

This should be used in the client (root.go) of an application.

func ProvideProtoRegistry added in v0.50.1

func ProvideProtoRegistry() txsigning.ProtoFileResolver

Types

type BankKeeper added in v0.50.1

type BankKeeper interface {
	DenomMetadata(c context.Context, req *types.QueryDenomMetadataRequest) (*types.QueryDenomMetadataResponse, error)
}

BankKeeper defines the contract needed for tx-related APIs

type ModuleInputs added in v0.50.1

type ModuleInputs struct {
	depinject.In

	Config                *txconfigv1.Config
	AddressCodec          address.Codec
	ValidatorAddressCodec runtime.ValidatorAddressCodec
	Codec                 codec.Codec
	ProtoFileResolver     txsigning.ProtoFileResolver
	// BankKeeper is the expected bank keeper to be passed to AnteHandlers
	BankKeeper             authtypes.BankKeeper               `optional:"true"`
	MetadataBankKeeper     BankKeeper                         `optional:"true"`
	AccountKeeper          ante.AccountKeeper                 `optional:"true"`
	FeeGrantKeeper         ante.FeegrantKeeper                `optional:"true"`
	CustomSignModeHandlers func() []txsigning.SignModeHandler `optional:"true"`
	CustomGetSigners       []txsigning.CustomGetSigner        `optional:"true"`
}

type ModuleOutputs added in v0.50.1

type ModuleOutputs struct {
	depinject.Out

	TxConfig        client.TxConfig
	TxConfigOptions tx.ConfigOptions
	BaseAppOption   runtime.BaseAppOption
}

func ProvideModule

func ProvideModule(in ModuleInputs) ModuleOutputs

Jump to

Keyboard shortcuts

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