Skip to content

Commit 5cca8ad

Browse files
committed
rm internal resp params
1 parent 870b797 commit 5cca8ad

File tree

5 files changed

+100
-37
lines changed

5 files changed

+100
-37
lines changed

filepathSlugs.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -2766,6 +2766,8 @@
27662766
"response-2",
27672767
"request-including-nft-initialization",
27682768
"response-3",
2769+
"request-using-wallet-connect",
2770+
"response-4",
27692771
"error-responses",
27702772
"error-types",
27712773
"platform-is-already-activated-error",
@@ -3793,7 +3795,8 @@
37933795
"arguments",
37943796
"response",
37953797
"examples",
3796-
"command",
3798+
"command-via-pairing-topic",
3799+
"command-via-session-topic",
37973800
"response-2"
37983801
],
37993802
"src/pages/komodo-defi-framework/api/v20-dev/wc_get_sessions/index.mdx": [

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

+7-10
Original file line numberDiff line numberDiff line change
@@ -556,16 +556,13 @@ The `WcConnNs` object contains details of approved chains, methods and events wh
556556

557557
The `WcSession` object contains details of active WalletConnect sessions.
558558

559-
| Parameter | Type | Description |
560-
| ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
561-
| topic | string | The session topic hex string, used to identify the session for communications with the external wallet/dapp. |
562-
| metadata | object | Arbitrary data returned from the external wallet/dapp on connection. |
563-
| peer\_pubkey | string | TBA |
564-
| pairing\_topic | string | The pairing topic hex string, used for the initial external wallet/dapp connection. |
565-
| namespaces | object | Contains the same two [WcConnNs](/komodo-defi-framework/api/common_structures/#wc-conn-ns) objects for Cosmos/EIP155 which were input when initialising the connection via [wc\_new\_connection](/komodo-defi-framework/api/v20-dev/wc_new_connection/#wc-new-connection). |
566-
| subscription\_id | string | A hex string to identify the connection's subscription |
567-
| properties | Null | TBA |
568-
| expiry | integer | A timestamp in [unix epoch format](https://www.epochconverter.com/) indicating when the connection will expire if not otherwise closed. |
559+
| Parameter | Type | Description |
560+
| -------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
561+
| topic | string | The session topic hex string, used to identify the session for communications with the external wallet/dapp. |
562+
| metadata | object | Arbitrary data returned from the external wallet/dapp on connection. |
563+
| pairing\_topic | string | The pairing topic hex string, used for the initial external wallet/dapp connection. |
564+
| namespaces | object | Contains the same two [WcConnNs](/komodo-defi-framework/api/common_structures/#wc-conn-ns) objects for Cosmos/EIP155 which were input when initialising the connection via [wc\_new\_connection](/komodo-defi-framework/api/v20-dev/wc_new_connection/#wc-new-connection). |
565+
| expiry | integer | A timestamp in [unix epoch format](https://www.epochconverter.com/) indicating when the connection will expire if not otherwise closed. |
569566

570567
<CollapsibleSection expandedText="Hide Examples" collapsedText="Show Examples">
571568
#### Example

src/pages/komodo-defi-framework/api/v20-dev/wc_get_session/index.mdx

+29-14
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
99

1010
## Arguments
1111

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-
| topic | string | An active session topic (or pairing topic) hex string. |
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+
| topic | string | An active session topic (or pairing topic) hex string. |
1616

1717
## Response
1818

@@ -22,7 +22,7 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
2222

2323
#### 📌 Examples
2424

25-
#### Command
25+
#### Command via pairing topic
2626

2727
<CodeGroup title="" tag="POST" label="wc_get_session" mm2MethodDecorate="true">
2828
```json
@@ -32,12 +32,32 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
3232
"mmrpc": "2.0",
3333
"params": {
3434
"with_pairing_topic": true,
35-
"topic": "efe5d00ff97750d40e96f0e794cc10106245da8b98091af69d2d42faa94efcd5"
35+
"topic": "ad2fbcc28d410158431a3dc181d4365462df5cef6c90402b3e415c9d75f7c6f1"
3636
}
3737
}
3838
```
3939
</CodeGroup>
4040

41+
#### Command via session topic
42+
43+
<CodeGroup title="" tag="POST" label="wc_get_session" mm2MethodDecorate="true">
44+
```json
45+
{
46+
"method": "wc_get_session",
47+
"userpass": "RPC_UserP@SSW0RD",
48+
"mmrpc": "2.0",
49+
"params": {
50+
"with_pairing_topic": false,
51+
"topic": "008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95"
52+
}
53+
}
54+
```
55+
</CodeGroup>
56+
57+
<Note>
58+
Both of the above queries return the same result.
59+
</Note>
60+
4161
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
4262
#### Response
4363

@@ -46,7 +66,7 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
4666
"mmrpc": "2.0",
4767
"result": {
4868
"session": {
49-
"topic": "732f19eca1865ea4086ba767b9cf16e8521be6303aa92aadb02d46f711f374b7",
69+
"topic": "008bb50bc495f768d74d1a0c558fc3ca32ef35f5c507790ea27d01983421ed95",
5070
"metadata": {
5171
"description": "Trust Wallet is a secure and easy-to-use mobile wallet",
5272
"url": "https://trustwallet.com",
@@ -55,8 +75,7 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
5575
],
5676
"name": "Trust Wallet"
5777
},
58-
"peer_pubkey": "8596319241d1b10cfef894758188d604fde70ab3246a0b8ccd29d1935b034b66",
59-
"pairing_topic": "0e9712d8aff1825cf738621d96c62f73a1a0037428e2f258b2e81410b6172f68",
78+
"pairing_topic": "ad2fbcc28d410158431a3dc181d4365462df5cef6c90402b3e415c9d75f7c6f1",
6079
"namespaces": {
6180
"cosmos": {
6281
"chains": [
@@ -74,11 +93,9 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
7493
},
7594
"eip155": {
7695
"chains": [
77-
"eip155:137",
7896
"eip155:43114"
7997
],
8098
"accounts": [
81-
"eip155:137:0x85ed99633e9d03a30ed60209079944e1f4272048",
8299
"eip155:43114:0x85ed99633e9d03a30ed60209079944e1f4272048"
83100
],
84101
"methods": [
@@ -92,9 +109,7 @@ For details on a full list of active WalletConnect sessions, use the [wc\_get\_s
92109
]
93110
}
94111
},
95-
"subscription_id": "9f0b670f0f8a3bc8fbbbc740dc21fe17efea25bc131462df485577ab91a07280",
96-
"properties": null,
97-
"expiry": 1742187580
112+
"expiry": 1742187410
98113
}
99114
},
100115
"id": null

src/pages/komodo-defi-framework/api/v20-dev/wc_get_sessions/index.mdx

-12
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
5151
],
5252
"name": "Trust Wallet"
5353
},
54-
"peer_pubkey": "f6c6c9c9ec460b631395192e83ff77625136b13ce2c36acd71290b7d816e2113",
5554
"pairing_topic": "ad604cd186f5dc9498343fbd763f6d6963ea511de0e5d557a33a8e3790d6d4d5",
5655
"namespaces": {
5756
"cosmos": {
@@ -86,8 +85,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
8685
]
8786
}
8887
},
89-
"subscription_id": "8deb29d0c19eb5c3eb0d7ee3beda3693bda4bcc46656dc4f6dcec8db5348751c",
90-
"properties": null,
9188
"expiry": 1741952829
9289
},
9390
{
@@ -100,7 +97,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
10097
],
10198
"name": "Trust Wallet"
10299
},
103-
"peer_pubkey": "07ac7fc4cd4a565354f016da0ac6da086fb43d12e9467d88b5bdf2485f00ac76",
104100
"pairing_topic": "5686b8065981fafca63bb4b2e7e9384bf348612981e69ac99fb8a698204aaed4",
105101
"namespaces": {
106102
"cosmos": {
@@ -135,8 +131,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
135131
]
136132
}
137133
},
138-
"subscription_id": "12d3d0c41d1d329fb3dcd3db3fcf7edad4643eae83ef9dc0f612777460b03f7d",
139-
"properties": null,
140134
"expiry": 1741952162
141135
},
142136
{
@@ -149,7 +143,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
149143
],
150144
"name": "Trust Wallet"
151145
},
152-
"peer_pubkey": "1ea2ee2d46eaa017cd0c217878a8690b4039a781a87f8b8ed860fd46cb648b4a",
153146
"pairing_topic": "2e6e4a25f2d55c26bba9c7c8dbb4979ff6eff30adac83fbc67110d67399f6023",
154147
"namespaces": {
155148
"cosmos": {
@@ -190,8 +183,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
190183
]
191184
}
192185
},
193-
"subscription_id": "a673fa087ec93ee4fcfd4910ff1ebb04a3b8c5fc01e13d57f0ea646ce3c0c843",
194-
"properties": null,
195186
"expiry": 1742183855
196187
},
197188
{
@@ -204,7 +195,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
204195
],
205196
"name": "Trust Wallet"
206197
},
207-
"peer_pubkey": "ac8c3149b4285c5fcb7259318697b4c125f35f1a57423b8e7b4da5b93772db3f",
208198
"pairing_topic": "f8aedf596dde182559ed75ea6358db9f49cf5a8757c0f32551fca8062d613191",
209199
"namespaces": {
210200
"cosmos": {
@@ -241,8 +231,6 @@ The `wc_get_sessions` method returns a list of active WalletConnect sessions. Fo
241231
]
242232
}
243233
},
244-
"subscription_id": "67246cc1b98a3f0ca7e286c0874f278be6c7b9d8803c6396910d91676b7607f6",
245-
"properties": null,
246234
"expiry": 1741955363
247235
}
248236
]

