Difference between revisions of "reset"

From Talleo Wiki
Jump to navigation Jump to search
(Created page with "== Input == {| class="wikitable" ! Argument !! Mandatory !! Description !! Format |- | viewSecretKey || no || Secret view key to use || string |} == Output == {| class="wikit...")
 
(Add usage)
 
Line 16: Line 16:
 
* This method clears all cached data and rescans the blockchain for transactions
 
* This method clears all cached data and rescans the blockchain for transactions
 
* if viewSecretKey is specified, old key will be discarded and rescan will use the new key for scanning transactions
 
* if viewSecretKey is specified, old key will be discarded and rescan will use the new key for scanning transactions
 +
 +
== Usage ==
 +
Replace "your_password" and "viewSecretKey" in examples with real values from wallet daemon. Password is specified on command-line of wallet daemon, it is not returned by any API method for security reasons. Secret view key is returned by method [[getViewKey]].
 +
 +
=== cURL ===
 +
* <nowiki>curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "reset", "password": "your_password", "params": {}, "id": "1"}'</nowiki>
 +
* <nowiki>curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "reset", "password": "your_password", "params": {"viewSecretKey" : "7968b4dd4114092ca71a90d38a542926bc32e0437bbc579e6de92ea4306ddf18"}, "id": "1"}'</nowiki>

Latest revision as of 14:35, 24 March 2020

Input

Argument Mandatory Description Format
viewSecretKey no Secret view key to use string

Output

Argument Description Format
none

Description

  • This method clears all cached data and rescans the blockchain for transactions
  • if viewSecretKey is specified, old key will be discarded and rescan will use the new key for scanning transactions

Usage

Replace "your_password" and "viewSecretKey" in examples with real values from wallet daemon. Password is specified on command-line of wallet daemon, it is not returned by any API method for security reasons. Secret view key is returned by method getViewKey.

cURL

  • curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "reset", "password": "your_password", "params": {}, "id": "1"}'
  • curl -X POST http://127.0.0.1:33777/json_rpc -H 'Content-Type: application/json-rpc' -d '{"jsonrpc": "2.0", "method": "reset", "password": "your_password", "params": {"viewSecretKey" : "7968b4dd4114092ca71a90d38a542926bc32e0437bbc579e6de92ea4306ddf18"}, "id": "1"}'