Skip to content

UseCases_tokens_View token information

BytzCK edited this page Nov 23, 2021 · 1 revision

Use Cases, Scenario’s, Walkthroughts - for tokens

Case "View information related to a token group"

Scenario: Perform basic operations with tokens

Feature: Viewing token information

Actor: Any user

Summary:

Tokens are referred to by their tokengroup identification number: a unique number that is a bech32 encoded representation of data that uniquely defines the token creation parameters. These parameters are:

  • The token group creation transaction (the token root)
  • The token group description (taken from the token creation transaction)
  • The token group flags (currenlty only the flag 'management tokens' is used)

The commands to see the parameters that define the token, use the command tokeninfo:

  • tokeninfo all: displays a full overview of tokengroups.
  • tokeninfo list: displays a full list of ticker/tokengroup ID pairs.
  • tokeninfo stats: display statistics about tokengroups.
  • tokeninfo ticker [TICKER]: display all information on the token identified by this ticker.
  • tokeninfo name [TOKENNAME]: display all information on the token identified by this token name.
  • tokeninfo groupid [TOKENGROUPID]: display all information on the token identified by tokengroup ID.

Preconditions:

No preconditions to use this command.

Steps:

Look up the token group information of GVT

$ tokeninfo all
[
  {
    "groupID": "bytzreg1zuz0rawv",
    "specification": {
      "ticker": "BYTZ",
      "name": "Bytz",
      "metadata_url": "https://bytz.gg",
      "metadata_hash": "0000000000000000000000000000000000000000000000000000000000000000",
      "decimal_pos": 8
    }
  },
  {
    "groupID": "bytzreg1zvjns3w2h5mxcz3pg24whdyhygkcdgerqjzk86n7uzfu6u8nry3qsuwdydt",
    "flags": "management",
    "specification": {
      "ticker": "MGT",
      "name": "Management",
      "metadata_url": "https://github.com/bytzcurrency/ATP-descriptions/blob/master/BYTZ-regtest-MGT.json",
      "metadata_hash": "4f92d91db24bb0b8ca24a2ec86c4b012ccdc4b2e9d659c2079f5cc358413a765",
      "decimal_pos": 4,
      "bls_pubkey": "0f203ecb64417aeadae3696e0c0dd7063f23cdddbe683bd05434afd739f9607eb8a0ca183bf81cf6f596949bae8b94bf"
    }
  },
  {
    "groupID": "bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84",
    "flags": "management",
    "specification": {
      "ticker": "GVT",
      "name": "GuardianValidator",
      "metadata_url": "https://github.com/bytzcurrency/ATP-descriptions/blob/master/BYTZ-regtest-GVT.json",
      "metadata_hash": "f5125a90bde180ef073ce1109376d977f5cbddb5582643c81424cc6cc842babd",
      "decimal_pos": 0,
      "bls_pubkey": "97c40d3489a6109b355a241cfc17863b935f84b6c435c649c6790bbec64b757553885a1cd9ccf22bad67ff04484a1df6"
    }
  },
  {
    "groupID": "bytzreg1zd4077w2tk2ct4wqfd4er3esasgxmvkeehknwumrea4h0tx3nz7sqta2cgp",
    "specification": {
      "ticker": "RTTOK",
      "name": "RegtestToken",
      "metadata_url": "https://github.com/bytzcurrency/ATP-descriptions/blob/main/regtest/test_token_1.json",
      "metadata_hash": "bbcec1b365e12371997dd8ab0c968a7f571da96772da9ed481f65b08571ef250",
      "decimal_pos": 0
    }
  }
]

$ tokeninfo groupid bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84
[
  {
    "groupID": "bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84",
    "flags": "management",
    "specification": {
      "ticker": "GVT",
      "name": "GuardianValidator",
      "metadata_url": "https://github.com/bytzcurrency/ATP-descriptions/blob/master/BYTZ-regtest-GVT.json",
      "metadata_hash": "f5125a90bde180ef073ce1109376d977f5cbddb5582643c81424cc6cc842babd",
      "decimal_pos": 0,
      "bls_pubkey": "97c40d3489a6109b355a241cfc17863b935f84b6c435c649c6790bbec64b757553885a1cd9ccf22bad67ff04484a1df6"
    }
  }
]

  • The tokeninfo all command also returns the special case of the BYTZ native token.
  • Tickers and token names provided through the command line are case insensitive.

Postconditions:

  • The requested information is displayed.

Related use cases:

Clone this wiki locally