wallet-rpc.md 89.2 KB
Newer Older
1
{% assign version = '2.2.0' | split: '.' %}
el00ruobuob's avatar
el00ruobuob committed
2
{% include disclaimer.html translated="false" version=page.version %}
erciccione's avatar
erciccione committed
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
## Introduction

This is a list of the monero-wallet-rpc calls, their inputs and outputs, and examples of each. The program monero-wallet-rpc replaced the rpc interface that was in simplewallet and then monero-wallet-cli.

All monero-wallet-rpc methods use the same JSON RPC interface. For example:

```
IP=127.0.0.1
PORT=18082
METHOD="make_integrated_address"
PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"
curl \
    -X POST http://$IP:$PORT/json_rpc \
    -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \
    -H 'Content-Type: application/json'
```

If the monero-wallet-rpc was executed with the `--rpc-login` argument as `username:password`, then follow this example:

```
IP=127.0.0.1
PORT=18082
METHOD="make_integrated_address"
PARAMS="{\"payment_id\":\"1234567890123456789012345678900012345678901234567890123456789000\"}"
curl \
    -u username:password --digest \
    -X POST http://$IP:$PORT/json_rpc \
    -d '{"jsonrpc":"2.0","id":"0","method":"'$METHOD'","params":'"$PARAMS"'}' \
    -H 'Content-Type: application/json'
```

34
Note: "@atomic-units" refer to the smallest fraction of 1 XMR according to the monerod implementation. **1 XMR = 1e12 @atomic-units.**
erciccione's avatar
erciccione committed
35

36 37
This list has been updated on a frozen code on 2018-09-14 after merged commit bb30a7236725e456138f055f96a634c75ce2b491 (Wallet RPC version 1.3), and at block height 1643308.

erciccione's avatar
erciccione committed
38 39
### Index of JSON RPC Methods:

