Skip to content

Commit 317352b

Browse files
committed
draft for change_mnemonic_password
1 parent 56a97f7 commit 317352b

File tree

1 file changed

+92
-0
lines changed
  • src/pages/komodo-defi-framework/api/v20/utils/change_mnemonic_password

1 file changed

+92
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
export const title = "Komodo DeFi Framework Method: Change Mnemonic Password";
2+
export const description = "The add_node_to_version_stat method adds a Node's name, IP address and PeerID to a local database to track which version of KDF it is running.";
3+
4+
# change\_mnemonic\_password
5+
6+
The `change_mnemonic_password` method allows a user to update the password used to encrypt their mnemonic phrase in their local database.
7+
8+
Note: To allow collection of version stats, added nodes must open ports 42845 (tcp) and 42855 (ws).
9+
10+
## Arguments
11+
12+
| Structure | Type | Description |
13+
| --------- | ------ | ----------------------------- |
14+
| name | string | the name assigned to the node |
15+
| address | string | the IP address of the node |
16+
| peer\_id | string | the node's unique Peer ID |
17+
18+
#### 📌 Examples
19+
20+
#### Command
21+
22+
<CodeGroup title="" tag="POST" label="change_mnemonic_password" mm2MethodDecorate="true">
23+
```json
24+
{
25+
"mmrpc": "2.0",
26+
"method": "change_mnemonic_password",
27+
"userpass": "RPC_UserP@SSW0RD",
28+
"params": {
29+
"name": "seed1",
30+
"address": "168.119.236.241",
31+
"peer_id": "12D3KooWEsuiKcQaBaKEzuMtT6uFjs89P1E8MK3wGRZbeuCbCw6P"
32+
}
33+
}
34+
```
35+
</CodeGroup>
36+
37+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
38+
#### Response (success)
39+
40+
```json
41+
{
42+
"mmrpc": "2.0",
43+
"result": "success",
44+
"id": null
45+
}
46+
```
47+
48+
#### Response (error - peer id already in database)
49+
50+
```json
51+
{
52+
"mmrpc": "2.0",
53+
"error": "Database error: UNIQUE constraint failed: nodes.peer_id",
54+
"error_path": "lp_stats",
55+
"error_trace": "lp_stats:124]",
56+
"error_type": "DatabaseError",
57+
"error_data": "UNIQUE constraint failed: nodes.peer_id",
58+
"id": null
59+
}
60+
```
61+
62+
#### Response (error - name already in database)
63+
64+
```json
65+
{
66+
"mmrpc": "2.0",
67+
"error": "Database error: UNIQUE constraint failed: nodes.name",
68+
"error_path": "lp_stats",
69+
"error_trace": "lp_stats:124]",
70+
"error_type": "DatabaseError",
71+
"error_data": "UNIQUE constraint failed: nodes.name",
72+
"id": null
73+
}
74+
```
75+
76+
#### Response (error - invalid Peer ID)
77+
78+
```json
79+
{
80+
"mmrpc": "2.0",
81+
"error": "Error on parse peer id 12D3RsaaWRmXsJsCKGAD5FJSsd7CSbbdrsd: decoding multihash failed",
82+
"error_path": "lp_stats",
83+
"error_trace": "lp_stats:121]",
84+
"error_type": "PeerIdParseError",
85+
"error_data": [
86+
"12D3RsaaWRmXsJsCKGAD5FJSsd7CSbbdrsd",
87+
"decoding multihash failed"
88+
],
89+
"id": null
90+
}
91+
```
92+
</CollapsibleSection>

0 commit comments

Comments
 (0)