@seams/wallet 0.30.0 → 0.31.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.
- package/README.md +6 -6
- package/THIRD_PARTY_NOTICES.md +1 -127
- package/dist/.build-inputs.sha256 +1 -1
- package/dist/esm/sdk/{host-Csu5L7VF.js → host-DltV2Oan.js} +1 -1
- package/dist/esm/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/esm/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/{public/sdk/runtime-auth-BMT_gIKI.js → esm/sdk/runtime-auth-CP6P681o.js} +1 -1
- package/dist/{public/sdk/runtime-device-link-DQe0aqRi.js → esm/sdk/runtime-device-link-CGDZQK-D.js} +1 -1
- package/dist/esm/sdk/{runtime-ecdsa-tempo-DKkeMMpm.js → runtime-ecdsa-tempo-BiJYKWK4.js} +1 -1
- package/dist/esm/sdk/{runtime-email-otp-CzTe7r9I.js → runtime-email-otp-B0XCNDRb.js} +1 -1
- package/dist/esm/sdk/{runtime-export-BiyLbdCe.js → runtime-export-CXxv6KIx.js} +1 -1
- package/dist/esm/sdk/{runtime-near-Kk0n1FSf.js → runtime-near-CuyS57wu.js} +1 -1
- package/dist/esm/sdk/{runtime-preferences-B-A3hddU.js → runtime-preferences-B2WBUZO7.js} +1 -1
- package/dist/esm/sdk/{runtime-recovery-C9p1TU1w.js → runtime-recovery-KwVdSe94.js} +1 -1
- package/dist/esm/sdk/{runtimeContext-ChuvOC0h.js → runtimeContext-Iy1vecX0.js} +1 -1
- package/dist/esm/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/esm/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/esm/wasm/near_signer/pkg/wasm_signer_worker_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ecdsa_client/pkg/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.d.ts +212 -233
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client.js +675 -694
- package/dist/esm/wasm/router_ab_ed25519_yao_client/pkg/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/headers.manifest.json +1 -1
- package/dist/public/sdk/{host-Csu5L7VF.js → host-DltV2Oan.js} +1 -1
- package/dist/public/sdk/registration-Coh0_Nva.js +1 -0
- package/dist/public/sdk/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/{esm/sdk/runtime-auth-BMT_gIKI.js → public/sdk/runtime-auth-CP6P681o.js} +1 -1
- package/dist/{esm/sdk/runtime-device-link-DQe0aqRi.js → public/sdk/runtime-device-link-CGDZQK-D.js} +1 -1
- package/dist/public/sdk/{runtime-ecdsa-tempo-DKkeMMpm.js → runtime-ecdsa-tempo-BiJYKWK4.js} +1 -1
- package/dist/public/sdk/{runtime-email-otp-CzTe7r9I.js → runtime-email-otp-B0XCNDRb.js} +1 -1
- package/dist/public/sdk/{runtime-export-BiyLbdCe.js → runtime-export-CXxv6KIx.js} +1 -1
- package/dist/public/sdk/{runtime-near-Kk0n1FSf.js → runtime-near-CuyS57wu.js} +1 -1
- package/dist/public/sdk/{runtime-preferences-B-A3hddU.js → runtime-preferences-B2WBUZO7.js} +1 -1
- package/dist/public/sdk/{runtime-recovery-C9p1TU1w.js → runtime-recovery-KwVdSe94.js} +1 -1
- package/dist/public/sdk/{runtimeContext-ChuvOC0h.js → runtimeContext-Iy1vecX0.js} +1 -1
- package/dist/public/sdk/wallet-iframe-host-ecdsa.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-full.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-near.js +1 -1
- package/dist/public/sdk/wallet-iframe-host-runtime.js +1 -1
- package/dist/public/sdk/workers/device-linking-key.worker.js +454 -947
- package/dist/public/sdk/workers/email-otp.worker.js +588 -820
- package/dist/public/sdk/workers/evm_crypto_bg.wasm +0 -0
- package/dist/public/sdk/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/public/sdk/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/public/sdk/workers/tempo_signer_bg.wasm +0 -0
- package/dist/public/sdk/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/public/sdk/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/public/sdk/workers/wasm_signer_worker_bg.wasm +0 -0
- package/dist/public/wallet-assets.manifest.json +26 -26
- package/dist/public/wallet-service/index.html +4 -4
- package/dist/workers/device-linking-key.worker.js +454 -947
- package/dist/workers/email-otp.worker.js +588 -820
- package/dist/workers/evm_crypto_bg.wasm +0 -0
- package/dist/workers/passkey-mpc-export.worker.js +572 -804
- package/dist/workers/router_ab_ecdsa_client_bg.wasm +0 -0
- package/dist/workers/router_ab_ed25519_yao_client_bg.wasm +0 -0
- package/dist/workers/tempo_signer_bg.wasm +0 -0
- package/dist/workers/wallet-custody-ceremony.worker.js +524 -971
- package/dist/workers/wallet_custody_ceremony_bg.wasm +0 -0
- package/dist/workers/wasm_signer_worker_bg.wasm +0 -0
- package/package.json +17 -17
- package/dist/esm/sdk/registration-C7w_51wE.js +0 -1
- package/dist/public/sdk/registration-C7w_51wE.js +0 -1
package/README.md
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
# Seams Wallet SDK
|
|
2
2
|
|
|
3
|
-
`@seams/wallet` **0.
|
|
3
|
+
`@seams/wallet` **0.31.0** provides browser wallet lifecycle, NEAR and EVM-family
|
|
4
4
|
threshold signing, React components, and hosted wallet runtime assets.
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
8
|
```sh
|
|
9
|
-
pnpm add @seams/wallet@0.
|
|
9
|
+
pnpm add @seams/wallet@0.31.0
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
React integrations
|
|
12
|
+
React integrations require `react@19.1.1` and `react-dom@19.1.1`. Import the provider and UI from
|
|
13
13
|
`@seams/wallet/react` and its stylesheet from `@seams/wallet/react/styles`.
|
|
14
14
|
Keep the application package, wallet-origin assets, and
|
|
15
|
-
`@seams/wallet-server@0.
|
|
15
|
+
`@seams/wallet-server@0.31.0` on the matching release. The wallet iframe protocol
|
|
16
16
|
is `20.0.0`. The application and wallet host must use the same protocol version.
|
|
17
17
|
|
|
18
18
|
## Current API
|
|
@@ -48,7 +48,7 @@ the challenge and its expiry. The application receives the typed challenge handl
|
|
|
48
48
|
|
|
49
49
|
## Application sessions and fresh owner approval
|
|
50
50
|
|
|
51
|
-
SDK 0.
|
|
51
|
+
SDK 0.31.0 accepts a handoff from an explicitly trusted application backend.
|
|
52
52
|
Google and app-passkey login can use the same stable application user ID.
|
|
53
53
|
Use `registration.registerOwnerWallet` for NEAR-only passkey onboarding and `near.prepareOwnerTransaction` for fresh approval of each transaction.
|
|
54
54
|
These operations create no reusable signing authority.
|
|
@@ -57,7 +57,7 @@ See the [application-session guide](https://wallet.seams.sh/docs/guides/applicat
|
|
|
57
57
|
|
|
58
58
|
## Bring your own Google authentication
|
|
59
59
|
|
|
60
|
-
SDK 0.
|
|
60
|
+
SDK 0.31.0 can reuse an application's Google ID token to open associated wallet settings.
|
|
61
61
|
Configure the environment's Google client ID and let the owner associate their wallet once.
|
|
62
62
|
Then pass the token after the application's existing Google login:
|
|
63
63
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -5,7 +5,7 @@ distributed Seams Wallet SDK, server runtime, Wasm, strict Workers, and CLI.
|
|
|
5
5
|
Dependency license expressions come from their package metadata. Packaged
|
|
6
6
|
license and notice wording is reproduced below with normalized whitespace.
|
|
7
7
|
|
|
8
|
-
Inventory:
|
|
8
|
+
Inventory: 447 dependency records (60 npm, 387 Cargo).
|
|
9
9
|
|
|
10
10
|
## Dependency inventory
|
|
11
11
|
|
|
@@ -24,20 +24,13 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
24
24
|
| cargo | base16ct | 1.0.0 | Apache-2.0 OR MIT | RustCrypto Developers |
|
|
25
25
|
| cargo | base64 | 0.22.1 | MIT OR Apache-2.0 | Marshall Pierce <marshall@mpierce.org> |
|
|
26
26
|
| cargo | base64 | 0.23.1 | MIT OR Apache-2.0 | Marshall Pierce <marshall@mpierce.org> |
|
|
27
|
-
| cargo | base64ct | 1.8.0 | Apache-2.0 OR MIT | RustCrypto Developers |
|
|
28
27
|
| cargo | base64ct | 1.8.3 | Apache-2.0 OR MIT | RustCrypto Developers |
|
|
29
28
|
| cargo | bitflags | 2.13.1 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
30
29
|
| cargo | bitflags | 2.13.2 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
31
30
|
| cargo | block-buffer | 0.10.4 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
32
31
|
| cargo | block-buffer | 0.12.1 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
33
|
-
| cargo | borsh-derive | 1.5.7 | Apache-2.0 | Near Inc <hello@nearprotocol.com> |
|
|
34
32
|
| cargo | borsh-derive | 1.6.1 | Apache-2.0 | Near Inc <hello@nearprotocol.com> |
|
|
35
|
-
| cargo | borsh-derive | 1.8.0 | Apache-2.0 | Near Inc <hello@nearprotocol.com> |
|
|
36
|
-
| cargo | borsh-derive | 1.8.1 | Apache-2.0 | Near Inc <hello@nearprotocol.com> |
|
|
37
|
-
| cargo | borsh | 1.5.7 | MIT OR Apache-2.0 | Near Inc <hello@near.org> |
|
|
38
33
|
| cargo | borsh | 1.6.1 | MIT OR Apache-2.0 | Near Inc <hello@near.org> |
|
|
39
|
-
| cargo | borsh | 1.8.0 | MIT OR Apache-2.0 | Near Inc <hello@near.org> |
|
|
40
|
-
| cargo | borsh | 1.8.1 | MIT OR Apache-2.0 | Near Inc <hello@near.org> |
|
|
41
34
|
| cargo | bs58 | 0.5.1 | MIT/Apache-2.0 | |
|
|
42
35
|
| cargo | bumpalo | 3.18.1 | MIT OR Apache-2.0 | Nick Fitzgerald <fitzgen@gmail.com> |
|
|
43
36
|
| cargo | bumpalo | 3.19.1 | MIT OR Apache-2.0 | Nick Fitzgerald <fitzgen@gmail.com> |
|
|
@@ -137,7 +130,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
137
130
|
| cargo | futures-util | 0.3.32 | MIT OR Apache-2.0 | |
|
|
138
131
|
| cargo | futures-util | 0.3.33 | MIT OR Apache-2.0 | |
|
|
139
132
|
| cargo | futures | 0.3.32 | MIT OR Apache-2.0 | |
|
|
140
|
-
| cargo | futures | 0.3.33 | MIT OR Apache-2.0 | |
|
|
141
133
|
| cargo | generic-array | 0.14.7 | MIT | Aaron Trent <novacrazy@gmail.com>; Bartłomiej Kamiński <fizyk20@gmail.com> |
|
|
142
134
|
| cargo | generic-array | 0.14.9 | MIT | Aaron Trent <novacrazy@gmail.com>; Bartłomiej Kamiński <fizyk20@gmail.com> |
|
|
143
135
|
| cargo | getrandom | 0.2.17 | MIT OR Apache-2.0 | The Rand Project Developers |
|
|
@@ -176,7 +168,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
176
168
|
| cargo | jni-sys | 0.4.1 | MIT OR Apache-2.0 | Robert Bragg <robert@sixbynine.org>; Steven Fackler <sfackler@gmail.com> |
|
|
177
169
|
| cargo | jni | 0.22.4 | MIT OR Apache-2.0 | jni team |
|
|
178
170
|
| cargo | js-sys | 0.3.100 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
179
|
-
| cargo | js-sys | 0.3.103 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
180
171
|
| cargo | js-sys | 0.3.105 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
181
172
|
| cargo | js-sys | 0.3.77 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
182
173
|
| cargo | js-sys | 0.3.85 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
@@ -208,7 +199,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
208
199
|
| cargo | nix | 0.31.3 | MIT | |
|
|
209
200
|
| cargo | nu-ansi-term | 0.50.3 | MIT | Josh Triplett <josh@joshtriplett.org>; Ryan Scheel (Havvy) <ryan.havvy@gmail.com>; The Nushell Project Developers; ogham@bsago.me |
|
|
210
201
|
| cargo | num-bigint | 0.4.6 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
211
|
-
| cargo | num-bigint | 0.4.8 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
212
202
|
| cargo | num-integer | 0.1.46 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
213
203
|
| cargo | num-traits | 0.2.19 | MIT OR Apache-2.0 | The Rust Project Developers |
|
|
214
204
|
| cargo | once_cell | 1.21.3 | MIT OR Apache-2.0 | Aleksey Kladov <aleksey.kladov@gmail.com> |
|
|
@@ -259,7 +249,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
259
249
|
| cargo | rustversion | 1.0.21 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com> |
|
|
260
250
|
| cargo | rustversion | 1.0.22 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com> |
|
|
261
251
|
| cargo | rustversion | 1.0.23 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com> |
|
|
262
|
-
| cargo | ryu | 1.0.23 | Apache-2.0 OR BSL-1.0 | David Tolnay <dtolnay@gmail.com> |
|
|
263
252
|
| cargo | same-file | 1.0.6 | Unlicense/MIT | Andrew Gallant <jamslam@gmail.com> |
|
|
264
253
|
| cargo | schannel | 0.1.29 | MIT | Steffen Butzer <steffen.butzer@outlook.com>; Steven Fackler <sfackler@gmail.com> |
|
|
265
254
|
| cargo | scopeguard | 1.2.0 | MIT OR Apache-2.0 | bluss |
|
|
@@ -269,21 +258,15 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
269
258
|
| cargo | security-framework | 3.7.0 | MIT OR Apache-2.0 | Kornel <kornel@geekhood.net>; Steven Fackler <sfackler@gmail.com> |
|
|
270
259
|
| cargo | semver | 1.0.26 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com> |
|
|
271
260
|
| cargo | semver | 1.0.28 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com> |
|
|
272
|
-
| cargo | serde_core | 1.0.228 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
273
261
|
| cargo | serde_core | 1.0.229 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
274
|
-
| cargo | serde_derive | 1.0.228 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
275
262
|
| cargo | serde_derive | 1.0.229 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
276
|
-
| cargo | serde_json | 1.0.143 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
277
|
-
| cargo | serde_json | 1.0.150 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
278
263
|
| cargo | serde_json | 1.0.151 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
279
264
|
| cargo | serde-wasm-bindgen | 0.6.5 | MIT | Ingvar Stepanyan <me@rreverser.com> |
|
|
280
|
-
| cargo | serde | 1.0.228 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
281
265
|
| cargo | serde | 1.0.229 | MIT OR Apache-2.0 | David Tolnay <dtolnay@gmail.com>; Erick Tryzelaar <erick.tryzelaar@gmail.com> |
|
|
282
266
|
| cargo | serdect | 0.2.0 | Apache-2.0 OR MIT | RustCrypto Developers |
|
|
283
267
|
| cargo | sha1 | 0.10.7 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
284
268
|
| cargo | sha2 | 0.10.9 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
285
269
|
| cargo | sha2 | 0.11.0 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
286
|
-
| cargo | sha3 | 0.10.8 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
287
270
|
| cargo | sha3 | 0.10.9 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
288
271
|
| cargo | sha3 | 0.12.0 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
289
272
|
| cargo | shake | 0.1.0 | MIT OR Apache-2.0 | RustCrypto Developers |
|
|
@@ -359,21 +342,18 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
359
342
|
| cargo | wasm-bindgen-macro-support | 0.2.113 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
360
343
|
| cargo | wasm-bindgen-macro-support | 0.2.118 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
361
344
|
| cargo | wasm-bindgen-macro-support | 0.2.123 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
362
|
-
| cargo | wasm-bindgen-macro-support | 0.2.126 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
363
345
|
| cargo | wasm-bindgen-macro-support | 0.2.128 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
364
346
|
| cargo | wasm-bindgen-macro | 0.2.100 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
365
347
|
| cargo | wasm-bindgen-macro | 0.2.108 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
366
348
|
| cargo | wasm-bindgen-macro | 0.2.113 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
367
349
|
| cargo | wasm-bindgen-macro | 0.2.118 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
368
350
|
| cargo | wasm-bindgen-macro | 0.2.123 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
369
|
-
| cargo | wasm-bindgen-macro | 0.2.126 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
370
351
|
| cargo | wasm-bindgen-macro | 0.2.128 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
371
352
|
| cargo | wasm-bindgen-shared | 0.2.100 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
372
353
|
| cargo | wasm-bindgen-shared | 0.2.108 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
373
354
|
| cargo | wasm-bindgen-shared | 0.2.113 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
374
355
|
| cargo | wasm-bindgen-shared | 0.2.118 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
375
356
|
| cargo | wasm-bindgen-shared | 0.2.123 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
376
|
-
| cargo | wasm-bindgen-shared | 0.2.126 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
377
357
|
| cargo | wasm-bindgen-shared | 0.2.128 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
378
358
|
| cargo | wasm-bindgen-test-macro | 0.3.73 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
379
359
|
| cargo | wasm-bindgen-test-shared | 0.2.123 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
@@ -383,7 +363,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
383
363
|
| cargo | wasm-bindgen | 0.2.113 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
384
364
|
| cargo | wasm-bindgen | 0.2.118 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
385
365
|
| cargo | wasm-bindgen | 0.2.123 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
386
|
-
| cargo | wasm-bindgen | 0.2.126 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
387
366
|
| cargo | wasm-bindgen | 0.2.128 | MIT OR Apache-2.0 | The wasm-bindgen Developers |
|
|
388
367
|
| cargo | webpki-root-certs | 1.0.9 | CDLA-Permissive-2.0 | |
|
|
389
368
|
| cargo | webpki-roots | 1.0.9 | CDLA-Permissive-2.0 | |
|
|
@@ -413,7 +392,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
413
392
|
| cargo | zerocopy | 0.8.53 | BSD-2-Clause OR Apache-2.0 OR MIT | Jack Wrenn <jswrenn@amazon.com>; Joshua Liebow-Feeser <joshlf@google.com> |
|
|
414
393
|
| cargo | zerocopy | 0.8.54 | BSD-2-Clause OR Apache-2.0 OR MIT | Jack Wrenn <jswrenn@amazon.com>; Joshua Liebow-Feeser <joshlf@google.com> |
|
|
415
394
|
| cargo | zerocopy | 0.8.56 | BSD-2-Clause OR Apache-2.0 OR MIT | |
|
|
416
|
-
| cargo | zeroize_derive | 1.4.3 | Apache-2.0 OR MIT | The RustCrypto Project Developers |
|
|
417
395
|
| cargo | zeroize_derive | 1.5.0 | Apache-2.0 OR MIT | The RustCrypto Project Developers |
|
|
418
396
|
| cargo | zeroize | 1.8.2 | Apache-2.0 OR MIT | The RustCrypto Project Developers |
|
|
419
397
|
| cargo | zeroize | 1.9.0 | Apache-2.0 OR MIT | The RustCrypto Project Developers |
|
|
@@ -486,8 +464,6 @@ Inventory: 469 dependency records (60 npm, 409 Cargo).
|
|
|
486
464
|
These packages declare the following SPDX license expression in package metadata
|
|
487
465
|
but do not include a top-level license or notice file in the distributed package:
|
|
488
466
|
|
|
489
|
-
- cargo:borsh-derive@1.5.7 — Apache-2.0
|
|
490
|
-
- cargo:borsh@1.5.7 — MIT OR Apache-2.0
|
|
491
467
|
- cargo:frost-core@2.2.0 — MIT OR Apache-2.0
|
|
492
468
|
- cargo:frost-ed25519@2.2.0 — MIT OR Apache-2.0
|
|
493
469
|
- cargo:frost-rerandomized@2.2.0 — MIT OR Apache-2.0
|
|
@@ -2839,11 +2815,7 @@ Applies to:
|
|
|
2839
2815
|
|
|
2840
2816
|
- cargo:async-trait@0.1.89
|
|
2841
2817
|
- cargo:borsh-derive@1.6.1
|
|
2842
|
-
- cargo:borsh-derive@1.8.0
|
|
2843
|
-
- cargo:borsh-derive@1.8.1
|
|
2844
2818
|
- cargo:borsh@1.6.1
|
|
2845
|
-
- cargo:borsh@1.8.0
|
|
2846
|
-
- cargo:borsh@1.8.1
|
|
2847
2819
|
- cargo:curve25519-dalek-derive@0.1.1
|
|
2848
2820
|
- cargo:displaydoc@0.2.7
|
|
2849
2821
|
- cargo:group@0.13.0
|
|
@@ -2867,14 +2839,9 @@ Applies to:
|
|
|
2867
2839
|
- cargo:rustversion@1.0.23
|
|
2868
2840
|
- cargo:semver@1.0.26
|
|
2869
2841
|
- cargo:semver@1.0.28
|
|
2870
|
-
- cargo:serde@1.0.228
|
|
2871
2842
|
- cargo:serde@1.0.229
|
|
2872
|
-
- cargo:serde_core@1.0.228
|
|
2873
2843
|
- cargo:serde_core@1.0.229
|
|
2874
|
-
- cargo:serde_derive@1.0.228
|
|
2875
2844
|
- cargo:serde_derive@1.0.229
|
|
2876
|
-
- cargo:serde_json@1.0.143
|
|
2877
|
-
- cargo:serde_json@1.0.150
|
|
2878
2845
|
- cargo:serde_json@1.0.151
|
|
2879
2846
|
- cargo:simd_cesu8@1.2.0
|
|
2880
2847
|
- cargo:syn@2.0.103
|
|
@@ -3087,7 +3054,6 @@ Applies to:
|
|
|
3087
3054
|
- cargo:futures-util@0.3.32
|
|
3088
3055
|
- cargo:futures-util@0.3.33
|
|
3089
3056
|
- cargo:futures@0.3.32
|
|
3090
|
-
- cargo:futures@0.3.33
|
|
3091
3057
|
|
|
3092
3058
|
Apache License
|
|
3093
3059
|
Version 2.0, January 2004
|
|
@@ -3451,7 +3417,6 @@ Packaged as: LICENSE-MIT
|
|
|
3451
3417
|
|
|
3452
3418
|
Applies to:
|
|
3453
3419
|
|
|
3454
|
-
- cargo:base64ct@1.8.0
|
|
3455
3420
|
- cargo:base64ct@1.8.3
|
|
3456
3421
|
|
|
3457
3422
|
Copyright (c) 2014 Steve "Sc00bz" Thomas (steve at tobtu dot com)
|
|
@@ -3886,7 +3851,6 @@ Applies to:
|
|
|
3886
3851
|
- cargo:find-msvc-tools@0.1.12
|
|
3887
3852
|
- cargo:find-msvc-tools@0.1.9
|
|
3888
3853
|
- cargo:js-sys@0.3.100
|
|
3889
|
-
- cargo:js-sys@0.3.103
|
|
3890
3854
|
- cargo:js-sys@0.3.105
|
|
3891
3855
|
- cargo:js-sys@0.3.77
|
|
3892
3856
|
- cargo:js-sys@0.3.85
|
|
@@ -3901,21 +3865,18 @@ Applies to:
|
|
|
3901
3865
|
- cargo:wasm-bindgen-macro-support@0.2.113
|
|
3902
3866
|
- cargo:wasm-bindgen-macro-support@0.2.118
|
|
3903
3867
|
- cargo:wasm-bindgen-macro-support@0.2.123
|
|
3904
|
-
- cargo:wasm-bindgen-macro-support@0.2.126
|
|
3905
3868
|
- cargo:wasm-bindgen-macro-support@0.2.128
|
|
3906
3869
|
- cargo:wasm-bindgen-macro@0.2.100
|
|
3907
3870
|
- cargo:wasm-bindgen-macro@0.2.108
|
|
3908
3871
|
- cargo:wasm-bindgen-macro@0.2.113
|
|
3909
3872
|
- cargo:wasm-bindgen-macro@0.2.118
|
|
3910
3873
|
- cargo:wasm-bindgen-macro@0.2.123
|
|
3911
|
-
- cargo:wasm-bindgen-macro@0.2.126
|
|
3912
3874
|
- cargo:wasm-bindgen-macro@0.2.128
|
|
3913
3875
|
- cargo:wasm-bindgen-shared@0.2.100
|
|
3914
3876
|
- cargo:wasm-bindgen-shared@0.2.108
|
|
3915
3877
|
- cargo:wasm-bindgen-shared@0.2.113
|
|
3916
3878
|
- cargo:wasm-bindgen-shared@0.2.118
|
|
3917
3879
|
- cargo:wasm-bindgen-shared@0.2.123
|
|
3918
|
-
- cargo:wasm-bindgen-shared@0.2.126
|
|
3919
3880
|
- cargo:wasm-bindgen-shared@0.2.128
|
|
3920
3881
|
- cargo:wasm-bindgen-test-macro@0.3.73
|
|
3921
3882
|
- cargo:wasm-bindgen-test-shared@0.2.123
|
|
@@ -3925,7 +3886,6 @@ Applies to:
|
|
|
3925
3886
|
- cargo:wasm-bindgen@0.2.113
|
|
3926
3887
|
- cargo:wasm-bindgen@0.2.118
|
|
3927
3888
|
- cargo:wasm-bindgen@0.2.123
|
|
3928
|
-
- cargo:wasm-bindgen@0.2.126
|
|
3929
3889
|
- cargo:wasm-bindgen@0.2.128
|
|
3930
3890
|
|
|
3931
3891
|
Copyright (c) 2014 Alex Crichton
|
|
@@ -6069,17 +6029,11 @@ Applies to:
|
|
|
6069
6029
|
- cargo:rustversion@1.0.21
|
|
6070
6030
|
- cargo:rustversion@1.0.22
|
|
6071
6031
|
- cargo:rustversion@1.0.23
|
|
6072
|
-
- cargo:ryu@1.0.23
|
|
6073
6032
|
- cargo:semver@1.0.26
|
|
6074
6033
|
- cargo:semver@1.0.28
|
|
6075
|
-
- cargo:serde@1.0.228
|
|
6076
6034
|
- cargo:serde@1.0.229
|
|
6077
|
-
- cargo:serde_core@1.0.228
|
|
6078
6035
|
- cargo:serde_core@1.0.229
|
|
6079
|
-
- cargo:serde_derive@1.0.228
|
|
6080
6036
|
- cargo:serde_derive@1.0.229
|
|
6081
|
-
- cargo:serde_json@1.0.143
|
|
6082
|
-
- cargo:serde_json@1.0.150
|
|
6083
6037
|
- cargo:serde_json@1.0.151
|
|
6084
6038
|
- cargo:syn@2.0.103
|
|
6085
6039
|
- cargo:syn@2.0.114
|
|
@@ -6398,7 +6352,6 @@ Applies to:
|
|
|
6398
6352
|
- cargo:log@0.4.33
|
|
6399
6353
|
- cargo:log@0.4.34
|
|
6400
6354
|
- cargo:num-bigint@0.4.6
|
|
6401
|
-
- cargo:num-bigint@0.4.8
|
|
6402
6355
|
- cargo:num-integer@0.1.46
|
|
6403
6356
|
- cargo:num-traits@0.2.19
|
|
6404
6357
|
|
|
@@ -6490,7 +6443,6 @@ Applies to:
|
|
|
6490
6443
|
- cargo:futures-util@0.3.32
|
|
6491
6444
|
- cargo:futures-util@0.3.33
|
|
6492
6445
|
- cargo:futures@0.3.32
|
|
6493
|
-
- cargo:futures@0.3.33
|
|
6494
6446
|
|
|
6495
6447
|
Copyright (c) 2016 Alex Crichton
|
|
6496
6448
|
Copyright (c) 2017 The Tokio Authors
|
|
@@ -7495,11 +7447,7 @@ Packaged as: LICENSE-APACHE
|
|
|
7495
7447
|
Applies to:
|
|
7496
7448
|
|
|
7497
7449
|
- cargo:borsh-derive@1.6.1
|
|
7498
|
-
- cargo:borsh-derive@1.8.0
|
|
7499
|
-
- cargo:borsh-derive@1.8.1
|
|
7500
7450
|
- cargo:borsh@1.6.1
|
|
7501
|
-
- cargo:borsh@1.8.0
|
|
7502
|
-
- cargo:borsh@1.8.1
|
|
7503
7451
|
- npm:borsh@1.0.0
|
|
7504
7452
|
|
|
7505
7453
|
Apache License
|
|
@@ -8886,37 +8834,6 @@ Applies to:
|
|
|
8886
8834
|
DEALINGS IN THE SOFTWARE.
|
|
8887
8835
|
|
|
8888
8836
|
|
|
8889
|
-
### 90a8b6622d5e3faa
|
|
8890
|
-
|
|
8891
|
-
Packaged as: LICENSE-MIT
|
|
8892
|
-
|
|
8893
|
-
Applies to:
|
|
8894
|
-
|
|
8895
|
-
- cargo:zeroize_derive@1.4.3
|
|
8896
|
-
|
|
8897
|
-
MIT License
|
|
8898
|
-
|
|
8899
|
-
Copyright (c) 2019-2023 The RustCrypto Project Developers
|
|
8900
|
-
|
|
8901
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
8902
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
8903
|
-
in the Software without restriction, including without limitation the rights
|
|
8904
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8905
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
8906
|
-
furnished to do so, subject to the following conditions:
|
|
8907
|
-
|
|
8908
|
-
The above copyright notice and this permission notice shall be included in all
|
|
8909
|
-
copies or substantial portions of the Software.
|
|
8910
|
-
|
|
8911
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
8912
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
8913
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
8914
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
8915
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
8916
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
8917
|
-
SOFTWARE.
|
|
8918
|
-
|
|
8919
|
-
|
|
8920
8837
|
### 90c503b61dee04e1
|
|
8921
8838
|
|
|
8922
8839
|
Packaged as: LICENSE-MIT
|
|
@@ -9525,7 +9442,6 @@ Applies to:
|
|
|
9525
9442
|
- cargo:indexmap@2.9.0
|
|
9526
9443
|
- cargo:itertools@0.14.0
|
|
9527
9444
|
- cargo:js-sys@0.3.100
|
|
9528
|
-
- cargo:js-sys@0.3.103
|
|
9529
9445
|
- cargo:js-sys@0.3.105
|
|
9530
9446
|
- cargo:js-sys@0.3.77
|
|
9531
9447
|
- cargo:js-sys@0.3.85
|
|
@@ -9536,7 +9452,6 @@ Applies to:
|
|
|
9536
9452
|
- cargo:log@0.4.34
|
|
9537
9453
|
- cargo:minicov@0.3.8
|
|
9538
9454
|
- cargo:num-bigint@0.4.6
|
|
9539
|
-
- cargo:num-bigint@0.4.8
|
|
9540
9455
|
- cargo:num-integer@0.1.46
|
|
9541
9456
|
- cargo:num-traits@0.2.19
|
|
9542
9457
|
- cargo:once_cell@1.21.3
|
|
@@ -9566,21 +9481,18 @@ Applies to:
|
|
|
9566
9481
|
- cargo:wasm-bindgen-macro-support@0.2.113
|
|
9567
9482
|
- cargo:wasm-bindgen-macro-support@0.2.118
|
|
9568
9483
|
- cargo:wasm-bindgen-macro-support@0.2.123
|
|
9569
|
-
- cargo:wasm-bindgen-macro-support@0.2.126
|
|
9570
9484
|
- cargo:wasm-bindgen-macro-support@0.2.128
|
|
9571
9485
|
- cargo:wasm-bindgen-macro@0.2.100
|
|
9572
9486
|
- cargo:wasm-bindgen-macro@0.2.108
|
|
9573
9487
|
- cargo:wasm-bindgen-macro@0.2.113
|
|
9574
9488
|
- cargo:wasm-bindgen-macro@0.2.118
|
|
9575
9489
|
- cargo:wasm-bindgen-macro@0.2.123
|
|
9576
|
-
- cargo:wasm-bindgen-macro@0.2.126
|
|
9577
9490
|
- cargo:wasm-bindgen-macro@0.2.128
|
|
9578
9491
|
- cargo:wasm-bindgen-shared@0.2.100
|
|
9579
9492
|
- cargo:wasm-bindgen-shared@0.2.108
|
|
9580
9493
|
- cargo:wasm-bindgen-shared@0.2.113
|
|
9581
9494
|
- cargo:wasm-bindgen-shared@0.2.118
|
|
9582
9495
|
- cargo:wasm-bindgen-shared@0.2.123
|
|
9583
|
-
- cargo:wasm-bindgen-shared@0.2.126
|
|
9584
9496
|
- cargo:wasm-bindgen-shared@0.2.128
|
|
9585
9497
|
- cargo:wasm-bindgen-test-macro@0.3.73
|
|
9586
9498
|
- cargo:wasm-bindgen-test-shared@0.2.123
|
|
@@ -9590,7 +9502,6 @@ Applies to:
|
|
|
9590
9502
|
- cargo:wasm-bindgen@0.2.113
|
|
9591
9503
|
- cargo:wasm-bindgen@0.2.118
|
|
9592
9504
|
- cargo:wasm-bindgen@0.2.123
|
|
9593
|
-
- cargo:wasm-bindgen@0.2.126
|
|
9594
9505
|
- cargo:wasm-bindgen@0.2.128
|
|
9595
9506
|
- cargo:wit-bindgen@0.57.1
|
|
9596
9507
|
|
|
@@ -10356,7 +10267,6 @@ Applies to:
|
|
|
10356
10267
|
- cargo:aes@0.8.4
|
|
10357
10268
|
- cargo:base16ct@0.2.0
|
|
10358
10269
|
- cargo:base16ct@1.0.0
|
|
10359
|
-
- cargo:base64ct@1.8.0
|
|
10360
10270
|
- cargo:base64ct@1.8.3
|
|
10361
10271
|
- cargo:block-buffer@0.10.4
|
|
10362
10272
|
- cargo:block-buffer@0.12.1
|
|
@@ -10418,7 +10328,6 @@ Applies to:
|
|
|
10418
10328
|
- cargo:sha1@0.10.7
|
|
10419
10329
|
- cargo:sha2@0.10.9
|
|
10420
10330
|
- cargo:sha2@0.11.0
|
|
10421
|
-
- cargo:sha3@0.10.8
|
|
10422
10331
|
- cargo:sha3@0.10.9
|
|
10423
10332
|
- cargo:sha3@0.12.0
|
|
10424
10333
|
- cargo:shake@0.1.0
|
|
@@ -12488,39 +12397,6 @@ Applies to:
|
|
|
12488
12397
|
DEALINGS IN THE SOFTWARE.
|
|
12489
12398
|
|
|
12490
12399
|
|
|
12491
|
-
### c9bff75738922193
|
|
12492
|
-
|
|
12493
|
-
Packaged as: LICENSE-BOOST
|
|
12494
|
-
|
|
12495
|
-
Applies to:
|
|
12496
|
-
|
|
12497
|
-
- cargo:ryu@1.0.23
|
|
12498
|
-
|
|
12499
|
-
Boost Software License - Version 1.0 - August 17th, 2003
|
|
12500
|
-
|
|
12501
|
-
Permission is hereby granted, free of charge, to any person or organization
|
|
12502
|
-
obtaining a copy of the software and accompanying documentation covered by
|
|
12503
|
-
this license (the "Software") to use, reproduce, display, distribute,
|
|
12504
|
-
execute, and transmit the Software, and to prepare derivative works of the
|
|
12505
|
-
Software, and to permit third-parties to whom the Software is furnished to
|
|
12506
|
-
do so, all subject to the following:
|
|
12507
|
-
|
|
12508
|
-
The copyright notices in the Software and this entire statement, including
|
|
12509
|
-
the above license grant, this restriction and the following disclaimer,
|
|
12510
|
-
must be included in all copies of the Software, in whole or in part, and
|
|
12511
|
-
all derivative works of the Software, unless such copies or derivative
|
|
12512
|
-
works are solely in the form of machine-executable object code generated by
|
|
12513
|
-
a source language processor.
|
|
12514
|
-
|
|
12515
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
12516
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
12517
|
-
FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
|
12518
|
-
SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
|
12519
|
-
FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
|
12520
|
-
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
|
12521
|
-
DEALINGS IN THE SOFTWARE.
|
|
12522
|
-
|
|
12523
|
-
|
|
12524
12400
|
### cb3c929a05e6cbc9
|
|
12525
12401
|
|
|
12526
12402
|
Packaged as: LICENSE-MIT
|
|
@@ -12639,7 +12515,6 @@ Applies to:
|
|
|
12639
12515
|
- cargo:ureq-proto@0.6.1
|
|
12640
12516
|
- cargo:zeroize@1.8.2
|
|
12641
12517
|
- cargo:zeroize@1.9.0
|
|
12642
|
-
- cargo:zeroize_derive@1.4.3
|
|
12643
12518
|
- cargo:zeroize_derive@1.5.0
|
|
12644
12519
|
- npm:flatbuffers@25.9.23
|
|
12645
12520
|
- npm:long@5.3.2
|
|
@@ -13394,7 +13269,6 @@ Packaged as: LICENSE-MIT
|
|
|
13394
13269
|
|
|
13395
13270
|
Applies to:
|
|
13396
13271
|
|
|
13397
|
-
- cargo:sha3@0.10.8
|
|
13398
13272
|
- cargo:sha3@0.10.9
|
|
13399
13273
|
|
|
13400
13274
|
Copyright (c) 2006-2009 Graydon Hoare
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3936d9b6309a2cc5845549ca8b821c30b7501bd7905c1f843f21f042548b955e
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e,h as t}from"./digests-BIaE0DMd.js";import{n}from"./walletRegistrationSetupPrewarm-CEvGKQSg.js";import{t as r}from"./walletDbName-B6-CV_Rq.js";import{n as i,r as a,t as o}from"./configuration-BAad7ngq.js";import{a as ee,i as s,n as te,o as ne,r as re,t as c}from"./transactionReview-CGIlI835.js";import{t as l}from"./events-D6l0_ugy.js";import{i as u,n as d,t as ie}from"./transactionReviewAdmission-Cf_qUZJt.js";import{A as f,D as p,S as m,T as h,d as g,f as _,h as v,k as y,m as b,o as x,t as S,u as C,x as w,y as T}from"./ownerNearOperation-DCxxHcwX.js";import{t as E}from"./walletIframeIdentity-Cz82I_Uh.js";import{t as ae}from"./errors-BJBDbwHk.js";import{s as D}from"./ed25519OperationFingerprint-Dev4P6Og.js";function O(){let e=globalThis;e.global===void 0&&(e.global=globalThis),!e.process||typeof e.process!=`object`?e.process={env:{}}:(!e.process.env||typeof e.process.env!=`object`)&&(e.process.env={})}function k(){O(),window.location.origin===`null`&&(window.parent?.postMessage({type:`SERVICE_HOST_DEBUG_ORIGIN`,origin:window.location.origin,href:window.location.href},`*`),console.warn(`[WalletHost] iframe is running with opaque (null) origin. Check COEP/CORP headers and ensure navigation succeeded.`)),A(),window.parent?.postMessage({type:`SERVICE_HOST_BOOTED`},`*`),window.parent?.postMessage({type:`SERVICE_HOST_DEBUG_ORIGIN`,origin:window.location.origin,href:window.location.href},`*`);let e=new URL(import.meta.url),t=e.searchParams.get(`v`);t&&y(t);let n=new URL(`.`,e).toString(),r=n.endsWith(`/`)?n:n+`/`;p()||f(r)}function A(){let e=()=>{let e=document;e.documentElement.classList.add(`seams-transparent`),e.body?.classList.add(`seams-transparent`),e.documentElement.classList.remove(`dark`),e.body?.classList.remove(`dark`)};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e(),window.addEventListener(`load`,()=>e(),{once:!0})}const j={};let M=null,N=null;function oe(e){return e.request.type===`PM_ACKNOWLEDGE_WALLET_RECOVERY_CODE_BACKUP`?e.request.payload?.authorization?.kind===`email_otp`?P(e.kind):(M??=import(`./runtime-recovery-codes-CFOWDVd9.js`),M):P(e.kind)}function se(){P(`auth`).catch(ce)}function ce(){}function P(e){let t=j[e];if(t)return t;let n=I(e);return j[e]=n,n.catch(le.bind(null,e,n)),n}function le(e,t){j[e]===t&&delete j[e]}async function F(){M??=import(`./runtime-recovery-codes-CFOWDVd9.js`),N??=Promise.all([M,import(`./mountRecoveryCodeBackupSurface-CMtByh-L.js`)]).then(()=>void 0),await N}function I(e){switch(e){case`auth`:return import(`./runtime-auth-BMT_gIKI.js`);case`near`:return import(`./runtime-near-Kk0n1FSf.js`);case`ecdsa`:return import(`./runtime-ecdsa-tempo-DKkeMMpm.js`);case`email_otp`:return import(`./runtime-email-otp-CzTe7r9I.js`);case`recovery`:return import(`./runtime-recovery-C9p1TU1w.js`);case`export`:return import(`./runtime-export-BiyLbdCe.js`);case`device_link`:return import(`./runtime-device-link-DQe0aqRi.js`);case`preferences`:return import(`./runtime-preferences-B-A3hddU.js`)}return L(e)}function L(e){throw Error(`Unhandled wallet host runtime route: ${String(e)}`)}function R(e){switch(e.type){case`PM_GET_RECENT_UNLOCKS`:case`PM_GET_CONFIRMATION_CONFIG`:return!0;case`PM_GET_EXACT_WALLET_SESSION_STATE`:{let t=e.request.payload;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`authenticationRead`),r=Reflect.get(t,`wallet`);return(n===`restore`||n===`current`)&&!!r&&typeof r==`object`&&Reflect.get(r,`kind`)===`current`}default:return!1}}function z(e){switch(e.type){case`PM_GET_EXACT_WALLET_SESSION_STATE`:return{revision:C(),walletId:null,state:{kind:`wallet_locked`},session:g()};case`PM_GET_RECENT_UNLOCKS`:return{walletIds:[],accountIds:[],accounts:[],lastUsedAccount:null};case`PM_GET_CONFIRMATION_CONFIG`:return{walletId:null,confirmationConfig:D,revision:0}}}let B=null;function V(){return B??=U().finally(H),B}function H(){B=null}async function U(){try{return typeof indexedDB>`u`||typeof indexedDB.databases!=`function`?!1:(await indexedDB.databases()).some(ue)?await de():!0}catch{return!1}}function ue(e){return e.name===r}function de(){return new Promise(e=>{let t=indexedDB.open(r);t.onupgradeneeded=()=>t.transaction?.abort(),t.onerror=()=>e(!1),t.onsuccess=()=>{let n=t.result;n.onversionchange=()=>n.close(),fe(n).then(t=>{n.close(),e(t===0)},()=>{n.close(),e(!1)})}})}function fe(e){let t=Array.from(e.objectStoreNames);return t.length===0?Promise.resolve(0):new Promise((n,r)=>{let i=e.transaction(t,`readonly`),a=0;for(let e of t){let t=i.objectStore(e).count();t.onsuccess=()=>{a+=t.result}}i.oncomplete=()=>n(a),i.onerror=()=>r(i.error),i.onabort=()=>r(i.error)})}function pe(e){throw Error(`Unhandled wallet host route: ${String(e)}`)}function W(e,t){if(e===null)throw Error(`Invalid ${t} payload`);return e}function G(e){try{return E(e)}catch{throw Error(`Hosted auth-menu request requires a non-empty requestId`)}}function me(e){switch(e.type){case`PM_ACTIVATE_TRANSACTION_REVIEW`:case`PING`:case`PM_PREPARE_WALLET_RUNTIME`:case`PM_SET_CONFIG`:case`PM_CANCEL`:case`PM_SET_TRANSACTION_VIEW`:case`PM_TRANSACTION_BROADCAST_STARTED`:return{kind:`boot`,type:e.type,request:e};case`PM_OWNER_NEAR_TRANSACTION`:return{kind:`near`,type:e.type,request:{type:e.type,requestId:E(e.requestId),payload:S(e.payload)}};case`PM_REGISTER_WALLET`:case`PM_ADD_WALLET_SIGNER`:case`PM_ADD_PASSKEY`:case`PM_ACTIVATE_AUTH_METHOD`:case`PM_GET_AUTH_METHOD_AVAILABILITY`:case`PM_SET_AUTH_METHOD_ENABLED`:case`PM_ADD_EMAIL_OTP`:case`PM_REVOKE_AUTH_METHOD`:case`PM_GET_NEAR_PROVISIONING_STATE`:case`PM_SIGN_TX_WITH_ACTIONS`:case`PM_SIGN_AND_SEND_TX`:case`PM_SEND_TRANSACTION`:case`PM_SIGN_DELEGATE_ACTION`:case`PM_SIGN_NEP413`:return{kind:`near`,type:e.type,request:e};case`PM_OPEN_AUTH_MENU`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(m(e.payload),`hosted auth-menu open`)}}}case`PM_CANCEL_AUTH_MENU`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(T(e.payload),`hosted auth-menu cancellation`)}}}case`PM_RESOLVE_WALLET_CONNECTION`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(h(e.payload),`wallet connection resolution`)}}}case`PM_RESOLVE_AUTH_MENU_EXTERNAL_AUTH`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(w(e.payload),`hosted auth-menu external-auth resolution`)}}}case`PM_EXTERNAL_OWNER_AUTH`:{let t=x(e.payload);if(t.action!==`associate`&&t.action!==`unlink`)throw Error(`Owner request is invalid`);return{kind:`auth`,type:e.type,request:{type:e.type,requestId:E(e.requestId),payload:t,options:e.options}}}case`PM_UNLOCK`:case`PM_UNLOCK_AUTH_METHOD`:case`PM_EXTERNAL_AUTH`:case`PM_LOCK`:case`PM_LOCK_EXACT_WALLET_SESSION`:case`PM_GET_LAST_WALLET_MOVE_REQUEST`:case`PM_MOVE_WALLET`:case`PM_GET_WALLET_MOVE`:case`PM_GET_WALLET_PLACEMENT`:case`PM_GET_WALLET_SESSION`:case`PM_GET_EXACT_WALLET_SESSION_STATE`:case`PM_GET_RECENT_UNLOCKS`:return{kind:`auth`,type:e.type,request:e};case`PM_SIGN_TEMPO`:case`PM_REPORT_TEMPO_BROADCAST_ACCEPTED`:case`PM_REPORT_TEMPO_BROADCAST_REJECTED`:case`PM_REPORT_TEMPO_FINALIZED`:case`PM_REPORT_TEMPO_DROPPED_OR_REPLACED`:case`PM_RECONCILE_TEMPO_NONCE_LANE`:return{kind:`ecdsa`,type:e.type,request:e};case`PM_REDEEM_HOSTED_WALLET_SEAMS_SESSION`:case`PM_REQUEST_EMAIL_OTP_CHALLENGE`:case`PM_BEGIN_GOOGLE_EMAIL_OTP_WALLET_AUTH`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_RESEND`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_REROLL_WALLET_ID`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_SUBMIT`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_COMPLETE_REGISTRATION`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_CANCEL`:case`PM_GET_WALLET_RECOVERY_CODE_STATUS`:case`PM_ACKNOWLEDGE_WALLET_RECOVERY_CODE_BACKUP`:case`PM_ROTATE_WALLET_RECOVERY_CODES`:case`PM_REQUEST_WALLET_CUSTODY_EMAIL_OTP_CHALLENGE`:return{kind:`email_otp`,type:e.type,request:e};case`PM_SYNC_ACCOUNT_FLOW`:return{kind:`recovery`,type:e.type,request:e};case`PM_RESOLVE_EXACT_KEY_EXPORT_LANE`:case`PM_EXPORT_KEYPAIR_UI`:return{kind:`export`,type:e.type,request:e};case`PM_HAS_PASSKEY`:case`PM_LIST_LINKED_DEVICES`:case`PM_REVOKE_LINKED_DEVICE`:case`PM_SCAN_AND_LINK_DEVICE`:case`PM_START_DEVICE2_LINKING_FLOW`:case`PM_DEVICE_LINK_TARGET_FACTOR_ACTION`:case`PM_DEVICE_LINK_EMAIL_OTP_BASE_FACTOR_ACTION`:case`PM_CANCEL_DEVICE_LINKING`:return{kind:`device_link`,type:e.type,request:e};case`PM_SET_CONFIRM_BEHAVIOR`:case`PM_SET_CONFIRMATION_CONFIG`:case`PM_GET_CONFIRMATION_CONFIG`:return{kind:`preferences`,type:e.type,request:e}}return pe(e)}function he(e){return e.kind!==`boot`}let K=!1;const ge=[{selector:`.seams-auth-menu-surface`,cancellationKind:`native_cancel`},{selector:`.seams-confirmation-surface`,cancellationKind:`native_cancel`},{selector:`.seams-auth-method-activation-surface`,cancellationKind:`native_cancel`},{selector:`.seams-export-surface`,cancellationKind:`wallet_iframe_cancel`},{selector:`[data-seams-wallet-recovery-backup-dialog]`,cancellationKind:`native_cancel`}];function q(e,t){let n=new Set(t),r=Object.keys(e);return r.length===t.length&&r.every(e=>n.has(e))}function _e(t){return!e(t)||!q(t,[`type`,`payload`])||t.type!==`CONNECT`||!e(t.payload)||!q(t.payload,[`protocolVersion`])?null:typeof t.payload.protocolVersion==`string`?{type:`CONNECT`,payload:{protocolVersion:t.payload.protocolVersion}}:null}function ve(e){if(e===`null`)return!0;try{let t=new URL(e);return(t.protocol===`https:`||t.protocol===`http:`)&&t.origin===e}catch{return!1}}function J(e){try{e.close()}catch{}}function Y(e,t){if(t===`20.0.0`)return!1;let n={expectedProtocolVersion:v,receivedProtocolVersion:t};try{e.postMessage({type:`ERROR`,payload:{code:b,message:`Wallet iframe protocol version mismatch: expected ${v}, received ${t??`missing`}`,details:n}})}catch{}return J(e),!0}function X(e,t){return!t||t.has(e)}function Z(e,t,n,r){e.executionGeneration===t&&n(r)}function ye(e,t,n,r){if(t===`PM_SIGN_AND_SEND_TX`){e({type:`PM_RESULT`,requestId:n,payload:{ok:!0,result:_(r,`not_submitted`)}});return}e({type:`ERROR`,requestId:n,payload:{code:r instanceof c?r.code:`cancelled`,message:r.message}})}function Q(e,t,n,r){return e.executionGeneration!==t||n(r)}function $(e={}){if(K)return;K=!0,k(),(!e.supportedRuntimeRouteKinds||e.supportedRuntimeRouteKinds.has(`email_otp`))&&F().catch(()=>void 0);let r=new Set,f=new Set,p=new Set,m=!1,h={parentOrigin:null,port:null,configuration:{kind:`unconfigured`},executionGeneration:0,onConfigurationChanged:null},g=e=>{try{h.port?.postMessage(e)}catch{}},y=e=>{e&&r.add(e)},b=e=>!!e&&(r.has(e)||u(e)?.cancelled===!0),x=e=>{e&&r.delete(e)},S=e=>{e&&g({type:`ERROR`,requestId:e,payload:{code:`cancelled`,message:`Request cancelled`}})},C=e=>!e||!b(e)?!1:u(e)?.cancelled?!0:(S(e),x(e),!0),w=()=>{for(let e of ge){let t=document.querySelectorAll(e.selector);for(let n of t)try{e.cancellationKind===`native_cancel`?n.dispatchEvent(new Event(`cancel`,{cancelable:!0})):n.dispatchEvent(new CustomEvent(l.TX_CONFIRMER_CANCEL,{bubbles:!0,composed:!0}))}catch{}}},T=async r=>{let l=r.data;if(!l||!t(l))return;let v=l.requestId,T=typeof v==`string`&&l.type!==`PM_CANCEL`;if(T){if(p.has(v)){g({type:`ERROR`,requestId:v,payload:{code:`request_in_progress`,message:`Request identity is already active`}});return}p.add(v)}let E=h.executionGeneration,D=Z.bind(null,h,E,g),O=null,k=`admission`;try{let t=l.type.startsWith(`PM_SIGN_`)?await(await import(`./runtimeContext-ChuvOC0h.js`)).walletAuthMethodReviewPolicy(h,l):{kind:`disabled`};if(h.executionGeneration!==E||b(v))return;if(`transactionReview`in l){if(l.type!==`PM_SIGN_AND_SEND_TX`&&l.type!==`PM_SIGN_TEMPO`)throw new c(`review_invalid_input`,`Review is unsupported for this request`);let e=s(l.transactionReview);if(e.requestId!==v)throw new c(`review_invalid_input`,`Review request identity mismatch`);let n=l.payload?.options?.confirmationConfig;if(n?.uiMode!==`modal`||n.behavior!==`requireClick`)throw new c(`review_unsupported_mode`,`Review requires modal presentation and explicit approval`);O=new ie(e,l.type===`PM_SIGN_TEMPO`&&l.payload?.request.senderSignatureAlgorithm!==`secp256k1`?`credential`:`mpc`,e=>D({type:`TRANSACTION_REVIEW_STATE`,requestId:v,payload:e}),ye.bind(null,D,l.type,v),t)}(l.type===`PM_LOCK`||l.type===`PM_LOCK_EXACT_WALLET_SESSION`)&&d(new c(`review_identity_changed`,`The wallet session changed`));let r=me(l);if(!he(r))switch(r.type){case`PING`:g({type:`PONG`,requestId:v});return;case`PM_PREPARE_WALLET_RUNTIME`:X(`auth`,e.supportedRuntimeRouteKinds)&&se(),g({type:`PONG`,requestId:v});return;case`PM_SET_CONFIG`:{let e=o(h.configuration,i(r.request.payload)),t=a(h.configuration.kind===`configured`?h.configuration.config:null)!==a(e.config);if(h.configuration=e,t){h.executionGeneration+=1;let t=e.config;t.registration.publishableKey&&t.registration.projectEnvironmentId&&n(t.network.relayer.url);for(let e of f)g({type:`ERROR`,requestId:e,payload:{code:`wallet_configuration_changed`,message:`Wallet configuration changed during request`}});f.clear()}h.onConfigurationChanged?.(),t&&(d(new c(`review_identity_changed`,`Wallet execution configuration changed`)),w()),g({type:`PONG`,requestId:v});return}case`PM_ACTIVATE_TRANSACTION_REVIEW`:{let e=re(r.request.payload);e&&u(e.requestId)?.activate(e);return}case`PM_CANCEL`:{let e=r.request.payload?.requestId,t=r.request.payload,n=t&&typeof t==`object`?Reflect.get(t,`transactionReview`):void 0;if(n!==void 0){let r=s(n),i=u(r.requestId);if(r.requestId===e&&i&&ee(r,i.metadata)){let e=new c(ne(t&&typeof t==`object`?Reflect.get(t,`reviewErrorCode`):void 0),`Reviewed request cancelled`);try{te(i.metadata.validity)}catch(t){t instanceof Error&&(e=t)}i.cancel(e)}g({type:`PONG`,requestId:v});return}let i=e?u(e):void 0;if(i){i.cancel(new c(`cancelled`,`Request cancelled`)),g({type:`PONG`,requestId:v});return}y(e),(await import(`./deviceLinkApproval-C4T8XAmi.js`).then(e=>e.i)).cancelDeviceLinkApproval(typeof e==`string`?{kind:`request`,requestId:e}:{kind:`all`}),w(),e&&S(e),g({type:`PONG`,requestId:v});return}case`PM_SET_TRANSACTION_VIEW`:{let e=r.request.payload,t=e&&typeof e==`object`?Reflect.get(e,`requestId`):null,n=e&&typeof e==`object`?Reflect.get(e,`view`):null;typeof t==`string`&&(n===`toast`||n===`closed`)&&(await import(`./transaction-activity-BXSxMp1E.js`).then(e=>e.o)).setTransactionActivityView(t,n);return}case`PM_TRANSACTION_BROADCAST_STARTED`:{let e=r.request.payload,t=e&&typeof e==`object`?Reflect.get(e,`signedTransaction`):null;typeof t==`string`&&(await import(`./transaction-activity-BXSxMp1E.js`).then(e=>e.o)).transactionBroadcastStarted(t);return}}if(!X(r.kind,e.supportedRuntimeRouteKinds)){g({type:`ERROR`,requestId:v,payload:{code:`unsupported_request`,message:`Unsupported wallet iframe request type: ${r.type}`}});return}if(v&&f.add(v),!m&&R(r)&&await V()&&!m){if(E!==h.executionGeneration||C(v))return;D({type:`PM_RESULT`,requestId:v,payload:{ok:!0,result:z(r)}});return}m=!0;let p=await oe(r);if(E!==h.executionGeneration)return;k=`runtime`,await p.handleWalletHostRuntimeRequest({transactionReview:O,state:h,executionGeneration:E,req:r.request,post:Z.bind(null,h,E,g),isCancelled:Q.bind(null,h,E,b),respondIfCancelled:Q.bind(null,h,E,C)})}catch(e){if(E!==h.executionGeneration&&l.type!==`PM_SET_CONFIG`||O?.cancelled)return;if(k===`admission`&&(l.type===`PM_SIGN_AND_SEND_TX`||l.type===`PM_SEND_TRANSACTION`)){D({type:`PM_RESULT`,requestId:v,payload:{ok:!0,result:_(e,`not_submitted`)}});return}let t=await import(`./canonicalSignerErrorCode-CX5PBpkt.js`);if(E!==h.executionGeneration&&l.type!==`PM_SET_CONFIG`)return;let n=e&&typeof e==`object`&&`code`in e?e.code:void 0,r=ae(e),i=t.resolveWalletBoundaryErrorCode({requestType:l.type,rawCode:n,message:r,defaultCode:`HOST_ERROR`}),a=t.resolveWalletBoundaryErrorMessage({requestType:l.type,rawCode:n,code:i,message:r}),o=t.resolveWalletBoundarySignerKind(l.type);g({type:`ERROR`,requestId:v,payload:{code:i,message:a,...t.isWalletSignerBoundaryRequestType(l.type)&&t.isCanonicalSignerSessionBoundaryCode(i)&&o?{signerKind:o}:{}}})}finally{T&&(p.delete(v),f.delete(v),x(v)),O?.finish()}};window.addEventListener(`message`,e=>{let t=_e(e.data),n=e.ports[0];if(!(!t||!n||h.port)){if(e.source!==window.parent||!ve(e.origin)){J(n);return}if(!Y(n,t.payload.protocolVersion)){typeof e.origin==`string`&&e.origin.length&&e.origin!==`null`&&(h.parentOrigin=e.origin),h.port=n;try{h.port.onmessage=T,h.port.start?.()}catch{}g({type:`READY`,payload:{protocolVersion:v}})}}})}try{$()}catch(e){console.error(`[WalletHost] init failed`,e)}export{$ as t};
|
|
1
|
+
import{g as e,h as t}from"./digests-BIaE0DMd.js";import{n}from"./walletRegistrationSetupPrewarm-CEvGKQSg.js";import{t as r}from"./walletDbName-B6-CV_Rq.js";import{n as i,r as a,t as o}from"./configuration-BAad7ngq.js";import{a as ee,i as s,n as te,o as ne,r as re,t as c}from"./transactionReview-CGIlI835.js";import{t as l}from"./events-D6l0_ugy.js";import{i as u,n as d,t as ie}from"./transactionReviewAdmission-Cf_qUZJt.js";import{A as f,D as p,S as m,T as h,d as g,f as _,h as v,k as y,m as b,o as x,t as S,u as C,x as w,y as T}from"./ownerNearOperation-DCxxHcwX.js";import{t as E}from"./walletIframeIdentity-Cz82I_Uh.js";import{t as ae}from"./errors-BJBDbwHk.js";import{s as D}from"./ed25519OperationFingerprint-Dev4P6Og.js";function O(){let e=globalThis;e.global===void 0&&(e.global=globalThis),!e.process||typeof e.process!=`object`?e.process={env:{}}:(!e.process.env||typeof e.process.env!=`object`)&&(e.process.env={})}function k(){O(),window.location.origin===`null`&&(window.parent?.postMessage({type:`SERVICE_HOST_DEBUG_ORIGIN`,origin:window.location.origin,href:window.location.href},`*`),console.warn(`[WalletHost] iframe is running with opaque (null) origin. Check COEP/CORP headers and ensure navigation succeeded.`)),A(),window.parent?.postMessage({type:`SERVICE_HOST_BOOTED`},`*`),window.parent?.postMessage({type:`SERVICE_HOST_DEBUG_ORIGIN`,origin:window.location.origin,href:window.location.href},`*`);let e=new URL(import.meta.url),t=e.searchParams.get(`v`);t&&y(t);let n=new URL(`.`,e).toString(),r=n.endsWith(`/`)?n:n+`/`;p()||f(r)}function A(){let e=()=>{let e=document;e.documentElement.classList.add(`seams-transparent`),e.body?.classList.add(`seams-transparent`),e.documentElement.classList.remove(`dark`),e.body?.classList.remove(`dark`)};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,()=>e(),{once:!0}):e(),window.addEventListener(`load`,()=>e(),{once:!0})}const j={};let M=null,N=null;function oe(e){return e.request.type===`PM_ACKNOWLEDGE_WALLET_RECOVERY_CODE_BACKUP`?e.request.payload?.authorization?.kind===`email_otp`?P(e.kind):(M??=import(`./runtime-recovery-codes-CFOWDVd9.js`),M):P(e.kind)}function se(){P(`auth`).catch(ce)}function ce(){}function P(e){let t=j[e];if(t)return t;let n=I(e);return j[e]=n,n.catch(le.bind(null,e,n)),n}function le(e,t){j[e]===t&&delete j[e]}async function F(){M??=import(`./runtime-recovery-codes-CFOWDVd9.js`),N??=Promise.all([M,import(`./mountRecoveryCodeBackupSurface-CMtByh-L.js`)]).then(()=>void 0),await N}function I(e){switch(e){case`auth`:return import(`./runtime-auth-CP6P681o.js`);case`near`:return import(`./runtime-near-CuyS57wu.js`);case`ecdsa`:return import(`./runtime-ecdsa-tempo-BiJYKWK4.js`);case`email_otp`:return import(`./runtime-email-otp-B0XCNDRb.js`);case`recovery`:return import(`./runtime-recovery-KwVdSe94.js`);case`export`:return import(`./runtime-export-CXxv6KIx.js`);case`device_link`:return import(`./runtime-device-link-CGDZQK-D.js`);case`preferences`:return import(`./runtime-preferences-B2WBUZO7.js`)}return L(e)}function L(e){throw Error(`Unhandled wallet host runtime route: ${String(e)}`)}function R(e){switch(e.type){case`PM_GET_RECENT_UNLOCKS`:case`PM_GET_CONFIRMATION_CONFIG`:return!0;case`PM_GET_EXACT_WALLET_SESSION_STATE`:{let t=e.request.payload;if(!t||typeof t!=`object`)return!1;let n=Reflect.get(t,`authenticationRead`),r=Reflect.get(t,`wallet`);return(n===`restore`||n===`current`)&&!!r&&typeof r==`object`&&Reflect.get(r,`kind`)===`current`}default:return!1}}function z(e){switch(e.type){case`PM_GET_EXACT_WALLET_SESSION_STATE`:return{revision:C(),walletId:null,state:{kind:`wallet_locked`},session:g()};case`PM_GET_RECENT_UNLOCKS`:return{walletIds:[],accountIds:[],accounts:[],lastUsedAccount:null};case`PM_GET_CONFIRMATION_CONFIG`:return{walletId:null,confirmationConfig:D,revision:0}}}let B=null;function V(){return B??=U().finally(H),B}function H(){B=null}async function U(){try{return typeof indexedDB>`u`||typeof indexedDB.databases!=`function`?!1:(await indexedDB.databases()).some(ue)?await de():!0}catch{return!1}}function ue(e){return e.name===r}function de(){return new Promise(e=>{let t=indexedDB.open(r);t.onupgradeneeded=()=>t.transaction?.abort(),t.onerror=()=>e(!1),t.onsuccess=()=>{let n=t.result;n.onversionchange=()=>n.close(),fe(n).then(t=>{n.close(),e(t===0)},()=>{n.close(),e(!1)})}})}function fe(e){let t=Array.from(e.objectStoreNames);return t.length===0?Promise.resolve(0):new Promise((n,r)=>{let i=e.transaction(t,`readonly`),a=0;for(let e of t){let t=i.objectStore(e).count();t.onsuccess=()=>{a+=t.result}}i.oncomplete=()=>n(a),i.onerror=()=>r(i.error),i.onabort=()=>r(i.error)})}function pe(e){throw Error(`Unhandled wallet host route: ${String(e)}`)}function W(e,t){if(e===null)throw Error(`Invalid ${t} payload`);return e}function G(e){try{return E(e)}catch{throw Error(`Hosted auth-menu request requires a non-empty requestId`)}}function me(e){switch(e.type){case`PM_ACTIVATE_TRANSACTION_REVIEW`:case`PING`:case`PM_PREPARE_WALLET_RUNTIME`:case`PM_SET_CONFIG`:case`PM_CANCEL`:case`PM_SET_TRANSACTION_VIEW`:case`PM_TRANSACTION_BROADCAST_STARTED`:return{kind:`boot`,type:e.type,request:e};case`PM_OWNER_NEAR_TRANSACTION`:return{kind:`near`,type:e.type,request:{type:e.type,requestId:E(e.requestId),payload:S(e.payload)}};case`PM_REGISTER_WALLET`:case`PM_ADD_WALLET_SIGNER`:case`PM_ADD_PASSKEY`:case`PM_ACTIVATE_AUTH_METHOD`:case`PM_GET_AUTH_METHOD_AVAILABILITY`:case`PM_SET_AUTH_METHOD_ENABLED`:case`PM_ADD_EMAIL_OTP`:case`PM_REVOKE_AUTH_METHOD`:case`PM_GET_NEAR_PROVISIONING_STATE`:case`PM_SIGN_TX_WITH_ACTIONS`:case`PM_SIGN_AND_SEND_TX`:case`PM_SEND_TRANSACTION`:case`PM_SIGN_DELEGATE_ACTION`:case`PM_SIGN_NEP413`:return{kind:`near`,type:e.type,request:e};case`PM_OPEN_AUTH_MENU`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(m(e.payload),`hosted auth-menu open`)}}}case`PM_CANCEL_AUTH_MENU`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(T(e.payload),`hosted auth-menu cancellation`)}}}case`PM_RESOLVE_WALLET_CONNECTION`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(h(e.payload),`wallet connection resolution`)}}}case`PM_RESOLVE_AUTH_MENU_EXTERNAL_AUTH`:{let t=G(e.requestId);return{kind:`auth`,type:e.type,request:{...e,requestId:t,payload:W(w(e.payload),`hosted auth-menu external-auth resolution`)}}}case`PM_EXTERNAL_OWNER_AUTH`:{let t=x(e.payload);if(t.action!==`associate`&&t.action!==`unlink`)throw Error(`Owner request is invalid`);return{kind:`auth`,type:e.type,request:{type:e.type,requestId:E(e.requestId),payload:t,options:e.options}}}case`PM_UNLOCK`:case`PM_UNLOCK_AUTH_METHOD`:case`PM_EXTERNAL_AUTH`:case`PM_LOCK`:case`PM_LOCK_EXACT_WALLET_SESSION`:case`PM_GET_LAST_WALLET_MOVE_REQUEST`:case`PM_MOVE_WALLET`:case`PM_GET_WALLET_MOVE`:case`PM_GET_WALLET_PLACEMENT`:case`PM_GET_WALLET_SESSION`:case`PM_GET_EXACT_WALLET_SESSION_STATE`:case`PM_GET_RECENT_UNLOCKS`:return{kind:`auth`,type:e.type,request:e};case`PM_SIGN_TEMPO`:case`PM_REPORT_TEMPO_BROADCAST_ACCEPTED`:case`PM_REPORT_TEMPO_BROADCAST_REJECTED`:case`PM_REPORT_TEMPO_FINALIZED`:case`PM_REPORT_TEMPO_DROPPED_OR_REPLACED`:case`PM_RECONCILE_TEMPO_NONCE_LANE`:return{kind:`ecdsa`,type:e.type,request:e};case`PM_REDEEM_HOSTED_WALLET_SEAMS_SESSION`:case`PM_REQUEST_EMAIL_OTP_CHALLENGE`:case`PM_BEGIN_GOOGLE_EMAIL_OTP_WALLET_AUTH`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_RESEND`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_REROLL_WALLET_ID`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_SUBMIT`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_COMPLETE_REGISTRATION`:case`PM_GOOGLE_EMAIL_OTP_WALLET_AUTH_CANCEL`:case`PM_GET_WALLET_RECOVERY_CODE_STATUS`:case`PM_ACKNOWLEDGE_WALLET_RECOVERY_CODE_BACKUP`:case`PM_ROTATE_WALLET_RECOVERY_CODES`:case`PM_REQUEST_WALLET_CUSTODY_EMAIL_OTP_CHALLENGE`:return{kind:`email_otp`,type:e.type,request:e};case`PM_SYNC_ACCOUNT_FLOW`:return{kind:`recovery`,type:e.type,request:e};case`PM_RESOLVE_EXACT_KEY_EXPORT_LANE`:case`PM_EXPORT_KEYPAIR_UI`:return{kind:`export`,type:e.type,request:e};case`PM_HAS_PASSKEY`:case`PM_LIST_LINKED_DEVICES`:case`PM_REVOKE_LINKED_DEVICE`:case`PM_SCAN_AND_LINK_DEVICE`:case`PM_START_DEVICE2_LINKING_FLOW`:case`PM_DEVICE_LINK_TARGET_FACTOR_ACTION`:case`PM_DEVICE_LINK_EMAIL_OTP_BASE_FACTOR_ACTION`:case`PM_CANCEL_DEVICE_LINKING`:return{kind:`device_link`,type:e.type,request:e};case`PM_SET_CONFIRM_BEHAVIOR`:case`PM_SET_CONFIRMATION_CONFIG`:case`PM_GET_CONFIRMATION_CONFIG`:return{kind:`preferences`,type:e.type,request:e}}return pe(e)}function he(e){return e.kind!==`boot`}let K=!1;const ge=[{selector:`.seams-auth-menu-surface`,cancellationKind:`native_cancel`},{selector:`.seams-confirmation-surface`,cancellationKind:`native_cancel`},{selector:`.seams-auth-method-activation-surface`,cancellationKind:`native_cancel`},{selector:`.seams-export-surface`,cancellationKind:`wallet_iframe_cancel`},{selector:`[data-seams-wallet-recovery-backup-dialog]`,cancellationKind:`native_cancel`}];function q(e,t){let n=new Set(t),r=Object.keys(e);return r.length===t.length&&r.every(e=>n.has(e))}function _e(t){return!e(t)||!q(t,[`type`,`payload`])||t.type!==`CONNECT`||!e(t.payload)||!q(t.payload,[`protocolVersion`])?null:typeof t.payload.protocolVersion==`string`?{type:`CONNECT`,payload:{protocolVersion:t.payload.protocolVersion}}:null}function ve(e){if(e===`null`)return!0;try{let t=new URL(e);return(t.protocol===`https:`||t.protocol===`http:`)&&t.origin===e}catch{return!1}}function J(e){try{e.close()}catch{}}function Y(e,t){if(t===`20.0.0`)return!1;let n={expectedProtocolVersion:v,receivedProtocolVersion:t};try{e.postMessage({type:`ERROR`,payload:{code:b,message:`Wallet iframe protocol version mismatch: expected ${v}, received ${t??`missing`}`,details:n}})}catch{}return J(e),!0}function X(e,t){return!t||t.has(e)}function Z(e,t,n,r){e.executionGeneration===t&&n(r)}function ye(e,t,n,r){if(t===`PM_SIGN_AND_SEND_TX`){e({type:`PM_RESULT`,requestId:n,payload:{ok:!0,result:_(r,`not_submitted`)}});return}e({type:`ERROR`,requestId:n,payload:{code:r instanceof c?r.code:`cancelled`,message:r.message}})}function Q(e,t,n,r){return e.executionGeneration!==t||n(r)}function $(e={}){if(K)return;K=!0,k(),(!e.supportedRuntimeRouteKinds||e.supportedRuntimeRouteKinds.has(`email_otp`))&&F().catch(()=>void 0);let r=new Set,f=new Set,p=new Set,m=!1,h={parentOrigin:null,port:null,configuration:{kind:`unconfigured`},executionGeneration:0,onConfigurationChanged:null},g=e=>{try{h.port?.postMessage(e)}catch{}},y=e=>{e&&r.add(e)},b=e=>!!e&&(r.has(e)||u(e)?.cancelled===!0),x=e=>{e&&r.delete(e)},S=e=>{e&&g({type:`ERROR`,requestId:e,payload:{code:`cancelled`,message:`Request cancelled`}})},C=e=>!e||!b(e)?!1:u(e)?.cancelled?!0:(S(e),x(e),!0),w=()=>{for(let e of ge){let t=document.querySelectorAll(e.selector);for(let n of t)try{e.cancellationKind===`native_cancel`?n.dispatchEvent(new Event(`cancel`,{cancelable:!0})):n.dispatchEvent(new CustomEvent(l.TX_CONFIRMER_CANCEL,{bubbles:!0,composed:!0}))}catch{}}},T=async r=>{let l=r.data;if(!l||!t(l))return;let v=l.requestId,T=typeof v==`string`&&l.type!==`PM_CANCEL`;if(T){if(p.has(v)){g({type:`ERROR`,requestId:v,payload:{code:`request_in_progress`,message:`Request identity is already active`}});return}p.add(v)}let E=h.executionGeneration,D=Z.bind(null,h,E,g),O=null,k=`admission`;try{let t=l.type.startsWith(`PM_SIGN_`)?await(await import(`./runtimeContext-Iy1vecX0.js`)).walletAuthMethodReviewPolicy(h,l):{kind:`disabled`};if(h.executionGeneration!==E||b(v))return;if(`transactionReview`in l){if(l.type!==`PM_SIGN_AND_SEND_TX`&&l.type!==`PM_SIGN_TEMPO`)throw new c(`review_invalid_input`,`Review is unsupported for this request`);let e=s(l.transactionReview);if(e.requestId!==v)throw new c(`review_invalid_input`,`Review request identity mismatch`);let n=l.payload?.options?.confirmationConfig;if(n?.uiMode!==`modal`||n.behavior!==`requireClick`)throw new c(`review_unsupported_mode`,`Review requires modal presentation and explicit approval`);O=new ie(e,l.type===`PM_SIGN_TEMPO`&&l.payload?.request.senderSignatureAlgorithm!==`secp256k1`?`credential`:`mpc`,e=>D({type:`TRANSACTION_REVIEW_STATE`,requestId:v,payload:e}),ye.bind(null,D,l.type,v),t)}(l.type===`PM_LOCK`||l.type===`PM_LOCK_EXACT_WALLET_SESSION`)&&d(new c(`review_identity_changed`,`The wallet session changed`));let r=me(l);if(!he(r))switch(r.type){case`PING`:g({type:`PONG`,requestId:v});return;case`PM_PREPARE_WALLET_RUNTIME`:X(`auth`,e.supportedRuntimeRouteKinds)&&se(),g({type:`PONG`,requestId:v});return;case`PM_SET_CONFIG`:{let e=o(h.configuration,i(r.request.payload)),t=a(h.configuration.kind===`configured`?h.configuration.config:null)!==a(e.config);if(h.configuration=e,t){h.executionGeneration+=1;let t=e.config;t.registration.publishableKey&&t.registration.projectEnvironmentId&&n(t.network.relayer.url);for(let e of f)g({type:`ERROR`,requestId:e,payload:{code:`wallet_configuration_changed`,message:`Wallet configuration changed during request`}});f.clear()}h.onConfigurationChanged?.(),t&&(d(new c(`review_identity_changed`,`Wallet execution configuration changed`)),w()),g({type:`PONG`,requestId:v});return}case`PM_ACTIVATE_TRANSACTION_REVIEW`:{let e=re(r.request.payload);e&&u(e.requestId)?.activate(e);return}case`PM_CANCEL`:{let e=r.request.payload?.requestId,t=r.request.payload,n=t&&typeof t==`object`?Reflect.get(t,`transactionReview`):void 0;if(n!==void 0){let r=s(n),i=u(r.requestId);if(r.requestId===e&&i&&ee(r,i.metadata)){let e=new c(ne(t&&typeof t==`object`?Reflect.get(t,`reviewErrorCode`):void 0),`Reviewed request cancelled`);try{te(i.metadata.validity)}catch(t){t instanceof Error&&(e=t)}i.cancel(e)}g({type:`PONG`,requestId:v});return}let i=e?u(e):void 0;if(i){i.cancel(new c(`cancelled`,`Request cancelled`)),g({type:`PONG`,requestId:v});return}y(e),(await import(`./deviceLinkApproval-C4T8XAmi.js`).then(e=>e.i)).cancelDeviceLinkApproval(typeof e==`string`?{kind:`request`,requestId:e}:{kind:`all`}),w(),e&&S(e),g({type:`PONG`,requestId:v});return}case`PM_SET_TRANSACTION_VIEW`:{let e=r.request.payload,t=e&&typeof e==`object`?Reflect.get(e,`requestId`):null,n=e&&typeof e==`object`?Reflect.get(e,`view`):null;typeof t==`string`&&(n===`toast`||n===`closed`)&&(await import(`./transaction-activity-BXSxMp1E.js`).then(e=>e.o)).setTransactionActivityView(t,n);return}case`PM_TRANSACTION_BROADCAST_STARTED`:{let e=r.request.payload,t=e&&typeof e==`object`?Reflect.get(e,`signedTransaction`):null;typeof t==`string`&&(await import(`./transaction-activity-BXSxMp1E.js`).then(e=>e.o)).transactionBroadcastStarted(t);return}}if(!X(r.kind,e.supportedRuntimeRouteKinds)){g({type:`ERROR`,requestId:v,payload:{code:`unsupported_request`,message:`Unsupported wallet iframe request type: ${r.type}`}});return}if(v&&f.add(v),!m&&R(r)&&await V()&&!m){if(E!==h.executionGeneration||C(v))return;D({type:`PM_RESULT`,requestId:v,payload:{ok:!0,result:z(r)}});return}m=!0;let p=await oe(r);if(E!==h.executionGeneration)return;k=`runtime`,await p.handleWalletHostRuntimeRequest({transactionReview:O,state:h,executionGeneration:E,req:r.request,post:Z.bind(null,h,E,g),isCancelled:Q.bind(null,h,E,b),respondIfCancelled:Q.bind(null,h,E,C)})}catch(e){if(E!==h.executionGeneration&&l.type!==`PM_SET_CONFIG`||O?.cancelled)return;if(k===`admission`&&(l.type===`PM_SIGN_AND_SEND_TX`||l.type===`PM_SEND_TRANSACTION`)){D({type:`PM_RESULT`,requestId:v,payload:{ok:!0,result:_(e,`not_submitted`)}});return}let t=await import(`./canonicalSignerErrorCode-CX5PBpkt.js`);if(E!==h.executionGeneration&&l.type!==`PM_SET_CONFIG`)return;let n=e&&typeof e==`object`&&`code`in e?e.code:void 0,r=ae(e),i=t.resolveWalletBoundaryErrorCode({requestType:l.type,rawCode:n,message:r,defaultCode:`HOST_ERROR`}),a=t.resolveWalletBoundaryErrorMessage({requestType:l.type,rawCode:n,code:i,message:r}),o=t.resolveWalletBoundarySignerKind(l.type);g({type:`ERROR`,requestId:v,payload:{code:i,message:a,...t.isWalletSignerBoundaryRequestType(l.type)&&t.isCanonicalSignerSessionBoundaryCode(i)&&o?{signerKind:o}:{}}})}finally{T&&(p.delete(v),f.delete(v),x(v)),O?.finish()}};window.addEventListener(`message`,e=>{let t=_e(e.data),n=e.ports[0];if(!(!t||!n||h.port)){if(e.source!==window.parent||!ve(e.origin)){J(n);return}if(!Y(n,t.payload.protocolVersion)){typeof e.origin==`string`&&e.origin.length&&e.origin!==`null`&&(h.parentOrigin=e.origin),h.port=n;try{h.port.onmessage=T,h.port.start?.()}catch{}g({type:`READY`,payload:{protocolVersion:v}})}}})}try{$()}catch(e){console.error(`[WalletHost] init failed`,e)}export{$ as t};
|