Skip to content

Utils ​

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

Contents ​

NameDescription
1. getTokenDataSearch token information using token ID.
2. getTokenDataAllSearch all tokens recorded on the chain network.
3. getTokenDataListFromOwnerSearch the list of token ID owned by the wallet.
4. Parameter DescriptionParameters required to call API.

1. getTokenData ​

Imports token ID information.

Parameters ​

NameTypeExample
tokenIDString"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 ​

NameTypeExample
ownerAddressString"firma1nssuz67am2uwc2hjgvphg0fmj3k9l6cx65ux9u"

Return value ​

bash
[
  'ufirma1666777465',
  'ufirma1666777859'
]

4. Parameter Description ​

NameDescription
tokenIDThis is an ID generated at the time of token creation.
ownerAddressFor 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”).