src/pages/komodo-defi-framework/api/v20/coin_activation/enable_eth_with_tokens/index.mdx

+60
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,66 @@ Additionally, it supports ERC20 tokens on the ETH chain and associated ERC20 lik
332332
```
333333
</CollapsibleSection>
334334

335+
#### Request using WalletConnect
336+
337+
Prior to coin activation using WalletConnect, you need to establish a connection with [wc\_new\_connection](/komodo-defi-framework/api/v20-dev/wc_new_connection/#wc-new-connection)
338+
339+
<CodeGroup title="" tag="POST" label="enable_eth_with_tokens" mm2MethodDecorate="true">
340+
```json
341+
{
342+
"userpass": "RPC_UserP@SSW0RD",
343+
"method": "enable_eth_with_tokens",
344+
"mmrpc": "2.0",
345+
"params": {
346+
"ticker": "ETH",
347+
"gas_station_url": "https://ethgasstation.info/json/ethgasAPI.json",
348+
"gas_station_decimals": 8,
349+
"gas_station_policy": {
350+
"policy": "MeanAverageFast"
351+
},
352+
"mm2": 1,
353+
"rpc_mode": "Default",
354+
"priv_key_policy": {
355+
"wallet_connect": {
356+
"session_topic": "3569914dd09a5cc4ac92dedab354f06ff5db17ef616233a8ba562cbea51269fd"
357+
}
358+
},
359+
"swap_contract_address": "0x24ABE4c71FC658C91313b6552cd40cD808b3Ea80",
360+
"fallback_swap_contract": "0x8500AFc0bc5214728082163326C2FF0C73f4a871",
361+
"nodes": [
362+
{
363+
"url": "https://eth1.cipig.net:18555",
364+
"komodo_proxy": false
365+
},
366+
{
367+
"url": "https://eth2.cipig.net:18555",
368+
"komodo_proxy": false
369+
},
370+
{
371+
"url": "https://eth3.cipig.net:18555",
372+
"komodo_proxy": false
373+
}
374+
],
375+
"tx_history": true,
376+
"erc20_tokens_requests": [
377+
{
378+
"ticker": "PEPE-ERC20",
379+
"required_confirmations": 4
380+
}
381+
],
382+
"required_confirmations": 5
383+
}
384+
}
385+
```
386+
</CodeGroup>
387+
388+
<CollapsibleSection expandedText="Hide Response" collapsedText="Show Response">
389+
#### Response
390+
391+
```json
392+
```
393+
</CollapsibleSection>
394+
335395
### Error Responses
336396

337397
<CollapsibleSection expandedText="Hide Errors" collapsedText="Show Errors">

0 commit comments

Comments
 (0)