@rhinestone/deposit-modal 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/README.md +43 -2
  2. package/bridge-transcript.json +653 -0
  3. package/dist/ClaimModal-IKTJU43Y.cjs +13 -0
  4. package/dist/ClaimModal-SEKNWRMA.mjs +13 -0
  5. package/dist/{DepositModalReown-YNNHLAV2.cjs → DepositModalReown-46LPVFB6.cjs} +16 -15
  6. package/dist/{DepositModalReown-3H75G3XQ.mjs → DepositModalReown-Q2JMLT47.mjs} +6 -5
  7. package/dist/WithdrawModal-5ICGD4HJ.mjs +12 -0
  8. package/dist/WithdrawModal-VP6PMIRO.cjs +12 -0
  9. package/dist/{chunk-GACIGCSN.cjs → chunk-6KG642KH.cjs} +1 -1
  10. package/dist/{chunk-RAADLTSW.cjs → chunk-7ICSHJFE.cjs} +179 -138
  11. package/dist/{chunk-COCBCQQC.mjs → chunk-7SR7ENVJ.mjs} +46 -5
  12. package/dist/{chunk-OLCD75JK.mjs → chunk-CFKC77SV.mjs} +451 -131
  13. package/dist/{chunk-EOMT5LKX.mjs → chunk-IN77XSWO.mjs} +526 -3
  14. package/dist/{chunk-FZ5FZFIG.mjs → chunk-K4H6TGBE.mjs} +1 -1
  15. package/dist/{chunk-DSIZNRWA.mjs → chunk-KTUVSKR4.mjs} +979 -360
  16. package/dist/{chunk-HOGZKHHY.cjs → chunk-LZFRL2AL.cjs} +3 -3
  17. package/dist/{chunk-7N77GIP4.cjs → chunk-MTFJSE52.cjs} +465 -171
  18. package/dist/{chunk-LTMMETAB.mjs → chunk-PKML3XVS.mjs} +404 -110
  19. package/dist/{chunk-ZMT4ATHR.cjs → chunk-V2OBGLJD.cjs} +564 -41
  20. package/dist/{chunk-XYJFEN5D.mjs → chunk-WUJIKCFU.mjs} +1 -1
  21. package/dist/{chunk-CVGNCUVU.cjs → chunk-X2IPAPXU.cjs} +22 -13
  22. package/dist/{chunk-2G2EIN4A.cjs → chunk-YCQZJQO6.cjs} +1272 -653
  23. package/dist/{chunk-5NUIKYSF.cjs → chunk-YWMWI7PZ.cjs} +458 -138
  24. package/dist/{chunk-YREVFB64.mjs → chunk-ZEO6ADM3.mjs} +16 -7
  25. package/dist/claim.cjs +6 -6
  26. package/dist/claim.d.cts +3 -3
  27. package/dist/claim.d.ts +3 -3
  28. package/dist/claim.mjs +5 -5
  29. package/dist/constants.cjs +2 -2
  30. package/dist/constants.d.cts +1 -1
  31. package/dist/constants.d.ts +1 -1
  32. package/dist/constants.mjs +1 -1
  33. package/dist/deposit.cjs +6 -6
  34. package/dist/deposit.d.cts +2 -2
  35. package/dist/deposit.d.ts +2 -2
  36. package/dist/deposit.mjs +5 -5
  37. package/dist/embed.cjs +310 -102
  38. package/dist/embed.d.cts +7 -1
  39. package/dist/embed.d.ts +7 -1
  40. package/dist/embed.mjs +285 -77
  41. package/dist/index.cjs +9 -9
  42. package/dist/index.d.cts +1 -1
  43. package/dist/index.d.ts +1 -1
  44. package/dist/index.mjs +8 -8
  45. package/dist/types-Bho4OA03.d.ts +982 -0
  46. package/dist/types-DP_3KwlD.d.cts +982 -0
  47. package/dist/withdraw.cjs +5 -5
  48. package/dist/withdraw.d.cts +3 -3
  49. package/dist/withdraw.d.ts +3 -3
  50. package/dist/withdraw.mjs +4 -4
  51. package/package.json +28 -7
  52. package/dist/ClaimModal-CREZO27I.mjs +0 -11
  53. package/dist/ClaimModal-JRIA32U2.cjs +0 -11
  54. package/dist/WithdrawModal-NVRX44IZ.mjs +0 -10
  55. package/dist/WithdrawModal-YYSBPCJJ.cjs +0 -10
  56. package/dist/types-B89I8_8H.d.ts +0 -638
  57. package/dist/types-nnDR4tqA.d.cts +0 -638
