client

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: MIT Imports: 79 Imported by: 0

README

Xpla client

The xpla client is a client for performing all functions within the xpla.go library. The user mandatorily inputs chain ID.

Ready to run Xpla client

mnemonic, err := key.NewMnemonic()
if err != nil {
    fmt.Println(err)
}

priKey, err := key.NewPrivKey(mnemonic)
if err != nil {
    fmt.Println(err)
}

// Can check addr (string type)
addr, err := key.Bech32AddrString(priKey)

// Create new XPLA client
xplac := client.NewXplaClient("chain-id")

// Set private key
xplac = xplac.WithOptions(client.Options{PrivateKey: priKey})
Set URLs for xpla client
// Need LCD URL when broadcast transactions
xplac := client.NewXplaClient(
    "chain-id",    
).WithOptions(
    client.Options{
        LcdURL: "http://localhost:1317",
    }
)

// Need GRPC URL to query or broadcast tx
xplac := client.NewXplaClient(
    "chain-id",    
).WithOptions(
    client.Options{
        GrpcURL: "http://localhost:9090",
    }
)

// Need tendermint RPC URL when only "Query tx" methods
// i.e. xplad query tx, xplad query txs
xplac := client.NewXplaClient(
    "chain-id",    
).WithOptions(
    client.Options{
        RpcURL: "http://localhost:26657",
    }
)

// Need EVM RPC URL when use evm module
xplac := client.NewXplaClient(
    "chain-id",    
).WithOptions(
    client.Options{
        EvmRpcURL: "http://localhost:8545",
    }
)
Optional parameters of xpla client
type Options struct {    
    // Set private key
    PrivateKey     key.PrivateKey
    // Set account number of address
    AccountNumber  string
    // Set account sequence of address
    Sequence       string
    // Broadcast mode (sync,async,block)
    BroadcastMode  string	
    // Transaction gas limit
    GasLimit       string
    // Transaction gas price
    GasPrice       string
    // Transaction gas limit adjustment
    GasAdjustment  string
    // Transaction fee amount
    FeeAmount      string
    // Transaction sign mode
    SignMode       signing.SignMode
    // Set fee granter of transaction builder
    FeeGranter     sdk.AccAddress
    // Set timeout height of transaction builder
    TimeoutHeight  string
    // LCD URL
    LcdURL         string
    // GRPC URL
    GrpcURL        string
    // Tendermint RPC URL
    RpcURL         string
    // Ethereum VM RPC URL
    EvmRpcURL      string
    // Set user want pagination option
    Pagination     types.Pagination
    // Set output document name when created transaction with json file
    // "Generate only" is same that OutputDocument is not empty string 
    OutputDocument string	
}

Handle transactions

Create and sign tx
// Create signed transaction by using msg.
// e.g. Send coin of bank module
bankSendMsg := types.BankSendMsg {
    FromAddress: "xpla1g8ku0mt75j4p8luxzku6dkcxxvnc0tt352z0k9",
    ToAddress: "xpla1j3dtjvchp7ec3nnn6357jv8v8f29akx6p2u78g",
    Amount: "1000",
}

txbytes, err := xplac.BankSend(bankSendMsg).CreateAndSignTx()
Create unsigned tx
// Create unsigned transaction by using msg.
// e.g. Send coin of bank module
bankSendMsg := types.BankSendMsg {
    FromAddress: "xpla1g8ku0mt75j4p8luxzku6dkcxxvnc0tt352z0k9",
    ToAddress: "xpla1j3dtjvchp7ec3nnn6357jv8v8f29akx6p2u78g",
    Amount: "1000axpla",
}

txbytes, err := xplac.BankSend(bankSendMsg).CreateUnsignedTx()
Sign tx
addr, err := key.Bech32AddrString(priKey)
// Sign transaction with local transaction file.
signTxMsg := types.SignTxMsg{
    FileName:    "./unsignedTx.json",    
    FromAddress: addr,
}	

txbytes, err := xplac.SignTx(signTxMsg)
Multisign tx
// Multi sign transaction with local transaction file.
// It is able to sign when local keyring file and signature file exist.
txMultiSignMsg := types.TxMultiSignMsg{
    FileName: "./unsignedTx.json",
    GenerateOnly: true,
    FromName: "mykey",
    Offline: true,
    SignatureFiles: []string{"signatureFiles.json", ...},	
}

res, err := xplac.MultiSign(txMultiSignMsg)
Encode tx
// Encoding transaction by using base64
encodeTxMsg := types.EncodeTxMsg {
    FileName: "./unsignedTx.json",
}

res, err := xplac.EncodeTx(encodeTxMsg)
Decode tx
// Decoding transaction
decodeTxMsg := types.DecodeTxMsg{
    EncodedByteString: "CvwBCvkBCiUvY29zbW9zLmdvdi52MWJldGE......",
}

res, err := xplac.DecodeTx(decodeTxMsg)
Validate signatures of tx
validateSignaturesMsg := types.ValidateSignaturesMsg{
    FileName: "./signedTx.json",
    Offline: true,
}

res, err := xplac.ValidateSignatures(validateSignaturesMsg)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	PrivateKey     key.PrivateKey
	AccountNumber  string
	Sequence       string
	BroadcastMode  string
	GasLimit       string
	GasPrice       string
	GasAdjustment  string
	FeeAmount      string
	SignMode       signing.SignMode
	FeeGranter     sdk.AccAddress
	TimeoutHeight  string
	LcdURL         string
	GrpcURL        string
	RpcURL         string
	EvmRpcURL      string
	Pagination     types.Pagination
	OutputDocument string
}

