query

package
v1.99.99 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2023 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

View Source
const (
	AccountEndpoint        = "/account"
	AccountHistoryEndpoint = "/accounthistory"
	AccountListEndpoint    = "/accountlist"
	DateRangeEndpoint      = "/daterange"
	DelegatesEndpoint      = "/delegates"
	NodesEndpoint          = "/nodes"
	PrevalidateEndpoint    = "/prevalidate"
	PriceTargetEndpoint    = "/price/target"
	PriceMarketEndpoint    = "/price/market"
	SearchEndpoint         = "/search"
	SIBEndpoint            = "/sib"
	SummaryEndpoint        = "/summary"
	SysvarHistoryEndpoint  = "/sysvarhistory"
	SysvarsEndpoint        = "/sysvars"
	VersionEndpoint        = "/version"
)

These constants define the endpoints at which the Tm RPC will forward requests

View Source
const (
	AccountInfoFmt           = "acct exists: %t"
	PrevalidateInfoFmt       = "estimated tx fee: %d napu; estimated sib: %d napu"
	SidechainTxExistsInfoFmt = "sidechain tx paid for and validated: %t"
)

These constants define the format strings which controls the information in the Info field of the relevant queries

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountListQueryResponse

type AccountListQueryResponse struct {
	NumAccounts int
	FirstIndex  int
	After       string
	NextAfter   string
	Accounts    []string
}

AccountListQueryResponse is the return value from the /accountlist endpoint

func (*AccountListQueryResponse) MarshalMsg

func (z *AccountListQueryResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*AccountListQueryResponse) Msgsize

func (z *AccountListQueryResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*AccountListQueryResponse) UnmarshalMsg

func (z *AccountListQueryResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type DelegateList

type DelegateList struct {
	Node      address.Address
	Delegated []address.Address
}

DelegateList lists the accounts delegated to a particular node

func (*DelegateList) MarshalMsg

func (z *DelegateList) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*DelegateList) Msgsize

func (z *DelegateList) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*DelegateList) UnmarshalMsg

func (z *DelegateList) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type DelegatesResponse

type DelegatesResponse []DelegateList

DelegatesResponse is the return value from the /delegates endpoint

Note that this is _not_ a standard MSGP-able struct; it must instead be marshalled and unmarshalled using msgp.(Un)MarshalIntf methods

func (DelegatesResponse) MarshalMsg

func (z DelegatesResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (DelegatesResponse) Msgsize

func (z DelegatesResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*DelegatesResponse) UnmarshalMsg

func (z *DelegatesResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type NodeExtra

type NodeExtra struct {
	Node         backing.Node    `json:"node"`
	Registration types.Timestamp `json:"registration"`
}

NodeExtra has managed data which would not otherwise be captured by the JSON format of a node

func (*NodeExtra) MarshalMsg

func (z *NodeExtra) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*NodeExtra) Msgsize

func (z *NodeExtra) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*NodeExtra) UnmarshalMsg

func (z *NodeExtra) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type NodesResponse

type NodesResponse map[string]NodeExtra

NodesResponse is the return value from the /nodes endpoint

func (NodesResponse) MarshalMsg

func (z NodesResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (NodesResponse) Msgsize

func (z NodesResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*NodesResponse) UnmarshalMsg

func (z *NodesResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SIBResponse

type SIBResponse struct {
	SIB         eai.Rate
	TargetPrice pricecurve.Nanocent
	MarketPrice pricecurve.Nanocent
	FloorPrice  pricecurve.Nanocent
}

SIBResponse is the return value from the /sib endpoint

This includes market and target price values so end users can check our math

func (*SIBResponse) MarshalMsg

func (z *SIBResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SIBResponse) Msgsize

func (z *SIBResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SIBResponse) UnmarshalMsg

func (z *SIBResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SidechainTxExistsQuery

type SidechainTxExistsQuery struct {
	SidechainID byte
	Source      address.Address
	TxHash      string
}

SidechainTxExistsQuery specifies a particular sidechain tx

func (*SidechainTxExistsQuery) MarshalMsg

func (z *SidechainTxExistsQuery) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SidechainTxExistsQuery) Msgsize

func (z *SidechainTxExistsQuery) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SidechainTxExistsQuery) UnmarshalMsg

func (z *SidechainTxExistsQuery) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type Summary

type Summary struct {
	BlockHeight      uint64
	TotalNdau        types.Ndau
	NumAccounts      int
	TotalRFE         types.Ndau
	TotalIssue       types.Ndau
	TotalBurned      types.Ndau
	TotalCirculation types.Ndau
}

Summary is the return value from the /summary endpoint

func (*Summary) MarshalMsg

func (z *Summary) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*Summary) Msgsize

func (z *Summary) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*Summary) UnmarshalMsg

func (z *Summary) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SysvarHistoricalValue

type SysvarHistoricalValue struct {
	Height uint64 `json:"height"`
	Value  []byte `json:"value"`
}

SysvarHistoricalValue is a value, and the height at which it was set

func (*SysvarHistoricalValue) MarshalMsg

func (z *SysvarHistoricalValue) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SysvarHistoricalValue) Msgsize

func (z *SysvarHistoricalValue) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SysvarHistoricalValue) UnmarshalMsg

func (z *SysvarHistoricalValue) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SysvarHistoryResponse

type SysvarHistoryResponse struct {
	History []SysvarHistoricalValue `json:"history"`
}

SysvarHistoryResponse returns the history of a key over time.

For compactness, history is compressed, and records are only returned for those blocks on which the value changed.

func (*SysvarHistoryResponse) MarshalMsg

func (z *SysvarHistoryResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*SysvarHistoryResponse) Msgsize

func (z *SysvarHistoryResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SysvarHistoryResponse) UnmarshalMsg

func (z *SysvarHistoryResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SysvarsRequest

type SysvarsRequest []string

SysvarsRequest is the request value for the /sysvars endpoint

If set, only the named sysvars are returned

func (SysvarsRequest) MarshalMsg

func (z SysvarsRequest) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SysvarsRequest) Msgsize

func (z SysvarsRequest) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SysvarsRequest) UnmarshalMsg

func (z *SysvarsRequest) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type SysvarsResponse

type SysvarsResponse map[string][]byte

SysvarsResponse is the return value from the /sysvars endpoint

func (SysvarsResponse) MarshalMsg

func (z SysvarsResponse) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (SysvarsResponse) Msgsize

func (z SysvarsResponse) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*SysvarsResponse) UnmarshalMsg

func (z *SysvarsResponse) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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