lib

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cdc = MakeCodec()
View Source
var QOSCdc = MakeCodec()

Functions

func Bech32AddressToHex added in v0.0.4

func Bech32AddressToHex(addr string) string

func MakeCodec

func MakeCodec() *amino.Codec

func PubkeyToBech32Address added in v0.0.4

func PubkeyToBech32Address(hrp string, t, val string) string

Types

type CLIContext added in v0.0.4

type CLIContext struct {
	Codec           *amino.Codec
	Client          client.Client
	Logger          io.Writer
	Height          int64
	NodeURI         string
	FromAddressName string
	AccountStore    string
	KVStore         string
	TrustNode       bool
	UseLedger       bool
	Async           bool
	JSON            bool
	PrintResponse   bool
	Verifier        lite.Verifier
}

func (CLIContext) WithCodec added in v0.0.4

func (ctx CLIContext) WithCodec(cdc *amino.Codec) CLIContext

WithCodec returns a copy of the context with an updated codec.

func (CLIContext) WithLogger added in v0.0.4

func (ctx CLIContext) WithLogger(w io.Writer) CLIContext

WithLogger returns a copy of the context with an updated logger.

type CosmosCli added in v0.0.4

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

func NewCosmosCli added in v0.0.4

func NewCosmosCli(remote string) CosmosCli

func (CosmosCli) Txs added in v0.0.4

func (cc CosmosCli) Txs(txs []string) ([]ResultCosmosTx, error)

type QstarsAgentCli added in v0.0.4

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

func NewQstarsAgentCli added in v0.0.4

func NewQstarsAgentCli(remote string) QstarsAgentCli

func (QstarsAgentCli) Txs added in v0.0.4

func (cc QstarsAgentCli) Txs(txs []string) ([]ResultQstarsAgentTx, error)

type QstarsClient

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

func NewQstarsClient

func NewQstarsClient(nodeURI string) *QstarsClient

func (QstarsClient) MarshalJSON

func (c QstarsClient) MarshalJSON(o interface{}) ([]byte, error)

func (QstarsClient) MarshalJSONIndent

func (c QstarsClient) MarshalJSONIndent(o interface{}, prefix, indent string) ([]byte, error)

func (QstarsClient) QueryAccount

func (c QstarsClient) QueryAccount(addr string) (*types.ResultAccount, error)

QueryAccount query account by addr

func (QstarsClient) SequenctIn

func (c QstarsClient) SequenctIn(chainID string) (int64, error)

QuerySequenceIn query sequence in

func (QstarsClient) SequenctOut

func (c QstarsClient) SequenctOut(chainID string) (int64, error)

QuerySequenceOut query sequence out

func (QstarsClient) UnmarshalBinaryBare

func (c QstarsClient) UnmarshalBinaryBare(bz []byte, ptr interface{}) error

func (QstarsClient) UnmarshalJSON

func (c QstarsClient) UnmarshalJSON(bz []byte, ptr interface{}) error

type ResultCosmosTx added in v0.0.4

type ResultCosmosTx struct {
	Status int    `json:"status"`
	Txs    []Tx   `json:"txs"`
	Fee    string `json:"fee"`
	IsOK   bool   `json:"isOk"`
	Err    string `json:"err"`
}

type ResultQstarsAgentTx added in v0.0.4

type ResultQstarsAgentTx struct {
	Status int    `json:"status"`
	Tx     Tx     `json:"txs"`
	IsOK   bool   `json:"isOk"`
	Err    string `json:"err"`
}

type TmClient added in v0.0.3

type TmClient struct {
	*client.HTTP
	// contains filtered or unexported fields
}

func TendermintClient

func TendermintClient(remote string) *TmClient

func (*TmClient) COSMOSValidator added in v0.0.6

func (tc *TmClient) COSMOSValidator(height int64) ([]types.Validator, error)

COSMOSValidator同步信息

func (*TmClient) ChainID added in v0.0.4

func (tc *TmClient) ChainID() (string, error)

func (*TmClient) QOSValidator added in v0.0.4

func (tc *TmClient) QOSValidator(height int64) ([]types.Validator, error)

QOSValidator 同步最新的validator状态

func (*TmClient) QOSValidatorV0_0_4 added in v0.0.4

func (tc *TmClient) QOSValidatorV0_0_4(height int64) ([]types.Validator, error)

QOSValidator 同步最新的validator状态

func (*TmClient) RetrieveBlock added in v0.0.4

func (tc *TmClient) RetrieveBlock(height *int64) (*types.Block, error)

func (*TmClient) RetrieveTx added in v0.0.4

func (tc *TmClient) RetrieveTx(txHash []byte) (*types.Tx, error)

func (*TmClient) RetrieveTxResult added in v0.0.4

func (tc *TmClient) RetrieveTxResult(tx []byte) types.TxStatus

func (*TmClient) Validator added in v0.0.4

func (tc *TmClient) Validator(height int64) ([]types.Validator, error)

ValidatorLoop 同步最新的validator状态

type Tx added in v0.0.4

type Tx struct {
	Type string          `json:"type"`
	Data json.RawMessage `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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