-
Notifications
You must be signed in to change notification settings - Fork 7
UseCases_tokens_Token balance.md
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) (IONADDRESS)
. 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 ION address.
Preconditions:
No preconditions.
Steps:
To show all tokens in a wallet, use the following command:
$ gettokenbalance
[
{
"groupIdentifier": "tion1zdrdupsksyucmpr7a9gcn5stn0h5m3j26l8k24t52khm5pp9jutssmkpl7v",
"ticker": "ATOM",
"name": "Atoms",
"balance": "100"
},
{
"groupIdentifier": "tion1zwgakvjxnx5trszs9lhpp2j5jn9xnt26jvqd5ffvd33pf44xve7sqg8dyar",
"ticker": "HULK",
"name": "HulkToken",
"balance": "99990",
"authorities": "mint melt child rescript subgroup configure"
},
{
"groupIdentifier": "tion1zv08wr3jqdyqp03vwhq6v4jccyzxqvc0vlyacfcpmtmxuygj2fgsszyfkxj",
"ticker": "XDM",
"name": "DarkMatter",
"balance": "99.0000000000000"
}
]
This wallet holds 99 XDM, 100 ATOM, full authority HULK, and balance of 99990 HULK
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 tion1zwgakvjxnx5trszs9lhpp2j5jn9xnt26jvqd5ffvd33pf44xve7sqg8dyar
[
{
"groupIdentifier": "tion1zwgakvjxnx5trszs9lhpp2j5jn9xnt26jvqd5ffvd33pf44xve7sqg8dyar",
"txid": "680d43bf3e5e7cadd5664651193e9323c65bcba0b6f7a446fede3352e4945101",
"ticker": "HULK",
"name": "HulkToken",
"decimalPos": 0,
"URL": "https://raw.githubusercontent.com/CeForce/hulktoken/master/hulk.json",
"documentHash": "367750e31cb276f5218c013473449c9e6a4019fed603d045b51e25f5db29283a",
"status": [
]
}
]
To retrieve only the balance of a specific group, specify the tokengroup ID as a parameter as follows:
$ gettokenbalance ionrt1z08suycj85usle25z7c8fy0pvqg82759dkant22edca55z5c8q0qc3czz0g
[
{
"groupIdentifier": "tion1zv08wr3jqdyqp03vwhq6v4jccyzxqvc0vlyacfcpmtmxuygj2fgsszyfkxj",
"balance": "99.0000000000000"
}
]
To retrieve only the balance of a specific group at a specific address, specify both parameters:
$ gettokenbalance tion1zv08wr3jqdyqp03vwhq6v4jccyzxqvc0vlyacfcpmtmxuygj2fgsszyfkxj g7hdTS73rTb8HB1NUB9aicaUm6vvWDGg8t
[
{
"groupIdentifier": "tion1zv08wr3jqdyqp03vwhq6v4jccyzxqvc0vlyacfcpmtmxuygj2fgsszyfkxj",
"balance": "99.0000000000000"
}
]
Postconditions:
- An overview of available tokens and token authorities is displayed
Related use cases:
Builds
HOW TO: Compile iond Daemon from source
HOW TO: Compile the ION QT wallet on Ubuntu
Snapcraft installs
Upgrade
ION Masternodes
HOW TO: ION 5.0 Masternode Quickstart Guide
HOW TO: Setup ION 5.0 remote Masternode with Ubuntu remote and local QT wallet(DASH-Rebase)
ION coincore QT wallet ELECTRON MINING
Mining ION coin ELECTRON tokens with Proof of Work
ionomy Sharenodes
ionomy Zendesk hosted Sharenodes and dedicated Masternodes FAQ
ION Chain Token System
Atomic Token Protocol (ATP) Overview
ION Token system Basic Operations
UseCases tokens Create-New-Token
UseCases tokens Send-tokens
UseCases tokens Token-balance
UseCases tokens View-token-information
Testing ION tokens on regtest
UseCases regtest Start-regtest
UseCases regtest Access Token Management Key
ION Token group management
UseCases tokens Key-rotation-with-token-authorities
Create and distribute the XDM token according to the IEO
UseCases tokens Create-Management-Tokens
UseCases tokens Drop-token-mint-capability
UseCases tokens Find-token-authorities
General FAQ
How to backup my wallet and its data
How to: backup ION coin blockchain database
HOW TO: Export Private Keys from ION QT
HOW TO: Import private key to ION 3.0 Wallet
How to generate an onion privacy address
Multisend
User-Documentation
Accounts-Explained
ION-coin-Data-Directory
Raw-Transactions
Running-ION
Gitian
Gitian Building
Gitian-building-create-VM-Debian
Gitian-building-create-Debian-VMware
Gitian-building-create-VM-Fedora
Gitian-building-setup-Gitian-Debian
Gitian-building-setup-Gitian-Debian-Google-Console
Gitian-building-setup-Gitian-Debian-Google-Console-Create-instance-template
Gitian-building-setup-Gitian-Debian-Google-Console-Create-VM-from-template
Gitian-building-setup-Gitian-Fedora
Zerocoin
HOW TO: Convert Zerocoin xION to ION
How to: Backup and restore xION Zerocoin private seed
Developer-Documentation
API-Calls-List
API-Reference-JSON-RPC
Weekly Play to Win ION coin mobile gaming tournaments
How do I get involved
ionomy extra info
XDM DarkMatter IEO
ionomy Support Help Centre
ionomy web links and info
ION coin Technical Whitepaper
ion coin Bounty Procedures
ionomy Bounty Information
ionomy ION current events