Documentation
¶
Overview ¶
Package query provides access to the RPC server
Index ¶
- func Query[T any](chain string, method string, params Params) (*T, error)
- func QueryBatch[T any](chain string, batchPayload []BatchPayload) (map[string]*T, error)
- func QueryBatchWithHeaders[T any](chain string, headers map[string]string, batchPayload []BatchPayload) (map[string]*T, error)
- func QueryUrl[T any](url string, method string, params Params) (*T, error)
- func QueryWithHeaders[T any](url string, headers map[string]string, method string, params Params) (*T, error)
- type BatchPayload
- type Params
- type Payload
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryBatch ¶
func QueryBatch[T any](chain string, batchPayload []BatchPayload) (map[string]*T, error)
QueryBatch batches requests to the node. Returned values are stored in map, with the same keys as defined in `batchPayload` (this way we don't have to operate on array indices)
func QueryBatchWithHeaders ¶
Types ¶
type BatchPayload ¶
BatchPayload is a wrapper around Payload type that allows us to associate a name (Key) to given request.
Click to show internal directories.
Click to hide internal directories.