Users and developers can interface with the node, sequencer, and signature prover using a JSON-RPC API, which we will outline below. In the per-endpoint documentation below, we use $KEYSTORE_RPC_URL to denote a keystore JSON-RPC URL. Public JSON-RPC endpoints operated by Axiom are available at the following URLs:

JSON-RPC API TypeEndpoint
Nodehttps://keystore-rpc-node.axiom.xyz
Sequencerhttps://keystore-rpc-sequencer.axiom.xyz
Signature Proverhttps://keystore-rpc-signature-prover.axiom.xyz

Node

The node allows users to track the state of the keystore by reading L1 and updating its view of the keystore state by running the keystore state transition function.

keystore_syncStatus

Get the synchronization status.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_syncStatus","params":[],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "committedL2": {
    "hash": "0x3541f2810170810894c4b8ef7ccc98ec5373a30b5ed0148ef7f7905633d13646",
    "number": "0x5",
    "parentHash": "0xb70685b7a7a3296d13cb98cec11c5b8dba37d58e0795a4674904dfad70143497",
    "timestamp": "0x67944aba",
    "sequencerKeystoreAddress": "0xe3acf64888a87ece25b171cf8a38d1db582d6359c4c805d0bf5652a40852b423",
    "stateRoot": "0xe44d2d0968600fac77b57c623575c9e6c52566e7ee46891ed76dcb3a0563973d",
    "withdrawalsRoot": "0x5b2d253779ef38e6e5663a70d9bd05581b12f54251ecdac44f5e26e686e73836",
    "transactionsRoot": "0xe3d39c3caa50fc1a22e10687675c66f14da9b2940976dde4469943dc25a13a10"
  },
  "finalizedL2": {
    "hash": "0x3541f2810170810894c4b8ef7ccc98ec5373a30b5ed0148ef7f7905633d13646",
    "number": "0x5",
    "parentHash": "0xb70685b7a7a3296d13cb98cec11c5b8dba37d58e0795a4674904dfad70143497",
    "timestamp": "0x67944aba",
    "sequencerKeystoreAddress": "0xe3acf64888a87ece25b171cf8a38d1db582d6359c4c805d0bf5652a40852b423",
    "stateRoot": "0xe44d2d0968600fac77b57c623575c9e6c52566e7ee46891ed76dcb3a0563973d",
    "withdrawalsRoot": "0x5b2d253779ef38e6e5663a70d9bd05581b12f54251ecdac44f5e26e686e73836",
    "transactionsRoot": "0xe3d39c3caa50fc1a22e10687675c66f14da9b2940976dde4469943dc25a13a10"
  }
}

keystore_blockNumber

Returns the number of the most recent block.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_blockNumber","params":[],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0xd5"

keystore_getBalance

Get the balance of a keystore address.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getBalance","params":["<keystore_address>", "<block_tag>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x845951609f29eebadeaba"

keystore_getStateAt

Get a (data, vkey) pair for a given keystore address.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getStateAt","params":["<keystore_address>", "<block_tag>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "dataHash": "0xecf85bc51a8b47c545dad1a47e868276d0a92b7cf2716033ce77d385a6b67c4b",
  "vkeyHash": "0x06abdf9a258ae19e61d3068c36f1104f013de8b4c82f80555be8fcad5dafd28c",
  "data": "0x00a1b20564cd6cc6410266a716c9654406a15e822d4dc89c4127288da925d5c225000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d7548a3ed8c51fa30d26ff2d7db5c33d27fd48f2",
  "vkey": "0x0101000000100100010001010000010000000000000000000000000000000000005e34f09e1badd1b13158510edfab5c546c5fad0bf3f432b3e30c43cd233d15073d8fba654fea9aa5752d0f2965bc43822f9c4febbed9b9ff67d7bc6d7deac62151950e7e9458e99ccdac816a57003023cb35ccb46823609e7f708ee392d207203ff53be4f960cbcf9a2d054aaa950dd27481accda50c2ee8edaa312e62c3dc06c3c7f8b93a350d854985a69bb1482a241cd0406e95cca5532b60ed4f56f43d0383ac40ea937fb5b10c5776f8f39e66a4fa0678c27cfb0ad7c4cf7eabb86ab419aa62b004534a2fecbdebcca29b7af90f5c4af931563c27afd4da97f88e20131922db6f7f31a566211c201e1480b47b4899adc95dafda721247fc096bd80a384d16"
}

