panacea

package
v0.0.1-alpha1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoinType             = 371
	AccountAddressPrefix = "panacea"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GrpcClient

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

func (*GrpcClient) Close

func (c *GrpcClient) Close() error

func (*GrpcClient) GetAccount

func (c *GrpcClient) GetAccount(panaceaAddr string) (authtypes.AccountI, error)

func (*GrpcClient) GetDataCerts

func (c *GrpcClient) GetDataCerts(poolID, round uint64) ([]datapooltypes.DataCert, error)

func (*GrpcClient) GetDataPassRedeemHistory

func (c *GrpcClient) GetDataPassRedeemHistory(redeemer string, poolID uint64) (datapooltypes.DataPassRedeemHistory, error)

func (*GrpcClient) GetDeal

func (c *GrpcClient) GetDeal(id string) (datadealtypes.Deal, error)

GetDeal gets deal info from blockchain

func (*GrpcClient) GetPool

func (c *GrpcClient) GetPool(id string) (datapooltypes.Pool, error)

func (*GrpcClient) GetPubKey

func (c *GrpcClient) GetPubKey(panaceaAddr string) (types.PubKey, error)

GetPubKey gets the public key from blockchain.

func (*GrpcClient) GetRegisteredOracle

func (c *GrpcClient) GetRegisteredOracle(address string) (*oracletypes.Oracle, error)

GetRegisteredOracle gets registered oracle

type GrpcClientI

type GrpcClientI interface {
	Close() error

	GetPubKey(panaceaAddr string) (types.PubKey, error)

	GetAccount(panaceaAddr string) (authtypes.AccountI, error)

	GetDeal(id string) (datadealtypes.Deal, error)

	GetPool(id string) (datapooltypes.Pool, error)

	GetDataPassRedeemHistory(redeemer string, poolID uint64) (datapooltypes.DataPassRedeemHistory, error)

	GetDataCerts(poolID, round uint64) ([]datapooltypes.DataCert, error)

	GetRegisteredOracle(address string) (*oracletypes.Oracle, error)
}

func NewGrpcClient

func NewGrpcClient(conf *config.Config) (GrpcClientI, error)

type OracleAccount

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

func NewOracleAccount

func NewOracleAccount(mnemonic string) (*OracleAccount, error)

func (OracleAccount) AccAddressFromBech32

func (v OracleAccount) AccAddressFromBech32() sdk.AccAddress

func (OracleAccount) GetAddress

func (v OracleAccount) GetAddress() string

func (OracleAccount) GetSecp256k1PrivKey

func (v OracleAccount) GetSecp256k1PrivKey() tmcrypto.PrivKey

func (OracleAccount) GetSecp256k1PubKey

func (v OracleAccount) GetSecp256k1PubKey() tmcrypto.PubKey

Jump to

Keyboard shortcuts

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