Optional parameters of xpla client.

type XplaClient

type XplaClient struct {
	ChainId        string
	EncodingConfig params.EncodingConfig
	Grpc           grpc1.ClientConn
	Context        context.Context

	Opts Options

	Module  string
	MsgType string
	Msg     interface{}
	Err     error
}

The xpla client is a client for performing all functions within the xpla.go library. The user mandatorily inputs chain ID.

func NewXplaClient

func NewXplaClient(
	chainId string,
) *XplaClient

Make new xpla client.

func (*XplaClient) AccAddress

func (xplac *XplaClient) AccAddress(queryAccAddresMsg types.QueryAccAddressMsg) *XplaClient

Query for account by address.

func (*XplaClient) AccountInfo

func (xplac *XplaClient) AccountInfo(accountInfoMsg types.AccountInfoMsg) *XplaClient

Query a account information which includes account address(hex and bech32), balance and etc.

func (*XplaClient) Accounts

func (xplac *XplaClient) Accounts() *XplaClient

Query all accounts.

func (*XplaClient) AnnualProvisions

func (xplac *XplaClient) AnnualProvisions() *XplaClient

Query the current minting annual provisions value.

func (*XplaClient) AuthParams

func (xplac *XplaClient) AuthParams() *XplaClient

Query the current auth parameters.

func (*XplaClient) AuthzExec

func (xplac *XplaClient) AuthzExec(authzExecMsg types.AuthzExecMsg) *XplaClient

Execute transaction on behalf of granter account.

func (*XplaClient) AuthzGrant

func (xplac *XplaClient) AuthzGrant(authzGrantMsg types.AuthzGrantMsg) *XplaClient

Grant authorization to an address.

func (*XplaClient) AuthzRevoke

func (xplac *XplaClient) AuthzRevoke(authzRevokeMsg types.AuthzRevokeMsg) *XplaClient

Revoke authorization.

func (*XplaClient) BankBalances

func (xplac *XplaClient) BankBalances(bankBalancesMsg types.BankBalancesMsg) *XplaClient

Query for account balances by address

func (*XplaClient) BankSend

func (xplac *XplaClient) BankSend(bankSendMsg types.BankSendMsg) *XplaClient

Send funds from one account to another.

func (*XplaClient) Block added in v0.0.12

func (xplac *XplaClient) Block(blockMsg ...types.BlockMsg) *XplaClient

Query block

func (*XplaClient) Broadcast

func (xplac *XplaClient) Broadcast(txBytes []byte) (*types.TxRes, error)

Broadcast the transaction. Default broadcast mode is "sync" if not xpla client has broadcast mode option. The broadcast method is determined according to the broadcast mode option of the xpla client. For evm transaction broadcast, use a separate method in this function.

func (*XplaClient) BroadcastAsync

func (xplac *XplaClient) BroadcastAsync(txBytes []byte) (*types.TxRes, error)

Broadcast the transaction with mode "Async". It takes precedence over the option of the xpla client.

func (*XplaClient) BroadcastBlock

func (xplac *XplaClient) BroadcastBlock(txBytes []byte) (*types.TxRes, error)

Broadcast the transaction with mode "block". It takes precedence over the option of the xpla client.

func (*XplaClient) CallSolidityContract

func (xplac *XplaClient) CallSolidityContract(callSolContractMsg types.CallSolContractMsg) *XplaClient

Call(as query) solidity contract.

func (*XplaClient) CancelSoftwareUpgrade

func (xplac *XplaClient) CancelSoftwareUpgrade(cancelSoftwareUpgradeMsg types.CancelSoftwareUpgradeMsg) *XplaClient

Cancel the current software upgrade proposal.

func (*XplaClient) ClearContractAdmin

func (xplac *XplaClient) ClearContractAdmin(clearContractAdminMsg types.ClearContractAdminMsg) *XplaClient

Clears admin for a contract to prevent further migrations.

func (*XplaClient) CodeInfo

func (xplac *XplaClient) CodeInfo(codeInfoMsg types.CodeInfoMsg) *XplaClient

Prints out metadata of a code ID.

func (*XplaClient) CommunityPool

func (xplac *XplaClient) CommunityPool() *XplaClient

Query the amount of coins in the community pool.

func (*XplaClient) CommunityPoolSpend

func (xplac *XplaClient) CommunityPoolSpend(communityPoolSpendMsg types.CommunityPoolSpendMsg) *XplaClient

Submit a community pool spend proposal.

func (*XplaClient) ContractHistory

func (xplac *XplaClient) ContractHistory(contractHistoryMsg types.ContractHistoryMsg) *XplaClient

Prints out the code history for a contract given its address.

func (*XplaClient) ContractInfo

func (xplac *XplaClient) ContractInfo(contractInfoMsg types.ContractInfoMsg) *XplaClient

Prints out metadata of a contract given its address.

func (*XplaClient) ContractStateAll

func (xplac *XplaClient) ContractStateAll(contractStateAllMsg types.ContractStateAllMsg) *XplaClient

Prints out all internal state of a contract given its address.

func (*XplaClient) CreateAndSignTx

func (xplac *XplaClient) CreateAndSignTx() ([]byte, error)

Create and sign a transaction before it is broadcasted to xpla chain. Options required for create and sign are stored in the xpla client and reflected when the values of those options exist. Create and sign transaction must be needed in order to send transaction to the chain.

func (*XplaClient) CreateUnsignedTx

func (xplac *XplaClient) CreateUnsignedTx() ([]byte, error)

Create transaction with unsigning. It returns txbytes of byte type when output document options is nil. If not, save the unsigned transaction file which name is "outputDocument"

