JSON RPC Methods

For more info about the canonical ZK Compression RPC implementation by Helius Labs, refer to the open-source code base.

getCompressedAccount

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedAccount
params*object

Request for compressed account data

Response
Body
context*Context (object)
valueAccount (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedAccount",
      "params": {
        "address": null,
        "hash": "11111111111111111111111111111111"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "address": "11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3",
    "data": {
      "data": "SGVsbG8sIFdvcmxkIQ==",
      "dataHash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
      "discriminator": 100
    },
    "hash": "11111112cMQwSC9qirWGjZM6gLGwW69X22mqwLLGP",
    "lamports": 100,
    "leafIndex": 100,
    "owner": "11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3",
    "seq": 100,
    "slotCreated": 100,
    "tree": "11111112D1oxKts8YPdTJRG5FzxTNpMtWmq8hkVx3"
  }
}

getCompressedBalance

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedBalance
params*object

Request for compressed account data

Response
Body
context*Context (object)
value*UnsignedInteger (integer)
Example: 100
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedBalance",
      "params": {
        "address": null,
        "hash": "11111111111111111111111111111111"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": 100
}

getCompressedBalanceByOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedBalanceByOwner
params*object
Response
Body
context*Context (object)
value*UnsignedInteger (integer)
Example: 100
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedBalanceByOwner",
      "params": {
        "owner": "1111111B4T5ciTCkWauSqVAcVKy88ofjcSamrapud"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": 100
}

getCompressedAccountProof

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedAccountProof
params*object
Response
Body
context*Context (object)
value*MerkleProofWithContext (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedAccountProof",
      "params": {
        "hash": "11111113R2cuenjG5nFubqX9Wzuukdin2YfGQVzu5"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "hash": "11111113R2cuenjG5nFubqX9Wzuukdin2YfGQVzu5",
    "merkleTree": "111111131h1vYVSYuKP6AhS86fbRdMw9XHiZAvAaj",
    "proof": [
      "11111113R2cuenjG5nFubqX9Wzuukdin2YfGQVzu5"
    ],
    "root": "11111113R2cuenjG5nFubqX9Wzuukdin2YfGQVzu5"
  }
}

getMultipleCompressedAccounts

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getMultipleCompressedAccounts
params*object

Request for compressed account data

Response
Body
context*Context (object)
value*AccountList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getMultipleCompressedAccounts",
      "params": {
        "addresses": null,
        "hashes": [
          "1111111QLbz7JHiBTspS962RLKV8GndWFwiEaqKM",
          "1111111ogCyDbaRMvkdsHB3qfdyFYaG1WtRUAfdh"
        ]
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "items": [
      {
        "address": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z",
        "data": {
          "data": "SGVsbG8sIFdvcmxkIQ==",
          "dataHash": "111111193m4hAxmCcGXMfnjVPfNhWSjb69sDgffKu",
          "discriminator": 100
        },
        "hash": "111111193m4hAxmCcGXMfnjVPfNhWSjb69sDgffKu",
        "lamports": 100,
        "leafIndex": 100,
        "owner": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z",
        "seq": 100,
        "slotCreated": 100,
        "tree": "11111118eRTi4fUVRoeYEeeTyL4DPAwxatvWT5q1Z"
      }
    ]
  }
}

getMultipleCompressedAccountProofs

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getMultipleCompressedAccountProofs
params*array of Hash (string)
Response
Body
context*Context (object)
value*array of MerkleProofWithContext (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getMultipleCompressedAccountProofs",
      "params": [
        "11111114DhpssPJgSi1YU7hCMfYt1BJ334YgsffXm"
      ]
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": [
    {
      "hash": "11111114DhpssPJgSi1YU7hCMfYt1BJ334YgsffXm",
      "merkleTree": "11111113pNDtm61yGF8j2ycAwLEPsuWQXobye5qDR",
      "proof": [
        "11111114DhpssPJgSi1YU7hCMfYt1BJ334YgsffXm"
      ],
      "root": "11111114DhpssPJgSi1YU7hCMfYt1BJ334YgsffXm"
    }
  ]
}

getCompressedAccountsByOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedAccountsByOwner
params*object
Response
Body
context*Context (object)
value*PaginatedAccountList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedAccountsByOwner",
      "params": {
        "owner": "11111117qkFjr4u54stuNNUR8fRF8dNhaP35yvANs"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "11111118F5rixNBnFLmioWZSYzjjFuAL5dyoDVzhD",
    "items": [
      {
        "address": "11111117qkFjr4u54stuNNUR8fRF8dNhaP35yvANs",
        "data": {
          "data": "SGVsbG8sIFdvcmxkIQ==",
          "dataHash": "11111118F5rixNBnFLmioWZSYzjjFuAL5dyoDVzhD",
          "discriminator": 100
        },
        "hash": "11111118F5rixNBnFLmioWZSYzjjFuAL5dyoDVzhD",
        "lamports": 100,
        "leafIndex": 100,
        "owner": "11111117qkFjr4u54stuNNUR8fRF8dNhaP35yvANs",
        "seq": 100,
        "slotCreated": 100,
        "tree": "11111117qkFjr4u54stuNNUR8fRF8dNhaP35yvANs"
      }
    ]
  }
}

getCompressedTokenAccountsByOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedTokenAccountsByOwner
params*object
Response
Body
context*Context (object)
value*TokenAccountList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedTokenAccountsByOwner",
      "params": {
        "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "3J98t1WpEZ73CNm",
    "items": [
      {
        "account": {
          "address": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "data": {
            "data": "SGVsbG8sIFdvcmxkIQ==",
            "dataHash": "11111116djSnXB2wXVGT4xDLsfTnkp1p4cCxHAfRq",
            "discriminator": 100
          },
          "hash": "11111116djSnXB2wXVGT4xDLsfTnkp1p4cCxHAfRq",
          "lamports": 100,
          "leafIndex": 100,
          "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "seq": 100,
          "slotCreated": 100,
          "tree": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V"
        },
        "tokenData": {
          "amount": 100,
          "delegate": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "delegatedAmount": 100,
          "isNative": 100,
          "mint": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "state": "initialized"
        }
      }
    ]
  }
}

getCompressedTokenAccountsByDelegate

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedTokenAccountsByDelegate
params*object
Response
Body
context*Context (object)
value*TokenAccountList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedTokenAccountsByDelegate",
      "params": {
        "delegate": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "3J98t1WpEZ73CNm",
    "items": [
      {
        "account": {
          "address": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
          "data": {
            "data": "SGVsbG8sIFdvcmxkIQ==",
            "dataHash": "11111117SQekjmcMtR25wEPPiL6m1Mb5586NkLL4X",
            "discriminator": 100
          },
          "hash": "11111117SQekjmcMtR25wEPPiL6m1Mb5586NkLL4X",
          "lamports": 100,
          "leafIndex": 100,
          "owner": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
          "seq": 100,
          "slotCreated": 100,
          "tree": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB"
        },
        "tokenData": {
          "amount": 100,
          "delegate": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
          "delegatedAmount": 100,
          "isNative": 100,
          "mint": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
          "owner": "11111117353mdUKehx9GW6JNHznGt5oSZs9fWkVkB",
          "state": "initialized"
        }
      }
    ]
  }
}

getCompressedTokenAccountBalance

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedTokenAccountBalance
params*object

Request for compressed account data

Response
Body
context*Context (object)
value*TokenAccountBalance (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedTokenAccountBalance",
      "params": {
        "address": null,
        "hash": "11111111111111111111111111111111"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "amount": 100
  }
}

getCompressedTokenBalancesByOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressedTokenAccountsByOwner
params*object
Response
Body
context*Context (object)
value*TokenAccountList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressedTokenAccountsByOwner",
      "params": {
        "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "3J98t1WpEZ73CNm",
    "items": [
      {
        "account": {
          "address": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "data": {
            "data": "SGVsbG8sIFdvcmxkIQ==",
            "dataHash": "11111116djSnXB2wXVGT4xDLsfTnkp1p4cCxHAfRq",
            "discriminator": 100
          },
          "hash": "11111116djSnXB2wXVGT4xDLsfTnkp1p4cCxHAfRq",
          "lamports": 100,
          "leafIndex": 100,
          "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "seq": 100,
          "slotCreated": 100,
          "tree": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V"
        },
        "tokenData": {
          "amount": 100,
          "delegate": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "delegatedAmount": 100,
          "isNative": 100,
          "mint": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "owner": "11111116EPqoQskEM2Pddp8KTL9JdYEBZMGF3aq7V",
          "state": "initialized"
        }
      }
    ]
  }
}

getTransaction

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getTransactionWithCompressionInfo
params*object
Response
Body
compression_infoobject
transactionobject

