Documentation ¶
Index ¶
- Constants
- Variables
- func GetAccAddressFromBech32(address string) (addr sdk.AccAddress, err error)
- type GrpcClient
- type OracleAccount
- type QueryClient
- func LoadQueryClient(ctx context.Context, config *config.Config) (*QueryClient, error)
- func NewQueryClient(ctx context.Context, config *config.Config, info TrustedBlockInfo) (*QueryClient, error)
- func NewQueryClientWithDB(ctx context.Context, config *config.Config, info *TrustedBlockInfo, db dbm.DB) (*QueryClient, error)
- func (q QueryClient) Close() error
- func (q QueryClient) GetAccount(address string) (authtypes.AccountI, error)
- func (q QueryClient) GetDataSale(dataHash string, dealID uint64) (*datadealtypes.DataSale, error)
- func (q QueryClient) GetDeal(dealID uint64) (*datadealtypes.Deal, error)
- func (q QueryClient) GetLightBlock(height int64) (*tmtypes.LightBlock, error)
- func (q QueryClient) GetOracleParamsPublicKey() (*btcec.PublicKey, error)
- func (q QueryClient) GetOracleRegistration(oracleAddr, uniqueID string) (*oracletypes.OracleRegistration, error)
- func (q QueryClient) GetOracleUpgradeInfo() (*oracletypes.OracleUpgradeInfo, error)
- func (q QueryClient) GetStoreData(ctx context.Context, storeKey string, key []byte) ([]byte, error)
- type TrustedBlockInfo
- type TxBuilder
Constants ¶
const ( CoinType = 371 HRP = "panacea" )
Variables ¶
Functions ¶
func GetAccAddressFromBech32 ¶
func GetAccAddressFromBech32(address string) (addr sdk.AccAddress, err error)
Types ¶
type GrpcClient ¶
type GrpcClient struct {
// contains filtered or unexported fields
}
func NewGrpcClient ¶
func NewGrpcClient(grpcAddr string) (*GrpcClient, error)
func (*GrpcClient) BroadcastTx ¶
func (c *GrpcClient) BroadcastTx(txBytes []byte) (*tx.BroadcastTxResponse, error)
func (*GrpcClient) Close ¶
func (c *GrpcClient) Close() error
type OracleAccount ¶
type OracleAccount struct {
// contains filtered or unexported fields
}
func NewOracleAccount ¶
func NewOracleAccount(mnemonic string, accNum, index uint32) (*OracleAccount, error)
NewOracleAccount returns an oracle account from mnemonic, account number, and index
func (OracleAccount) AccAddressFromBech32 ¶
func (oa OracleAccount) AccAddressFromBech32() sdk.AccAddress
func (OracleAccount) GetAddress ¶
func (oa OracleAccount) GetAddress() string
func (OracleAccount) GetPrivKey ¶
func (oa OracleAccount) GetPrivKey() cryptotypes.PrivKey
func (OracleAccount) GetPubKey ¶
func (oa OracleAccount) GetPubKey() cryptotypes.PubKey
type QueryClient ¶
type QueryClient struct {
// contains filtered or unexported fields
}
func LoadQueryClient ¶
func NewQueryClient ¶
func NewQueryClient(ctx context.Context, config *config.Config, info TrustedBlockInfo) (*QueryClient, error)
NewQueryClient set QueryClient with rpcClient & and returns, if successful, a QueryClient that can be used to add query function.
func NewQueryClientWithDB ¶
func NewQueryClientWithDB(ctx context.Context, config *config.Config, info *TrustedBlockInfo, db dbm.DB) (*QueryClient, error)
NewQueryClientWithDB creates a QueryClient using a provided DB. If TrustedBlockInfo exists, a new lightClient is created based on this information, and if TrustedBlockInfo is nil, a lightClient is created with information obtained from TrustedStore.
func (QueryClient) Close ¶
func (q QueryClient) Close() error
func (QueryClient) GetAccount ¶
func (q QueryClient) GetAccount(address string) (authtypes.AccountI, error)
GetAccount returns account from address.
func (QueryClient) GetDataSale ¶
func (q QueryClient) GetDataSale(dataHash string, dealID uint64) (*datadealtypes.DataSale, error)
func (QueryClient) GetDeal ¶
func (q QueryClient) GetDeal(dealID uint64) (*datadealtypes.Deal, error)
func (QueryClient) GetLightBlock ¶
func (q QueryClient) GetLightBlock(height int64) (*tmtypes.LightBlock, error)
func (QueryClient) GetOracleParamsPublicKey ¶
func (q QueryClient) GetOracleParamsPublicKey() (*btcec.PublicKey, error)
func (QueryClient) GetOracleRegistration ¶
func (q QueryClient) GetOracleRegistration(oracleAddr, uniqueID string) (*oracletypes.OracleRegistration, error)
func (QueryClient) GetOracleUpgradeInfo ¶
func (q QueryClient) GetOracleUpgradeInfo() (*oracletypes.OracleUpgradeInfo, error)
func (QueryClient) GetStoreData ¶
GetStoreData get data from panacea with storeKey and key, then verify queried data with light client and merkle proof. the returned data type is ResponseQuery.value ([]byte), so recommend to convert to expected type
type TrustedBlockInfo ¶
type TxBuilder ¶
type TxBuilder struct {
// contains filtered or unexported fields
}
func NewTxBuilder ¶
func NewTxBuilder(client QueryClient) *TxBuilder