# RPC / API Requirements

Trust Wallet is a light client wallet, which means it needs to get data / information from remote nodes (either light nodes or full nodes). In order to integrate your blockchain into Trust Wallet smoothly, you must also fulfill RPC / API requirements. We list all needed APIs or RPCs plus an example below for your reference.

## for Trust Wallet:

We need API or RPC to:

* [ ] query account / address balance
* [ ] query transaction details
* [ ] query fee / nonce for sending transaction
* [ ] query blockchain status (block height etc)
* [ ] send raw transaction

## for Backend:

Used to create transaction list index and notify users about incoming/outgoing transactions.

* [ ] query transactions in a block

## Example

We will take XRP as an example here, it supports WebSocket, JSON-RPC (including over HTTP)

### Query account / address balance:

* [x] JSON RPC method: `account_info` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/account\\_info>)

### Query transaction details:

* [x] JSON RPC method: `tx` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/transaction-methods/tx>)

### Query fee / nonce for sending transaction:

* [x] fee: JSON RPC method: `fee` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/server-info-methods/fee>)
* [x] nonce: same as `account_info`, you can find `Sequence` in response.

### Query blockchain status (block height etc):

* [x] JSON RPC method: `server_state` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/server-info-methods/server\\_state>)

### Send raw transaction:

* [x] JSON RPC method: `submit` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/transaction-methods/submit>)

### Query sent / received transactions for an account / address:

* [x] JSON RPC method: `account_tx` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/account-methods/account\\_tx>)

### Query transactions in a block:

* [x] JSON RPC method: `ledger` (<https://xrpl.org/docs/references/http-websocket-apis/public-api-methods/ledger-methods/ledger>)


---

# 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://developer.trustwallet.com/developer/wallet-core/newblockchain/rpc-requirements.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.
