Перейти к основному содержимому

Секреты кошелька и обслуживание

Endpoint
http://127.0.0.1:3420/v3/owner
Credential
Token from open_wallet, inside the encrypted envelope. Loopback only
Methods here
4
Documented against
node 4.0.3, wallet 4.0.0

get_mnemonic

Exposes secret

Return the wallet recovery phrase.

The phrase is the wallet. It arrives in a response body, which means it passes through whatever logs, proxies and terminal history sit in the path. Do not call this from anything that records requests.

Surface
/v3/owner on port 3420
Parameters
2 named
Declared in
api/src/owner_rpc_s.rs:1787
Parameters

Wallet name.

The wallet password.

9 lines
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "get_mnemonic",
  "params": {
    "name": null,
    "password": "<wallet password>"
  }
}
Response
N/A

change_password

Destructive

Re-encrypt the seed with a new password.

Removes the backup seed file unless you ask it not to, and the flag that controls that is inverted from what its name suggests on the CLI.

Surface
/v3/owner on port 3420
Parameters
3 named
Declared in
api/src/owner_rpc_s.rs:1822
Parameters

Wallet name.

Current password.

New password.

10 lines
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "change_password",
  "params": {
    "name": null,
    "old": "<current password>",
    "new": "<new password>"
  }
}
Response
N/A

delete_wallet

Destructive

Delete the wallet.

Removes the wallet from disk. Without the recovery phrase the funds are gone, and the transaction history is gone either way because nothing on the chain can rebuild it.

Surface
/v3/owner on port 3420
Parameters
1 named
Declared in
api/src/owner_rpc_s.rs:1860
Parameters

Wallet name.

8 lines
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "delete_wallet",
  "params": {
    "name": null
  }
}
Response
N/A

scan

Changes state

Rebuild the wallet view of its outputs from the chain.

Harmless with delete_unconfirmed false, and that is what you normally want. True unlocks locked outputs and deletes their transaction log entries, so it discards records rather than rebuilding them.

Surface
/v3/owner on port 3420
Parameters
3 named
Declared in
api/src/owner_rpc_s.rs:1400
  • A plain scan is the right first move when a balance looks wrong. It does not release locks, because a lock is a local record the chain knows nothing about.
Parameters

Session token. Every method on this surface needs it.

Height to scan from. Null means the wallet decides.

Leave this false unless you have read the risk note.

10 lines
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "scan",
  "params": {
    "token": "<token from open_wallet>",
    "start_height": null,
    "delete_unconfirmed": false
  }
}
Response
N/A

Далее