keystore_getTransactionCount

Returns the number of transactions sent from an address. For update transactions, the user nonce is incremented and the sponsor nonce is not incremented.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getTransactionCount","params":["<keystore_address>", "<block_tag>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x1"

keystore_getProof

Get a proof for a given keystore address.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getProof","params":["<keystore_address>", "<block_tag>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "state": {
    "data": "0x00a1b20564cd6cc6410266a716c9654406a15e822d4dc89c4127288da925d5c225000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d7548a3ed8c51fa30d26ff2d7db5c33d27fd48f2",
    "vkey": "0x0101000000100100010001010000010000000000000000000000000000000000b4c844860c92a01b2a8946f01594beeba59bfff16cfb6cc3339f58ec74191e050750a550988ceaef9a37f6794af0d9bf472445bc9dfacf89b9f4a6130c2b0eb42edc3f98eade680751c11cb51b1116647d4b669a03d396dead0583b8cc6a3f1065be1ceac12bc468852b427ee01d32459c1fe43fac3b8ba15e475f2a349ba5a55f60af3849e0784fc39042ed5fd4987713cd77b28cce1fae7a39c05b2574063d1ca61d79bf9dbac682a94f900819a2e8a3e3d7cc9fc38f7c6fbc620e0fb80874294fb4c416d52c905ff2613e2505051326a24376a6b9f75dae00a742743cbe1a44caf6464aa7afc5aefb596ede56531eb25c2edddbed318149a3bfda048ce46a1917"
  },
  "proof": {
    "isExclusionProof": false,
    "siblings": [
      {
        "hash": "0xf07451bc69ef46ff72a3bb99cb3b29a3d5e57a8860032846cfab4eba9dd46ac0",
        "isLeft": true
      },
      {
        "hash": "0x19060ecc1a0e3670a64f2b96c237a328b0a2715d3a153d1a35ee530c5eabaaba",
        "isLeft": true
      },
      {
        "hash": "0x840f5690ff42cb285a1f3fd4884e67419724e9143b490c93a82b069e3fc8e4c7",
        "isLeft": true
      },
      {
        "hash": "0x07897593cfc4f42efdd765e0afadae20774e8906ccec64f42e270d8b2d9773c3",
        "isLeft": false
      },
      {
        "hash": "0xcb865f7301bcabb14ac928211790d8e98dd761a1dbc155837a52f43e4f700ec3",
        "isLeft": false
      },
      {
        "hash": "0xb66eb60aac26fe8683674e1298df83c2fc3ce7b068416fdbdb97ac1d6491d623",
        "isLeft": false
      },
      {
        "hash": "0xb79b822e622f4e6539e85753abbf617c551960695696ce7f53b291009ddfc700",
        "isLeft": false
      },
      {
        "hash": "0x463767d3d9645709037a15c39ea75442c122e0870853151ba09ef1ea7de455f9",
        "isLeft": false
      },
      {
        "hash": "0x46c02db5326229fc8321e53f46b87ebd9c1a1456125fbf282838b16134a7f335",
        "isLeft": false
      },
      {
        "hash": "0xf7e2b3faab9d3959fa6d9a256a91d78a239de95dc7aad3feb744fdafc6b68918",
        "isLeft": false
      }
    ],
    "leaf": {
      "hash": "0x93bc410e50490cf44d7238e7afa7198c947e6756775f3fab6aa9934661b2d548",
      "keyPrefix": "0x01",
      "key": "0x09b0d483d73f9600822f8d878976094224228f1594e45d8f37446e9cea2266bc",
      "nextKeyPrefix": "0x01",
      "nextKey": "0x179c581092b48563451516e9011a5bb5500f3533e297f7eaec4455caccb07205",
      "value": "0xecf85bc51a8b47c545dad1a47e868276d0a92b7cf2716033ce77d385a6b67c4bd19f7a58fd13fa0a951377260e8dc037ef27178896e641cbf828bc8067a44e34"
    }
  }
}

keystore_call

