client

package
v1.12.1 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: GPL-3.0 Imports: 72 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAccountPrefix

func GetAccountPrefix() string

func ParseBase64Event added in v1.12.0

func ParseBase64Event(event abci.Event) (sdk.StringEvent, error)

func SetAccountPrefix

func SetAccountPrefix(prefix string)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

stafihub client

func NewClient

func NewClient(k keyring.Keyring, fromName, gasPrice string, endPointList []string, logger log.Logger) (*Client, error)

func (*Client) BroadcastBatchMsg

func (c *Client) BroadcastBatchMsg(msgs []types.Msg) (string, error)

func (*Client) BroadcastTx

func (c *Client) BroadcastTx(tx []byte) (string, error)

func (*Client) CalculateGas added in v1.0.2

func (c *Client) CalculateGas(txf clientTx.Factory, msgs ...sdk.Msg) (uint64, error)

func (*Client) ChangeEndpoint added in v1.0.0

func (c *Client) ChangeEndpoint()

func (*Client) ConstructAndSignTx

func (c *Client) ConstructAndSignTx(msgs ...types.Msg) ([]byte, error)

func (*Client) Ctx

func (c *Client) Ctx() client.Context

func (*Client) CurrentEndpointIndex added in v1.7.1

func (c *Client) CurrentEndpointIndex() int

func (*Client) GetAccount

func (c *Client) GetAccount() (client.Account, error)

func (*Client) GetBlockResults added in v1.9.1

func (c *Client) GetBlockResults(height int64) (*ctypes.ResultBlockResults, error)

func (*Client) GetBlockTxs

func (c *Client) GetBlockTxs(height int64) ([]*types.TxResponse, error)

func (*Client) GetBlockTxsWithParseErrSkip added in v1.6.1

func (c *Client) GetBlockTxsWithParseErrSkip(height int64) ([]*types.TxResponse, error)

will skip txs that parse failed

func (*Client) GetChainId

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

func (*Client) GetCurrentBlockHeight

func (c *Client) GetCurrentBlockHeight() (int64, error)

func (*Client) GetDenom

func (c *Client) GetDenom() string

func (*Client) GetFromAddress

func (c *Client) GetFromAddress() types.AccAddress

func (*Client) GetFromName

func (c *Client) GetFromName() string

func (*Client) GetLegacyAmino

func (c *Client) GetLegacyAmino() *codec.LegacyAmino

func (*Client) GetRpcClient added in v1.12.0

func (c *Client) GetRpcClient() *rpcClient.Client

func (*Client) GetSequence

func (c *Client) GetSequence(height int64, addr types.AccAddress) (uint64, error)

func (*Client) GetTxConfig

func (c *Client) GetTxConfig() client.TxConfig

func (*Client) GetTxs

func (c *Client) GetTxs(events []string, page, limit int, orderBy string) (*types.SearchTxsResult, error)

func (*Client) GetTxsWithParseErrSkip

func (c *Client) GetTxsWithParseErrSkip(events []string, page, limit int, orderBy string) (*types.SearchTxsResult, int, error)

func (*Client) QueryAccount

func (c *Client) QueryAccount(addr types.AccAddress) (client.Account, error)

func (*Client) QueryActDetail added in v1.9.4

func (c *Client) QueryActDetail(denom string, cycle uint64) (*stafiHubRMintRewardTypes.QueryActDetailResponse, error)

func (*Client) QueryActLatestCycle added in v1.9.4

func (c *Client) QueryActLatestCycle(denom string) (*stafiHubRMintRewardTypes.QueryActLatestCycleResponse, error)

func (*Client) QueryAddressPrefix

func (c *Client) QueryAddressPrefix(denom string) (*stafiHubXRBankTypes.QueryAddressPrefixResponse, error)

func (*Client) QueryAllSigningInfos added in v1.5.0

