@txnlab/use-wallet-ui-react 1.2.0 → 1.3.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 +26 -16
- package/dist/cjs/chunks/{floating-ui.react-O3sXJ80G.cjs → floating-ui.react-ChfuPAKc.cjs} +1 -1
- package/dist/cjs/chunks/{floating-ui.react-O3sXJ80G.cjs.map → floating-ui.react-ChfuPAKc.cjs.map} +1 -1
- package/dist/cjs/index.cjs +14 -14
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/cjs/plugins/export-key.cjs +2 -2
- package/dist/cjs/plugins/export-key.cjs.map +1 -1
- package/dist/esm/chunks/{floating-ui.react-Co7v2aHO.js → floating-ui.react-CxJSDrxv.js} +1 -1
- package/dist/esm/chunks/{floating-ui.react-Co7v2aHO.js.map → floating-ui.react-CxJSDrxv.js.map} +1 -1
- package/dist/esm/index.js +1093 -1072
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/plugins/export-key.js +13 -12
- package/dist/esm/plugins/export-key.js.map +1 -1
- package/dist/style.css +4 -0
- package/dist/types/components/ConnectWalletMenu.d.ts.map +1 -1
- package/dist/types/plugins/PluginLifecycleManager.d.ts.map +1 -1
- package/dist/types/utils/ipfs.d.ts +6 -1
- package/dist/types/utils/ipfs.d.ts.map +1 -1
- package/package.json +6 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as B, Fragment as be } from "react/jsx-runtime";
|
|
2
|
-
import { u as
|
|
2
|
+
import { u as Ue, b as Pe, c as qe, d as He, g as Le, h as Ie } from "../chunks/floating-ui.react-CxJSDrxv.js";
|
|
3
3
|
import { useWallet as Ke } from "@txnlab/use-wallet-react";
|
|
4
4
|
import { useState as ve, useRef as We, useEffect as ze, useCallback as je } from "react";
|
|
5
5
|
var Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
@@ -263,10 +263,10 @@ function Ye() {
|
|
|
263
263
|
var e = this.h0h, l = this.h0l, h = this.h1h, x = this.h1l, m = this.h2h, o = this.h2l, f = this.h3h, r = this.h3l, v = this.h4h, y = this.h4l, z = this.h5h, R = this.h5l, _ = this.h6h, S = this.h6l, M = this.h7h, O = this.h7l, k = this.blocks, d, H, L, I, K, a, i, s, F, ke, Be, Ae, Ee, De, Ne, we, Ce, oe, le, c, u, w, C, ne, he;
|
|
264
264
|
for (d = 32; d < 160; d += 2)
|
|
265
265
|
c = k[d - 30], u = k[d - 29], H = (c >>> 1 | u << 31) ^ (c >>> 8 | u << 24) ^ c >>> 7, L = (u >>> 1 | c << 31) ^ (u >>> 8 | c << 24) ^ (u >>> 7 | c << 25), c = k[d - 4], u = k[d - 3], I = (c >>> 19 | u << 13) ^ (u >>> 29 | c << 3) ^ c >>> 6, K = (u >>> 19 | c << 13) ^ (c >>> 29 | u << 3) ^ (u >>> 6 | c << 26), c = k[d - 32], u = k[d - 31], w = k[d - 14], C = k[d - 13], a = (C & 65535) + (u & 65535) + (L & 65535) + (K & 65535), i = (C >>> 16) + (u >>> 16) + (L >>> 16) + (K >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (H & 65535) + (I & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (H >>> 16) + (I >>> 16) + (s >>> 16), k[d] = F << 16 | s & 65535, k[d + 1] = i << 16 | a & 65535;
|
|
266
|
-
var W = e, J = l,
|
|
267
|
-
for (we =
|
|
268
|
-
H = (W >>> 28 | J << 4) ^ (J >>> 2 | W << 30) ^ (J >>> 7 | W << 25), L = (J >>> 28 | W << 4) ^ (W >>> 2 | J << 30) ^ (W >>> 7 | J << 25), I = ($ >>> 14 | G << 18) ^ ($ >>> 18 | G << 14) ^ (G >>> 9 | $ << 23), K = (G >>> 14 | $ << 18) ^ (G >>> 18 | $ << 14) ^ ($ >>> 9 | G << 23), ke = W &
|
|
269
|
-
a = (l & 65535) + (J & 65535), i = (l >>> 16) + (J >>> 16) + (a >>> 16), s = (e & 65535) + (W & 65535) + (i >>> 16), F = (e >>> 16) + (W >>> 16) + (s >>> 16), this.h0h = F << 16 | s & 65535, this.h0l = i << 16 | a & 65535, a = (x & 65535) + (
|
|
266
|
+
var W = e, J = l, T = h, U = x, P = m, q = o, V = f, Y = r, $ = v, G = y, X = z, Q = R, Z = _, ee = S, te = M, re = O;
|
|
267
|
+
for (we = T & P, Ce = U & q, d = 0; d < 160; d += 8)
|
|
268
|
+
H = (W >>> 28 | J << 4) ^ (J >>> 2 | W << 30) ^ (J >>> 7 | W << 25), L = (J >>> 28 | W << 4) ^ (W >>> 2 | J << 30) ^ (W >>> 7 | J << 25), I = ($ >>> 14 | G << 18) ^ ($ >>> 18 | G << 14) ^ (G >>> 9 | $ << 23), K = (G >>> 14 | $ << 18) ^ (G >>> 18 | $ << 14) ^ ($ >>> 9 | G << 23), ke = W & T, Be = J & U, oe = ke ^ W & P ^ we, le = Be ^ J & q ^ Ce, ne = $ & X ^ ~$ & Z, he = G & Q ^ ~G & ee, c = k[d], u = k[d + 1], w = Fe[d], C = Fe[d + 1], a = (C & 65535) + (u & 65535) + (he & 65535) + (K & 65535) + (re & 65535), i = (C >>> 16) + (u >>> 16) + (he >>> 16) + (K >>> 16) + (re >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (ne & 65535) + (I & 65535) + (te & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (ne >>> 16) + (I >>> 16) + (te >>> 16) + (s >>> 16), c = F << 16 | s & 65535, u = i << 16 | a & 65535, a = (le & 65535) + (L & 65535), i = (le >>> 16) + (L >>> 16) + (a >>> 16), s = (oe & 65535) + (H & 65535) + (i >>> 16), F = (oe >>> 16) + (H >>> 16) + (s >>> 16), w = F << 16 | s & 65535, C = i << 16 | a & 65535, a = (Y & 65535) + (u & 65535), i = (Y >>> 16) + (u >>> 16) + (a >>> 16), s = (V & 65535) + (c & 65535) + (i >>> 16), F = (V >>> 16) + (c >>> 16) + (s >>> 16), te = F << 16 | s & 65535, re = i << 16 | a & 65535, a = (C & 65535) + (u & 65535), i = (C >>> 16) + (u >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (s >>> 16), V = F << 16 | s & 65535, Y = i << 16 | a & 65535, H = (V >>> 28 | Y << 4) ^ (Y >>> 2 | V << 30) ^ (Y >>> 7 | V << 25), L = (Y >>> 28 | V << 4) ^ (V >>> 2 | Y << 30) ^ (V >>> 7 | Y << 25), I = (te >>> 14 | re << 18) ^ (te >>> 18 | re << 14) ^ (re >>> 9 | te << 23), K = (re >>> 14 | te << 18) ^ (re >>> 18 | te << 14) ^ (te >>> 9 | re << 23), Ae = V & W, Ee = Y & J, oe = Ae ^ V & T ^ ke, le = Ee ^ Y & U ^ Be, ne = te & $ ^ ~te & X, he = re & G ^ ~re & Q, c = k[d + 2], u = k[d + 3], w = Fe[d + 2], C = Fe[d + 3], a = (C & 65535) + (u & 65535) + (he & 65535) + (K & 65535) + (ee & 65535), i = (C >>> 16) + (u >>> 16) + (he >>> 16) + (K >>> 16) + (ee >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (ne & 65535) + (I & 65535) + (Z & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (ne >>> 16) + (I >>> 16) + (Z >>> 16) + (s >>> 16), c = F << 16 | s & 65535, u = i << 16 | a & 65535, a = (le & 65535) + (L & 65535), i = (le >>> 16) + (L >>> 16) + (a >>> 16), s = (oe & 65535) + (H & 65535) + (i >>> 16), F = (oe >>> 16) + (H >>> 16) + (s >>> 16), w = F << 16 | s & 65535, C = i << 16 | a & 65535, a = (q & 65535) + (u & 65535), i = (q >>> 16) + (u >>> 16) + (a >>> 16), s = (P & 65535) + (c & 65535) + (i >>> 16), F = (P >>> 16) + (c >>> 16) + (s >>> 16), Z = F << 16 | s & 65535, ee = i << 16 | a & 65535, a = (C & 65535) + (u & 65535), i = (C >>> 16) + (u >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (s >>> 16), P = F << 16 | s & 65535, q = i << 16 | a & 65535, H = (P >>> 28 | q << 4) ^ (q >>> 2 | P << 30) ^ (q >>> 7 | P << 25), L = (q >>> 28 | P << 4) ^ (P >>> 2 | q << 30) ^ (P >>> 7 | q << 25), I = (Z >>> 14 | ee << 18) ^ (Z >>> 18 | ee << 14) ^ (ee >>> 9 | Z << 23), K = (ee >>> 14 | Z << 18) ^ (ee >>> 18 | Z << 14) ^ (Z >>> 9 | ee << 23), De = P & V, Ne = q & Y, oe = De ^ P & W ^ Ae, le = Ne ^ q & J ^ Ee, ne = Z & te ^ ~Z & $, he = ee & re ^ ~ee & G, c = k[d + 4], u = k[d + 5], w = Fe[d + 4], C = Fe[d + 5], a = (C & 65535) + (u & 65535) + (he & 65535) + (K & 65535) + (Q & 65535), i = (C >>> 16) + (u >>> 16) + (he >>> 16) + (K >>> 16) + (Q >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (ne & 65535) + (I & 65535) + (X & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (ne >>> 16) + (I >>> 16) + (X >>> 16) + (s >>> 16), c = F << 16 | s & 65535, u = i << 16 | a & 65535, a = (le & 65535) + (L & 65535), i = (le >>> 16) + (L >>> 16) + (a >>> 16), s = (oe & 65535) + (H & 65535) + (i >>> 16), F = (oe >>> 16) + (H >>> 16) + (s >>> 16), w = F << 16 | s & 65535, C = i << 16 | a & 65535, a = (U & 65535) + (u & 65535), i = (U >>> 16) + (u >>> 16) + (a >>> 16), s = (T & 65535) + (c & 65535) + (i >>> 16), F = (T >>> 16) + (c >>> 16) + (s >>> 16), X = F << 16 | s & 65535, Q = i << 16 | a & 65535, a = (C & 65535) + (u & 65535), i = (C >>> 16) + (u >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (s >>> 16), T = F << 16 | s & 65535, U = i << 16 | a & 65535, H = (T >>> 28 | U << 4) ^ (U >>> 2 | T << 30) ^ (U >>> 7 | T << 25), L = (U >>> 28 | T << 4) ^ (T >>> 2 | U << 30) ^ (T >>> 7 | U << 25), I = (X >>> 14 | Q << 18) ^ (X >>> 18 | Q << 14) ^ (Q >>> 9 | X << 23), K = (Q >>> 14 | X << 18) ^ (Q >>> 18 | X << 14) ^ (X >>> 9 | Q << 23), we = T & P, Ce = U & q, oe = we ^ T & V ^ De, le = Ce ^ U & Y ^ Ne, ne = X & Z ^ ~X & te, he = Q & ee ^ ~Q & re, c = k[d + 6], u = k[d + 7], w = Fe[d + 6], C = Fe[d + 7], a = (C & 65535) + (u & 65535) + (he & 65535) + (K & 65535) + (G & 65535), i = (C >>> 16) + (u >>> 16) + (he >>> 16) + (K >>> 16) + (G >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (ne & 65535) + (I & 65535) + ($ & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (ne >>> 16) + (I >>> 16) + ($ >>> 16) + (s >>> 16), c = F << 16 | s & 65535, u = i << 16 | a & 65535, a = (le & 65535) + (L & 65535), i = (le >>> 16) + (L >>> 16) + (a >>> 16), s = (oe & 65535) + (H & 65535) + (i >>> 16), F = (oe >>> 16) + (H >>> 16) + (s >>> 16), w = F << 16 | s & 65535, C = i << 16 | a & 65535, a = (J & 65535) + (u & 65535), i = (J >>> 16) + (u >>> 16) + (a >>> 16), s = (W & 65535) + (c & 65535) + (i >>> 16), F = (W >>> 16) + (c >>> 16) + (s >>> 16), $ = F << 16 | s & 65535, G = i << 16 | a & 65535, a = (C & 65535) + (u & 65535), i = (C >>> 16) + (u >>> 16) + (a >>> 16), s = (w & 65535) + (c & 65535) + (i >>> 16), F = (w >>> 16) + (c >>> 16) + (s >>> 16), W = F << 16 | s & 65535, J = i << 16 | a & 65535;
|
|
269
|
+
a = (l & 65535) + (J & 65535), i = (l >>> 16) + (J >>> 16) + (a >>> 16), s = (e & 65535) + (W & 65535) + (i >>> 16), F = (e >>> 16) + (W >>> 16) + (s >>> 16), this.h0h = F << 16 | s & 65535, this.h0l = i << 16 | a & 65535, a = (x & 65535) + (U & 65535), i = (x >>> 16) + (U >>> 16) + (a >>> 16), s = (h & 65535) + (T & 65535) + (i >>> 16), F = (h >>> 16) + (T >>> 16) + (s >>> 16), this.h1h = F << 16 | s & 65535, this.h1l = i << 16 | a & 65535, a = (o & 65535) + (q & 65535), i = (o >>> 16) + (q >>> 16) + (a >>> 16), s = (m & 65535) + (P & 65535) + (i >>> 16), F = (m >>> 16) + (P >>> 16) + (s >>> 16), this.h2h = F << 16 | s & 65535, this.h2l = i << 16 | a & 65535, a = (r & 65535) + (Y & 65535), i = (r >>> 16) + (Y >>> 16) + (a >>> 16), s = (f & 65535) + (V & 65535) + (i >>> 16), F = (f >>> 16) + (V >>> 16) + (s >>> 16), this.h3h = F << 16 | s & 65535, this.h3l = i << 16 | a & 65535, a = (y & 65535) + (G & 65535), i = (y >>> 16) + (G >>> 16) + (a >>> 16), s = (v & 65535) + ($ & 65535) + (i >>> 16), F = (v >>> 16) + ($ >>> 16) + (s >>> 16), this.h4h = F << 16 | s & 65535, this.h4l = i << 16 | a & 65535, a = (R & 65535) + (Q & 65535), i = (R >>> 16) + (Q >>> 16) + (a >>> 16), s = (z & 65535) + (X & 65535) + (i >>> 16), F = (z >>> 16) + (X >>> 16) + (s >>> 16), this.h5h = F << 16 | s & 65535, this.h5l = i << 16 | a & 65535, a = (S & 65535) + (ee & 65535), i = (S >>> 16) + (ee >>> 16) + (a >>> 16), s = (_ & 65535) + (Z & 65535) + (i >>> 16), F = (_ >>> 16) + (Z >>> 16) + (s >>> 16), this.h6h = F << 16 | s & 65535, this.h6l = i << 16 | a & 65535, a = (O & 65535) + (re & 65535), i = (O >>> 16) + (re >>> 16) + (a >>> 16), s = (M & 65535) + (te & 65535) + (i >>> 16), F = (M >>> 16) + (te >>> 16) + (s >>> 16), this.h7h = F << 16 | s & 65535, this.h7l = i << 16 | a & 65535;
|
|
270
270
|
}, D.prototype.hex = function() {
|
|
271
271
|
this.finalize();
|
|
272
272
|
var e = this.h0h, l = this.h0l, h = this.h1h, x = this.h1l, m = this.h2h, o = this.h2l, f = this.h3h, r = this.h3l, v = this.h4h, y = this.h4l, z = this.h5h, R = this.h5l, _ = this.h6h, S = this.h6l, M = this.h7h, O = this.h7l, k = this.bits, d = t[e >> 28 & 15] + t[e >> 24 & 15] + t[e >> 20 & 15] + t[e >> 16 & 15] + t[e >> 12 & 15] + t[e >> 8 & 15] + t[e >> 4 & 15] + t[e & 15] + t[l >> 28 & 15] + t[l >> 24 & 15] + t[l >> 20 & 15] + t[l >> 16 & 15] + t[l >> 12 & 15] + t[l >> 8 & 15] + t[l >> 4 & 15] + t[l & 15] + t[h >> 28 & 15] + t[h >> 24 & 15] + t[h >> 20 & 15] + t[h >> 16 & 15] + t[h >> 12 & 15] + t[h >> 8 & 15] + t[h >> 4 & 15] + t[h & 15] + t[x >> 28 & 15] + t[x >> 24 & 15] + t[x >> 20 & 15] + t[x >> 16 & 15] + t[x >> 12 & 15] + t[x >> 8 & 15] + t[x >> 4 & 15] + t[x & 15] + t[m >> 28 & 15] + t[m >> 24 & 15] + t[m >> 20 & 15] + t[m >> 16 & 15] + t[m >> 12 & 15] + t[m >> 8 & 15] + t[m >> 4 & 15] + t[m & 15] + t[o >> 28 & 15] + t[o >> 24 & 15] + t[o >> 20 & 15] + t[o >> 16 & 15] + t[o >> 12 & 15] + t[o >> 8 & 15] + t[o >> 4 & 15] + t[o & 15] + t[f >> 28 & 15] + t[f >> 24 & 15] + t[f >> 20 & 15] + t[f >> 16 & 15] + t[f >> 12 & 15] + t[f >> 8 & 15] + t[f >> 4 & 15] + t[f & 15];
|
|
@@ -425,7 +425,7 @@ const Ge = /* @__PURE__ */ Ve($e);
|
|
|
425
425
|
function Xe(g) {
|
|
426
426
|
return Ge.sha512_256.array(g);
|
|
427
427
|
}
|
|
428
|
-
const _e = 32,
|
|
428
|
+
const _e = 32, Qe = [
|
|
429
429
|
"abandon",
|
|
430
430
|
"ability",
|
|
431
431
|
"able",
|
|
@@ -2486,29 +2486,30 @@ function Oe(g) {
|
|
|
2486
2486
|
}
|
|
2487
2487
|
return g.forEach(N), ae(), b;
|
|
2488
2488
|
}
|
|
2489
|
-
function
|
|
2490
|
-
return g.map((b) =>
|
|
2489
|
+
function Te(g) {
|
|
2490
|
+
return g.map((b) => Qe[b]);
|
|
2491
2491
|
}
|
|
2492
|
-
function
|
|
2492
|
+
function Ze(g) {
|
|
2493
2493
|
const b = Xe(g), E = Oe(b);
|
|
2494
|
-
return
|
|
2494
|
+
return Te(E)[0];
|
|
2495
2495
|
}
|
|
2496
2496
|
function et(g) {
|
|
2497
2497
|
if (g.length !== _e)
|
|
2498
2498
|
throw new RangeError(`Seed length must be ${_e}`);
|
|
2499
|
-
const b = Oe(g), E =
|
|
2499
|
+
const b = Oe(g), E = Te(b), A = Ze(g);
|
|
2500
2500
|
return `${E.join(" ")} ${A}`;
|
|
2501
2501
|
}
|
|
2502
2502
|
function tt(g) {
|
|
2503
2503
|
const b = g.slice(0, _e);
|
|
2504
2504
|
return et(b);
|
|
2505
2505
|
}
|
|
2506
|
+
new TextEncoder().encode("PQK");
|
|
2506
2507
|
const rt = 120;
|
|
2507
2508
|
function at({
|
|
2508
2509
|
onClose: g,
|
|
2509
2510
|
displayTimeout: b = rt
|
|
2510
2511
|
}) {
|
|
2511
|
-
const { withPrivateKey: E } = Ke(), [A, N] = ve("warning"), [ae, ce] = ve(null), [pe, ue] = ve(b), [t, ye] = ve(!1), [ie, Fe] = ve(null), [de, p] = ve("starting"), se = We(null), { refs: me, context: fe } =
|
|
2512
|
+
const { withPrivateKey: E } = Ke(), [A, N] = ve("warning"), [ae, ce] = ve(null), [pe, ue] = ve(b), [t, ye] = ve(!1), [ie, Fe] = ve(null), [de, p] = ve("starting"), se = We(null), { refs: me, context: fe } = Ue({
|
|
2512
2513
|
open: !0,
|
|
2513
2514
|
onOpenChange: (o) => {
|
|
2514
2515
|
o || e();
|