Executes a new message call immediately without creating a transaction on the blockchain. Useful for simulating the validity of a transaction without requiring authentication.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_call","params":["<raw_transaction>", "<block_tag>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "success": true,
  "stateTransitions": {
    "user": {
      "keystoreAddress": "0xfdbd3c60301d5c49481996b050cfe0d30c2746199e60b18fc8d0fefef9936fbc",
      "transitions": {
        "nonce": {
          "from": "0x0",
          "to": "0x1"
        },
        "state": {
          "from": {
            "dataHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "vkeyHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
            "data": "0x",
            "vkey": "0x"
          },
          "to": {
            "dataHash": "0xaa4ba4b304228a9d05087e147c9e86d84c708bbbe62bb35b28dab74492f6c726",
            "vkeyHash": "0xaa4ba4b304228a9d05087e147c9e86d84c708bbbe62bb35b28dab74492f6c726",
            "data": "0x012345",
            "vkey": "0x012345"
          }
        }
      }
    },
    "sponsor": {
      "keystoreAddress": "0xc3a9b82816196f3f5692dda37ee242839ce86357dc06a205ce04da56a3651e06",
      "transitions": {
        "balance": {
          "from": "0x8459515ee2fa9af70ff85",
          "to": "0x8459515ee25d9d78cf755"
        }
      }
    }
  }
}

keystore_getTransactionByHash

