Skip to content

Commit b4643be

Browse files
committed
adds wc_ping_session and wc_delete_session
1 parent 5cca8ad commit b4643be

File tree

5 files changed

+127
-0
lines changed

5 files changed

+127
-0
lines changed

filepathSlugs.json

+18
Original file line numberDiff line numberDiff line change
@@ -3790,6 +3790,15 @@
37903790
"command",
37913791
"response-2"
37923792
],
3793+
"src/pages/komodo-defi-framework/api/v20-dev/wc_delete_session/index.mdx": [
3794+
"wc-delete-session",
3795+
"arguments",
3796+
"response",
3797+
"examples",
3798+
"command-via-pairing-topic",
3799+
"command-via-session-topic",
3800+
"response-2"
3801+
],
37933802
"src/pages/komodo-defi-framework/api/v20-dev/wc_get_session/index.mdx": [
37943803
"wc-get-session",
37953804
"arguments",
@@ -3815,6 +3824,15 @@
38153824
"command",
38163825
"response-2"
38173826
],
3827+
"src/pages/komodo-defi-framework/api/v20-dev/wc_ping_session/index.mdx": [
3828+
"wc-ping-session",
3829+
"arguments",
3830+
"response",
3831+
"examples",
3832+
"command-via-pairing-topic",
3833+
"command-via-session-topic",
3834+
"response-2"
3835+
],
38183836
"src/pages/komodo-defi-framework/changelog/index.mdx": [
38193837
"change-log",
38203838
"komodo-de-fi-framework-v2-3-0-beta",

src/data/sidebar.json

+8
Original file line numberDiff line numberDiff line change
@@ -787,6 +787,14 @@
787787
{
788788
"title": "wc_get_sessions",
789789
"href": "/komodo-defi-framework/api/v20-dev/wc_get_sessions/"
790+
},
791+
{
792+
"title": "wc_ping_session",
793+
"href": "/komodo-defi-framework/api/v20-dev/wc_ping_session/"
794+
},
795+
{
796+
"title": "wc_delete_session",
797+
"href": "/komodo-defi-framework/api/v20-dev/wc_delete_session/"
790798
}
791799
]
792800
}

src/pages/komodo-defi-framework/api/index.mdx

+2
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,11 @@ Below is a table of the currently available legacy, v2.0 and v2.0 (Dev) methods:
148148
| [validateaddress](/komodo-defi-framework/api/legacy/validateaddress/#validateaddress) | | |
149149
| | [verify\_message](/komodo-defi-framework/api/v20/utils/message_signing/#verify-message) | |
150150
| [version](/komodo-defi-framework/api/legacy/version/#version) | | |
151+
| | | [wc\_delete\_session](/komodo-defi-framework/api/v20-dev/wc_delete_session/#wc-delete-session) |
151152
| | | [wc\_get\_session](/komodo-defi-framework/api/v20-dev/wc_get_session/#wc-get-session) |
152153
| | | [wc\_get\_sessions](/komodo-defi-framework/api/v20-dev/wc_get_sessions/#wc-get-sessions) |
153154
| | | [wc\_new\_connection](/komodo-defi-framework/api/v20-dev/wc_new_connection/#wc-new-connection) |
155+
| | | [wc\_ping\_session](/komodo-defi-framework/api/v20-dev/wc_ping_session/#wc-ping-session) |
154156
| [withdraw](/komodo-defi-framework/api/legacy/withdraw/#withdraw) | [withdraw](/komodo-defi-framework/api/v20/wallet/tx/withdraw/#withdraw) | |
155157
| | [withdraw\_nft](/komodo-defi-framework/api/v20/non_fungible_tokens/withdraw_nft/#withdraw-nfts) | |
156158
| | [z\_coin\_tx\_history](/komodo-defi-framework/api/v20/wallet/tx/zhtlc_tx_history/#zhtlc-coin-transaction-history) | |
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
export const title = "Komodo DeFi Framework Method: Walletconnect: Delete session";
2+
export const description =
3+
"The wc_delete_session method closes the specified WalletConnect session.";
4+
5+
# wc\_delete\_session
6+
7+
The `wc_delete_session` method closes the specified WalletConnect session.
8+
For details on a full list of active WalletConnect sessions, use the [wc\_get\_sessions](/komodo-defi-framework/api/v20-dev/wc_get_sessions/#wc-get-sessions) method.
9+
10+
## Arguments
11+
12+
| Structure | Type | Description |
13+
| -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| topic | string | An active session topic (or pairing topic) hex string. |
15+
16+
## Response
17+
18+
| Structure | Type | Description |
19+
| --------- | ------ | ---------------------------------------------------------------------------------------- |
20+
| session | object | A standard [WcSession](/komodo-defi-framework/api/common_structures/#wc-session) object. |
21+
22+
#### 📌 Examples
23+
24+
#### Command
25+
26+
<CodeGroup title="" tag="POST" label="wc_delete_session" mm2MethodDecorate="true">
27+
```json
28+
{
29+
"method": "wc_delete_session",
30+
"userpass": "RPC_UserP@SSW0RD",
31+
"mmrpc": "2.0",
32+
"params": {
33+
"with_pairing_topic": false,
34+
"topic": "008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95"
35+
}
36+
}
37+
```
38+
</CodeGroup>
39+
40+
<Note>
41+
Both of the above queries return the same result.
42+
</Note>
43+
44+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
45+
#### Response
46+
47+
```json
48+
```
49+
</CollapsibleSection>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
export const title = "Komodo DeFi Framework Method: Walletconnect: Ping session";
2+
export const description =
3+
"The wc_ping_session method pings a specific WalletConnect session.";
4+
5+
# wc\_ping\_session
6+
7+
The `wc_ping_session` pings the bridge server to check if specific WalletConnect session is responsive.
8+
For details on a full list of active WalletConnect sessions, use the [wc\_get\_sessions](/komodo-defi-framework/api/v20-dev/wc_get_sessions/#wc-get-sessions) method.
9+
10+
## Arguments
11+
12+
| Structure | Type | Description |
13+
| -------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
14+
| with\_pairing\_topic | bool | Defaults to `false`. If `true`, allows using the pairing\_topic hex string in the `topic` param to fetch session details. If `false`, expects `topic` param to be the session topic hex string. |
15+
16+
## Response
17+
18+
| Structure | Type | Description |
19+
| --------- | ------ | ---------------------------------------------------------------------------------------- |
20+
| session | object | A standard [WcSession](/komodo-defi-framework/api/common_structures/#wc-session) object. |
21+
22+
#### 📌 Examples
23+
24+
#### Command via pairing topic
25+
26+
#### Command via session topic
27+
28+
<CodeGroup title="" tag="POST" label="wc_ping_session" mm2MethodDecorate="true">
29+
```json
30+
{
31+
"method": "wc_ping_session",
32+
"userpass": "RPC_UserP@SSW0RD",
33+
"mmrpc": "2.0",
34+
"params": {
35+
"topic": "008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95"
36+
}
37+
}
38+
```
39+
</CodeGroup>
40+
41+
<Note>
42+
Both of the above queries return the same result.
43+
</Note>
44+
45+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
46+
#### Response
47+
48+
```json
49+
```
50+
</CollapsibleSection>

0 commit comments

Comments
 (0)