# Validator API

## Submitting to Validator

<table data-header-hidden><thead><tr><th width="225.89984130859375">Method</th><th>Action</th></tr></thead><tbody><tr><td><a href="#submittransaction">submitTransaction</a></td><td>Submit a transaction to the validator.</td></tr><tr><td><a href="#submittransactioncertificate">submitTransactionCertificate</a></td><td>Submit a transaction certificate to the validator.</td></tr></tbody></table>

### submitTransaction

Submit a signed transaction to the validator. The validator will check that the signed transaction is valid and then will return its own signature.

The sender's transaction signature is computed using Ed25519 where:

* the public key is stored in [`Transaction`](/fast-archived/developers/fast-api/data-types.md#transaction).`sender` .
* the message to be signed is the [`Transaction`](/fast-archived/developers/fast-api/data-types.md#transaction) struct serialized using the [BCS format](https://github.com/zefchain/bcs) with the following special rule:
  * Numerical string fields [`Amount`](/fast-archived/developers/fast-api/data-types.md#amount)/[`Balance`](/fast-archived/developers/fast-api/data-types.md#balance)) are encoded as a little-endian unsigned 256-bit number as an array of `uint8` of length 32.

BCS serialization libraries are available for several languages:

* Rust: the [zefchain BCS library](https://github.com/zefchain/bcs) as a [`serde`](https://serde.rs/) backend
* Typescript/Javascript: the [Mysten Labs BCS library](https://www.npmjs.com/package/@mysten/bcs)

<table><thead><tr><th width="225.9246826171875">Parameters</th><th></th></tr></thead><tbody><tr><td><code>transaction</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#transaction"><code>Transaction</code></a>: It can be of any <a href="/pages/IdxpRMWVoW4rOtpzzgTS#claimtype"><code>ClaimType</code></a>.</td></tr><tr><td><code>signature</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#signatureormultisig"><code>SignatureOrMultiSig</code></a>: Created by <a href="/pages/IdxpRMWVoW4rOtpzzgTS#transaction"><code>Transaction</code></a>.<code>sender</code> and having the verifier signatures field set to the empty list in the case of <a href="/pages/IdxpRMWVoW4rOtpzzgTS#externalclaim"><code>ExternalClaim</code></a>s.</td></tr></tbody></table>

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#submittransactionresponse"><code>SubmitTransactionResponse</code></a></td><td>If the signed transaction was successfully submitted and validated.</td></tr></tbody></table>

<details>

<summary><mark style="background-color:green;">POST</mark> / submitTransaction</summary>

**Curl:**

```bash
curl -X POST 'https://rpc.fastset.xyz/' \
     --header 'Content-Type: application/json' \
     --data '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "submitTransaction",
       "params":
         {
           "transaction":
             {
               "sender": [200,200,191,145,217,203,135,199,251,88,121,96,64,156,203,156,136,57,94,12,155,183,22,116,8,165,72,238,49,233,30,23],
               "recipient": [198,116,158,101,182,199,132,204,46,62,203,247,99,237,110,191,133,193,183,69,227,236,255,231,240,147,33,121,90,170,152,69],
               "nonce": 0,
               "timestamp_nanos": 1761039590871000000,
               "claim":
                 {
                   "TokenTransfer":
                     {
                       "token_id": [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
                       "amount": "ffff",
                       "user_data": null
                     }
                 }
             },
           "signature":
             {
               "Signature": [243,31,62,0,151,90,232,58,19,85,223,180,108,88,58,96,121,162,10,170,165,106,79,50,100,191,137,166,203,176,149,113,211,75,182,33,30,9,1,223,166,3,97,72,62,45,39,110,168,47,70,26,87,33,39,58,152,91,56,129,149,18,172,14]
             }
         }
     }'
```

**Server response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result":
    {
      "validator": [253,112,52,72,100,69,192,75,235,211,175,165,191,201,31,106,19,138,251,42,229,209,213,131,100,19,223,27,90,91,223,47],
      "signature": [63,103,129,188,17,174,83,78,181,10,105,211,249,200,181,150,97,89,88,58,183,39,181,191,193,91,147,215,81,68,118,251,125,107,169,146,23,54,68,229,114,85,186,33,224,69,4,201,127,248,201,125,31,208,209,211,47,220,57,27,101,44,60,0],
      "next_nonce": 0,
      "transaction_hash": [12,222,137,95,78,167,83,27,133,214,112,214,243,176,118,49,123,178,141,227,199,150,166,113,197,153,215,94,184,120,208,197]
    }
}
```

</details>

***

### submitTransactionCertificate

Submit a transaction certificate to the validator.

<table><thead><tr><th width="225.6441650390625">Parameters</th><th></th></tr></thead><tbody><tr><td><code>transaction</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#transaction"><code>Transaction</code></a>: The transaction submitted previously via <a href="#submittransaction"><code>submitTransaction</code></a>.</td></tr><tr><td><code>signature</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#signatureormultisig"><code>SignatureOrMultiSig</code></a>: The (multi)signature submitted previously via <a href="#submittransaction"><code>submitTransaction</code></a>.</td></tr><tr><td><code>validator_signatures</code></td><td><code>Vec&#x3C;(</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#validatorname"><code>ValidatorName</code></a><code>,</code> <a href="/pages/IdxpRMWVoW4rOtpzzgTS#signature"><code>Signature</code></a><code>)></code>: A list of validator signatures.</td></tr><tr><td></td><td></td></tr></tbody></table>

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#confirmtransactionresponse"><code>ConfirmTransactionResponse</code></a></td><td>If the transaction was successfully submitted.</td></tr></tbody></table>

***

## Querying the Validator

<table data-header-hidden><thead><tr><th width="226.4644775390625"></th><th></th></tr></thead><tbody><tr><td><a href="#gettransactions">getTransactions</a></td><td>Return a range of transactions stored by this validator.</td></tr><tr><td><a href="#getperformanceinfo">getPerformanceInfo</a></td><td>Return information regarding the validator's recent performance..</td></tr><tr><td><a href="#getaccountinfo-example-update-needed">getAccountInfo</a></td><td>Return information regarding a specific account from the validator.</td></tr><tr><td><a href="#gettokeninfo">getTokenInfo</a></td><td>Return information regarding a set of tokens from the validator.</td></tr><tr><td><a href="#getversion">getVersion</a></td><td>Return the version number of the validator.</td></tr></tbody></table>

### getTransactions

Return a range of transactions previously processed and currently stored by the validator.

<table><thead><tr><th width="225.92474365234375">Parameters</th><th></th></tr></thead><tbody><tr><td><code>page</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#pagerequest"><code>PageRequest</code></a>: Defines the range of items to be returned.</td></tr></tbody></table>

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><code>Page&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#timed"><code>Timed</code></a><code>&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#transactioninfo"><code>TransactionInfo</code></a><code>>></code></td><td>Contains all transactions in the requested range.</td></tr></tbody></table>

<details>

<summary><mark style="background-color:green;">POST</mark> / getTransactions</summary>

**Curl:**

```bash
curl -X POST 'https://rpc.fastset.xyz/' \
     --header 'Content-Type: application/json' \
     --data '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "getTransactions",
       "params": {
         "page": {
           "limit": 5,
           "token": null
         }
       }
     }'
```

**Server response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result":
    {
      "data":
        [
          {
            "data": 
              {
                "hash": [144,15,75,119,138,196,94,26,15,189,206,26,253,108,106,107,230,167,51,167,114,141,248,90,161,193,169,241,12,111,45,122],
                "sender": [0,2,244,118,98,244,212,43,39,148,218,101,140,250,137,112,152,171,103,216,120,255,201,123,92,174,237,47,29,109,81,161],
                "recipient": [119,54,233,140,96,2,218,41,212,150,255,50,222,139,98,11,170,231,81,164,151,242,244,82,119,183,13,201,133,203,103,7],
                "nonce": 0,
                "claim":
                  {
                    "TokenTransfer":
                      {
                        "token_id": [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
                        "amount": "100000",
                        "user_data": null
                      }
                  },
                "submission_timestamp_nanos": 1761074416134788600
              },
            "timing":
              {
                "signing_duration_nanos": 13429702,
                "user_time_nanos": 1569064,
                "settlement_duration_nanos": 28672802
              }
          },
          {
            "data":
              {
                "hash": [228,207,99,134,54,59,189,83,9,79,194,230,223,114,14,38,107,107,13,157,232,124,72,57,24,203,26,132,252,231,217,226],
                "sender": [119,54,233,140,96,2,218,41,212,150,255,50,222,139,98,11,170,231,81,164,151,242,244,82,119,183,13,201,133,203,103,7],
                "recipient": [163,96,54,175,29,21,35,215,53,18,81,181,115,86,16,107,148,24,149,51,18,166,173,45,18,28,185,85,225,164,179,239],
                "nonce": 0,
                "claim":
                  {
                    "TokenTransfer":
                      {
                        "token_id": [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
                        "amount": "ffff",
                        "user_data": null
                      }
                  },
                "submission_timestamp_nanos": 1761074416182000000
              },
            "timing":
              {
                "signing_duration_nanos": 15058725,
                "user_time_nanos": 54509131,
                "settlement_duration_nanos": 29008247
              }
          }],
      "next_page_token":2
    }
}
```

</details>

***

### getPerformanceInfo

Return information regarding the validator's recent performance.

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#rpcperformanceinforesponse"><code>RpcPerformanceInfoResponse</code></a></td><td></td></tr></tbody></table>

<details>

<summary><mark style="background-color:green;">POST</mark> / getPerformanceInfo</summary>

**Curl:**

```bash
curl -X POST 'https://rpc.fastset.xyz/' \
     --header 'Content-Type: application/json' \
     --data '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "getPerformanceInfo",
       "params": {}
     }'
```

**Server response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result":
    {
      "weak_finality_nanos": 14244213,
      "strong_finality_nanos": 71123835,
      "tps_last_second": 0,
      "tps_last_minute": 0,
      "tps_last_hour": 0,
      "ops_last_second": 0,
      "ops_last_minute": 0,
      "ops_last_hour": 0,
      "signed_transactions": 2,
      "settled_transactions": 2,
      "accounts_count": 20002,
      "db_stats":
        {
          "channel_buffer_size": 0,
          "rocksdb_props":
            {
              "rocksdb.cur-size-all-mem-tables": 8192,
              "rocksdb.estimate-pending-compaction-bytes": 0,
              "rocksdb.block-cache-pinned-usage": 348,
              "rocksdb.estimate-table-readers-mem": 0,
              "rocksdb.block-cache-usage": 348
            }
        }
    }
}
```

</details>

***

### getAccountInfo

Return information regarding a specific account from the validator.

<table><thead><tr><th width="225.9815673828125">Parameters</th><th></th></tr></thead><tbody><tr><td><code>address</code></td><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#fastsetaddress"><code>FastSetAddress</code></a>: The designated account's Fast address.</td></tr><tr><td><code>token_balance_filter</code></td><td><code>Option&#x3C;Vec&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#tokenid"><code>TokenId</code></a><code>>></code>: The set of token types for which a balance request will be made. If this parameter is omitted, no custom token balances will be returned. If it is present and empty, the balance of all tokens owned by this account will be queried.</td></tr><tr><td><code>state_key_filter</code></td><td><code>Option&#x3C;Vec&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#statekey"><code>StateKey</code></a><code>>></code>: The set of state fields created by this account to be returned. If this parameter is omitted, no state fields will be returned. If it is present and empty, all state fields created by this account will be returned.</td></tr><tr><td><code>certificate_by_nonce</code></td><td><code>Option&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#noncerange"><code>NonceRange</code></a><code>></code>: If passed, a list of transaction certificates within the nonce range specified by this parameter submitted by account address will be returned (omitting those which do not exist or have been pruned from the validator database).</td></tr></tbody></table>

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#accountinforesponse"><code>AccountInfoResponse</code></a></td><td></td></tr></tbody></table>

<details>

<summary><mark style="background-color:green;">POST</mark> / getAccountInfo</summary>

**Curl:**

```bash
curl -X POST 'https://rpc.fastset.xyz/' \
     --header 'Content-Type: application/json' \
     --data '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "getAccountInfo",
       "params": {
         "address": [200,200,191,145,217,203,135,199,251,88,121,96,64,156,203,156,136,57,94,12,155,183,22,116,8,165,72,238,49,233,30,23],
         "token_balance_filter": null,
         "certificate_by_nonce": null
       }
     }'
```

**Server response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result":
    {
      "sender": [200,200,191,145,217,203,135,199,251,88,121,96,64,156,203,156,136,57,94,12,155,183,22,116,8,165,72,238,49,233,30,23],
      "balance": "0",
      "state": null,
      "next_nonce": 0,
      "pending_confirmation": null,
      "requested_certificate": null,
      "requested_validated_transaction": null,
      "requested_received_transfers": [],
      "token_balance": [],
      "requested_claim_by_id": null,
      "requested_claims": []
    }
}
```

</details>

***

### getTokenInfo

Return information regarding a set of tokens from the validator.

<table><thead><tr><th width="225.83984375">Parameters</th><th></th></tr></thead><tbody><tr><td><code>token_ids</code></td><td><code>Vec&#x3C;</code><a href="/pages/IdxpRMWVoW4rOtpzzgTS#tokenid"><code>TokenId</code></a><code>></code>: An array of <a href="/pages/IdxpRMWVoW4rOtpzzgTS#tokenid"><code>TokenId</code></a>s to look up.</td></tr></tbody></table>

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><a href="/pages/IdxpRMWVoW4rOtpzzgTS#tokeninforesponse"><code>TokenInfoResponse</code></a></td><td>Contains data for all requested tokens.</td></tr></tbody></table>

<details>

<summary><mark style="background-color:green;">POST</mark> / getTokenInfo</summary>

**Curl:**

```bash
curl -X POST 'https://rpc.fastset.xyz/' \
     --header 'Content-Type: application/json' \
     --data '{
       "jsonrpc": "2.0",
       "id": 1,
       "method": "getTokenInfo",
       "params": {
         "token_ids": [
           [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
         ]
       }
     }'
```

**Server response:**

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": 
    {
      "requested_token_metadata": 
        [
          [
            [250,87,94,112,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
            null
          ]
        ]
    }
}
```

</details>

***

### getVersion

Return the version number of the validator.

<table><thead><tr><th width="225.9246826171875">Returns</th><th></th></tr></thead><tbody><tr><td><code>String</code></td><td></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.fast.xyz/fast-archived/developers/fast-api/validator-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