func (*XplaClient) CreateValidator

func (xplac *XplaClient) CreateValidator(createValidatorMsg types.CreateValidatorMsg) *XplaClient

Create new validator initialized with a self-delegation to it.

func (*XplaClient) DecodeTx

func (xplac *XplaClient) DecodeTx(decodeTxMsg types.DecodeTxMsg) (string, error)

Decode transaction which encoded by base64

func (*XplaClient) Delegate

func (xplac *XplaClient) Delegate(delegateMsg types.DelegateMsg) *XplaClient

Delegate liquid tokens to a validator.

func (*XplaClient) DenomMetadata

func (xplac *XplaClient) DenomMetadata(denomMetadataMsg ...types.DenomMetadataMsg) *XplaClient

Query the client metadata for coin denominations.

func (*XplaClient) DeploySolidityContract

func (xplac *XplaClient) DeploySolidityContract(deploySolContractMsg types.DeploySolContractMsg) *XplaClient

Deploy soldity contract.

func (*XplaClient) DistCommission

func (xplac *XplaClient) DistCommission(queryDistCommissionMsg types.QueryDistCommissionMsg) *XplaClient

Query distribution validator commission.

func (*XplaClient) DistRewards

func (xplac *XplaClient) DistRewards(queryDistRewardsMsg types.QueryDistRewardsMsg) *XplaClient

Query all ditribution delegator rewards or rewards from a particular validator.

func (*XplaClient) DistSlashes

func (xplac *XplaClient) DistSlashes(queryDistSlashesMsg types.QueryDistSlashesMsg) *XplaClient

Query distribution validator slashes.

func (*XplaClient) DistributionParams

func (xplac *XplaClient) DistributionParams() *XplaClient

Query distribution parameters.

func (*XplaClient) Download

func (xplac *XplaClient) Download(downloadMsg types.DownloadMsg) *XplaClient

Downloads wasm bytecode for given code ID.

func (*XplaClient) EditValidator

func (xplac *XplaClient) EditValidator(editValidatorMsg types.EditValidatorMsg) *XplaClient

Edit an existing validator account.

func (*XplaClient) EncodeTx

func (xplac *XplaClient) EncodeTx(encodeTxMsg types.EncodeTxMsg) (string, error)

Encode transaction by using base64.

func (*XplaClient) EstimateGas added in v0.0.6

func (xplac *XplaClient) EstimateGas(invokeSolContractMsg types.InvokeSolContractMsg) *XplaClient

Query estimate gas.

func (*XplaClient) EthAccounts added in v0.0.6

func (xplac *XplaClient) EthAccounts() *XplaClient

Query all eth accounts.

func (*XplaClient) EthBlockNumber

func (xplac *XplaClient) EthBlockNumber() *XplaClient

Query latest block height(as number)

func (*XplaClient) EthChainID

func (xplac *XplaClient) EthChainID() *XplaClient

Query chain ID of ethereum type.

func (*XplaClient) EthCoinbase added in v0.0.6

func (xplac *XplaClient) EthCoinbase() *XplaClient

Query coinbase.

func (*XplaClient) EthGetBlockTransactionCount added in v0.0.6

func (xplac *XplaClient) EthGetBlockTransactionCount(ethGetBlockTransactionCountMsg types.EthGetBlockTransactionCountMsg) *XplaClient

Query the number of transaction a given block.

func (*XplaClient) EthGetFilterChanges added in v0.0.6

func (xplac *XplaClient) EthGetFilterChanges(ethGetFilterChangesMsg types.EthGetFilterChangesMsg) *XplaClient

Query filter changes.

func (*XplaClient) EthGetFilterLogs added in v0.0.6

func (xplac *XplaClient) EthGetFilterLogs(ethGetFilterLogsMsg types.EthGetFilterLogsMsg) *XplaClient

Query filter logs.

func (*XplaClient) EthGetLogs added in v0.0.6

func (xplac *XplaClient) EthGetLogs(ethGetLogsMsg types.EthGetLogsMsg) *XplaClient

Get logs.

func (*XplaClient) EthGetTransactionByBlockHashAndIndex added in v0.0.6

func (xplac *XplaClient) EthGetTransactionByBlockHashAndIndex(getTransactionByBlockHashAndIndexMsg types.GetTransactionByBlockHashAndIndexMsg) *XplaClient

Query transaction by block hash and index.

func (*XplaClient) EthGetTransactionReceipt added in v0.0.6

func (xplac *XplaClient) EthGetTransactionReceipt(getTransactionReceiptMsg types.GetTransactionReceiptMsg) *XplaClient

Query transaction receipt.

func (*XplaClient) EthNewBlockFilter added in v0.0.6

func (xplac *XplaClient) EthNewBlockFilter() *XplaClient

Query filter ID by eth new block filter.

func (*XplaClient) EthNewFilter added in v0.0.6

func (xplac *XplaClient) EthNewFilter(ethNewFilterMsg types.EthNewFilterMsg) *XplaClient

Query filter ID by eth new filter.

func (*XplaClient) EthNewPendingTransactionFilter added in v0.0.6

func (xplac *XplaClient) EthNewPendingTransactionFilter() *XplaClient

Query filter ID by eth new pending transaction filter.

func (*XplaClient) EthProtocolVersion added in v0.0.6

func (xplac *XplaClient) EthProtocolVersion() *XplaClient

ethereum protocol version.

func (*XplaClient) EthSyncing added in v0.0.6

func (xplac *XplaClient) EthSyncing() *XplaClient

Query the sync status object depending on the details of tendermint's sync protocol.

