Versions in this module Expand all Collapse all v0 v0.1.0 Mar 23, 2023 Changes in this version + const ErrTimeoutAfterWaitingForTxBroadcast + var ModuleBasics = []module.AppModuleBasic + var RtyAtt = retry.Attempts(RtyAttNum) + var RtyAttNum = uint(5) + var RtyDel = retry.Delay(time.Millisecond * 400) + var RtyErr = retry.LastErrorOnly(true) + var SupportedAlgorithms = keyring.SigningAlgoList + var SupportedAlgorithmsLedger = keyring.SigningAlgoList + func BuildSimTx(info *keyring.Record, txf tx.Factory, msgs ...sdk.Msg) ([]byte, error) + func CreateMnemonic() (string, error) + func DefaultPageRequest() *query.PageRequest + func GetHeightFromMetadata(md metadata.MD) (int64, error) + func GetProveFromMetadata(md metadata.MD) (bool, error) + func LensKeyringAlgoOptions() keyring.Option + func NewRPCClient(addr string, timeout time.Duration) (*rpchttp.HTTP, error) + func SetHeightOnContext(ctx context.Context, height int64) context.Context + func SetProveOnContext(ctx context.Context, prove bool) context.Context + type ChainClient struct + Codec Codec + Config *ChainClientConfig + Input io.Reader + Keybase keyring.Keyring + KeyringOptions []keyring.Option + LightProvider provtypes.Provider + Output io.Writer + RPCClient rpcclient.Client + func NewChainClient(log *zap.Logger, ccc *ChainClientConfig, homepath string, input io.Reader, ...) (*ChainClient, error) + func (cc *ChainClient) AccountFromKeyOrAddress(keyOrAddress string) (out sdk.AccAddress, err error) + func (cc *ChainClient) AddKey(name string, coinType uint32) (output *KeyOutput, err error) + func (cc *ChainClient) BroadcastTx(ctx context.Context, tx []byte) (*sdk.TxResponse, error) + func (cc *ChainClient) CalculateGas(ctx context.Context, txf tx.Factory, msgs ...sdk.Msg) (txtypes.SimulateResponse, uint64, error) + func (cc *ChainClient) CreateKeystore(path string) error + func (cc *ChainClient) DecodeBech32AccAddr(addr string) (sdk.AccAddress, error) + func (cc *ChainClient) DecodeBech32AccPub(addr string) (sdk.AccAddress, error) + func (cc *ChainClient) DecodeBech32ConsAddr(addr string) (sdk.AccAddress, error) + func (cc *ChainClient) DecodeBech32ConsPub(addr string) (sdk.AccAddress, error) + func (cc *ChainClient) DecodeBech32ValAddr(addr string) (sdk.ValAddress, error) + func (cc *ChainClient) DecodeBech32ValPub(addr string) (sdk.AccAddress, error) + func (cc *ChainClient) DeleteKey(name string) error + func (cc *ChainClient) EncodeBech32AccAddr(addr sdk.AccAddress) (string, error) + func (cc *ChainClient) EncodeBech32AccPub(addr sdk.AccAddress) (string, error) + func (cc *ChainClient) EncodeBech32ConsAddr(addr sdk.AccAddress) (string, error) + func (cc *ChainClient) EncodeBech32ConsPub(addr sdk.AccAddress) (string, error) + func (cc *ChainClient) EncodeBech32ValAddr(addr sdk.ValAddress) (string, error) + func (cc *ChainClient) EncodeBech32ValPub(addr sdk.AccAddress) (string, error) + func (cc *ChainClient) EnsureExists(clientCtx client.Context, addr sdk.AccAddress) error + func (cc *ChainClient) ExportPrivKeyArmor(keyName string) (armor string, err error) + func (cc *ChainClient) GetAccount(clientCtx client.Context, addr sdk.AccAddress) (client.Account, error) + func (cc *ChainClient) GetAccountNumberSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, uint64, error) + func (cc *ChainClient) GetAccountWithHeight(clientCtx client.Context, addr sdk.AccAddress) (client.Account, int64, error) + func (cc *ChainClient) GetKeyAddress() (sdk.AccAddress, error) + func (cc *ChainClient) HandleAndPrintMsgSend(res *sdk.TxResponse, err error) error + func (cc *ChainClient) Init() error + func (cc *ChainClient) Invoke(ctx context.Context, method string, req, reply interface{}, ...) (err error) + func (cc *ChainClient) KeyAddOrRestore(keyName string, coinType uint32, mnemonic ...string) (*KeyOutput, error) + func (cc *ChainClient) KeyExists(name string) bool + func (cc *ChainClient) KeystoreCreated(path string) bool + func (cc *ChainClient) ListAddresses() (map[string]string, error) + func (cc *ChainClient) MarshalProto(res proto.Message) ([]byte, error) + func (cc *ChainClient) MustEncodeAccAddr(addr sdk.AccAddress) string + func (cc *ChainClient) MustEncodeValAddr(addr sdk.ValAddress) string + func (cc *ChainClient) NewStream(context.Context, *grpc.StreamDesc, string, ...grpc.CallOption) (grpc.ClientStream, error) + func (cc *ChainClient) PrepareFactory(txf tx.Factory) (tx.Factory, error) + func (cc *ChainClient) PrintObject(res interface{}) error + func (cc *ChainClient) PrintTxResponse(res *sdk.TxResponse) error + func (cc *ChainClient) QueryABCI(ctx context.Context, req abci.RequestQuery) (abci.ResponseQuery, error) + func (cc *ChainClient) QueryAccount(ctx context.Context, address sdk.AccAddress) (authtypes.AccountI, error) + func (cc *ChainClient) QueryBalanceWithDenomTraces(ctx context.Context, address sdk.AccAddress, pageReq *query.PageRequest) (sdk.Coins, error) + func (cc *ChainClient) QueryDelegatorValidators(ctx context.Context, address sdk.AccAddress) ([]string, error) + func (cc *ChainClient) QueryDenomsMetadata(ctx context.Context, pageReq *query.PageRequest) (*bankTypes.QueryDenomsMetadataResponse, error) + func (cc *ChainClient) QueryDistributionCommission(ctx context.Context, address sdk.ValAddress) (sdk.DecCoins, error) + func (cc *ChainClient) QueryDistributionCommunityPool(ctx context.Context) (sdk.DecCoins, error) + func (cc *ChainClient) QueryDistributionParams(ctx context.Context) (*distTypes.Params, error) + func (cc *ChainClient) QueryDistributionRewards(ctx context.Context, delegatorAddress sdk.AccAddress, ...) (sdk.DecCoins, error) + func (cc *ChainClient) QueryDistributionSlashes(ctx context.Context, validatorAddress sdk.ValAddress, ...) (*distTypes.QueryValidatorSlashesResponse, error) + func (cc *ChainClient) QueryDistributionValidatorRewards(ctx context.Context, validatorAddress sdk.ValAddress) (sdk.DecCoins, error) + func (cc *ChainClient) QueryTotalSupply(ctx context.Context, pageReq *query.PageRequest) (*bankTypes.QueryTotalSupplyResponse, error) + func (cc *ChainClient) QueryTx(ctx context.Context, hashHex string, prove bool) (*ctypes.ResultTx, error) + func (cc *ChainClient) QueryTxs(ctx context.Context, page, limit int, events []string) ([]*ctypes.ResultTx, error) + func (cc *ChainClient) RestoreKey(name, mnemonic string, coinType uint32) (address string, err error) + func (cc *ChainClient) RunGRPCQuery(ctx context.Context, method string, req interface{}, md metadata.MD) (abci.ResponseQuery, metadata.MD, error) + func (cc *ChainClient) SendMsg(ctx context.Context, msg sdk.Msg, memo string) (*sdk.TxResponse, error) + func (cc *ChainClient) SendMsgs(ctx context.Context, msgs []sdk.Msg, memo string) (*sdk.TxResponse, error) + func (cc *ChainClient) SetSDKContext() func() + func (cc *ChainClient) ShowAddress(name string) (address string, err error) + func (cc *ChainClient) TxFactory() tx.Factory + func (cc *ChainClient) TxServiceBroadcast(ctx context.Context, req *tx.BroadcastTxRequest) (*tx.BroadcastTxResponse, error) + type ChainClientConfig struct + AccountPrefix string + BlockTimeout string + ChainID string + Debug bool + ExtraCodecs []string + GRPCAddr string + GasAdjustment float64 + GasPrices string + Key string + KeyDirectory string + KeyringBackend string + MinGasAmount uint64 + Modules []module.AppModuleBasic + OutputFormat string + RPCAddr string + SignModeStr string + Slip44 int + Timeout string + func GetCosmosHubConfig(keyHome string, debug bool) *ChainClientConfig + func GetOsmosisConfig(keyHome string, debug bool) *ChainClientConfig + func (ccc *ChainClientConfig) SignMode() signing.SignMode + func (ccc *ChainClientConfig) Validate() error + type Codec struct + Amino *codec.LegacyAmino + InterfaceRegistry types.InterfaceRegistry + Marshaler codec.Codec + TxConfig client.TxConfig + func MakeCodec(moduleBasics []module.AppModuleBasic, extraCodecs []string) Codec + func MakeCodecConfig() Codec + type KeyOutput struct + Address string + Mnemonic string