mirror of
https://github.com/luxfi/node.git
synced 2026-10-30 15:24:05 +00:00
The primary-network chains answer to either case; one spelling beats two. /v1/chain/c/rpc, /v1/chain/p, /v1/chain/x across the estate. Co-authored-by: Hanzo Dev <[email protected]>
1.3 KiB
1.3 KiB
ProposerVM API
The ProposerVM API allows clients to fetch information about a chain's Consensusman++ wrapper information.
Endpoint
/v1/chain/{blockchainID}/proposervm
Format
This API uses the JSON-RPC 2.0 RPC format.
Methods
proposervm.getProposedHeight
Returns this node's current proposer VM height.
Signature:
proposervm.getProposedHeight() ->
{
height: int,
}
Example Call:
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "proposervm.getProposedHeight",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/v1/chain/p/proposervm
Example Response:
{
"jsonrpc": "2.0",
"result": {
"height": "56"
},
"id": 1
}
proposervm.getCurrentEpoch
Returns the current epoch information.
Signature:
proposervm.getCurrentEpoch() ->
{
number: int,
startTime: int,
pChainHeight: int
}
Example Call:
curl -X POST --data '{
"jsonrpc": "2.0",
"method": "proposervm.getCurrentEpoch",
"params": {},
"id": 1
}' -H 'content-type:application/json;' 127.0.0.1:9650/v1/chain/p/proposervm
Example Response:
{
"jsonrpc": "2.0",
"result": {
"number": "56",
"startTime":"1755802182",
"pChainHeight": "21857141"
},
"id": 1
}