client

package
v0.2.1-alpha.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2023 License: AGPL-3.0 Imports: 36 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthQueryClient

type AuthQueryClient = authtypes.QueryClient

AuthQueryClient is a type to define the auth types Query Client

type AuthzQueryClient

type AuthzQueryClient = authztypes.QueryClient

AuthzQueryClient is a type to define the authz types Query Client

type BankQueryClient

type BankQueryClient = banktypes.QueryClient

BankQueryClient is a type to define the bank types Query Client

type BridgeQueryClient

type BridgeQueryClient = bridgetypes.QueryClient

BridgeQueryClient is a type to define the bridge types Query Client

type ChallengeQueryClient added in v0.0.7

type ChallengeQueryClient = challengetypes.QueryClient

ChallengeQueryClient is a type to define the challenge types Query Client

type CrosschainQueryClient

type CrosschainQueryClient = crosschaintypes.QueryClient

CrosschainQueryClient is a type to define the crosschain types Query Client

type DistrQueryClient

type DistrQueryClient = distrtypes.QueryClient

DistrQueryClient is a type to define the distribution types Query Client

type FeegrantQueryClient

type FeegrantQueryClient = feegranttypes.QueryClient

FeegrantQueryClient is a type to define the feegrant types Query Client

type GashubQueryClient

type GashubQueryClient = gashubtypes.QueryClient

GashubQueryClient is a type to define the gashub types Query Client

type GovQueryClientV1

type GovQueryClientV1 = govv1.QueryClient

GovQueryClientV1 is a type to define the governance types Query Client V1

type GreenfieldClient

type GreenfieldClient struct {
	// AuthQueryClient holds the auth query client.
	AuthQueryClient
	// AuthzQueryClient holds the authz query client.
	AuthzQueryClient
	// BankQueryClient holds the bank query client.
	BankQueryClient
	// ChallengeQueryClient holds the bank query client.
	ChallengeQueryClient
	// CrosschainQueryClient holds the crosschain query client.
	CrosschainQueryClient
	// DistrQueryClient holds the distr query client.
	DistrQueryClient
	// FeegrantQueryClient holds the feegrant query client.
	FeegrantQueryClient
	// GashubQueryClient holds the gashub query client.
	GashubQueryClient
	// PaymentQueryClient holds the payment query client.
	PaymentQueryClient
	// SpQueryClient holds the sp query client.
	SpQueryClient
	// BridgeQueryClient holds the bridge query client.
	BridgeQueryClient
	// StorageQueryClient holds the storage query client.
	StorageQueryClient
	// GovQueryClientV1 holds the gov query client V1.
	GovQueryClientV1
	// OracleQueryClient holds the oracle query client.
	OracleQueryClient
	// SlashingQueryClient holds the slashing query client.
	SlashingQueryClient
	// StakingQueryClient holds the staking query client.
	StakingQueryClient
	// UpgradeQueryClient holds the upgrade query client.
	UpgradeQueryClient
	// TxClient holds the tx service client.
	TxClient
	// TmService holds the tendermint service client
	TmClient
	// contains filtered or unexported fields
}

GreenfieldClient holds all necessary information for creating/querying transactions.

func NewGreenfieldClient

func NewGreenfieldClient(rpcAddr, chainId string, opts ...GreenfieldClientOption) (*GreenfieldClient, error)

NewGreenfieldClient is used to create a new GreenfieldClient structure.

func (*GreenfieldClient) BroadcastTx

func (c *GreenfieldClient) BroadcastTx(ctx context.Context, msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.BroadcastTxResponse, error)

BroadcastTx signs and broadcasts a tx with simulated gas(if not provided in txOpt)

func (*GreenfieldClient) GetChainId

func (c *GreenfieldClient) GetChainId() (string, error)

GetChainId returns the chain ID set in the GreenfieldClient structure.

func (*GreenfieldClient) GetCodec added in v0.1.2

