> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trustware.io/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /chains and /tokens

> Discovery endpoints that list all chains and tokens supported by Trustware. Use these to populate selectors dynamically.

These optional discovery endpoints return metadata for all supported chains and tokens. Use them to populate chain and token selectors in your UI rather than hardcoding supported assets. They are not required for the core integration flow.

## GET /chains

`GET https://api.trustware.io/api/v1/routes/chains`

Returns metadata for all supported chains including chain ID, name, type, native currency, RPC URL, block explorer URLs, and supported bridge providers.

### Response

```json theme={null}
[
  {
    "axelarChainName": "Avalanche",
    "blockExplorerUrls": ["https://avascan.info/blockchain/c/"],
    "chainIconURI": "https://raw.githubusercontent.com/0xsquid/assets/main/images/webp128/chains/avalanche.webp",
    "chainId": "43114",
    "chainName": "Chain 43114",
    "chainType": "evm",
    "id": "43114",
    "nativeCurrency": {
      "decimals": 18,
      "name": "Avalanche",
      "symbol": "AVAX"
    },
    "networkName": "Avalanche",
    "providersSupported": ["squid", "lifi"],
    "rpc": "https://api.avax.network/ext/bc/C/rpc",
    "type": "evm"
  }
]
```

### Chain object fields

| Field                | Description                                                                       |
| -------------------- | --------------------------------------------------------------------------------- |
| `chainId`            | Numeric chain ID as a string. Use this value in `fromChain` and `toChain` fields. |
| `chainName`          | Internal chain name.                                                              |
| `networkName`        | Human-readable network name for display.                                          |
| `chainType`          | Chain type: `evm`, `solana`, `stellar`, `btc`, etc.                               |
| `type`               | Alias for `chainType`.                                                            |
| `nativeCurrency`     | Native token metadata: `name`, `symbol`, `decimals`.                              |
| `rpc`                | Public RPC endpoint for this chain.                                               |
| `blockExplorerUrls`  | Array of block explorer URLs.                                                     |
| `chainIconURI`       | Chain logo image URL.                                                             |
| `providersSupported` | Bridge and swap providers available for this chain.                               |

***

## GET /tokens

`GET https://api.trustware.io/api/v1/routes/tokens`

Returns tokens supported by Trustware. Called with no query parameters, it returns the full unpaginated list. Passing any of the optional query parameters below switches the endpoint into paginated mode and the response shape changes accordingly.

### Query parameters

| Parameter      | Required | Description                                                                                          |
| -------------- | -------- | ---------------------------------------------------------------------------------------------------- |
| `chainId`      | No       | Restrict results to a single chain (e.g. `"8453"` for Base). Passing this also activates pagination. |
| `limit`        | No       | Page size when paginating. No fixed default — omit to use the server-side page size.                 |
| `cursor`       | No       | Pagination cursor returned by a previous paginated response.                                         |
| `q`            | No       | Free-text search across token symbol and name.                                                       |
| `includeTotal` | No       | Set to `true` to include the total result count in the paginated response.                           |

<Note>
  Pagination activates as soon as **any** of these query parameters is
  present. Call with no query string to receive the full token list in a
  single response.
</Note>

### Response

```json theme={null}
[
  {
    "address": "0x4acc81dc9c03e5329a2c19763a1d10ba9308339f",
    "chainId": "8453",
    "decimals": 18,
    "logoURI": "https://token-media.defined.fi/8453_0x4acc81dc9c03e5329a2c19763a1d10ba9308339f_large.png",
    "name": "Base Baboon",
    "symbol": "$BOON",
    "type": "evm",
    "usdPrice": 9.35818822286e-8
  }
]
```

### Token object fields

| Field      | Description                                                                  |
| ---------- | ---------------------------------------------------------------------------- |
| `address`  | Token contract address on this chain. Use this in `fromToken` and `toToken`. |
| `chainId`  | Chain this token belongs to.                                                 |
| `symbol`   | Token ticker symbol.                                                         |
| `name`     | Full token name.                                                             |
| `decimals` | Token decimal places.                                                        |
| `type`     | Token type (e.g. `evm`).                                                     |
| `usdPrice` | Current USD price per token.                                                 |
| `logoURI`  | Token logo image URL.                                                        |
