@springmicro/auth 0.1.9 → 0.2.0-alpha.1
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-652aeb8c-BTQ1rBi7.js +2818 -0
- package/dist/Index-c419311f-BOZhAAW3.js +1054 -0
- package/dist/Web3Auth-hACKSouN.js +32769 -0
- package/dist/alphawallet-B7eovdf-.js +26 -0
- package/dist/apexwallet-ysP20G9D.js +93 -0
- package/dist/atoken-BBnNTzcz.js +27 -0
- package/dist/bifrostwallet-CNNBO92h.js +11 -0
- package/dist/binance-DvPgAzCw.js +14 -0
- package/dist/bitget-DZOUrwgy.js +4 -0
- package/dist/bitpie-C_uxmEzw.js +25 -0
- package/dist/bitski-DpzkHNkv.js +4 -0
- package/dist/blockwallet-BL69cqkA.js +8 -0
- package/dist/brave-DnRzMQYW.js +35 -0
- package/dist/ccip-c78d2f16-DLcRlwod.js +165 -0
- package/dist/coin98wallet-CkFdOvXt.js +4 -0
- package/dist/coinbase-CaGNx5if.js +9 -0
- package/dist/core-9rK8tWud.js +7 -0
- package/dist/defiwallet-0AsgJBSy.js +10 -0
- package/dist/detected-CX_JZaUk.js +6 -0
- package/dist/echooo-CmaetT_Z.js +14 -0
- package/dist/enkrypt-BibtwvK7.js +20 -0
- package/dist/exodus-BxzkDWWP.js +4 -0
- package/dist/fordefi-CvKyVwhI.js +6 -0
- package/dist/foxwallet-D7c_LDTf.js +4 -0
- package/dist/frame-CDfNmjUy.js +7 -0
- package/dist/frontier-DqKNSj2z.js +8 -0
- package/dist/huobiwallet-CxSwqa5L.js +14 -0
- package/dist/hyperpay-nmHE3WqM.js +7 -0
- package/dist/icon-2Zqy7pqQ.js +8 -0
- package/dist/icon-CGWI1Ies.js +43 -0
- package/dist/icon-C_O4nprO.js +9 -0
- package/dist/icon-DbgmZCnU.js +9 -0
- package/dist/icon-cAd7RhSC.js +9 -0
- package/dist/icon-duCa3gfT.js +11 -0
- package/dist/imtoken-yENtOTS3.js +17 -0
- package/dist/index-021f6a62-Zz543EDB.js +2583 -0
- package/dist/index-40a497ea-Bn2mC0r7.js +1010 -0
- package/dist/index-BHkXn9Ss.js +4010 -0
- package/dist/index-BaYEABY7.js +7089 -0
- package/dist/index-BtLU53lm.js +6023 -0
- package/dist/index-CynP9H3X.js +6188 -0
- package/dist/index-Dg8m-Szw.js +31 -0
- package/dist/index-Dt6M8ha9.js +161 -0
- package/dist/index-DtJfAdfq.js +5822 -0
- package/dist/index-klU8YB0c.js +1983 -0
- package/dist/index.d.ts +124 -0
- package/dist/index.js +5 -43
- package/dist/index.umd.cjs +1937 -1
- package/dist/infinitywallet-C8J4FUYw.js +42 -0
- package/dist/kayros-AIrUK1za.js +27 -0
- package/dist/lif3wallet-C5D6r8pg.js +41 -0
- package/dist/liquality-nbCtErVq.js +16 -0
- package/dist/mathwallet-CWkivCXo.js +50 -0
- package/dist/meetone-kKmvI8md.js +13 -0
- package/dist/metamask-BN7yiDV1.js +64 -0
- package/dist/mykey-CQZ6UcLH.js +13 -0
- package/dist/number-BXHWhlom.js +1529 -0
- package/dist/okxwallet-CJLVogh2.js +8 -0
- package/dist/oneInch-CciyZ4Pz.js +72 -0
- package/dist/onekey-Dal8kYjU.js +9 -0
- package/dist/opera-DnKg-TJU.js +24 -0
- package/dist/ownbit-BshJUVuW.js +18 -0
- package/dist/phantom-CJ8dIcov.js +35 -0
- package/dist/rabby-D4thTcd6.js +27 -0
- package/dist/rainbow-mXld6yWV.js +69 -0
- package/dist/roninwallet-ZyYrd-D1.js +9 -0
- package/dist/safeheron-Eg1Jb29V.js +23 -0
- package/dist/safepal-DVIKy94N.js +105 -0
- package/dist/sequence-BS2IbtDg.js +70 -0
- package/dist/stablewallet-jyB079Wb.js +20 -0
- package/dist/status-FrAvQjfn.js +4 -0
- package/dist/subwallet-DMvFqKyY.js +25 -0
- package/dist/talisman-Bp8zUXqB.js +16 -0
- package/dist/tallywallet-B4OS9nIr.js +16 -0
- package/dist/tokenary-C7jjcbQa.js +18 -0
- package/dist/tokenpocket-9ZRPmAFA.js +28 -0
- package/dist/tp-V2em5bdl.js +13 -0
- package/dist/transactionRequest-be6a8ea9-CUKWo5mx.js +1117 -0
- package/dist/trust-gPypS1O7.js +11 -0
- package/dist/xdefi-COVIyGz4.js +38 -0
- package/dist/zeal-DxHbDqm0.js +9 -0
- package/dist/zerion-BfW0UElc.js +8 -0
- package/dist/zodiacpilot-CrId6F4w.js +6 -0
- package/package.json +35 -15
- package/src/auth/config.ts +0 -2
- package/src/components/SignUp.tsx +442 -0
- package/src/components/forms/AgreementModal.tsx +88 -0
- package/src/components/forms/CaptchaController.tsx +94 -0
- package/src/components/forms/CaptchaModal.jsx +171 -0
- package/src/components/forms/CaptchaWidget.jsx +146 -0
- package/src/components/forms/PasswordChecker.ts +88 -0
- package/src/components/forms/SendCodeInput.tsx +149 -0
- package/src/components/forms/SignUpFormItem.tsx +704 -0
- package/src/components/forms/util/application-api.ts +155 -0
- package/src/components/forms/util/auth-api.ts +198 -0
- package/src/components/forms/util/auth-util.tsx +346 -0
- package/src/components/forms/util/core.ts +493 -0
- package/src/components/forms/util/invitation-api.ts +132 -0
- package/src/components/forms/util/provider.tsx +603 -0
- package/src/components/forms/util/user-api.ts +303 -0
- package/src/components/provider/AdfsLoginButton.jsx +38 -0
- package/src/components/provider/AlipayLoginButton.jsx +38 -0
- package/src/components/provider/AppleLoginButton.jsx +38 -0
- package/src/components/provider/AzureADB2CLoginButton.jsx +38 -0
- package/src/components/provider/AzureADLoginButton.jsx +38 -0
- package/src/components/provider/BaiduLoginButton.jsx +38 -0
- package/src/components/provider/BilibiliLoginButton.jsx +37 -0
- package/src/components/provider/CasdoorLoginButton.jsx +38 -0
- package/src/components/provider/DingTalkLoginButton.jsx +37 -0
- package/src/components/provider/DouyinLoginButton.jsx +38 -0
- package/src/components/provider/FacebookLoginButton.jsx +37 -0
- package/src/components/provider/GitHubLoginButton.jsx +37 -0
- package/src/components/provider/GitLabLoginButton.jsx +38 -0
- package/src/components/provider/GiteeLoginButton.jsx +34 -0
- package/src/components/provider/GoogleLoginButton.jsx +68 -0
- package/src/components/provider/InfoflowLoginButton.jsx +38 -0
- package/src/components/provider/LarkLoginButton.jsx +38 -0
- package/src/components/provider/LinkedInLoginButton.jsx +37 -0
- package/src/components/provider/LoginButton.jsx +33 -0
- package/src/components/provider/OktaLoginButton.jsx +38 -0
- package/src/components/provider/Provider.jsx +3 -0
- package/src/components/provider/ProviderButton.jsx +327 -0
- package/src/components/provider/QqLoginButton.jsx +31 -0
- package/src/components/provider/SelfLoginButton.jsx +47 -0
- package/src/components/provider/SlackLoginButton.jsx +38 -0
- package/src/components/provider/SteamLoginButton.jsx +38 -0
- package/src/components/provider/WeComLoginButton.jsx +34 -0
- package/src/components/provider/Web3Auth.jsx +365 -0
- package/src/components/provider/WechatLoginButton.jsx +37 -0
- package/src/components/provider/WeiboLoginButton.jsx +34 -0
- package/src/components/util.tsx +173 -0
- package/src/i18n/en/signup.json +48 -0
- package/src/i18n/index.ts +17 -0
- package/src/index.tsx +6 -1
- package/vite.config.ts +33 -25
|
@@ -0,0 +1,1010 @@
|
|
|
1
|
+
import { h as D, a as Y, d as X, t as f, c as J, i as F, I, b as be, e as P, f as S, B as E, g as Ae, j as ce, s as pe, k as Pe, l as R, F as ee, T as ve, m as we, n as De, o as ke, p as Se, w as Ue, H as Te, q as Q, r as le, u as Ge, v as ze, x as m } from "./transactionRequest-be6a8ea9-CUKWo5mx.js";
|
|
2
|
+
function b(e) {
|
|
3
|
+
return {
|
|
4
|
+
formatters: void 0,
|
|
5
|
+
fees: void 0,
|
|
6
|
+
serializers: void 0,
|
|
7
|
+
...e
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const He = {
|
|
11
|
+
gasPriceOracle: { address: "0x420000000000000000000000000000000000000F" },
|
|
12
|
+
l1Block: { address: "0x4200000000000000000000000000000000000015" },
|
|
13
|
+
l2CrossDomainMessenger: {
|
|
14
|
+
address: "0x4200000000000000000000000000000000000007"
|
|
15
|
+
},
|
|
16
|
+
l2Erc721Bridge: { address: "0x4200000000000000000000000000000000000014" },
|
|
17
|
+
l2StandardBridge: { address: "0x4200000000000000000000000000000000000010" },
|
|
18
|
+
l2ToL1MessagePasser: {
|
|
19
|
+
address: "0x4200000000000000000000000000000000000016"
|
|
20
|
+
}
|
|
21
|
+
}, he = {
|
|
22
|
+
"0x0": "legacy",
|
|
23
|
+
"0x1": "eip2930",
|
|
24
|
+
"0x2": "eip1559",
|
|
25
|
+
"0x3": "eip4844"
|
|
26
|
+
};
|
|
27
|
+
function te(e) {
|
|
28
|
+
const t = {
|
|
29
|
+
...e,
|
|
30
|
+
blockHash: e.blockHash ? e.blockHash : null,
|
|
31
|
+
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
32
|
+
chainId: e.chainId ? Y(e.chainId) : void 0,
|
|
33
|
+
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
34
|
+
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
35
|
+
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
36
|
+
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
37
|
+
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
38
|
+
nonce: e.nonce ? Y(e.nonce) : void 0,
|
|
39
|
+
to: e.to ? e.to : null,
|
|
40
|
+
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
41
|
+
type: e.type ? he[e.type] : void 0,
|
|
42
|
+
typeHex: e.type ? e.type : void 0,
|
|
43
|
+
value: e.value ? BigInt(e.value) : void 0,
|
|
44
|
+
v: e.v ? BigInt(e.v) : void 0
|
|
45
|
+
};
|
|
46
|
+
return t.yParity = (() => {
|
|
47
|
+
if (e.yParity)
|
|
48
|
+
return Number(e.yParity);
|
|
49
|
+
if (typeof t.v == "bigint") {
|
|
50
|
+
if (t.v === 0n || t.v === 27n)
|
|
51
|
+
return 0;
|
|
52
|
+
if (t.v === 1n || t.v === 28n)
|
|
53
|
+
return 1;
|
|
54
|
+
if (t.v >= 35n)
|
|
55
|
+
return t.v % 2n === 0n ? 1 : 0;
|
|
56
|
+
}
|
|
57
|
+
})(), t.type === "legacy" && (delete t.accessList, delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas, delete t.yParity), t.type === "eip2930" && (delete t.maxFeePerBlobGas, delete t.maxFeePerGas, delete t.maxPriorityFeePerGas), t.type === "eip1559" && delete t.maxFeePerBlobGas, t;
|
|
58
|
+
}
|
|
59
|
+
const Oe = /* @__PURE__ */ X("transaction", te);
|
|
60
|
+
function Le(e) {
|
|
61
|
+
var s;
|
|
62
|
+
const t = (s = e.transactions) == null ? void 0 : s.map((a) => typeof a == "string" ? a : te(a));
|
|
63
|
+
return {
|
|
64
|
+
...e,
|
|
65
|
+
baseFeePerGas: e.baseFeePerGas ? BigInt(e.baseFeePerGas) : null,
|
|
66
|
+
blobGasUsed: e.blobGasUsed ? BigInt(e.blobGasUsed) : void 0,
|
|
67
|
+
difficulty: e.difficulty ? BigInt(e.difficulty) : void 0,
|
|
68
|
+
excessBlobGas: e.excessBlobGas ? BigInt(e.excessBlobGas) : void 0,
|
|
69
|
+
gasLimit: e.gasLimit ? BigInt(e.gasLimit) : void 0,
|
|
70
|
+
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : void 0,
|
|
71
|
+
hash: e.hash ? e.hash : null,
|
|
72
|
+
logsBloom: e.logsBloom ? e.logsBloom : null,
|
|
73
|
+
nonce: e.nonce ? e.nonce : null,
|
|
74
|
+
number: e.number ? BigInt(e.number) : null,
|
|
75
|
+
size: e.size ? BigInt(e.size) : void 0,
|
|
76
|
+
timestamp: e.timestamp ? BigInt(e.timestamp) : void 0,
|
|
77
|
+
transactions: t,
|
|
78
|
+
totalDifficulty: e.totalDifficulty ? BigInt(e.totalDifficulty) : null
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
const _e = /* @__PURE__ */ X("block", Le);
|
|
82
|
+
function $e(e, { args: t, eventName: s } = {}) {
|
|
83
|
+
return {
|
|
84
|
+
...e,
|
|
85
|
+
blockHash: e.blockHash ? e.blockHash : null,
|
|
86
|
+
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
87
|
+
logIndex: e.logIndex ? Number(e.logIndex) : null,
|
|
88
|
+
transactionHash: e.transactionHash ? e.transactionHash : null,
|
|
89
|
+
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
90
|
+
...s ? { args: t, eventName: s } : {}
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
const Ve = {
|
|
94
|
+
"0x0": "reverted",
|
|
95
|
+
"0x1": "success"
|
|
96
|
+
};
|
|
97
|
+
function Ne(e) {
|
|
98
|
+
const t = {
|
|
99
|
+
...e,
|
|
100
|
+
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
101
|
+
contractAddress: e.contractAddress ? e.contractAddress : null,
|
|
102
|
+
cumulativeGasUsed: e.cumulativeGasUsed ? BigInt(e.cumulativeGasUsed) : null,
|
|
103
|
+
effectiveGasPrice: e.effectiveGasPrice ? BigInt(e.effectiveGasPrice) : null,
|
|
104
|
+
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
105
|
+
logs: e.logs ? e.logs.map((s) => $e(s)) : null,
|
|
106
|
+
to: e.to ? e.to : null,
|
|
107
|
+
transactionIndex: e.transactionIndex ? Y(e.transactionIndex) : null,
|
|
108
|
+
status: e.status ? Ve[e.status] : null,
|
|
109
|
+
type: e.type ? he[e.type] || e.type : null
|
|
110
|
+
};
|
|
111
|
+
return e.blobGasPrice && (t.blobGasPrice = BigInt(e.blobGasPrice)), e.blobGasUsed && (t.blobGasUsed = BigInt(e.blobGasUsed)), t;
|
|
112
|
+
}
|
|
113
|
+
const Me = /* @__PURE__ */ X("transactionReceipt", Ne), je = {
|
|
114
|
+
block: /* @__PURE__ */ _e({
|
|
115
|
+
format(e) {
|
|
116
|
+
var s;
|
|
117
|
+
return {
|
|
118
|
+
transactions: (s = e.transactions) == null ? void 0 : s.map((a) => {
|
|
119
|
+
if (typeof a == "string")
|
|
120
|
+
return a;
|
|
121
|
+
const r = te(a);
|
|
122
|
+
return r.typeHex === "0x7e" && (r.isSystemTx = a.isSystemTx, r.mint = a.mint ? D(a.mint) : void 0, r.sourceHash = a.sourceHash, r.type = "deposit"), r;
|
|
123
|
+
}),
|
|
124
|
+
stateRoot: e.stateRoot
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
}),
|
|
128
|
+
transaction: /* @__PURE__ */ Oe({
|
|
129
|
+
format(e) {
|
|
130
|
+
const t = {};
|
|
131
|
+
return e.type === "0x7e" && (t.isSystemTx = e.isSystemTx, t.mint = e.mint ? D(e.mint) : void 0, t.sourceHash = e.sourceHash, t.type = "deposit"), t;
|
|
132
|
+
}
|
|
133
|
+
}),
|
|
134
|
+
transactionReceipt: /* @__PURE__ */ Me({
|
|
135
|
+
format(e) {
|
|
136
|
+
return {
|
|
137
|
+
l1GasPrice: e.l1GasPrice ? D(e.l1GasPrice) : null,
|
|
138
|
+
l1GasUsed: e.l1GasUsed ? D(e.l1GasUsed) : null,
|
|
139
|
+
l1Fee: e.l1Fee ? D(e.l1Fee) : null,
|
|
140
|
+
l1FeeScalar: e.l1FeeScalar ? Number(e.l1FeeScalar) : null
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
})
|
|
144
|
+
};
|
|
145
|
+
function A(e, t = "hex") {
|
|
146
|
+
const s = xe(e), a = be(new Uint8Array(s.length));
|
|
147
|
+
return s.encode(a), t === "hex" ? P(a.bytes) : a.bytes;
|
|
148
|
+
}
|
|
149
|
+
function xe(e) {
|
|
150
|
+
return Array.isArray(e) ? Ke(e.map((t) => xe(t))) : Ze(e);
|
|
151
|
+
}
|
|
152
|
+
function Ke(e) {
|
|
153
|
+
const t = e.reduce((r, n) => r + n.length, 0), s = me(t);
|
|
154
|
+
return {
|
|
155
|
+
length: t <= 55 ? 1 + t : 1 + s + t,
|
|
156
|
+
encode(r) {
|
|
157
|
+
t <= 55 ? r.pushByte(192 + t) : (r.pushByte(247 + s), s === 1 ? r.pushUint8(t) : s === 2 ? r.pushUint16(t) : s === 3 ? r.pushUint24(t) : r.pushUint32(t));
|
|
158
|
+
for (const { encode: n } of e)
|
|
159
|
+
n(r);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
}
|
|
163
|
+
function Ze(e) {
|
|
164
|
+
const t = typeof e == "string" ? S(e) : e, s = me(t.length);
|
|
165
|
+
return {
|
|
166
|
+
length: t.length === 1 && t[0] < 128 ? 1 : t.length <= 55 ? 1 + t.length : 1 + s + t.length,
|
|
167
|
+
encode(r) {
|
|
168
|
+
t.length === 1 && t[0] < 128 ? r.pushBytes(t) : t.length <= 55 ? (r.pushByte(128 + t.length), r.pushBytes(t)) : (r.pushByte(183 + s), s === 1 ? r.pushUint8(t.length) : s === 2 ? r.pushUint16(t.length) : s === 3 ? r.pushUint24(t.length) : r.pushUint32(t.length), r.pushBytes(t));
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function me(e) {
|
|
173
|
+
if (e < 2 ** 8)
|
|
174
|
+
return 1;
|
|
175
|
+
if (e < 2 ** 16)
|
|
176
|
+
return 2;
|
|
177
|
+
if (e < 2 ** 24)
|
|
178
|
+
return 3;
|
|
179
|
+
if (e < 2 ** 32)
|
|
180
|
+
return 4;
|
|
181
|
+
throw new E("Length is too large.");
|
|
182
|
+
}
|
|
183
|
+
function ye(e) {
|
|
184
|
+
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), a = typeof e.blobs[0] == "string" ? e.blobs.map((n) => S(n)) : e.blobs, r = [];
|
|
185
|
+
for (const n of a)
|
|
186
|
+
r.push(Uint8Array.from(t.blobToKzgCommitment(n)));
|
|
187
|
+
return s === "bytes" ? r : r.map((n) => P(n));
|
|
188
|
+
}
|
|
189
|
+
function ge(e) {
|
|
190
|
+
const { kzg: t } = e, s = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), a = typeof e.blobs[0] == "string" ? e.blobs.map((o) => S(o)) : e.blobs, r = typeof e.commitments[0] == "string" ? e.commitments.map((o) => S(o)) : e.commitments, n = [];
|
|
191
|
+
for (let o = 0; o < a.length; o++) {
|
|
192
|
+
const i = a[o], c = r[o];
|
|
193
|
+
n.push(Uint8Array.from(t.computeBlobKzgProof(i, c)));
|
|
194
|
+
}
|
|
195
|
+
return s === "bytes" ? n : n.map((o) => P(o));
|
|
196
|
+
}
|
|
197
|
+
function We(e, t, s, a) {
|
|
198
|
+
if (typeof e.setBigUint64 == "function")
|
|
199
|
+
return e.setBigUint64(t, s, a);
|
|
200
|
+
const r = BigInt(32), n = BigInt(4294967295), o = Number(s >> r & n), i = Number(s & n), c = a ? 4 : 0, u = a ? 0 : 4;
|
|
201
|
+
e.setUint32(t + c, o, a), e.setUint32(t + u, i, a);
|
|
202
|
+
}
|
|
203
|
+
class qe extends Te {
|
|
204
|
+
constructor(t, s, a, r) {
|
|
205
|
+
super(), this.blockLen = t, this.outputLen = s, this.padOffset = a, this.isLE = r, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(t), this.view = Q(this.buffer);
|
|
206
|
+
}
|
|
207
|
+
update(t) {
|
|
208
|
+
le(this);
|
|
209
|
+
const { view: s, buffer: a, blockLen: r } = this;
|
|
210
|
+
t = Ge(t);
|
|
211
|
+
const n = t.length;
|
|
212
|
+
for (let o = 0; o < n; ) {
|
|
213
|
+
const i = Math.min(r - this.pos, n - o);
|
|
214
|
+
if (i === r) {
|
|
215
|
+
const c = Q(t);
|
|
216
|
+
for (; r <= n - o; o += r)
|
|
217
|
+
this.process(c, o);
|
|
218
|
+
continue;
|
|
219
|
+
}
|
|
220
|
+
a.set(t.subarray(o, o + i), this.pos), this.pos += i, o += i, this.pos === r && (this.process(s, 0), this.pos = 0);
|
|
221
|
+
}
|
|
222
|
+
return this.length += t.length, this.roundClean(), this;
|
|
223
|
+
}
|
|
224
|
+
digestInto(t) {
|
|
225
|
+
le(this), ze(t, this), this.finished = !0;
|
|
226
|
+
const { buffer: s, view: a, blockLen: r, isLE: n } = this;
|
|
227
|
+
let { pos: o } = this;
|
|
228
|
+
s[o++] = 128, this.buffer.subarray(o).fill(0), this.padOffset > r - o && (this.process(a, 0), o = 0);
|
|
229
|
+
for (let d = o; d < r; d++)
|
|
230
|
+
s[d] = 0;
|
|
231
|
+
We(a, r - 8, BigInt(this.length * 8), n), this.process(a, 0);
|
|
232
|
+
const i = Q(t), c = this.outputLen;
|
|
233
|
+
if (c % 4)
|
|
234
|
+
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
235
|
+
const u = c / 4, p = this.get();
|
|
236
|
+
if (u > p.length)
|
|
237
|
+
throw new Error("_sha2: outputLen bigger than state");
|
|
238
|
+
for (let d = 0; d < u; d++)
|
|
239
|
+
i.setUint32(4 * d, p[d], n);
|
|
240
|
+
}
|
|
241
|
+
digest() {
|
|
242
|
+
const { buffer: t, outputLen: s } = this;
|
|
243
|
+
this.digestInto(t);
|
|
244
|
+
const a = t.slice(0, s);
|
|
245
|
+
return this.destroy(), a;
|
|
246
|
+
}
|
|
247
|
+
_cloneInto(t) {
|
|
248
|
+
t || (t = new this.constructor()), t.set(...this.get());
|
|
249
|
+
const { blockLen: s, buffer: a, length: r, finished: n, destroyed: o, pos: i } = this;
|
|
250
|
+
return t.length = r, t.pos = i, t.finished = n, t.destroyed = o, r % s && t.buffer.set(a), t;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
const Ye = (e, t, s) => e & t ^ ~e & s, Je = (e, t, s) => e & t ^ e & s ^ t & s, Qe = /* @__PURE__ */ new Uint32Array([
|
|
254
|
+
1116352408,
|
|
255
|
+
1899447441,
|
|
256
|
+
3049323471,
|
|
257
|
+
3921009573,
|
|
258
|
+
961987163,
|
|
259
|
+
1508970993,
|
|
260
|
+
2453635748,
|
|
261
|
+
2870763221,
|
|
262
|
+
3624381080,
|
|
263
|
+
310598401,
|
|
264
|
+
607225278,
|
|
265
|
+
1426881987,
|
|
266
|
+
1925078388,
|
|
267
|
+
2162078206,
|
|
268
|
+
2614888103,
|
|
269
|
+
3248222580,
|
|
270
|
+
3835390401,
|
|
271
|
+
4022224774,
|
|
272
|
+
264347078,
|
|
273
|
+
604807628,
|
|
274
|
+
770255983,
|
|
275
|
+
1249150122,
|
|
276
|
+
1555081692,
|
|
277
|
+
1996064986,
|
|
278
|
+
2554220882,
|
|
279
|
+
2821834349,
|
|
280
|
+
2952996808,
|
|
281
|
+
3210313671,
|
|
282
|
+
3336571891,
|
|
283
|
+
3584528711,
|
|
284
|
+
113926993,
|
|
285
|
+
338241895,
|
|
286
|
+
666307205,
|
|
287
|
+
773529912,
|
|
288
|
+
1294757372,
|
|
289
|
+
1396182291,
|
|
290
|
+
1695183700,
|
|
291
|
+
1986661051,
|
|
292
|
+
2177026350,
|
|
293
|
+
2456956037,
|
|
294
|
+
2730485921,
|
|
295
|
+
2820302411,
|
|
296
|
+
3259730800,
|
|
297
|
+
3345764771,
|
|
298
|
+
3516065817,
|
|
299
|
+
3600352804,
|
|
300
|
+
4094571909,
|
|
301
|
+
275423344,
|
|
302
|
+
430227734,
|
|
303
|
+
506948616,
|
|
304
|
+
659060556,
|
|
305
|
+
883997877,
|
|
306
|
+
958139571,
|
|
307
|
+
1322822218,
|
|
308
|
+
1537002063,
|
|
309
|
+
1747873779,
|
|
310
|
+
1955562222,
|
|
311
|
+
2024104815,
|
|
312
|
+
2227730452,
|
|
313
|
+
2361852424,
|
|
314
|
+
2428436474,
|
|
315
|
+
2756734187,
|
|
316
|
+
3204031479,
|
|
317
|
+
3329325298
|
|
318
|
+
]), y = /* @__PURE__ */ new Uint32Array([
|
|
319
|
+
1779033703,
|
|
320
|
+
3144134277,
|
|
321
|
+
1013904242,
|
|
322
|
+
2773480762,
|
|
323
|
+
1359893119,
|
|
324
|
+
2600822924,
|
|
325
|
+
528734635,
|
|
326
|
+
1541459225
|
|
327
|
+
]), g = /* @__PURE__ */ new Uint32Array(64);
|
|
328
|
+
class Xe extends qe {
|
|
329
|
+
constructor() {
|
|
330
|
+
super(64, 32, 8, !1), this.A = y[0] | 0, this.B = y[1] | 0, this.C = y[2] | 0, this.D = y[3] | 0, this.E = y[4] | 0, this.F = y[5] | 0, this.G = y[6] | 0, this.H = y[7] | 0;
|
|
331
|
+
}
|
|
332
|
+
get() {
|
|
333
|
+
const { A: t, B: s, C: a, D: r, E: n, F: o, G: i, H: c } = this;
|
|
334
|
+
return [t, s, a, r, n, o, i, c];
|
|
335
|
+
}
|
|
336
|
+
// prettier-ignore
|
|
337
|
+
set(t, s, a, r, n, o, i, c) {
|
|
338
|
+
this.A = t | 0, this.B = s | 0, this.C = a | 0, this.D = r | 0, this.E = n | 0, this.F = o | 0, this.G = i | 0, this.H = c | 0;
|
|
339
|
+
}
|
|
340
|
+
process(t, s) {
|
|
341
|
+
for (let d = 0; d < 16; d++, s += 4)
|
|
342
|
+
g[d] = t.getUint32(s, !1);
|
|
343
|
+
for (let d = 16; d < 64; d++) {
|
|
344
|
+
const x = g[d - 15], h = g[d - 2], U = m(x, 7) ^ m(x, 18) ^ x >>> 3, C = m(h, 17) ^ m(h, 19) ^ h >>> 10;
|
|
345
|
+
g[d] = C + g[d - 7] + U + g[d - 16] | 0;
|
|
346
|
+
}
|
|
347
|
+
let { A: a, B: r, C: n, D: o, E: i, F: c, G: u, H: p } = this;
|
|
348
|
+
for (let d = 0; d < 64; d++) {
|
|
349
|
+
const x = m(i, 6) ^ m(i, 11) ^ m(i, 25), h = p + x + Ye(i, c, u) + Qe[d] + g[d] | 0, C = (m(a, 2) ^ m(a, 13) ^ m(a, 22)) + Je(a, r, n) | 0;
|
|
350
|
+
p = u, u = c, c = i, i = o + h | 0, o = n, n = r, r = a, a = h + C | 0;
|
|
351
|
+
}
|
|
352
|
+
a = a + this.A | 0, r = r + this.B | 0, n = n + this.C | 0, o = o + this.D | 0, i = i + this.E | 0, c = c + this.F | 0, u = u + this.G | 0, p = p + this.H | 0, this.set(a, r, n, o, i, c, u, p);
|
|
353
|
+
}
|
|
354
|
+
roundClean() {
|
|
355
|
+
g.fill(0);
|
|
356
|
+
}
|
|
357
|
+
destroy() {
|
|
358
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
const Re = /* @__PURE__ */ Ue(() => new Xe());
|
|
362
|
+
function et(e, t) {
|
|
363
|
+
return Re(ke(e, { strict: !1 }) ? Se(e) : e);
|
|
364
|
+
}
|
|
365
|
+
function tt(e) {
|
|
366
|
+
const { commitment: t, version: s = 1 } = e, a = e.to ?? (typeof t == "string" ? "hex" : "bytes"), r = et(t);
|
|
367
|
+
return r.set([s], 0), a === "bytes" ? r : P(r);
|
|
368
|
+
}
|
|
369
|
+
function st(e) {
|
|
370
|
+
const { commitments: t, version: s } = e, a = e.to ?? (typeof t[0] == "string" ? "hex" : "bytes"), r = [];
|
|
371
|
+
for (const n of t)
|
|
372
|
+
r.push(tt({
|
|
373
|
+
commitment: n,
|
|
374
|
+
to: a,
|
|
375
|
+
version: s
|
|
376
|
+
}));
|
|
377
|
+
return r;
|
|
378
|
+
}
|
|
379
|
+
const de = 6, Ee = 32, se = 4096, Be = Ee * se, ue = Be * de - // terminator byte (0x80).
|
|
380
|
+
1 - // zero byte (0x00) appended to each field element.
|
|
381
|
+
1 * se * de, Ce = 1;
|
|
382
|
+
class rt extends E {
|
|
383
|
+
constructor({ maxSize: t, size: s }) {
|
|
384
|
+
super("Blob size is too large.", {
|
|
385
|
+
metaMessages: [`Max: ${t} bytes`, `Given: ${s} bytes`]
|
|
386
|
+
}), Object.defineProperty(this, "name", {
|
|
387
|
+
enumerable: !0,
|
|
388
|
+
configurable: !0,
|
|
389
|
+
writable: !0,
|
|
390
|
+
value: "BlobSizeTooLargeError"
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
class Fe extends E {
|
|
395
|
+
constructor() {
|
|
396
|
+
super("Blob data must not be empty."), Object.defineProperty(this, "name", {
|
|
397
|
+
enumerable: !0,
|
|
398
|
+
configurable: !0,
|
|
399
|
+
writable: !0,
|
|
400
|
+
value: "EmptyBlobError"
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
class at extends E {
|
|
405
|
+
constructor({ hash: t, size: s }) {
|
|
406
|
+
super(`Versioned hash "${t}" size is invalid.`, {
|
|
407
|
+
metaMessages: ["Expected: 32", `Received: ${s}`]
|
|
408
|
+
}), Object.defineProperty(this, "name", {
|
|
409
|
+
enumerable: !0,
|
|
410
|
+
configurable: !0,
|
|
411
|
+
writable: !0,
|
|
412
|
+
value: "InvalidVersionedHashSizeError"
|
|
413
|
+
});
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
class nt extends E {
|
|
417
|
+
constructor({ hash: t, version: s }) {
|
|
418
|
+
super(`Versioned hash "${t}" version is invalid.`, {
|
|
419
|
+
metaMessages: [
|
|
420
|
+
`Expected: ${Ce}`,
|
|
421
|
+
`Received: ${s}`
|
|
422
|
+
]
|
|
423
|
+
}), Object.defineProperty(this, "name", {
|
|
424
|
+
enumerable: !0,
|
|
425
|
+
configurable: !0,
|
|
426
|
+
writable: !0,
|
|
427
|
+
value: "InvalidVersionedHashVersionError"
|
|
428
|
+
});
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
function ot(e) {
|
|
432
|
+
const t = e.to ?? (typeof e.data == "string" ? "hex" : "bytes"), s = typeof e.data == "string" ? S(e.data) : e.data, a = pe(s);
|
|
433
|
+
if (!a)
|
|
434
|
+
throw new Fe();
|
|
435
|
+
if (a > ue)
|
|
436
|
+
throw new rt({
|
|
437
|
+
maxSize: ue,
|
|
438
|
+
size: a
|
|
439
|
+
});
|
|
440
|
+
const r = [];
|
|
441
|
+
let n = !0, o = 0;
|
|
442
|
+
for (; n; ) {
|
|
443
|
+
const i = be(new Uint8Array(Be));
|
|
444
|
+
let c = 0;
|
|
445
|
+
for (; c < se; ) {
|
|
446
|
+
const u = s.slice(o, o + (Ee - 1));
|
|
447
|
+
if (i.pushByte(0), i.pushBytes(u), u.length < 31) {
|
|
448
|
+
i.pushByte(128), n = !1;
|
|
449
|
+
break;
|
|
450
|
+
}
|
|
451
|
+
c++, o += 31;
|
|
452
|
+
}
|
|
453
|
+
r.push(i);
|
|
454
|
+
}
|
|
455
|
+
return t === "bytes" ? r.map((i) => i.bytes) : r.map((i) => P(i.bytes));
|
|
456
|
+
}
|
|
457
|
+
function it(e) {
|
|
458
|
+
const { data: t, kzg: s, to: a } = e, r = e.blobs ?? ot({ data: t, to: a }), n = e.commitments ?? ye({ blobs: r, kzg: s, to: a }), o = e.proofs ?? ge({ blobs: r, commitments: n, kzg: s, to: a }), i = [];
|
|
459
|
+
for (let c = 0; c < r.length; c++)
|
|
460
|
+
i.push({
|
|
461
|
+
blob: r[c],
|
|
462
|
+
commitment: n[c],
|
|
463
|
+
proof: o[c]
|
|
464
|
+
});
|
|
465
|
+
return i;
|
|
466
|
+
}
|
|
467
|
+
function ct(e) {
|
|
468
|
+
const { blobVersionedHashes: t } = e;
|
|
469
|
+
if (t) {
|
|
470
|
+
if (t.length === 0)
|
|
471
|
+
throw new Fe();
|
|
472
|
+
for (const s of t) {
|
|
473
|
+
const a = pe(s), r = Y(Pe(s, 0, 1));
|
|
474
|
+
if (a !== 32)
|
|
475
|
+
throw new at({ hash: s, size: a });
|
|
476
|
+
if (r !== Ce)
|
|
477
|
+
throw new nt({
|
|
478
|
+
hash: s,
|
|
479
|
+
version: r
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
Ie(e);
|
|
484
|
+
}
|
|
485
|
+
function Ie(e) {
|
|
486
|
+
const { chainId: t, maxPriorityFeePerGas: s, maxFeePerGas: a, to: r } = e;
|
|
487
|
+
if (t <= 0)
|
|
488
|
+
throw new R({ chainId: t });
|
|
489
|
+
if (r && !F(r))
|
|
490
|
+
throw new I({ address: r });
|
|
491
|
+
if (a && a > 2n ** 256n - 1n)
|
|
492
|
+
throw new ee({ maxFeePerGas: a });
|
|
493
|
+
if (s && a && s > a)
|
|
494
|
+
throw new ve({ maxFeePerGas: a, maxPriorityFeePerGas: s });
|
|
495
|
+
}
|
|
496
|
+
function lt(e) {
|
|
497
|
+
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: a, maxFeePerGas: r, to: n } = e;
|
|
498
|
+
if (t <= 0)
|
|
499
|
+
throw new R({ chainId: t });
|
|
500
|
+
if (n && !F(n))
|
|
501
|
+
throw new I({ address: n });
|
|
502
|
+
if (s || r)
|
|
503
|
+
throw new E("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid EIP-2930 Transaction attribute.");
|
|
504
|
+
if (a && a > 2n ** 256n - 1n)
|
|
505
|
+
throw new ee({ maxFeePerGas: a });
|
|
506
|
+
}
|
|
507
|
+
function dt(e) {
|
|
508
|
+
const { chainId: t, maxPriorityFeePerGas: s, gasPrice: a, maxFeePerGas: r, to: n, accessList: o } = e;
|
|
509
|
+
if (n && !F(n))
|
|
510
|
+
throw new I({ address: n });
|
|
511
|
+
if (typeof t < "u" && t <= 0)
|
|
512
|
+
throw new R({ chainId: t });
|
|
513
|
+
if (s || r)
|
|
514
|
+
throw new E("`maxFeePerGas`/`maxPriorityFeePerGas` is not a valid Legacy Transaction attribute.");
|
|
515
|
+
if (a && a > 2n ** 256n - 1n)
|
|
516
|
+
throw new ee({ maxFeePerGas: a });
|
|
517
|
+
if (o)
|
|
518
|
+
throw new E("`accessList` is not a valid Legacy Transaction attribute.");
|
|
519
|
+
}
|
|
520
|
+
function ut(e) {
|
|
521
|
+
if (e.type)
|
|
522
|
+
return e.type;
|
|
523
|
+
if (typeof e.blobs < "u" || typeof e.blobVersionedHashes < "u" || typeof e.maxFeePerBlobGas < "u" || typeof e.sidecars < "u")
|
|
524
|
+
return "eip4844";
|
|
525
|
+
if (typeof e.maxFeePerGas < "u" || typeof e.maxPriorityFeePerGas < "u")
|
|
526
|
+
return "eip1559";
|
|
527
|
+
if (typeof e.gasPrice < "u")
|
|
528
|
+
return typeof e.accessList < "u" ? "eip2930" : "legacy";
|
|
529
|
+
throw new we({ transaction: e });
|
|
530
|
+
}
|
|
531
|
+
function re(e) {
|
|
532
|
+
if (!e || e.length === 0)
|
|
533
|
+
return [];
|
|
534
|
+
const t = [];
|
|
535
|
+
for (let s = 0; s < e.length; s++) {
|
|
536
|
+
const { address: a, storageKeys: r } = e[s];
|
|
537
|
+
for (let n = 0; n < r.length; n++)
|
|
538
|
+
if (r[n].length - 2 !== 64)
|
|
539
|
+
throw new De({ storageKey: r[n] });
|
|
540
|
+
if (!F(a, { strict: !1 }))
|
|
541
|
+
throw new I({ address: a });
|
|
542
|
+
t.push([a, r]);
|
|
543
|
+
}
|
|
544
|
+
return t;
|
|
545
|
+
}
|
|
546
|
+
function ft(e, t) {
|
|
547
|
+
const s = ut(e);
|
|
548
|
+
return s === "eip1559" ? pt(e, t) : s === "eip2930" ? ht(e, t) : s === "eip4844" ? bt(e, t) : xt(e, t);
|
|
549
|
+
}
|
|
550
|
+
function bt(e, t) {
|
|
551
|
+
const { chainId: s, gas: a, nonce: r, to: n, value: o, maxFeePerBlobGas: i, maxFeePerGas: c, maxPriorityFeePerGas: u, accessList: p, data: d } = e;
|
|
552
|
+
ct(e);
|
|
553
|
+
let x = e.blobVersionedHashes, h = e.sidecars;
|
|
554
|
+
if (e.blobs && (typeof x > "u" || typeof h > "u")) {
|
|
555
|
+
const B = typeof e.blobs[0] == "string" ? e.blobs : e.blobs.map((w) => P(w)), T = e.kzg, v = ye({
|
|
556
|
+
blobs: B,
|
|
557
|
+
kzg: T
|
|
558
|
+
});
|
|
559
|
+
if (typeof x > "u" && (x = st({
|
|
560
|
+
commitments: v
|
|
561
|
+
})), typeof h > "u") {
|
|
562
|
+
const w = ge({ blobs: B, commitments: v, kzg: T });
|
|
563
|
+
h = it({ blobs: B, commitments: v, proofs: w });
|
|
564
|
+
}
|
|
565
|
+
}
|
|
566
|
+
const U = re(p), C = [
|
|
567
|
+
f(s),
|
|
568
|
+
r ? f(r) : "0x",
|
|
569
|
+
u ? f(u) : "0x",
|
|
570
|
+
c ? f(c) : "0x",
|
|
571
|
+
a ? f(a) : "0x",
|
|
572
|
+
n ?? "0x",
|
|
573
|
+
o ? f(o) : "0x",
|
|
574
|
+
d ?? "0x",
|
|
575
|
+
U,
|
|
576
|
+
i ? f(i) : "0x",
|
|
577
|
+
x ?? [],
|
|
578
|
+
...ae(e, t)
|
|
579
|
+
], ne = [], oe = [], ie = [];
|
|
580
|
+
if (h)
|
|
581
|
+
for (let B = 0; B < h.length; B++) {
|
|
582
|
+
const { blob: T, commitment: v, proof: w } = h[B];
|
|
583
|
+
ne.push(T), oe.push(v), ie.push(w);
|
|
584
|
+
}
|
|
585
|
+
return J([
|
|
586
|
+
"0x03",
|
|
587
|
+
// If sidecars are enabled, envelope turns into a "wrapper":
|
|
588
|
+
A(h ? [C, ne, oe, ie] : C)
|
|
589
|
+
]);
|
|
590
|
+
}
|
|
591
|
+
function pt(e, t) {
|
|
592
|
+
const { chainId: s, gas: a, nonce: r, to: n, value: o, maxFeePerGas: i, maxPriorityFeePerGas: c, accessList: u, data: p } = e;
|
|
593
|
+
Ie(e);
|
|
594
|
+
const d = re(u), x = [
|
|
595
|
+
f(s),
|
|
596
|
+
r ? f(r) : "0x",
|
|
597
|
+
c ? f(c) : "0x",
|
|
598
|
+
i ? f(i) : "0x",
|
|
599
|
+
a ? f(a) : "0x",
|
|
600
|
+
n ?? "0x",
|
|
601
|
+
o ? f(o) : "0x",
|
|
602
|
+
p ?? "0x",
|
|
603
|
+
d,
|
|
604
|
+
...ae(e, t)
|
|
605
|
+
];
|
|
606
|
+
return J([
|
|
607
|
+
"0x02",
|
|
608
|
+
A(x)
|
|
609
|
+
]);
|
|
610
|
+
}
|
|
611
|
+
function ht(e, t) {
|
|
612
|
+
const { chainId: s, gas: a, data: r, nonce: n, to: o, value: i, accessList: c, gasPrice: u } = e;
|
|
613
|
+
lt(e);
|
|
614
|
+
const p = re(c), d = [
|
|
615
|
+
f(s),
|
|
616
|
+
n ? f(n) : "0x",
|
|
617
|
+
u ? f(u) : "0x",
|
|
618
|
+
a ? f(a) : "0x",
|
|
619
|
+
o ?? "0x",
|
|
620
|
+
i ? f(i) : "0x",
|
|
621
|
+
r ?? "0x",
|
|
622
|
+
p,
|
|
623
|
+
...ae(e, t)
|
|
624
|
+
];
|
|
625
|
+
return J([
|
|
626
|
+
"0x01",
|
|
627
|
+
A(d)
|
|
628
|
+
]);
|
|
629
|
+
}
|
|
630
|
+
function xt(e, t) {
|
|
631
|
+
const { chainId: s = 0, gas: a, data: r, nonce: n, to: o, value: i, gasPrice: c } = e;
|
|
632
|
+
dt(e);
|
|
633
|
+
let u = [
|
|
634
|
+
n ? f(n) : "0x",
|
|
635
|
+
c ? f(c) : "0x",
|
|
636
|
+
a ? f(a) : "0x",
|
|
637
|
+
o ?? "0x",
|
|
638
|
+
i ? f(i) : "0x",
|
|
639
|
+
r ?? "0x"
|
|
640
|
+
];
|
|
641
|
+
if (t) {
|
|
642
|
+
const p = (() => {
|
|
643
|
+
if (t.v >= 35n)
|
|
644
|
+
return (t.v - 35n) / 2n > 0 ? t.v : 27n + (t.v === 35n ? 0n : 1n);
|
|
645
|
+
if (s > 0)
|
|
646
|
+
return BigInt(s * 2) + BigInt(35n + t.v - 27n);
|
|
647
|
+
const d = 27n + (t.v === 27n ? 0n : 1n);
|
|
648
|
+
if (t.v !== d)
|
|
649
|
+
throw new Ae({ v: t.v });
|
|
650
|
+
return d;
|
|
651
|
+
})();
|
|
652
|
+
u = [
|
|
653
|
+
...u,
|
|
654
|
+
f(p),
|
|
655
|
+
t.r,
|
|
656
|
+
t.s
|
|
657
|
+
];
|
|
658
|
+
} else s > 0 && (u = [
|
|
659
|
+
...u,
|
|
660
|
+
f(s),
|
|
661
|
+
"0x",
|
|
662
|
+
"0x"
|
|
663
|
+
]);
|
|
664
|
+
return A(u);
|
|
665
|
+
}
|
|
666
|
+
function ae(e, t) {
|
|
667
|
+
const { r: s, s: a, v: r, yParity: n } = t ?? e;
|
|
668
|
+
return typeof s > "u" ? [] : typeof a > "u" ? [] : typeof r > "u" && typeof n > "u" ? [] : [typeof n == "number" ? n ? f(1) : "0x" : r === 0n ? "0x" : r === 1n ? f(1) : r === 27n ? "0x" : f(1), ce(s), ce(a)];
|
|
669
|
+
}
|
|
670
|
+
function mt(e, t) {
|
|
671
|
+
return Et(e) ? gt(e) : ft(e, t);
|
|
672
|
+
}
|
|
673
|
+
const yt = {
|
|
674
|
+
transaction: mt
|
|
675
|
+
};
|
|
676
|
+
function gt(e) {
|
|
677
|
+
Bt(e);
|
|
678
|
+
const { sourceHash: t, data: s, from: a, gas: r, isSystemTx: n, mint: o, to: i, value: c } = e, u = [
|
|
679
|
+
t,
|
|
680
|
+
a,
|
|
681
|
+
i ?? "0x",
|
|
682
|
+
o ? f(o) : "0x",
|
|
683
|
+
c ? f(c) : "0x",
|
|
684
|
+
r ? f(r) : "0x",
|
|
685
|
+
n ? "0x1" : "0x",
|
|
686
|
+
s ?? "0x"
|
|
687
|
+
];
|
|
688
|
+
return J([
|
|
689
|
+
"0x7e",
|
|
690
|
+
A(u)
|
|
691
|
+
]);
|
|
692
|
+
}
|
|
693
|
+
function Et(e) {
|
|
694
|
+
return e.type === "deposit" || typeof e.sourceHash < "u";
|
|
695
|
+
}
|
|
696
|
+
function Bt(e) {
|
|
697
|
+
const { from: t, to: s } = e;
|
|
698
|
+
if (t && !F(t))
|
|
699
|
+
throw new I({ address: t });
|
|
700
|
+
if (s && !F(s))
|
|
701
|
+
throw new I({ address: s });
|
|
702
|
+
}
|
|
703
|
+
const l = {
|
|
704
|
+
contracts: He,
|
|
705
|
+
formatters: je,
|
|
706
|
+
serializers: yt
|
|
707
|
+
}, G = 1;
|
|
708
|
+
({
|
|
709
|
+
...l,
|
|
710
|
+
contracts: {
|
|
711
|
+
...l.contracts,
|
|
712
|
+
l2OutputOracle: G + "",
|
|
713
|
+
portal: G + "",
|
|
714
|
+
l1StandardBridge: G + ""
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
const z = 11155111;
|
|
718
|
+
({
|
|
719
|
+
...l,
|
|
720
|
+
contracts: {
|
|
721
|
+
...l.contracts,
|
|
722
|
+
l2OutputOracle: z + "",
|
|
723
|
+
portal: z + "",
|
|
724
|
+
l1StandardBridge: z + ""
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
const H = 1;
|
|
728
|
+
({
|
|
729
|
+
...l,
|
|
730
|
+
contracts: {
|
|
731
|
+
...l.contracts,
|
|
732
|
+
l2OutputOracle: H + "",
|
|
733
|
+
portal: H + "",
|
|
734
|
+
l1StandardBridge: H + ""
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
const O = 5;
|
|
738
|
+
({
|
|
739
|
+
...l,
|
|
740
|
+
contracts: {
|
|
741
|
+
...l.contracts,
|
|
742
|
+
l2OutputOracle: O + "",
|
|
743
|
+
portal: O + "",
|
|
744
|
+
l1StandardBridge: O + ""
|
|
745
|
+
}
|
|
746
|
+
});
|
|
747
|
+
const L = 11155111;
|
|
748
|
+
({
|
|
749
|
+
...l,
|
|
750
|
+
contracts: {
|
|
751
|
+
...l.contracts,
|
|
752
|
+
l2OutputOracle: L + "",
|
|
753
|
+
portal: L + "",
|
|
754
|
+
l1StandardBridge: L + ""
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
b({
|
|
758
|
+
id: 60808,
|
|
759
|
+
name: "BOB",
|
|
760
|
+
nativeCurrency: {
|
|
761
|
+
decimals: 18,
|
|
762
|
+
name: "ETH",
|
|
763
|
+
symbol: "ETH"
|
|
764
|
+
},
|
|
765
|
+
rpcUrls: {
|
|
766
|
+
default: {
|
|
767
|
+
http: ["https://rpc.gobob.xyz"],
|
|
768
|
+
webSocket: ["wss://rpc.gobob.xyz"]
|
|
769
|
+
}
|
|
770
|
+
},
|
|
771
|
+
blockExplorers: {
|
|
772
|
+
default: {
|
|
773
|
+
name: "Blockscout",
|
|
774
|
+
url: "https://explorer.gobob.xyz"
|
|
775
|
+
}
|
|
776
|
+
},
|
|
777
|
+
contracts: {
|
|
778
|
+
multicall3: {
|
|
779
|
+
address: "0x63f8279bccDb75c0F38e0CD6B6A0c72a0a760FF9",
|
|
780
|
+
blockCreated: 457045
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
testnet: !1
|
|
784
|
+
});
|
|
785
|
+
b({
|
|
786
|
+
id: 53457,
|
|
787
|
+
name: "DODOchain Testnet",
|
|
788
|
+
nativeCurrency: { decimals: 18, name: "DODO", symbol: "DODO" },
|
|
789
|
+
rpcUrls: {
|
|
790
|
+
default: {
|
|
791
|
+
http: ["https://dodochain-testnet.alt.technology"],
|
|
792
|
+
webSocket: ["wss://dodochain-testnet.alt.technology/ws"]
|
|
793
|
+
}
|
|
794
|
+
},
|
|
795
|
+
blockExplorers: {
|
|
796
|
+
default: {
|
|
797
|
+
name: "DODOchain Testnet (Sepolia) Explorer",
|
|
798
|
+
url: "https://testnet-scan.dodochain.com"
|
|
799
|
+
}
|
|
800
|
+
},
|
|
801
|
+
testnet: !0
|
|
802
|
+
});
|
|
803
|
+
const _ = 1;
|
|
804
|
+
({
|
|
805
|
+
...l,
|
|
806
|
+
contracts: {
|
|
807
|
+
...l.contracts,
|
|
808
|
+
l2OutputOracle: _ + "",
|
|
809
|
+
portal: _ + "",
|
|
810
|
+
l1StandardBridge: _ + ""
|
|
811
|
+
}
|
|
812
|
+
});
|
|
813
|
+
const $ = 17e3;
|
|
814
|
+
({
|
|
815
|
+
...l,
|
|
816
|
+
contracts: {
|
|
817
|
+
...l.contracts,
|
|
818
|
+
l2OutputOracle: $ + "",
|
|
819
|
+
portal: $ + "",
|
|
820
|
+
l1StandardBridge: $ + ""
|
|
821
|
+
}
|
|
822
|
+
});
|
|
823
|
+
const Ct = 11155111;
|
|
824
|
+
b({
|
|
825
|
+
...l,
|
|
826
|
+
id: 3397901,
|
|
827
|
+
network: "funkiSepolia",
|
|
828
|
+
name: "Funki Sepolia Sandbox",
|
|
829
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
830
|
+
rpcUrls: {
|
|
831
|
+
default: {
|
|
832
|
+
http: ["https://funki-testnet.alt.technology"]
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
blockExplorers: {
|
|
836
|
+
default: {
|
|
837
|
+
name: "Funki Sepolia Sandbox Explorer",
|
|
838
|
+
url: "https://sepolia-sandbox.funkichain.com/"
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
testnet: !0,
|
|
842
|
+
contracts: {
|
|
843
|
+
...l.contracts,
|
|
844
|
+
multicall3: {
|
|
845
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
846
|
+
blockCreated: 1620204
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
sourceId: Ct
|
|
850
|
+
});
|
|
851
|
+
const V = 11155111;
|
|
852
|
+
({
|
|
853
|
+
...l,
|
|
854
|
+
contracts: {
|
|
855
|
+
...l.contracts,
|
|
856
|
+
l2OutputOracle: V + "",
|
|
857
|
+
portal: V + "",
|
|
858
|
+
l1StandardBridge: V + ""
|
|
859
|
+
}
|
|
860
|
+
});
|
|
861
|
+
const It = /* @__PURE__ */ b({
|
|
862
|
+
id: 1,
|
|
863
|
+
name: "Ethereum",
|
|
864
|
+
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
865
|
+
rpcUrls: {
|
|
866
|
+
default: {
|
|
867
|
+
http: ["https://cloudflare-eth.com"]
|
|
868
|
+
}
|
|
869
|
+
},
|
|
870
|
+
blockExplorers: {
|
|
871
|
+
default: {
|
|
872
|
+
name: "Etherscan",
|
|
873
|
+
url: "https://etherscan.io",
|
|
874
|
+
apiUrl: "https://api.etherscan.io/api"
|
|
875
|
+
}
|
|
876
|
+
},
|
|
877
|
+
contracts: {
|
|
878
|
+
ensRegistry: {
|
|
879
|
+
address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e"
|
|
880
|
+
},
|
|
881
|
+
ensUniversalResolver: {
|
|
882
|
+
address: "0xce01f8eee7E479C928F8919abD53E553a36CeF67",
|
|
883
|
+
blockCreated: 19258213
|
|
884
|
+
},
|
|
885
|
+
multicall3: {
|
|
886
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
887
|
+
blockCreated: 14353601
|
|
888
|
+
}
|
|
889
|
+
}
|
|
890
|
+
}), N = 1;
|
|
891
|
+
({
|
|
892
|
+
...l,
|
|
893
|
+
contracts: {
|
|
894
|
+
...l.contracts,
|
|
895
|
+
l2OutputOracle: N + "",
|
|
896
|
+
portal: N + "",
|
|
897
|
+
l1StandardBridge: N + ""
|
|
898
|
+
}
|
|
899
|
+
});
|
|
900
|
+
const M = 1;
|
|
901
|
+
({
|
|
902
|
+
...l,
|
|
903
|
+
contracts: {
|
|
904
|
+
...l.contracts,
|
|
905
|
+
l2OutputOracle: M + "",
|
|
906
|
+
portal: M + "",
|
|
907
|
+
l1StandardBridge: M + ""
|
|
908
|
+
}
|
|
909
|
+
});
|
|
910
|
+
const j = 5;
|
|
911
|
+
({
|
|
912
|
+
...l,
|
|
913
|
+
contracts: {
|
|
914
|
+
...l.contracts,
|
|
915
|
+
l2OutputOracle: j + "",
|
|
916
|
+
portal: j + "",
|
|
917
|
+
l1StandardBridge: j + ""
|
|
918
|
+
}
|
|
919
|
+
});
|
|
920
|
+
const k = 11155111;
|
|
921
|
+
({
|
|
922
|
+
...l,
|
|
923
|
+
contracts: {
|
|
924
|
+
...l.contracts,
|
|
925
|
+
disputeGameFactory: k + "",
|
|
926
|
+
l2OutputOracle: k + "",
|
|
927
|
+
portal: k + "",
|
|
928
|
+
l1StandardBridge: k + ""
|
|
929
|
+
}
|
|
930
|
+
});
|
|
931
|
+
const K = 1;
|
|
932
|
+
({
|
|
933
|
+
...l,
|
|
934
|
+
contracts: {
|
|
935
|
+
...l.contracts,
|
|
936
|
+
l2OutputOracle: K + "",
|
|
937
|
+
portal: K + "",
|
|
938
|
+
l1StandardBridge: K + ""
|
|
939
|
+
}
|
|
940
|
+
});
|
|
941
|
+
const Z = 11155111;
|
|
942
|
+
({
|
|
943
|
+
...l,
|
|
944
|
+
contracts: {
|
|
945
|
+
...l.contracts,
|
|
946
|
+
l2OutputOracle: Z + "",
|
|
947
|
+
portal: Z + "",
|
|
948
|
+
l1StandardBridge: Z + ""
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
const At = /* @__PURE__ */ b({
|
|
952
|
+
id: 11155111,
|
|
953
|
+
name: "Sepolia",
|
|
954
|
+
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
955
|
+
rpcUrls: {
|
|
956
|
+
default: {
|
|
957
|
+
http: ["https://rpc.sepolia.org"]
|
|
958
|
+
}
|
|
959
|
+
},
|
|
960
|
+
blockExplorers: {
|
|
961
|
+
default: {
|
|
962
|
+
name: "Etherscan",
|
|
963
|
+
url: "https://sepolia.etherscan.io",
|
|
964
|
+
apiUrl: "https://api-sepolia.etherscan.io/api"
|
|
965
|
+
}
|
|
966
|
+
},
|
|
967
|
+
contracts: {
|
|
968
|
+
multicall3: {
|
|
969
|
+
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
970
|
+
blockCreated: 751532
|
|
971
|
+
},
|
|
972
|
+
ensRegistry: { address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e" },
|
|
973
|
+
ensUniversalResolver: {
|
|
974
|
+
address: "0xc8Af999e38273D658BE1b921b88A9Ddf005769cC",
|
|
975
|
+
blockCreated: 5317080
|
|
976
|
+
}
|
|
977
|
+
},
|
|
978
|
+
testnet: !0
|
|
979
|
+
}), W = 1;
|
|
980
|
+
({
|
|
981
|
+
...l,
|
|
982
|
+
contracts: {
|
|
983
|
+
...l.contracts,
|
|
984
|
+
l2OutputOracle: W + "",
|
|
985
|
+
portal: W + "",
|
|
986
|
+
l1StandardBridge: W + ""
|
|
987
|
+
}
|
|
988
|
+
});
|
|
989
|
+
const q = 11155111;
|
|
990
|
+
({
|
|
991
|
+
...l,
|
|
992
|
+
contracts: {
|
|
993
|
+
...l.contracts,
|
|
994
|
+
l2OutputOracle: q + "",
|
|
995
|
+
portal: q + "",
|
|
996
|
+
l1StandardBridge: q + ""
|
|
997
|
+
}
|
|
998
|
+
});
|
|
999
|
+
const fe = 5;
|
|
1000
|
+
({
|
|
1001
|
+
...l,
|
|
1002
|
+
contracts: {
|
|
1003
|
+
...l.contracts,
|
|
1004
|
+
portal: fe + ""
|
|
1005
|
+
}
|
|
1006
|
+
});
|
|
1007
|
+
export {
|
|
1008
|
+
It as mainnet,
|
|
1009
|
+
At as sepolia
|
|
1010
|
+
};
|