func (c *Client) QueryAllSigningInfos(height int64) (*xSlashingTypes.QuerySigningInfosResponse, error)

func (*Client) QueryBalance

func (c *Client) QueryBalance(addr types.AccAddress, denom string, height int64) (*xBankTypes.QueryBalanceResponse, error)

func (*Client) QueryBlock

func (c *Client) QueryBlock(height int64) (*ctypes.ResultBlock, error)

func (*Client) QueryBondRecord

func (c *Client) QueryBondRecord(denom, txHash string) (*stafiHubXLedgerTypes.QueryGetBondRecordResponse, error)

func (*Client) QueryBondedDenom

func (c *Client) QueryBondedDenom() (*xStakeTypes.QueryParamsResponse, error)

func (*Client) QueryBridgeProposalDetail

func (c *Client) QueryBridgeProposalDetail(chainId uint32, depositNonce uint64, resourceId, amount, receiver string) (*stafiHubXBridgeTypes.QueryProposalDetailResponse, error)

func (*Client) QueryChainEra

func (c *Client) QueryChainEra(denom string) (*stafiHubXLedgerTypes.QueryGetChainEraResponse, error)

func (*Client) QueryCurrentEraContinuable added in v1.9.5

func (c *Client) QueryCurrentEraContinuable(denom string) (bool, error)

func (*Client) QueryCycleSeconds added in v1.1.0

func (c *Client) QueryCycleSeconds(denom string) (*stafiHubXRValidatorTypes.QueryCycleSecondsResponse, error)

func (*Client) QueryDelegation

func (c *Client) QueryDelegation(delegatorAddr types.AccAddress, validatorAddr types.ValAddress, height int64) (*xStakeTypes.QueryDelegationResponse, error)

func (*Client) QueryDelegationRewards

func (c *Client) QueryDelegationRewards(delegatorAddr types.AccAddress, validatorAddr types.ValAddress, height int64) (*xDistriTypes.QueryDelegationRewardsResponse, error)

func (*Client) QueryDelegationTotalRewards

func (c *Client) QueryDelegationTotalRewards(delegatorAddr types.AccAddress, height int64) (*xDistriTypes.QueryDelegationTotalRewardsResponse, error)

func (*Client) QueryDelegations

func (c *Client) QueryDelegations(delegatorAddr types.AccAddress, height int64) (*xStakeTypes.QueryDelegatorDelegationsResponse, error)

func (*Client) QueryEraRate

func (*Client) QueryEraSnapShotList

func (c *Client) QueryEraSnapShotList(denom string, era uint32) (*stafiHubXLedgerTypes.QueryGetEraSnapshotResponse, error)

func (*Client) QueryIcaPoolList added in v1.4.0

func (c *Client) QueryIcaPoolList(denom string) (*stafiHubXLedgerTypes.QueryIcaPoolListResponse, error)

func (*Client) QueryInterchainTxStatus added in v1.4.0

func (c *Client) QueryInterchainTxStatus(propId string) (*stafiHubXLedgerTypes.QueryInterchainTxStatusResponse, error)

func (*Client) QueryLatestDealedCycle added in v1.3.0

func (c *Client) QueryLatestDealedCycle(denom, poolAddress string) (*stafiHubXRValidatorTypes.QueryLatestDealedCycleResponse, error)

func (*Client) QueryLatestLsmProposalId added in v1.11.1

func (c *Client) QueryLatestLsmProposalId() (*stafiHubXLedgerTypes.QueryLatestLsmBondProposalIdResponse, error)

func (*Client) QueryLatestVotedCycle added in v1.2.0

func (c *Client) QueryLatestVotedCycle(denom, poolAddress string) (*stafiHubXRValidatorTypes.QueryLatestVotedCycleResponse, error)

func (*Client) QueryPoolDetail

func (c *Client) QueryPoolDetail(denom, pool string) (*stafiHubXLedgerTypes.QueryGetPoolDetailResponse, error)

