Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adds get_wallet_names kdf method #357

Merged
merged 2 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions filepathSlugs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2862,6 +2862,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>
Loading