hd-wallet-ui 2.0.20 → 2.0.26
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/LICENSE +190 -0
- package/README.md +101 -123
- package/data/common-passwords-sdn-v1.source.json +12 -0
- package/data/common-passwords-sdn-v1.txt +10000 -0
- package/dist/browser/sdn-wallet-callback.js +1 -0
- package/dist/browser/sdn-wallet-public-client.js +1 -0
- package/dist/browser/wallet-callback.html +6 -0
- package/dist/client/asset-review.d.ts +8 -0
- package/dist/client/asset-review.js +1570 -0
- package/dist/client/callback.d.ts +13 -0
- package/dist/client/callback.js +29 -0
- package/dist/client/index.d.ts +11 -0
- package/dist/client/index.js +1379 -0
- package/dist/client/sdn.d.ts +8 -0
- package/dist/client/sdn.js +1542 -0
- package/dist/client/style.css +32 -0
- package/dist/client/types.d.ts +278 -0
- package/dist/compat/index.d.ts +26 -0
- package/dist/compat/index.js +62 -0
- package/dist/wallet-origin/index.d.ts +21 -0
- package/dist/wallet-origin/index.js +4607 -0
- package/dist/wallet-origin-host/assets/wallet-origin.3d16729bf9aaca4517cc699bec526c7209be184cdbb0ba0dbf4063d36a091e1d.js +12463 -0
- package/dist/wallet-origin-host/assets/wallet-origin.e22071a3643a57055d29f2e6951c1a2f15e77c1b58b0f81bb7f2afed5bcfb0b4.wasm +0 -0
- package/dist/wallet-origin-host/assets/wallet-origin.f3273f7ea70bb494cda1fc02264b936f2e9b010dc07df15eed05fa3f7d1356de.css +1 -0
- package/dist/wallet-origin-host/index.html +10 -0
- package/dist/wallet-origin-host/integrity.json +1 -0
- package/package.json +46 -18
- package/src/address-derivation.js +0 -514
- package/src/app.js +0 -6008
- package/src/blockchain-trust.js +0 -752
- package/src/clipboard.js +0 -44
- package/src/constants.js +0 -66
- package/src/hash.js +0 -9
- package/src/lib.js +0 -66
- package/src/template.js +0 -626
- package/src/trust-ui.js +0 -745
- package/src/wallet-storage.js +0 -773
- package/styles/main.css +0 -6220
- 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;
|