@gardenfi/utils 2.0.4 → 2.0.6
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/dist/index.cjs +1 -1
- package/dist/index.js +33 -24
- package/dist/index10.cjs +1 -1
- package/dist/index10.js +24 -32
- package/dist/index100.cjs +1 -0
- package/dist/index100.js +130 -0
- package/dist/index101.cjs +1 -0
- package/dist/index101.js +115 -0
- package/dist/index102.cjs +1 -0
- package/dist/index102.js +81 -0
- package/dist/index103.cjs +1 -0
- package/dist/index103.js +4 -0
- package/dist/index104.cjs +1 -0
- package/dist/index104.js +20 -0
- package/dist/index105.cjs +1 -0
- package/dist/index105.js +21 -0
- package/dist/index106.cjs +1 -0
- package/dist/index106.js +19 -0
- package/dist/index107.cjs +1 -0
- package/dist/index107.js +226 -0
- package/dist/index108.cjs +2 -0
- package/dist/index108.js +5 -0
- package/dist/index109.cjs +1 -0
- package/dist/index109.js +37 -0
- package/dist/index11.cjs +1 -1
- package/dist/index11.js +136 -14
- package/dist/index110.cjs +1 -0
- package/dist/index110.js +21 -0
- package/dist/index111.cjs +1 -0
- package/dist/index111.js +72 -0
- package/dist/index112.cjs +1 -0
- package/dist/index112.js +70 -0
- package/dist/index113.cjs +1 -0
- package/dist/index113.js +4 -0
- package/dist/index114.cjs +1 -0
- package/dist/index114.js +43 -0
- package/dist/index115.cjs +1 -0
- package/dist/index115.js +646 -0
- package/dist/index116.cjs +1 -0
- package/dist/index116.js +234 -0
- package/dist/index117.cjs +1 -0
- package/dist/index117.js +175 -0
- package/dist/index12.cjs +1 -1
- package/dist/index12.js +9 -182
- package/dist/index13.cjs +1 -1
- package/dist/index13.js +2 -94
- package/dist/index14.cjs +1 -16
- package/dist/index14.js +32 -112
- package/dist/index15.cjs +1 -1
- package/dist/index15.js +18 -31
- package/dist/index16.cjs +1 -1
- package/dist/index16.js +188 -31
- package/dist/index17.cjs +1 -1
- package/dist/index17.js +93 -17
- package/dist/index18.cjs +1 -1
- package/dist/index18.js +35 -7
- package/dist/index19.cjs +1 -1
- package/dist/index19.js +31 -20
- package/dist/index20.cjs +16 -1
- package/dist/index20.js +113 -21
- package/dist/index21.cjs +1 -1
- package/dist/index21.js +31 -9
- package/dist/index22.cjs +1 -1
- package/dist/index22.js +17 -31
- package/dist/index23.cjs +1 -1
- package/dist/index23.js +7 -26
- package/dist/index24.cjs +1 -1
- package/dist/index24.js +41 -19
- package/dist/index25.cjs +1 -1
- package/dist/index25.js +19 -49
- package/dist/index26.cjs +1 -1
- package/dist/index26.js +8 -12
- package/dist/index27.cjs +1 -1
- package/dist/index27.js +30 -23
- package/dist/index28.cjs +1 -1
- package/dist/index28.js +25 -74
- package/dist/index29.cjs +2 -1
- package/dist/index29.js +62 -20
- package/dist/index3.cjs +1 -1
- package/dist/index3.js +30 -7
- package/dist/index30.cjs +1 -1
- package/dist/index30.js +51 -7
- package/dist/index31.cjs +1 -1
- package/dist/index31.js +12 -32
- package/dist/index32.cjs +1 -1
- package/dist/index32.js +24 -15
- package/dist/index33.cjs +1 -1
- package/dist/index33.js +76 -2
- package/dist/index34.cjs +1 -1
- package/dist/index34.js +23 -8
- package/dist/index35.cjs +1 -1
- package/dist/index35.js +7 -20
- package/dist/index36.cjs +1 -1
- package/dist/index36.js +32 -12
- package/dist/index37.cjs +1 -1
- package/dist/index37.js +15 -34
- package/dist/index38.cjs +1 -2
- package/dist/index38.js +2 -60
- package/dist/index39.cjs +1 -1
- package/dist/index39.js +9 -2
- package/dist/index4.cjs +1 -1
- package/dist/index4.js +2 -2
- package/dist/index40.cjs +1 -1
- package/dist/index40.js +20 -4
- package/dist/index41.cjs +1 -1
- package/dist/index41.js +12 -11
- package/dist/index42.cjs +1 -1
- package/dist/index42.js +34 -3
- package/dist/index43.cjs +2 -1
- package/dist/index43.js +58 -20
- package/dist/index44.cjs +1 -1
- package/dist/index44.js +2 -13
- package/dist/index45.cjs +1 -1
- package/dist/index45.js +5 -54
- package/dist/index46.cjs +1 -1
- package/dist/index46.js +6 -6
- package/dist/index47.cjs +1 -1
- package/dist/index47.js +4 -21
- package/dist/index48.cjs +1 -1
- package/dist/index48.js +11 -11
- package/dist/index49.cjs +5 -1
- package/dist/index49.js +56 -3
- package/dist/index50.cjs +2 -1
- package/dist/index50.js +32 -9
- package/dist/index51.cjs +1 -1
- package/dist/index51.js +5 -19
- package/dist/index52.cjs +1 -1
- package/dist/index52.js +3 -6
- package/dist/index53.cjs +1 -1
- package/dist/index53.js +21 -8
- package/dist/index54.cjs +1 -1
- package/dist/index54.js +11 -103
- package/dist/index55.cjs +1 -1
- package/dist/index55.js +51 -24
- package/dist/index56.cjs +1 -1
- package/dist/index56.js +8 -18
- package/dist/index57.cjs +1 -1
- package/dist/index57.js +20 -37
- package/dist/index58.cjs +1 -0
- package/dist/index58.js +14 -0
- package/dist/index59.cjs +1 -0
- package/dist/index59.js +11 -0
- package/dist/index60.cjs +1 -0
- package/dist/index60.js +13 -0
- package/dist/index61.cjs +1 -0
- package/dist/index61.js +14 -0
- package/dist/index62.cjs +1 -0
- package/dist/index62.js +9 -0
- package/dist/index63.cjs +1 -0
- package/dist/index63.js +16 -0
- package/dist/index64.cjs +1 -0
- package/dist/index64.js +35 -0
- package/dist/index65.cjs +1 -0
- package/dist/index65.js +17 -0
- package/dist/index66.cjs +1 -0
- package/dist/index66.js +67 -0
- package/dist/index67.cjs +1 -0
- package/dist/index67.js +30 -0
- package/dist/index68.cjs +1 -0
- package/dist/index68.js +5 -0
- package/dist/index69.cjs +1 -0
- package/dist/index69.js +6 -0
- package/dist/index7.cjs +1 -1
- package/dist/index7.js +2 -109
- package/dist/index70.cjs +1 -0
- package/dist/index70.js +16 -0
- package/dist/index71.cjs +1 -0
- package/dist/index71.js +44 -0
- package/dist/index72.cjs +1 -0
- package/dist/index72.js +8 -0
- package/dist/index73.cjs +1 -0
- package/dist/index73.js +11 -0
- package/dist/index74.cjs +1 -0
- package/dist/index74.js +106 -0
- package/dist/index75.cjs +1 -0
- package/dist/index75.js +194 -0
- package/dist/index76.cjs +1 -0
- package/dist/index76.js +21 -0
- package/dist/index77.cjs +1 -0
- package/dist/index77.js +14 -0
- package/dist/index78.cjs +1 -0
- package/dist/index78.js +22 -0
- package/dist/index79.cjs +1 -0
- package/dist/index79.js +15 -0
- package/dist/index8.cjs +1 -1
- package/dist/index8.js +95 -10
- package/dist/index80.cjs +1 -0
- package/dist/index80.js +28 -0
- package/dist/index81.cjs +1 -0
- package/dist/index81.js +9 -0
- package/dist/index82.cjs +1 -0
- package/dist/index82.js +16 -0
- package/dist/index83.cjs +1 -0
- package/dist/index83.js +18 -0
- package/dist/index84.cjs +1 -0
- package/dist/index84.js +8 -0
- package/dist/index85.cjs +1 -0
- package/dist/index85.js +16 -0
- package/dist/index86.cjs +1 -0
- package/dist/index86.js +13 -0
- package/dist/index87.cjs +1 -0
- package/dist/index87.js +19 -0
- package/dist/index88.cjs +1 -0
- package/dist/index88.js +174 -0
- package/dist/index89.cjs +1 -0
- package/dist/index89.js +41 -0
- package/dist/index9.cjs +1 -1
- package/dist/index9.js +44 -2
- package/dist/index90.cjs +1 -0
- package/dist/index90.js +11 -0
- package/dist/index91.cjs +1 -0
- package/dist/index91.js +7 -0
- package/dist/index92.cjs +1 -0
- package/dist/index92.js +13 -0
- package/dist/index93.cjs +1 -0
- package/dist/index93.js +4 -0
- package/dist/index94.cjs +1 -0
- package/dist/index94.js +107 -0
- package/dist/index95.cjs +1 -0
- package/dist/index95.js +45 -0
- package/dist/index96.cjs +1 -0
- package/dist/index96.js +23 -0
- package/dist/index97.cjs +1 -0
- package/dist/index97.js +9 -0
- package/dist/index98.cjs +1 -0
- package/dist/index98.js +7 -0
- package/dist/index99.cjs +1 -0
- package/dist/index99.js +40 -0
- package/dist/src/lib/auth/apikey/apikey.d.ts +12 -0
- package/dist/src/lib/auth/auth.types.d.ts +21 -8
- package/dist/src/lib/auth/index.d.ts +5 -1
- package/dist/src/lib/auth/passkey/passkey.d.ts +10 -0
- package/dist/src/lib/auth/passkey/passkey.types.d.ts +17 -0
- package/dist/src/lib/auth/passkey/passkeyLogin.d.ts +37 -0
- package/dist/src/lib/auth/{siwe.d.ts → siwe/siwe.d.ts} +4 -15
- package/dist/src/lib/utils.d.ts +3 -0
- package/package.json +2 -1
package/dist/index17.js
CHANGED
|
@@ -1,20 +1,96 @@
|
|
|
1
|
-
import { BlockNotFoundError as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { BlockNotFoundError as A } from "./index23.js";
|
|
2
|
+
import { WaitForTransactionReceiptTimeoutError as M, TransactionNotFoundError as O, TransactionReceiptNotFoundError as W } from "./index29.js";
|
|
3
|
+
import { getAction as f } from "./index35.js";
|
|
4
|
+
import { observe as q } from "./index36.js";
|
|
5
|
+
import { withResolvers as z } from "./index39.js";
|
|
6
|
+
import { withRetry as v } from "./index40.js";
|
|
7
|
+
import { stringify as G } from "./index38.js";
|
|
8
|
+
import { getBlock as H } from "./index22.js";
|
|
9
|
+
import { getTransaction as J } from "./index28.js";
|
|
10
|
+
import { getTransactionReceipt as R } from "./index31.js";
|
|
11
|
+
import { watchBlockNumber as K } from "./index33.js";
|
|
12
|
+
async function D(o, {
|
|
13
|
+
confirmations: a = 1,
|
|
14
|
+
hash: m,
|
|
15
|
+
onReplaced: y,
|
|
16
|
+
pollingInterval: B = o.pollingInterval,
|
|
17
|
+
retryCount: k = 6,
|
|
18
|
+
retryDelay: N = ({ count: b }) => ~~(1 << b) * 200,
|
|
19
|
+
// exponential backoff
|
|
20
|
+
timeout: w = 18e4
|
|
21
|
+
}) {
|
|
22
|
+
const b = G(["waitForTransactionReceipt", o.uid, m]);
|
|
23
|
+
let c, n, r, i = !1;
|
|
24
|
+
const { promise: h, resolve: F, reject: g } = z(), E = w ? setTimeout(() => g(new M({ hash: m })), w) : void 0, _ = q(b, { onReplaced: y, resolve: F, reject: g }, (t) => {
|
|
25
|
+
const j = f(o, K, "watchBlockNumber")({
|
|
26
|
+
emitMissed: !0,
|
|
27
|
+
emitOnBegin: !0,
|
|
28
|
+
poll: !0,
|
|
29
|
+
pollingInterval: B,
|
|
30
|
+
async onBlockNumber(I) {
|
|
31
|
+
const l = (p) => {
|
|
32
|
+
clearTimeout(E), j(), p(), _();
|
|
33
|
+
};
|
|
34
|
+
let u = I;
|
|
35
|
+
if (!i)
|
|
36
|
+
try {
|
|
37
|
+
if (r) {
|
|
38
|
+
if (a > 1 && (!r.blockNumber || u - r.blockNumber + 1n < a))
|
|
39
|
+
return;
|
|
40
|
+
l(() => t.resolve(r));
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (c || (i = !0, await v(async () => {
|
|
44
|
+
c = await f(o, J, "getTransaction")({ hash: m }), c.blockNumber && (u = c.blockNumber);
|
|
45
|
+
}, {
|
|
46
|
+
delay: N,
|
|
47
|
+
retryCount: k
|
|
48
|
+
}), i = !1), r = await f(o, R, "getTransactionReceipt")({ hash: m }), a > 1 && (!r.blockNumber || u - r.blockNumber + 1n < a))
|
|
49
|
+
return;
|
|
50
|
+
l(() => t.resolve(r));
|
|
51
|
+
} catch (p) {
|
|
52
|
+
if (p instanceof O || p instanceof W) {
|
|
53
|
+
if (!c) {
|
|
54
|
+
i = !1;
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
n = c, i = !0;
|
|
59
|
+
const d = await v(() => f(o, H, "getBlock")({
|
|
60
|
+
blockNumber: u,
|
|
61
|
+
includeTransactions: !0
|
|
62
|
+
}), {
|
|
63
|
+
delay: N,
|
|
64
|
+
retryCount: k,
|
|
65
|
+
shouldRetry: ({ error: s }) => s instanceof A
|
|
66
|
+
});
|
|
67
|
+
i = !1;
|
|
68
|
+
const e = d.transactions.find(({ from: s, nonce: x }) => s === n.from && x === n.nonce);
|
|
69
|
+
if (!e || (r = await f(o, R, "getTransactionReceipt")({
|
|
70
|
+
hash: e.hash
|
|
71
|
+
}), a > 1 && (!r.blockNumber || u - r.blockNumber + 1n < a)))
|
|
72
|
+
return;
|
|
73
|
+
let T = "replaced";
|
|
74
|
+
e.to === n.to && e.value === n.value && e.input === n.input ? T = "repriced" : e.from === e.to && e.value === 0n && (T = "cancelled"), l(() => {
|
|
75
|
+
var s;
|
|
76
|
+
(s = t.onReplaced) == null || s.call(t, {
|
|
77
|
+
reason: T,
|
|
78
|
+
replacedTransaction: n,
|
|
79
|
+
transaction: e,
|
|
80
|
+
transactionReceipt: r
|
|
81
|
+
}), t.resolve(r);
|
|
82
|
+
});
|
|
83
|
+
} catch (d) {
|
|
84
|
+
l(() => t.reject(d));
|
|
85
|
+
}
|
|
86
|
+
} else
|
|
87
|
+
l(() => t.reject(p));
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
return h;
|
|
17
93
|
}
|
|
18
94
|
export {
|
|
19
|
-
|
|
95
|
+
D as waitForTransactionReceipt
|
|
20
96
|
};
|
package/dist/index18.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index71.cjs"),u=require("./index24.cjs"),a=require("./index80.cjs"),g=require("./index81.cjs"),y=require("./index82.cjs"),d=require("./index83.cjs"),l=require("./index84.cjs"),T=require("./index85.cjs"),p=require("./index86.cjs");function q(e,t={}){const{nonceManager:c}=t,s=u.toHex(i.secp256k1.getPublicKey(e.slice(2),!1)),r=g.publicKeyToAddress(s);return{...a.toAccount({address:r,nonceManager:c,async sign({hash:n}){return y.sign({hash:n,privateKey:e,to:"hex"})},async experimental_signAuthorization(n){return d.experimental_signAuthorization({...n,privateKey:e})},async signMessage({message:n}){return l.signMessage({message:n,privateKey:e})},async signTransaction(n,{serializer:o}={}){return T.signTransaction({privateKey:e,transaction:n,serializer:o})},async signTypedData(n){return p.signTypedData({...n,privateKey:e})}}),publicKey:s,source:"privateKey"}}exports.privateKeyToAccount=q;
|
package/dist/index18.js
CHANGED
|
@@ -1,10 +1,38 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { secp256k1 as e } from "./index71.js";
|
|
2
|
+
import { toHex as a } from "./index24.js";
|
|
3
|
+
import { toAccount as m } from "./index80.js";
|
|
4
|
+
import { publicKeyToAddress as u } from "./index81.js";
|
|
5
|
+
import { sign as g } from "./index82.js";
|
|
6
|
+
import { experimental_signAuthorization as p } from "./index83.js";
|
|
7
|
+
import { signMessage as f } from "./index84.js";
|
|
8
|
+
import { signTransaction as l } from "./index85.js";
|
|
9
|
+
import { signTypedData as y } from "./index86.js";
|
|
10
|
+
function k(o, t = {}) {
|
|
11
|
+
const { nonceManager: s } = t, r = a(e.getPublicKey(o.slice(2), !1)), i = u(r);
|
|
12
|
+
return {
|
|
13
|
+
...m({
|
|
14
|
+
address: i,
|
|
15
|
+
nonceManager: s,
|
|
16
|
+
async sign({ hash: n }) {
|
|
17
|
+
return g({ hash: n, privateKey: o, to: "hex" });
|
|
18
|
+
},
|
|
19
|
+
async experimental_signAuthorization(n) {
|
|
20
|
+
return p({ ...n, privateKey: o });
|
|
21
|
+
},
|
|
22
|
+
async signMessage({ message: n }) {
|
|
23
|
+
return f({ message: n, privateKey: o });
|
|
24
|
+
},
|
|
25
|
+
async signTransaction(n, { serializer: c } = {}) {
|
|
26
|
+
return l({ privateKey: o, transaction: n, serializer: c });
|
|
27
|
+
},
|
|
28
|
+
async signTypedData(n) {
|
|
29
|
+
return y({ ...n, privateKey: o });
|
|
30
|
+
}
|
|
31
|
+
}),
|
|
32
|
+
publicKey: r,
|
|
33
|
+
source: "privateKey"
|
|
34
|
+
};
|
|
7
35
|
}
|
|
8
36
|
export {
|
|
9
|
-
|
|
37
|
+
k as privateKeyToAccount
|
|
10
38
|
};
|
package/dist/index19.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index90.cjs"),t=e.defineChain({id:1,name:"Ethereum",nativeCurrency:{name:"Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://eth.merkle.io"]}},blockExplorers:{default:{name:"Etherscan",url:"https://etherscan.io",apiUrl:"https://api.etherscan.io/api"}},contracts:{ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xce01f8eee7E479C928F8919abD53E553a36CeF67",blockCreated:19258213},multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:14353601}}});exports.mainnet=t;
|
package/dist/index19.js
CHANGED
|
@@ -1,23 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
1
|
+
import { defineChain as e } from "./index90.js";
|
|
2
|
+
const t = /* @__PURE__ */ e({
|
|
3
|
+
id: 1,
|
|
4
|
+
name: "Ethereum",
|
|
5
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
6
|
+
rpcUrls: {
|
|
7
|
+
default: {
|
|
8
|
+
http: ["https://eth.merkle.io"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
blockExplorers: {
|
|
12
|
+
default: {
|
|
13
|
+
name: "Etherscan",
|
|
14
|
+
url: "https://etherscan.io",
|
|
15
|
+
apiUrl: "https://api.etherscan.io/api"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
contracts: {
|
|
19
|
+
ensRegistry: {
|
|
20
|
+
address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
|
|
21
|
+
},
|
|
22
|
+
ensUniversalResolver: {
|
|
23
|
+
address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
|
|
24
|
+
blockCreated: 19258213
|
|
25
|
+
},
|
|
26
|
+
multicall3: {
|
|
27
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
28
|
+
blockCreated: 14353601
|
|
29
|
+
}
|
|
17
30
|
}
|
|
18
|
-
|
|
19
|
-
return t ? u(g, { size: t }) : g;
|
|
20
|
-
}
|
|
31
|
+
});
|
|
21
32
|
export {
|
|
22
|
-
|
|
33
|
+
t as mainnet
|
|
23
34
|
};
|
package/dist/index20.cjs
CHANGED
|
@@ -1 +1,16 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index77.cjs"),M=require("./index53.cjs"),h=require("./index78.cjs");function R(r){const{chainId:o,domain:s,expirationTime:l,issuedAt:m=new Date,nonce:a,notBefore:f,requestId:w,resources:g,scheme:i,uri:c,version:d}=r;{if(o!==Math.floor(o))throw new e.SiweInvalidMessageFieldError({field:"chainId",metaMessages:["- Chain ID must be a EIP-155 chain ID.","- See https://eips.ethereum.org/EIPS/eip-155","",`Provided value: ${o}`]});if(!(E.test(s)||F.test(s)||b.test(s)))throw new e.SiweInvalidMessageFieldError({field:"domain",metaMessages:["- Domain must be an RFC 3986 authority.","- See https://www.rfc-editor.org/rfc/rfc3986","",`Provided value: ${s}`]});if(!A.test(a))throw new e.SiweInvalidMessageFieldError({field:"nonce",metaMessages:["- Nonce must be at least 8 characters.","- Nonce must be alphanumeric.","",`Provided value: ${a}`]});if(!h.isUri(c))throw new e.SiweInvalidMessageFieldError({field:"uri",metaMessages:["- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.","- See https://www.rfc-editor.org/rfc/rfc3986","",`Provided value: ${c}`]});if(d!=="1")throw new e.SiweInvalidMessageFieldError({field:"version",metaMessages:["- Version must be '1'.","",`Provided value: ${d}`]});if(i&&!P.test(i))throw new e.SiweInvalidMessageFieldError({field:"scheme",metaMessages:["- Scheme must be an RFC 3986 URI scheme.","- See https://www.rfc-editor.org/rfc/rfc3986#section-3.1","",`Provided value: ${i}`]});const t=r.statement;if(t!=null&&t.includes(`
|
|
2
|
+
`))throw new e.SiweInvalidMessageFieldError({field:"statement",metaMessages:["- Statement must not include '\\n'.","",`Provided value: ${t}`]})}const $=M.getAddress(r.address),v=i?`${i}://${s}`:s,I=r.statement?`${r.statement}
|
|
3
|
+
`:"",S=`${v} wants you to sign in with your Ethereum account:
|
|
4
|
+
${$}
|
|
5
|
+
|
|
6
|
+
${I}`;let n=`URI: ${c}
|
|
7
|
+
Version: ${d}
|
|
8
|
+
Chain ID: ${o}
|
|
9
|
+
Nonce: ${a}
|
|
10
|
+
Issued At: ${m.toISOString()}`;if(l&&(n+=`
|
|
11
|
+
Expiration Time: ${l.toISOString()}`),f&&(n+=`
|
|
12
|
+
Not Before: ${f.toISOString()}`),w&&(n+=`
|
|
13
|
+
Request ID: ${w}`),g){let t=`
|
|
14
|
+
Resources:`;for(const u of g){if(!h.isUri(u))throw new e.SiweInvalidMessageFieldError({field:"resources",metaMessages:["- Every resource must be a RFC 3986 URI.","- See https://www.rfc-editor.org/rfc/rfc3986","",`Provided value: ${u}`]});t+=`
|
|
15
|
+
- ${u}`}n+=t}return`${S}
|
|
16
|
+
${n}`}const E=/^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/,F=/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/,b=/^localhost(:[0-9]{1,5})?$/,A=/^[a-zA-Z0-9]{8,}$/,P=/^([a-zA-Z][a-zA-Z0-9+-.]*)$/;exports.createSiweMessage=R;
|
package/dist/index20.js
CHANGED
|
@@ -1,24 +1,116 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { SiweInvalidMessageFieldError as e } from "./index77.js";
|
|
2
|
+
import { getAddress as S } from "./index53.js";
|
|
3
|
+
import { isUri as $ } from "./index78.js";
|
|
4
|
+
function C(n) {
|
|
5
|
+
const { chainId: i, domain: s, expirationTime: u, issuedAt: g = /* @__PURE__ */ new Date(), nonce: a, notBefore: m, requestId: h, resources: w, scheme: o, uri: c, version: f } = n;
|
|
6
|
+
{
|
|
7
|
+
if (i !== Math.floor(i))
|
|
8
|
+
throw new e({
|
|
9
|
+
field: "chainId",
|
|
10
|
+
metaMessages: [
|
|
11
|
+
"- Chain ID must be a EIP-155 chain ID.",
|
|
12
|
+
"- See https://eips.ethereum.org/EIPS/eip-155",
|
|
13
|
+
"",
|
|
14
|
+
`Provided value: ${i}`
|
|
15
|
+
]
|
|
16
|
+
});
|
|
17
|
+
if (!(p.test(s) || M.test(s) || x.test(s)))
|
|
18
|
+
throw new e({
|
|
19
|
+
field: "domain",
|
|
20
|
+
metaMessages: [
|
|
21
|
+
"- Domain must be an RFC 3986 authority.",
|
|
22
|
+
"- See https://www.rfc-editor.org/rfc/rfc3986",
|
|
23
|
+
"",
|
|
24
|
+
`Provided value: ${s}`
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
if (!A.test(a))
|
|
28
|
+
throw new e({
|
|
29
|
+
field: "nonce",
|
|
30
|
+
metaMessages: [
|
|
31
|
+
"- Nonce must be at least 8 characters.",
|
|
32
|
+
"- Nonce must be alphanumeric.",
|
|
33
|
+
"",
|
|
34
|
+
`Provided value: ${a}`
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
if (!$(c))
|
|
38
|
+
throw new e({
|
|
39
|
+
field: "uri",
|
|
40
|
+
metaMessages: [
|
|
41
|
+
"- URI must be a RFC 3986 URI referring to the resource that is the subject of the signing.",
|
|
42
|
+
"- See https://www.rfc-editor.org/rfc/rfc3986",
|
|
43
|
+
"",
|
|
44
|
+
`Provided value: ${c}`
|
|
45
|
+
]
|
|
46
|
+
});
|
|
47
|
+
if (f !== "1")
|
|
48
|
+
throw new e({
|
|
49
|
+
field: "version",
|
|
50
|
+
metaMessages: [
|
|
51
|
+
"- Version must be '1'.",
|
|
52
|
+
"",
|
|
53
|
+
`Provided value: ${f}`
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
if (o && !P.test(o))
|
|
57
|
+
throw new e({
|
|
58
|
+
field: "scheme",
|
|
59
|
+
metaMessages: [
|
|
60
|
+
"- Scheme must be an RFC 3986 URI scheme.",
|
|
61
|
+
"- See https://www.rfc-editor.org/rfc/rfc3986#section-3.1",
|
|
62
|
+
"",
|
|
63
|
+
`Provided value: ${o}`
|
|
64
|
+
]
|
|
65
|
+
});
|
|
66
|
+
const t = n.statement;
|
|
67
|
+
if (t != null && t.includes(`
|
|
68
|
+
`))
|
|
69
|
+
throw new e({
|
|
70
|
+
field: "statement",
|
|
71
|
+
metaMessages: [
|
|
72
|
+
"- Statement must not include '\\n'.",
|
|
73
|
+
"",
|
|
74
|
+
`Provided value: ${t}`
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
const l = S(n.address), v = o ? `${o}://${s}` : s, I = n.statement ? `${n.statement}
|
|
79
|
+
` : "", R = `${v} wants you to sign in with your Ethereum account:
|
|
80
|
+
${l}
|
|
81
|
+
|
|
82
|
+
${I}`;
|
|
83
|
+
let r = `URI: ${c}
|
|
84
|
+
Version: ${f}
|
|
85
|
+
Chain ID: ${i}
|
|
86
|
+
Nonce: ${a}
|
|
87
|
+
Issued At: ${g.toISOString()}`;
|
|
88
|
+
if (u && (r += `
|
|
89
|
+
Expiration Time: ${u.toISOString()}`), m && (r += `
|
|
90
|
+
Not Before: ${m.toISOString()}`), h && (r += `
|
|
91
|
+
Request ID: ${h}`), w) {
|
|
92
|
+
let t = `
|
|
93
|
+
Resources:`;
|
|
94
|
+
for (const d of w) {
|
|
95
|
+
if (!$(d))
|
|
96
|
+
throw new e({
|
|
97
|
+
field: "resources",
|
|
98
|
+
metaMessages: [
|
|
99
|
+
"- Every resource must be a RFC 3986 URI.",
|
|
100
|
+
"- See https://www.rfc-editor.org/rfc/rfc3986",
|
|
101
|
+
"",
|
|
102
|
+
`Provided value: ${d}`
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
t += `
|
|
106
|
+
- ${d}`;
|
|
107
|
+
}
|
|
108
|
+
r += t;
|
|
109
|
+
}
|
|
110
|
+
return `${R}
|
|
111
|
+
${r}`;
|
|
21
112
|
}
|
|
113
|
+
const p = /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}(:[0-9]{1,5})?$/, M = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(:[0-9]{1,5})?$/, x = /^localhost(:[0-9]{1,5})?$/, A = /^[a-zA-Z0-9]{8,}$/, P = /^([a-zA-Z][a-zA-Z0-9+-.]*)$/;
|
|
22
114
|
export {
|
|
23
|
-
|
|
115
|
+
C as createSiweMessage
|
|
24
116
|
};
|
package/dist/index21.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index90.cjs"),a=e.defineChain({id:11155111,name:"Sepolia",nativeCurrency:{name:"Sepolia Ether",symbol:"ETH",decimals:18},rpcUrls:{default:{http:["https://sepolia.drpc.org"]}},blockExplorers:{default:{name:"Etherscan",url:"https://sepolia.etherscan.io",apiUrl:"https://api-sepolia.etherscan.io/api"}},contracts:{multicall3:{address:"0xca11bde05977b3631167028862be2a173976ca11",blockCreated:751532},ensRegistry:{address:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"},ensUniversalResolver:{address:"0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",blockCreated:5317080}},testnet:!0});exports.sepolia=a;
|
package/dist/index21.js
CHANGED
|
@@ -1,11 +1,33 @@
|
|
|
1
|
-
import {
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { defineChain as e } from "./index90.js";
|
|
2
|
+
const s = /* @__PURE__ */ e({
|
|
3
|
+
id: 11155111,
|
|
4
|
+
name: "Sepolia",
|
|
5
|
+
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
6
|
+
rpcUrls: {
|
|
7
|
+
default: {
|
|
8
|
+
http: ["https://sepolia.drpc.org"]
|
|
9
|
+
}
|
|
10
|
+
},
|
|
11
|
+
blockExplorers: {
|
|
12
|
+
default: {
|
|
13
|
+
name: "Etherscan",
|
|
14
|
+
url: "https://sepolia.etherscan.io",
|
|
15
|
+
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
contracts: {
|
|
19
|
+
multicall3: {
|
|
20
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
21
|
+
blockCreated: 751532
|
|
22
|
+
},
|
|
23
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
24
|
+
ensUniversalResolver: {
|
|
25
|
+
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
26
|
+
blockCreated: 5317080
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
testnet: !0
|
|
30
|
+
});
|
|
9
31
|
export {
|
|
10
|
-
|
|
32
|
+
s as sepolia
|
|
11
33
|
};
|
package/dist/index22.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./index23.cjs"),m=require("./index24.cjs"),k=require("./index25.cjs");async function B(t,{blockHash:o,blockNumber:r,blockTag:l,includeTransactions:i}={}){var c,s,u;const d=l??"latest",n=i??!1,a=r!==void 0?m.numberToHex(r):void 0;let e=null;if(o?e=await t.request({method:"eth_getBlockByHash",params:[o,n]},{dedupe:!0}):e=await t.request({method:"eth_getBlockByNumber",params:[a||d,n]},{dedupe:!!a}),!e)throw new f.BlockNotFoundError({blockHash:o,blockNumber:r});return(((u=(s=(c=t.chain)==null?void 0:c.formatters)==null?void 0:s.block)==null?void 0:u.format)||k.formatBlock)(e)}exports.getBlock=B;
|
package/dist/index22.js
CHANGED
|
@@ -1,34 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
const e = p(a), s = e.response.get();
|
|
18
|
-
if (s && n > 0 && (/* @__PURE__ */ new Date()).getTime() - s.created.getTime() < n)
|
|
19
|
-
return s.data;
|
|
20
|
-
let t = e.promise.get();
|
|
21
|
-
t || (t = o(), e.promise.set(t));
|
|
22
|
-
try {
|
|
23
|
-
const r = await t;
|
|
24
|
-
return e.response.set({ created: /* @__PURE__ */ new Date(), data: r }), r;
|
|
25
|
-
} finally {
|
|
26
|
-
e.promise.clear();
|
|
27
|
-
}
|
|
1
|
+
import { BlockNotFoundError as i } from "./index23.js";
|
|
2
|
+
import { numberToHex as l } from "./index24.js";
|
|
3
|
+
import { formatBlock as p } from "./index25.js";
|
|
4
|
+
async function T(e, { blockHash: t, blockNumber: r, blockTag: f, includeTransactions: u } = {}) {
|
|
5
|
+
var m, s, c;
|
|
6
|
+
const d = f ?? "latest", a = u ?? !1, n = r !== void 0 ? l(r) : void 0;
|
|
7
|
+
let o = null;
|
|
8
|
+
if (t ? o = await e.request({
|
|
9
|
+
method: "eth_getBlockByHash",
|
|
10
|
+
params: [t, a]
|
|
11
|
+
}, { dedupe: !0 }) : o = await e.request({
|
|
12
|
+
method: "eth_getBlockByNumber",
|
|
13
|
+
params: [n || d, a]
|
|
14
|
+
}, { dedupe: !!n }), !o)
|
|
15
|
+
throw new i({ blockHash: t, blockNumber: r });
|
|
16
|
+
return (((c = (s = (m = e.chain) == null ? void 0 : m.formatters) == null ? void 0 : s.block) == null ? void 0 : c.format) || p)(o);
|
|
28
17
|
}
|
|
29
18
|
export {
|
|
30
|
-
|
|
31
|
-
i as promiseCache,
|
|
32
|
-
c as responseCache,
|
|
33
|
-
l as withCache
|
|
19
|
+
T as getBlock
|
|
34
20
|
};
|
package/dist/index23.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index43.cjs");class n extends t.BaseError{constructor({blockHash:r,blockNumber:e}){let o="Block";r&&(o=`Block at hash "${r}"`),e&&(o=`Block at number "${e}"`),super(`${o} could not be found.`,{name:"BlockNotFoundError"})}}exports.BlockNotFoundError=n;
|
package/dist/index23.js
CHANGED
|
@@ -1,29 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
let t = null;
|
|
8
|
-
if (o ? t = await e.request({
|
|
9
|
-
method: "eth_getTransactionByHash",
|
|
10
|
-
params: [o]
|
|
11
|
-
}, { dedupe: !0 }) : a ? t = await e.request({
|
|
12
|
-
method: "eth_getTransactionByBlockHashAndIndex",
|
|
13
|
-
params: [a, i(n)]
|
|
14
|
-
}, { dedupe: !0 }) : (m || s) && (t = await e.request({
|
|
15
|
-
method: "eth_getTransactionByBlockNumberAndIndex",
|
|
16
|
-
params: [m || s, i(n)]
|
|
17
|
-
}, { dedupe: !!m })), !t)
|
|
18
|
-
throw new p({
|
|
19
|
-
blockHash: a,
|
|
20
|
-
blockNumber: r,
|
|
21
|
-
blockTag: s,
|
|
22
|
-
hash: o,
|
|
23
|
-
index: n
|
|
24
|
-
});
|
|
25
|
-
return (((u = (f = (d = e.chain) == null ? void 0 : d.formatters) == null ? void 0 : f.transaction) == null ? void 0 : u.format) || T)(t);
|
|
1
|
+
import { BaseError as e } from "./index43.js";
|
|
2
|
+
class d extends e {
|
|
3
|
+
constructor({ blockHash: r, blockNumber: t }) {
|
|
4
|
+
let o = "Block";
|
|
5
|
+
r && (o = `Block at hash "${r}"`), t && (o = `Block at number "${t}"`), super(`${o} could not be found.`, { name: "BlockNotFoundError" });
|
|
6
|
+
}
|
|
26
7
|
}
|
|
27
8
|
export {
|
|
28
|
-
|
|
9
|
+
d as BlockNotFoundError
|
|
29
10
|
};
|
package/dist/index24.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./index41.cjs"),f=require("./index42.cjs"),x=require("./index34.cjs"),z=Array.from({length:256},(e,n)=>n.toString(16).padStart(2,"0"));function H(e,n={}){return typeof e=="number"||typeof e=="bigint"?d(e,n):typeof e=="string"?m(e,n):typeof e=="boolean"?b(e,n):u(e,n)}function b(e,n={}){const t=`0x${Number(e)}`;return typeof n.size=="number"?(x.assertSize(t,{size:n.size}),f.pad(t,{size:n.size})):t}function u(e,n={}){let t="";for(let i=0;i<e.length;i++)t+=z[e[i]];const r=`0x${t}`;return typeof n.size=="number"?(x.assertSize(r,{size:n.size}),f.pad(r,{dir:"right",size:n.size})):r}function d(e,n={}){const{signed:t,size:r}=n,i=BigInt(e);let o;r?t?o=(1n<<BigInt(r)*8n-1n)-1n:o=2n**(BigInt(r)*8n)-1n:typeof e=="number"&&(o=BigInt(Number.MAX_SAFE_INTEGER));const c=typeof o=="bigint"&&t?-o-1n:0;if(o&&i>o||i<c){const s=typeof e=="bigint"?"n":"";throw new y.IntegerOutOfRangeError({max:o?`${o}${s}`:void 0,min:`${c}${s}`,signed:t,size:r,value:`${e}${s}`})}const g=`0x${(t&&i<0?(1n<<BigInt(r*8))+BigInt(i):i).toString(16)}`;return r?f.pad(g,{size:r}):g}const T=new TextEncoder;function m(e,n={}){const t=T.encode(e);return u(t,n)}exports.boolToHex=b;exports.bytesToHex=u;exports.numberToHex=d;exports.stringToHex=m;exports.toHex=H;
|
package/dist/index24.js
CHANGED
|
@@ -1,26 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { IntegerOutOfRangeError as x } from "./index41.js";
|
|
2
|
+
import { pad as s } from "./index42.js";
|
|
3
|
+
import { assertSize as c } from "./index34.js";
|
|
4
|
+
const b = /* @__PURE__ */ Array.from({ length: 256 }, (n, e) => e.toString(16).padStart(2, "0"));
|
|
5
|
+
function B(n, e = {}) {
|
|
6
|
+
return typeof n == "number" || typeof n == "bigint" ? y(n, e) : typeof n == "string" ? $(n, e) : typeof n == "boolean" ? z(n, e) : m(n, e);
|
|
7
|
+
}
|
|
8
|
+
function z(n, e = {}) {
|
|
9
|
+
const t = `0x${Number(n)}`;
|
|
10
|
+
return typeof e.size == "number" ? (c(t, { size: e.size }), s(t, { size: e.size })) : t;
|
|
9
11
|
}
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
function m(n, e = {}) {
|
|
13
|
+
let t = "";
|
|
14
|
+
for (let i = 0; i < n.length; i++)
|
|
15
|
+
t += b[n[i]];
|
|
16
|
+
const r = `0x${t}`;
|
|
17
|
+
return typeof e.size == "number" ? (c(r, { size: e.size }), s(r, { dir: "right", size: e.size })) : r;
|
|
18
|
+
}
|
|
19
|
+
function y(n, e = {}) {
|
|
20
|
+
const { signed: t, size: r } = e, i = BigInt(n);
|
|
21
|
+
let o;
|
|
22
|
+
r ? t ? o = (1n << BigInt(r) * 8n - 1n) - 1n : o = 2n ** (BigInt(r) * 8n) - 1n : typeof n == "number" && (o = BigInt(Number.MAX_SAFE_INTEGER));
|
|
23
|
+
const g = typeof o == "bigint" && t ? -o - 1n : 0;
|
|
24
|
+
if (o && i > o || i < g) {
|
|
25
|
+
const f = typeof n == "bigint" ? "n" : "";
|
|
26
|
+
throw new x({
|
|
27
|
+
max: o ? `${o}${f}` : void 0,
|
|
28
|
+
min: `${g}${f}`,
|
|
29
|
+
signed: t,
|
|
30
|
+
size: r,
|
|
31
|
+
value: `${n}${f}`
|
|
14
32
|
});
|
|
15
33
|
}
|
|
34
|
+
const u = `0x${(t && i < 0 ? (1n << BigInt(r * 8)) + BigInt(i) : i).toString(16)}`;
|
|
35
|
+
return r ? s(u, { size: r }) : u;
|
|
16
36
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
37
|
+
const d = /* @__PURE__ */ new TextEncoder();
|
|
38
|
+
function $(n, e = {}) {
|
|
39
|
+
const t = d.encode(n);
|
|
40
|
+
return m(t, e);
|
|
21
41
|
}
|
|
22
42
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
43
|
+
z as boolToHex,
|
|
44
|
+
m as bytesToHex,
|
|
45
|
+
y as numberToHex,
|
|
46
|
+
$ as stringToHex,
|
|
47
|
+
B as toHex
|
|
26
48
|
};
|