Comet
dYdX Chain Comet HTTP endpoints.
Comet
dataclass
Bases: Status, Block, BlockResults, Tx, TxSearch, CometRouter
Read-only dYdX Chain Comet HTTP endpoint group.
Source code in pkg/src/dydx/chain/comet/__init__.py
enigma(**kwargs)
classmethod
Create a Comet client for the Enigma mainnet RPC endpoint.
enigma_archive(**kwargs)
classmethod
Create a Comet client for the Enigma archive mainnet RPC endpoint.
imperator(**kwargs)
classmethod
Create a Comet client for the Imperator community mainnet RPC endpoint.
kingnodes(**kwargs)
classmethod
Create a Comet client for the KingNodes mainnet RPC endpoint.
kingnodes_archive(**kwargs)
classmethod
Create a Comet client for the KingNodes archive mainnet RPC endpoint.
lavenderfive(**kwargs)
classmethod
Create a Comet client for the Lavender.Five community mainnet RPC endpoint.
new(base_url, **kwargs)
classmethod
oegs(**kwargs)
classmethod
Create a Comet client for the OEGS mainnet RPC endpoint.
polkachu(**kwargs)
classmethod
Create a Comet client for the Polkachu mainnet RPC endpoint.
polkachu_archive(**kwargs)
classmethod
Create a Comet client for the Polkachu archive mainnet RPC endpoint.
publicnode(**kwargs)
classmethod
Create a Comet client for the PublicNode community mainnet RPC endpoint.
testnet_enigma(**kwargs)
classmethod
Create a Comet client for the Enigma testnet RPC endpoint.
testnet_kingnodes(**kwargs)
classmethod
Create a Comet client for the KingNodes testnet RPC endpoint.
testnet_oegs(**kwargs)
classmethod
Create a Comet client for the OEGS testnet RPC endpoint.
testnet_polkachu(**kwargs)
classmethod
Create a Comet client for the Polkachu testnet RPC endpoint.
Comet status endpoint.
Status
dataclass
Bases: CometEndpoint
Comet status endpoint group.
Source code in pkg/src/dydx/chain/comet/status.py
status(validate=None)
async
Return Comet node health, sync state, and validator info.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
StatusResponse
|
Node status result. |
References
Source code in pkg/src/dydx/chain/comet/status.py
Comet block endpoint.
Block
dataclass
Bases: CometEndpoint
Comet block endpoint group.
Source code in pkg/src/dydx/chain/comet/block.py
block(height=None, validate=None)
async
Return a Comet block by height or the latest block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height
|
int | None
|
Block height to fetch. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
BlockResponse
|
Block result. |
References
Source code in pkg/src/dydx/chain/comet/block.py
Comet block results endpoint.
BlockResults
dataclass
Bases: CometEndpoint
Comet block results endpoint group.
Source code in pkg/src/dydx/chain/comet/block_results.py
block_results(height=None, validate=None)
async
Return ABCI execution results for a block.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
height
|
int | None
|
Block height whose execution results should be returned. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
BlockResultsResponse
|
Block execution results. |
References
Source code in pkg/src/dydx/chain/comet/block_results.py
Comet transaction lookup endpoint.
Tx
dataclass
Bases: CometEndpoint
Comet transaction lookup endpoint group.
Source code in pkg/src/dydx/chain/comet/tx.py
tx(hash, *, prove=None, validate=None)
async
Return one indexed Comet transaction by hash.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
hash
|
str
|
Transaction hash. Comet HTTP accepts the hash with a |
required |
prove
|
bool | None
|
Include a Merkle proof for the transaction. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
TxResponse
|
Transaction lookup result. |
References
Source code in pkg/src/dydx/chain/comet/tx.py
Comet transaction search endpoint.
TxSearch
dataclass
Bases: CometEndpoint
Comet transaction search endpoint group.
Source code in pkg/src/dydx/chain/comet/tx_search.py
tx_search(query, *, prove=None, page=None, per_page=None, order_by=None, validate=None)
async
Search indexed Comet transactions by event query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Comet event query expression. |
required |
prove
|
bool | None
|
Include proofs for returned transactions. |
None
|
page
|
int | None
|
Page number for paginated results. |
None
|
per_page
|
int | None
|
Maximum transactions to return on the page. |
None
|
order_by
|
Literal['asc', 'desc'] | None
|
Sort order for matching transactions. |
None
|
validate
|
bool | None
|
Validation override for this request. |
None
|
Returns:
| Type | Description |
|---|---|
TxSearchResponse
|
Transaction search result. |
References
Source code in pkg/src/dydx/chain/comet/tx_search.py
tx_search_paged(query, *, prove=None, per_page=None, order_by=None, validate=None)
Page through indexed Comet transactions by event query.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
query
|
str
|
Comet event query expression. |
required |
prove
|
bool | None
|
Include proofs for returned transactions. |
None
|
per_page
|
int | None
|
Maximum transactions to return on each page. |
None
|
order_by
|
Literal['asc', 'desc'] | None
|
Sort order for matching transactions. |
None
|
validate
|
bool | None
|
Validation override for each request. |
None
|
Returns:
| Type | Description |
|---|---|
PaginatedResponse[TxResponse, tuple[int, int]]
|
A paginated response yielding matching transaction pages. |