package/README.md CHANGED
@@ -50,6 +50,17 @@ console error pointing at the CSP. Hosts without an explicit `img-src` (or with
50
50
  > sufficient. They now come from the CDN, which drops ~20 kB (brotli) from the
51
51
  > bundle and gives every Rhinestone surface one source of truth.
52
52
 
53
+ All three modals also post session analytics to Rhinestone (see
54
+ [Analytics](#analytics)), so a host with an explicit `connect-src` must allow the
55
+ orchestrator alongside its own proxy:
56
+
57
+ ```
58
+ connect-src 'self' https://v1.orchestrator.rhinestone.dev;
59
+ ```
60
+
61
+ A blocked origin is reported on `onEvent` as an `analytics_ingest_failure`, not
62
+ surfaced to the user.
63
+
53
64
  ## Example
54
65
 
55
66
  ```tsx
@@ -296,10 +307,40 @@ Flow: user picks Fund from Exchange → backend returns supported exchanges + lo
296
307
  | ----------------------- | --------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
297
308
  | `enableExchangeConnect` | `boolean` | `false` | Show the "Fund from Exchange" row. Requires backend Swapped keys. Needs no wallet. Can be combined with `enableFiatOnramp`. |
298
309
 
310
+ ## Analytics
311
+
312
+ `onEvent` receives the deposit, withdraw and claim funnels as a session-scoped
313
+ stream:
314
+ every event carries the session id, the modal, the widget version and a snapshot
315
+ of the session's configuration.
316
+
317
+ The same events are also sent to Rhinestone, batched, in the background, and
318
+ flushed when the modal closes or the page goes away. Delivery never affects the
319
+ flow and never changes what `onEvent` receives. Sessions are attributed to your
320
+ project through a short-lived token minted at `POST /analytics/ingest-token` on
321
+ your proxy; a proxy that does not forward that route still collects, just
322
+ unattributed.
323
+
324
+ | Prop | Type | Default | Description |
325
+ | ------------------------ | --------- | ------- | --------------------------------------------------------------- |
326
+ | `enableAnalyticsIngest` | `boolean` | `true` | Set `false` to stop sending analytics to Rhinestone. `onEvent` is unaffected. |
327
+
328
+ When a batch cannot be delivered, `onEvent` receives one
329
+ `analytics_ingest_failure` per distinct reason per session, naming the reason
330
+ (`network` — which includes a CSP block — `rejected`, `conflict`,
331
+ `unauthorized`, `throttled`, `unavailable`, `token_unavailable`, `unsupported`),
332
+ the HTTP status when there was one, and how many events the session has lost so
333
+ far.
334
+
299
335
  ## Upgrading
300
336
 
301
- Upgrading from 0.8.x is a breaking change on both modals. See
302
- [`MIGRATION.md`](./MIGRATION.md), or the same guide
337
+ Upgrading from 0.13.x changes what `onEvent` delivers: the deposit events are
338
+ replaced by a method-aware taxonomy, the five flat claim events are replaced by
339
+ a claim funnel, and every event gains a session envelope. A claim-only
340
+ integration now posts analytics too, so it needs the `connect-src` above.
341
+ Upgrading from 0.8.x is a breaking change on both modals.
342
+
343
+ See [`MIGRATION.md`](./MIGRATION.md), or the same guide
303
344
  [in the docs](https://docs.rhinestone.dev/deposits/widget/migration).
304
345
 
305
346
  ## Contributing
@@ -0,0 +1,653 @@
1
+ {
2
+ "transcriptFormat": 1,
3
+ "vocabulary": {
4
+ "protocol": 2,
5
+ "channels": {
6
+ "pageToHost": "rhinestoneBridge",
7
+ "hostToPage": "__rhinestone_bridge"
8
+ },
9
+ "maxFrameLength": 262144,
10
+ "pageMethods": [
11
+ "bridge.probeFrameScope",
12
+ "hello",
13
+ "host.openUrl",
14
+ "host.sendTransaction",
15
+ "host.signRecovery",
16
+ "wallet.request"
17
+ ],
18
+ "hostMethods": [
19
+ "ui.back"
20
+ ],
21
+ "pageEvents": [
22
+ "analytics",
23
+ "dismissRequested",
24
+ "error",
25
+ "lifecycle",
26
+ "ready",
27
+ "ui.state",
28
+ "wallet.connectRequested",
29
+ "wallet.disconnectRequested"
30
+ ],
31
+ "passthroughEvents": [
32
+ "analytics",
33
+ "error",
34
+ "lifecycle"
35
+ ],
36
+ "hostEvents": [
37
+ "session.configure",
38
+ "wallet.state"
39
+ ],
40
+ "capabilities": [
41
+ "bridge.probeFrameScope",
42
+ "host.openUrl",
43
+ "host.sendTransaction",
44
+ "host.signRecovery"
45
+ ],
46
+ "walletMethods": [
47
+ "eth_accounts",
48
+ "eth_chainId",
49
+ "eth_sendTransaction",
50
+ "eth_signTypedData_v4",
51
+ "wallet_sendTransaction",
52
+ "wallet_switchEthereumChain"
53
+ ],
54
+ "dismissalReasons": [
55
+ "settlement-in-progress",
56
+ "submission-in-flight",
57
+ "wallet-request-pending"
58
+ ],
59
+ "dismissSources": [
60
+ "back-past-first-screen",
61
+ "close-button",
62
+ "flow-complete"
63
+ ],
64
+ "errorDomain": "bridge",
65
+ "errorCodes": {
66
+ "CHANNEL_CLOSED": 4,
67
+ "MALFORMED_RESULT": 5,
68
+ "REQUEST_TIMEOUT": 3,
69
+ "SUBMISSION_UNCERTAIN": 2,
70
+ "WALLET_UNAVAILABLE": 1
71
+ },
72
+ "signRecovery": {
73
+ "domain": {
74
+ "name": "Rhinestone Deposit Recovery",
75
+ "version": "1"
76
+ },
77
+ "types": {
78
+ "RecoverDeposit": [
79
+ {
80
+ "name": "depositId",
81
+ "type": "uint256"
82
+ },
83
+ {
84
+ "name": "destination",
85
+ "type": "address"
86
+ }
87
+ ]
88
+ },
89
+ "primaryType": "RecoverDeposit",
90
+ "encodeType": "RecoverDeposit(uint256 depositId,address destination)",
91
+ "domainEncodeType": "EIP712Domain(string name,string version)"
92
+ }
93
+ },
94
+ "frames": [
95
+ {
96
+ "dir": "host->page",
97
+ "kind": "event",
98
+ "type": "session.configure",
99
+ "shape": {
100
+ "backendUrl": "string",
101
+ "mode": "deposit",
102
+ "recipient": "string",
103
+ "targetChain": "number",
104
+ "targetToken": "string",
105
+ "theme": {
106
+ "mode": "dark"
107
+ }
108
+ }
109
+ },
110
+ {
111
+ "dir": "host->page",
112
+ "kind": "event",
113
+ "type": "wallet.state",
114
+ "shape": {
115
+ "accounts": [
116
+ {
117
+ "caip10": "string"
118
+ }
119
+ ],
120
+ "chainId": "string",
121
+ "isConnected": "boolean",
122
+ "isReady": "boolean",
123
+ "name": "string"
124
+ }
125
+ },
126
+ {
127
+ "dir": "host->page",
128
+ "kind": "request",
129
+ "method": "ui.back"
130
+ },
131
+ {
132
+ "dir": "host->page",
133
+ "kind": "response",
134
+ "answers": "bridge.probeFrameScope",
135
+ "ok": false,
136
+ "errorCode": 4200
137
+ },
138
+ {
139
+ "dir": "host->page",
140
+ "kind": "response",
141
+ "answers": "hello",
142
+ "ok": true,
143
+ "shape": {
144
+ "capabilities": [
145
+ "bridge.probeFrameScope",
146
+ "host.openUrl",
147
+ "host.sendTransaction",
148
+ "host.signRecovery"
149
+ ],
150
+ "config": {
151
+ "accountAddress": [
152
+ "string",
153
+ "undefined"
154
+ ],
155
+ "backendUrl": "string",
156
+ "mode": [
157
+ "deposit",
158
+ "withdraw"
159
+ ],
160
+ "recipient": "string",
161
+ "targetChain": "number",
162
+ "targetToken": "string"
163
+ },
164
+ "host": {
165
+ "app": "string",
166
+ "platform": "ios"
167
+ },
168
+ "protocol": "number",
169
+ "wallet": {
170
+ "accounts": [
171
+ {
172
+ "caip10": "string"
173
+ }
174
+ ],
175
+ "chainId": "string",
176
+ "isConnected": "boolean",
177
+ "isReady": "boolean",
178
+ "name": "string"
179
+ }
180
+ }
181
+ },
182
+ {
183
+ "dir": "host->page",
184
+ "kind": "response",
185
+ "answers": "host.openUrl",
186
+ "ok": false,
187
+ "errorCode": 4200
188
+ },
189
+ {
190
+ "dir": "host->page",
191
+ "kind": "response",
192
+ "answers": "host.openUrl",
193
+ "ok": true,
194
+ "shape": {}
195
+ },
196
+ {
197
+ "dir": "host->page",
198
+ "kind": "response",
199
+ "answers": "host.sendTransaction",
200
+ "ok": false,
201
+ "errorCode": 1,
202
+ "errorDomain": "bridge"
203
+ },
204
+ {
205
+ "dir": "host->page",
206
+ "kind": "response",
207
+ "answers": "host.sendTransaction",
208
+ "ok": false,
209
+ "errorCode": 2,
210
+ "errorDomain": "bridge"
211
+ },
212
+ {
213
+ "dir": "host->page",
214
+ "kind": "response",
215
+ "answers": "host.sendTransaction",
216
+ "ok": false,
217
+ "errorCode": 4200
218
+ },
219
+ {
220
+ "dir": "host->page",
221
+ "kind": "response",
222
+ "answers": "host.sendTransaction",
223
+ "ok": false,
224
+ "errorCode": 5,
225
+ "errorDomain": "bridge"
226
+ },
227
+ {
228
+ "dir": "host->page",
229
+ "kind": "response",
230
+ "answers": "host.sendTransaction",
231
+ "ok": true,
232
+ "shape": {
233
+ "txHash": "string"
234
+ }
235
+ },
236
+ {
237
+ "dir": "host->page",
238
+ "kind": "response",
239
+ "answers": "host.signRecovery",
240
+ "ok": false,
241
+ "errorCode": 4200
242
+ },
243
+ {
244
+ "dir": "host->page",
245
+ "kind": "response",
246
+ "answers": "host.signRecovery",
247
+ "ok": true,
248
+ "shape": {
249
+ "signature": "string"
250
+ }
251
+ },
252
+ {
253
+ "dir": "host->page",
254
+ "kind": "response",
255
+ "answers": "wallet.request",
256
+ "walletMethod": "eth_accounts",
257
+ "ok": true,
258
+ "shape": [
259
+ "string"
260
+ ]
261
+ },
262
+ {
263
+ "dir": "host->page",
264
+ "kind": "response",
265
+ "answers": "wallet.request",
266
+ "walletMethod": "eth_chainId",
267
+ "ok": true,
268
+ "shape": "string"
269
+ },
270
+ {
271
+ "dir": "host->page",
272
+ "kind": "response",
273
+ "answers": "wallet.request",
274
+ "walletMethod": "eth_sendTransaction",
275
+ "ok": true,
276
+ "shape": "string"
277
+ },
278
+ {
279
+ "dir": "host->page",
280
+ "kind": "response",
281
+ "answers": "wallet.request",
282
+ "walletMethod": "eth_signTypedData_v4",
283
+ "ok": true,
284
+ "shape": "string"
285
+ },
286
+ {
287
+ "dir": "host->page",
288
+ "kind": "response",
289
+ "answers": "wallet.request",
290
+ "walletMethod": "wallet_sendTransaction",
291
+ "ok": true,
292
+ "shape": "string"
293
+ },
294
+ {
295
+ "dir": "host->page",
296
+ "kind": "response",
297
+ "answers": "wallet.request",
298
+ "walletMethod": "wallet_switchEthereumChain",
299
+ "ok": true,
300
+ "shape": "null"
301
+ },
302
+ {
303
+ "dir": "page->host",
304
+ "kind": "event",
305
+ "type": "analytics",
306
+ "passthrough": true,
307
+ "shape": {
308
+ "after_handoff": [
309
+ "boolean",
310
+ "undefined"
311
+ ],
312
+ "correlator": [
313
+ "undefined",
314
+ {
315
+ "type": "transaction_hash",
316
+ "value": "string"
317
+ }
318
+ ],
319
+ "entry_source": [
320
+ "string",
321
+ "undefined"
322
+ ],
323
+ "funding_method": [
324
+ "null",
325
+ "string"
326
+ ],
327
+ "identifiers": [
328
+ "undefined",
329
+ {
330
+ "integration": "string",
331
+ "network": "string"
332
+ }
333
+ ],
334
+ "modal": "string",
335
+ "reason": [
336
+ "string",
337
+ "undefined"
338
+ ],
339
+ "session_id": "string",
340
+ "session_properties": {
341
+ "asset_migration_providers": "[]",
342
+ "enabled_funding_methods": [
343
+ "string"
344
+ ],
345
+ "fiat_methods": {
346
+ "source": "backend_resolved"
347
+ },
348
+ "gasless_wallet_flow_enabled": "boolean",
349
+ "initial_asset_migration": "null",
350
+ "overlay_close_enabled": "boolean",
351
+ "prefills": {
352
+ "amount": "boolean",
353
+ "initial_asset_migration": "boolean",
354
+ "source_chain": "boolean",
355
+ "source_token": "boolean"
356
+ },
357
+ "presentation": "string",
358
+ "target_chain": "string",
359
+ "target_token": "string",
360
+ "wallet_integration": "string"
361
+ },
362
+ "source": [
363
+ "header_button",
364
+ "undefined"
365
+ ],
366
+ "step": [
367
+ "string",
368
+ "undefined"
369
+ ],
370
+ "timestamp": "string",
371
+ "type": [
372
+ "deposit_modal_close",
373
+ "deposit_modal_friction",
374
+ "deposit_modal_handoff",
375
+ "deposit_modal_method_selected",
376
+ "deposit_modal_open",
377
+ "deposit_modal_step_complete",
378
+ "deposit_modal_step_open"
379
+ ],
380
+ "widget_version": "string"
381
+ }
382
+ },
383
+ {
384
+ "dir": "page->host",
385
+ "kind": "event",
386
+ "type": "dismissRequested",
387
+ "shape": {
388
+ "source": "close-button"
389
+ }
390
+ },
391
+ {
392
+ "dir": "page->host",
393
+ "kind": "event",
394
+ "type": "error",
395
+ "passthrough": true,
396
+ "shape": {
397
+ "code": "string",
398
+ "message": "string"
399
+ }
400
+ },
401
+ {
402
+ "dir": "page->host",
403
+ "kind": "event",
404
+ "type": "lifecycle",
405
+ "passthrough": true,
406
+ "shape": {
407
+ "address": [
408
+ "string",
409
+ "undefined"
410
+ ],
411
+ "amount": [
412
+ "string",
413
+ "undefined"
414
+ ],
415
+ "amountUsd": [
416
+ "string",
417
+ "undefined"
418
+ ],
419
+ "evm": [
420
+ "string",
421
+ "undefined"
422
+ ],
423
+ "smartAccount": [
424
+ "string",
425
+ "undefined"
426
+ ],
427
+ "solana": [
428
+ "string",
429
+ "undefined"
430
+ ],
431
+ "sourceChain": [
432
+ "number",
433
+ "undefined"
434
+ ],
435
+ "sourceDecimals": [
436
+ "number",
437
+ "undefined"
438
+ ],
439
+ "totalUsd": [
440
+ "number",
441
+ "undefined"
442
+ ],
443
+ "txHash": [
444
+ "string",
445
+ "undefined"
446
+ ],
447
+ "type": [
448
+ "balance-changed",
449
+ "connected",
450
+ "smart-account-changed",
451
+ "submitted"
452
+ ]
453
+ }
454
+ },
455
+ {
456
+ "dir": "page->host",
457
+ "kind": "event",
458
+ "type": "ready"
459
+ },
460
+ {
461
+ "dir": "page->host",
462
+ "kind": "event",
463
+ "type": "ui.state",
464
+ "shape": {
465
+ "dismissal": {
466
+ "message": [
467
+ "string",
468
+ "undefined"
469
+ ],
470
+ "reason": [
471
+ "settlement-in-progress",
472
+ "submission-in-flight",
473
+ "undefined"
474
+ ],
475
+ "state": [
476
+ "allowed",
477
+ "blocked"
478
+ ]
479
+ },
480
+ "screen": [
481
+ "amount",
482
+ "confirm",
483
+ "connect",
484
+ "processing",
485
+ "select-asset",
486
+ "unknown"
487
+ ]
488
+ }
489
+ },
490
+ {
491
+ "dir": "page->host",
492
+ "kind": "request",
493
+ "method": "bridge.probeFrameScope",
494
+ "shape": {}
495
+ },
496
+ {
497
+ "dir": "page->host",
498
+ "kind": "request",
499
+ "method": "hello",
500
+ "shape": {
501
+ "modalVersion": "string",
502
+ "protocol": "number"
503
+ }
504
+ },
505
+ {
506
+ "dir": "page->host",
507
+ "kind": "request",
508
+ "method": "host.openUrl",
509
+ "shape": {
510
+ "url": "string"
511
+ }
512
+ },
513
+ {
514
+ "dir": "page->host",
515
+ "kind": "request",
516
+ "method": "host.sendTransaction",
517
+ "shape": {
518
+ "amount": "string",
519
+ "chainId": "number",
520
+ "from": "string",
521
+ "to": "string",
522
+ "token": "string"
523
+ }
524
+ },
525
+ {
526
+ "dir": "page->host",
527
+ "kind": "request",
528
+ "method": "host.signRecovery",
529
+ "shape": {
530
+ "chainId": "number",
531
+ "depositId": "string",
532
+ "destination": "string",
533
+ "signer": "string"
534
+ }
535
+ },
536
+ {
537
+ "dir": "page->host",
538
+ "kind": "request",
539
+ "method": "wallet.request",
540
+ "walletMethod": "eth_accounts",
541
+ "shape": {
542
+ "chainId": "string",
543
+ "request": {
544
+ "method": "eth_accounts",
545
+ "params": "[]"
546
+ }
547
+ }
548
+ },
549
+ {
550
+ "dir": "page->host",
551
+ "kind": "request",
552
+ "method": "wallet.request",
553
+ "walletMethod": "eth_chainId",
554
+ "shape": {
555
+ "chainId": "string",
556
+ "request": {
557
+ "method": "eth_chainId",
558
+ "params": [
559
+ "[]",
560
+ "undefined"
561
+ ]
562
+ }
563
+ }
564
+ },
565
+ {
566
+ "dir": "page->host",
567
+ "kind": "request",
568
+ "method": "wallet.request",
569
+ "walletMethod": "eth_sendTransaction",
570
+ "shape": {
571
+ "chainId": "string",
572
+ "request": {
573
+ "method": "eth_sendTransaction",
574
+ "params": {
575
+ "0": {
576
+ "data": [
577
+ "string",
578
+ "undefined"
579
+ ],
580
+ "from": "string",
581
+ "to": "string",
582
+ "value": [
583
+ "string",
584
+ "undefined"
585
+ ]
586
+ }
587
+ }
588
+ }
589
+ }
590
+ },
591
+ {
592
+ "dir": "page->host",
593
+ "kind": "request",
594
+ "method": "wallet.request",
595
+ "walletMethod": "eth_signTypedData_v4",
596
+ "shape": {
597
+ "chainId": "string",
598
+ "request": {
599
+ "method": "eth_signTypedData_v4",
600
+ "params": {
601
+ "0": "string",
602
+ "1": "string"
603
+ }
604
+ }
605
+ }
606
+ },
607
+ {
608
+ "dir": "page->host",
609
+ "kind": "request",
610
+ "method": "wallet.request",
611
+ "walletMethod": "wallet_sendTransaction",
612
+ "shape": {
613
+ "chainId": "string",
614
+ "request": {
615
+ "method": "wallet_sendTransaction",
616
+ "params": {
617
+ "0": {
618
+ "from": "string",
619
+ "to": "string",
620
+ "value": "string"
621
+ }
622
+ }
623
+ }
624
+ }
625
+ },
626
+ {
627
+ "dir": "page->host",
628
+ "kind": "request",
629
+ "method": "wallet.request",
630
+ "walletMethod": "wallet_switchEthereumChain",
631
+ "shape": {
632
+ "chainId": "string",
633
+ "request": {
634
+ "method": "wallet_switchEthereumChain",
635
+ "params": {
636
+ "0": {
637
+ "chainId": "string"
638
+ }
639
+ }
640
+ }
641
+ }
642
+ },
643
+ {
644
+ "dir": "page->host",
645
+ "kind": "response",
646
+ "answers": "ui.back",
647
+ "ok": true,
648
+ "shape": {
649
+ "handled": "boolean"
650
+ }
651
+ }
652
+ ]
653
+ }