func (*XplaClient) EthUninstallFilter added in v0.1.0

func (xplac *XplaClient) EthUninstallFilter(ethUninstallFilterMsg types.EthUninstallFilterMsg) *XplaClient

Uninstall filter.

func (*XplaClient) EvmSendCoin

func (xplac *XplaClient) EvmSendCoin(sendCoinMsg types.SendCoinMsg) *XplaClient

Send coind by using evm client.

func (*XplaClient) ExecuteContract

func (xplac *XplaClient) ExecuteContract(executeMsg types.ExecuteMsg) *XplaClient

Execute a wasm contract.

func (*XplaClient) FeeGrant added in v0.0.5

func (xplac *XplaClient) FeeGrant(grantMsg types.FeeGrantMsg) *XplaClient

Grant fee allowance to an address.

func (*XplaClient) FundCommunityPool

func (xplac *XplaClient) FundCommunityPool(fundCommunityPoolMsg types.FundCommunityPoolMsg) *XplaClient

Funds the community pool with the specified amount.

func (*XplaClient) FundFeeCollector added in v0.0.3

func (xplac *XplaClient) FundFeeCollector(fundFeeCollectorMsg types.FundFeeCollectorMsg) *XplaClient

Funds the fee collector with the specified amount

func (*XplaClient) GetAccountNumber added in v0.0.2

func (xplac *XplaClient) GetAccountNumber() string

Get account number

func (*XplaClient) GetBlockByHashOrHeight

func (xplac *XplaClient) GetBlockByHashOrHeight(getBlockByHashHeightMsg types.GetBlockByHashHeightMsg) *XplaClient

Query a block which is ethereum type information by retrieving hash or block height(as number).

func (*XplaClient) GetBroadcastMode added in v0.0.2

func (xplac *XplaClient) GetBroadcastMode() string

Get broadcast mode

func (*XplaClient) GetChainId added in v0.0.2

func (xplac *XplaClient) GetChainId() string

Get chain ID

func (*XplaClient) GetContext added in v0.0.2

func (xplac *XplaClient) GetContext() context.Context

Get xpla client context

func (*XplaClient) GetEncoding added in v0.0.2

func (xplac *XplaClient) GetEncoding() params.EncodingConfig

Get encoding configuration

func (*XplaClient) GetEvmRpc added in v0.0.2

func (xplac *XplaClient) GetEvmRpc() string

Get RPC URL for evm module

func (*XplaClient) GetFeeAmount added in v0.0.2

func (xplac *XplaClient) GetFeeAmount() string

Get fee amount

func (*XplaClient) GetFeeGranter added in v0.0.2

func (xplac *XplaClient) GetFeeGranter() sdk.AccAddress

Get fee granter

func (*XplaClient) GetGasAdjustment added in v0.0.2

func (xplac *XplaClient) GetGasAdjustment() string

Get Gas adjustment

func (*XplaClient) GetGasLimit added in v0.0.2

func (xplac *XplaClient) GetGasLimit() string

Get gas limit

func (*XplaClient) GetGasPrice added in v0.0.2

func (xplac *XplaClient) GetGasPrice() string

Get Gas price

func (*XplaClient) GetGrpcClient added in v0.0.2

func (xplac *XplaClient) GetGrpcClient() grpc1.ClientConn

Get GRPC client connector

func (*XplaClient) GetGrpcUrl added in v0.0.2

func (xplac *XplaClient) GetGrpcUrl() string

Get GRPC URL to query or broadcast tx

func (*XplaClient) GetLcdURL added in v0.0.5

func (xplac *XplaClient) GetLcdURL() string

Get LCD URL

func (*XplaClient) GetModule added in v0.0.2

func (xplac *XplaClient) GetModule() string

Get module name

func (*XplaClient) GetMsg added in v0.0.2

func (xplac *XplaClient) GetMsg() interface{}

Get message

func (*XplaClient) GetMsgType added in v0.0.2

func (xplac *XplaClient) GetMsgType() string

Get message type of modules

func (*XplaClient) GetOutputDocument added in v0.0.2

func (xplac *XplaClient) GetOutputDocument() string

Get output document name

func (*XplaClient) GetPagination added in v0.0.2

func (xplac *XplaClient) GetPagination() *query.PageRequest

Get pagination

func (*XplaClient) GetPrivateKey added in v0.0.2

func (xplac *XplaClient) GetPrivateKey() key.PrivateKey

Get private key

func (*XplaClient) GetRpc added in v0.0.2

func (xplac *XplaClient) GetRpc() string

Get RPC URL of tendermint core

func (*XplaClient) GetSequence added in v0.0.2

func (xplac *XplaClient) GetSequence() string

Get account sequence

func (*XplaClient) GetSignMode added in v0.0.2

func (xplac *XplaClient) GetSignMode() signing.SignMode

Get transaction sign mode

func (*XplaClient) GetTimeoutHeight added in v0.0.2

func (xplac *XplaClient) GetTimeoutHeight() string

Get timeout block height

func (*XplaClient) GetTransactionByHash

func (xplac *XplaClient) GetTransactionByHash(getTransactionByHashMsg types.GetTransactionByHashMsg) *XplaClient

Query a transaction which is ethereum type information by retrieving hash.

func (*XplaClient) GovDeposit

func (xplac *XplaClient) GovDeposit(govDepositMsg types.GovDepositMsg) *XplaClient

Deposit tokens for an active proposal.

func (*XplaClient) GovParams

func (xplac *XplaClient) GovParams(govParamsMsg ...types.GovParamsMsg) *XplaClient

