Struct hyperfuel_net_types::Query
source · pub struct Query {
pub from_block: u64,
pub to_block: Option<u64>,
pub receipts: Vec<ReceiptSelection>,
pub inputs: Vec<InputSelection>,
pub outputs: Vec<OutputSelection>,
pub include_all_blocks: bool,
pub field_selection: FieldSelection,
pub max_num_blocks: Option<usize>,
pub max_num_transactions: Option<usize>,
}
Fields§
§from_block: u64
The block to start the query from
to_block: Option<u64>
The block to end the query at. If not specified, the query will go until the end of data. Exclusive, the returned range will be [from_block..to_block).
The query will return before it reaches this target block if it hits the time limit configured on the server. The user should continue their query by putting the next_block field in the response into from_block field of their next query. This implements pagination.
receipts: Vec<ReceiptSelection>
List of receipt selections, the query will return receipts that match any of these selections and it will return receipts that are related to the returned objects.
inputs: Vec<InputSelection>
List of input selections, the query will return inputs that match any of these selections and it will return inputs that are related to the returned objects.
outputs: Vec<OutputSelection>
List of output selections, the query will return outputs that match any of these selections and it will return outputs that are related to the returned objects.
include_all_blocks: bool
Weather to include all blocks regardless of if they are related to a returned transaction or log. Normally the server will return only the blocks that are related to the transaction or logs in the response. But if this is set to true, the server will return data for all blocks in the requested range [from_block, to_block).
field_selection: FieldSelection
Field selection. The user can select which fields they are interested in, requesting less fields will improve query execution time and reduce the payload size so the user should always use a minimal number of fields.
max_num_blocks: Option<usize>
Maximum number of blocks that should be returned, the server might return more blocks than this number but it won’t overshoot by too much.
max_num_transactions: Option<usize>
Maximum number of transactions that should be returned, the server might return more transactions than this number but it won’t overshoot by too much.