Returns the information about a transaction requested by transaction hash.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getTransactionByHash","params":["<transaction_hash>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "type": "0x02",
  "hash": "0x741418ce6e86bb562e8b1298dfda61dee9ed74fbf0a6f8718c167e24dd416bb4",
  "transactionIndex": "0x0",
  "blockHash": "0xb70685b7a7a3296d13cb98cec11c5b8dba37d58e0795a4674904dfad70143497",
  "blockNumber": "0x4",
  "isL1Initiated": false,
  "nonce": "0x1",
  "feePerGas": "0x0000000000000000000000000000000000000000000000000000000000000064",
  "l1InitiatedNonce": "0x",
  "newUserData": "0x00a1b20564cd6cc6410266a716c9654406a15e822d4dc89c4127288da925d5c225000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000001000000000000000000000000d7548a3ed8c51fa30d26ff2d7db5c33d27fd48f2",
  "newUserVkey": "0x0101000000100100010001010000010000000000000000000000000000000000b4c844860c92a01b2a8946f01594beeba59bfff16cfb6cc3339f58ec74191e050750a550988ceaef9a37f6794af0d9bf472445bc9dfacf89b9f4a6130c2b0eb42edc3f98eade680751c11cb51b1116647d4b669a03d396dead0583b8cc6a3f1065be1ceac12bc468852b427ee01d32459c1fe43fac3b8ba15e475f2a349ba5a55f60af3849e0784fc39042ed5fd4987713cd77b28cce1fae7a39c05b2574063d1ca61d79bf9dbac682a94f900819a2e8a3e3d7cc9fc38f7c6fbc620e0fb80874294fb4c416d52c905ff2613e2505051326a24376a6b9f75dae00a742743cbe1a44caf6464aa7afc5aefb596ede56531eb25c2edddbed318149a3bfda048ce46a1917",
  "userAcct": {
    "keystoreAddress": "0xc3a9b82816196f3f5692dda37ee242839ce86357dc06a205ce04da56a3651e06",
    "salt": "0x0000000000000000000000000000000000000000000000000000000000000000",
    "dataHash": "0xecf85bc51a8b47c545dad1a47e868276d0a92b7cf2716033ce77d385a6b67c4b",
    "vkey": "0x0101000000100100010001010000010000000000000000000000000000000000b4c844860c92a01b2a8946f01594beeba59bfff16cfb6cc3339f58ec74191e050750a550988ceaef9a37f6794af0d9bf472445bc9dfacf89b9f4a6130c2b0eb42edc3f98eade680751c11cb51b1116647d4b669a03d396dead0583b8cc6a3f1065be1ceac12bc468852b427ee01d32459c1fe43fac3b8ba15e475f2a349ba5a55f60af3849e0784fc39042ed5fd4987713cd77b28cce1fae7a39c05b2574063d1ca61d79bf9dbac682a94f900819a2e8a3e3d7cc9fc38f7c6fbc620e0fb80874294fb4c416d52c905ff2613e2505051326a24376a6b9f75dae00a742743cbe1a44caf6464aa7afc5aefb596ede56531eb25c2edddbed318149a3bfda048ce46a1917"
  },
  "userProof": "0x00000000000000000000000000000000000000000045bddb52076d66bea5c578000000000000000000000000000000000000000000002263585468add70674ef00000000000000000000000000000000000000000000088cbbe7d37a3398e1160000000000000000000000000000000000000000009d7c5b0f9e1c1ece76fdcf000000000000000000000000000000000000000000c91dbcde1a8b74dd52e9ac0000000000000000000000000000000000000000000016da90a61c0260cd7f770000000000000000000000000000000000000000005e5a7c7aabf443bf67168e000000000000000000000000000000000000000000dfcfb4e7e34091d536939e000000000000000000000000000000000000000000002d41f65bd4ec9aeeabb8000000000000000000000000000000000000000000f9b3773e29d7ce9599d63b000000000000000000000000000000000000000000a9dfb864181c67f85b6ddd0000000000000000000000000000000000000000000029f3beb166583413a41d00000000000000000000000000000000ecf85bc51a8b47c545dad1a47e86827600000000000000000000000000000000d0a92b7cf2716033ce77d385a6b67c4b00000000000000000000000000000000e5a5055cd95d849e391d199ba5de062f000000000000000000000000000000004fcc30566d7167b569fa94d6a1d403b61224eeed41309709bbb7b2f45a33e80c0ccffe702d9d6b47539c73f45900b1732c92e80d45674abb3398981a84c4aea2895c178346ee2b984df342324fc680da284c712d908b8c027450afd5de82f06cb71c764e7188bb8deb1658e29d693631243462335b7cf9e5459e15a96268a50b601c19574d17d1e366e0df24aa2e0ae00bc16749eb21601ec312ceb0aca6d4e5ffb707b5ac8af118b618d16e13173846219d669bbe6c504ac8eb88ffde5406500fb9a1bae3723b20cec7f93314dbfb130f73b59204254572ed2df2563de3c66431ae41315029b6edcb34c7e77326894127ffffad38caf176893575e2758bd51a0cc0271937a7526ec37da31088e253a60dbf4f8f5c7e110a10729866dbed1bd7ba4fa6c2cec1d1c8fa7c5af190c9826e2cf51b20af058e7ef60578f5c77d3753f3d316696df184459e8c21ce74ba4ba40f4d9f241a001430f83f0896aa6629512ff94e617a83a710f6da126b62ce2bce0ee268f83a822c6e6c46664e8d54c932f06f415ce92e6f11f37123a0d2527488219f95fb6b2af6ba7a7e0287d2135d7c7d72d92c1a33a578235bc9390261c7c50c2d988c28edd2d1041fe5a8a3ae6669a3e60d36d1f64f8824ca9028c22699461078cfb59ab82236d9b54b98af6f5ce22dcbe46a6c9893b2984e4ed22bb5116719d67042e9a23db2da0eccd5ef2b8ef83929c60096dfa155f48743d9b381402d10af9ffb0859e9eac3d2e213f14e6d615aa7a393e4596e844369d65b0b2556612a16f29f2232bd46321c346e26b192ee9a758d4ff40cc2754589921dec351c1c0afb1fcb1bf3da887d5e27ff6b63c99707fe4d00394a0fdc26b3f4bf917022421e1dfbfdc5a14e8d456d15505cc4c12881bf8a9e458e671abbe14ed2c87cdfe420936b00597c08af9ef93298501dead0eb53ddb3cdb8562bcf64f8f3e991b6180f5774da9293888e47f1cf60ad31f4e202f82aaec1d6868582a3fc681978bb62220734cf4adc58a182b77fb2958fcbcba3329fa5ac7f99f64f67536ae038797b111b413b140a43898588e5e5b75a5d598861e773905ac4e639aa3ff30275486b292a69fd03d563385c8308bd224b62a0c7a1b3d025022cd7a83362e99465b5da2f34a52509d48fd77de68c577c9241eb2dc39276d05884157c5d27918411248e14843b5f12472ff645386681ba83e06130e1f23db3ca9b068301cadff4a5211d2780f873cd3b6df566d9fef661f3d1594668406092923ccfeaf51badb0cc8536028fa6284bd20ca504c5eccff7e6540a35cd7f199291093aea031d387b51531e292bf50484851aed5efc6e7c4b9f58030ee203c4a9e8c1649a2e8d6c2d2ebd4127dafa87f54da8c1bfc65df2f21f013cdc018c9a668d9bc49c300a17333d395c264c8d8edef4563fe83c408215adaec0db5424a5e3173c11a8351223950bd0892b09be3c651e92a833d166a178c5fdb2cdbc51c07bce916f7c70707806f208ff136ae7a7e1ef7be419f9734296d4355bbaa556b8280a486248a6b139e5f8587c10785fcd0066ed67add9c3053b5fd5d30c5cc78339316608fca0e4ee89e682601ce66a4cd63b2322e95b308b471c0ab8b4aff5c8e18610599b7250085faff7df06905cc027c12c6de0d1895bf6c2356f1ef6936891a518631b103c403d3b252b249f7be65ee0401a3fd76de16318544cf4f773e0c0a42304889c31a24cf17e2d1df333e97992cb3b59f791da1e0e0d2c6b1e15a24d93e3a31dcdafac21a95f2d11b2dc333f621cdbb8f5bad08b521f24450747103734363dddb24a12d0b027b60d47037e88a4a08a571af9aa2b91086da16ecbb9f698a761563a8c47ee31adbc2b04f3b037b07183b5cf67cf3e74af459bef449de3cb1ccbcaf913ee34e981e51f6a671c0dd581ffa3a82143c392bf247bc662ffa4a7f28cb194e4baff972b06",
  "sponsorAccBytes": "0x",
  "sponsorProof": "0x"
}

