Addressindex RPC Commands
Documentation for Raptoreum Addressindex RPC calls.
getaddressbalance
Returns the balance for an address(es) (requires addressindex to be enabled).
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | addresses | json array | False | ||
| Addresses | |||||
| 1.1 | address | string | False | The base58check encoded address. | |
| 2 | asset | string | False | RTM | Get balance for a particular asset instead of RTM. ("*" for all assets) |
Result for RTM:
{ (json object)
"balance" : n, (numeric) The current total balance in duffs
"balance_immature" : n, (numeric) The current immature balance in duffs
"balance_spendable" : n, (numeric) The current spendable balance in duffs
"received" : n (numeric) The total number of duffs received (including change)
}
Result for assets:
{ (json object)
"asset name" : { (json object)
"balance" : n, (numeric) The current total balance in duffs
"balance_immature" : n, (numeric) The current immature balance in duffs
"balance_spendable" : n, (numeric) The current spendable balance in duffs
"received" : n (numeric) The total number of duffs received (including change)
}
Examples
raptoreum-cli getaddressbalance '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressbalance", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getaddressdeltas
Returns all changes for an address (requires addressindex to be enabled).
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | addresses | json array | False | ||
| Addresses | |||||
| 1.1 | address | string | False | The base58check encoded address. | |
| 2 | asset | string | False | RTM | Get all changes for a particular asset instead of RTM. |
Result
[ (json array)
{ (json object)
"satoshis" : n, (numeric) The difference of duffs
"assetId" : "str", (string) The asset id
"txid" : "hex", (string) The related txid
"index" : n, (numeric) The related input or output index
"blockindex" : n, (numeric) The related block index
"height" : n, (numeric) The block height
"address" : "str" (string) The base58check encoded address
},
...
]
Examples
raptoreum-cli getaddressdeltas '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressdeltas", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getaddressmempool
Returns all mempool deltas for an address (requires addressindex to be enabled).
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | addresses |
json array | Optional | [] | See CLI help for details |
Result
[ (json array)
{ (json object)
"address" : "str", (string) The base58check encoded address
"asset" : "str", (string) The asset name of the associated asset
"assetId" : "str", (string) (only on assets) The asset Id of the associated asset
"txid" : "hex", (string) The related txid
"index" : n, (numeric) The related input or output index
"satoshis" : n, (numeric) The difference of duffs
"timestamp" : xxx, (numeric) The time the transaction entered the mempool (seconds)
"prevtxid" : "hex", (string) The previous txid (if spending)
"prevout" : n (numeric) The previous transaction output index (if spending)
},
...
]
Examples
raptoreum-cli getaddressmempool '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressmempool", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getaddresstxids
Returns the txids for an address(es) (requires addressindex to be enabled).
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | addresses |
json array | Optional | [] | See CLI help for details |
Result
[ (json array)
"hex", (string) The transaction id
...
]
Examples
raptoreum-cli getaddresstxids '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddresstxids", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/
getaddressutxos
Returns all unspent outputs for an address (requires addressindex to be enabled).
Arguments
| Position | Name | Type | Required | Default | Description |
|---|---|---|---|---|---|
| 1 | addresses |
json array | Optional | [] | See CLI help for details |
| 2 | asset |
string | Optional | RTM) Get UTXOs for a particular asset instead of RTM ('*' for all assets | See CLI help for details |
Examples
raptoreum-cli getaddressutxos '{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}'
curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getaddressutxos", "params": [{"addresses": ["XwnLY9Tf7Zsef8gMGL2fhWA9ZmMjt4KPwg"]}] }' -H 'content-type: text/plain;' http://127.0.0.1:10225/