Assets RPC Commands
Documentation for Raptoreum Assets RPC calls.
createasset
- "asset" (string, required) A json object with asset metadata
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
| 1 |
name |
string |
True |
|
Asset name. |
| 2 |
updatable |
bool |
False |
True |
If true, this asset can be modify using reissue process. |
| 3 |
is_root |
bool |
True |
|
True if this asset is a Root Asset. |
| 4 |
root_name |
string |
False |
|
Required if asset is a sub asset. The root asset name for this sub asset. |
| 5 |
isunique |
bool |
False |
False |
If true this is asset is unique, it has an identity per token (NFT flag). |
| 6 |
decimalpoint |
numeric |
True |
|
Has to be [0 to 8]. Has to be 0 if "isunique:" is set true. |
| 7 |
referenceHash |
string |
False |
|
Hash of the underlying physical or digital assets, IPFS hash can be used here or whaetever 128 characters long. |
| 8 |
maxMintCount |
numeric |
True |
|
Has to be [1 to 65535]Number of times this asset can be mint. |
| 9 |
type |
numeric |
False |
|
Distribution type manual=0, coinbase=1, address=2, schedule=3. |
| 10 |
targetAddress |
string |
True |
|
Address to be issued to when asset issue transaction is created. |
| 11 |
issueFrequency |
numeric |
False |
|
Mint specific amount of token every x blocks. |
| 12 |
amount |
numeric |
True |
|
Has to be [1 to 21000000000]. Max 500 if "isunique:" is true. Amount to distribute each time if type is not manual. |
| 13 |
ownerAddress |
string |
True |
|
Address that this asset is owned by. Only key holder of this address will be able to mint new tokens. |
Result
"txid" (string) The transaction id for the new asset
Examples
raptoreum-cli createasset '{"name":"test asset", "updatable":true, "isunique":false, "maxMintCount":10,
"decimalpoint":2, "referenceHash":"", "type":0, "targetAddress":"yQPzaDmnF3FtRsoWijUN7aZDcEdyNAcmVk",
"issueFrequency":0, "amount":10000,"ownerAddress":"yRyiTCKfqMG2dQ9oUvs932TjN1R1MNUTWM"}'
getassetdetailsbyid
- "assetId" (string, required) asset id
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
|
|
|
|
|
|
Result
"asset" (string) The asset details
Examples
raptoreum-cli getassetdetailsbyid b683eccf3267561e1d5f5ad0caeb362b50d0d3a68e71cceee69869df173fed12
getassetdetailsbyname
- "assetname" (string, required) asset name
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
|
|
|
|
|
|
Result
"asset" (string) The asset details
Examples
raptoreum-cli getassetdetailsbyname WenMoon
listaddressesbyasset
Returns a list of all address that own the given asset (with balances)
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
| 2 |
onlytotal |
boolean |
Optional |
false |
See CLI help for details |
| 3 |
count |
integer |
Optional |
50000, MAX=50000 |
See CLI help for details |
| 4 |
start |
integer |
Optional |
0) results skip over the first start assets found (if negative it skips back from the end |
See CLI help for details |
Result
[ (address): balance,
...
]
Examples
raptoreum-cli listaddressesbyasset "ASSET_NAME" false 2 0
raptoreum-cli listaddressesbyasset "ASSET_NAME" true
raptoreum-cli listaddressesbyasset "ASSET_NAME"
listassetbalancesbyaddress
Returns a list of all asset balances for an address.
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
| 2 |
onlytotal |
boolean |
Optional |
false |
See CLI help for details |
| 3 |
count |
integer |
Optional |
50000, MAX=50000 |
See CLI help for details |
| 4 |
start |
integer |
Optional |
0) results skip over the first start assets found (if negative it skips back from the end |
See CLI help for details |
Result
{
(asset_name) : (quantity),
...
}
Examples
raptoreum-cli listassetbalancesbyaddress "myaddress" false 2 0
raptoreum-cli listassetbalancesbyaddress "myaddress" true
raptoreum-cli listassetbalancesbyaddress "myaddress"
listassets
Returns a list of all assets.
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
| 1 |
verbose |
boolean |
Optional |
false |
See CLI help for details |
| 2 |
count |
string |
Optional |
ALL |
See CLI help for details |
| 3 |
start |
numeric |
Optional |
0 |
See CLI help for details |
Examples
listassetsbalance
"asset" (string) list assets balance
Arguments
No arguments.
Result
"asset" (string) list assets balance
Examples
raptoreum-cli listassetsbalance
listunspentassets
Returns array of unspent transaction outputs
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
| 1 |
minconf |
numeric |
Optional |
1 |
See CLI help for details |
| 2 |
maxconf |
numeric |
Optional |
9999999 |
See CLI help for details |
| 4 |
include_unsafe |
bool |
Optional |
true |
See CLI help for details |
Examples
raptoreum-cli listunspentassets
raptoreum-cli listunspentassets 6 9999999 "[\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\",\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\"]"
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspentassets", "params": [6, 9999999 "[\"XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg\",\"XuQQkwA4FYkq2XERzMY2CiAZhJTEDAbtcg\"]"] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
raptoreum-cli listunspentassets 6 9999999 '[]' true '{ "minimumAmount": 0.005 }'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listunspentassets", "params": [6, 9999999, [] , true, { "minimumAmount": 0.005 } ] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
mintasset
- "txid" (string, required) asset txid reference
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
|
|
|
|
|
|
Result
"txid" (string) The transaction id for the new issued asset
Examples
raptoreum-cli mintasset 773cf7e057127048711d16839e4612ffb0f1599aef663d96e60f5190eb7de9a9
raptoreum-cli mintasset 773cf7e057127048711d16839e4612ffb0f1599aef663d96e60f5190eb7de9a9yZBvV16YFvPx11qP2XhCRDi7y2e1oSMpKH1000
sendasset
Transfers a quantity of an owned asset to a given address
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
|
|
|
|
|
|
Result
Examples
raptoreum-cli transfer "ASSET_NAME" 20 "address"
raptoreum-cli transfer "ASSET_NAME" 20 "address"
updateasset
- "asset" (string, required) A json object with asset metadata
Arguments
| Position |
Name |
Type |
Required |
Default |
Description |
|
|
|
|
|
|
Result
"txid" (string) The transaction hash
Examples
raptoreum-cli updateasset '{"name":"test asset", "updatable":true, "maxMintCount":10, "referenceHash":""
,"type":0, "targetAddress":"yQPzaDmnF3FtRsoWijUN7aZDcEdyNAcmVk", "issueFrequency":0
,"amount":10000,"ownerAddress":"yRyiTCKfqMG2dQ9oUvs932TjN1R1MNUTWM"}'