client

package
v0.0.0-...-948bdf6 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2022 License: GPL-3.0 Imports: 45 Imported by: 0

Documentation

Index

Constants

View Source
const AccountPrefix = "fis"

Variables

This section is empty.

Functions

func Retry

func Retry(f func() (interface{}, error)) (interface{}, error)

Types

type Client

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

stafihub client

func NewClient

func NewClient(k keyring.Keyring, chainId, fromName, gasPrice, denom, endPoint string) (*Client, error)

func (*Client) BroadcastTx

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

func (*Client) ConstructAndSignTx

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

func (*Client) Ctx

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

func (*Client) GetAccount

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

func (*Client) GetBlockTxs

func (c *Client) GetBlockTxs(height int64) ([]*types.TxResponse, 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) 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) QueryAccount

func (c *Client) QueryAccount(addr types.AccAddress) (client.Account, 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) QueryChainEra

func (c *Client) QueryChainEra(denom string) (*stafiHubXLedgerTypes.QueryGetChainEraResponse, 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) QueryEraContinuable

func (c *Client) QueryEraContinuable(denom string, era uint32) (bool, error)

func (*Client) QueryEraSnapShotList

func (c *Client) QueryEraSnapShotList(denom string, era uint32) (*stafiHubXLedgerTypes.QueryGetEraSnapshotResponse, 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.QueryGetPoolUnbondResponse, error)

func (*Client) QueryPools

func (*Client) QuerySignature

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

func (*Client) QuerySnapshot

func (c *Client) QuerySnapshot(shotId []byte) (*stafiHubXLedgerTypes.QueryGetSnapshotResponse, 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) 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) 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