钱包机密与维护
- 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 secretReturn 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/owneron port 3420- Parameters
- 2 named
- Declared in
- api/src/owner_rpc_s.rs:1787
{
"jsonrpc": "2.0",
"id": 1,
"method": "get_mnemonic",
"params": {
"name": null,
"password": "<wallet password>"
}
}N/Achange_password
DestructiveRe-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/owneron port 3420- Parameters
- 3 named
- Declared in
- api/src/owner_rpc_s.rs:1822
{
"jsonrpc": "2.0",
"id": 1,
"method": "change_password",
"params": {
"name": null,
"old": "<current password>",
"new": "<new password>"
}
}N/Adelete_wallet
DestructiveDelete 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/owneron port 3420- Parameters
- 1 named
- Declared in
- api/src/owner_rpc_s.rs:1860
{
"jsonrpc": "2.0",
"id": 1,
"method": "delete_wallet",
"params": {
"name": null
}
}N/Ascan
Changes stateRebuild 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/owneron 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.
{
"jsonrpc": "2.0",
"id": 1,
"method": "scan",
"params": {
"token": "<token from open_wallet>",
"start_height": null,
"delete_unconfirmed": false
}
}N/A