Documentation
¶
Index ¶
- func Client(node string) *client.HTTP
- func GetAccount(node client.ABCIClient, addr address.Address) (*backing.AccountData, *rpctypes.ResultABCIQuery, error)
- func GetAccountHistory(node client.ABCIClient, params search.AccountHistoryParams) (*search.AccountHistoryResponse, *rpctypes.ResultABCIQuery, error)
- func GetAccountList(node client.ABCIClient, after string, limit int) (*query.AccountListQueryResponse, *rpctypes.ResultABCIQuery, error)
- func GetAccountListBatch(node client.ABCIClient) ([]address.Address, error)
- func GetCurrencySeats(node client.ABCIClient) ([]address.Address, error)
- func GetDelegates(node client.ABCIClient) (map[address.Address][]address.Address, *rpctypes.ResultABCIQuery, error)
- func GetSIB(node client.ABCIClient) (sib query.SIBResponse, resp *rpctypes.ResultABCIQuery, err error)
- func GetSearchResults(node client.ABCIClient, params search.QueryParams) (string, error)
- func GetSequence(node client.ABCIClient, addr address.Address) (uint64, error)
- func GetSummary(node client.ABCIClient) (*query.Summary, *rpctypes.ResultABCIQuery, error)
- func Info(node client.StatusClient) (*rpctypes.ResultStatus, error)
- func MarketPriceHistory(node client.ABCIClient, params srch.PriceQueryParams) (srch.PriceQueryResults, error)
- func Nodes(node NodesClient) chan NodeResponse
- func Prevalidate(node client.ABCIClient, tx metatx.Transactable, logger logrus.FieldLogger) (fee math.Ndau, sib math.Ndau, resp *rpctypes.ResultABCIQuery, err error)
- func RegisteredNodes(node client.ABCIClient) (query.NodesResponse, error)
- func ResultLog(result interface{}) string
- func SearchDateRange(node client.ABCIClient, first, last string) (uint64, uint64, error)
- func SendAsync(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
- func SendCommit(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
- func SendSync(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
- func Sysvar(node client.ABCIClient, name string, example msgp.Unmarshaler) error
- func SysvarHistory(node client.ABCIClient, name string, after uint64, limit int) (*query.SysvarHistoryResponse, *rpctypes.ResultABCIQuery, error)
- func Sysvars(node client.ABCIClient, vars ...string) (map[string][]byte, *rpctypes.ResultABCIQuery, error)
- func SysvarsAsJSON(svs map[string][]byte) (jsvs map[string]interface{}, err error)
- func TargetPriceHistory(node client.ABCIClient, params srch.PriceQueryParams) (srch.PriceQueryResults, error)
- func Version(node client.ABCIClient) (string, *rpctypes.ResultABCIQuery, error)
- type JSONClient
- func (JSONClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)
- func (JSONClient) ABCIQuery(path string, data cmn.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (JSONClient) ABCIQueryWithOptions(path string, data cmn.HexBytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
- func (j JSONClient) BroadcastTxAsync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
- func (j JSONClient) BroadcastTxCommit(tx ttypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)
- func (j JSONClient) BroadcastTxSync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
- type NodeResponse
- type NodesClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Client ¶
Client sets up a client connection to a Tendermint node from its address
The returned type *client.HTTP implements the client.ABCIClient interface
func GetAccount ¶
func GetAccount(node client.ABCIClient, addr address.Address) ( *backing.AccountData, *rpctypes.ResultABCIQuery, error, )
GetAccount gets the account data associated with a given address
func GetAccountHistory ¶
func GetAccountHistory(node client.ABCIClient, params search.AccountHistoryParams) ( *search.AccountHistoryResponse, *rpctypes.ResultABCIQuery, error, )
GetAccountHistory gets account data history associated with a given address.
func GetAccountList ¶
func GetAccountList(node client.ABCIClient, after string, limit int) ( *query.AccountListQueryResponse, *rpctypes.ResultABCIQuery, error, )
GetAccountList gets a list of account names, paged according to the params Pass in after = "" (which is less than all nonempty strings) and limit = 0 to get all results. (Note that the ndauapi will enforce a limit of 100 items.)
func GetAccountListBatch ¶
func GetAccountListBatch(node client.ABCIClient) ([]address.Address, error)
GetAccountListBatch abstracts over the process of repeatedly calling GetAccountList in order to get a complete list of all known addresses.
This function makes a best-effort attempt to return a complete and current list of accounts known to the node, but true consistency is impossible using a sequential paged API; as we cannot lock the node, there may be updates during paging which cause addresses to appear in pages we have already visited. This is unavoidable.
func GetCurrencySeats ¶
func GetCurrencySeats(node client.ABCIClient) ([]address.Address, error)
GetCurrencySeats gets a list of ndau currency seats
Currency seats are defined as those accounts containing more than 1000 ndau.
func GetDelegates ¶
func GetDelegates(node client.ABCIClient) (map[address.Address][]address.Address, *rpctypes.ResultABCIQuery, error)
GetDelegates gets the set of nodes with delegates, and the list of accounts delegated to each
func GetSIB ¶
func GetSIB(node client.ABCIClient) ( sib query.SIBResponse, resp *rpctypes.ResultABCIQuery, err error, )
GetSIB returns the current SIB in effect
func GetSearchResults ¶
func GetSearchResults(node client.ABCIClient, params search.QueryParams) ( string, error, )
GetSearchResults returns search results for a given search query.
func GetSequence ¶
GetSequence gets the current sequence number of a particular account
func GetSummary ¶
func GetSummary(node client.ABCIClient) (*query.Summary, *rpctypes.ResultABCIQuery, error)
GetSummary gets the summary information from the state
func Info ¶
func Info(node client.StatusClient) (*rpctypes.ResultStatus, error)
Info gets the node's current information
func MarketPriceHistory ¶
func MarketPriceHistory( node client.ABCIClient, params srch.PriceQueryParams, ) (srch.PriceQueryResults, error)
MarketPriceHistory returns historical data for the ndau market price
func Nodes ¶
func Nodes(node NodesClient) chan NodeResponse
Nodes returns NodeInfo asyncronously.
This function is DEPRECATED
func Prevalidate ¶
func Prevalidate(node client.ABCIClient, tx metatx.Transactable, logger logrus.FieldLogger) ( fee math.Ndau, sib math.Ndau, resp *rpctypes.ResultABCIQuery, err error, )
Prevalidate prevalidates the provided transactable
func RegisteredNodes ¶
func RegisteredNodes(node client.ABCIClient) (query.NodesResponse, error)
RegisteredNodes returns the nodes which have registered themselves on the blockchain
func ResultLog ¶
func ResultLog(result interface{}) string
ResultLog extracts the log message(s) from the result of a broadcast
func SearchDateRange ¶
SearchDateRange returns the first and last block heights for the given ISO-3339 date range.
func SendAsync ¶
func SendAsync(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
SendAsync broadcasts a transaction with async semantics
func SendCommit ¶
func SendCommit(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
SendCommit broadcasts and commits a transaction
func SendSync ¶
func SendSync(node client.ABCIClient, tx metatx.Transactable) (interface{}, error)
SendSync broadcasts a transaction with Sync semantics
func Sysvar ¶
func Sysvar(node client.ABCIClient, name string, example msgp.Unmarshaler) error
Sysvar gets a single system variable given its name and an example of its type
The example is populated with the appropriate data
func SysvarHistory ¶
func SysvarHistory( node client.ABCIClient, name string, after uint64, limit int, ) (*query.SysvarHistoryResponse, *rpctypes.ResultABCIQuery, error)
SysvarHistory gets the value history of the given sysvar. Pass in 0,0 for the paging params to get the entire history.
func Sysvars ¶
func Sysvars(node client.ABCIClient, vars ...string) ( map[string][]byte, *rpctypes.ResultABCIQuery, error, )
Sysvars gets the version the connected node is running
func SysvarsAsJSON ¶
SysvarsAsJSON converts a msgp-encoded sysvar map into a json-encoded one
Either jsvs or err will always be nil on return, but never both.
func TargetPriceHistory ¶
func TargetPriceHistory( node client.ABCIClient, params srch.PriceQueryParams, ) (srch.PriceQueryResults, error)
TargetPriceHistory returns historical data for the ndau target price
func Version ¶
func Version(node client.ABCIClient) ( string, *rpctypes.ResultABCIQuery, error, )
Version gets the version the connected node is running
Types ¶
type JSONClient ¶
JSONClient conforms to the client.ABCIClient interface, but is not in fact an ABCI client. Instead, it marshals incoming transactions into their canonical JSON forms and emits them on the internal writer, defaulting to stdout
func NewJSONClient ¶
func NewJSONClient(pretty bool) JSONClient
NewJSONClient creates a new JSONClient
func (JSONClient) ABCIInfo ¶
func (JSONClient) ABCIInfo() (*ctypes.ResultABCIInfo, error)
ABCIInfo implements ABCIClient
func (JSONClient) ABCIQuery ¶
func (JSONClient) ABCIQuery(path string, data cmn.HexBytes) (*ctypes.ResultABCIQuery, error)
ABCIQuery implements ABCIClient Note - before tm 0.33.0: func (JSONClient) ABCIQuery(path string, data []byte) (*ctypes.ResultABCIQuery, error) {
func (JSONClient) ABCIQueryWithOptions ¶
func (JSONClient) ABCIQueryWithOptions(path string, data cmn.HexBytes, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
ABCIQueryWithOptions implements ABCIClient Note - before tm 0.33.0: func (JSONClient) ABCIQueryWithOptions(path string, data []byte, opts client.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error) {
func (JSONClient) BroadcastTxAsync ¶
func (j JSONClient) BroadcastTxAsync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxAsync implements ABCIClient
func (JSONClient) BroadcastTxCommit ¶
func (j JSONClient) BroadcastTxCommit(tx ttypes.Tx) (*ctypes.ResultBroadcastTxCommit, error)
BroadcastTxCommit implements ABCIClient
func (JSONClient) BroadcastTxSync ¶
func (j JSONClient) BroadcastTxSync(tx ttypes.Tx) (*ctypes.ResultBroadcastTx, error)
BroadcastTxSync implements ABCIClient
type NodeResponse ¶
type NodeResponse struct {
Err error
Nodes []p2p.DefaultNodeInfo
}
NodeResponse represents a response from the nodes call.
This type is DEPRECATED
type NodesClient ¶
type NodesClient interface {
client.StatusClient
client.NetworkClient
}
NodesClient is the interface required by the Nodes function
This type is DEPRECATED