Documentation ¶
Overview ¶
APACHE NOTICE Sourced with modifications from https://github.com/strangelove-ventures/lens
APACHE NOTICE Sourced with modifications from https://github.com/strangelove-ventures/lens
APACHE NOTICE Sourced with modifications from https://github.com/strangelove-ventures/lens
APACHE NOTICE Sourced with modifications from https://github.com/strangelove-ventures/lens
Index ¶
- Variables
- func GetHeightFromMetadata(md metadata.MD) (int64, error)
- func GetProveFromMetadata(md metadata.MD) (bool, error)
- func NewRPCClient(addr string, timeout time.Duration) (*rpchttp.HTTP, error)
- func RegisterOsmosisInterfaces(registry types.InterfaceRegistry)
- func RegisterTendermintLiquidityInterfaces(aminoCodec *codec.LegacyAmino, registry types.InterfaceRegistry)
- func SetHeightOnContext(ctx context.Context, height int64) context.Context
- func SetProveOnContext(ctx context.Context, prove bool) context.Context
- type ChainClient
- func (cc *ChainClient) Init() error
- func (cc *ChainClient) Invoke(ctx context.Context, method string, req, reply interface{}, ...) (err error)
- func (cc *ChainClient) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)
- func (cc *ChainClient) QueryABCI(req abci.RequestQuery) (abci.ResponseQuery, error)
- func (cc *ChainClient) RunGRPCQuery(ctx context.Context, method string, req interface{}, md metadata.MD) (abci.ResponseQuery, metadata.MD, error)
- type ChainClientConfig
- type Codec
Constants ¶
This section is empty.
Variables ¶
var ( // Provides a default set of AppModuleBasics that are included in the ChainClientConfig // This is used to provide a default set of modules that will be used for protobuf registration and in-app decoding of RPC responses DefaultModuleBasics = []module.AppModuleBasic{ auth.AppModuleBasic{}, authz.AppModuleBasic{}, bank.AppModuleBasic{}, capability.AppModuleBasic{}, gov.AppModuleBasic{}, crisis.AppModuleBasic{}, distribution.AppModuleBasic{}, feegrant.AppModuleBasic{}, mint.AppModuleBasic{}, params.AppModuleBasic{}, slashing.AppModuleBasic{}, staking.AppModuleBasic{}, vesting.AppModuleBasic{}, wasm.AppModuleBasic{}, ibc.AppModuleBasic{}, ibcTransfer.AppModuleBasic{}, ibcTm.AppModuleBasic{}, } )
Functions ¶
func RegisterOsmosisInterfaces ¶
func RegisterOsmosisInterfaces(registry types.InterfaceRegistry)
Split out from base codec to not include explicitly. Should be included only when needed.
func RegisterTendermintLiquidityInterfaces ¶
func RegisterTendermintLiquidityInterfaces(aminoCodec *codec.LegacyAmino, registry types.InterfaceRegistry)
Split out from base codec to not include explicitly. Should be included only when needed.
func SetHeightOnContext ¶
Types ¶
type ChainClient ¶
type ChainClient struct { Config *ChainClientConfig Keybase keyring.Keyring KeyringOptions []keyring.Option RPCClient rpcclient.Client Input io.Reader Output io.Writer Codec Codec Logger log.Logger }
func NewChainClient ¶
func NewChainClient(ccc *ChainClientConfig, homepath string, input io.Reader, output io.Writer, kro ...keyring.Option) (*ChainClient, error)
func (*ChainClient) Init ¶
func (cc *ChainClient) Init() error
func (*ChainClient) Invoke ¶
func (cc *ChainClient) Invoke(ctx context.Context, method string, req, reply interface{}, opts ...grpc.CallOption) (err error)
Invoke implements the grpc ClientConn.Invoke method, but only for querying state
func (*ChainClient) NewStream ¶
func (cc *ChainClient) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error)
NewStream implements the grpc ClientConn.NewStream method
func (*ChainClient) QueryABCI ¶
func (cc *ChainClient) QueryABCI(req abci.RequestQuery) (abci.ResponseQuery, error)
func (*ChainClient) RunGRPCQuery ¶
func (cc *ChainClient) RunGRPCQuery(ctx context.Context, method string, req interface{}, md metadata.MD) (abci.ResponseQuery, metadata.MD, error)
RunGRPCQuery runs a gRPC query from the clientCtx, given all necessary arguments for the gRPC method, and returns the ABCI response. It is used to factorize code between client (Invoke) and server (RegisterGRPCServer) gRPC handlers.
type ChainClientConfig ¶
type ChainClientConfig struct { Key string `json:"key" yaml:"key"` ChainID string `json:"chain-id" yaml:"chain-id"` RPCAddr string `json:"rpc-addr" yaml:"rpc-addr"` AccountPrefix string `json:"account-prefix" yaml:"account-prefix"` KeyringBackend string `json:"keyring-backend" yaml:"keyring-backend"` KeyDirectory string `json:"key-directory" yaml:"key-directory"` Debug bool `json:"debug" yaml:"debug"` Timeout string `json:"timeout" yaml:"timeout"` OutputFormat string `json:"output-format" yaml:"output-format"` Modules []module.AppModuleBasic `json:"-" yaml:"-"` CustomMsgTypeRegistry map[string]sdkTypes.Msg `json:"-" yaml:"-"` }
type Codec ¶
type Codec struct { ProbeInterfaceRegistry *probeCodecTypes.ProbeInterfaceRegistry InterfaceRegistry types.InterfaceRegistry Marshaler codec.Codec TxConfig client.TxConfig Amino *codec.LegacyAmino }
func MakeCodecConfig ¶
func MakeCodecConfig() Codec
Directories ¶
Path | Synopsis |
---|---|
codec
|
|
types
Sourced with modifications from https://github.com/cosmos/cosmos-sdk/blob/d1b5b0c5ae2c51206cc1849e09e4d59986742cc3/codec/types/interface_registry.go
|
Sourced with modifications from https://github.com/cosmos/cosmos-sdk/blob/d1b5b0c5ae2c51206cc1849e09e4d59986742cc3/codec/types/interface_registry.go |