Utils
These functions allow users to search tokens recorded on the blockchain network or search the owner of the tokens.
Contents
| Name | Description |
|---|---|
| 1. getTokenData | Search token information using token ID. |
| 2. getTokenDataAll | Search all tokens recorded on the chain network. |
| 3. getTokenDataListFromOwner | Search the list of token ID owned by the wallet. |
| 4. Parameter Description | Parameters required to call API. |
1. getTokenData
Imports token ID information.
Parameters
| Name | Type | Example |
|---|---|---|
| tokenID | String | "ufirma" |
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
| Name | Type | Example |
|---|---|---|
| ownerAddress | String | "firma1nssuz67am2uwc2hjgvphg0fmj3k9l6cx65ux9u" |
Return value
bash
[
'ufirma1666777465',
'ufirma1666777859'
]4. Parameter Description
| Name | Description |
|---|---|
| tokenID | This is an ID generated at the time of token creation. |
| ownerAddress | 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”). |