Query parameters of the governance process or the parameters (voting|tallying|deposit) of the governance process.

func (*XplaClient) HistoricalInfo

func (xplac *XplaClient) HistoricalInfo(historicalInfoMsg types.HistoricalInfoMsg) *XplaClient

Query historical info at given height.

func (*XplaClient) IbcChannelClientState added in v0.0.10

func (xplac *XplaClient) IbcChannelClientState(ibcChannelClientStateMsg types.IbcChannelClientStateMsg) *XplaClient

Query IBC channel client state

func (*XplaClient) IbcChannelConnections added in v0.0.10

func (xplac *XplaClient) IbcChannelConnections(ibcChannelConnectionsMsg types.IbcChannelConnectionsMsg) *XplaClient

Query IBC channel connections

func (*XplaClient) IbcChannelNextSequence added in v0.0.10

func (xplac *XplaClient) IbcChannelNextSequence(ibcChannelNextSequenceMsg types.IbcChannelNextSequenceMsg) *XplaClient

Query IBC next sequence receive

func (*XplaClient) IbcChannelPacketAck added in v0.0.10

func (xplac *XplaClient) IbcChannelPacketAck(ibcChannelPacketAckMsg types.IbcChannelPacketAckMsg) *XplaClient

Query IBC packet ack

func (*XplaClient) IbcChannelPacketCommitments added in v0.0.10

func (xplac *XplaClient) IbcChannelPacketCommitments(ibcChannelPacketCommitmentsMsg types.IbcChannelPacketCommitmentsMsg) *XplaClient

Query IBC channel packet commitments

func (*XplaClient) IbcChannelPacketReceipt added in v0.1.0

func (xplac *XplaClient) IbcChannelPacketReceipt(ibcChannelPacketReceiptMsg types.IbcChannelPacketReceiptMsg) *XplaClient

Query IBC packet receipt

func (*XplaClient) IbcChannelUnreceivedAcks added in v0.0.10

func (xplac *XplaClient) IbcChannelUnreceivedAcks(ibcChannelUnreceivedAcksMsg types.IbcChannelUnreceivedAcksMsg) *XplaClient

Query IBC unreceived acks

func (*XplaClient) IbcChannelUnreceivedPackets added in v0.0.10

func (xplac *XplaClient) IbcChannelUnreceivedPackets(ibcChannelUnreceivedPacketsMsg types.IbcChannelUnreceivedPacketsMsg) *XplaClient

Query IBC unreceived packets

func (*XplaClient) IbcChannels added in v0.0.10

func (xplac *XplaClient) IbcChannels(ibcChannelMsg ...types.IbcChannelMsg) *XplaClient

Query IBC channels

func (*XplaClient) IbcClientConnections added in v0.0.10

func (xplac *XplaClient) IbcClientConnections(ibcClientConnectionsMsg types.IbcClientConnectionsMsg) *XplaClient

Query IBC client connections

func (*XplaClient) IbcClientConsensusState added in v0.0.10

func (xplac *XplaClient) IbcClientConsensusState(ibcClientConsensusStateMsg types.IbcClientConsensusStateMsg) *XplaClient

Query IBC client consensus state

func (*XplaClient) IbcClientConsensusStateHeights added in v0.0.10

func (xplac *XplaClient) IbcClientConsensusStateHeights(ibcClientConsensusStateHeightsMsg types.IbcClientConsensusStateHeightsMsg) *XplaClient

Query IBC client consensus state heights

func (*XplaClient) IbcClientConsensusStates added in v0.0.10

func (xplac *XplaClient) IbcClientConsensusStates(ibcClientConsensusStatesMsg types.IbcClientConsensusStatesMsg) *XplaClient

Query IBC client consensus states

func (*XplaClient) IbcClientHeader added in v0.0.10

func (xplac *XplaClient) IbcClientHeader() *XplaClient

Query IBC client tendermint header

func (*XplaClient) IbcClientParams added in v0.0.10

func (xplac *XplaClient) IbcClientParams() *XplaClient

Query IBC client params

func (*XplaClient) IbcClientSelfConsensusState added in v0.0.10

func (xplac *XplaClient) IbcClientSelfConsensusState() *XplaClient

Query IBC client self consensus state

func (*XplaClient) IbcClientState added in v0.0.10

func (xplac *XplaClient) IbcClientState(ibcClientStateMsg types.IbcClientStateMsg) *XplaClient

Query IBC light client state by client ID

func (*XplaClient) IbcClientStates added in v0.0.10

func (xplac *XplaClient) IbcClientStates() *XplaClient

Query IBC light client states

func (*XplaClient) IbcClientStatus added in v0.0.10

func (xplac *XplaClient) IbcClientStatus(ibcClientStatusMsg types.IbcClientStatusMsg) *XplaClient

Query IBC light client status by client ID

func (*XplaClient) IbcConnections added in v0.0.10

func (xplac *XplaClient) IbcConnections(ibcConnectionMsg ...types.IbcConnectionMsg) *XplaClient

Query IBC connections

func (*XplaClient) IbcDenomHash added in v0.0.10

func (xplac *XplaClient) IbcDenomHash(ibcDenomHashMsg types.IbcDenomHashMsg) *XplaClient

Query IBC transfer denom hash

func (*XplaClient) IbcDenomTrace added in v0.0.10

func (xplac *XplaClient) IbcDenomTrace(ibcDenomTraceMsg types.IbcDenomTraceMsg) *XplaClient

Query IBC transfer denom trace

func (*XplaClient) IbcDenomTraces added in v0.0.10

func (xplac *XplaClient) IbcDenomTraces(ibcDenomTraceMsg ...types.IbcDenomTraceMsg) *XplaClient

