Omnicore-cli命令一览
Omni的资料相对比较少,把一些常用命令执行结果也列出来,便于快速的了解。
omni_getallbalancesforid
取指定omni代币
Chaim:bin Chaim$ ./omnicore-cli "omni_getallbalancesforid" 1
[
{
"address": "1DUJAPA5i7biVYyZNCnckqEBEjY1Act2ct",
"balance": "100.00000000",
"reserved": "0.00000000"
},
...
为什么是一堆地址?
It returns all balances for the entire state, not just for addresses in the wallet.
omni_getallbalancesforaddress
单独取某个地址的omni代币
Chaim:bin Chaim$ ./omnicore-cli "omni_getallbalancesforaddress" "1LziTa1SYJx4bB7X8imUufQHVJVG6VUuRJ"
[
{
"propertyid": 1,
"balance": "0.00050000",
"reserved": "0.00000000"
},
{
"propertyid": 2,
"balance": "0.10000036",
"reserved": "0.00000000"
}
]
omni_gettransaction
取交易数据
Chaim:bin Chaim$ ./omnicore-cli "omni_gettransaction" "1fc6ef3e006fce0f18d409e2a49f86472a47532913e954e4397e100a49ff0390"
{
"txid": "1fc6ef3e006fce0f18d409e2a49f86472a47532913e954e4397e100a49ff0390",
"fee": "0.00002612",
"sendingaddress": "1FoWyxwPXuj4C6abqwhjDWdz6D4PZgYRjA",
"referenceaddress": "1CYUf3Uq3cqLswFApccRup84szbgYLq1H3",
"ismine": false,
"version": 0,
"type_int": 0,
"type": "Simple Send",
"propertyid": 31,
"divisible": true,
"amount": "12.70000000",
"valid": true,
"blockhash": "0000000000000000001647535108c3d997eeff8503e17369f3bd074fd3bd8ceb",
"blocktime": 1522303393,
"positioninblock": 503,
"block": 515635,
"confirmations": 7547
}
propertyid为31,在这就是USDT了。
再取下以前测试过的地址,为什么这个地址USDT这么多?
Chaim:bin Chaim$ ./omnicore-cli "omni_getallbalancesforaddress" "1FoWyxwPXuj4C6abqwhjDWdz6D4PZgYRjA"
[
{
"propertyid": 31,
"balance": "689041561.18427944",
"reserved": "0.00000000"
}
]
omni_listproperties
列出propertyid的代币,可以看到propertyid=31是啥了
Chaim:bin Chaim$ ./omnicore-cli "omni_listproperties"
[
{
"propertyid": 1,
"name": "Omni",
"category": "N/A",
"subcategory": "N/A",
"data": "Omni serve as the binding between Bitcoin, smart properties and contracts created on the Omni Layer.",
"url": "http://www.omnilayer.org",
"divisible": true
},
{
"propertyid": 2,
"name": "Test Omni