keystore_getTransactionReceipt

Returns the receipt of a transaction by transaction hash.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getTransactionReceipt","params":["<transaction_hash>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "transactionHash": "0x6459bb8e8932b5ac7b9d00f76ad899b4427a4c71d52bd475f2922791633a4855",
  "blockHash": "0x7cb159d7c2282c0d5df2ec196f88271cc39727b9c4cf69c0dbeea976ded0a9f6",
  "blockNumber": "0x26",
  "transactionIndex": "0x0",
  "status": "L2Finalized_L1Included"
}

keystore_getBlockNumberByStateRoot

Returns the block number for a given state root.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getBlockNumberByStateRoot","params":["<state_root>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x4"

keystore_getBlockByNumber

Returns the block information for a given block number.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getBlockByNumber","params":["<block_number>", <hydrate_transactions>],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "hash": "0xb70685b7a7a3296d13cb98cec11c5b8dba37d58e0795a4674904dfad70143497",
  "number": "0x4",
  "parentHash": "0x58259fe139f4fa06977df7188d7929b67aa206d000ffaef859168d551c249d3e",
  "timestamp": "0x67942d34",
  "sequencerKeystoreAddress": "0xe3acf64888a87ece25b171cf8a38d1db582d6359c4c805d0bf5652a40852b423",
  "stateRoot": "0x843491df916ce55642d45e60d2250a650f67a4f5c435ced935538b8f49c37f85",
  "withdrawalsRoot": "0x5b2d253779ef38e6e5663a70d9bd05581b12f54251ecdac44f5e26e686e73836",
  "transactionsRoot": "0xe3de0ef16d55a4e771113857d3741051145a62767bbdbe9b7e3f7940253a6b14",
  "transactions": [
    "0x741418ce6e86bb562e8b1298dfda61dee9ed74fbf0a6f8718c167e24dd416bb4"
  ]
}

keystore_getBlockByHash

Returns the block information for a given block hash.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getBlockByHash","params":["<block_hash>", <hydrate_transactions>],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "hash": "0xb70685b7a7a3296d13cb98cec11c5b8dba37d58e0795a4674904dfad70143497",
  "number": "0x4",
  "parentHash": "0x58259fe139f4fa06977df7188d7929b67aa206d000ffaef859168d551c249d3e",
  "timestamp": "0x67942d34",
  "sequencerKeystoreAddress": "0xe3acf64888a87ece25b171cf8a38d1db582d6359c4c805d0bf5652a40852b423",
  "stateRoot": "0x843491df916ce55642d45e60d2250a650f67a4f5c435ced935538b8f49c37f85",
  "withdrawalsRoot": "0x5b2d253779ef38e6e5663a70d9bd05581b12f54251ecdac44f5e26e686e73836",
  "transactionsRoot": "0xe3de0ef16d55a4e771113857d3741051145a62767bbdbe9b7e3f7940253a6b14",
  "transactions": [
    "0x741418ce6e86bb562e8b1298dfda61dee9ed74fbf0a6f8718c167e24dd416bb4"
  ]
}

Sequencer

The sequencer is responsible for receiving transactions and assembling them into L2 blocks. As part of its service, it has the authority to set and collect transaction fees.

keystore_sendRawTransaction

