View Source Xogmios.StateQuery.HTTP (xogmios v0.8.0)

Stateless HTTP client for State Query protocol.

This module provides a simpler alternative to the WebSocket-based API for one-off queries without maintaining persistent connections.

Summary

Functions

Sends a State Query via HTTP and returns a response.

Functions

Link to this function

send_query(base_url, query, params \\ %{})

View Source

Sends a State Query via HTTP and returns a response.

This function is stateless and doesn't require a running process.

Support for all Ledger-state and Network queries.

For Ledger-state queries, only the name of the query is needed. For example:

  • send_query(url, "epoch") is the same as send_query(url, "queryLedgerState/epoch")

For Network queries, the prefix "queryNetwork/" is needed:

  • send_query(url, "queryNetwork/blockHeight")