Change Mnemonic Password#
change_mnemonic_passwordAPI-v2change_mnemonic_password#
The change_mnemonic_password method allows a user to update the password used to encrypt a mnemonic phrase in their local database.
Request Parameters#
| Parameter | Type | Required | Description |
| current_password | string |
✓
| the active mnemonic password for your wallet |
| new_password | string |
✓
| the new password to use for encrypting your active mnemonic password |
Response Parameters#
| Parameter | Type | Required | Description |
| result | null |
✓
| Returns null on successful password change. |
📌 Examples#
Command#
{
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
}
curl --url "http://127.0.0.1:7783" --data '{
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
}'
import requests
import json
url = "http://127.0.0.1:7783"
payload = {
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
}
response = requests.post(url, json=payload)
print(json.dumps(response.json(), indent=2))
const payload = {
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
};
const response = await fetch("http://127.0.0.1:7783", {
method: "POST",
body: JSON.stringify(payload),
});
console.log(await response.json());
<?php
$payload = <<<'JSON'
{
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
}
JSON;
$ch = curl_init("http://127.0.0.1:7783");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $payload);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
package main
import (
"bytes"
"fmt"
"io"
"net/http"
)
func main() {
payload := []byte(`{"mmrpc":"2.0","method":"change_mnemonic_password","userpass":"RPC_UserP@SSW0RD","params":{"current_password":"old_password123","new_password":"new_password456"}}`)
resp, err := http.Post("http://127.0.0.1:7783", "application/json", bytes.NewBuffer(payload))
if err != nil {
panic(err)
}
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}
require 'net/http'
require 'json'
require 'uri'
uri = URI("http://127.0.0.1:7783")
payload = {
"mmrpc": "2.0",
"method": "change_mnemonic_password",
"userpass": "RPC_UserP@SSW0RD",
"params": {
"current_password": "old_password123",
"new_password": "new_password456"
}
}
response = Net::HTTP.post(uri, payload.to_json, 'Content-Type' => 'application/json')
puts JSON.pretty_generate(JSON.parse(response.body))
Show Change Mnemonic Password Response
Response (success)#
{
"mmrpc": "2.0",
"result": null,
"id": null
}
Error Types#
| Parameter | Type | Required | Description |
| WalletsStorageError | string |
–
| Error decrypting or accessing wallet storage. |
Show Error Responses
⚠️ Error Responses#
WalletsStorageError (Wrong Password)#
{
"mmrpc": "2.0",
"error": "Wallets storage error: Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch",
"error_path": "lp_wallet.mnemonic.decrypt",
"error_trace": "lp_wallet:551] lp_wallet:141] mnemonic:109] decrypt:56]",
"error_type": "WalletsStorageError",
"error_data": "Error decrypting passphrase: Error decrypting mnemonic: HMAC error: MAC tag mismatch",
"id": null
}