Skip to content

Commit

Permalink
Merge pull request #357 from KomodoPlatform/kdf/add/get_wallet_names
Browse files Browse the repository at this point in the history
  • Loading branch information
gcharang authored Oct 31, 2024
2 parents 1da1d1c + ca203e5 commit dc429ac
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
9 changes: 9 additions & 0 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2860,6 +2860,15 @@
"response-not-currently-staking",
"response-staking-active"
],
"src/pages/komodo-defi-framework/api/v20/get_wallet_names/index.mdx": [
"get-wallet-names",
"arguments",
"response",
"examples",
"command",
"response-in-no-login-mode",
"response-while-logged-in"
],
"src/pages/komodo-defi-framework/api/v20/index.mdx": [
"komodo-de-fi-sdk-rpc-protocol-v2-0",
"request",
Expand Down
4 changes: 4 additions & 0 deletions src/data/sidebar.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,6 +483,10 @@
"title": "get_public_key_hash",
"href": "/komodo-defi-framework/api/v20/get_public_key_hash/"
},
{
"title": "get_wallet_names",
"href": "/komodo-defi-framework/api/v20/get_wallet_names/"
},
{
"title": "get_raw_transaction",
"href": "/komodo-defi-framework/api/v20/get_raw_transaction/"
Expand Down
1 change: 1 addition & 0 deletions src/pages/komodo-defi-framework/api/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
| [get\_relay\_mesh](/komodo-defi-framework/api/legacy/get_relay_mesh/#get-relay-mesh) | | |
| | [get\_staking\_infos](/komodo-defi-framework/api/v20/get_staking_infos/#get-staking-infos) | |
| [get\_trade\_fee](/komodo-defi-framework/api/legacy/get_trade_fee/#get-trade-fee) | | |
| | [get\_wallet\_names](/komodo-defi-framework/api/v20/get_wallet_names/#get-wallet-names) | |
| [import\_swaps](/komodo-defi-framework/api/legacy/import_swaps/#import-swaps) | | |
| [kmd\_rewards\_info](/komodo-defi-framework/api/legacy/kmd_rewards_info/#kmd-rewards-info) | | |
| | | [lightning::nodes::add\_trusted\_node](/komodo-defi-framework/api/v20-dev/lightning/nodes/#add-trusted-node) |
Expand Down
62 changes: 62 additions & 0 deletions src/pages/komodo-defi-framework/api/v20/get_wallet_names/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
export const title = "Komodo DeFi Framework Method: Get Wallet Names";
export const description = "The get_wallet_names method returns a list of wallet names for a user's device.";

# get\_wallet\_names

The `get_wallet_names` method returns returns a list of wallet names for a user's device. If the user is logged in, it will also return the name of the active wallet.

## Arguments

| Structure | Type | Description |
| --------- | ---- | ----------- |
| (none) | | |

#### Response

| Structure | Type | Description |
| ----------------- | ------ | ---------------------------------------------------------------------------- |
| wallet\_names | list | Names of wallets stored on a user's device. |
| activated\_wallet | string | Names of the currrently active wallet. If not yet logged in, returns `null`. |

#### 📌 Examples

#### Command

<CodeGroup title="" tag="POST" label="get_wallet_names" mm2MethodDecorate="true">
```json
{
"userpass": "RPC_UserP@SSW0RD",
"mmrpc": "2.0",
"method": "get_wallet_names",
"id": 0
}
```
</CodeGroup>

<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
#### Response (in no-login mode)

```json
{
"mmrpc": "2.0",
"result": {
"wallet_names": ["Robert Paulson", "Spartacus", "John Galt", "Kaiser Soze"],
"activated_wallet": null
},
"id": 0
}
```

#### Response (while logged in)

```json
{
"mmrpc": "2.0",
"result": {
"wallet_names": ["Robert Paulson", "Spartacus", "John Galt", "Kaiser Soze"],
"activated_wallet": "Robert Paulson"
},
"id": 0
}
```
</CollapsibleSection>

0 comments on commit dc429ac

Please sign in to comment.