40 41 42 43 44 45 46 47 48 49 50 51 52
* [get_balance](#get_balance)
* [get_address](#get_address)
* [get_address_index](#get_address_index)
* [create_address](#create_address)
* [label_address](#label_address)
* [get_accounts](#get_accounts)
* [create_account](#create_account)
* [label_account](#label_account)
* [get_account_tags](#get_account_tags)
* [tag_accounts](#tag_accounts)
* [untag_accounts](#untag_accounts)
* [set_account_tag_description](#set_account_tag_description)
* [get_height](#get_height)
erciccione's avatar
erciccione committed
53 54
* [transfer](#transfer)
* [transfer_split](#transfer_split)
55 56
* [sign_transfer](#sign_transfer)
* [submit_transfer](#submit_transfer)
erciccione's avatar
erciccione committed
57 58
* [sweep_dust](#sweep_dust)
* [sweep_all](#sweep_all)
59 60
* [sweep_single](#sweep_single)
* [relay_tx](#relay_tx)
erciccione's avatar
erciccione committed
61 62 63 64 65 66 67 68 69 70 71
* [store](#store)
* [get_payments](#get_payments)
* [get_bulk_payments](#get_bulk_payments)
* [incoming_transfers](#incoming_transfers)
* [query_key](#query_key)
* [make_integrated_address](#make_integrated_address)
* [split_integrated_address](#split_integrated_address)
* [stop_wallet](#stop_wallet)
* [rescan_blockchain](#rescan_blockchain)
* [set_tx_notes](#set_tx_notes)
* [get_tx_notes](#get_tx_notes)
72 73 74 75 76 77 78 79 80 81 82 83
* [set_attribute](#set_attribute)
* [get_attribute](#get_attribute)
* [get_tx_key](#get_tx_key)
* [check_tx_key](#check_tx_key)
* [get_tx_proof](#get_tx_proof)
* [check_tx_proof](#check_tx_proof)
* [get_spend_proof](#get_spend_proof)
* [check_spend_proof](#check_spend_proof)
* [get_reserve_proof](#get_reserve_proof)
* [check_reserve_proof](#check_reserve_proof)
* [get_transfers](#get_transfers)
* [get_transfer_by_txid](#get_transfer_by_txid)
erciccione's avatar
erciccione committed
84 85
* [sign](#sign)
* [verify](#verify)
86 87
* [export_outputs](#export_outputs)
* [import_outputs](#import_outputs)
erciccione's avatar
erciccione committed
88 89
* [export_key_images](#export_key_images)
* [import_key_images](#import_key_images)
90 91
* [make_uri](#make_uri)
* [parse_uri](#parse_uri)
erciccione's avatar
erciccione committed
92 93 94
* [get_address_book](#get_address_book)
* [add_address_book](#add_address_book)
* [delete_address_book](#delete_address_book)
95
* [refresh](#refresh)
erciccione's avatar
erciccione committed
96 97 98 99 100 101
* [rescan_spent](#rescan_spent)
* [start_mining](#start_mining)
* [stop_mining](#stop_mining)
* [get_languages](#get_languages)
* [create_wallet](#create_wallet)
* [open_wallet](#open_wallet)
102 103 104 105 106 107 108 109 110 111 112
* [close_wallet](#close_wallet)
* [change_wallet_password](#change_wallet_password)
* [is_multisig](#is_multisig)
* [prepare_multisig](#prepare_multisig)
* [make_multisig](#make_multisig)
* [export_multisig_info](#export_multisig_info)
* [import_multisig_info](#import_multisig_info)
* [finalize_multisig](#finalize_multisig)
* [sign_multisig](#sign_multisig)
* [submit_multisig](#submit_multisig)
* [get_version](#get_version)
erciccione's avatar
erciccione committed
113 114 115 116 117

---

## JSON RPC Methods:

118
### **get_balance**
erciccione's avatar
erciccione committed
119 120 121

Return the wallet's balance.

122 123
Alias: *getbalance*.

124 125 126
Inputs:

* *account_index* - unsigned int; Return balance for this account.
127
* *address_indices* - array of unsigned int; (Optional) Return balance detail for those subaddresses.
erciccione's avatar
erciccione committed
128 129 130 131 132

Outputs:

* *balance* - unsigned int; The total balance of the current monero-wallet-rpc in session.
* *unlocked_balance* - unsigned int; Unlocked funds are those funds that are sufficiently deep enough in the Monero blockchain to be considered safe to spend.
133 134 135 136 137 138 139 140
* *multisig_import_needed* - boolean; True if importing multisig data is needed for returning a correct balance.
* *per_subaddress* - array of subaddress information; Balance information for each subaddress in an account.
  * *address_index* - unsigned int; Index of the subaddress in the account.
  * *address* - string; Address at this index. Base58 representation of the public keys.
  * *balance* - unsigned int; Balance for the subaddress (locked or unlocked).
  * *unlocked_balance* - unsigned int; Unlocked balance for the subaddress.
  * *label* - string; Label for the subaddress.
  * *num_unspent_outputs* - unsigned int; Number of unspent outputs available for the subaddress.
erciccione's avatar
erciccione committed
141 142 143 144

Example:

```
145
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_balance","params":{"account_index":0,"address_indices":[0,1]}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
146 147 148 149
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
150
    "balance": 157443303037455077,
151
    "multisig_import_needed": false,
152 153
    "per_subaddress": [{
      "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
154
      "address_index": 0,
155 156 157 158 159 160 161 162
      "balance": 157360317826255077,
      "label": "Primary account",
      "num_unspent_outputs": 5281,
      "unlocked_balance": 157360317826255077
    },{
      "address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
      "address_index": 1,
      "balance": 59985211200000,
163
      "label": "",
164 165 166 167
      "num_unspent_outputs": 1,
      "unlocked_balance": 59985211200000
    }],
    "unlocked_balance": 157443303037455077
erciccione's avatar
erciccione committed
168 169 170 171 172
  }
}
```


173
### **get_address**
erciccione's avatar
erciccione committed
174

175
Return the wallet's addresses for an account. Optionally filter for specific set of subaddresses.
erciccione's avatar
erciccione committed
176

177 178
Alias: *getaddress*.

179 180 181 182
Inputs:

* *account_index* - unsigned int; Return subaddresses for this account.
* *address_index* - array of unsigned int; (Optional) List of subaddresses to return from an account.
erciccione's avatar
erciccione committed
183 184 185 186

Outputs:

* *address* - string; The 95-character hex address string of the monero-wallet-rpc in session.
187 188 189 190 191
* *addresses* array of addresses informations
  * *address* string; The 95-character hex (sub)address string.
  * *label* string; Label of the (sub)address
  * *address_index* unsigned int; index of the subaddress
  * *used* boolean; states if the (sub)address has already received funds
erciccione's avatar
erciccione committed
192 193 194 195

Example:

```
196
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address","params":{"account_index":0,"address_index":[0,1,4]}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
197 198 199 200
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
201
    "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
202
    "addresses": [{
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217
      "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "address_index": 0,
      "label": "Primary account",
      "used": true
    },{
      "address": "7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o",
      "address_index": 1,
      "label": "",
      "used": true
    },{
      "address": "77xa6Dha7kzCQuvmd8iB5VYoMkdenwCNRU9khGhExXQ8KLL3z1N1ZATBD1sFPenyHWT9cm4fVFnCAUApY53peuoZFtwZiw5",
      "address_index": 4,
      "label": "test2",
      "used": true
    }]
erciccione's avatar
erciccione committed
218 219 220 221 222 223
  }
}
```



224
### **get_address_index**
erciccione's avatar
erciccione committed
225

226 227 228 229 230 231 232
Get account and address indexes from a specific (sub)address

Alias: *None*.

Inputs:

* *address* - String; (sub)address to look for.
erciccione's avatar
erciccione committed
233 234 235

Outputs:

236 237 238
* *index* - subaddress informations
  * *major* unsigned int; Account index.
  * *minor* unsigned int; Address index.
erciccione's avatar
erciccione committed
239 240 241 242

Example:

```
243
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_address_index","params":{"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
244 245 246 247
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
248 249 250 251
    "index": {
      "major": 0,
      "minor": 1
    }
erciccione's avatar
erciccione committed
252 253 254 255 256
  }
}
```


257
### **create_address**
erciccione's avatar
erciccione committed
258

259
Create a new address for an account. Optionally, label the new address.
erciccione's avatar
erciccione committed
260

261
Alias: *None*.
erciccione's avatar
erciccione committed
262

263
Inputs:
erciccione's avatar
erciccione committed
264

265 266
* *account_index* - unsigned int; Create a new address for this account.
* *label* - string; (Optional) Label for the new address.
erciccione's avatar
erciccione committed
267 268 269

Outputs:

270 271
* *address* - string; Newly created address. Base58 representation of the public keys.
* *address_index* - unsigned int; Index of the new address under the input account.
erciccione's avatar
erciccione committed
272 273 274 275

Example:

```
276
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_address","params":{"account_index":0,"label":"new-sub"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
277 278 279 280
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
281 282
    "address": "7BG5jr9QS5sGMdpbBrZEwVLZjSKJGJBsXdZLt8wiXyhhLjy7x2LZxsrAnHTgD8oG46ZtLjUGic2pWc96GFkGNPQQDA3Dt7Q",
    "address_index": 5
erciccione's avatar
erciccione committed
283 284 285 286 287
  }
}
```


288
### **label_address**
erciccione's avatar
erciccione committed
289

290
Label an address.
erciccione's avatar
erciccione committed
291

292
Alias: *None*.
erciccione's avatar
erciccione committed
293

294
Inputs:
erciccione's avatar
erciccione committed
295

296 297 298 299
* *index* - subaddress index; JSON Object containing the major & minor address index:
  * *major* - unsigned int; Account index for the subaddress.
  * *minor* - unsigned int; Index of the subaddress in the account.
* *label* - string; Label for the address.
erciccione's avatar
erciccione committed
300

301
Outputs: *None*.
erciccione's avatar
erciccione committed
302 303 304 305

Example:

```
306
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_address","params":{"index":{"major":0,"minor":5},"label":"myLabel"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
307 308 309 310 311 312 313 314
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```

315
### **get_accounts**
erciccione's avatar
erciccione committed
316

317
Get all accounts for a wallet. Optionally filter accounts by tag.
erciccione's avatar
erciccione committed
318

319
Alias: *None*.
erciccione's avatar
erciccione committed
320

321
Inputs:
erciccione's avatar
erciccione committed
322

323
* *tag* - string; (Optional) Tag for filtering accounts.
erciccione's avatar
erciccione committed
324

325
Outputs:
erciccione's avatar
erciccione committed
326

327 328 329 330 331 332 333 334 335
* *subaddress_accounts* - array of subaddress account information:
  * *account_index* - unsigned int; Index of the account.
  * *balance* - unsigned int; Balance of the account (locked or unlocked).
  * *base_address* - string; Base64 representation of the first subaddress in the account.
  * *label* - string; (Optional) Label of the account.
  * *tag* - string; (Optional) Tag for filtering accounts.
  * *unlocked_balance* - unsigned int; Unlocked balance for the account.
* *total_balance* - unsigned int; Total balance of the selected accounts (locked or unlocked).
* *total_unlocked_balance* - unsigned int; Total unlocked balance of the selected accounts.
erciccione's avatar
erciccione committed
336

337
Example:
erciccione's avatar
erciccione committed
338 339

```
340
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_accounts","params":{"tag":"myTag"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
341 342
{
  "id": "0",
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362
  "jsonrpc": "2.0",
  "result": {
    "subaddress_accounts": [{
      "account_index": 0,
      "balance": 157663195572433688,
      "base_address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "label": "Primary account",
      "tag": "myTag",
      "unlocked_balance": 157443303037455077
    },{
      "account_index": 1,
      "balance": 0,
      "base_address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp",
      "label": "Secondary account",
      "tag": "myTag",
      "unlocked_balance": 0
    }],
    "total_balance": 157663195572433688,
    "total_unlocked_balance": 157443303037455077
  }
erciccione's avatar
erciccione committed
363 364 365 366
}
```


367 368 369 370 371
### **create_account**

Create a new account with an optional label.

Alias: *None*.
erciccione's avatar
erciccione committed
372 373 374

Inputs:

375
* *label* - string; (Optional) Label for the account.
erciccione's avatar
erciccione committed
376 377 378

Outputs:

379 380
* *account_index* - unsigned int; Index of the new account.
* *address* - string; Address for this account. Base58 representation of the public keys.
erciccione's avatar
erciccione committed
381 382 383 384

Example:

```
385
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"create_account","params":{"label":"Secondary account"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
386 387 388 389
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
390 391
    "account_index": 1,
    "address": "77Vx9cs1VPicFndSVgYUvTdLCJEZw9h81hXLMYsjBCXSJfUehLa9TDW3Ffh45SQa7xb6dUs18mpNxfUhQGqfwXPSMrvKhVp"
erciccione's avatar
erciccione committed
392 393 394 395 396
  }
}
```


397
### **label_account**
erciccione's avatar
erciccione committed
398

399 400 401 402 403 404 405 406
Label an account.

Alias: *None*.

Inputs:

* *account_index* - unsigned int; Apply label to account at this index.
* *label* - string; Label for the account.
erciccione's avatar
erciccione committed
407 408 409 410 411 412

Outputs: *None*.

Example:

```
413
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"label_account","params":{"account_index":0,"label":"Primary account"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
414 415 416 417
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
418 419 420 421 422
    "account_tags": [{
      "accounts": [0,1],
      "label": "",
      "tag": "myTag"
    }]
erciccione's avatar
erciccione committed
423 424 425 426 427
  }
}
```


428
### **get_account_tags**
erciccione's avatar
erciccione committed
429

430
Get a list of user-defined account tags.
erciccione's avatar
erciccione committed
431

432
Alias: *None*.
erciccione's avatar
erciccione committed
433

434
Inputs: *None*.
erciccione's avatar
erciccione committed
435 436 437

Outputs:

438 439 440 441
* *account_tags* - array of account tag information:
  * *tag* - string; Filter tag.
  * *label* - string; Label for the tag.
  * *accounts* - array of int; List of tagged account indices.
erciccione's avatar
erciccione committed
442 443 444 445

Example:

```
446
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_account_tags","params":""}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
447 448 449 450
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
451 452 453 454
    "account_tags": [{
      "accounts": [0],
      "label": "Test tag",
      "tag": "myTag"
erciccione's avatar
erciccione committed
455 456 457 458 459 460
    }]
  }
}
```


461
### **tag_accounts**
erciccione's avatar
erciccione committed
462

463
Apply a filtering tag to a list of accounts.
erciccione's avatar
erciccione committed
464

465
Alias: *None*.
erciccione's avatar
erciccione committed
466

467
Inputs:
erciccione's avatar
erciccione committed
468

469 470
* *tag* - string; Tag for the accounts.
* *accounts* - array of unsigned int; Tag this list of accounts.
erciccione's avatar
erciccione committed
471

472
Outputs: *None*.
erciccione's avatar
erciccione committed
473 474 475 476

Example:

```
477
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"tag_accounts","params":{"tag":"myTag","accounts":[0,1]}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
478 479 480 481 482 483 484 485 486
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


487
### **untag_accounts**
erciccione's avatar
erciccione committed
488

489 490 491
Remove filtering tag from a list of accounts.

Alias: *None*.
erciccione's avatar
erciccione committed
492 493 494

Inputs:

495
* *accounts* - array of unsigned int; Remove tag from this list of accounts.
erciccione's avatar
erciccione committed
496

497
Outputs: *None*.
erciccione's avatar
erciccione committed
498

499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575
Example:

```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"untag_accounts","params":{"accounts":[1]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **set_account_tag_description**

Set description for an account tag.

Alias: *None*.

Inputs:

* *tag* - string; Set a description for this tag.
* *description* - string; Description for the tag.

Outputs: *None*.

Example:

```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_account_tag_description","params":{"tag":"myTag","description":"Test tag"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **get_height**

Returns the wallet's current block height.

Alias: *getheight*.

Inputs: *None*.

Outputs:

* *height* - unsigned int; The current monero-wallet-rpc's blockchain height. If the wallet has been offline for a long time, it may need to catch up with the daemon.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_height"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "height": 145545
  }
}
```


### **transfer**

Send monero to a number of recipients.

Alias: *None*.

Inputs:

* *destinations* - array of destinations to receive XMR:
  * *amount* - unsigned int; Amount to send to each destination, in @atomic-units.
  * *address* - string; Destination public address.
* *account_index* - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)
576
* *subaddr_indices* - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices)
577
* *priority* - unsigned int; Set a priority for the transaction. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
578 579
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *ring_size* - unsigned int; Number of outputs to mix in the transaction (this output + N decoys from the blockchain).
580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_key* - boolean; (Optional) Return the transaction key after sending.
* *do_not_relay* - boolean; (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
* *get_tx_hex* - boolean; Return the transaction as hex string after sending (Defaults to false)
* *get_tx_metadata* - boolean; Return the metadata needed to relay the transaction. (Defaults to false)


Outputs:

* *amount* - Amount transferred for the transaction.
* *fee* - Integer value of the fee charged for the txn.
* *multisig_txset* - Set of multisig transactions in the process of being signed (empty for non-multisig).
* *tx_blob* - Raw transaction represented as hex string, if get_tx_hex is true.
* *tx_hash* - String for the publically searchable transaction hash.
* *tx_key* - String for the transaction key if get_tx_key is true, otherwise, blank string.
* *tx_metadata* - Set of transaction metadata needed to relay this transfer later, if get_tx_metadata is true.
* *unsigned_txset* - String. Set of unsigned tx for cold-signing purposes.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":100000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":200000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_key": true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 300000000000,
    "fee": 86897600000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "7663438de4f72b25a0e395b770ea9ecf7108cd2f0c4b75be0b14a103d3362be9",
    "tx_key": "25c9d8ec20045c80c93d665c9d3684aab7335f8b2cd02e1ba2638485afd1c70e236c4bdd7a2f1cb511dbf466f13421bdf8df988b7b969c448ca6239d7251490e4bf1bbf9f6ffacffdcdc93b9d1648ec499eada4d6b4e02ce92d4a1c0452e5d009fbbbf15b549df8856205a4c7bda6338d82c823f911acd00cb75850b198c5803",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}
```


### **transfer_split**

Same as transfer, but can split into more than one tx if necessary.

Alias: *None*.

Inputs:

* *destinations* - array of destinations to receive XMR:
  * *amount* - unsigned int; Amount to send to each destination, in @atomic-units.
  * *address* - string; Destination public address.
* *account_index* - unsigned int; (Optional) Transfer from this account index. (Defaults to 0)
632
* *subaddr_indices* - array of unsigned int; (Optional) Transfer from this set of subaddresses. (Defaults to empty - all indices)
633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *ring_size* - unsigned int; Sets ringsize to n (mixin + 1).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending.
* *priority* - unsigned int; Set a priority for the transactions. Accepted Values are: 0-3 for: default, unimportant, normal, elevated, priority.
* *do_not_relay* - boolean; (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
* *get_tx_hex* - boolean; Return the transactions as hex string after sending
* *new_algorithm* - boolean; True to use the new transaction construction algorithm, defaults to false.
* *get_tx_metadata* - boolean; Return list of transaction metadata needed to relay the transfer later.

Outputs:

* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_key_list* - array of: string. The transaction keys for every transaction.
* *amount_list* - array of: integer. The amount transferred for every transaction.
* *fee_list* - array of: integer. The amount of fees paid for every transaction.
* *tx_blob_list* - array of: string. The tx as hex string for every transaction.
* *tx_metadata_list* - array of: string. List of transaction metadata needed to relay the transactions later.
* *multisig_txset* - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
* *unsigned_txset* - string. Set of unsigned tx for cold-signing purposes.

Example:

```
658
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer_split","params":{"destinations":[{"amount":1000000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"},{"amount":2000000000000,"address":"75sNpRwUtekcJGejMuLSGA71QFuK1qcCVLZnYRTfQLgFU5nJ7xiAHtR5ihioS53KMe8pBhH61moraZHyLoG4G7fMER8xkNv"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"get_tx_keys": true}}' -H 'Content-Type: application/json'
659 660 661 662 663
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount_list": [3000000000000],
664
    "fee_list": [473710000],
665
    "multisig_txset": "",
666 667
    "tx_hash_list": ["4adcdc1af3f665770cdf8fb7a380887cd07ac53c2b771bd18df5ca375d5e7540"],
    "tx_key_list": ["5b455c0f97168be652a2c03c5c68a064bb84cdae4ddef01b5c48d73a0bbb27075fb714f2ca19ea6c8ff592417e606addea6deb1d6530e2969f75681ffcbfc4075677b94a8c9197963ae38fa6f543ee68f0a4c4bbda4c453f39538f00b28e980ea08509730b51c004960101ba2f3adbc34cbbdff0d5af9dba061b523090debd06"],
668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206
    "unsigned_txset": ""
  }
}
```


### **sign_transfer**

Sign a transaction created on a read-only wallet (in cold-signing process)

Alias: *None*.

Inputs:

* *unsigned_txset* - string. Set of unsigned tx returned by "transfer" or "transfer_split" methods.
* *export_raw* - boolean; (Optional) If true, return the raw transaction data. (Defaults to false)

Outputs:

* *signed_txset* - string. Set of signed tx to be used for submitting transfer.
* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_raw_list* - array of: string. The tx raw data of every transaction.

In the example below, we first generate an unsigned_txset on a read only wallet before signing it:

Generate unsigned_txset using the above "transfer" method on read-only wallet:
```
curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"transfer","params":{"destinations":[{"amount":1000000000000,"address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}],"account_index":0,"subaddr_indices":[0],"priority":0,"ring_size":7,"do_not_relay":true,"get_tx_hex":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 1000000000000,
    "fee": 15202740000,
    "multisig_txset": "",
    "tx_blob": "...long_hex...",
    "tx_hash": "c648ba0a049e5ce4ec21361dbf6e4b21eac0f828eea9090215de86c76b31d0a4",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": "...long_hex..."
  }
}
```

Sign tx using the previously generated unsigned_txset
```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sign_transfer","params":{"unsigned_txset":...long_hex..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "signed_txset": "...long_hex...",
    "tx_hash_list": ["ff2e2d49fbfb1c9a55754f786576e171c8bf21b463a74438df604b7fa6cebc6d"]
  }
}
```


### **submit_transfer**

Submit a previously signed transaction on a read-only wallet (in cold-signing process).

Alias: *None*.

Inputs:

* *tx_data_hex* - string; Set of signed tx returned by "sign_transfer"

Outputs:

* *tx_hash_list* - array of: string. The tx hashes of every transaction.

In the example below, we submit the transfer using the signed_txset generated above:
```
curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"submit_transfer","params":{"tx_data_hex":...long_hex..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_hash_list": ["40fad7c828bb383ac02648732f7afce9adc520ba5629e1f5d9c03f584ac53d74"]
  }
}
```

### **sweep_dust**

Send all dust outputs back to the wallet's, to make them easier to spend (and mix).

Alias: *sweep_unmixable*.

Inputs:

* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending.
* *do_not_relay* - boolean; (Optional) If true, the newly created transaction will not be relayed to the monero network. (Defaults to false)
* *get_tx_hex* - boolean; (Optional) Return the transactions as hex string after sending. (Defaults to false)
* *get_tx_metadata* - boolean; (Optional) Return list of transaction metadata needed to relay the transfer later. (Defaults to false)

Outputs:

* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_key_list* - array of: string. The transaction keys for every transaction.
* *amount_list* - array of: integer. The amount transferred for every transaction.
* *fee_list* - array of: integer. The amount of fees paid for every transaction.
* *tx_blob_list* - array of: string. The tx as hex string for every transaction.
* *tx_metadata_list* - array of: string. List of transaction metadata needed to relay the transactions later.
* *multisig_txset* - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
* *unsigned_txset* - string. Set of unsigned tx for cold-signing purposes.

Example (In this example, `sweep_dust` returns nothing because there are no funds to sweep):


```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_dust","params":{"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "multisig_txset": "",
    "unsigned_txset": ""
  }
}
```


### **sweep_all**

Send all unlocked balance to an address.

Alias: *None*.

Inputs:

* *address* - string; Destination public address.
* *account_index* - unsigned int; Sweep transactions from this account.
* *subaddr_indices* - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.
* *priority* - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *ring_size* - unsigned int; Sets ringsize to n (mixin + 1).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending.
* *below_amount* - unsigned int; (Optional) Include outputs below this amount.
* *do_not_relay* - boolean; (Optional) If true, do not relay this sweep transfer. (Defaults to false)
* *get_tx_hex* - boolean; (Optional) return the transactions as hex encoded string. (Defaults to false)
* *get_tx_metadata* - boolean; (Optional) return the transaction metadata as a string. (Defaults to false)

Outputs:

* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_key_list* - array of: string. The transaction keys for every transaction.
* *amount_list* - array of: integer. The amount transferred for every transaction.
* *fee_list* - array of: integer. The amount of fees paid for every transaction.
* *tx_blob_list* - array of: string. The tx as hex string for every transaction.
* *tx_metadata_list* - array of: string. List of transaction metadata needed to relay the transactions later.
* *multisig_txset* - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
* *unsigned_txset* - string. Set of unsigned tx for cold-signing purposes.

Example:

```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_all","params":{"address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt","subaddr_indices":[4],"ring_size":7,"unlock_time":0,"get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount_list": [9985885770000],
    "fee_list": [14114230000],
    "multisig_txset": "",
    "tx_hash_list": ["ab4b6b65cc8cd8c9dd317d0b90d97582d68d0aa1637b0065b05b61f9a66ea5c5"],
    "tx_key_list": ["b9b4b39d3bb3062ddb85ec0266d4df39058f4c86077d99309f218ce4d76af607"],
    "unsigned_txset": ""
  }
}
```


### **sweep_single**

Send all of a specific unlocked output to an address.

Alias: *None*.

Inputs:

* *address* - string; Destination public address.
* *account_index* - unsigned int; Sweep transactions from this account.
* *subaddr_indices* - array of unsigned int; (Optional) Sweep from this set of subaddresses in the account.
* *priority* - unsigned int; (Optional) Priority for sending the sweep transfer, partially determines fee.
* *mixin* - unsigned int; Number of outputs from the blockchain to mix with (0 means no mixing).
* *ring_size* - unsigned int; Sets ringsize to n (mixin + 1).
* *unlock_time* - unsigned int; Number of blocks before the monero can be spent (0 to not add a lock).
* *payment_id* - string; (Optional) Random 32-byte/64-character hex string to identify a transaction.
* *get_tx_keys* - boolean; (Optional) Return the transaction keys after sending.
* *key_image* - string; Key image of specific output to sweep.
* *below_amount* - unsigned int; (Optional) Include outputs below this amount.
* *do_not_relay* - boolean; (Optional) If true, do not relay this sweep transfer. (Defaults to false)
* *get_tx_hex* - boolean; (Optional) return the transactions as hex encoded string. (Defaults to false)
* *get_tx_metadata* - boolean; (Optional) return the transaction metadata as a string. (Defaults to false)

Outputs:

* *tx_hash_list* - array of: string. The tx hashes of every transaction.
* *tx_key_list* - array of: string. The transaction keys for every transaction.
* *amount_list* - array of: integer. The amount transferred for every transaction.
* *fee_list* - array of: integer. The amount of fees paid for every transaction.
* *tx_blob_list* - array of: string. The tx as hex string for every transaction.
* *tx_metadata_list* - array of: string. List of transaction metadata needed to relay the transactions later.
* *multisig_txset* - string. The set of signing keys used in a multisig transaction (empty for non-multisig).
* *unsigned_txset* - string. Set of unsigned tx for cold-signing purposes.

Example:

```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"sweep_single","params":{"address":"74Jsocx8xbpTBEjm3ncKE5LBQbiJouyCDaGhgSiebpvNDXZnTAbW2CmUR5SsBeae2pNk9WMVuz6jegkC4krUyqRjA6VjoLD","ring_size":7,"unlock_time":0,"key_image":"a7834459ef795d2efb6f665d2fd758c8d9288989d8d4c712a68f8023f7804a5e","get_tx_keys":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "amount": 27126892247503,
    "fee": 14111630000,
    "multisig_txset": "",
    "tx_blob": "",
    "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
    "tx_key": "",
    "tx_metadata": "",
    "unsigned_txset": ""
  }
}
```


### **relay_tx**

Relay a transaction previously created with `"do_not_relay":true`.

Alias: *None*.

Inputs:

* *hex* - string; transaction metadata returned from a `transfer` method with `get_tx_metadata` set to `true`.

Outputs:

* *tx_hash* - String for the publically searchable transaction hash.

Example:

```
$ curl -X POST http://localhost:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"relay_tx","params":{"hex":"...tx_metadata..."}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_hash": "1c42dcc5672bb09bccf33fb1e9ab4a498af59a6dbd33b3d0cfb289b9e0e25fa5"
  }
}
```


### **store**

Save the wallet file.

Alias: *None*.

Inputs: *None*.

Outputs: *None*.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"store"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **get_payments**

Get a list of incoming payments using a given payment id.

Alias: *None*.

Inputs:

* *payment_id* - string; Payment ID used to find the payments (16 characters hex).

Outputs:

* *payments* - list of:
  * *payment_id* - string; Payment ID matching the input parameter.
  * *tx_hash* - string; Transaction hash used as the transaction ID.
  * *amount* - unsigned int; Amount for this payment.
  * *block_height* - unsigned int; Height of the block that first confirmed this payment.
  * *unlock_time* - unsigned int; Time (in block height) until this payment is safe to spend.
  * *subaddr_index* - subaddress index:
    * *major* - unsigned int; Account index for the subaddress.
    * *minor* - unsigned int; Index of the subaddress in the account.
  * *address* - string; Address receiving the payment; Base58 representation of the public keys.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_payments","params":{"payment_id":"60900e5603bf96e3"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "payments": [{
      "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 1000000000000,
      "block_height": 127606,
      "payment_id": "60900e5603bf96e3",
      "subaddr_index": {
        "major": 0,
        "minor": 0
      },
      "tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
      "unlock_time": 0
    }]
  }
}
```


### **get_bulk_payments**

Get a list of incoming payments using a given payment id, or a list of payments ids, from a given height. This method is the preferred method over `get_payments` because it has the same functionality but is more extendable. Either is fine for looking up transactions by a single payment ID.

Alias: *None*.

Inputs:

* *payment_ids* - array of: string; Payment IDs used to find the payments (16 characters hex).
* *min_block_height* - unsigned int; The block height at which to start looking for payments.

Outputs:

* *payments* - list of:
  * *payment_id* - string; Payment ID matching one of the input IDs.
  * *tx_hash* - string; Transaction hash used as the transaction ID.
  * *amount* - unsigned int; Amount for this payment.
  * *block_height* - unsigned int; Height of the block that first confirmed this payment.
  * *unlock_time* - unsigned int; Time (in block height) until this payment is safe to spend.
  * *subaddr_index* - subaddress index:
    * *major* - unsigned int; Account index for the subaddress.
    * *minor* - unsigned int; Index of the subaddress in the account.
  * *address* - string; Address receiving the payment; Base58 representation of the public keys.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_bulk_payments","params":{"payment_ids":["60900e5603bf96e3"],"min_block_height":"120000"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "payments": [{
      "address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt",
      "amount": 1000000000000,
      "block_height": 127606,
      "payment_id": "60900e5603bf96e3",
      "subaddr_index": {
        "major": 0,
        "minor": 0
      },
      "tx_hash": "3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f",
      "unlock_time": 0
    }]
  }
}
```


### **incoming_transfers**

Return a list of incoming transfers to the wallet.

Inputs:

* *transfer_type* - string; "all": all the transfers, "available": only transfers which are not yet spent, OR "unavailable": only transfers which are already spent.
* *account_index* - unsigned int; (Optional) Return transfers for this account. (defaults to 0)
* *subaddr_indices* - array of unsigned int; (Optional) Return transfers sent to these subaddresses.
* *verbose* - boolean; (Optional) Enable verbose output, return key image if true.

Outputs:

* *transfers* - list of:
  * *amount* - unsigned int; Amount of this transfer.
  * *global_index* - unsigned int; Mostly internal use, can be ignored by most users.
  * *key_image* - string; Key image for the incoming transfer's unspent output (empty unless verbose is true).
  * *spent* - boolean; Indicates if this transfer has been spent.
  * *subaddr_index* - unsigned int; Subaddress index for incoming transfer.
  * *tx_hash* - string; Several incoming transfers may share the same hash if they were in the same transaction.
  * *tx_size* - unsigned int; Size of transaction in bytes.

Example, get all transfers:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"all","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "transfers": [{
      "amount": 60000000000000,
      "global_index": 122405,
      "key_image": "768f5144777eb23477ab7acf83562581d690abaf98ca897c03a9d2b900eb479b",
      "spent": true,
      "subaddr_index": 3,
      "tx_hash": "f53401f21c6a43e44d5dd7a90eba5cf580012ad0e15d050059136f8a0da34f6b",
      "tx_size": 159
    },{
      "amount": 27126892247503,
      "global_index": 594994,
      "key_image": "7e561394806afd1be61980cc3431f6ef3569fa9151cd8d234f8ec13aa145695e",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
      "tx_size": 157
    },{
      "amount": 27169374733655,
      "global_index": 594997,
      "key_image": "e76c0a3bfeaae35e4173712f782eb34011198e26b990225b71aa787c8ba8a157",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "0bd959b59117ee1254bd8e5aa8e77ec04ef744144a1ffb2d5c1eb9380a719621",
      "tx_size": 158
    }]
  }
}
```

Example, get available transfers:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"available","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "transfers": [{
      "amount": 27126892247503,
      "global_index": 594994,
      "key_image": "7e561394806afd1be61980cc3431f6ef3569fa9151cd8d234f8ec13aa145695e",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "106d4391a031e5b735ded555862fec63233e34e5fa4fc7edcfdbe461c275ae5b",
      "tx_size": 157
    },{
      "amount": 27169374733655,
      "global_index": 594997,
      "key_image": "e76c0a3bfeaae35e4173712f782eb34011198e26b990225b71aa787c8ba8a157",
      "spent": false,
      "subaddr_index": 3,
      "tx_hash": "0bd959b59117ee1254bd8e5aa8e77ec04ef744144a1ffb2d5c1eb9380a719621",
      "tx_size": 158
    }]
  }
}
```

Example, get unavailable transfers:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"incoming_transfers","params":{"transfer_type":"unavailable","account_index":0,"subaddr_indices":[3],"verbose":true}}' -H 'Content-Type: application/json'
{
"id": "0",
"jsonrpc": "2.0",
"result": {
  "transfers": [{
    "amount": 60000000000000,
    "global_index": 122405,
    "key_image": "768f5144777eb23477ab7acf83562581d690abaf98ca897c03a9d2b900eb479b",
    "spent": true,
    "subaddr_index": 3,
    "tx_hash": "f53401f21c6a43e44d5dd7a90eba5cf580012ad0e15d050059136f8a0da34f6b",
    "tx_size": 159
  }]
}
}
```


### **query_key**

Return the spend or view private key.

Alias: *None*.

Inputs:

* *key_type* - string; Which key to retrieve: "mnemonic" - the mnemonic seed (older wallets do not have one) OR "view_key" - the view key

Outputs:

* *key* - string; The view key will be hex encoded, while the mnemonic will be a string of words.

Example (Query view key):

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"view_key"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "key": "0a1a38f6d246e894600a3e27238a064bf5e8d91801df47a17107596b1378e501"
  }
}
```

Example (Query mnemonic key):

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"query_key","params":{"key_type":"mnemonic"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "key": "vocal either anvil films dolphin zeal bacon cuisine quote syndrome rejoices envy okay pancakes tulips lair greater petals organs enmity dedicated oust thwart tomorrow tomorrow"
  }
}
```


### **make_integrated_address**

Make an integrated address from the wallet address and a payment id.

Alias: *None*.

Inputs:

* *standard_address* - string; (Optional, defaults to primary address) Destination public address.
1207
* *payment_id* - string; (Optional, defaults to a random ID) 16 characters hex encoded.
1208 1209 1210 1211 1212 1213 1214 1215 1216

Outputs:

* *integrated_address* - string
* *payment_id* - string; hex encoded;

Example (Payment ID is empty, use a random ID):

```
1217
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"make_integrated_address","params":{"standard_address":"55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"}}' -H 'Content-Type: application/json'
1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn",
    "payment_id": "420fa29b2d9a49f5"
  }
}
```


### **split_integrated_address**

Retrieve the standard address and payment id corresponding to an integrated address.

Alias: *None*.

Inputs:

* *integrated_address* - string

Outputs:

* *is_subaddress* - boolean; States if the address is a subaddress
* *payment* - string; hex encoded
* *standard_address* - string

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"split_integrated_address","params":{"integrated_address": "5F38Rw9HKeaLQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZXCkbHUXdPHyiUeRyokn"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "is_subaddress": false,
    "payment_id": "420fa29b2d9a49f5",
    "standard_address": "55LTR8KniP4LQGJSPtbYDacR7dz8RBFnsfAKMaMuwUNYX6aQbBcovzDPyrQF9KXF9tVU6Xk3K8no1BywnJX6GvZX8yJsXvt"
  }
}
```


### **stop_wallet**

Stops the wallet, storing the current state.

Alias: *None*.

Inputs: *None*.

Outputs: *None*.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"stop_wallet"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **rescan_blockchain**

1286 1287
Rescan the blockchain from scratch, losing any information which can not be recovered from the blockchain itself.  
This includes destination addresses, tx secret keys, tx notes, etc.
1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456

Alias: *None*.

Inputs: *None*.

Outputs: *None*.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"rescan_blockchain"}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **set_tx_notes**

Set arbitrary string notes for transactions.

Alias: *None*.

Inputs:

* *txids* - array of string; transaction ids
* *notes* - array of string; notes for the transactions

Outputs: *None*.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"],"notes":["This is an example"]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **get_tx_notes**

Get string notes for transactions.

Alias: *None*.

Inputs:

* *txids* - array of string; transaction ids

Outputs:

* *notes* - array of string; notes for the transactions

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_notes","params":{"txids":["3292e83ad28fc1cc7bc26dbd38862308f4588680fbf93eae3e803cddd1bd614f"]}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "notes": ["This is an example"]
  }
}
```


### **set_attribute**

Set arbitrary attribute.

Alias: *None*.

Inputs:

* *key* - string; attribute name
* *value* - string; attribute value

Outputs: *None*.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"set_attribute","params":{"key":"my_attribute","value":"my_value"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
  }
}
```


### **get_attribute**

Get attribute value by name.

Alias: *None*.

Inputs:

* *key* - string; attribute name

Outputs:

* *value* - string; attribute value

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_attribute","params":{"key":"my_attribute"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "value": "my_value"
  }
}
```


### **get_tx_key**

Get transaction secret key from transaction id.

Alias: *None*.

Inputs:

* *txid* - string; transaction id.

Outputs:

* *tx_key* - string; transaction secret key.

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be"}}' -H 'Content-Type: application/json'
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
    "tx_key": "feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06"
  }
}
```


### **check_tx_key**

Check a transaction in the blockchain with its secret key.

Alias: *None*.

Inputs:

* *txid* - string; transaction id.
* *tx_key* - string; transaction secret key.
* *address* - string; destination public address of the transaction.

Outputs:
erciccione's avatar
erciccione committed
1457

1458 1459 1460
* *confirmations* - unsigned int; Number of block mined after the one with the transaction.
* *in_pool* - boolean; States if the transaction is still in pool or has been added to a block.
* *received* - unsigned int; Amount of the transaction.
erciccione's avatar
erciccione committed
1461 1462 1463 1464

Example:

```
1465
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_key","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","tx_key":"feba662cf8fb6d0d0da18fc9b70ab28e01cc76311278fdd7fe7ab16360762b06","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1466 1467 1468 1469
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1470 1471 1472
    "confirmations": 0,
    "in_pool": false,
    "received": 1000000000000
erciccione's avatar
erciccione committed
1473 1474 1475 1476 1477
  }
}
```


1478 1479 1480 1481 1482
### **get_tx_proof**

Get transaction signature to prove it.

Alias: *None*.
erciccione's avatar
erciccione committed
1483 1484 1485

Inputs:

1486 1487 1488
* *txid* - string; transaction id.
* *address* - string; destination public address of the transaction.
* *message* - string; (Optional) add a message to the signature to further authenticate the prooving process.
erciccione's avatar
erciccione committed
1489 1490 1491

Outputs:

1492
* *signature* - string; transaction signature.
erciccione's avatar
erciccione committed
1493 1494 1495 1496

Example:

```
1497
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"this is my transaction"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1498 1499 1500 1501
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1502
    "signature": "InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"
erciccione's avatar
erciccione committed
1503 1504 1505 1506 1507
  }
}
```


1508
### **check_tx_proof**
erciccione's avatar
erciccione committed
1509

1510 1511 1512
Prove a transaction by checking its signature.

Alias: *None*.
erciccione's avatar
erciccione committed
1513 1514 1515

Inputs:

1516 1517 1518 1519
* *txid* - string; transaction id.
* *address* - string; destination public address of the transaction.
* *message* - string; (Optional) Should be the same message used in `get_tx_proof`.
* *signature* - string; transaction signature to confirm.
erciccione's avatar
erciccione committed
1520 1521 1522

Outputs:

1523 1524 1525 1526
* *confirmations* - unsigned int; Number of block mined after the one with the transaction.
* *good* - boolean; States if the inputs proves the transaction.
* *in_pool* - boolean; States if the transaction is still in pool or has been added to a block.
* *received* - unsigned int; Amount of the transaction.
erciccione's avatar
erciccione committed
1527

1528
In the example below, the transaction has been proven:
erciccione's avatar
erciccione committed
1529 1530

```
1531
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"this is my transaction","signature":"InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1532 1533 1534 1535
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1536 1537 1538 1539
    "confirmations": 482,
    "good": true,
    "in_pool": false,
    "received": 1000000000000
erciccione's avatar
erciccione committed
1540 1541 1542 1543
  }
}
```

1544
In the example below, the wrong message is used, avoiding the transaction to be proved:
erciccione's avatar
erciccione committed
1545 1546

```
1547
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_tx_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","address":"7BnERTpvL5MbCLtj5n9No7J5oE5hHiB3tVCK5cjSvCsYWD2WRJLFuWeKTLiXo5QJqt2ZwUaLy2Vh1Ad51K7FNgqcHgjW85o","message":"wrong message","signature":"InProofV13vqBCT6dpSAXkypZmSEMPGVnNRFDX2vscUYeVS4WnSVnV5BwLs31T9q6Etfj9Wts6tAxSAS4gkMeSYzzLS7Gt4vvCSQRh9niGJMUDJsB5hTzb2XJiCkUzWkkcjLFBBRVD5QZ"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1548 1549 1550 1551
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1552 1553 1554 1555
    "confirmations": 0,
    "good": false,
    "in_pool": false,
    "received": 0
erciccione's avatar
erciccione committed
1556 1557 1558 1559 1560
  }
}
```


1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572
### **get_spend_proof**

Generate a signature to prove a spend. Unlike proving a transaction, it does not requires the destination public address.

Alias: *None*.

Inputs:

* *txid* - string; transaction id.
* *message* - string; (Optional) add a message to the signature to further authenticate the prooving process.

Outputs:
erciccione's avatar
erciccione committed
1573

1574
* *signature* - string; spend signature.
1575 1576 1577 1578 1579

Example:

```
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1580 1581 1582 1583
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1584
    "signature": "SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"
erciccione's avatar
erciccione committed
1585 1586 1587 1588 1589
  }
}
```


1590
### **check_spend_proof**
erciccione's avatar
erciccione committed
1591

1592 1593 1594
Prove a spend using a signature. Unlike proving a transaction, it does not requires the destination public address.

Alias: *None*.
erciccione's avatar
erciccione committed
1595 1596 1597

Inputs:

1598 1599
* *txid* - string; transaction id.
* *message* - string; (Optional) Should be the same message used in `get_spend_proof`.
1600
* *signature* - string; spend signature to confirm.
erciccione's avatar
erciccione committed
1601 1602 1603

Outputs:

1604
* *good* - boolean; States if the inputs proves the spend.
erciccione's avatar
erciccione committed
1605

1606
In the example below, the spend has been proven:
erciccione's avatar
erciccione committed
1607 1608

```
1609
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"this is my transaction","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1610 1611 1612 1613
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1614
    "good": true
erciccione's avatar
erciccione committed
1615 1616 1617 1618
  }
}
```

1619
In the example below, the wrong message is used, avoiding the spend to be proved:
erciccione's avatar
erciccione committed
1620 1621

```
1622
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"check_spend_proof","params":{"txid":"19d5089f9469db3d90aca9024dfcb17ce94b948300101c8345a5e9f7257353be","message":"wrong message","signature":"SpendProofV1aSh8Todhk54736iXgV6vJAFP7egxByuMWZeyNDaN2JY737S95X5zz5mNMQSuCNSLjjhi5HJCsndpNWSNVsuThxwv285qy1KkUrLFRkxMSCjfL6bbycYN33ScZ5UB4Fzseceo1ndpL393T1q638VmcU3a56dhNHF1RPZFiGPS61FA78nXFSqE9uoKCCoHkEz83M1dQVhxZV5CEPF2P6VioGTKgprLCH9vvj9k1ivd4SX19L2VSMc3zD1u3mkR24ioETvxBoLeBSpxMoikyZ6inhuPm8yYo9YWyFtQK4XYfAV9mJ9knz5fUPXR8vvh7KJCAg4dqeJXTVb4mbMzYtsSZXHd6ouWoyCd6qMALdW8pKhgMCHcVYMWp9X9WHZuCo9rsRjRpg15sJUw7oJg1JoGiVgj8P4JeGDjnZHnmLVa5bpJhVCbMhyM7JLXNQJzFWTGC27TQBbthxCfQaKdusYnvZnKPDJWSeceYEFzepUnsWhQtyhbb73FzqgWC4eKEFKAZJqT2LuuSoxmihJ9acnFK7Ze23KTVYgDyMKY61VXADxmSrBvwUtxCaW4nQtnbMxiPMNnDMzeixqsFMBtN72j5UqhiLRY99k6SE7Qf5f29haNSBNSXCFFHChPKNTwJrehkofBdKUhh2VGPqZDNoefWUwfudeu83t85bmjv8Q3LrQSkFgFjRT5tLo8TMawNXoZCrQpyZrEvnodMDDUUNf3NL7rxyv3gM1KrTWjYaWXFU2RAsFee2Q2MTwUW7hR25cJvSFuB1BX2bfkoCbiMk923tHZGU2g7rSKF1GDDkXAc1EvFFD4iGbh1Q5t6hPRhBV8PEncdcCWGq5uAL5D4Bjr6VXG8uNeCy5oYWNgbZ5JRSfm7QEhPv8Fy9AKMgmCxDGMF9dVEaU6tw2BAnJavQdfrxChbDBeQXzCbCfep6oei6n2LZdE5Q84wp7eoQFE5Cwuo23tHkbJCaw2njFi3WGBbA7uGZaGHJPyB2rofTWBiSUXZnP2hiE9bjJghAcDm1M4LVLfWvhZmFEnyeru3VWMETnetz1BYLUC5MJGFXuhnHwWh7F6r74FDyhdswYop4eWPbyrXMXmUQEccTGd2NaT8g2VHADZ76gMC6BjWESvcnz2D4n8XwdmM7ZQ1jFwhuXrBfrb1dwRasyXxxHMGAC2onatNiExyeQ9G1W5LwqNLAh9hvcaNTGaYKYXoceVzLkgm6e5WMkLsCwuZXvB"}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1623 1624 1625 1626
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1627
    "good": false
erciccione's avatar
erciccione committed
1628 1629 1630 1631 1632
  }
}
```


1633
### **get_reserve_proof**
erciccione's avatar
erciccione committed
1634

1635 1636 1637
Generate a signature to prove of an available amount in a wallet.

Alias: *None*.
erciccione's avatar
erciccione committed
1638 1639 1640

Inputs:

1641 1642 1643 1644
* *all* - boolean; Proves all wallet balance to be disposable.
* *account_index* - unsigned int; Specify the account from witch to prove reserve. (ignored if `all` is set to true)
* *amount* - unsigned int; Amount (in @atomic-units) to prove the account has for reserve. (ignored if `all` is set to true)
* *message* - string; (Optional) add a message to the signature to further authenticate the prooving process.
erciccione's avatar
erciccione committed
1645 1646 1647

Outputs:

1648
* *signature* - string; reserve signature.
erciccione's avatar
erciccione committed
1649

1650
Example:
erciccione's avatar
erciccione committed
1651 1652

```
1653
$ curl -X POST http://127.0.0.1:18082/json_rpc -d '{"jsonrpc":"2.0","id":"0","method":"get_reserve_proof","params":{"all":false,"account_index":0,"amount":100000000000}}' -H 'Content-Type: application/json'
erciccione's avatar
erciccione committed
1654 1655 1656 1657
{
  "id": "0",
  "jsonrpc": "2.0",
  "result": {
1658
    "signature": "ReserveProofV11BZ23sBt9sZJeGccf84mzyAmNCP3KzYbE1111112VKmH111118NfCYJQjZ6c46gT2kXgcHCaSSZeL8sRdzqjqx7i1e7FQfQGu2o113UYFVdwzHQi3iENDPa76Kn1BvywbKz3bMkXdZkBEEhBSF4kjjGaiMJ1ucKb6wvMVC4A8sA4nZEdL2Mk3wBucJCYTZwKqA8i1M113kqakDkG25FrjiDqdQTCYz2wDBmfKxF3eQiV5FWzZ6HmAyxnqTWUiMWukP9A3Edy3ZXqjP1b23dhz7Mbj39bBxe3ZeDNu9HnTSqYvHNRyqCkeUMJpHyQweqjGUJ1DSfFYr33J1E7MkhMnEi1o7trqWjVix32XLetYfePG73yvHbS24837L7Q64i5n1LSpd9yMiQZ3Dyaysi5y6jPx7TpAvnSqBFtuCciKoNzaXoA3dqt9cuVFZTXzdXKqdt3cXcVJMNxY8RvKPVQHhUur94Lpo1nSpxf7BN5a5rHrbZFqoZszsZmiWikYPkLX72XUdw6NWjLrTBxSy7KuPYH86c6udPEXLo2xgN6XHMBMBJzt8FqqK7EcpNUBkuHm2AtpGkf9CABY3oSjDQoRF5n4vNLd3qUaxNsG4XJ12L9gJ7GrK273BxkfEA8fDdxPrb1gpespbgEnCTuZHqj1A"
erciccione's avatar
erciccione committed
1659 1660 1661 1662 1663
  }
}
```


1664
### **check_reserve_proof**
erciccione's avatar
erciccione committed
1665

1666
Proves a wallet has a disposable reserve using a signature.
1667 1668

Alias: *None*.