Query IBC transfer denom traces

func (*XplaClient) IbcEscrowAddress added in v0.0.10

func (xplac *XplaClient) IbcEscrowAddress(ibcEscrowAddressMsg types.IbcEscrowAddressMsg) *XplaClient

Query IBC transfer denom hash

func (*XplaClient) IbcTransferParams added in v0.0.10

func (xplac *XplaClient) IbcTransferParams() *XplaClient

Query IBC transfer params

func (*XplaClient) Inflation

func (xplac *XplaClient) Inflation() *XplaClient

Query the current minting inflation value.

func (*XplaClient) InstantiateContract

func (xplac *XplaClient) InstantiateContract(instantiageMsg types.InstantiateMsg) *XplaClient

Instantiate a wasm contract.

func (*XplaClient) InvariantBroken

func (xplac *XplaClient) InvariantBroken(invariantBrokenMsg types.InvariantBrokenMsg) *XplaClient

Submit proof that an invariant broken to halt the chain.

func (*XplaClient) InvokeSolidityContract

func (xplac *XplaClient) InvokeSolidityContract(invokeSolContractMsg types.InvokeSolContractMsg) *XplaClient

Invoke (as execute) solidity contract.

func (*XplaClient) LibwasmvmVersion

func (xplac *XplaClient) LibwasmvmVersion() *XplaClient

Get libwasmvm version.

func (*XplaClient) ListCode

func (xplac *XplaClient) ListCode() *XplaClient

Query list all wasm bytecode on the chain.

func (*XplaClient) ListContractByCode

func (xplac *XplaClient) ListContractByCode(listContractByCodeMsg types.ListContractByCodeMsg) *XplaClient

Query list wasm all bytecode on the chain for given code ID.

func (*XplaClient) LoadAccount

func (xplac *XplaClient) LoadAccount(address sdk.AccAddress) (res authtypes.AccountI, err error)

LoadAccount gets the account info by AccAddress If xpla client has gRPC client, query account information by using gRPC

func (*XplaClient) Migrate

func (xplac *XplaClient) Migrate(migrateMsg types.MigrateMsg) *XplaClient

Migrate a wasm contract to a new code version.

func (*XplaClient) MintParams

func (xplac *XplaClient) MintParams() *XplaClient

Query the current minting parameters.

func (*XplaClient) ModulesVersion

func (xplac *XplaClient) ModulesVersion(queryModulesVersionMsg ...types.QueryModulesVersionMsg) *XplaClient

Query the list of module versions.

func (*XplaClient) MultiSign

func (xplac *XplaClient) MultiSign(txMultiSignMsg types.TxMultiSignMsg) ([]byte, error)

Sign created unsigned transaction with multi signatures.

func (*XplaClient) NetListening added in v0.0.6

func (xplac *XplaClient) NetListening() *XplaClient

actively listening for network connections.

func (*XplaClient) NetPeerCount added in v0.0.6

func (xplac *XplaClient) NetPeerCount() *XplaClient

Query the number of peers currently connected to the client.

func (*XplaClient) NetVersion added in v0.0.6

func (xplac *XplaClient) NetVersion() *XplaClient

Query current network ID.

func (*XplaClient) NodeInfo added in v0.0.12

func (xplac *XplaClient) NodeInfo() *XplaClient

Query node info

func (*XplaClient) ParamChange

func (xplac *XplaClient) ParamChange(paramChangeMsg types.ParamChangeMsg) *XplaClient

Submit a parameter change proposal.

func (*XplaClient) Pinned

func (xplac *XplaClient) Pinned() *XplaClient

Query list all pinned code IDs.

func (*XplaClient) Plan

func (xplac *XplaClient) Plan() *XplaClient

Query upgrade plan(if one exists).

func (*XplaClient) Proposer

func (xplac *XplaClient) Proposer(proposerMsg types.ProposerMsg) *XplaClient

Query the proposer of a governance proposal.

func (*XplaClient) Query

func (xplac *XplaClient) Query() (string, error)

Query transactions and xpla blockchain information. Execute a query of functions for all modules. After module query messages are generated, it receives query messages/information to the xpla client receiver and transmits a query message.

func (*XplaClient) QueryAuthzGrants

func (xplac *XplaClient) QueryAuthzGrants(queryAuthzGrantMsg types.QueryAuthzGrantMsg) *XplaClient

Query grants for granter-grantee pair and optionally a msg-type-url. Also, it is able to support querying grants granted by granter and granted to a grantee.

func (*XplaClient) QueryContract

func (xplac *XplaClient) QueryContract(queryMsg types.QueryMsg) *XplaClient

Calls contract with given address with query data and prints the returned result.

func (*XplaClient) QueryDelegation

func (xplac *XplaClient) QueryDelegation(queryDelegationMsg types.QueryDelegationMsg) *XplaClient

Query a delegation based on address and validator address, all out going redelegations from a validator or all delegations made by on delegator.

func (*XplaClient) QueryDeposit

func (xplac *XplaClient) QueryDeposit(queryDepositMsg types.QueryDepositMsg) *XplaClient

Query details of a deposit or deposits on a proposal.

func (*XplaClient) QueryEvidence

func (xplac *XplaClient) QueryEvidence(queryEvidenceMsg ...types.QueryEvidenceMsg) *XplaClient

Query for evidence by hash or for all (paginated) submitted evidence.

func (*XplaClient) QueryFeeGrants added in v0.0.5

func (xplac *XplaClient) QueryFeeGrants(queryFeeGrantMsg types.QueryFeeGrantMsg) *XplaClient