func (c *GreenfieldClient) GetCodec() *codec.ProtoCodec

func (*GreenfieldClient) GetKeyManager

func (c *GreenfieldClient) GetKeyManager() (keys.KeyManager, error)

GetKeyManager returns the key manager set in the GreenfieldClient structure.

func (*GreenfieldClient) GetNonce added in v0.0.7

func (c *GreenfieldClient) GetNonce() (uint64, error)

func (*GreenfieldClient) SetChainId

func (c *GreenfieldClient) SetChainId(id string)

SetChainId sets the chain ID in the GreenfieldClient structure.

func (*GreenfieldClient) SetKeyManager

func (c *GreenfieldClient) SetKeyManager(keyManager keys.KeyManager)

SetKeyManager sets a key manager in the GreenfieldClient structure.

func (*GreenfieldClient) SignTx

func (c *GreenfieldClient) SignTx(ctx context.Context, msgs []sdk.Msg, txOpt *types.TxOption) ([]byte, error)

SignTx signs the tx with private key and returns bytes

func (*GreenfieldClient) SimulateTx

func (c *GreenfieldClient) SimulateTx(ctx context.Context, msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.SimulateResponse, error)

SimulateTx simulates a tx and gets Gas info

type GreenfieldClientOption

type GreenfieldClientOption interface {
	Apply(*GreenfieldClient)
}

GreenfieldClientOption configures how we set up the greenfield client.

func WithGrpcConnectionAndDialOption added in v0.1.2

func WithGrpcConnectionAndDialOption(grpcAddr string, opts ...grpc.DialOption) GreenfieldClientOption

WithGrpcConnectionAndDialOption returns a GreenfieldClientOption which configures a grpc client connection with grpc dail options.

func WithKeyManager

func WithKeyManager(km keys.KeyManager) GreenfieldClientOption

WithKeyManager returns a GreenfieldClientOption which configures a client key manager option.

type GreenfieldClientOptionFunc

type GreenfieldClientOptionFunc func(*GreenfieldClient)

GreenfieldClientOptionFunc defines an applied function for setting the greenfield client.

func (GreenfieldClientOptionFunc) Apply

Apply set up the option field to the client instance.

type OracleQueryClient

type OracleQueryClient = oracletypes.QueryClient

OracleQueryClient is a type to define the oracle types Query Client

type PaymentQueryClient

type PaymentQueryClient = paymenttypes.QueryClient

PaymentQueryClient is a type to define the payment types Query Client

type SlashingQueryClient

type SlashingQueryClient = slashingtypes.QueryClient

SlashingQueryClient is a type to define the slashing types Query Client

type SpQueryClient

type SpQueryClient = sptypes.QueryClient

SpQueryClient is a type to define the sp types Query Client

type StakingQueryClient

type StakingQueryClient = stakingtypes.QueryClient

StakingQueryClient is a type to define the staking types Query Client

type StorageQueryClient

type StorageQueryClient = storagetypes.QueryClient

StorageQueryClient is a type to define the storage types Query Client

type TendermintClient

type TendermintClient struct {
	TmClient client.Client
}

func NewTendermintClient

func NewTendermintClient(addr string) TendermintClient

type TmClient added in v0.1.2

type TmClient = tmservice.ServiceClient

TmClient is a type to define the tendermint service client

type TransactionClient

type TransactionClient interface {
	BroadcastTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.BroadcastTxResponse, error)
	SimulateTx(msgs []sdk.Msg, txOpt *types.TxOption, opts ...grpc.CallOption) (*tx.SimulateResponse, error)
	SignTx(msgs []sdk.Msg, txOpt *types.TxOption) ([]byte, error)
	GetNonce() (uint64, error)
}

type TxClient

type TxClient = tx.ServiceClient

TxClient is a type to define the tx Service Client

type UpgradeQueryClient

type UpgradeQueryClient = upgradetypes.QueryClient

UpgradeQueryClient is a type to define the upgrade types Query Client

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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