Sends a properly serialized and signed transaction to the sequencer for inclusion in an L2 block.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_sendRawTransaction","params":["<raw_transaction>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0xe16d63d313f8a7530647373e211dced9e4b2526a061904d583bd18993e430b1e"

keystore_gasPrice

Returns an estimate of the current price per gas in wei.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_gasPrice","params":[],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x989680"

keystore_estimateGas

Returns an estimate of the amount of L2 gas needed to execute a specific transaction.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_estimateGas","params":["<raw_transaction>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x186a0"

keystore_estimateL1DataFee

Returns the estimated amount of ether to pay for the L1 data fee for a given transaction.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_estimateL1DataFee","params":["<raw_transaction>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

"0x47aaebd48aa9"

Signature Prover

Signature provers are expected to support a JSON-RPC interface with the methods below. Axiom currently runs a signature prover supporting ZK authentication for a m-of-n ECDSA circuit with vkeyHash 0x06abdf9a258ae19e61d3068c36f1104f013de8b4c82f80555be8fcad5dafd28c, but we anticipate other entities and keystore accounts to be supported in the future.

keystore_authenticateTransaction

Sends a transaction to the signature prover for proof generation.

curl -X POST $KEYSTORE_RPC_URL \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "keystore_authenticateTransaction",
    "params": [
      "<unauthenticated_raw_transaction>",
      {
        "keyData": <user_key_data_bytes>,
        "authData": <user_auth_data_bytes>
      }
    ],
    "id": 1
  }'

Sample success output:

"0x477fcd88cc61ef5963d7b555ea0f6a625d95b3f3c496190620947b078f0d2690"

keystore_getAuthenticationStatus

Returns the authentication status of a transaction.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getAuthenticationStatus","params":["<request_hash>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "status": "Pending",
  "authenticatedTransaction": null,
  "error": null
}

keystore_authenticateSponsoredTransaction

Sends a sponsored transaction to the signature prover for proof generation. Three types of sponsored transaction authentication are available:

  • proveSponsored: User and sponsor auth data are provided and ZK proofs of both are generated
  • proveOnlySponsored: User proof is assumed to generated elsewhere but still provided. Sponsor auth data is also provided and proof of sponsor auth is generated.
  • sponsorAndProve: Only user auth data is provided and ZK proof of it is generated. If server supports this variant, sponsor will generate sponsor auth on the server and then generate the ZK proof of it.
prove sponsored transaction
curl -X POST $KEYSTORE_RPC_URL  \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "keystore_authenticateSponsoredTransaction",
    "params": [
      <unauthenticated_raw_transaction>,
      {
        proveSponsored: {
          userAuthInputs: {
            "keyData": <user_key_data_bytes>,
            "authData": <user_auth_data_bytes>
          }
          sponsorAuthInputs: {
            "keyData": <sponsor_key_data_bytes>,
            "authData": <sponsor_auth_data_bytes>
          }
        };
      }
    ],
    "id": 1
  }'
prove only sponsored transaction
curl -X POST $KEYSTORE_RPC_URL  \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "keystore_authenticateSponsoredTransaction",
    "params": [
      <unauthenticated_raw_transaction>,
      {
        proveOnlySponsored: {
          userProof: <user_proof_bytes>
          sponsorAuthInputs: {
            "keyData": <sponsor_key_data_bytes>,
            "authData": <sponsor_auth_data_bytes>
          }
        };
      }
    ],
    "id": 1
  }'
prove server-sponsored transaction
curl -X POST $KEYSTORE_RPC_URL  \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "method": "keystore_authenticateSponsoredTransaction",
    "params": [
      <unauthenticated_raw_transaction>,
      {
        sponsorAndProve: {
          userAuthInputs: {
            "keyData": <user_key_data_bytes>,
            "authData": <user_auth_data_bytes>
          }
        };
      }
    ],
    "id": 1
  }'

Sample success output:

"0x531ce80e94815d22a967230cabb8a4e405e03f0f5c9ad77560bcdb6b9886ddcc"

keystore_getSponsoredAuthenticationStatus

Returns the authentication status of a sponsored transaction.

curl -X POST -H "Content-Type: application/json" --data  \
    '{"jsonrpc":"2.0","method":"keystore_getSponsoredAuthenticationStatus","params":["<request_hash>"],"id":1}' \
    $KEYSTORE_RPC_URL

Sample success output:

{
  "status": "Pending",
  "authenticatedTransaction": null,
  "error": null
}