Query details of fee grants.

func (*XplaClient) QueryProposal

func (xplac *XplaClient) QueryProposal(queryProposal types.QueryProposalMsg) *XplaClient

Query details of a singla proposal.

func (*XplaClient) QueryProposals

func (xplac *XplaClient) QueryProposals(queryProposals types.QueryProposalsMsg) *XplaClient

Query proposals with optional filters.

func (*XplaClient) QueryRedelegation

func (xplac *XplaClient) QueryRedelegation(queryRedelegationMsg types.QueryRedelegationMsg) *XplaClient

Query a redelegation record based on delegator and a source and destination validator. Also, query all outgoing redelegatations from a validator or all redelegations records for one delegator.

func (*XplaClient) QuerySubspace

func (xplac *XplaClient) QuerySubspace(subspaceMsg types.SubspaceMsg) *XplaClient

Query for raw parameters by subspace and key.

func (*XplaClient) QueryUnbondingDelegation

func (xplac *XplaClient) QueryUnbondingDelegation(queryUnbondingDelegationMsg types.QueryUnbondingDelegationMsg) *XplaClient

Query all unbonding delegatations from a validator, an unbonding-delegation record based on delegator and validator address or all unbonding-delegations records for one delegator.

func (*XplaClient) QueryValidators

func (xplac *XplaClient) QueryValidators(queryValidatorMsg ...types.QueryValidatorMsg) *XplaClient

Query a validator or for all validators.

func (*XplaClient) QueryVote

func (xplac *XplaClient) QueryVote(queryVoteMsg types.QueryVoteMsg) *XplaClient

Query details of a single vote or votes on a proposal.

func (*XplaClient) Redelegate

func (xplac *XplaClient) Redelegate(redelegateMsg types.RedelegateMsg) *XplaClient

Redelegate illiquid tokens from one validator to another.

func (*XplaClient) RevokeFeeGrant added in v0.0.5

func (xplac *XplaClient) RevokeFeeGrant(revokeGrantMsg types.RevokeFeeGrantMsg) *XplaClient

Revoke fee-grant.

func (*XplaClient) RewardParams added in v0.0.3

func (xplac *XplaClient) RewardParams() *XplaClient

Query reward params

func (*XplaClient) RewardPool added in v0.0.3

func (xplac *XplaClient) RewardPool() *XplaClient

Query reward pool

func (*XplaClient) SetContractAdmin

func (xplac *XplaClient) SetContractAdmin(setContractAdminMsg types.SetContractAdminMsg) *XplaClient

Set new admin for a contract.

func (*XplaClient) SetWithdrawAddr

func (xplac *XplaClient) SetWithdrawAddr(setWithdrawAddrMsg types.SetwithdrawAddrMsg) *XplaClient

Change the default withdraw address for rewards associated with an address.

func (*XplaClient) SignTx

func (xplac *XplaClient) SignTx(signTxMsg types.SignTxMsg) ([]byte, error)

Sign created unsigned transaction.

func (*XplaClient) SigningInfos

func (xplac *XplaClient) SigningInfos(signingInfoMsg ...types.SigningInfoMsg) *XplaClient

Query a validator's signing information or signing information of all validators.

func (*XplaClient) Simulate

func (xplac *XplaClient) Simulate(txbuilder cmclient.TxBuilder) (*sdktx.SimulateResponse, error)

Simulate tx and get response If xpla client has gRPC client, query simulation by using gRPC

func (*XplaClient) SlashingParams

func (xplac *XplaClient) SlashingParams() *XplaClient

Query the current slashing parameters.

func (*XplaClient) SoftwareUpgrade

func (xplac *XplaClient) SoftwareUpgrade(softwareUpgradeMsg types.SoftwareUpgradeMsg) *XplaClient

Submit a software upgrade proposal.

func (*XplaClient) StakingParams

func (xplac *XplaClient) StakingParams() *XplaClient

Query the current staking parameters information.

func (*XplaClient) StakingPool

func (xplac *XplaClient) StakingPool() *XplaClient

Query the current staking pool values.

func (*XplaClient) StoreCode

func (xplac *XplaClient) StoreCode(storeMsg types.StoreMsg) *XplaClient

Upload a wasm binary.

func (*XplaClient) SubmitProposal

func (xplac *XplaClient) SubmitProposal(submitProposalMsg types.SubmitProposalMsg) *XplaClient

Submit a proposal along with an initial deposit.

func (*XplaClient) SuggestGasPrice

func (xplac *XplaClient) SuggestGasPrice() *XplaClient

Query suggested gas price.

func (*XplaClient) Syncing added in v0.0.12

func (xplac *XplaClient) Syncing() *XplaClient

Query syncing

func (*XplaClient) Tally

func (xplac *XplaClient) Tally(tallyMsg types.TallyMsg) *XplaClient

Query the tally of a proposal vote.

func (*XplaClient) Total

func (xplac *XplaClient) Total(totalMsg ...types.TotalMsg) *XplaClient

Query the total supply of coins of the chain.

func (*XplaClient) Tx

func (xplac *XplaClient) Tx(queryTxMsg types.QueryTxMsg) *XplaClient

Query for a transaction by hash <addr>/<seq> combination or comma-separated signatures in a committed block.

func (*XplaClient) TxsByEvents

func (xplac *XplaClient) TxsByEvents(txsByEventsMsg types.QueryTxsByEventsMsg) *XplaClient

Query for paginated transactions that match a set of events.

func (*XplaClient) Unbond

func (xplac *XplaClient) Unbond(unbondMsg types.UnbondMsg) *XplaClient

