hd-wallet-ui 2.0.21 → 2.0.27

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 (39) hide show
  1. package/LICENSE +190 -0
  2. package/README.md +101 -123
  3. package/data/common-passwords-sdn-v1.source.json +12 -0
  4. package/data/common-passwords-sdn-v1.txt +10000 -0
  5. package/dist/browser/sdn-wallet-callback.js +1 -0
  6. package/dist/browser/sdn-wallet-public-client.js +1 -0
  7. package/dist/browser/wallet-callback.html +6 -0
  8. package/dist/client/asset-review.d.ts +8 -0
  9. package/dist/client/asset-review.js +1570 -0
  10. package/dist/client/callback.d.ts +13 -0
  11. package/dist/client/callback.js +29 -0
  12. package/dist/client/index.d.ts +11 -0
  13. package/dist/client/index.js +1379 -0
  14. package/dist/client/sdn.d.ts +8 -0
  15. package/dist/client/sdn.js +1542 -0
  16. package/dist/client/style.css +32 -0
  17. package/dist/client/types.d.ts +278 -0
  18. package/dist/compat/index.d.ts +26 -0
  19. package/dist/compat/index.js +62 -0
  20. package/dist/wallet-origin/index.d.ts +21 -0
  21. package/dist/wallet-origin/index.js +4607 -0
  22. package/dist/wallet-origin-host/assets/wallet-origin.43cf84e0eba17742309357ec6bc2c544736e155ffd5d76d5024408e998500a57.wasm +0 -0
  23. package/dist/wallet-origin-host/assets/wallet-origin.4c9455f1a2618948e203f720485add9d8ebf77b5542b41f933594afcfbb34361.css +1 -0
  24. package/dist/wallet-origin-host/assets/wallet-origin.aedc355452e665e16c0f72a6597602873378dbc39d4cbf6104621c07579347e0.js +12463 -0
  25. package/dist/wallet-origin-host/index.html +10 -0
  26. package/dist/wallet-origin-host/integrity.json +1 -0
  27. package/package.json +46 -18
  28. package/src/address-derivation.js +0 -514
  29. package/src/app.js +0 -6008
  30. package/src/blockchain-trust.js +0 -752
  31. package/src/clipboard.js +0 -44
  32. package/src/constants.js +0 -66
  33. package/src/hash.js +0 -9
  34. package/src/lib.js +0 -66
  35. package/src/template.js +0 -626
  36. package/src/trust-ui.js +0 -745
  37. package/src/wallet-storage.js +0 -773
  38. package/styles/main.css +0 -6220
  39. package/styles/widget.css +0 -6212
@@ -0,0 +1,13 @@
1
+ import type {
2
+ WalletCallbackClose,
3
+ WalletCallbackHistory,
4
+ WalletCallbackLocation,
5
+ WalletCallbackStorage,
6
+ } from './types.js';
7
+
8
+ export declare function completeWalletCallbackV1(
9
+ location: WalletCallbackLocation,
10
+ storage: WalletCallbackStorage,
11
+ history: WalletCallbackHistory,
12
+ close: WalletCallbackClose,
13
+ ): void;
@@ -0,0 +1,29 @@
1
+ const g = "Wallet return could not be completed. Close this page and try Login again.", y = /^#code=([0-9a-f]{64})&state=([0-9a-f]{64})$/u;
2
+ function e() {
3
+ throw new Error(g);
4
+ }
5
+ function d(t, n, r, h) {
6
+ let a;
7
+ try {
8
+ a = t.hash;
9
+ const i = typeof t.pathname == "string" && t.pathname.startsWith("/") ? t.pathname : "/", m = typeof t.search == "string" && t.search.startsWith("?") ? t.search : "";
10
+ r.replaceState(null, "", `${i}${m}`);
11
+ } catch {
12
+ e();
13
+ }
14
+ const s = y.exec(a);
15
+ s || e();
16
+ const [, o, c] = s, l = new Date(Date.now() + 12e4).toISOString(), p = `sdn.wallet.callback.v1:${c}`, f = JSON.stringify({ schemaVersion: 1, code: o, state: c, expiresAt: l });
17
+ try {
18
+ n.setItem(p, f);
19
+ } catch {
20
+ e();
21
+ }
22
+ try {
23
+ h();
24
+ } catch {
25
+ }
26
+ }
27
+ export {
28
+ d as completeWalletCallbackV1
29
+ };
@@ -0,0 +1,11 @@
1
+ import type {
2
+ CreateWalletClientOptions,
3
+ WalletClientErrorMessages,
4
+ WalletPublicClient,
5
+ } from './types.js';
6
+
7
+ export declare const WALLET_CLIENT_ERRORS: WalletClientErrorMessages;
8
+
9
+ export declare function createWalletClient(
10
+ options: CreateWalletClientOptions,
11
+ ): WalletPublicClient;