HashiProver API

The HashiProver API enables developers to easily interact with Hashi's cross-chain storage and state verification functionalities programmatically.

Below is the list of available API calls, with detailed descriptions of their parameters, request methods, and expected responses.

Invoke a JSON-RPC method

post

This endpoint is used to call various JSON-RPC methods supported by the Hashi server. It accepts a JSON object that specifies the method and its parameters.

Body
jsonrpcstringRequired

Specifies the JSON-RPC protocol version. This API supports version 2.0.

Example: 2.0
methodstring · enumRequired

Indicates the JSON-RPC method to invoke. The available methods are specific to Hashi functionality and are listed below.

Possible values:
paramsone ofOptional

An object containing parameters specific to the JSON-RPC method being called. The structure of this object varies depending on the method.

idintegerRequired

A unique identifier for this request, used to match the response with the request in JSON-RPC communication.

Responses
200
A successful JSON-RPC response
application/json
post
POST /v1 HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 148

{
  "jsonrpc": "2.0",
  "method": "hashi_getAccountAndStorageProof",
  "params": {
    "chainId": 1,
    "storageKeys": [],
    "blockNumber": 1,
    "ancestralBlockNumber": 1
  },
  "id": 1
}
200

A successful JSON-RPC response

{
  "jsonrpc": "text",
  "result": {},
  "error": {},
  "id": 1
}

Last updated