Unbond shares from a validator.

func (*XplaClient) Unjail

func (xplac *XplaClient) Unjail() *XplaClient

Unjail validator previously jailed for downtime.

func (*XplaClient) UpgradeApplied

func (xplac *XplaClient) UpgradeApplied(appliedMsg types.AppliedMsg) *XplaClient

Block header for height at which a completed upgrade was applied.

func (*XplaClient) ValidateSignatures

func (xplac *XplaClient) ValidateSignatures(validateSignaturesMsg types.ValidateSignaturesMsg) (string, error)

Validate signature

func (*XplaClient) ValidatorOutstandingRewards

func (xplac *XplaClient) ValidatorOutstandingRewards(validatorOutstandingRewardsMsg types.ValidatorOutstandingRewardsMsg) *XplaClient

Query distribution outstanding (un-withdrawn) rewards for a validator and all their delegations.

func (*XplaClient) ValidatorSet added in v0.0.12

func (xplac *XplaClient) ValidatorSet(validatorSetMsg ...types.ValidatorSetMsg) *XplaClient

Query validator set

func (*XplaClient) Vote

func (xplac *XplaClient) Vote(voteMsg types.VoteMsg) *XplaClient

Vote for an active proposal, options: yes/no/no_with_veto/abstain.

func (*XplaClient) Web3ClientVersion added in v0.0.6

func (xplac *XplaClient) Web3ClientVersion() *XplaClient

Query web3 client version.

func (*XplaClient) Web3Sha3 added in v0.0.6

func (xplac *XplaClient) Web3Sha3(web3Sha3Msg types.Web3Sha3Msg) *XplaClient

Query web3 sha3.

func (*XplaClient) WeightedVote

func (xplac *XplaClient) WeightedVote(weightedVoteMsg types.WeightedVoteMsg) *XplaClient

Vote for an active proposal, options: yes/no/no_with_veto/abstain.

func (*XplaClient) WithAccountNumber

func (xplac *XplaClient) WithAccountNumber(accountNumber string) *XplaClient

Set account number

func (*XplaClient) WithBroadcastMode

func (xplac *XplaClient) WithBroadcastMode(broadcastMode string) *XplaClient

Set broadcast mode

func (*XplaClient) WithChainId

func (xplac *XplaClient) WithChainId(chainId string) *XplaClient

Set chain ID

func (*XplaClient) WithContext added in v0.0.2

func (xplac *XplaClient) WithContext(ctx context.Context) *XplaClient

Set xpla client context

func (*XplaClient) WithEncoding

func (xplac *XplaClient) WithEncoding(encodingConfig params.EncodingConfig) *XplaClient

Set encoding configuration

func (*XplaClient) WithEvmRpc

func (xplac *XplaClient) WithEvmRpc(evmRpcUrl string) *XplaClient

Set RPC URL for evm module

func (*XplaClient) WithFeeAmount

func (xplac *XplaClient) WithFeeAmount(feeAmount string) *XplaClient

Set fee amount

func (*XplaClient) WithFeeGranter

func (xplac *XplaClient) WithFeeGranter(feeGranter sdk.AccAddress) *XplaClient

Set fee granter

func (*XplaClient) WithGasAdjustment

func (xplac *XplaClient) WithGasAdjustment(gasAdjustment string) *XplaClient

Set Gas adjustment

func (*XplaClient) WithGasLimit

func (xplac *XplaClient) WithGasLimit(gasLimit string) *XplaClient

Set gas limit

func (*XplaClient) WithGasPrice

func (xplac *XplaClient) WithGasPrice(gasPrice string) *XplaClient

Set Gas price

func (*XplaClient) WithGrpc

func (xplac *XplaClient) WithGrpc(grpcUrl string) *XplaClient

Set GRPC URL to query or broadcast tx

func (*XplaClient) WithOptions

func (xplac *XplaClient) WithOptions(
	options Options,
) *XplaClient

Set options of xpla client.

func (*XplaClient) WithOutputDocument

func (xplac *XplaClient) WithOutputDocument(outputDocument string) *XplaClient

Set output document name

func (*XplaClient) WithPagination

func (xplac *XplaClient) WithPagination(pagination types.Pagination) *XplaClient

Set pagination

func (*XplaClient) WithPrivateKey

func (xplac *XplaClient) WithPrivateKey(privateKey key.PrivateKey) *XplaClient

Set private key

func (*XplaClient) WithRpc

func (xplac *XplaClient) WithRpc(rpcUrl string) *XplaClient

Set RPC URL of tendermint core

func (*XplaClient) WithSequence

func (xplac *XplaClient) WithSequence(sequence string) *XplaClient

Set account sequence

func (*XplaClient) WithSignMode

func (xplac *XplaClient) WithSignMode(signMode signing.SignMode) *XplaClient

Set transaction sign mode

func (*XplaClient) WithTimeoutHeight

func (xplac *XplaClient) WithTimeoutHeight(timeoutHeight string) *XplaClient

Set timeout block height

func (*XplaClient) WithURL

func (xplac *XplaClient) WithURL(lcdURL string) *XplaClient

Set LCD URL

func (*XplaClient) WithdrawAllRewards

func (xplac *XplaClient) WithdrawAllRewards() *XplaClient

Withdraw all delegations rewards for a delegator.

func (*XplaClient) WithdrawRewards

func (xplac *XplaClient) WithdrawRewards(withdrawRewardsMsg types.WithdrawRewardsMsg) *XplaClient

Withdraw rewards from a given delegation address, and optionally withdraw validator commission if the delegation address given is a validator operator.

Jump to

Keyboard shortcuts

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