An encoded confirmed transaction with status meta

Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getTransactionWithCompressionInfo",
      "params": {
        "signature": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c"
      }
    }),
});
const data = await response.json();
Response
{
  "compression_info": {
    "closedAccounts": [
      {
        "account": {
          "address": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "data": {
            "data": "SGVsbG8sIFdvcmxkIQ==",
            "dataHash": "1111111D596YFweJQuHY1BbjazZYmAbt8jJL2VzVM",
            "discriminator": 100
          },
          "hash": "1111111D596YFweJQuHY1BbjazZYmAbt8jJL2VzVM",
          "lamports": 100,
          "leafIndex": 100,
          "owner": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "seq": 100,
          "slotCreated": 100,
          "tree": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1"
        },
        "optionalTokenData": {
          "amount": 100,
          "delegate": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "delegatedAmount": 100,
          "isNative": 100,
          "mint": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "owner": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "state": "initialized"
        }
      }
    ],
    "openedAccounts": [
      {
        "account": {
          "address": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "data": {
            "data": "SGVsbG8sIFdvcmxkIQ==",
            "dataHash": "1111111D596YFweJQuHY1BbjazZYmAbt8jJL2VzVM",
            "discriminator": 100
          },
          "hash": "1111111D596YFweJQuHY1BbjazZYmAbt8jJL2VzVM",
          "lamports": 100,
          "leafIndex": 100,
          "owner": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "seq": 100,
          "slotCreated": 100,
          "tree": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1"
        },
        "optionalTokenData": {
          "amount": 100,
          "delegate": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "delegatedAmount": 100,
          "isNative": 100,
          "mint": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "owner": "1111111CfoVZ9eMbESQia3WiAfF4dtpFdUMcnvAB1",
          "state": "initialized"
        }
      }
    ]
  }
}

getCompressionSignaturesForAccount

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressionSignaturesForAccount
params*object
Response
Body
context*Context (object)
value*SignatureInfoList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressionSignaturesForAccount",
      "params": {
        "hash": "1111111DspJWUYDimq3AsTmnRfCX1iB99FBkVff83"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "items": [
      {
        "blockTime": 1714081554,
        "signature": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c",
        "slot": 100
      }
    ]
  }
}

getCompressionSignaturesForAddress

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressionSignaturesForAddress
params*object
Response
Body
context*Context (object)
value*PaginatedSignatureInfoList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressionSignaturesForAddress",
      "params": {
        "address": "1111111EH9uVaqWRxHuzJbroqzX18yxmeW8TjFVSP"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "text",
    "items": [
      {
        "blockTime": 1714081554,
        "signature": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c",
        "slot": 100
      }
    ]
  }
}

getCompressionSignaturesForOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressionSignaturesForOwner
params*object
Response
Body
context*Context (object)
value*PaginatedSignatureInfoList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressionSignaturesForOwner",
      "params": {
        "owner": "1111111F5q7ToS5rKDfdAt2rgf9yPXY2f21tCRA55"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "text",
    "items": [
      {
        "blockTime": 1714081554,
        "signature": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c",
        "slot": 100
      }
    ]
  }
}

getCompressionSignaturesForTokenOwner

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getCompressionSignaturesForTokenOwner
params*object
Response
Body
context*Context (object)
value*PaginatedSignatureInfoList (object)
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getCompressionSignaturesForTokenOwner",
      "params": {
        "owner": "1111111FtWKS22fGg9RG3ACuXKnwe57HfXuJfaphm"
      }
    }),
});
const data = await response.json();
Response
{
  "context": {
    "slot": 100
  },
  "value": {
    "cursor": "text",
    "items": [
      {
        "blockTime": 1714081554,
        "signature": "5J8H5sTvEhnGcB4R8K1n7mfoiWUD9RzPVGES7e3WxC7c",
        "slot": 100
      }
    ]
  }
}

getIndexerHealth

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getIndexerHealth
Response
Body
enum

ok if healthy

ok
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getIndexerHealth"
    }),
});
const data = await response.json();
Response
"ok"

getIndexerSlot

POSThttp://127.0.0.1/
Body
id*enum

An ID to identify the request.

test-account
jsonrpc*enum

The version of the JSON-RPC protocol.

2.0
method*enum

The name of the method to invoke.

getIndexerSlot
Response
Body
integer
Example: 100
Request
const response = await fetch('http://127.0.0.1/', {
    method: 'POST',
    headers: {
      "Content-Type": "application/json"
    },
    body: JSON.stringify({
      "jsonrpc": "2.0",
      "id": "test-account",
      "method": "getIndexerSlot"
    }),
});
const data = await response.json();
Response
100

Last updated