-
Notifications
You must be signed in to change notification settings - Fork 5
UseCases_tokens_Token balance
Scenario: Perform basic operations with tokens
Feature: View token balance
Actor: Any user
Summary:
The wallet's per-token balance can be retrieved with the command: token balance (TOKENGROUPID) (BYTZADDRESS)
. If a wallet contains token authorities, the per-token total set of authorities is included in the output. the total of the token authorities available in the wallet. The list can be limited by tokengroup or by tokengroup and BYTZ address.
Preconditions:
No preconditions.
Steps:
To show all tokens in a wallet, use the following command:
$ gettokenbalance
[
{
"groupID": "bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84",
"ticker": "GVT",
"name": "GuardianValidator",
"balance": "71",
"authorities": "mint melt child rescript subgroup configure"
},
{
"groupID": "bytzreg1zd4077w2tk2ct4wqfd4er3esasgxmvkeehknwumrea4h0tx3nz7sqta2cgp",
"ticker": "RTTOK",
"name": "RegtestToken",
"balance": "10000",
"authorities": "mint melt child rescript subgroup configure"
},
{
"groupID": "bytzreg1zvjns3w2h5mxcz3pg24whdyhygkcdgerqjzk86n7uzfu6u8nry3qsuwdydt",
"ticker": "MGT",
"name": "Management",
"balance": "500.0000",
"authorities": "mint melt child rescript subgroup configure"
}
]
This wallet holds 500 MGT, 71 GVT, full authority RTTOK, and balance of 100000 RTTOK
If you want to retrieve the token group info connected to the tokengroup ID returned by the token balance command, use the
tokeninfo groupid
command:
$ 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"
}
}
]
To retrieve only the balance of a specific group, specify the tokengroup ID as a parameter as follows:
$ gettokenbalance bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84
{
"groupID": "bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84",
"balance": "71",
"authorities": "mint melt child rescript subgroup configure"
}
To retrieve only the balance of a specific group at a specific address, specify both parameters:
$ gettokenbalance bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84 TkhfncwgMnzDqD4W14UVLgYxebuUbWuHWm
{
"groupID": "bytzreg1zw0tzp0x05szcvhq68gyh9d6v5zhc652q2r8al8dk3r8vauxj3vqsxstc84",
"balance": "71"
}
Postconditions:
- An overview of available tokens and token authorities is displayed
Related use cases:
Builds
HOW TO: Compile the Bytz daemon from source
Bytz Guardian Validator Nodes
HOWTO: Bytz 2.0 GVT Quickstart Guide
HOWTO: Setup Bytz 2.0 remote Masternode with Ubuntu remote and local QT wallet
Bytz Currency Token System - ATP
Atomic Token Protocol (ATP) Overview
Bytz Token system Basic Operations
Create new token
Send tokens
Use Cases - Create new NFT
Token balance
View token information
Testing Bytz tokens on regtest
Start regtest
Access Token Management Key
Bytz Token group management
Key rotation with token authorities
Create and distribute the GVT token for starting a GVN
Create Management Tokens
Drop token mint capability
Find token authorities
General FAQ
HOWTO: Backup my wallet and its data
HOWTO: Backup Bytz coin blockchain database
HOWTO: Export private Keys from Bytz Qt
HOWTO: Import private key to Bytz 2.0 Wallet
User-Documentation
Accounts-Explained
Bytz currency data directory
Raw transactions
Running Bytz
Gitian
Gitian Building
Create Debian - VirtualBox
Create Debian - VMWare
Create Debian - Google Console
Setup Gitian - Debian - VirtualBox
Setup Gitian - Ubuntu - VirtualBox
Setup Gitian - Debian - Google Console
Bytz
Developer-Documentation
API-Calls-List
API-Reference-JSON-RPC