chain

package
v0.0.0-...-eec4b17 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EnChainBech32Prefix           = "CHAIN_BECH32_PREFIX"
	EnvChainAccountDerivationPath = "CHAIN_ACCOUNT_DERIVATION_PATH"
	EnvChainAccountRecoveryPhrase = "CHAIN_ACCOUNT_RECOVERY_PHRASE"
	EnvChainRPCUrl                = "CHAIN_RPC_URL"
	EnvChainGRPCUrl               = "CHAIN_GRPC_URL"
	EnvChainGasPrice              = "CHAIN_GAS_PRICE"
	EnvChainGasAdjustment         = "CHAIN_GAS_ADJUSTMENT"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*wallet.Wallet
	// contains filtered or unexported fields
}

func NewClient

func NewClient(cfg *Config, txConfig cosmosclient.TxConfig, cdc codec.Codec) (*Client, error)

NewClient returns a new client instance

func NewClientFromEnvVariables

func NewClientFromEnvVariables(txConfig cosmosclient.TxConfig, cdc codec.Codec) (*Client, error)

NewClientFromEnvVariables builds a new Client instance by reading the configuration from the environment variables

func (*Client) HasFeeGrant

func (c *Client) HasFeeGrant(userAddress string, granterAddress string) (bool, error)

HasFeeGrant checks whether the given address already has a fee grant from the given granter

func (*Client) HasFunds

func (c *Client) HasFunds(address string) (bool, error)

HasFunds checks whether the given address has funds or not inside their account

func (*Client) HasGrantedMsgGrantAllowanceAuthorization

func (c *Client) HasGrantedMsgGrantAllowanceAuthorization(appAddress string) (bool, error)

HasGrantedMsgGrantAllowanceAuthorization checks whether the given address has granted a MsgGrantAllowance authorization to the wallet of this client

type Config

type Config struct {
	Account *wallettypes.AccountConfig
	Chain   *wallettypes.ChainConfig
}

func ReadConfigFromEnvVariables

func ReadConfigFromEnvVariables() (*Config, error)

ReadConfigFromEnvVariables reads a Config instance from the env variables values

func (*Config) Validate

func (c *Config) Validate() error

Validate validates the given configuration returning any error

Jump to

Keyboard shortcuts

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