lcd

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UriQueryAccount   = "/auth/accounts/%s"
	UriQueryCIPAL     = "/ipal/ipal/%s"
	UriQueryAIPAL     = "/aipal/node/%s"
	UriQueryAIPALList = "/aipal/list"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AIPALBody added in v1.0.2

type AIPALBody struct {
	Height string      `json:"height"`
	Resutl AIPALResult `json:"result"`
}

type AIPALListBody added in v1.0.2

type AIPALListBody struct {
	Height string        `json:"height"`
	Result []AIPALResult `json:"result"`
}

type AIPALResult added in v1.0.2

type AIPALResult struct {
	OperatorAddress string     `json:"operator_address"`
	Moniker         string     `json:"moniker"`
	Website         string     `json:"website"`
	Details         string     `json:"details"`
	Endpoints       []Endpoint `json:"endpoints"`
	Bond            types.Coin `json:"bond"`
}

type AccountBody added in v1.0.2

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

type AccountResult added in v1.0.2

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

type AccountValue added in v1.0.2

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

type CIPALBody added in v1.0.2

type CIPALBody struct {
	Height string      `json:"height"`
	Resutl CIPALResult `json:"result"`
}

type CIPALResult added in v1.0.2

type CIPALResult struct {
	UserAddress  string             `json:"user_address"`
	ServiceInfos []CIPALServiceInfo `json:"service_infos"`
}

type CIPALServiceInfo added in v1.0.2

type CIPALServiceInfo struct {
	Type    string `json:"type"`
	Address string `json:"address"`
}

type Endpoint added in v1.0.2

type Endpoint struct {
	Type     string `json:"type"`
	Endpoint string `json:"endpoint"`
}

type LiteClient

type LiteClient interface {
	QueryAccount(address string) (AccountBody, error)
	QueryCIPALByAddress(address string) (CIPALBody, error)
	QueryAIPALByAddress(address string) (AIPALBody, error)
	QueryAIPALList() (AIPALListBody, error)
}

func NewClient

func NewClient(c basic.HttpClient) LiteClient

Jump to

Keyboard shortcuts

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