Documentation
¶
Index ¶
Constants ¶
View Source
const ( MethodGet = "get" MethodFileList = "file_list" MethodAccountList = "account_list" MethodStatus = "status" MethodResolve = "resolve" MethodClaimSearch = "claim_search" )
Variables ¶
This section is empty.
Functions ¶
func MethodAcceptsWallet ¶
MethodAcceptsWallet returns true for methods that can accept wallet_id
func MethodRequiresWallet ¶
MethodRequiresWallet returns true for methods that require wallet_id
Types ¶
type Caller ¶
type Caller struct {
// Preprocessor is applied to query before it's sent to the SDK.
Preprocessor func(q *Query)
// Cache stores cachable queries to improve performance
Cache cache.QueryCache
// contains filtered or unexported fields
}
Caller patches through JSON-RPC requests from clients, doing pre/post-processing, account processing and validation.
type Query ¶
type Query struct {
Request *jsonrpc.RPCRequest
WalletID string
}
Query is a wrapper around client JSON-RPC query for easier (un)marshaling and processing.
func NewQuery ¶
func NewQuery(req *jsonrpc.RPCRequest, walletID string) (*Query, error)
NewQuery initializes Query object with JSON-RPC request supplied as bytes. The object is immediately usable and returns an error in case request parsing fails. If wallet_id is not empty, it will be added as a param to the query when the Caller calls it.
func (*Query) ParamsAsMap ¶
ParamsAsMap returns query params converted to plain map.
Click to show internal directories.
Click to hide internal directories.