# Utils

These functions allow users to search tokens recorded on the blockchain network or search the owner of the tokens.

## Contents

<table><thead><tr><th width="288">Name</th><th>Description</th></tr></thead><tbody><tr><td><a href="#1.-gettokendata">1. getTokenData</a></td><td>Search token information using token ID.</td></tr><tr><td><a href="#2.-gettokendataall">2. getTokenDataAll</a></td><td>Search all tokens recorded on the chain network.</td></tr><tr><td><a href="#3.-gettokendatalistfromowner">3. getTokenDataListFromOwner</a></td><td>Search the list of token ID owned by the wallet.</td></tr><tr><td><a href="#4.-parameter-description">4. Parameter Description</a></td><td>Parameters required to call API.</td></tr></tbody></table>

### 1. getTokenData

Imports token ID information.

#### Parameters

<table><thead><tr><th width="165.33333333333331">Name</th><th width="142">Type</th><th>Example</th></tr></thead><tbody><tr><td>tokenID</td><td><mark style="color:blue;">String</mark></td><td>"ufirma"</td></tr></tbody></table>

#### Return value

```bash
{
  tokenID: 'ufirma',
  name: 'FIRMA TOKEN',
  symbol: 'FIRMA',
  tokenURI: 'https://firmachain.org/token/fhan9727ba-nny1...-pzn734f771',
  totalSupply: '3000000000000',
  decimal: '6',
  mintable: true,
  burnable: true,
  mintSequence: '2',
  burnSequence: '1',
  owner: 'firma1trqyle...2504y6avgfzr'
}
```

### 2. getTokenDataAll

Search all token data recorded on the blockchain network.

#### Return value

```bash
{
  dataList: [
    {
      tokenID: 'ufirma',
      name: 'FIRMA TOKEN',
      symbol: 'FIRMA',
      tokenURI: 'https://firmachain.org/token/fhan9727ba-nny1...-pzn734f771',
      totalSupply: '3000000000000',
      decimal: '6',
      mintable: true,
      burnable: true,
      mintSequence: '2',
      burnSequence: '1',
      owner: 'firma1trqyle...2504y6avgfzr'
    },
    {
      tokenID: 'ubwb',
      name: 'BWB TOKEN',
      symbol: 'BWB',
      tokenURI: 'https://firmachain.org/token/pi4nuy71x-bg82...-771lkybyq',
      totalSupply: '50000000000',
      decimal: '6',
      mintable: true,
      burnable: true,
      mintSequence: '2',
      burnSequence: '1',
      owner: 'firma1nssuz6...k9l6cx65ux9u'
    }
  ],
  pagination: { next_key: null, total: 2 }
}
```

### 3. getTokenDataListFromOwner

Search the token ID list owned by the wallet.

#### Parameters

<table><thead><tr><th width="165.33333333333331">Name</th><th width="142">Type</th><th>Example</th></tr></thead><tbody><tr><td>ownerAddress</td><td><mark style="color:blue;">String</mark></td><td><em>"</em>firma1nssuz67am2uwc2hjgvphg0fmj3k9l6cx65ux9u"</td></tr></tbody></table>

#### Return value

```bash
[
  'ufirma1666777465',
  'ufirma1666777859'
]
```

### 4. Parameter Description

<table><thead><tr><th width="182">Name</th><th>Description</th></tr></thead><tbody><tr><td>tokenID</td><td>This is an ID generated at the time of token creation.</td></tr><tr><td>ownerAddress</td><td>For this parameter, please enter your FirmaChain wallet address. The owner of the wallet can be anyone. (e.g. “Service Wallet Address” or “Signatory’s Wallet Address”).</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.firmachain.org/master/developer/modules/token/utils.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.