func (*Client) QueryPoolUnbond

func (c *Client) QueryPoolUnbond(denom, pool string, era uint32) (*stafiHubXLedgerTypes.QueryPoolUnbondingsResponse, error)

func (*Client) QueryPools

func (*Client) QueryRParams

func (c *Client) QueryRParams(denom string) (*stafiHubXLedgerTypes.QueryGetRParamsResponse, error)

func (*Client) QueryRValidatorList added in v1.1.0

func (c *Client) QueryRValidatorList(denom, poolAddress string) (*stafiHubXRValidatorTypes.QueryRValidatorListResponse, error)

func (*Client) QueryRate added in v1.8.1

func (*Client) QueryShuffleSeconds added in v1.1.0

func (c *Client) QueryShuffleSeconds(denom string) (*stafiHubXRValidatorTypes.QueryShuffleSecondsResponse, error)

func (*Client) QuerySignature

func (c *Client) QuerySignature(denom, pool string, era uint32, txType stafiHubXLedgerTypes.OriginalTxType, proposalId string) (*stafiHubXLedgerTypes.QueryGetSignatureResponse, error)

func (*Client) QuerySigningInfo added in v1.5.0

func (c *Client) QuerySigningInfo(consAddr string, height int64) (*xSlashingTypes.QuerySigningInfoResponse, error)

func (*Client) QuerySnapshot

func (c *Client) QuerySnapshot(shotId string) (*stafiHubXLedgerTypes.QueryGetSnapshotResponse, error)

func (*Client) QuerySupplyOf added in v1.9.4

func (c *Client) QuerySupplyOf(denom string, height int64) (*xBankTypes.QuerySupplyOfResponse, error)

func (*Client) QueryTxByHash

func (c *Client) QueryTxByHash(hashHexStr string) (*types.TxResponse, error)

no 0x prefix

func (*Client) QueryUnbondingDelegation

func (c *Client) QueryUnbondingDelegation(delegatorAddr types.AccAddress, validatorAddr types.ValAddress, height int64) (*xStakeTypes.QueryUnbondingDelegationResponse, error)

func (*Client) QueryValidators added in v1.5.0

func (c *Client) QueryValidators(height int64) (*xStakeTypes.QueryValidatorsResponse, error)

func (*Client) Retry added in v1.0.0

func (c *Client) Retry(f func() (interface{}, error)) (interface{}, error)

func (*Client) SetFromName

func (c *Client) SetFromName(fromName string) error

update clientCtx.FromName and clientCtx.FromAddress

func (*Client) Sign

func (c *Client) Sign(fromName string, toBeSigned []byte) ([]byte, cryptoTypes.PubKey, error)

func (*Client) SingleTransferTo

func (c *Client) SingleTransferTo(toAddr types.AccAddress, amount types.Coins) (string, error)

func (*Client) SubmitBridgeProposal added in v1.7.0

func (c *Client) SubmitBridgeProposal(msg *stafiHubXBridgeTypes.MsgVoteProposal) (string, []byte, error)

func (*Client) SubmitProposal

func (c *Client) SubmitProposal(content stafiHubXRvoteTypes.Content) (string, []byte, error)

func (*Client) SubmitSignature

func (c *Client) SubmitSignature(sigMsg *stafiHubXLedgerTypes.MsgSubmitSignature) (string, []byte, error)

type EncodingConfig

type EncodingConfig struct {
	InterfaceRegistry types.InterfaceRegistry
	Marshaler         codec.Codec
	TxConfig          client.TxConfig
	Amino             *codec.LegacyAmino
}

EncodingConfig specifies the concrete encoding types to use for a given app. This is provided for compatibility between protobuf and amino implementations.

func MakeEncodingConfig

func MakeEncodingConfig() EncodingConfig

MakeEncodingConfig creates an EncodingConfig for testing

Jump to

Keyboard shortcuts

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