lcd

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UriQueryAccount      = "/auth/accounts/%s"
	UriQueryContractLogs = "/vm/logs/%s"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountBody

type AccountBody struct {
	Height string        `json:"height"`
	Result AccountResult `json:"result"`
}

type AccountResult

type AccountResult struct {
	Type  string       `json:"type"`
	Value AccountValue `json:"value"`
}

type AccountValue

type AccountValue struct {
	Address       string       `json:"address"`
	Coins         []types.Coin `json:"coins"`
	AccountNumber string       `json:"account_number"`
	Sequence      string       `json:"sequence"`
}

type ContractLog

type ContractLog struct {
	Height string `json:"height"`
	Result VMLogs `json:"result"`
}

type LcdClient

type LcdClient interface {
	QueryAccount(address string) (AccountBody, error)
	QueryContractLog(txId []byte) (ContractLog, error)
}

func NewClient

func NewClient(c basic.HttpClient) LcdClient

type VMLog

type VMLog struct {
	Address          string   `json:"address"`
	Topics           []string `json:"topics"`
	Data             string   `json:"data"`
	BlockNumber      string   `json:"blockNumber"`
	TransactionHash  string   `json:"transactionHash"`
	TransactionIndex string   `json:"transactionIndex"`
	BlockHash        string   `json:"blockHash"`
	LogIndex         string   `json:"logIndex"`
	Removed          bool     `json:"removed"`
}

type VMLogs

type VMLogs struct {
	Logs []VMLog `json:"logs"`
}

Jump to

Keyboard shortcuts

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