@gardenfi/core 2.3.3 → 2.4.0-beta.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/{ccip-BOasyyJL.js → ccip-BEaoEhEE.js} +1 -1
- package/dist/{ccip-mXBzRX9d.cjs → ccip-PvTvY3At.cjs} +1 -1
- package/dist/{index-BISodM76.js → index-CIaJFDz8.js} +403 -454
- package/dist/{index-C65-QBEm.cjs → index-Cl50Tn-z.cjs} +17 -17
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +4 -4
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { SupportedAssets as If, ArbitrumLocalnet as Yy, EthereumLocalnet as Zy, isEVM as Xy, isEvmNativeToken as Jy, isSolanaNativeToken as Qy, Orderbook as em, isMainnet as ws, getTimeLock as tm, isBitcoin as Ko, getBlockchainType as Yo, BlockchainType as
|
|
2
|
-
import { Network as Br, Environment as Yt, Ok as ie, Err as H, Url as
|
|
1
|
+
import { SupportedAssets as If, ArbitrumLocalnet as Yy, EthereumLocalnet as Zy, isEVM as Xy, isEvmNativeToken as Jy, isSolanaNativeToken as Qy, Orderbook as em, isMainnet as ws, getTimeLock as tm, isBitcoin as Ko, getBlockchainType as Yo, BlockchainType as dt } from "@gardenfi/orderbook";
|
|
2
|
+
import { Network as Br, Environment as Yt, Ok as ie, Err as H, Url as mt, Fetcher as Ie, EventBroker as dp, trim0x as Wt, with0x as ot, checkAllowanceAndApprove as rm, waitForTransactionReceipt as nm, sleep as Ms, hexToU32Array as Xs, DigestKey as kf, Siwe as Bf } from "@gardenfi/utils";
|
|
3
3
|
import * as Of from "varuint-bitcoin";
|
|
4
4
|
import im from "varuint-bitcoin";
|
|
5
|
-
import * as
|
|
5
|
+
import * as bt from "tiny-secp256k1";
|
|
6
6
|
import * as le from "bitcoinjs-lib";
|
|
7
7
|
import { crypto as sm, Transaction as Dt, script as Kr, payments as Gt, address as xi, networks as Zo, Psbt as Cf, initEccLib as om } from "bitcoinjs-lib";
|
|
8
8
|
import am from "bignumber.js";
|
|
@@ -14,7 +14,7 @@ import { BIP32Factory as lm } from "bip32";
|
|
|
14
14
|
import { web3 as Yr, BN as Ff, Program as yp } from "@coral-xyz/anchor";
|
|
15
15
|
var Ee = /* @__PURE__ */ ((e) => (e.Idle = "Idle", e.Initiate = "Initiate", e.Redeem = "Redeem", e.Refund = "Refund", e))(Ee || {});
|
|
16
16
|
const pm = "1.0.8";
|
|
17
|
-
let
|
|
17
|
+
let ct = class Cc extends Error {
|
|
18
18
|
constructor(t, r = {}) {
|
|
19
19
|
var o;
|
|
20
20
|
const n = r.cause instanceof Cc ? r.cause.details : (o = r.cause) != null && o.message ? r.cause.message : r.details, i = r.cause instanceof Cc && r.cause.docsPath || r.docsPath, s = [
|
|
@@ -140,7 +140,7 @@ const Tm = /* @__PURE__ */ new Set(["indexed"]), Nc = /* @__PURE__ */ new Set([
|
|
|
140
140
|
"memory",
|
|
141
141
|
"storage"
|
|
142
142
|
]);
|
|
143
|
-
class Im extends
|
|
143
|
+
class Im extends ct {
|
|
144
144
|
constructor({ signature: t }) {
|
|
145
145
|
super("Failed to parse ABI item.", {
|
|
146
146
|
details: `parseAbiItem(${JSON.stringify(t, null, 2)})`,
|
|
@@ -153,7 +153,7 @@ class Im extends ut {
|
|
|
153
153
|
});
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
|
-
class km extends
|
|
156
|
+
class km extends ct {
|
|
157
157
|
constructor({ type: t }) {
|
|
158
158
|
super("Unknown type.", {
|
|
159
159
|
metaMessages: [
|
|
@@ -167,7 +167,7 @@ class km extends ut {
|
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
-
class Bm extends
|
|
170
|
+
class Bm extends ct {
|
|
171
171
|
constructor({ type: t }) {
|
|
172
172
|
super("Unknown type.", {
|
|
173
173
|
metaMessages: [`Type "${t}" is not a valid ABI type.`]
|
|
@@ -179,7 +179,7 @@ class Bm extends ut {
|
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
|
-
class Om extends
|
|
182
|
+
class Om extends ct {
|
|
183
183
|
constructor({ param: t }) {
|
|
184
184
|
super("Invalid ABI parameter.", {
|
|
185
185
|
details: t
|
|
@@ -191,7 +191,7 @@ class Om extends ut {
|
|
|
191
191
|
});
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
class Cm extends
|
|
194
|
+
class Cm extends ct {
|
|
195
195
|
constructor({ param: t, name: r }) {
|
|
196
196
|
super("Invalid ABI parameter.", {
|
|
197
197
|
details: t,
|
|
@@ -206,7 +206,7 @@ class Cm extends ut {
|
|
|
206
206
|
});
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
class Rm extends
|
|
209
|
+
class Rm extends ct {
|
|
210
210
|
constructor({ param: t, type: r, modifier: n }) {
|
|
211
211
|
super("Invalid ABI parameter.", {
|
|
212
212
|
details: t,
|
|
@@ -221,7 +221,7 @@ class Rm extends ut {
|
|
|
221
221
|
});
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
class Nm extends
|
|
224
|
+
class Nm extends ct {
|
|
225
225
|
constructor({ param: t, type: r, modifier: n }) {
|
|
226
226
|
super("Invalid ABI parameter.", {
|
|
227
227
|
details: t,
|
|
@@ -237,7 +237,7 @@ class Nm extends ut {
|
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
|
-
class Fm extends
|
|
240
|
+
class Fm extends ct {
|
|
241
241
|
constructor({ abiParameter: t }) {
|
|
242
242
|
super("Invalid ABI parameter.", {
|
|
243
243
|
details: JSON.stringify(t, null, 2),
|
|
@@ -250,7 +250,7 @@ class Fm extends ut {
|
|
|
250
250
|
});
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
|
-
class Qn extends
|
|
253
|
+
class Qn extends ct {
|
|
254
254
|
constructor({ signature: t, type: r }) {
|
|
255
255
|
super(`Invalid ${r} signature.`, {
|
|
256
256
|
details: t
|
|
@@ -262,7 +262,7 @@ class Qn extends ut {
|
|
|
262
262
|
});
|
|
263
263
|
}
|
|
264
264
|
}
|
|
265
|
-
class $m extends
|
|
265
|
+
class $m extends ct {
|
|
266
266
|
constructor({ signature: t }) {
|
|
267
267
|
super("Unknown signature.", {
|
|
268
268
|
details: t
|
|
@@ -274,7 +274,7 @@ class $m extends ut {
|
|
|
274
274
|
});
|
|
275
275
|
}
|
|
276
276
|
}
|
|
277
|
-
class Um extends
|
|
277
|
+
class Um extends ct {
|
|
278
278
|
constructor({ signature: t }) {
|
|
279
279
|
super("Invalid struct signature.", {
|
|
280
280
|
details: t,
|
|
@@ -287,7 +287,7 @@ class Um extends ut {
|
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
class Hm extends
|
|
290
|
+
class Hm extends ct {
|
|
291
291
|
constructor({ type: t }) {
|
|
292
292
|
super("Circular reference detected.", {
|
|
293
293
|
metaMessages: [`Struct "${t}" is a circular reference.`]
|
|
@@ -299,7 +299,7 @@ class Hm extends ut {
|
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
class Lm extends
|
|
302
|
+
class Lm extends ct {
|
|
303
303
|
constructor({ current: t, depth: r }) {
|
|
304
304
|
super("Unbalanced parentheses.", {
|
|
305
305
|
metaMessages: [
|
|
@@ -1090,7 +1090,7 @@ let mg = class extends D {
|
|
|
1090
1090
|
super(`Size cannot exceed ${r} bytes. Given size: ${t} bytes.`, { name: "SizeOverflowError" });
|
|
1091
1091
|
}
|
|
1092
1092
|
};
|
|
1093
|
-
function
|
|
1093
|
+
function wt(e, { dir: t = "left" } = {}) {
|
|
1094
1094
|
let r = typeof e == "string" ? e.replace("0x", "") : e, n = 0;
|
|
1095
1095
|
for (let i = 0; i < r.length - 1 && r[t === "left" ? i : r.length - i - 1].toString() === "0"; i++)
|
|
1096
1096
|
n++;
|
|
@@ -1114,13 +1114,13 @@ function $e(e, t = {}) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
function gg(e, t = {}) {
|
|
1116
1116
|
let r = e;
|
|
1117
|
-
if (t.size && (Ot(r, { size: t.size }), r =
|
|
1117
|
+
if (t.size && (Ot(r, { size: t.size }), r = wt(r)), wt(r) === "0x00")
|
|
1118
1118
|
return !1;
|
|
1119
|
-
if (
|
|
1119
|
+
if (wt(r) === "0x01")
|
|
1120
1120
|
return !0;
|
|
1121
1121
|
throw new yg(r);
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function Et(e, t = {}) {
|
|
1124
1124
|
return Number($e(e, t));
|
|
1125
1125
|
}
|
|
1126
1126
|
const bg = /* @__PURE__ */ Array.from({ length: 256 }, (e, t) => t.toString(16).padStart(2, "0"));
|
|
@@ -1543,7 +1543,7 @@ function Fe(e, t) {
|
|
|
1543
1543
|
const i = Zg.test(e) ? e.toLowerCase() === e ? !0 : r ? ss(e) === e : !0 : !1;
|
|
1544
1544
|
return ea.set(n, i), i;
|
|
1545
1545
|
}
|
|
1546
|
-
function
|
|
1546
|
+
function At(e) {
|
|
1547
1547
|
return typeof e[0] == "string" ? Ct(e) : Xg(e);
|
|
1548
1548
|
}
|
|
1549
1549
|
function Xg(e) {
|
|
@@ -1652,7 +1652,7 @@ function Pu(e) {
|
|
|
1652
1652
|
const { dynamic: o, encoded: a } = e[s];
|
|
1653
1653
|
o ? (r.push(K(t + i, { size: 32 })), n.push(a), i += _e(a)) : r.push(a);
|
|
1654
1654
|
}
|
|
1655
|
-
return
|
|
1655
|
+
return At([...r, ...n]);
|
|
1656
1656
|
}
|
|
1657
1657
|
function eb(e) {
|
|
1658
1658
|
if (!Fe(e))
|
|
@@ -1681,7 +1681,7 @@ function tb(e, { length: t, param: r }) {
|
|
|
1681
1681
|
const a = K(s.length, { size: 32 });
|
|
1682
1682
|
return {
|
|
1683
1683
|
dynamic: !0,
|
|
1684
|
-
encoded: s.length > 0 ?
|
|
1684
|
+
encoded: s.length > 0 ? At([a, o]) : a
|
|
1685
1685
|
};
|
|
1686
1686
|
}
|
|
1687
1687
|
if (i)
|
|
@@ -1689,7 +1689,7 @@ function tb(e, { length: t, param: r }) {
|
|
|
1689
1689
|
}
|
|
1690
1690
|
return {
|
|
1691
1691
|
dynamic: !1,
|
|
1692
|
-
encoded:
|
|
1692
|
+
encoded: At(s.map(({ encoded: o }) => o))
|
|
1693
1693
|
};
|
|
1694
1694
|
}
|
|
1695
1695
|
function rb(e, { param: t }) {
|
|
@@ -1701,7 +1701,7 @@ function rb(e, { param: t }) {
|
|
|
1701
1701
|
size: Math.ceil((e.length - 2) / 2 / 32) * 32
|
|
1702
1702
|
})), {
|
|
1703
1703
|
dynamic: !0,
|
|
1704
|
-
encoded:
|
|
1704
|
+
encoded: At([Or(K(n, { size: 32 })), i])
|
|
1705
1705
|
};
|
|
1706
1706
|
}
|
|
1707
1707
|
if (n !== Number.parseInt(r))
|
|
@@ -1744,7 +1744,7 @@ function sb(e) {
|
|
|
1744
1744
|
}));
|
|
1745
1745
|
return {
|
|
1746
1746
|
dynamic: !0,
|
|
1747
|
-
encoded:
|
|
1747
|
+
encoded: At([
|
|
1748
1748
|
Or(K(_e(t), { size: 32 })),
|
|
1749
1749
|
...n
|
|
1750
1750
|
])
|
|
@@ -1762,7 +1762,7 @@ function ob(e, { param: t }) {
|
|
|
1762
1762
|
}
|
|
1763
1763
|
return {
|
|
1764
1764
|
dynamic: r,
|
|
1765
|
-
encoded: r ? Pu(n) :
|
|
1765
|
+
encoded: r ? Pu(n) : At(n.map(({ encoded: i }) => i))
|
|
1766
1766
|
};
|
|
1767
1767
|
}
|
|
1768
1768
|
function Tu(e) {
|
|
@@ -1926,7 +1926,7 @@ function ab(e) {
|
|
|
1926
1926
|
functionName: os(It(i))
|
|
1927
1927
|
};
|
|
1928
1928
|
}
|
|
1929
|
-
function
|
|
1929
|
+
function _t(e) {
|
|
1930
1930
|
const { args: t } = e, { abi: r, functionName: n } = (() => {
|
|
1931
1931
|
var a;
|
|
1932
1932
|
return e.abi.length === 1 && ((a = e.functionName) != null && a.startsWith("0x")) ? e : ab(e);
|
|
@@ -2112,18 +2112,18 @@ function db(e, t = {}) {
|
|
|
2112
2112
|
}
|
|
2113
2113
|
function lb(e, t = {}) {
|
|
2114
2114
|
let r = e;
|
|
2115
|
-
if (typeof t.size < "u" && (Ot(r, { size: t.size }), r =
|
|
2115
|
+
if (typeof t.size < "u" && (Ot(r, { size: t.size }), r = wt(r)), r.length > 1 || r[0] > 1)
|
|
2116
2116
|
throw new hg(r);
|
|
2117
2117
|
return !!r[0];
|
|
2118
2118
|
}
|
|
2119
2119
|
function dr(e, t = {}) {
|
|
2120
2120
|
typeof t.size < "u" && Ot(e, { size: t.size });
|
|
2121
2121
|
const r = Oe(e, t);
|
|
2122
|
-
return
|
|
2122
|
+
return Et(r, t);
|
|
2123
2123
|
}
|
|
2124
2124
|
function pb(e, t = {}) {
|
|
2125
2125
|
let r = e;
|
|
2126
|
-
return typeof t.size < "u" && (Ot(r, { size: t.size }), r =
|
|
2126
|
+
return typeof t.size < "u" && (Ot(r, { size: t.size }), r = wt(r, { dir: "right" })), new TextDecoder().decode(r);
|
|
2127
2127
|
}
|
|
2128
2128
|
function cs(e, t) {
|
|
2129
2129
|
const r = typeof t == "string" ? kt(t) : t, n = ku(r);
|
|
@@ -2263,7 +2263,7 @@ function vb(e, { staticPosition: t }) {
|
|
|
2263
2263
|
const i = dr(e.readBytes(32));
|
|
2264
2264
|
if (i === 0)
|
|
2265
2265
|
return e.setPosition(t + 32), ["", 32];
|
|
2266
|
-
const s = e.readBytes(i, 32), o = pb(
|
|
2266
|
+
const s = e.readBytes(i, 32), o = pb(wt(s));
|
|
2267
2267
|
return e.setPosition(t + 32), [o, 32];
|
|
2268
2268
|
}
|
|
2269
2269
|
function $i(e) {
|
|
@@ -2726,7 +2726,7 @@ class it extends D {
|
|
|
2726
2726
|
}), this.name = s || t.name, this.code = t instanceof Cu ? t.code : r ?? Ub;
|
|
2727
2727
|
}
|
|
2728
2728
|
}
|
|
2729
|
-
class
|
|
2729
|
+
class ut extends it {
|
|
2730
2730
|
constructor(t, r) {
|
|
2731
2731
|
super(t, r), Object.defineProperty(this, "data", {
|
|
2732
2732
|
enumerable: !0,
|
|
@@ -2929,7 +2929,7 @@ Object.defineProperty(qi, "code", {
|
|
|
2929
2929
|
writable: !0,
|
|
2930
2930
|
value: -32006
|
|
2931
2931
|
});
|
|
2932
|
-
class Nn extends
|
|
2932
|
+
class Nn extends ut {
|
|
2933
2933
|
constructor(t) {
|
|
2934
2934
|
super(t, {
|
|
2935
2935
|
code: Nn.code,
|
|
@@ -2944,7 +2944,7 @@ Object.defineProperty(Nn, "code", {
|
|
|
2944
2944
|
writable: !0,
|
|
2945
2945
|
value: 4001
|
|
2946
2946
|
});
|
|
2947
|
-
class Gi extends
|
|
2947
|
+
class Gi extends ut {
|
|
2948
2948
|
constructor(t) {
|
|
2949
2949
|
super(t, {
|
|
2950
2950
|
code: Gi.code,
|
|
@@ -2959,7 +2959,7 @@ Object.defineProperty(Gi, "code", {
|
|
|
2959
2959
|
writable: !0,
|
|
2960
2960
|
value: 4100
|
|
2961
2961
|
});
|
|
2962
|
-
class Vi extends
|
|
2962
|
+
class Vi extends ut {
|
|
2963
2963
|
constructor(t, { method: r } = {}) {
|
|
2964
2964
|
super(t, {
|
|
2965
2965
|
code: Vi.code,
|
|
@@ -2974,7 +2974,7 @@ Object.defineProperty(Vi, "code", {
|
|
|
2974
2974
|
writable: !0,
|
|
2975
2975
|
value: 4200
|
|
2976
2976
|
});
|
|
2977
|
-
class Wi extends
|
|
2977
|
+
class Wi extends ut {
|
|
2978
2978
|
constructor(t) {
|
|
2979
2979
|
super(t, {
|
|
2980
2980
|
code: Wi.code,
|
|
@@ -2989,7 +2989,7 @@ Object.defineProperty(Wi, "code", {
|
|
|
2989
2989
|
writable: !0,
|
|
2990
2990
|
value: 4900
|
|
2991
2991
|
});
|
|
2992
|
-
class Ki extends
|
|
2992
|
+
class Ki extends ut {
|
|
2993
2993
|
constructor(t) {
|
|
2994
2994
|
super(t, {
|
|
2995
2995
|
code: Ki.code,
|
|
@@ -3004,7 +3004,7 @@ Object.defineProperty(Ki, "code", {
|
|
|
3004
3004
|
writable: !0,
|
|
3005
3005
|
value: 4901
|
|
3006
3006
|
});
|
|
3007
|
-
class Yi extends
|
|
3007
|
+
class Yi extends ut {
|
|
3008
3008
|
constructor(t) {
|
|
3009
3009
|
super(t, {
|
|
3010
3010
|
code: Yi.code,
|
|
@@ -3019,7 +3019,7 @@ Object.defineProperty(Yi, "code", {
|
|
|
3019
3019
|
writable: !0,
|
|
3020
3020
|
value: 4902
|
|
3021
3021
|
});
|
|
3022
|
-
class zn extends
|
|
3022
|
+
class zn extends ut {
|
|
3023
3023
|
constructor(t) {
|
|
3024
3024
|
super(t, {
|
|
3025
3025
|
code: zn.code,
|
|
@@ -3034,7 +3034,7 @@ Object.defineProperty(zn, "code", {
|
|
|
3034
3034
|
writable: !0,
|
|
3035
3035
|
value: 5700
|
|
3036
3036
|
});
|
|
3037
|
-
class Zi extends
|
|
3037
|
+
class Zi extends ut {
|
|
3038
3038
|
constructor(t) {
|
|
3039
3039
|
super(t, {
|
|
3040
3040
|
code: Zi.code,
|
|
@@ -3049,7 +3049,7 @@ Object.defineProperty(Zi, "code", {
|
|
|
3049
3049
|
writable: !0,
|
|
3050
3050
|
value: 5710
|
|
3051
3051
|
});
|
|
3052
|
-
class Xi extends
|
|
3052
|
+
class Xi extends ut {
|
|
3053
3053
|
constructor(t) {
|
|
3054
3054
|
super(t, {
|
|
3055
3055
|
code: Xi.code,
|
|
@@ -3064,7 +3064,7 @@ Object.defineProperty(Xi, "code", {
|
|
|
3064
3064
|
writable: !0,
|
|
3065
3065
|
value: 5720
|
|
3066
3066
|
});
|
|
3067
|
-
class Ji extends
|
|
3067
|
+
class Ji extends ut {
|
|
3068
3068
|
constructor(t) {
|
|
3069
3069
|
super(t, {
|
|
3070
3070
|
code: Ji.code,
|
|
@@ -3079,7 +3079,7 @@ Object.defineProperty(Ji, "code", {
|
|
|
3079
3079
|
writable: !0,
|
|
3080
3080
|
value: 5730
|
|
3081
3081
|
});
|
|
3082
|
-
class Qi extends
|
|
3082
|
+
class Qi extends ut {
|
|
3083
3083
|
constructor(t) {
|
|
3084
3084
|
super(t, {
|
|
3085
3085
|
code: Qi.code,
|
|
@@ -3094,7 +3094,7 @@ Object.defineProperty(Qi, "code", {
|
|
|
3094
3094
|
writable: !0,
|
|
3095
3095
|
value: 5740
|
|
3096
3096
|
});
|
|
3097
|
-
class es extends
|
|
3097
|
+
class es extends ut {
|
|
3098
3098
|
constructor(t) {
|
|
3099
3099
|
super(t, {
|
|
3100
3100
|
code: es.code,
|
|
@@ -3109,7 +3109,7 @@ Object.defineProperty(es, "code", {
|
|
|
3109
3109
|
writable: !0,
|
|
3110
3110
|
value: 5750
|
|
3111
3111
|
});
|
|
3112
|
-
class qn extends
|
|
3112
|
+
class qn extends ut {
|
|
3113
3113
|
constructor(t) {
|
|
3114
3114
|
super(t, {
|
|
3115
3115
|
code: qn.code,
|
|
@@ -3163,7 +3163,7 @@ async function Db({ hash: e, signature: t }) {
|
|
|
3163
3163
|
const o = Zt(t) ? t : De(t);
|
|
3164
3164
|
if (_e(o) !== 65)
|
|
3165
3165
|
throw new Error("invalid signature length");
|
|
3166
|
-
const a =
|
|
3166
|
+
const a = Et(`0x${o.slice(130)}`), c = td(a);
|
|
3167
3167
|
return n.Signature.fromCompact(o.substring(2, 130)).addRecoveryBit(c);
|
|
3168
3168
|
})().recoverPublicKey(r.substring(2)).toHex(!1)}`;
|
|
3169
3169
|
}
|
|
@@ -3620,13 +3620,13 @@ function vo(e) {
|
|
|
3620
3620
|
...e,
|
|
3621
3621
|
blockHash: e.blockHash ? e.blockHash : null,
|
|
3622
3622
|
blockNumber: e.blockNumber ? BigInt(e.blockNumber) : null,
|
|
3623
|
-
chainId: e.chainId ?
|
|
3623
|
+
chainId: e.chainId ? Et(e.chainId) : void 0,
|
|
3624
3624
|
gas: e.gas ? BigInt(e.gas) : void 0,
|
|
3625
3625
|
gasPrice: e.gasPrice ? BigInt(e.gasPrice) : void 0,
|
|
3626
3626
|
maxFeePerBlobGas: e.maxFeePerBlobGas ? BigInt(e.maxFeePerBlobGas) : void 0,
|
|
3627
3627
|
maxFeePerGas: e.maxFeePerGas ? BigInt(e.maxFeePerGas) : void 0,
|
|
3628
3628
|
maxPriorityFeePerGas: e.maxPriorityFeePerGas ? BigInt(e.maxPriorityFeePerGas) : void 0,
|
|
3629
|
-
nonce: e.nonce ?
|
|
3629
|
+
nonce: e.nonce ? Et(e.nonce) : void 0,
|
|
3630
3630
|
to: e.to ? e.to : null,
|
|
3631
3631
|
transactionIndex: e.transactionIndex ? Number(e.transactionIndex) : null,
|
|
3632
3632
|
type: e.type ? ph[e.type] : void 0,
|
|
@@ -3788,7 +3788,7 @@ async function Hu(e, { address: t, blockTag: r = "latest", blockNumber: n }) {
|
|
|
3788
3788
|
}, {
|
|
3789
3789
|
dedupe: !!n
|
|
3790
3790
|
});
|
|
3791
|
-
return
|
|
3791
|
+
return Et(i);
|
|
3792
3792
|
}
|
|
3793
3793
|
function Lu(e) {
|
|
3794
3794
|
const { kzg: t } = e, r = e.to ?? (typeof e.blobs[0] == "string" ? "hex" : "bytes"), n = typeof e.blobs[0] == "string" ? e.blobs.map((s) => kt(s)) : e.blobs, i = [];
|
|
@@ -4101,7 +4101,7 @@ async function ni(e) {
|
|
|
4101
4101
|
const t = await e.request({
|
|
4102
4102
|
method: "eth_chainId"
|
|
4103
4103
|
}, { dedupe: !0 });
|
|
4104
|
-
return
|
|
4104
|
+
return Et(t);
|
|
4105
4105
|
}
|
|
4106
4106
|
const Ph = [
|
|
4107
4107
|
"blobVersionedHashes",
|
|
@@ -4278,7 +4278,7 @@ async function zu(e, t) {
|
|
|
4278
4278
|
}
|
|
4279
4279
|
}
|
|
4280
4280
|
async function Ih(e, t) {
|
|
4281
|
-
const { abi: r, address: n, args: i, functionName: s, dataSuffix: o, ...a } = t, c =
|
|
4281
|
+
const { abi: r, address: n, args: i, functionName: s, dataSuffix: o, ...a } = t, c = _t({
|
|
4282
4282
|
abi: r,
|
|
4283
4283
|
args: i,
|
|
4284
4284
|
functionName: s
|
|
@@ -4527,7 +4527,7 @@ function Yu(e, t) {
|
|
|
4527
4527
|
function Oh(e, t) {
|
|
4528
4528
|
return Yu(e, t).reverse();
|
|
4529
4529
|
}
|
|
4530
|
-
function
|
|
4530
|
+
function ht(e, t, r) {
|
|
4531
4531
|
let n;
|
|
4532
4532
|
if (typeof t == "string")
|
|
4533
4533
|
try {
|
|
@@ -4729,26 +4729,26 @@ function Iw(e, t = {}) {
|
|
|
4729
4729
|
return i;
|
|
4730
4730
|
}
|
|
4731
4731
|
function Xu(e, t) {
|
|
4732
|
-
if (
|
|
4732
|
+
if (xt(e) > t)
|
|
4733
4733
|
throw new zw({
|
|
4734
|
-
givenSize:
|
|
4734
|
+
givenSize: xt(e),
|
|
4735
4735
|
maxSize: t
|
|
4736
4736
|
});
|
|
4737
4737
|
}
|
|
4738
4738
|
function kw(e, t) {
|
|
4739
|
-
if (typeof t == "number" && t > 0 && t >
|
|
4739
|
+
if (typeof t == "number" && t > 0 && t > xt(e) - 1)
|
|
4740
4740
|
throw new Uh({
|
|
4741
4741
|
offset: t,
|
|
4742
4742
|
position: "start",
|
|
4743
|
-
size:
|
|
4743
|
+
size: xt(e)
|
|
4744
4744
|
});
|
|
4745
4745
|
}
|
|
4746
4746
|
function Bw(e, t, r) {
|
|
4747
|
-
if (typeof t == "number" && typeof r == "number" &&
|
|
4747
|
+
if (typeof t == "number" && typeof r == "number" && xt(e) !== r - t)
|
|
4748
4748
|
throw new Uh({
|
|
4749
4749
|
offset: r,
|
|
4750
4750
|
position: "end",
|
|
4751
|
-
size:
|
|
4751
|
+
size: xt(e)
|
|
4752
4752
|
});
|
|
4753
4753
|
}
|
|
4754
4754
|
function Rh(e, t = {}) {
|
|
@@ -4874,7 +4874,7 @@ function Qu(e, t, r, n = {}) {
|
|
|
4874
4874
|
const s = `0x${e.replace("0x", "").slice((t ?? 0) * 2, (r ?? e.length) * 2)}`;
|
|
4875
4875
|
return i && Bw(s, t, r), s;
|
|
4876
4876
|
}
|
|
4877
|
-
function
|
|
4877
|
+
function xt(e) {
|
|
4878
4878
|
return Math.ceil((e.length - 2) / 2);
|
|
4879
4879
|
}
|
|
4880
4880
|
function jw(e, t = {}) {
|
|
@@ -5442,7 +5442,7 @@ async function To(e, t) {
|
|
|
5442
5442
|
});
|
|
5443
5443
|
return Z === "0x" ? { data: void 0 } : { data: Z };
|
|
5444
5444
|
} catch (J) {
|
|
5445
|
-
const M = r1(J), { offchainLookup: k, offchainLookupSignature: q } = await import("./ccip-
|
|
5445
|
+
const M = r1(J), { offchainLookup: k, offchainLookupSignature: q } = await import("./ccip-BEaoEhEE.js");
|
|
5446
5446
|
if (e.ccipRead !== !1 && (M == null ? void 0 : M.slice(0, 10)) === q && x)
|
|
5447
5447
|
return { data: await k(e, { data: M, to: x }) };
|
|
5448
5448
|
throw O && (M == null ? void 0 : M.slice(0, 10)) === "0x101bb98d" ? new $b({ factory: y }) : zh(J, {
|
|
@@ -5480,7 +5480,7 @@ async function Qw(e, t) {
|
|
|
5480
5480
|
allowFailure: !0,
|
|
5481
5481
|
callData: x.data,
|
|
5482
5482
|
target: x.to
|
|
5483
|
-
})), S =
|
|
5483
|
+
})), S = _t({
|
|
5484
5484
|
abi: Zc,
|
|
5485
5485
|
args: [A],
|
|
5486
5486
|
functionName: "aggregate3"
|
|
@@ -5530,7 +5530,7 @@ function r1(e) {
|
|
|
5530
5530
|
return typeof (t == null ? void 0 : t.data) == "object" ? (r = t.data) == null ? void 0 : r.data : t.data;
|
|
5531
5531
|
}
|
|
5532
5532
|
async function Jt(e, t) {
|
|
5533
|
-
const { abi: r, address: n, args: i, functionName: s, ...o } = t, a =
|
|
5533
|
+
const { abi: r, address: n, args: i, functionName: s, ...o } = t, a = _t({
|
|
5534
5534
|
abi: r,
|
|
5535
5535
|
args: i,
|
|
5536
5536
|
functionName: s
|
|
@@ -5558,7 +5558,7 @@ async function Jt(e, t) {
|
|
|
5558
5558
|
}
|
|
5559
5559
|
}
|
|
5560
5560
|
async function Gh(e, t) {
|
|
5561
|
-
const { abi: r, address: n, args: i, dataSuffix: s, functionName: o, ...a } = t, c = a.account ? ke(a.account) : e.account, f =
|
|
5561
|
+
const { abi: r, address: n, args: i, dataSuffix: s, functionName: o, ...a } = t, c = a.account ? ke(a.account) : e.account, f = _t({ abi: r, args: i, functionName: o });
|
|
5562
5562
|
try {
|
|
5563
5563
|
const { data: u } = await ee(e, To, "call")({
|
|
5564
5564
|
batch: !1,
|
|
@@ -6000,7 +6000,7 @@ async function Yh(e, t) {
|
|
|
6000
6000
|
throw new yn({
|
|
6001
6001
|
docsPath: "/docs/contract/writeContract"
|
|
6002
6002
|
});
|
|
6003
|
-
const f = n ? ke(n) : null, u =
|
|
6003
|
+
const f = n ? ke(n) : null, u = _t({
|
|
6004
6004
|
abi: r,
|
|
6005
6005
|
args: s,
|
|
6006
6006
|
functionName: a
|
|
@@ -6147,7 +6147,7 @@ function Xh(e) {
|
|
|
6147
6147
|
gasUsed: e.gasUsed ? BigInt(e.gasUsed) : null,
|
|
6148
6148
|
logs: e.logs ? e.logs.map((r) => pr(r)) : null,
|
|
6149
6149
|
to: e.to ? e.to : null,
|
|
6150
|
-
transactionIndex: e.transactionIndex ?
|
|
6150
|
+
transactionIndex: e.transactionIndex ? Et(e.transactionIndex) : null,
|
|
6151
6151
|
status: e.status ? Zh[e.status] : null,
|
|
6152
6152
|
type: e.type ? ph[e.type] || e.type : null
|
|
6153
6153
|
};
|
|
@@ -6158,13 +6158,13 @@ const u1 = /* @__PURE__ */ Ru("transactionReceipt", Xh), Jh = "0x579257925792579
|
|
|
6158
6158
|
});
|
|
6159
6159
|
async function f1(e, t) {
|
|
6160
6160
|
const { account: r = e.account, capabilities: n, chain: i = e.chain, experimental_fallback: s, experimental_fallbackDelay: o = 32, forceAtomic: a = !1, id: c, version: f = "2.0.0" } = t, u = r ? ke(r) : null, d = t.calls.map((y) => {
|
|
6161
|
-
const p = y, g = p.abi ?
|
|
6161
|
+
const p = y, g = p.abi ? _t({
|
|
6162
6162
|
abi: p.abi,
|
|
6163
6163
|
functionName: p.functionName,
|
|
6164
6164
|
args: p.args
|
|
6165
6165
|
}) : p.data;
|
|
6166
6166
|
return {
|
|
6167
|
-
data: p.dataSuffix && g ?
|
|
6167
|
+
data: p.dataSuffix && g ? At([g, p.dataSuffix]) : g,
|
|
6168
6168
|
to: p.to,
|
|
6169
6169
|
value: p.value ? K(p.value) : void 0
|
|
6170
6170
|
};
|
|
@@ -6216,7 +6216,7 @@ async function f1(e, t) {
|
|
|
6216
6216
|
throw b[0].reason;
|
|
6217
6217
|
const E = b.map((A) => A.status === "fulfilled" ? A.value : Qh);
|
|
6218
6218
|
return {
|
|
6219
|
-
id:
|
|
6219
|
+
id: At([
|
|
6220
6220
|
...E,
|
|
6221
6221
|
K(i.id, { size: 32 }),
|
|
6222
6222
|
Jh
|
|
@@ -6233,13 +6233,13 @@ async function f1(e, t) {
|
|
|
6233
6233
|
async function e0(e, t) {
|
|
6234
6234
|
async function r(u) {
|
|
6235
6235
|
if (u.endsWith(Jh.slice(2))) {
|
|
6236
|
-
const y =
|
|
6236
|
+
const y = wt(Qs(u, -64, -32)), p = Qs(u, 0, -64).slice(2).match(/.{1,64}/g), g = await Promise.all(p.map((E) => Qh.slice(2) !== E ? e.request({
|
|
6237
6237
|
method: "eth_getTransactionReceipt",
|
|
6238
6238
|
params: [`0x${E}`]
|
|
6239
6239
|
}, { dedupe: !0 }) : void 0)), b = g.some((E) => E === null) ? 100 : g.every((E) => (E == null ? void 0 : E.status) === "0x1") ? 200 : g.every((E) => (E == null ? void 0 : E.status) === "0x0") ? 500 : 600;
|
|
6240
6240
|
return {
|
|
6241
6241
|
atomic: !1,
|
|
6242
|
-
chainId:
|
|
6242
|
+
chainId: Et(y),
|
|
6243
6243
|
receipts: g.filter(Boolean),
|
|
6244
6244
|
status: b,
|
|
6245
6245
|
version: "2.0.0"
|
|
@@ -6258,7 +6258,7 @@ async function e0(e, t) {
|
|
|
6258
6258
|
...a,
|
|
6259
6259
|
atomic: n,
|
|
6260
6260
|
// @ts-expect-error: for backwards compatibility
|
|
6261
|
-
chainId: i ?
|
|
6261
|
+
chainId: i ? Et(i) : void 0,
|
|
6262
6262
|
receipts: (s == null ? void 0 : s.map((u) => ({
|
|
6263
6263
|
...u,
|
|
6264
6264
|
blockNumber: $e(u.blockNumber),
|
|
@@ -6754,7 +6754,7 @@ function zs(e) {
|
|
|
6754
6754
|
const r = e.split(".");
|
|
6755
6755
|
for (let n = r.length - 1; n >= 0; n -= 1) {
|
|
6756
6756
|
const i = s0(r[n]), s = i ? ti(i) : Me(Zr(r[n]), "bytes");
|
|
6757
|
-
t = Me(
|
|
6757
|
+
t = Me(At([t, s]), "bytes");
|
|
6758
6758
|
}
|
|
6759
6759
|
return Oe(t);
|
|
6760
6760
|
}
|
|
@@ -6793,7 +6793,7 @@ async function P1(e, t) {
|
|
|
6793
6793
|
if (u && !u.some((d) => s.endsWith(d)))
|
|
6794
6794
|
return null;
|
|
6795
6795
|
try {
|
|
6796
|
-
const d =
|
|
6796
|
+
const d = _t({
|
|
6797
6797
|
abi: pd,
|
|
6798
6798
|
functionName: "addr",
|
|
6799
6799
|
...i != null ? { args: [zs(s), BigInt(i)] } : { args: [zs(s)] }
|
|
@@ -6817,7 +6817,7 @@ async function P1(e, t) {
|
|
|
6817
6817
|
functionName: "addr",
|
|
6818
6818
|
data: g[0]
|
|
6819
6819
|
});
|
|
6820
|
-
return b === "0x" ||
|
|
6820
|
+
return b === "0x" || wt(b) === "0x00" ? null : b;
|
|
6821
6821
|
} catch (d) {
|
|
6822
6822
|
if (a)
|
|
6823
6823
|
throw d;
|
|
@@ -7028,7 +7028,7 @@ async function c0(e, t) {
|
|
|
7028
7028
|
functionName: "resolve",
|
|
7029
7029
|
args: [
|
|
7030
7030
|
De(Oo(s)),
|
|
7031
|
-
|
|
7031
|
+
_t({
|
|
7032
7032
|
abi: ld,
|
|
7033
7033
|
functionName: "text",
|
|
7034
7034
|
args: [zs(s), i]
|
|
@@ -7238,7 +7238,7 @@ async function q1(e, { blockHash: t, blockNumber: r, blockTag: n = "latest" } =
|
|
|
7238
7238
|
}, { dedupe: !0 }) : s = await e.request({
|
|
7239
7239
|
method: "eth_getBlockTransactionCountByNumber",
|
|
7240
7240
|
params: [i || n]
|
|
7241
|
-
}, { dedupe: !!i }),
|
|
7241
|
+
}, { dedupe: !!i }), Et(s);
|
|
7242
7242
|
}
|
|
7243
7243
|
async function vd(e, { address: t, blockNumber: r, blockTag: n = "latest" }) {
|
|
7244
7244
|
const i = r !== void 0 ? K(r) : void 0, s = await e.request({
|
|
@@ -7335,7 +7335,7 @@ async function Z1(e, { filter: t }) {
|
|
|
7335
7335
|
strict: r
|
|
7336
7336
|
}) : i;
|
|
7337
7337
|
}
|
|
7338
|
-
function
|
|
7338
|
+
function St(e) {
|
|
7339
7339
|
return {
|
|
7340
7340
|
formatters: void 0,
|
|
7341
7341
|
fees: void 0,
|
|
@@ -7385,7 +7385,7 @@ function e2(e) {
|
|
|
7385
7385
|
data: r,
|
|
7386
7386
|
primaryType: n,
|
|
7387
7387
|
types: i
|
|
7388
|
-
})), Me(
|
|
7388
|
+
})), Me(At(s));
|
|
7389
7389
|
}
|
|
7390
7390
|
function t2({ domain: e, types: t }) {
|
|
7391
7391
|
return l0({
|
|
@@ -7549,7 +7549,7 @@ function a2(e) {
|
|
|
7549
7549
|
if (t.length === 0)
|
|
7550
7550
|
throw new xh();
|
|
7551
7551
|
for (const r of t) {
|
|
7552
|
-
const n = _e(r), i =
|
|
7552
|
+
const n = _e(r), i = Et(rn(r, 0, 1));
|
|
7553
7553
|
if (n !== 32)
|
|
7554
7554
|
throw new hw({ hash: r, size: n });
|
|
7555
7555
|
if (i !== Ah)
|
|
@@ -7735,7 +7735,7 @@ function y2(e, t) {
|
|
|
7735
7735
|
if (t.v !== p)
|
|
7736
7736
|
throw new Ib({ v: t.v });
|
|
7737
7737
|
return p;
|
|
7738
|
-
})(), d =
|
|
7738
|
+
})(), d = wt(t.r), y = wt(t.s);
|
|
7739
7739
|
f = [
|
|
7740
7740
|
...f,
|
|
7741
7741
|
K(u),
|
|
@@ -7758,7 +7758,7 @@ function ls(e, t) {
|
|
|
7758
7758
|
return [];
|
|
7759
7759
|
if (typeof n > "u" && typeof i > "u")
|
|
7760
7760
|
return [];
|
|
7761
|
-
const s =
|
|
7761
|
+
const s = wt(r.r), o = wt(r.s);
|
|
7762
7762
|
return [typeof i == "number" ? i ? K(1) : "0x" : n === 0n ? "0x" : n === 1n ? K(1) : n === 27n ? "0x" : K(1), s === "0x00" ? "0x" : s, o === "0x00" ? "0x" : o];
|
|
7763
7763
|
}
|
|
7764
7764
|
function m2(e) {
|
|
@@ -7865,7 +7865,7 @@ const x2 = /* @__PURE__ */ lo(() => new x0()), _2 = x0, S2 = x2, P2 = /* @__PURE
|
|
|
7865
7865
|
`;
|
|
7866
7866
|
function I2(e) {
|
|
7867
7867
|
const t = typeof e == "string" ? Mn(e) : typeof e.raw == "string" ? e.raw : Oe(e.raw), r = Mn(`${T2}${_e(t)}`);
|
|
7868
|
-
return
|
|
7868
|
+
return At([r, t]);
|
|
7869
7869
|
}
|
|
7870
7870
|
function _0(e, t) {
|
|
7871
7871
|
return Me(I2(e), t);
|
|
@@ -7891,7 +7891,7 @@ function C2(e) {
|
|
|
7891
7891
|
return {
|
|
7892
7892
|
...e,
|
|
7893
7893
|
balance: e.balance ? BigInt(e.balance) : void 0,
|
|
7894
|
-
nonce: e.nonce ?
|
|
7894
|
+
nonce: e.nonce ? Et(e.nonce) : void 0,
|
|
7895
7895
|
storageProof: e.storageProof ? O2(e.storageProof) : void 0
|
|
7896
7896
|
};
|
|
7897
7897
|
}
|
|
@@ -7967,7 +7967,7 @@ async function $2(e, t) {
|
|
|
7967
7967
|
for (let S = 0; S < f.length; S++) {
|
|
7968
7968
|
const { abi: w, address: x, args: P, functionName: T } = f[S];
|
|
7969
7969
|
try {
|
|
7970
|
-
const C =
|
|
7970
|
+
const C = _t({ abi: w, args: P, functionName: T });
|
|
7971
7971
|
g += (C.length - 2) / 2, // Check if batching is enabled.
|
|
7972
7972
|
u > 0 && // Check if the current size of the batch exceeds the size limit.
|
|
7973
7973
|
g > u && // Check if the current chunk is not already empty.
|
|
@@ -8062,9 +8062,9 @@ async function nu(e, t) {
|
|
|
8062
8062
|
const c = [];
|
|
8063
8063
|
for (const y of i) {
|
|
8064
8064
|
const p = y.blockOverrides ? Hh(y.blockOverrides) : void 0, g = y.calls.map((E) => {
|
|
8065
|
-
const A = E, S = A.account ? ke(A.account) : void 0, w = A.abi ?
|
|
8065
|
+
const A = E, S = A.account ? ke(A.account) : void 0, w = A.abi ? _t(A) : A.data, x = {
|
|
8066
8066
|
...A,
|
|
8067
|
-
data: A.dataSuffix ?
|
|
8067
|
+
data: A.dataSuffix ? At([w || "0x", A.dataSuffix]) : w,
|
|
8068
8068
|
from: A.from ?? (S == null ? void 0 : S.address)
|
|
8069
8069
|
};
|
|
8070
8070
|
return pn(x), ri(x);
|
|
@@ -8427,13 +8427,13 @@ function ff(e) {
|
|
|
8427
8427
|
let t = 0;
|
|
8428
8428
|
for (let s = 0; s < e.length; s++) {
|
|
8429
8429
|
const { dynamic: o, encoded: a } = e[s];
|
|
8430
|
-
o ? t += 32 : t +=
|
|
8430
|
+
o ? t += 32 : t += xt(a);
|
|
8431
8431
|
}
|
|
8432
8432
|
const r = [], n = [];
|
|
8433
8433
|
let i = 0;
|
|
8434
8434
|
for (let s = 0; s < e.length; s++) {
|
|
8435
8435
|
const { dynamic: o, encoded: a } = e[s];
|
|
8436
|
-
o ? (r.push(Xe(t + i, { size: 32 })), n.push(a), i +=
|
|
8436
|
+
o ? (r.push(Xe(t + i, { size: 32 })), n.push(a), i += xt(a)) : r.push(a);
|
|
8437
8437
|
}
|
|
8438
8438
|
return Xt(...r, ...n);
|
|
8439
8439
|
}
|
|
@@ -8482,7 +8482,7 @@ function Z2(e, t) {
|
|
|
8482
8482
|
};
|
|
8483
8483
|
}
|
|
8484
8484
|
function X2(e, { type: t }) {
|
|
8485
|
-
const [, r] = t.split("bytes"), n =
|
|
8485
|
+
const [, r] = t.split("bytes"), n = xt(e);
|
|
8486
8486
|
if (!r) {
|
|
8487
8487
|
let i = e;
|
|
8488
8488
|
return n % 32 !== 0 && (i = un(i, Math.ceil((e.length - 2) / 2 / 32) * 32)), {
|
|
@@ -8523,12 +8523,12 @@ function Q2(e, { signed: t, size: r }) {
|
|
|
8523
8523
|
};
|
|
8524
8524
|
}
|
|
8525
8525
|
function ev(e) {
|
|
8526
|
-
const t = Ju(e), r = Math.ceil(
|
|
8526
|
+
const t = Ju(e), r = Math.ceil(xt(t) / 32), n = [];
|
|
8527
8527
|
for (let i = 0; i < r; i++)
|
|
8528
8528
|
n.push(un(Qu(t, i * 32, (i + 1) * 32)));
|
|
8529
8529
|
return {
|
|
8530
8530
|
dynamic: !0,
|
|
8531
|
-
encoded: Xt(un(Xe(
|
|
8531
|
+
encoded: Xt(un(Xe(xt(t), { size: 32 })), ...n)
|
|
8532
8532
|
};
|
|
8533
8533
|
}
|
|
8534
8534
|
function tv(e, t) {
|
|
@@ -8635,7 +8635,7 @@ class nv extends we {
|
|
|
8635
8635
|
}
|
|
8636
8636
|
class C0 extends we {
|
|
8637
8637
|
constructor({ expectedSize: t, value: r }) {
|
|
8638
|
-
super(`Size of bytes "${r}" (bytes${
|
|
8638
|
+
super(`Size of bytes "${r}" (bytes${xt(r)}) does not match expected size (bytes${t}).`), Object.defineProperty(this, "name", {
|
|
8639
8639
|
enumerable: !0,
|
|
8640
8640
|
configurable: !0,
|
|
8641
8641
|
writable: !0,
|
|
@@ -8721,7 +8721,7 @@ async function lv(e, t) {
|
|
|
8721
8721
|
const { accessList: k } = await u0(e, {
|
|
8722
8722
|
account: f.address,
|
|
8723
8723
|
...M,
|
|
8724
|
-
data: M.abi ?
|
|
8724
|
+
data: M.abi ? _t(M) : M.data
|
|
8725
8725
|
});
|
|
8726
8726
|
return k.map(({ address: q, storageKeys: W }) => W.length > 0 ? q : null);
|
|
8727
8727
|
})).then((M) => M.flat().filter(Boolean)) : [], y = await nu(e, {
|
|
@@ -8913,11 +8913,11 @@ const $0 = (e, t, r) => new F0(e, t).update(r).digest();
|
|
|
8913
8913
|
$0.create = (e, t) => new F0(e, t);
|
|
8914
8914
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
8915
8915
|
const rt = BigInt(0), Qe = BigInt(1), Vr = /* @__PURE__ */ BigInt(2), pv = /* @__PURE__ */ BigInt(3), U0 = /* @__PURE__ */ BigInt(4), H0 = /* @__PURE__ */ BigInt(5), L0 = /* @__PURE__ */ BigInt(8);
|
|
8916
|
-
function
|
|
8916
|
+
function gt(e, t) {
|
|
8917
8917
|
const r = e % t;
|
|
8918
8918
|
return r >= rt ? r : t + r;
|
|
8919
8919
|
}
|
|
8920
|
-
function
|
|
8920
|
+
function lt(e, t, r) {
|
|
8921
8921
|
let n = e;
|
|
8922
8922
|
for (; t-- > rt; )
|
|
8923
8923
|
n *= n, n %= r;
|
|
@@ -8928,14 +8928,14 @@ function xd(e, t) {
|
|
|
8928
8928
|
throw new Error("invert: expected non-zero number");
|
|
8929
8929
|
if (t <= rt)
|
|
8930
8930
|
throw new Error("invert: expected positive modulus, got " + t);
|
|
8931
|
-
let r =
|
|
8931
|
+
let r = gt(e, t), n = t, i = rt, s = Qe;
|
|
8932
8932
|
for (; r !== rt; ) {
|
|
8933
8933
|
const a = n / r, c = n % r, f = i - s * a;
|
|
8934
8934
|
n = r, r = c, i = s, s = f;
|
|
8935
8935
|
}
|
|
8936
8936
|
if (n !== Qe)
|
|
8937
8937
|
throw new Error("invert: does not exist");
|
|
8938
|
-
return
|
|
8938
|
+
return gt(i, t);
|
|
8939
8939
|
}
|
|
8940
8940
|
function M0(e, t) {
|
|
8941
8941
|
const r = (e.ORDER + Qe) / U0, n = e.pow(t, r);
|
|
@@ -9064,7 +9064,7 @@ function No(e, t, r = !1, n = {}) {
|
|
|
9064
9064
|
MASK: _o(o),
|
|
9065
9065
|
ZERO: rt,
|
|
9066
9066
|
ONE: Qe,
|
|
9067
|
-
create: (u) =>
|
|
9067
|
+
create: (u) => gt(u, e),
|
|
9068
9068
|
isValid: (u) => {
|
|
9069
9069
|
if (typeof u != "bigint")
|
|
9070
9070
|
throw new Error("invalid field element: expected bigint, got " + typeof u);
|
|
@@ -9074,14 +9074,14 @@ function No(e, t, r = !1, n = {}) {
|
|
|
9074
9074
|
// is valid and invertible
|
|
9075
9075
|
isValidNot0: (u) => !f.is0(u) && f.isValid(u),
|
|
9076
9076
|
isOdd: (u) => (u & Qe) === Qe,
|
|
9077
|
-
neg: (u) =>
|
|
9077
|
+
neg: (u) => gt(-u, e),
|
|
9078
9078
|
eql: (u, d) => u === d,
|
|
9079
|
-
sqr: (u) =>
|
|
9080
|
-
add: (u, d) =>
|
|
9081
|
-
sub: (u, d) =>
|
|
9082
|
-
mul: (u, d) =>
|
|
9079
|
+
sqr: (u) => gt(u * u, e),
|
|
9080
|
+
add: (u, d) => gt(u + d, e),
|
|
9081
|
+
sub: (u, d) => gt(u - d, e),
|
|
9082
|
+
mul: (u, d) => gt(u * d, e),
|
|
9083
9083
|
pow: (u, d) => wv(f, u, d),
|
|
9084
|
-
div: (u, d) =>
|
|
9084
|
+
div: (u, d) => gt(u * xd(d, e), e),
|
|
9085
9085
|
// Same as above, but doesn't normalize
|
|
9086
9086
|
sqrN: (u) => u * u,
|
|
9087
9087
|
addN: (u, d) => u + d,
|
|
@@ -9117,7 +9117,7 @@ function Ev(e, t, r = !1) {
|
|
|
9117
9117
|
const n = e.length, i = j0(t), s = z0(t);
|
|
9118
9118
|
if (n < 16 || n < s || n > 1024)
|
|
9119
9119
|
throw new Error("expected " + s + "-1024 bytes of input, got " + n);
|
|
9120
|
-
const o = r ? Bh(e) : xo(e), a =
|
|
9120
|
+
const o = r ? Bh(e) : xo(e), a = gt(o, t - Qe) + Qe;
|
|
9121
9121
|
return r ? Oh(a, i) : Yu(a, i);
|
|
9122
9122
|
}
|
|
9123
9123
|
/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */
|
|
@@ -9398,7 +9398,7 @@ const cr = {
|
|
|
9398
9398
|
}
|
|
9399
9399
|
},
|
|
9400
9400
|
toSig(e) {
|
|
9401
|
-
const { Err: t, _int: r, _tlv: n } = cr, i =
|
|
9401
|
+
const { Err: t, _int: r, _tlv: n } = cr, i = ht("signature", e), { v: s, l: o } = n.decode(48, i);
|
|
9402
9402
|
if (o.length)
|
|
9403
9403
|
throw new t("invalid signature: left bytes after parsing");
|
|
9404
9404
|
const { v: a, l: c } = n.decode(2, s), { v: f, l: u } = n.decode(2, c);
|
|
@@ -9425,7 +9425,7 @@ function V0(e, t, r) {
|
|
|
9425
9425
|
if (typeof s == "bigint")
|
|
9426
9426
|
o = s;
|
|
9427
9427
|
else {
|
|
9428
|
-
let a =
|
|
9428
|
+
let a = ht("private key", s);
|
|
9429
9429
|
if (t) {
|
|
9430
9430
|
if (!t.includes(a.length * 2))
|
|
9431
9431
|
throw new Error("invalid private key");
|
|
@@ -9574,7 +9574,7 @@ function Rv(e, t = {}) {
|
|
|
9574
9574
|
}
|
|
9575
9575
|
/** Converts hash string or Uint8Array to Point. */
|
|
9576
9576
|
static fromHex(_) {
|
|
9577
|
-
const F = P.fromAffine(d(
|
|
9577
|
+
const F = P.fromAffine(d(ht("pointHex", _)));
|
|
9578
9578
|
return F.assertValidity(), F;
|
|
9579
9579
|
}
|
|
9580
9580
|
/** Multiplies generator point by privateKey. */
|
|
@@ -9764,13 +9764,13 @@ function Nv(e, t, r = {}) {
|
|
|
9764
9764
|
}
|
|
9765
9765
|
// pair (bytes of r, bytes of s)
|
|
9766
9766
|
static fromCompact($) {
|
|
9767
|
-
const j = o.BYTES, V =
|
|
9767
|
+
const j = o.BYTES, V = ht("compactSignature", $, j * 2);
|
|
9768
9768
|
return new y(o.fromBytes(V.subarray(0, j)), o.fromBytes(V.subarray(j, j * 2)));
|
|
9769
9769
|
}
|
|
9770
9770
|
// DER encoded ECDSA signature
|
|
9771
9771
|
// https://bitcoin.stackexchange.com/questions/57644/what-are-the-parts-of-a-bitcoin-transaction-input-script
|
|
9772
9772
|
static fromDER($) {
|
|
9773
|
-
const { r: j, s: V } = cr.toSig(
|
|
9773
|
+
const { r: j, s: V } = cr.toSig(ht("DER", $));
|
|
9774
9774
|
return new y(j, V);
|
|
9775
9775
|
}
|
|
9776
9776
|
/**
|
|
@@ -9792,7 +9792,7 @@ function Nv(e, t, r = {}) {
|
|
|
9792
9792
|
const M = X === 2 || X === 3 ? V + a : V;
|
|
9793
9793
|
if (!s.isValid(M))
|
|
9794
9794
|
throw new Error("recovery id 2 or 3 invalid");
|
|
9795
|
-
const k = s.toBytes(M), q = e.fromHex(qr(W0((X & 1) === 0), k)), W = o.inv(M), I = w(
|
|
9795
|
+
const k = s.toBytes(M), q = e.fromHex(qr(W0((X & 1) === 0), k)), W = o.inv(M), I = w(ht("msgHash", $)), R = o.create(-I * W), U = o.create(Y * W), Z = e.BASE.multiplyUnsafe(R).add(q.multiplyUnsafe(U));
|
|
9796
9796
|
if (Z.is0())
|
|
9797
9797
|
throw new Error("point at infinify");
|
|
9798
9798
|
return Z.assertValidity(), Z;
|
|
@@ -9855,7 +9855,7 @@ function Nv(e, t, r = {}) {
|
|
|
9855
9855
|
return !1;
|
|
9856
9856
|
if (O instanceof e)
|
|
9857
9857
|
return !0;
|
|
9858
|
-
const j =
|
|
9858
|
+
const j = ht("key", O).length, V = s.BYTES, Y = V + 1, X = 2 * V + 1;
|
|
9859
9859
|
if (!(r.allowedPrivateKeyLengths || o.BYTES === Y))
|
|
9860
9860
|
return j === Y || j === X;
|
|
9861
9861
|
}
|
|
@@ -9882,11 +9882,11 @@ function Nv(e, t, r = {}) {
|
|
|
9882
9882
|
throw new Error("sign() legacy options not supported");
|
|
9883
9883
|
const { hash: V } = t;
|
|
9884
9884
|
let { lowS: Y, prehash: X, extraEntropy: J } = j;
|
|
9885
|
-
Y == null && (Y = !0), O =
|
|
9885
|
+
Y == null && (Y = !0), O = ht("msgHash", O), Id(j), X && (O = ht("prehashed msgHash", V(O)));
|
|
9886
9886
|
const M = w(O), k = p($), q = [P(k), P(M)];
|
|
9887
9887
|
if (J != null && J !== !1) {
|
|
9888
9888
|
const U = J === !0 ? n(s.BYTES) : J;
|
|
9889
|
-
q.push(
|
|
9889
|
+
q.push(ht("extraEntropy", U));
|
|
9890
9890
|
}
|
|
9891
9891
|
const W = qr(...q), I = M;
|
|
9892
9892
|
function R(U) {
|
|
@@ -9912,7 +9912,7 @@ function Nv(e, t, r = {}) {
|
|
|
9912
9912
|
e.BASE.precompute(8);
|
|
9913
9913
|
function F(O, $, j, V = L) {
|
|
9914
9914
|
const Y = O;
|
|
9915
|
-
$ =
|
|
9915
|
+
$ = ht("msgHash", $), j = ht("publicKey", j), Id(V);
|
|
9916
9916
|
const { lowS: X, prehash: J, format: M } = V;
|
|
9917
9917
|
if ("strict" in V)
|
|
9918
9918
|
throw new Error("options.strict was renamed to lowS");
|
|
@@ -10019,7 +10019,7 @@ const to = {
|
|
|
10019
10019
|
BigInt(0);
|
|
10020
10020
|
const Mv = BigInt(1), uu = BigInt(2), kd = (e, t) => (e + t / uu) / t;
|
|
10021
10021
|
function Dv(e) {
|
|
10022
|
-
const t = to.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), s = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), f = e * e * e % t, u = f * f * e % t, d =
|
|
10022
|
+
const t = to.p, r = BigInt(3), n = BigInt(6), i = BigInt(11), s = BigInt(22), o = BigInt(23), a = BigInt(44), c = BigInt(88), f = e * e * e % t, u = f * f * e % t, d = lt(u, r, t) * u % t, y = lt(d, r, t) * u % t, p = lt(y, uu, t) * f % t, g = lt(p, i, t) * p % t, b = lt(g, s, t) * g % t, E = lt(b, a, t) * b % t, A = lt(E, c, t) * E % t, S = lt(A, a, t) * b % t, w = lt(S, r, t) * u % t, x = lt(w, o, t) * g % t, P = lt(x, n, t) * f % t, T = lt(P, uu, t);
|
|
10023
10023
|
if (!fu.eql(fu.sqr(T), e))
|
|
10024
10024
|
throw new Error("Cannot find square root");
|
|
10025
10025
|
return T;
|
|
@@ -10034,7 +10034,7 @@ const fu = No(to.p, void 0, void 0, { sqrt: Dv }), K0 = Lv({
|
|
|
10034
10034
|
beta: BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),
|
|
10035
10035
|
splitScalar: (e) => {
|
|
10036
10036
|
const t = to.n, r = BigInt("0x3086d221a7d46bcde86c90e49284eb15"), n = -Mv * BigInt("0xe4437ed6010e88286f547fa90abfe4c3"), i = BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"), s = r, o = BigInt("0x100000000000000000000000000000000"), a = kd(s * e, t), c = kd(-n * e, t);
|
|
10037
|
-
let f =
|
|
10037
|
+
let f = gt(e - a * r - c * i, t), u = gt(-a * n - c * s, t);
|
|
10038
10038
|
const d = f > o, y = u > o;
|
|
10039
10039
|
if (d && (f = t - f), y && (u = t - u), f > o || u > o)
|
|
10040
10040
|
throw new Error("splitScalar: Endomorphism failed, k=" + e);
|
|
@@ -10065,7 +10065,7 @@ async function df(e, t) {
|
|
|
10065
10065
|
try {
|
|
10066
10066
|
const g = a ? {
|
|
10067
10067
|
to: a,
|
|
10068
|
-
data:
|
|
10068
|
+
data: _t({
|
|
10069
10069
|
abi: hd,
|
|
10070
10070
|
functionName: "isValidSig",
|
|
10071
10071
|
args: [r, s, u]
|
|
@@ -10917,7 +10917,7 @@ const ma = {
|
|
|
10917
10917
|
chain: If.mainnet.base_cbBTC.chain,
|
|
10918
10918
|
asset: If.mainnet.base_cbBTC.atomicSwapAddress
|
|
10919
10919
|
};
|
|
10920
|
-
var Fn = /* @__PURE__ */ ((e) => (e.SLOW = "SLOW", e.MEDIUM = "MEDIUM", e.FAST = "FAST", e))(Fn || {}),
|
|
10920
|
+
var Fn = /* @__PURE__ */ ((e) => (e.SLOW = "SLOW", e.MEDIUM = "MEDIUM", e.FAST = "FAST", e))(Fn || {}), vt = /* @__PURE__ */ ((e) => (e.Mainnet = "Mainnet", e.Testnet = "Testnet", e.Regtest = "Regtest", e))(vt || {}), qs = /* @__PURE__ */ ((e) => (e.ALL = "ALL", e.IN = "IN", e.OUT = "OUT", e))(qs || {});
|
|
10921
10921
|
const wE = {
|
|
10922
10922
|
SLOW: "economyFee",
|
|
10923
10923
|
MEDIUM: "hourFee",
|
|
@@ -10957,16 +10957,16 @@ const Dr = (e) => e.length === 64 ? e : e.slice(2), xE = (e) => {
|
|
|
10957
10957
|
if (!e) return !1;
|
|
10958
10958
|
try {
|
|
10959
10959
|
const t = Buffer.from(e, "hex");
|
|
10960
|
-
return
|
|
10960
|
+
return bt.isPoint(t);
|
|
10961
10961
|
} catch {
|
|
10962
10962
|
return !1;
|
|
10963
10963
|
}
|
|
10964
10964
|
}, Rd = (e, t, r, n) => e + ":" + t.toLowerCase() + "::" + r + ":" + n.toLowerCase();
|
|
10965
|
-
function
|
|
10965
|
+
function o5(e, t) {
|
|
10966
10966
|
if (!e) return !1;
|
|
10967
10967
|
const r = t === Yt.MAINNET ? le.networks.bitcoin : t === Yt.TESTNET ? le.networks.testnet : le.networks.regtest;
|
|
10968
10968
|
if (!r) return !1;
|
|
10969
|
-
le.initEccLib(
|
|
10969
|
+
le.initEccLib(bt);
|
|
10970
10970
|
try {
|
|
10971
10971
|
return le.address.toOutputScript(e, r), !0;
|
|
10972
10972
|
} catch {
|
|
@@ -10976,11 +10976,11 @@ function c5(e, t) {
|
|
|
10976
10976
|
const _E = (e) => {
|
|
10977
10977
|
switch (e) {
|
|
10978
10978
|
case Yt.MAINNET:
|
|
10979
|
-
return
|
|
10979
|
+
return vt.Mainnet;
|
|
10980
10980
|
case Yt.TESTNET:
|
|
10981
|
-
return
|
|
10981
|
+
return vt.Testnet;
|
|
10982
10982
|
case Yt.LOCALNET:
|
|
10983
|
-
return
|
|
10983
|
+
return vt.Regtest;
|
|
10984
10984
|
default:
|
|
10985
10985
|
throw new Error(`Invalid bitcoin network ${e}`);
|
|
10986
10986
|
}
|
|
@@ -11055,7 +11055,7 @@ const X0 = (e, t, r) => {
|
|
|
11055
11055
|
if (t > r) return Ae.Expired;
|
|
11056
11056
|
}
|
|
11057
11057
|
return e.initiate_tx_hash ? Number(e.initiate_block_number) ? Ae.Initiated : Ae.InitiateDetected : Ae.Idle;
|
|
11058
|
-
},
|
|
11058
|
+
}, a5 = (e, t, r) => {
|
|
11059
11059
|
const n = X0(
|
|
11060
11060
|
e,
|
|
11061
11061
|
t,
|
|
@@ -11078,7 +11078,7 @@ const X0 = (e, t, r) => {
|
|
|
11078
11078
|
}, no = (e, t = 0) => {
|
|
11079
11079
|
const r = Date.now(), n = e * 1e3 + t * 36e5;
|
|
11080
11080
|
return r >= n;
|
|
11081
|
-
},
|
|
11081
|
+
}, c5 = (e) => e.filter((t) => !TE(t)), TE = (e) => {
|
|
11082
11082
|
const { source_swap: t, create_order: r } = e, { initiate_tx_hash: n, initiate_block_number: i } = t, { deadline: s } = r.additional_data;
|
|
11083
11083
|
return n && Number(i) ? !1 : n && !Number(i) ? no(Number(s), 12) : n ? !1 : no(Number(s), 1);
|
|
11084
11084
|
}, IE = Buffer.from(
|
|
@@ -11094,13 +11094,13 @@ const X0 = (e, t, r) => {
|
|
|
11094
11094
|
failedToCreateInternalPubkey: "failed to create internal pubkey"
|
|
11095
11095
|
};
|
|
11096
11096
|
function CE() {
|
|
11097
|
-
const e = sm.sha256(Buffer.from("GardenHTLC", "utf-8")), t =
|
|
11097
|
+
const e = sm.sha256(Buffer.from("GardenHTLC", "utf-8")), t = bt.pointMultiply(
|
|
11098
11098
|
Buffer.concat([Buffer.from("04", "hex"), BE]),
|
|
11099
11099
|
e
|
|
11100
11100
|
);
|
|
11101
11101
|
if (!t)
|
|
11102
11102
|
throw new Error($d.failedToCreateInternalPubkey);
|
|
11103
|
-
const r =
|
|
11103
|
+
const r = bt.pointAdd(OE, t);
|
|
11104
11104
|
if (!r) throw new Error($d.failedToCreateInternalPubkey);
|
|
11105
11105
|
return du(Buffer.from(r));
|
|
11106
11106
|
}
|
|
@@ -11128,11 +11128,11 @@ var xe = {}, ze = {}, mn = {}, Fo = {};
|
|
|
11128
11128
|
Fo.byteLength = FE;
|
|
11129
11129
|
Fo.toByteArray = UE;
|
|
11130
11130
|
Fo.fromByteArray = ME;
|
|
11131
|
-
var Vt = [],
|
|
11131
|
+
var Vt = [], yt = [], RE = typeof Uint8Array < "u" ? Uint8Array : Array, ga = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
11132
11132
|
for (var xn = 0, NE = ga.length; xn < NE; ++xn)
|
|
11133
|
-
Vt[xn] = ga[xn],
|
|
11134
|
-
|
|
11135
|
-
|
|
11133
|
+
Vt[xn] = ga[xn], yt[ga.charCodeAt(xn)] = xn;
|
|
11134
|
+
yt[45] = 62;
|
|
11135
|
+
yt[95] = 63;
|
|
11136
11136
|
function ey(e) {
|
|
11137
11137
|
var t = e.length;
|
|
11138
11138
|
if (t % 4 > 0)
|
|
@@ -11152,8 +11152,8 @@ function $E(e, t, r) {
|
|
|
11152
11152
|
function UE(e) {
|
|
11153
11153
|
var t, r = ey(e), n = r[0], i = r[1], s = new RE($E(e, n, i)), o = 0, a = i > 0 ? n - 4 : n, c;
|
|
11154
11154
|
for (c = 0; c < a; c += 4)
|
|
11155
|
-
t =
|
|
11156
|
-
return i === 2 && (t =
|
|
11155
|
+
t = yt[e.charCodeAt(c)] << 18 | yt[e.charCodeAt(c + 1)] << 12 | yt[e.charCodeAt(c + 2)] << 6 | yt[e.charCodeAt(c + 3)], s[o++] = t >> 16 & 255, s[o++] = t >> 8 & 255, s[o++] = t & 255;
|
|
11156
|
+
return i === 2 && (t = yt[e.charCodeAt(c)] << 2 | yt[e.charCodeAt(c + 1)] >> 4, s[o++] = t & 255), i === 1 && (t = yt[e.charCodeAt(c)] << 10 | yt[e.charCodeAt(c + 1)] << 4 | yt[e.charCodeAt(c + 2)] >> 2, s[o++] = t >> 8 & 255, s[o++] = t & 255), s;
|
|
11157
11157
|
}
|
|
11158
11158
|
function HE(e) {
|
|
11159
11159
|
return Vt[e >> 18 & 63] + Vt[e >> 12 & 63] + Vt[e >> 6 & 63] + Vt[e & 63];
|
|
@@ -12036,9 +12036,9 @@ lf.write = function(e, t, r, n, i, s) {
|
|
|
12036
12036
|
m
|
|
12037
12037
|
);
|
|
12038
12038
|
}
|
|
12039
|
-
const
|
|
12039
|
+
const st = /[^+/0-9A-Za-z-_]/g;
|
|
12040
12040
|
function Ce(m) {
|
|
12041
|
-
if (m = m.split("=")[0], m = m.trim().replace(
|
|
12041
|
+
if (m = m.split("=")[0], m = m.trim().replace(st, ""), m.length < 2) return "";
|
|
12042
12042
|
for (; m.length % 4 !== 0; )
|
|
12043
12043
|
m = m + "=";
|
|
12044
12044
|
return m;
|
|
@@ -13994,7 +13994,7 @@ var jr = {}, Dd;
|
|
|
13994
13994
|
function g6() {
|
|
13995
13995
|
if (Dd) return jr;
|
|
13996
13996
|
Dd = 1, Object.defineProperty(jr, "__esModule", { value: !0 }), jr.encode = jr.decode = void 0;
|
|
13997
|
-
const e = lr, t =
|
|
13997
|
+
const e = lr, t = ft(), r = ze, { typeforce: n } = r, i = Buffer.alloc(1, 0);
|
|
13998
13998
|
function s(f) {
|
|
13999
13999
|
let u = 0;
|
|
14000
14000
|
for (; f[u] === 0; ) ++u;
|
|
@@ -14030,7 +14030,7 @@ function g6() {
|
|
|
14030
14030
|
return jr.encode = c, jr;
|
|
14031
14031
|
}
|
|
14032
14032
|
var jd;
|
|
14033
|
-
function
|
|
14033
|
+
function ft() {
|
|
14034
14034
|
return jd || (jd = 1, function(e) {
|
|
14035
14035
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.signature = e.number = e.isCanonicalScriptSignature = e.isDefinedHashType = e.isCanonicalPubKey = e.toStack = e.fromASM = e.toASM = e.decompile = e.compile = e.countNonPushOnlyOPs = e.isPushOnly = e.OPS = void 0;
|
|
14036
14036
|
const t = lr, r = fn;
|
|
@@ -14150,7 +14150,7 @@ function dt() {
|
|
|
14150
14150
|
}
|
|
14151
14151
|
Object.defineProperty(hs, "__esModule", { value: !0 });
|
|
14152
14152
|
hs.Transaction = void 0;
|
|
14153
|
-
const Be = He, Ve = Lr, zd =
|
|
14153
|
+
const Be = He, Ve = Lr, zd = ft(), b6 = ft(), ue = ze, { typeforce: Ht } = ue;
|
|
14154
14154
|
function jt(e) {
|
|
14155
14155
|
const t = e.length;
|
|
14156
14156
|
return Be.varuint.encodingLength(t) + t;
|
|
@@ -14543,9 +14543,9 @@ je.testnet = {
|
|
|
14543
14543
|
scriptHash: 196,
|
|
14544
14544
|
wif: 239
|
|
14545
14545
|
};
|
|
14546
|
-
var
|
|
14547
|
-
Object.defineProperty(
|
|
14548
|
-
|
|
14546
|
+
var at = {};
|
|
14547
|
+
Object.defineProperty(at, "__esModule", { value: !0 });
|
|
14548
|
+
at.value = at.prop = void 0;
|
|
14549
14549
|
function _6(e, t, r) {
|
|
14550
14550
|
Object.defineProperty(e, t, {
|
|
14551
14551
|
configurable: !0,
|
|
@@ -14564,15 +14564,15 @@ function _6(e, t, r) {
|
|
|
14564
14564
|
}
|
|
14565
14565
|
});
|
|
14566
14566
|
}
|
|
14567
|
-
|
|
14567
|
+
at.prop = _6;
|
|
14568
14568
|
function S6(e) {
|
|
14569
14569
|
let t;
|
|
14570
14570
|
return () => (t !== void 0 || (t = e()), t);
|
|
14571
14571
|
}
|
|
14572
|
-
|
|
14572
|
+
at.value = S6;
|
|
14573
14573
|
Object.defineProperty(Uo, "__esModule", { value: !0 });
|
|
14574
14574
|
Uo.p2data = void 0;
|
|
14575
|
-
const P6 = je, Gs =
|
|
14575
|
+
const P6 = je, Gs = ft(), Lt = ze, Gd = at, Vd = Gs.OPS;
|
|
14576
14576
|
function T6(e, t) {
|
|
14577
14577
|
if (!e.data && !e.output) throw new TypeError("Not enough data");
|
|
14578
14578
|
t = Object.assign({ validate: !0 }, t || {}), (0, Lt.typeforce)(
|
|
@@ -14606,7 +14606,7 @@ Uo.p2data = T6;
|
|
|
14606
14606
|
var Ho = {};
|
|
14607
14607
|
Object.defineProperty(Ho, "__esModule", { value: !0 });
|
|
14608
14608
|
Ho.p2ms = void 0;
|
|
14609
|
-
const I6 = je, Pn =
|
|
14609
|
+
const I6 = je, Pn = ft(), Te = ze, _r = at, Tn = Pn.OPS, Os = Tn.OP_RESERVED;
|
|
14610
14610
|
function k6(e, t) {
|
|
14611
14611
|
if (!e.input && !e.output && !(e.pubkeys && e.m !== void 0) && !e.signatures)
|
|
14612
14612
|
throw new TypeError("Not enough data");
|
|
@@ -14710,7 +14710,7 @@ Ho.p2ms = k6;
|
|
|
14710
14710
|
var Lo = {};
|
|
14711
14711
|
Object.defineProperty(Lo, "__esModule", { value: !0 });
|
|
14712
14712
|
Lo.p2pk = void 0;
|
|
14713
|
-
const B6 = je, In =
|
|
14713
|
+
const B6 = je, In = ft(), Pt = ze, _n = at, Wd = In.OPS;
|
|
14714
14714
|
function O6(e, t) {
|
|
14715
14715
|
if (!e.input && !e.output && !e.pubkey && !e.input && !e.signature)
|
|
14716
14716
|
throw new TypeError("Not enough data");
|
|
@@ -14865,7 +14865,7 @@ function L6(e) {
|
|
|
14865
14865
|
var wf = H6(L6);
|
|
14866
14866
|
Object.defineProperty(Mo, "__esModule", { value: !0 });
|
|
14867
14867
|
Mo.p2pkh = void 0;
|
|
14868
|
-
const Sa = Lr, M6 = je, kn =
|
|
14868
|
+
const Sa = Lr, M6 = je, kn = ft(), We = ze, ir = at, Yd = wf, Sr = kn.OPS;
|
|
14869
14869
|
function D6(e, t) {
|
|
14870
14870
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.input)
|
|
14871
14871
|
throw new TypeError("Not enough data");
|
|
@@ -14963,7 +14963,7 @@ Mo.p2pkh = D6;
|
|
|
14963
14963
|
var Do = {};
|
|
14964
14964
|
Object.defineProperty(Do, "__esModule", { value: !0 });
|
|
14965
14965
|
Do.p2sh = void 0;
|
|
14966
|
-
const Zd = Lr, j6 = je, zt =
|
|
14966
|
+
const Zd = Lr, j6 = je, zt = ft(), ge = ze, Mt = at, Xd = wf, li = zt.OPS;
|
|
14967
14967
|
function z6(e, t) {
|
|
14968
14968
|
if (!e.address && !e.hash && !e.output && !e.redeem && !e.input)
|
|
14969
14969
|
throw new TypeError("Not enough data");
|
|
@@ -15239,7 +15239,7 @@ mr.bech32 = Sy("bech32");
|
|
|
15239
15239
|
mr.bech32m = Sy("bech32m");
|
|
15240
15240
|
Object.defineProperty(jo, "__esModule", { value: !0 });
|
|
15241
15241
|
jo.p2wpkh = void 0;
|
|
15242
|
-
const Pa = Lr, W6 = je, Vs =
|
|
15242
|
+
const Pa = Lr, W6 = je, Vs = ft(), Re = ze, Pr = at, Cs = mr, Qd = Vs.OPS, K6 = Buffer.alloc(0);
|
|
15243
15243
|
function Y6(e, t) {
|
|
15244
15244
|
if (!e.address && !e.hash && !e.output && !e.pubkey && !e.witness)
|
|
15245
15245
|
throw new TypeError("Not enough data");
|
|
@@ -15341,7 +15341,7 @@ jo.p2wpkh = Y6;
|
|
|
15341
15341
|
var zo = {};
|
|
15342
15342
|
Object.defineProperty(zo, "__esModule", { value: !0 });
|
|
15343
15343
|
zo.p2wsh = void 0;
|
|
15344
|
-
const el = Lr, Z6 = je, ar =
|
|
15344
|
+
const el = Lr, Z6 = je, ar = ft(), me = ze, sr = at, Rs = mr, tl = ar.OPS, Ta = Buffer.alloc(0);
|
|
15345
15345
|
function Ns(e) {
|
|
15346
15346
|
return !!(Buffer.isBuffer(e) && e.length === 65 && e[0] === 4 && (0, me.isPoint)(e));
|
|
15347
15347
|
}
|
|
@@ -15497,36 +15497,36 @@ function Q6() {
|
|
|
15497
15497
|
dn.getEccLib = Q6;
|
|
15498
15498
|
const or = (e) => Buffer.from(e, "hex");
|
|
15499
15499
|
function eA(e) {
|
|
15500
|
-
|
|
15500
|
+
pt(typeof e.isXOnlyPoint == "function"), pt(
|
|
15501
15501
|
e.isXOnlyPoint(
|
|
15502
15502
|
or("79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798")
|
|
15503
15503
|
)
|
|
15504
|
-
),
|
|
15504
|
+
), pt(
|
|
15505
15505
|
e.isXOnlyPoint(
|
|
15506
15506
|
or("fffffffffffffffffffffffffffffffffffffffffffffffffffffffeeffffc2e")
|
|
15507
15507
|
)
|
|
15508
|
-
),
|
|
15508
|
+
), pt(
|
|
15509
15509
|
e.isXOnlyPoint(
|
|
15510
15510
|
or("f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9")
|
|
15511
15511
|
)
|
|
15512
|
-
),
|
|
15512
|
+
), pt(
|
|
15513
15513
|
e.isXOnlyPoint(
|
|
15514
15514
|
or("0000000000000000000000000000000000000000000000000000000000000001")
|
|
15515
15515
|
)
|
|
15516
|
-
),
|
|
15516
|
+
), pt(
|
|
15517
15517
|
!e.isXOnlyPoint(
|
|
15518
15518
|
or("0000000000000000000000000000000000000000000000000000000000000000")
|
|
15519
15519
|
)
|
|
15520
|
-
),
|
|
15520
|
+
), pt(
|
|
15521
15521
|
!e.isXOnlyPoint(
|
|
15522
15522
|
or("fffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f")
|
|
15523
15523
|
)
|
|
15524
|
-
),
|
|
15524
|
+
), pt(typeof e.xOnlyPointAddTweak == "function"), tA.forEach((t) => {
|
|
15525
15525
|
const r = e.xOnlyPointAddTweak(or(t.pubkey), or(t.tweak));
|
|
15526
|
-
t.result === null ?
|
|
15526
|
+
t.result === null ? pt(r === null) : (pt(r !== null), pt(r.parity === t.parity), pt(Buffer.from(r.xOnlyPubkey).equals(or(t.result))));
|
|
15527
15527
|
});
|
|
15528
15528
|
}
|
|
15529
|
-
function
|
|
15529
|
+
function pt(e) {
|
|
15530
15530
|
if (!e) throw new Error("ecc library invalid");
|
|
15531
15531
|
}
|
|
15532
15532
|
const tA = [
|
|
@@ -15631,7 +15631,7 @@ var Ke = {}, rl;
|
|
|
15631
15631
|
function rA() {
|
|
15632
15632
|
if (rl) return Ke;
|
|
15633
15633
|
rl = 1, Object.defineProperty(Ke, "__esModule", { value: !0 }), Ke.toOutputScript = Ke.fromOutputScript = Ke.toBech32 = Ke.toBase58Check = Ke.fromBech32 = Ke.fromBase58Check = void 0;
|
|
15634
|
-
const e = je, t = Af(), r =
|
|
15634
|
+
const e = je, t = Af(), r = ft(), n = ze, i = mr, s = wf, o = 40, a = 2, c = 16, f = 2, u = 80, d = "WARNING: Sending to a future segwit version address can lead to loss of funds. End users MUST be warned carefully in the GUI and asked if they wish to proceed with caution. Wallets should verify the segwit version from the output of fromBech32, then decide when it is safe to use which version of segwit.";
|
|
15635
15635
|
function y(w, x) {
|
|
15636
15636
|
const P = w.slice(2);
|
|
15637
15637
|
if (P.length < a || P.length > o)
|
|
@@ -15754,7 +15754,7 @@ var nl;
|
|
|
15754
15754
|
function nA() {
|
|
15755
15755
|
if (nl) return pi;
|
|
15756
15756
|
nl = 1, Object.defineProperty(pi, "__esModule", { value: !0 }), pi.p2tr = void 0;
|
|
15757
|
-
const e = mn, t = je, r =
|
|
15757
|
+
const e = mn, t = je, r = ft(), n = ze, i = dn, s = Ef, o = at, a = mr, c = rA(), f = r.OPS, u = 1, d = 80;
|
|
15758
15758
|
function y(p, g) {
|
|
15759
15759
|
if (!p.address && !p.output && !p.pubkey && !p.internalPubkey && !(p.witness && p.witness.length > 1))
|
|
15760
15760
|
throw new TypeError("Not enough data");
|
|
@@ -16019,7 +16019,7 @@ function Af() {
|
|
|
16019
16019
|
}
|
|
16020
16020
|
Object.defineProperty(ye, "__esModule", { value: !0 });
|
|
16021
16021
|
ye.signatureBlocksAction = ye.checkInputForSig = ye.pubkeyInScript = ye.pubkeyPositionInScript = ye.witnessStackToScriptWitness = ye.isP2TR = ye.isP2SHScript = ye.isP2WSHScript = ye.isP2WPKH = ye.isP2PKH = ye.isP2PK = ye.isP2MS = void 0;
|
|
16022
|
-
const sl = ys, Bi =
|
|
16022
|
+
const sl = ys, Bi = ft(), Fs = hs, iA = Lr, gn = Af();
|
|
16023
16023
|
function bn(e) {
|
|
16024
16024
|
return (t) => {
|
|
16025
16025
|
try {
|
|
@@ -16330,7 +16330,7 @@ const Ye = {
|
|
|
16330
16330
|
controlBlockGenerationFailed: "failed to generate control block",
|
|
16331
16331
|
invalidLeaf: "invalid leaf"
|
|
16332
16332
|
}, $s = 192;
|
|
16333
|
-
le.initEccLib(
|
|
16333
|
+
le.initEccLib(bt);
|
|
16334
16334
|
class Oi {
|
|
16335
16335
|
/**
|
|
16336
16336
|
* Note: redeemerAddress and initiatorAddress should be x-only public key without 02 or 03 prefix
|
|
@@ -16543,7 +16543,7 @@ class Oi {
|
|
|
16543
16543
|
o,
|
|
16544
16544
|
a
|
|
16545
16545
|
);
|
|
16546
|
-
if (!
|
|
16546
|
+
if (!bt.verifySchnorr(
|
|
16547
16547
|
y,
|
|
16548
16548
|
Buffer.from(this.redeemerPubkey, "hex"),
|
|
16549
16549
|
Buffer.from(t[d].sig, "hex")
|
|
@@ -16839,7 +16839,7 @@ class FA {
|
|
|
16839
16839
|
}
|
|
16840
16840
|
class $A {
|
|
16841
16841
|
constructor(t, r) {
|
|
16842
|
-
this.url = new
|
|
16842
|
+
this.url = new mt(t).endpoint("blocknumbers").endpoint(r);
|
|
16843
16843
|
}
|
|
16844
16844
|
async fetchBlockNumbers() {
|
|
16845
16845
|
try {
|
|
@@ -16852,7 +16852,7 @@ class $A {
|
|
|
16852
16852
|
}
|
|
16853
16853
|
class UA {
|
|
16854
16854
|
constructor(t) {
|
|
16855
|
-
this.quoteUrl = new
|
|
16855
|
+
this.quoteUrl = new mt(t);
|
|
16856
16856
|
}
|
|
16857
16857
|
async getQuoteFromAssets({
|
|
16858
16858
|
fromAsset: t,
|
|
@@ -16994,7 +16994,7 @@ class oo extends dp {
|
|
|
16994
16994
|
async generateSecret(t) {
|
|
16995
16995
|
const r = await this.signMessage(t);
|
|
16996
16996
|
if (!r.ok) return H(r.error);
|
|
16997
|
-
const n = bi(
|
|
16997
|
+
const n = bi(ot(r.val)), i = bi(n);
|
|
16998
16998
|
return ie({ secret: n, secretHash: i });
|
|
16999
16999
|
}
|
|
17000
17000
|
async signMessage(t) {
|
|
@@ -17003,7 +17003,7 @@ class oo extends dp {
|
|
|
17003
17003
|
if (!f.ok) return H(f.error);
|
|
17004
17004
|
this.digestKey = f.val;
|
|
17005
17005
|
}
|
|
17006
|
-
const r = Ds(
|
|
17006
|
+
const r = Ds(bt), n = "Garden.fi" + t.toString(), i = Buffer.from(n, "utf8"), s = bi(i), o = Buffer.from(Wt(this.digestKey), "hex");
|
|
17007
17007
|
if (o.length !== 32)
|
|
17008
17008
|
return H("Invalid private key length. Expected 32 bytes.");
|
|
17009
17009
|
const c = r.fromPrivateKey(o).sign(Buffer.from(Wt(s), "hex"));
|
|
@@ -17483,7 +17483,7 @@ const Kn = {
|
|
|
17483
17483
|
contracts: HA,
|
|
17484
17484
|
formatters: LA,
|
|
17485
17485
|
serializers: DA
|
|
17486
|
-
}, GA = /* @__PURE__ */
|
|
17486
|
+
}, GA = /* @__PURE__ */ St({
|
|
17487
17487
|
id: 42161,
|
|
17488
17488
|
name: "Arbitrum One",
|
|
17489
17489
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17505,7 +17505,7 @@ const Kn = {
|
|
|
17505
17505
|
blockCreated: 7654707
|
|
17506
17506
|
}
|
|
17507
17507
|
}
|
|
17508
|
-
}), VA = /* @__PURE__ */
|
|
17508
|
+
}), VA = /* @__PURE__ */ St({
|
|
17509
17509
|
id: 421614,
|
|
17510
17510
|
name: "Arbitrum Sepolia",
|
|
17511
17511
|
nativeCurrency: {
|
|
@@ -17532,7 +17532,7 @@ const Kn = {
|
|
|
17532
17532
|
}
|
|
17533
17533
|
},
|
|
17534
17534
|
testnet: !0
|
|
17535
|
-
}), yi = 1, WA = /* @__PURE__ */
|
|
17535
|
+
}), yi = 1, WA = /* @__PURE__ */ St({
|
|
17536
17536
|
...Kn,
|
|
17537
17537
|
id: 8453,
|
|
17538
17538
|
name: "Base",
|
|
@@ -17579,7 +17579,7 @@ const Kn = {
|
|
|
17579
17579
|
}
|
|
17580
17580
|
},
|
|
17581
17581
|
sourceId: yi
|
|
17582
|
-
}), mi = 11155111, KA = /* @__PURE__ */
|
|
17582
|
+
}), mi = 11155111, KA = /* @__PURE__ */ St({
|
|
17583
17583
|
...Kn,
|
|
17584
17584
|
id: 84532,
|
|
17585
17585
|
network: "base-sepolia",
|
|
@@ -17628,7 +17628,7 @@ const Kn = {
|
|
|
17628
17628
|
},
|
|
17629
17629
|
testnet: !0,
|
|
17630
17630
|
sourceId: mi
|
|
17631
|
-
}), YA = /* @__PURE__ */
|
|
17631
|
+
}), YA = /* @__PURE__ */ St({
|
|
17632
17632
|
id: 80094,
|
|
17633
17633
|
name: "Berachain",
|
|
17634
17634
|
nativeCurrency: {
|
|
@@ -17661,7 +17661,7 @@ const Kn = {
|
|
|
17661
17661
|
},
|
|
17662
17662
|
ensTlds: [".bera"],
|
|
17663
17663
|
testnet: !1
|
|
17664
|
-
}), ZA = /* @__PURE__ */
|
|
17664
|
+
}), ZA = /* @__PURE__ */ St({
|
|
17665
17665
|
id: 80084,
|
|
17666
17666
|
name: "Berachain bArtio",
|
|
17667
17667
|
nativeCurrency: {
|
|
@@ -17694,56 +17694,7 @@ const Kn = {
|
|
|
17694
17694
|
}
|
|
17695
17695
|
},
|
|
17696
17696
|
testnet: !0
|
|
17697
|
-
}), XA = /* @__PURE__ */
|
|
17698
|
-
id: 56,
|
|
17699
|
-
name: "BNB Smart Chain",
|
|
17700
|
-
nativeCurrency: {
|
|
17701
|
-
decimals: 18,
|
|
17702
|
-
name: "BNB",
|
|
17703
|
-
symbol: "BNB"
|
|
17704
|
-
},
|
|
17705
|
-
rpcUrls: {
|
|
17706
|
-
default: { http: ["https://56.rpc.thirdweb.com"] }
|
|
17707
|
-
},
|
|
17708
|
-
blockExplorers: {
|
|
17709
|
-
default: {
|
|
17710
|
-
name: "BscScan",
|
|
17711
|
-
url: "https://bscscan.com",
|
|
17712
|
-
apiUrl: "https://api.bscscan.com/api"
|
|
17713
|
-
}
|
|
17714
|
-
},
|
|
17715
|
-
contracts: {
|
|
17716
|
-
multicall3: {
|
|
17717
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
17718
|
-
blockCreated: 15921452
|
|
17719
|
-
}
|
|
17720
|
-
}
|
|
17721
|
-
}), JA = /* @__PURE__ */ st({
|
|
17722
|
-
id: 97,
|
|
17723
|
-
name: "BNB Smart Chain Testnet",
|
|
17724
|
-
nativeCurrency: {
|
|
17725
|
-
decimals: 18,
|
|
17726
|
-
name: "BNB",
|
|
17727
|
-
symbol: "tBNB"
|
|
17728
|
-
},
|
|
17729
|
-
rpcUrls: {
|
|
17730
|
-
default: { http: ["https://data-seed-prebsc-1-s1.bnbchain.org:8545"] }
|
|
17731
|
-
},
|
|
17732
|
-
blockExplorers: {
|
|
17733
|
-
default: {
|
|
17734
|
-
name: "BscScan",
|
|
17735
|
-
url: "https://testnet.bscscan.com",
|
|
17736
|
-
apiUrl: "https://api-testnet.bscscan.com/api"
|
|
17737
|
-
}
|
|
17738
|
-
},
|
|
17739
|
-
contracts: {
|
|
17740
|
-
multicall3: {
|
|
17741
|
-
address: "0xca11bde05977b3631167028862be2a173976ca11",
|
|
17742
|
-
blockCreated: 17422483
|
|
17743
|
-
}
|
|
17744
|
-
},
|
|
17745
|
-
testnet: !0
|
|
17746
|
-
}), QA = /* @__PURE__ */ st({
|
|
17697
|
+
}), XA = /* @__PURE__ */ St({
|
|
17747
17698
|
id: 5115,
|
|
17748
17699
|
name: "Citrea Testnet",
|
|
17749
17700
|
nativeCurrency: { name: "cBTC", symbol: "cBTC", decimals: 18 },
|
|
@@ -17760,7 +17711,7 @@ const Kn = {
|
|
|
17760
17711
|
}
|
|
17761
17712
|
},
|
|
17762
17713
|
testnet: !0
|
|
17763
|
-
}),
|
|
17714
|
+
}), JA = 1, QA = /* @__PURE__ */ St({
|
|
17764
17715
|
id: 21e6,
|
|
17765
17716
|
name: "Corn",
|
|
17766
17717
|
nativeCurrency: {
|
|
@@ -17784,8 +17735,8 @@ const Kn = {
|
|
|
17784
17735
|
blockCreated: 3228
|
|
17785
17736
|
}
|
|
17786
17737
|
},
|
|
17787
|
-
sourceId:
|
|
17788
|
-
}),
|
|
17738
|
+
sourceId: JA
|
|
17739
|
+
}), ex = /* @__PURE__ */ St({
|
|
17789
17740
|
id: 1,
|
|
17790
17741
|
name: "Ethereum",
|
|
17791
17742
|
nativeCurrency: { name: "Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17814,7 +17765,7 @@ const Kn = {
|
|
|
17814
17765
|
blockCreated: 14353601
|
|
17815
17766
|
}
|
|
17816
17767
|
}
|
|
17817
|
-
}),
|
|
17768
|
+
}), tx = /* @__PURE__ */ St({
|
|
17818
17769
|
id: 10143,
|
|
17819
17770
|
name: "Monad Testnet",
|
|
17820
17771
|
nativeCurrency: {
|
|
@@ -17840,7 +17791,7 @@ const Kn = {
|
|
|
17840
17791
|
}
|
|
17841
17792
|
},
|
|
17842
17793
|
testnet: !0
|
|
17843
|
-
}),
|
|
17794
|
+
}), rx = /* @__PURE__ */ St({
|
|
17844
17795
|
id: 11155111,
|
|
17845
17796
|
name: "Sepolia",
|
|
17846
17797
|
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
|
|
@@ -17868,7 +17819,7 @@ const Kn = {
|
|
|
17868
17819
|
}
|
|
17869
17820
|
},
|
|
17870
17821
|
testnet: !0
|
|
17871
|
-
}), Us = 1,
|
|
17822
|
+
}), Us = 1, nx = /* @__PURE__ */ St({
|
|
17872
17823
|
...Kn,
|
|
17873
17824
|
id: 130,
|
|
17874
17825
|
name: "Unichain",
|
|
@@ -17908,14 +17859,14 @@ const Kn = {
|
|
|
17908
17859
|
}
|
|
17909
17860
|
},
|
|
17910
17861
|
sourceId: Us
|
|
17911
|
-
}),
|
|
17912
|
-
...
|
|
17862
|
+
}), ix = {
|
|
17863
|
+
...rx,
|
|
17913
17864
|
rpcUrls: {
|
|
17914
17865
|
default: {
|
|
17915
17866
|
http: ["https://ethereum-sepolia-rpc.publicnode.com"]
|
|
17916
17867
|
}
|
|
17917
17868
|
}
|
|
17918
|
-
},
|
|
17869
|
+
}, sx = {
|
|
17919
17870
|
id: 3637,
|
|
17920
17871
|
name: "Botanix",
|
|
17921
17872
|
nativeCurrency: {
|
|
@@ -17934,7 +17885,7 @@ const Kn = {
|
|
|
17934
17885
|
http: ["https://rpc.botanixlabs.com/"]
|
|
17935
17886
|
}
|
|
17936
17887
|
}
|
|
17937
|
-
},
|
|
17888
|
+
}, ox = {
|
|
17938
17889
|
id: 998,
|
|
17939
17890
|
name: "Hyperliquid EVM Testnet",
|
|
17940
17891
|
nativeCurrency: {
|
|
@@ -17953,7 +17904,7 @@ const Kn = {
|
|
|
17953
17904
|
http: ["https://rpc.hyperliquid-testnet.xyz/evm"]
|
|
17954
17905
|
}
|
|
17955
17906
|
}
|
|
17956
|
-
},
|
|
17907
|
+
}, ax = {
|
|
17957
17908
|
id: 999,
|
|
17958
17909
|
name: "HyperEVM",
|
|
17959
17910
|
nativeCurrency: {
|
|
@@ -17973,26 +17924,24 @@ const Kn = {
|
|
|
17973
17924
|
}
|
|
17974
17925
|
}
|
|
17975
17926
|
}, ky = {
|
|
17976
|
-
ethereum:
|
|
17927
|
+
ethereum: ex,
|
|
17977
17928
|
arbitrum: GA,
|
|
17978
|
-
ethereum_sepolia:
|
|
17929
|
+
ethereum_sepolia: ix,
|
|
17979
17930
|
arbitrum_sepolia: VA,
|
|
17980
17931
|
ethereum_localnet: Zy,
|
|
17981
17932
|
arbitrum_localnet: Yy,
|
|
17982
17933
|
base_sepolia: KA,
|
|
17983
17934
|
base: WA,
|
|
17984
17935
|
bera_testnet: ZA,
|
|
17985
|
-
citrea_testnet:
|
|
17936
|
+
citrea_testnet: XA,
|
|
17986
17937
|
bera: YA,
|
|
17987
|
-
monad_testnet:
|
|
17988
|
-
hyperliquid_testnet:
|
|
17989
|
-
hyperliquid:
|
|
17990
|
-
unichain:
|
|
17991
|
-
corn:
|
|
17992
|
-
botanix:
|
|
17993
|
-
|
|
17994
|
-
bnbchain_testnet: JA
|
|
17995
|
-
}, fx = async (e, t) => {
|
|
17938
|
+
monad_testnet: tx,
|
|
17939
|
+
hyperliquid_testnet: ox,
|
|
17940
|
+
hyperliquid: ax,
|
|
17941
|
+
unichain: nx,
|
|
17942
|
+
corn: QA,
|
|
17943
|
+
botanix: sx
|
|
17944
|
+
}, cx = async (e, t) => {
|
|
17996
17945
|
var i, s, o;
|
|
17997
17946
|
const r = ky[e], n = await t.getChainId();
|
|
17998
17947
|
if (r)
|
|
@@ -18010,7 +17959,7 @@ const Kn = {
|
|
|
18010
17959
|
walletClient: a
|
|
18011
17960
|
});
|
|
18012
17961
|
} catch (a) {
|
|
18013
|
-
if (
|
|
17962
|
+
if (ux(a))
|
|
18014
17963
|
if (a.code === 4902)
|
|
18015
17964
|
try {
|
|
18016
17965
|
await t.addChain({ chain: r });
|
|
@@ -18043,7 +17992,7 @@ const Kn = {
|
|
|
18043
17992
|
}
|
|
18044
17993
|
else
|
|
18045
17994
|
return H("Chain not supported");
|
|
18046
|
-
},
|
|
17995
|
+
}, ux = (e) => typeof e == "object" && e != null && ("code" in e || "message" in e || "body" in e), fx = [
|
|
18047
17996
|
{
|
|
18048
17997
|
inputs: [
|
|
18049
17998
|
{
|
|
@@ -18440,9 +18389,9 @@ const Kn = {
|
|
|
18440
18389
|
type: "function"
|
|
18441
18390
|
}
|
|
18442
18391
|
];
|
|
18443
|
-
class
|
|
18392
|
+
class dx {
|
|
18444
18393
|
constructor(t, r, n) {
|
|
18445
|
-
this.url = new
|
|
18394
|
+
this.url = new mt("/relayer", t), this.auth = n, this.wallet = r;
|
|
18446
18395
|
}
|
|
18447
18396
|
get htlcActorAddress() {
|
|
18448
18397
|
if (!this.wallet.account) throw new Error("No account found");
|
|
@@ -18454,7 +18403,7 @@ class px {
|
|
|
18454
18403
|
return H("Account address and order initiator mismatch");
|
|
18455
18404
|
if (!Xy(t.source_swap.chain))
|
|
18456
18405
|
return H("Source chain is not an EVM chain");
|
|
18457
|
-
const r = await
|
|
18406
|
+
const r = await cx(
|
|
18458
18407
|
t.source_swap.chain,
|
|
18459
18408
|
this.wallet
|
|
18460
18409
|
);
|
|
@@ -18463,7 +18412,7 @@ class px {
|
|
|
18463
18412
|
const { create_order: n, source_swap: i } = t;
|
|
18464
18413
|
if (!i.amount || !i.redeemer || !n.timelock || !n.secret_hash)
|
|
18465
18414
|
return H("Invalid order");
|
|
18466
|
-
const s =
|
|
18415
|
+
const s = ot(n.secret_hash), o = BigInt(n.timelock), a = ot(i.redeemer), c = BigInt(i.amount), f = await this.getTokenAddress(t.source_swap.asset);
|
|
18467
18416
|
return f.ok ? Jy(t.source_swap.chain, f.val) ? this._initiateOnNativeHTLC(
|
|
18468
18417
|
s,
|
|
18469
18418
|
o,
|
|
@@ -18483,7 +18432,7 @@ class px {
|
|
|
18483
18432
|
async getTokenAddress(t) {
|
|
18484
18433
|
try {
|
|
18485
18434
|
const n = await aa({
|
|
18486
|
-
address:
|
|
18435
|
+
address: ot(t),
|
|
18487
18436
|
abi: ol,
|
|
18488
18437
|
client: this.wallet
|
|
18489
18438
|
}).read.token();
|
|
@@ -18496,8 +18445,8 @@ class px {
|
|
|
18496
18445
|
if (!this.wallet.account) return H("No account found");
|
|
18497
18446
|
try {
|
|
18498
18447
|
const a = await aa({
|
|
18499
|
-
address:
|
|
18500
|
-
abi:
|
|
18448
|
+
address: ot(s),
|
|
18449
|
+
abi: fx,
|
|
18501
18450
|
client: this.wallet
|
|
18502
18451
|
}).write.initiate(
|
|
18503
18452
|
[i, r, n, t],
|
|
@@ -18518,7 +18467,7 @@ class px {
|
|
|
18518
18467
|
const c = await this.auth.getAuthHeaders();
|
|
18519
18468
|
if (!c.ok) return H(c.error);
|
|
18520
18469
|
const f = aa({
|
|
18521
|
-
address:
|
|
18470
|
+
address: ot(s),
|
|
18522
18471
|
abi: ol,
|
|
18523
18472
|
client: this.wallet
|
|
18524
18473
|
}), u = await rm(
|
|
@@ -19732,7 +19681,7 @@ const By = [
|
|
|
19732
19681
|
}
|
|
19733
19682
|
]
|
|
19734
19683
|
}
|
|
19735
|
-
],
|
|
19684
|
+
], lx = async (e, t, r, n, i) => {
|
|
19736
19685
|
try {
|
|
19737
19686
|
const s = await Ys(
|
|
19738
19687
|
e.address,
|
|
@@ -19745,9 +19694,9 @@ const By = [
|
|
|
19745
19694
|
return ie("Allowance already approved");
|
|
19746
19695
|
const a = _i.uint256(BigInt(n)), c = await e.execute([
|
|
19747
19696
|
{
|
|
19748
|
-
contractAddress:
|
|
19697
|
+
contractAddress: ot(t),
|
|
19749
19698
|
entrypoint: "approve",
|
|
19750
|
-
calldata: [
|
|
19699
|
+
calldata: [ot(r), a.low, a.high]
|
|
19751
19700
|
}
|
|
19752
19701
|
]);
|
|
19753
19702
|
await i.waitForTransaction(
|
|
@@ -19793,11 +19742,11 @@ const By = [
|
|
|
19793
19742
|
try {
|
|
19794
19743
|
const s = await new wu(
|
|
19795
19744
|
By,
|
|
19796
|
-
|
|
19745
|
+
ot(t),
|
|
19797
19746
|
n
|
|
19798
19747
|
).call("allowance", [
|
|
19799
|
-
|
|
19800
|
-
|
|
19748
|
+
ot(e),
|
|
19749
|
+
ot(r)
|
|
19801
19750
|
]);
|
|
19802
19751
|
return ie(BigInt((s == null ? void 0 : s.toString()) || "0"));
|
|
19803
19752
|
} catch (i) {
|
|
@@ -19805,7 +19754,7 @@ const By = [
|
|
|
19805
19754
|
`Failed to check allowance: ${i instanceof Error ? i.message : String(i)}`
|
|
19806
19755
|
);
|
|
19807
19756
|
}
|
|
19808
|
-
},
|
|
19757
|
+
}, px = async (e, t, r, n, i) => {
|
|
19809
19758
|
const s = await Ys(
|
|
19810
19759
|
e,
|
|
19811
19760
|
t,
|
|
@@ -20066,7 +20015,7 @@ const By = [
|
|
|
20066
20015
|
}
|
|
20067
20016
|
]
|
|
20068
20017
|
}
|
|
20069
|
-
],
|
|
20018
|
+
], hx = {
|
|
20070
20019
|
StarknetDomain: [
|
|
20071
20020
|
{ name: "name", type: "shortstring" },
|
|
20072
20021
|
{ name: "version", type: "shortstring" },
|
|
@@ -20080,9 +20029,9 @@ const By = [
|
|
|
20080
20029
|
{ name: "secretHash", type: "u128*" }
|
|
20081
20030
|
]
|
|
20082
20031
|
};
|
|
20083
|
-
class
|
|
20032
|
+
class yx {
|
|
20084
20033
|
constructor(t, r, n, i) {
|
|
20085
|
-
this.url = t instanceof
|
|
20034
|
+
this.url = t instanceof mt ? t : new mt(t), this.account = r, this.starknetProvider = new pp({
|
|
20086
20035
|
nodeUrl: i || ro[n].nodeUrl
|
|
20087
20036
|
}), this.chainId = ro[n].chainId;
|
|
20088
20037
|
}
|
|
@@ -20100,7 +20049,7 @@ class gx {
|
|
|
20100
20049
|
Oy,
|
|
20101
20050
|
t.source_swap.asset,
|
|
20102
20051
|
this.account
|
|
20103
|
-
), a = await (o == null ? void 0 : o.token()), c = hp.toHex(a), f = await
|
|
20052
|
+
), a = await (o == null ? void 0 : o.token()), c = hp.toHex(a), f = await px(
|
|
20104
20053
|
this.account.address,
|
|
20105
20054
|
c,
|
|
20106
20055
|
n.asset,
|
|
@@ -20116,11 +20065,11 @@ class gx {
|
|
|
20116
20065
|
const { create_order: n, source_swap: i } = r, { redeemer: s, amount: o } = i, { secret_hash: a, timelock: c } = n, f = i.asset;
|
|
20117
20066
|
try {
|
|
20118
20067
|
const u = _i.uint256(BigInt(o)), d = {
|
|
20119
|
-
contractAddress:
|
|
20068
|
+
contractAddress: ot(t),
|
|
20120
20069
|
entrypoint: "approve",
|
|
20121
20070
|
calldata: [f, u.low, u.high]
|
|
20122
20071
|
}, y = _i.uint256(o), p = {
|
|
20123
|
-
contractAddress:
|
|
20072
|
+
contractAddress: ot(f),
|
|
20124
20073
|
entrypoint: "initiate",
|
|
20125
20074
|
calldata: [
|
|
20126
20075
|
s,
|
|
@@ -20147,7 +20096,7 @@ class gx {
|
|
|
20147
20096
|
revision: cm.ACTIVE
|
|
20148
20097
|
},
|
|
20149
20098
|
primaryType: "Initiate",
|
|
20150
|
-
types:
|
|
20099
|
+
types: hx,
|
|
20151
20100
|
message: {
|
|
20152
20101
|
redeemer: i,
|
|
20153
20102
|
amount: _i.uint256(s),
|
|
@@ -20205,13 +20154,13 @@ class gx {
|
|
|
20205
20154
|
return H("Refund is taken care of by the relayer");
|
|
20206
20155
|
}
|
|
20207
20156
|
}
|
|
20208
|
-
const
|
|
20209
|
-
if (e ===
|
|
20210
|
-
return
|
|
20211
|
-
if (e ===
|
|
20212
|
-
return
|
|
20157
|
+
const mx = (e) => e.map((t) => t), gx = (e) => {
|
|
20158
|
+
if (e === vt.Testnet)
|
|
20159
|
+
return bx;
|
|
20160
|
+
if (e === vt.Mainnet)
|
|
20161
|
+
return wx;
|
|
20213
20162
|
throw new Error("Invalid network");
|
|
20214
|
-
},
|
|
20163
|
+
}, bx = ["https://mempool.space/testnet4/api"], wx = [
|
|
20215
20164
|
"https://mempool.space/api",
|
|
20216
20165
|
"https://blockstream.info/api"
|
|
20217
20166
|
], zr = {
|
|
@@ -20229,9 +20178,9 @@ const bx = (e) => e.map((t) => t), wx = (e) => {
|
|
|
20229
20178
|
INVALID_PUBKEY: "invalid public key",
|
|
20230
20179
|
ORDER_NOT_EXPIRED: "you cannot refund before your transaction expires"
|
|
20231
20180
|
}, al = (e) => e.sort((t, r) => t.status.confirmed != r.status.confirmed ? t.status.confirmed ? -1 : 1 : r.value - t.value);
|
|
20232
|
-
class
|
|
20181
|
+
class vx {
|
|
20233
20182
|
constructor(t, r) {
|
|
20234
|
-
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ?
|
|
20183
|
+
this.cacheTimeout = 2e3, this.utxosCache = /* @__PURE__ */ new Map(), this.APIs = r ? mx([r]) : gx(t), this.network = t;
|
|
20235
20184
|
}
|
|
20236
20185
|
/**
|
|
20237
20186
|
* Gets the output index of the UTXO
|
|
@@ -20357,7 +20306,7 @@ class Ax {
|
|
|
20357
20306
|
* @returns {Promise<FeeRates>}
|
|
20358
20307
|
*/
|
|
20359
20308
|
async getFeeRates() {
|
|
20360
|
-
if (this.network ===
|
|
20309
|
+
if (this.network === vt.Regtest)
|
|
20361
20310
|
return {
|
|
20362
20311
|
fastestFee: 8,
|
|
20363
20312
|
halfHourFee: 7,
|
|
@@ -20366,7 +20315,7 @@ class Ax {
|
|
|
20366
20315
|
minimumFee: 2
|
|
20367
20316
|
};
|
|
20368
20317
|
let t = "";
|
|
20369
|
-
this.network ===
|
|
20318
|
+
this.network === vt.Testnet && (t = "testnet4/");
|
|
20370
20319
|
const r = `https://mempool.space/${t}api/v1/fees/recommended`, n = `https://blockstream.info/${t}api/fee-estimates`, i = await Ie.getWithFallback([r, n], {
|
|
20371
20320
|
signal: AbortSignal.timeout(5e3)
|
|
20372
20321
|
});
|
|
@@ -20500,7 +20449,7 @@ class en {
|
|
|
20500
20449
|
return new en(i, s);
|
|
20501
20450
|
}
|
|
20502
20451
|
}
|
|
20503
|
-
const
|
|
20452
|
+
const Ex = (e, t, r = !1) => {
|
|
20504
20453
|
const n = (o) => {
|
|
20505
20454
|
try {
|
|
20506
20455
|
o = xi.fromBech32(o).data.toString("hex");
|
|
@@ -20547,7 +20496,7 @@ const xx = (e, t, r = !1) => {
|
|
|
20547
20496
|
P2TR: "p2tr"
|
|
20548
20497
|
};
|
|
20549
20498
|
var Cy = /* @__PURE__ */ ((e) => (e[e.Bitcoin = 0] = "Bitcoin", e[e.EVM = 1] = "EVM", e))(Cy || {});
|
|
20550
|
-
class
|
|
20499
|
+
class Ax {
|
|
20551
20500
|
addSignatureSegwitV0(t = Zs.ALL) {
|
|
20552
20501
|
return new en("segwitV0", t);
|
|
20553
20502
|
}
|
|
@@ -20641,11 +20590,11 @@ class _x {
|
|
|
20641
20590
|
async newSwap(t) {
|
|
20642
20591
|
if (t.secretHash = Wt(t.secretHash), t.secretHash.length !== 64)
|
|
20643
20592
|
throw new Error(Ai.INVALID_SECRET_HASH);
|
|
20644
|
-
const { script: r, address: n } =
|
|
20593
|
+
const { script: r, address: n } = Ex(
|
|
20645
20594
|
t,
|
|
20646
20595
|
await this.getNetwork()
|
|
20647
20596
|
);
|
|
20648
|
-
return new
|
|
20597
|
+
return new xx(this, {
|
|
20649
20598
|
...t,
|
|
20650
20599
|
redeemScript: r,
|
|
20651
20600
|
scriptAddress: n
|
|
@@ -20673,7 +20622,7 @@ class _x {
|
|
|
20673
20622
|
throw new Error("Unsupported script type");
|
|
20674
20623
|
}
|
|
20675
20624
|
}
|
|
20676
|
-
class
|
|
20625
|
+
class xx {
|
|
20677
20626
|
/**
|
|
20678
20627
|
* @constructor
|
|
20679
20628
|
* @param {IBitcoinWallet} wallet
|
|
@@ -20774,34 +20723,34 @@ class Sx {
|
|
|
20774
20723
|
}
|
|
20775
20724
|
}
|
|
20776
20725
|
}
|
|
20777
|
-
const ka = (e, t, r, n) => `m/${e}'/${t ===
|
|
20726
|
+
const ka = (e, t, r, n) => `m/${e}'/${t === vt.Mainnet ? 0 : 1}'/${r}'/0/${n ?? 0}`, Ry = {
|
|
20778
20727
|
bip44: (e, t, r) => ka("44", e, r ?? 0, t),
|
|
20779
20728
|
bip49: (e, t, r) => ka("49", e, r ?? 0, t),
|
|
20780
20729
|
bip84: (e, t, r) => ka("84", e, r ?? 0, t)
|
|
20781
20730
|
};
|
|
20782
20731
|
function Ba(e) {
|
|
20783
|
-
if (e ===
|
|
20732
|
+
if (e === vt.Mainnet)
|
|
20784
20733
|
return Zo.bitcoin;
|
|
20785
|
-
if (e ===
|
|
20734
|
+
if (e === vt.Testnet)
|
|
20786
20735
|
return Zo.testnet;
|
|
20787
|
-
if (e ===
|
|
20736
|
+
if (e === vt.Regtest)
|
|
20788
20737
|
return Zo.regtest;
|
|
20789
20738
|
throw new Error("Invalid network");
|
|
20790
20739
|
}
|
|
20791
|
-
function
|
|
20740
|
+
function _x(e, t, r) {
|
|
20792
20741
|
if (!fm(e))
|
|
20793
20742
|
throw new Error("Invalid mnemonic");
|
|
20794
|
-
const n = (r == null ? void 0 : r.path) ?? Ry.bip44(t, (r == null ? void 0 : r.index) ?? 0), i = lm(
|
|
20795
|
-
return
|
|
20743
|
+
const n = (r == null ? void 0 : r.path) ?? Ry.bip44(t, (r == null ? void 0 : r.index) ?? 0), i = lm(bt).fromSeed(dm(e));
|
|
20744
|
+
return Sx(i, n);
|
|
20796
20745
|
}
|
|
20797
|
-
const
|
|
20746
|
+
const Sx = (e, t) => {
|
|
20798
20747
|
const r = e.derivePath(t).privateKey;
|
|
20799
20748
|
if (!r)
|
|
20800
20749
|
throw new Error("Unable to derive private key from mnemonic");
|
|
20801
20750
|
return r.toString("hex");
|
|
20802
20751
|
};
|
|
20803
|
-
om(
|
|
20804
|
-
class Cn extends
|
|
20752
|
+
om(bt);
|
|
20753
|
+
class Cn extends Ax {
|
|
20805
20754
|
/**
|
|
20806
20755
|
* @constructor
|
|
20807
20756
|
* @param {BitcoinWalletOpts} opts
|
|
@@ -20810,7 +20759,7 @@ class Cn extends _x {
|
|
|
20810
20759
|
* @param {number} opts.pkIndex - The address_index as per BIP44
|
|
20811
20760
|
*/
|
|
20812
20761
|
constructor({ privateKey: t, provider: r, pkPath: n, pkType: i }) {
|
|
20813
|
-
const s = Ds(
|
|
20762
|
+
const s = Ds(bt), o = Ba(r.getNetwork()), a = Buffer.from(t, "hex");
|
|
20814
20763
|
if (a.length === 0)
|
|
20815
20764
|
throw new Error("invalid private key");
|
|
20816
20765
|
super(), this.minAmt = 1e3, this.path = n || "", this.pkType = i, this.signer = s.fromPrivateKey(a, {
|
|
@@ -20823,7 +20772,7 @@ class Cn extends _x {
|
|
|
20823
20772
|
* else use multi-key wallet's `fromMnemonic`
|
|
20824
20773
|
*/
|
|
20825
20774
|
static fromMnemonic(t, r, n) {
|
|
20826
|
-
const i = Ry.bip84(r.getNetwork(), n == null ? void 0 : n.index), s =
|
|
20775
|
+
const i = Ry.bip84(r.getNetwork(), n == null ? void 0 : n.index), s = _x(t, r.getNetwork(), {
|
|
20827
20776
|
path: i
|
|
20828
20777
|
});
|
|
20829
20778
|
return new Cn({
|
|
@@ -20853,7 +20802,7 @@ class Cn extends _x {
|
|
|
20853
20802
|
* Creates a random Bitcoin wallet
|
|
20854
20803
|
*/
|
|
20855
20804
|
static createRandom(t) {
|
|
20856
|
-
const r = Ds(
|
|
20805
|
+
const r = Ds(bt), n = Ba(t.getNetwork()), i = r.makeRandom({ network: n });
|
|
20857
20806
|
if (!i.privateKey) throw new Error("Failed to create random key");
|
|
20858
20807
|
return new Cn({
|
|
20859
20808
|
privateKey: i.privateKey.toString("hex"),
|
|
@@ -20863,7 +20812,7 @@ class Cn extends _x {
|
|
|
20863
20812
|
});
|
|
20864
20813
|
}
|
|
20865
20814
|
static fromWIF(t, r, n) {
|
|
20866
|
-
const i = Ds(
|
|
20815
|
+
const i = Ds(bt), s = Ba(r.getNetwork()), o = i.fromWIF(t, s);
|
|
20867
20816
|
if (!o.privateKey)
|
|
20868
20817
|
throw new Error("Invalid WIF");
|
|
20869
20818
|
return Cn.fromPrivateKey(
|
|
@@ -21087,12 +21036,12 @@ class Cn extends _x {
|
|
|
21087
21036
|
return this.signer.signSchnorr(t);
|
|
21088
21037
|
}
|
|
21089
21038
|
}
|
|
21090
|
-
const
|
|
21039
|
+
const Px = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", Tx = {
|
|
21091
21040
|
name: "solana_native_swaps",
|
|
21092
21041
|
version: "0.3.0",
|
|
21093
21042
|
spec: "0.1.0",
|
|
21094
21043
|
description: "Created with Anchor"
|
|
21095
|
-
},
|
|
21044
|
+
}, Ix = [
|
|
21096
21045
|
{
|
|
21097
21046
|
name: "initiate",
|
|
21098
21047
|
discriminator: [
|
|
@@ -21272,7 +21221,7 @@ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
|
|
|
21272
21221
|
],
|
|
21273
21222
|
args: []
|
|
21274
21223
|
}
|
|
21275
|
-
],
|
|
21224
|
+
], kx = [
|
|
21276
21225
|
{
|
|
21277
21226
|
name: "SwapAccount",
|
|
21278
21227
|
discriminator: [
|
|
@@ -21286,7 +21235,7 @@ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
|
|
|
21286
21235
|
182
|
|
21287
21236
|
]
|
|
21288
21237
|
}
|
|
21289
|
-
],
|
|
21238
|
+
], Bx = [
|
|
21290
21239
|
{
|
|
21291
21240
|
name: "Initiated",
|
|
21292
21241
|
discriminator: [
|
|
@@ -21339,7 +21288,7 @@ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
|
|
|
21339
21288
|
99
|
|
21340
21289
|
]
|
|
21341
21290
|
}
|
|
21342
|
-
],
|
|
21291
|
+
], Ox = [
|
|
21343
21292
|
{
|
|
21344
21293
|
code: 6e3,
|
|
21345
21294
|
name: "InvalidInitiator",
|
|
@@ -21360,7 +21309,7 @@ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
|
|
|
21360
21309
|
name: "RefundBeforeExpiry",
|
|
21361
21310
|
msg: "Attempt to perform a refund before expiry time"
|
|
21362
21311
|
}
|
|
21363
|
-
],
|
|
21312
|
+
], Cx = [
|
|
21364
21313
|
{
|
|
21365
21314
|
name: "Initiated",
|
|
21366
21315
|
type: {
|
|
@@ -21491,38 +21440,38 @@ const Ix = "2bag6xpshpvPe7SJ9nSDLHpxqhEAoHPGpEkjNSv7gxoF", kx = {
|
|
|
21491
21440
|
}
|
|
21492
21441
|
}
|
|
21493
21442
|
], gu = {
|
|
21494
|
-
address:
|
|
21495
|
-
metadata:
|
|
21496
|
-
instructions:
|
|
21497
|
-
accounts:
|
|
21498
|
-
events:
|
|
21499
|
-
errors:
|
|
21500
|
-
types:
|
|
21443
|
+
address: Px,
|
|
21444
|
+
metadata: Tx,
|
|
21445
|
+
instructions: Ix,
|
|
21446
|
+
accounts: kx,
|
|
21447
|
+
events: Bx,
|
|
21448
|
+
errors: Ox,
|
|
21449
|
+
types: Cx
|
|
21501
21450
|
};
|
|
21502
21451
|
var fr = {}, Yn = {};
|
|
21503
21452
|
Object.defineProperty(Yn, "__esModule", { value: !0 });
|
|
21504
21453
|
Yn.decode = Yn.encode = void 0;
|
|
21505
21454
|
const ul = mn;
|
|
21506
|
-
function
|
|
21455
|
+
function Rx(e) {
|
|
21507
21456
|
return e.reduce((t, r) => t + r.toString(16).padStart(2, "0"), "0x");
|
|
21508
21457
|
}
|
|
21509
|
-
Yn.encode =
|
|
21510
|
-
function
|
|
21458
|
+
Yn.encode = Rx;
|
|
21459
|
+
function Nx(e) {
|
|
21511
21460
|
e.indexOf("0x") === 0 && (e = e.substr(2)), e.length % 2 === 1 && (e = "0" + e);
|
|
21512
21461
|
let t = e.match(/.{2}/g);
|
|
21513
21462
|
return t === null ? ul.Buffer.from([]) : ul.Buffer.from(t.map((r) => parseInt(r, 16)));
|
|
21514
21463
|
}
|
|
21515
|
-
Yn.decode =
|
|
21464
|
+
Yn.decode = Nx;
|
|
21516
21465
|
var Zn = {}, Nr = {}, Oa;
|
|
21517
21466
|
Object.defineProperty(Nr, "__esModule", { value: !0 });
|
|
21518
21467
|
Nr.isVersionedTransaction = Nr.chunks = Nr.isBrowser = void 0;
|
|
21519
21468
|
Nr.isBrowser = process.env.ANCHOR_BROWSER || typeof window < "u" && !(!((Oa = window.process) === null || Oa === void 0) && Oa.hasOwnProperty("type"));
|
|
21520
|
-
function
|
|
21469
|
+
function Fx(e, t) {
|
|
21521
21470
|
return Array.apply(0, new Array(Math.ceil(e.length / t))).map((r, n) => e.slice(n * t, (n + 1) * t));
|
|
21522
21471
|
}
|
|
21523
|
-
Nr.chunks =
|
|
21524
|
-
const
|
|
21525
|
-
Nr.isVersionedTransaction =
|
|
21472
|
+
Nr.chunks = Fx;
|
|
21473
|
+
const $x = (e) => "version" in e;
|
|
21474
|
+
Nr.isVersionedTransaction = $x;
|
|
21526
21475
|
var Ca = {}, Ra = {}, Na, fl;
|
|
21527
21476
|
function Ny() {
|
|
21528
21477
|
return fl || (fl = 1, Na = function() {
|
|
@@ -21567,19 +21516,19 @@ function Fy() {
|
|
|
21567
21516
|
return ll || (ll = 1, $a = Object), $a;
|
|
21568
21517
|
}
|
|
21569
21518
|
var Ua, pl;
|
|
21570
|
-
function
|
|
21519
|
+
function Ux() {
|
|
21571
21520
|
return pl || (pl = 1, Ua = Error), Ua;
|
|
21572
21521
|
}
|
|
21573
21522
|
var Ha, hl;
|
|
21574
|
-
function
|
|
21523
|
+
function Hx() {
|
|
21575
21524
|
return hl || (hl = 1, Ha = EvalError), Ha;
|
|
21576
21525
|
}
|
|
21577
21526
|
var La, yl;
|
|
21578
|
-
function
|
|
21527
|
+
function Lx() {
|
|
21579
21528
|
return yl || (yl = 1, La = RangeError), La;
|
|
21580
21529
|
}
|
|
21581
21530
|
var Ma, ml;
|
|
21582
|
-
function
|
|
21531
|
+
function Mx() {
|
|
21583
21532
|
return ml || (ml = 1, Ma = ReferenceError), Ma;
|
|
21584
21533
|
}
|
|
21585
21534
|
var Da, gl;
|
|
@@ -21591,57 +21540,57 @@ function ms() {
|
|
|
21591
21540
|
return bl || (bl = 1, ja = TypeError), ja;
|
|
21592
21541
|
}
|
|
21593
21542
|
var za, wl;
|
|
21594
|
-
function
|
|
21543
|
+
function Dx() {
|
|
21595
21544
|
return wl || (wl = 1, za = URIError), za;
|
|
21596
21545
|
}
|
|
21597
21546
|
var qa, vl;
|
|
21598
|
-
function
|
|
21547
|
+
function jx() {
|
|
21599
21548
|
return vl || (vl = 1, qa = Math.abs), qa;
|
|
21600
21549
|
}
|
|
21601
21550
|
var Ga, El;
|
|
21602
|
-
function
|
|
21551
|
+
function zx() {
|
|
21603
21552
|
return El || (El = 1, Ga = Math.floor), Ga;
|
|
21604
21553
|
}
|
|
21605
21554
|
var Va, Al;
|
|
21606
|
-
function
|
|
21555
|
+
function qx() {
|
|
21607
21556
|
return Al || (Al = 1, Va = Math.max), Va;
|
|
21608
21557
|
}
|
|
21609
21558
|
var Wa, xl;
|
|
21610
|
-
function
|
|
21559
|
+
function Gx() {
|
|
21611
21560
|
return xl || (xl = 1, Wa = Math.min), Wa;
|
|
21612
21561
|
}
|
|
21613
21562
|
var Ka, _l;
|
|
21614
|
-
function
|
|
21563
|
+
function Vx() {
|
|
21615
21564
|
return _l || (_l = 1, Ka = Math.pow), Ka;
|
|
21616
21565
|
}
|
|
21617
21566
|
var Ya, Sl;
|
|
21618
|
-
function
|
|
21567
|
+
function Wx() {
|
|
21619
21568
|
return Sl || (Sl = 1, Ya = Math.round), Ya;
|
|
21620
21569
|
}
|
|
21621
21570
|
var Za, Pl;
|
|
21622
|
-
function
|
|
21571
|
+
function Kx() {
|
|
21623
21572
|
return Pl || (Pl = 1, Za = Number.isNaN || function(t) {
|
|
21624
21573
|
return t !== t;
|
|
21625
21574
|
}), Za;
|
|
21626
21575
|
}
|
|
21627
21576
|
var Xa, Tl;
|
|
21628
|
-
function
|
|
21577
|
+
function Yx() {
|
|
21629
21578
|
if (Tl) return Xa;
|
|
21630
21579
|
Tl = 1;
|
|
21631
|
-
var e =
|
|
21580
|
+
var e = Kx();
|
|
21632
21581
|
return Xa = function(r) {
|
|
21633
21582
|
return e(r) || r === 0 ? r : r < 0 ? -1 : 1;
|
|
21634
21583
|
}, Xa;
|
|
21635
21584
|
}
|
|
21636
21585
|
var Ja, Il;
|
|
21637
|
-
function
|
|
21586
|
+
function Zx() {
|
|
21638
21587
|
return Il || (Il = 1, Ja = Object.getOwnPropertyDescriptor), Ja;
|
|
21639
21588
|
}
|
|
21640
21589
|
var Qa, kl;
|
|
21641
21590
|
function oi() {
|
|
21642
21591
|
if (kl) return Qa;
|
|
21643
21592
|
kl = 1;
|
|
21644
|
-
var e =
|
|
21593
|
+
var e = Zx();
|
|
21645
21594
|
if (e)
|
|
21646
21595
|
try {
|
|
21647
21596
|
e([], "length");
|
|
@@ -21664,7 +21613,7 @@ function Vo() {
|
|
|
21664
21613
|
return ec = e, ec;
|
|
21665
21614
|
}
|
|
21666
21615
|
var tc, Ol;
|
|
21667
|
-
function
|
|
21616
|
+
function Xx() {
|
|
21668
21617
|
if (Ol) return tc;
|
|
21669
21618
|
Ol = 1;
|
|
21670
21619
|
var e = typeof Symbol < "u" && Symbol, t = Ny();
|
|
@@ -21684,7 +21633,7 @@ function Hy() {
|
|
|
21684
21633
|
return nc = e.getPrototypeOf || null, nc;
|
|
21685
21634
|
}
|
|
21686
21635
|
var ic, Nl;
|
|
21687
|
-
function
|
|
21636
|
+
function Jx() {
|
|
21688
21637
|
if (Nl) return ic;
|
|
21689
21638
|
Nl = 1;
|
|
21690
21639
|
var e = "Function.prototype.bind called on incompatible ", t = Object.prototype.toString, r = Math.max, n = "[object Function]", i = function(c, f) {
|
|
@@ -21732,7 +21681,7 @@ var sc, Fl;
|
|
|
21732
21681
|
function gs() {
|
|
21733
21682
|
if (Fl) return sc;
|
|
21734
21683
|
Fl = 1;
|
|
21735
|
-
var e =
|
|
21684
|
+
var e = Jx();
|
|
21736
21685
|
return sc = Function.prototype.bind || e, sc;
|
|
21737
21686
|
}
|
|
21738
21687
|
var oc, $l;
|
|
@@ -21744,14 +21693,14 @@ function Sf() {
|
|
|
21744
21693
|
return Ul || (Ul = 1, ac = Function.prototype.apply), ac;
|
|
21745
21694
|
}
|
|
21746
21695
|
var cc, Hl;
|
|
21747
|
-
function
|
|
21696
|
+
function Qx() {
|
|
21748
21697
|
return Hl || (Hl = 1, cc = typeof Reflect < "u" && Reflect && Reflect.apply), cc;
|
|
21749
21698
|
}
|
|
21750
21699
|
var uc, Ll;
|
|
21751
21700
|
function Ly() {
|
|
21752
21701
|
if (Ll) return uc;
|
|
21753
21702
|
Ll = 1;
|
|
21754
|
-
var e = gs(), t = Sf(), r = _f(), n =
|
|
21703
|
+
var e = gs(), t = Sf(), r = _f(), n = Qx();
|
|
21755
21704
|
return uc = n || e.call(r, t), uc;
|
|
21756
21705
|
}
|
|
21757
21706
|
var fc, Ml;
|
|
@@ -21766,7 +21715,7 @@ function Pf() {
|
|
|
21766
21715
|
}, fc;
|
|
21767
21716
|
}
|
|
21768
21717
|
var dc, Dl;
|
|
21769
|
-
function
|
|
21718
|
+
function e_() {
|
|
21770
21719
|
if (Dl) return dc;
|
|
21771
21720
|
Dl = 1;
|
|
21772
21721
|
var e = Pf(), t = oi(), r;
|
|
@@ -21793,7 +21742,7 @@ var lc, jl;
|
|
|
21793
21742
|
function Tf() {
|
|
21794
21743
|
if (jl) return lc;
|
|
21795
21744
|
jl = 1;
|
|
21796
|
-
var e = Uy(), t = Hy(), r =
|
|
21745
|
+
var e = Uy(), t = Hy(), r = e_();
|
|
21797
21746
|
return lc = e ? function(i) {
|
|
21798
21747
|
return e(i);
|
|
21799
21748
|
} : t ? function(i) {
|
|
@@ -21815,7 +21764,7 @@ var hc, ql;
|
|
|
21815
21764
|
function Dy() {
|
|
21816
21765
|
if (ql) return hc;
|
|
21817
21766
|
ql = 1;
|
|
21818
|
-
var e, t = Fy(), r =
|
|
21767
|
+
var e, t = Fy(), r = Ux(), n = Hx(), i = Lx(), s = Mx(), o = $y(), a = ms(), c = Dx(), f = jx(), u = zx(), d = qx(), y = Gx(), p = Vx(), g = Wx(), b = Yx(), E = Function, A = function(re) {
|
|
21819
21768
|
try {
|
|
21820
21769
|
return E('"use strict"; return (' + re + ").constructor;")();
|
|
21821
21770
|
} catch {
|
|
@@ -21832,7 +21781,7 @@ function Dy() {
|
|
|
21832
21781
|
return x;
|
|
21833
21782
|
}
|
|
21834
21783
|
}
|
|
21835
|
-
}() : x, T =
|
|
21784
|
+
}() : x, T = Xx()(), C = Tf(), L = Hy(), _ = Uy(), F = Sf(), O = _f(), $ = {}, j = typeof Uint8Array > "u" || !C ? e : C(Uint8Array), V = {
|
|
21836
21785
|
__proto__: null,
|
|
21837
21786
|
"%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
|
|
21838
21787
|
"%Array%": Array,
|
|
@@ -21999,8 +21948,8 @@ function Dy() {
|
|
|
21999
21948
|
if (de === "%" && oe !== "%")
|
|
22000
21949
|
throw new o("invalid intrinsic syntax, expected opening `%`");
|
|
22001
21950
|
var pe = [];
|
|
22002
|
-
return I(te, Z, function(ve,
|
|
22003
|
-
pe[pe.length] = Ce ? I(Rt, Q, "$1") :
|
|
21951
|
+
return I(te, Z, function(ve, st, Ce, Rt) {
|
|
21952
|
+
pe[pe.length] = Ce ? I(Rt, Q, "$1") : st || ve;
|
|
22004
21953
|
}), pe;
|
|
22005
21954
|
}, ne = function(te, oe) {
|
|
22006
21955
|
var de = te, pe;
|
|
@@ -22023,14 +21972,14 @@ function Dy() {
|
|
|
22023
21972
|
throw new a('"allowMissing" argument must be a boolean');
|
|
22024
21973
|
if (U(/^%?[^%]*%?$/, te) === null)
|
|
22025
21974
|
throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
22026
|
-
var de = se(te), pe = de.length > 0 ? de[0] : "", ve = ne("%" + pe + "%", oe),
|
|
21975
|
+
var de = se(te), pe = de.length > 0 ? de[0] : "", ve = ne("%" + pe + "%", oe), st = ve.name, Ce = ve.value, Rt = !1, Mr = ve.alias;
|
|
22027
21976
|
Mr && (pe = Mr[0], W(de, q([0, 1], Mr)));
|
|
22028
21977
|
for (var G = 1, Nt = !0; G < de.length; G += 1) {
|
|
22029
21978
|
var qe = de[G], Ge = R(qe, 0, 1), br = R(qe, -1);
|
|
22030
21979
|
if ((Ge === '"' || Ge === "'" || Ge === "`" || br === '"' || br === "'" || br === "`") && Ge !== br)
|
|
22031
21980
|
throw new o("property names with quotes must have matching quotes");
|
|
22032
|
-
if ((qe === "constructor" || !Nt) && (Rt = !0), pe += "." + qe,
|
|
22033
|
-
Ce = V[
|
|
21981
|
+
if ((qe === "constructor" || !Nt) && (Rt = !0), pe += "." + qe, st = "%" + pe + "%", k(V, st))
|
|
21982
|
+
Ce = V[st];
|
|
22034
21983
|
else if (Ce != null) {
|
|
22035
21984
|
if (!(qe in Ce)) {
|
|
22036
21985
|
if (!oe)
|
|
@@ -22042,7 +21991,7 @@ function Dy() {
|
|
|
22042
21991
|
Nt = !!wn, Nt && "get" in wn && !("originalValue" in wn.get) ? Ce = wn.get : Ce = Ce[qe];
|
|
22043
21992
|
} else
|
|
22044
21993
|
Nt = k(Ce, qe), Ce = Ce[qe];
|
|
22045
|
-
Nt && !Rt && (V[
|
|
21994
|
+
Nt && !Rt && (V[st] = Ce);
|
|
22046
21995
|
}
|
|
22047
21996
|
}
|
|
22048
21997
|
return Ce;
|
|
@@ -22065,7 +22014,7 @@ function bs() {
|
|
|
22065
22014
|
}, yc;
|
|
22066
22015
|
}
|
|
22067
22016
|
var mc, Vl;
|
|
22068
|
-
function
|
|
22017
|
+
function t_() {
|
|
22069
22018
|
if (Vl) return mc;
|
|
22070
22019
|
Vl = 1;
|
|
22071
22020
|
var e = Go()(), t = bs(), r = t("Object.prototype.toString"), n = function(a) {
|
|
@@ -22078,7 +22027,7 @@ function n_() {
|
|
|
22078
22027
|
return n.isLegacyArguments = i, mc = s ? n : i, mc;
|
|
22079
22028
|
}
|
|
22080
22029
|
var gc, Wl;
|
|
22081
|
-
function
|
|
22030
|
+
function r_() {
|
|
22082
22031
|
if (Wl) return gc;
|
|
22083
22032
|
Wl = 1;
|
|
22084
22033
|
var e = bs(), t = Go()(), r = My(), n = oi(), i;
|
|
@@ -22122,10 +22071,10 @@ function i_() {
|
|
|
22122
22071
|
return gc = i, gc;
|
|
22123
22072
|
}
|
|
22124
22073
|
var bc, Kl;
|
|
22125
|
-
function
|
|
22074
|
+
function n_() {
|
|
22126
22075
|
if (Kl) return bc;
|
|
22127
22076
|
Kl = 1;
|
|
22128
|
-
var e = bs(), t =
|
|
22077
|
+
var e = bs(), t = r_(), r = e("RegExp.prototype.exec"), n = ms();
|
|
22129
22078
|
return bc = function(s) {
|
|
22130
22079
|
if (!t(s))
|
|
22131
22080
|
throw new n("`regex` must be a RegExp");
|
|
@@ -22135,10 +22084,10 @@ function s_() {
|
|
|
22135
22084
|
}, bc;
|
|
22136
22085
|
}
|
|
22137
22086
|
var wc, Yl;
|
|
22138
|
-
function
|
|
22087
|
+
function i_() {
|
|
22139
22088
|
if (Yl) return wc;
|
|
22140
22089
|
Yl = 1;
|
|
22141
|
-
var e = bs(), t =
|
|
22090
|
+
var e = bs(), t = n_(), r = t(/^\s*(?:function)?\*/), n = Go()(), i = Tf(), s = e("Object.prototype.toString"), o = e("Function.prototype.toString"), a = function() {
|
|
22142
22091
|
if (!n)
|
|
22143
22092
|
return !1;
|
|
22144
22093
|
try {
|
|
@@ -22168,7 +22117,7 @@ function o_() {
|
|
|
22168
22117
|
}, wc;
|
|
22169
22118
|
}
|
|
22170
22119
|
var vc, Zl;
|
|
22171
|
-
function
|
|
22120
|
+
function s_() {
|
|
22172
22121
|
if (Zl) return vc;
|
|
22173
22122
|
Zl = 1;
|
|
22174
22123
|
var e = Function.prototype.toString, t = typeof Reflect == "object" && Reflect !== null && Reflect.apply, r, n;
|
|
@@ -22240,10 +22189,10 @@ function a_() {
|
|
|
22240
22189
|
}, vc;
|
|
22241
22190
|
}
|
|
22242
22191
|
var Ec, Xl;
|
|
22243
|
-
function
|
|
22192
|
+
function o_() {
|
|
22244
22193
|
if (Xl) return Ec;
|
|
22245
22194
|
Xl = 1;
|
|
22246
|
-
var e =
|
|
22195
|
+
var e = s_(), t = Object.prototype.toString, r = Object.prototype.hasOwnProperty, n = function(c, f, u) {
|
|
22247
22196
|
for (var d = 0, y = c.length; d < y; d++)
|
|
22248
22197
|
r.call(c, d) && (u == null ? f(c[d], d, c) : f.call(u, c[d], d, c));
|
|
22249
22198
|
}, i = function(c, f, u) {
|
|
@@ -22264,7 +22213,7 @@ function c_() {
|
|
|
22264
22213
|
}, Ec;
|
|
22265
22214
|
}
|
|
22266
22215
|
var Ac, Jl;
|
|
22267
|
-
function
|
|
22216
|
+
function a_() {
|
|
22268
22217
|
return Jl || (Jl = 1, Ac = [
|
|
22269
22218
|
"Float16Array",
|
|
22270
22219
|
"Float32Array",
|
|
@@ -22281,10 +22230,10 @@ function u_() {
|
|
|
22281
22230
|
]), Ac;
|
|
22282
22231
|
}
|
|
22283
22232
|
var xc, Ql;
|
|
22284
|
-
function
|
|
22233
|
+
function c_() {
|
|
22285
22234
|
if (Ql) return xc;
|
|
22286
22235
|
Ql = 1;
|
|
22287
|
-
var e =
|
|
22236
|
+
var e = a_(), t = typeof globalThis > "u" ? Qt : globalThis;
|
|
22288
22237
|
return xc = function() {
|
|
22289
22238
|
for (var n = [], i = 0; i < e.length; i++)
|
|
22290
22239
|
typeof t[e[i]] == "function" && (n[n.length] = e[i]);
|
|
@@ -22292,7 +22241,7 @@ function f_() {
|
|
|
22292
22241
|
}, xc;
|
|
22293
22242
|
}
|
|
22294
22243
|
var _c = { exports: {} }, Sc, ep;
|
|
22295
|
-
function
|
|
22244
|
+
function u_() {
|
|
22296
22245
|
if (ep) return Sc;
|
|
22297
22246
|
ep = 1;
|
|
22298
22247
|
var e = Vo(), t = $y(), r = ms(), n = oi();
|
|
@@ -22324,7 +22273,7 @@ function d_() {
|
|
|
22324
22273
|
}, Sc;
|
|
22325
22274
|
}
|
|
22326
22275
|
var Pc, tp;
|
|
22327
|
-
function
|
|
22276
|
+
function f_() {
|
|
22328
22277
|
if (tp) return Pc;
|
|
22329
22278
|
tp = 1;
|
|
22330
22279
|
var e = Vo(), t = function() {
|
|
@@ -22341,10 +22290,10 @@ function l_() {
|
|
|
22341
22290
|
}, Pc = t, Pc;
|
|
22342
22291
|
}
|
|
22343
22292
|
var Tc, rp;
|
|
22344
|
-
function
|
|
22293
|
+
function d_() {
|
|
22345
22294
|
if (rp) return Tc;
|
|
22346
22295
|
rp = 1;
|
|
22347
|
-
var e = Dy(), t =
|
|
22296
|
+
var e = Dy(), t = u_(), r = f_()(), n = oi(), i = ms(), s = e("%Math.floor%");
|
|
22348
22297
|
return Tc = function(a, c) {
|
|
22349
22298
|
if (typeof a != "function")
|
|
22350
22299
|
throw new i("`fn` is not a function");
|
|
@@ -22371,7 +22320,7 @@ function p_() {
|
|
|
22371
22320
|
}, Tc;
|
|
22372
22321
|
}
|
|
22373
22322
|
var Ic, np;
|
|
22374
|
-
function
|
|
22323
|
+
function l_() {
|
|
22375
22324
|
if (np) return Ic;
|
|
22376
22325
|
np = 1;
|
|
22377
22326
|
var e = gs(), t = Sf(), r = Ly();
|
|
@@ -22380,9 +22329,9 @@ function h_() {
|
|
|
22380
22329
|
}, Ic;
|
|
22381
22330
|
}
|
|
22382
22331
|
var ip;
|
|
22383
|
-
function
|
|
22332
|
+
function p_() {
|
|
22384
22333
|
return ip || (ip = 1, function(e) {
|
|
22385
|
-
var t =
|
|
22334
|
+
var t = d_(), r = Vo(), n = Pf(), i = l_();
|
|
22386
22335
|
e.exports = function(o) {
|
|
22387
22336
|
var a = n(arguments), c = o.length - (arguments.length - 1);
|
|
22388
22337
|
return t(
|
|
@@ -22397,7 +22346,7 @@ var kc, sp;
|
|
|
22397
22346
|
function jy() {
|
|
22398
22347
|
if (sp) return kc;
|
|
22399
22348
|
sp = 1;
|
|
22400
|
-
var e =
|
|
22349
|
+
var e = o_(), t = c_(), r = p_(), n = bs(), i = oi(), s = Tf(), o = n("Object.prototype.toString"), a = Go()(), c = typeof globalThis > "u" ? Qt : globalThis, f = t(), u = n("String.prototype.slice"), d = n("Array.prototype.indexOf", !0) || function(E, A) {
|
|
22401
22350
|
for (var S = 0; S < E.length; S += 1)
|
|
22402
22351
|
if (E[S] === A)
|
|
22403
22352
|
return S;
|
|
@@ -22464,7 +22413,7 @@ function jy() {
|
|
|
22464
22413
|
}, kc;
|
|
22465
22414
|
}
|
|
22466
22415
|
var Bc, op;
|
|
22467
|
-
function
|
|
22416
|
+
function h_() {
|
|
22468
22417
|
if (op) return Bc;
|
|
22469
22418
|
op = 1;
|
|
22470
22419
|
var e = jy();
|
|
@@ -22473,9 +22422,9 @@ function m_() {
|
|
|
22473
22422
|
}, Bc;
|
|
22474
22423
|
}
|
|
22475
22424
|
var ap;
|
|
22476
|
-
function
|
|
22425
|
+
function y_() {
|
|
22477
22426
|
return ap || (ap = 1, function(e) {
|
|
22478
|
-
var t =
|
|
22427
|
+
var t = t_(), r = i_(), n = jy(), i = h_();
|
|
22479
22428
|
function s(G) {
|
|
22480
22429
|
return G.call.bind(G);
|
|
22481
22430
|
}
|
|
@@ -22634,16 +22583,16 @@ function g_() {
|
|
|
22634
22583
|
return g(G, d);
|
|
22635
22584
|
}
|
|
22636
22585
|
e.isBooleanObject = ve;
|
|
22637
|
-
function
|
|
22586
|
+
function st(G) {
|
|
22638
22587
|
return o && g(G, y);
|
|
22639
22588
|
}
|
|
22640
|
-
e.isBigIntObject =
|
|
22589
|
+
e.isBigIntObject = st;
|
|
22641
22590
|
function Ce(G) {
|
|
22642
22591
|
return a && g(G, p);
|
|
22643
22592
|
}
|
|
22644
22593
|
e.isSymbolObject = Ce;
|
|
22645
22594
|
function Rt(G) {
|
|
22646
|
-
return de(G) || pe(G) || ve(G) ||
|
|
22595
|
+
return de(G) || pe(G) || ve(G) || st(G) || Ce(G);
|
|
22647
22596
|
}
|
|
22648
22597
|
e.isBoxedPrimitive = Rt;
|
|
22649
22598
|
function Mr(G) {
|
|
@@ -22660,13 +22609,13 @@ function g_() {
|
|
|
22660
22609
|
}(Ra)), Ra;
|
|
22661
22610
|
}
|
|
22662
22611
|
var Oc, cp;
|
|
22663
|
-
function
|
|
22612
|
+
function m_() {
|
|
22664
22613
|
return cp || (cp = 1, Oc = function(t) {
|
|
22665
22614
|
return t && typeof t == "object" && typeof t.copy == "function" && typeof t.fill == "function" && typeof t.readUInt8 == "function";
|
|
22666
22615
|
}), Oc;
|
|
22667
22616
|
}
|
|
22668
22617
|
var Hs = { exports: {} }, up;
|
|
22669
|
-
function
|
|
22618
|
+
function g_() {
|
|
22670
22619
|
return up || (up = 1, typeof Object.create == "function" ? Hs.exports = function(t, r) {
|
|
22671
22620
|
r && (t.super_ = r, t.prototype = Object.create(r.prototype, {
|
|
22672
22621
|
constructor: {
|
|
@@ -22836,8 +22785,8 @@ function zy() {
|
|
|
22836
22785
|
return L(R) ? I.stylize(RegExp.prototype.toString.call(R), "regexp") : I.stylize("[Object]", "special");
|
|
22837
22786
|
I.seen.push(R);
|
|
22838
22787
|
var ve;
|
|
22839
|
-
return oe ? ve = p(I, R, U, ne, se) : ve = se.map(function(
|
|
22840
|
-
return g(I, R, U, ne,
|
|
22788
|
+
return oe ? ve = p(I, R, U, ne, se) : ve = se.map(function(st) {
|
|
22789
|
+
return g(I, R, U, ne, st, oe);
|
|
22841
22790
|
}), I.seen.pop(), b(ve, te, de);
|
|
22842
22791
|
}
|
|
22843
22792
|
function d(I, R) {
|
|
@@ -22906,7 +22855,7 @@ function zy() {
|
|
|
22906
22855
|
`) + " " + I.join(`,
|
|
22907
22856
|
`) + " " + U[1] : U[0] + R + " " + I.join(", ") + " " + U[1];
|
|
22908
22857
|
}
|
|
22909
|
-
e.types =
|
|
22858
|
+
e.types = y_();
|
|
22910
22859
|
function E(I) {
|
|
22911
22860
|
return Array.isArray(I);
|
|
22912
22861
|
}
|
|
@@ -22963,7 +22912,7 @@ function zy() {
|
|
|
22963
22912
|
return I === null || typeof I == "boolean" || typeof I == "number" || typeof I == "string" || typeof I == "symbol" || // ES6 symbol
|
|
22964
22913
|
typeof I > "u";
|
|
22965
22914
|
}
|
|
22966
|
-
e.isPrimitive = j, e.isBuffer =
|
|
22915
|
+
e.isPrimitive = j, e.isBuffer = m_();
|
|
22967
22916
|
function V(I) {
|
|
22968
22917
|
return Object.prototype.toString.call(I);
|
|
22969
22918
|
}
|
|
@@ -22994,7 +22943,7 @@ function zy() {
|
|
|
22994
22943
|
}
|
|
22995
22944
|
e.log = function() {
|
|
22996
22945
|
console.log("%s - %s", J(), e.format.apply(e, arguments));
|
|
22997
|
-
}, e.inherits =
|
|
22946
|
+
}, e.inherits = g_(), e._extend = function(I, R) {
|
|
22998
22947
|
if (!R || !_(R)) return I;
|
|
22999
22948
|
for (var U = Object.keys(R), Z = U.length; Z--; )
|
|
23000
22949
|
I[U[Z]] = R[U[Z]];
|
|
@@ -23082,14 +23031,14 @@ function zy() {
|
|
|
23082
23031
|
Object.defineProperty(Zn, "__esModule", { value: !0 });
|
|
23083
23032
|
Zn.encode = Zn.decode = void 0;
|
|
23084
23033
|
const qy = Nr;
|
|
23085
|
-
function
|
|
23034
|
+
function b_(e) {
|
|
23086
23035
|
return (qy.isBrowser ? new TextDecoder("utf-8") : new (zy()).TextDecoder("utf-8")).decode(e);
|
|
23087
23036
|
}
|
|
23088
|
-
Zn.decode =
|
|
23089
|
-
function
|
|
23037
|
+
Zn.decode = b_;
|
|
23038
|
+
function w_(e) {
|
|
23090
23039
|
return (qy.isBrowser ? new TextEncoder() : new (zy()).TextEncoder("utf-8")).encode(e);
|
|
23091
23040
|
}
|
|
23092
|
-
Zn.encode =
|
|
23041
|
+
Zn.encode = w_;
|
|
23093
23042
|
var Xn = {}, bu = { exports: {} };
|
|
23094
23043
|
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
23095
23044
|
(function(e, t) {
|
|
@@ -23121,8 +23070,8 @@ var Xn = {}, bu = { exports: {} };
|
|
|
23121
23070
|
return r.SlowBuffer(o);
|
|
23122
23071
|
};
|
|
23123
23072
|
})(bu, bu.exports);
|
|
23124
|
-
var
|
|
23125
|
-
function
|
|
23073
|
+
var v_ = bu.exports, Ls = v_.Buffer;
|
|
23074
|
+
function E_(e) {
|
|
23126
23075
|
if (e.length >= 255)
|
|
23127
23076
|
throw new TypeError("Alphabet too long");
|
|
23128
23077
|
for (var t = new Uint8Array(256), r = 0; r < t.length; r++)
|
|
@@ -23194,33 +23143,33 @@ function x_(e) {
|
|
|
23194
23143
|
decode: y
|
|
23195
23144
|
};
|
|
23196
23145
|
}
|
|
23197
|
-
var
|
|
23146
|
+
var A_ = E_, x_ = A_, __ = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz", S_ = x_(__), P_ = Qt && Qt.__importDefault || function(e) {
|
|
23198
23147
|
return e && e.__esModule ? e : { default: e };
|
|
23199
23148
|
};
|
|
23200
23149
|
Object.defineProperty(Xn, "__esModule", { value: !0 });
|
|
23201
23150
|
Xn.decode = Xn.encode = void 0;
|
|
23202
|
-
const Gy =
|
|
23203
|
-
function
|
|
23151
|
+
const Gy = P_(S_);
|
|
23152
|
+
function T_(e) {
|
|
23204
23153
|
return Gy.default.encode(e);
|
|
23205
23154
|
}
|
|
23206
|
-
Xn.encode =
|
|
23207
|
-
function
|
|
23155
|
+
Xn.encode = T_;
|
|
23156
|
+
function I_(e) {
|
|
23208
23157
|
return Gy.default.decode(e);
|
|
23209
23158
|
}
|
|
23210
|
-
Xn.decode =
|
|
23159
|
+
Xn.decode = I_;
|
|
23211
23160
|
var Jn = {};
|
|
23212
23161
|
Object.defineProperty(Jn, "__esModule", { value: !0 });
|
|
23213
23162
|
Jn.decode = Jn.encode = void 0;
|
|
23214
|
-
const
|
|
23215
|
-
function
|
|
23163
|
+
const k_ = mn;
|
|
23164
|
+
function B_(e) {
|
|
23216
23165
|
return e.toString("base64");
|
|
23217
23166
|
}
|
|
23218
|
-
Jn.encode =
|
|
23219
|
-
function
|
|
23220
|
-
return
|
|
23167
|
+
Jn.encode = B_;
|
|
23168
|
+
function O_(e) {
|
|
23169
|
+
return k_.Buffer.from(e, "base64");
|
|
23221
23170
|
}
|
|
23222
|
-
Jn.decode =
|
|
23223
|
-
var
|
|
23171
|
+
Jn.decode = O_;
|
|
23172
|
+
var C_ = Qt && Qt.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
23224
23173
|
n === void 0 && (n = r);
|
|
23225
23174
|
var i = Object.getOwnPropertyDescriptor(t, r);
|
|
23226
23175
|
(!i || ("get" in i ? !t.__esModule : i.writable || i.configurable)) && (i = { enumerable: !0, get: function() {
|
|
@@ -23228,15 +23177,15 @@ var N_ = Qt && Qt.__createBinding || (Object.create ? function(e, t, r, n) {
|
|
|
23228
23177
|
} }), Object.defineProperty(e, n, i);
|
|
23229
23178
|
} : function(e, t, r, n) {
|
|
23230
23179
|
n === void 0 && (n = r), e[n] = t[r];
|
|
23231
|
-
}),
|
|
23180
|
+
}), R_ = Qt && Qt.__setModuleDefault || (Object.create ? function(e, t) {
|
|
23232
23181
|
Object.defineProperty(e, "default", { enumerable: !0, value: t });
|
|
23233
23182
|
} : function(e, t) {
|
|
23234
23183
|
e.default = t;
|
|
23235
23184
|
}), Wo = Qt && Qt.__importStar || function(e) {
|
|
23236
23185
|
if (e && e.__esModule) return e;
|
|
23237
23186
|
var t = {};
|
|
23238
|
-
if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) &&
|
|
23239
|
-
return
|
|
23187
|
+
if (e != null) for (var r in e) r !== "default" && Object.prototype.hasOwnProperty.call(e, r) && C_(t, e, r);
|
|
23188
|
+
return R_(t, e), t;
|
|
23240
23189
|
};
|
|
23241
23190
|
Object.defineProperty(fr, "__esModule", { value: !0 });
|
|
23242
23191
|
fr.base64 = fr.bs58 = fr.utf8 = ao = fr.hex = void 0;
|
|
@@ -23310,7 +23259,7 @@ function Vy(e) {
|
|
|
23310
23259
|
);
|
|
23311
23260
|
return t;
|
|
23312
23261
|
}
|
|
23313
|
-
class
|
|
23262
|
+
class N_ {
|
|
23314
23263
|
/**
|
|
23315
23264
|
* Creates a new instance of SolanaRelay.
|
|
23316
23265
|
* @param {AnchorProvider} provider - An abstraction of RPC connection and a Wallet
|
|
@@ -23498,8 +23447,8 @@ class Wy extends dp {
|
|
|
23498
23447
|
this._digestKey = s.val;
|
|
23499
23448
|
} else
|
|
23500
23449
|
this._digestKey = t.digestKey;
|
|
23501
|
-
this._quote = t.quote ?? new UA(this._api.quote), this._auth = t.auth ?? Bf.fromDigestKey(new
|
|
23502
|
-
const i = new
|
|
23450
|
+
this._quote = t.quote ?? new UA(this._api.quote), this._auth = t.auth ?? Bf.fromDigestKey(new mt(this._api.auth), this._digestKey), this._orderbook = t.orderbook ?? new em(new mt(this._api.orderbook)), this._evmHTLC = t.htlc.evm, this._starknetHTLC = t.htlc.starknet, this._solanaHTLC = t.htlc.solana, this._secretManager = t.secretManager ?? oo.fromDigestKey(this._digestKey.digestKey), this.orderExecutorCache = new NA(), this._blockNumberFetcher = t.blockNumberFetcher ?? new $A(this._api.info, this.environment);
|
|
23451
|
+
const i = new vx(_E(this.environment));
|
|
23503
23452
|
this._btcWallet = Cn.fromPrivateKey(
|
|
23504
23453
|
this._digestKey.digestKey,
|
|
23505
23454
|
i
|
|
@@ -23519,19 +23468,19 @@ class Wy extends dp {
|
|
|
23519
23468
|
"API not found, invalid environment " + t.environment
|
|
23520
23469
|
);
|
|
23521
23470
|
const i = {
|
|
23522
|
-
evm: t.wallets.evm ? new
|
|
23471
|
+
evm: t.wallets.evm ? new dx(
|
|
23523
23472
|
n.evmRelay,
|
|
23524
23473
|
t.wallets.evm,
|
|
23525
|
-
Bf.fromDigestKey(new
|
|
23474
|
+
Bf.fromDigestKey(new mt(n.auth), r)
|
|
23526
23475
|
) : void 0,
|
|
23527
|
-
starknet: t.wallets.starknet ? new
|
|
23476
|
+
starknet: t.wallets.starknet ? new yx(
|
|
23528
23477
|
n.starknetRelay,
|
|
23529
23478
|
t.wallets.starknet,
|
|
23530
23479
|
t.environment === Yt.MAINNET ? Br.MAINNET : Br.TESTNET
|
|
23531
23480
|
) : void 0,
|
|
23532
|
-
solana: t.wallets.solana ? new
|
|
23481
|
+
solana: t.wallets.solana ? new N_(
|
|
23533
23482
|
t.wallets.solana,
|
|
23534
|
-
new
|
|
23483
|
+
new mt(n.solanaRelay),
|
|
23535
23484
|
t.environment === Yt.MAINNET ? Bd.mainnet : Bd.testnet,
|
|
23536
23485
|
t.solanaProgramAddress ? t.solanaProgramAddress : bE.mainnet
|
|
23537
23486
|
) : void 0
|
|
@@ -23655,15 +23604,15 @@ class Wy extends dp {
|
|
|
23655
23604
|
async getAddresses(t) {
|
|
23656
23605
|
var n;
|
|
23657
23606
|
switch (Yo(t)) {
|
|
23658
|
-
case
|
|
23607
|
+
case dt.EVM:
|
|
23659
23608
|
return this._evmHTLC ? ie(this._evmHTLC.htlcActorAddress) : H("Please provide evmHTLC when initializing garden");
|
|
23660
|
-
case
|
|
23609
|
+
case dt.Bitcoin: {
|
|
23661
23610
|
const i = await ((n = this._btcWallet) == null ? void 0 : n.getPublicKey());
|
|
23662
23611
|
return !i || !xE(i) ? H("Invalid btc public key") : ie(Dr(i));
|
|
23663
23612
|
}
|
|
23664
|
-
case
|
|
23613
|
+
case dt.Solana:
|
|
23665
23614
|
return this._solanaHTLC ? ie(this._solanaHTLC.htlcActorAddress) : H("Please provide solanaHTLC when initializing garden");
|
|
23666
|
-
case
|
|
23615
|
+
case dt.Starknet:
|
|
23667
23616
|
return this._starknetHTLC ? ie(this._starknetHTLC.htlcActorAddress) : H("Please provide starknetHTLC when initializing garden");
|
|
23668
23617
|
default:
|
|
23669
23618
|
return H("Unsupported chain");
|
|
@@ -23716,11 +23665,11 @@ class Wy extends dp {
|
|
|
23716
23665
|
return;
|
|
23717
23666
|
}
|
|
23718
23667
|
switch (Yo(s.destination_swap.chain)) {
|
|
23719
|
-
case
|
|
23668
|
+
case dt.EVM: {
|
|
23720
23669
|
await this.evmRedeem(s, a.val.secret);
|
|
23721
23670
|
break;
|
|
23722
23671
|
}
|
|
23723
|
-
case
|
|
23672
|
+
case dt.Bitcoin: {
|
|
23724
23673
|
const c = this.btcWallet;
|
|
23725
23674
|
if (!c) {
|
|
23726
23675
|
this.emit("error", s, "BTC wallet not found");
|
|
@@ -23729,11 +23678,11 @@ class Wy extends dp {
|
|
|
23729
23678
|
await this.btcRedeem(c, s, a.val.secret);
|
|
23730
23679
|
break;
|
|
23731
23680
|
}
|
|
23732
|
-
case
|
|
23681
|
+
case dt.Starknet: {
|
|
23733
23682
|
await this.starknetRedeem(s, a.val.secret);
|
|
23734
23683
|
break;
|
|
23735
23684
|
}
|
|
23736
|
-
case
|
|
23685
|
+
case dt.Solana:
|
|
23737
23686
|
await this.solRedeem(s, a.val.secret);
|
|
23738
23687
|
break;
|
|
23739
23688
|
default:
|
|
@@ -23747,7 +23696,7 @@ class Wy extends dp {
|
|
|
23747
23696
|
}
|
|
23748
23697
|
case Ee.Refund: {
|
|
23749
23698
|
switch (Yo(s.source_swap.chain)) {
|
|
23750
|
-
case
|
|
23699
|
+
case dt.Solana: {
|
|
23751
23700
|
this.emit(
|
|
23752
23701
|
"error",
|
|
23753
23702
|
s,
|
|
@@ -23755,7 +23704,7 @@ class Wy extends dp {
|
|
|
23755
23704
|
);
|
|
23756
23705
|
break;
|
|
23757
23706
|
}
|
|
23758
|
-
case
|
|
23707
|
+
case dt.EVM: {
|
|
23759
23708
|
this.emit(
|
|
23760
23709
|
"error",
|
|
23761
23710
|
s,
|
|
@@ -23763,7 +23712,7 @@ class Wy extends dp {
|
|
|
23763
23712
|
);
|
|
23764
23713
|
break;
|
|
23765
23714
|
}
|
|
23766
|
-
case
|
|
23715
|
+
case dt.Bitcoin: {
|
|
23767
23716
|
const a = this.btcWallet;
|
|
23768
23717
|
if (!a) {
|
|
23769
23718
|
this.emit("error", s, "BTC wallet not found");
|
|
@@ -23772,7 +23721,7 @@ class Wy extends dp {
|
|
|
23772
23721
|
await this.btcRefund(a, s);
|
|
23773
23722
|
break;
|
|
23774
23723
|
}
|
|
23775
|
-
case
|
|
23724
|
+
case dt.Starknet: {
|
|
23776
23725
|
this.emit(
|
|
23777
23726
|
"error",
|
|
23778
23727
|
s,
|
|
@@ -24003,7 +23952,7 @@ class Wy extends dp {
|
|
|
24003
23952
|
return;
|
|
24004
23953
|
}
|
|
24005
23954
|
const a = await Ie.post(
|
|
24006
|
-
new
|
|
23955
|
+
new mt(this._api.orderbook).endpoint(
|
|
24007
23956
|
"relayer/bitcoin/instant-refund-hash"
|
|
24008
23957
|
),
|
|
24009
23958
|
{
|
|
@@ -24024,7 +23973,7 @@ class Wy extends dp {
|
|
|
24024
23973
|
);
|
|
24025
23974
|
return;
|
|
24026
23975
|
}
|
|
24027
|
-
const c = await i.generateInstantRefundSACPWithHash(a.result), f = new
|
|
23976
|
+
const c = await i.generateInstantRefundSACPWithHash(a.result), f = new mt(this._api.orderbook).endpoint(
|
|
24028
23977
|
"relayer/bitcoin/instant-refund"
|
|
24029
23978
|
);
|
|
24030
23979
|
(await Ie.post(f, {
|
|
@@ -24071,7 +24020,7 @@ class Wy extends dp {
|
|
|
24071
24020
|
async broadcastRedeemTx(t, r) {
|
|
24072
24021
|
try {
|
|
24073
24022
|
if (!this._api) return H("API not found");
|
|
24074
|
-
const n = new
|
|
24023
|
+
const n = new mt(this._api.evmRelay).endpoint("/bitcoin/redeem "), i = await this._auth.getAuthHeaders(), o = await (await fetch(n, {
|
|
24075
24024
|
method: "POST",
|
|
24076
24025
|
headers: {
|
|
24077
24026
|
"Content-Type": "application/json",
|
|
@@ -24088,7 +24037,7 @@ class Wy extends dp {
|
|
|
24088
24037
|
}
|
|
24089
24038
|
}
|
|
24090
24039
|
}
|
|
24091
|
-
class
|
|
24040
|
+
class f5 {
|
|
24092
24041
|
constructor(t, r, n) {
|
|
24093
24042
|
this.callData = new Rf(By), this.account = t, this.starknetProvider = new pp({
|
|
24094
24043
|
nodeUrl: r || (n ? ro[n].nodeUrl : ro.mainnet.nodeUrl)
|
|
@@ -24113,7 +24062,7 @@ class l5 {
|
|
|
24113
24062
|
throw new Error("Token address retrieval failed");
|
|
24114
24063
|
const i = hp.toHex(n), s = _i.uint256(BigInt(t.source_swap.amount));
|
|
24115
24064
|
try {
|
|
24116
|
-
const a = await
|
|
24065
|
+
const a = await lx(
|
|
24117
24066
|
this.account,
|
|
24118
24067
|
i,
|
|
24119
24068
|
t.source_swap.asset,
|
|
@@ -24185,7 +24134,7 @@ class l5 {
|
|
|
24185
24134
|
}
|
|
24186
24135
|
}
|
|
24187
24136
|
}
|
|
24188
|
-
class
|
|
24137
|
+
class d5 {
|
|
24189
24138
|
/**
|
|
24190
24139
|
* Creates a new instance of SolanaHTLC.
|
|
24191
24140
|
* @param {AnchorProvider} provider - Solana Provider (abstraction of RPC connection and a Wallet)
|
|
@@ -24305,52 +24254,52 @@ class p5 {
|
|
|
24305
24254
|
export {
|
|
24306
24255
|
Rd as A,
|
|
24307
24256
|
D as B,
|
|
24308
|
-
|
|
24257
|
+
o5 as C,
|
|
24309
24258
|
Dr as D,
|
|
24310
|
-
|
|
24259
|
+
dx as E,
|
|
24311
24260
|
Cd as F,
|
|
24312
24261
|
Wy as G,
|
|
24313
24262
|
Si as H,
|
|
24314
24263
|
ky as I,
|
|
24315
|
-
|
|
24316
|
-
|
|
24317
|
-
|
|
24318
|
-
|
|
24319
|
-
|
|
24264
|
+
cx as J,
|
|
24265
|
+
ox as K,
|
|
24266
|
+
ax as L,
|
|
24267
|
+
sx as M,
|
|
24268
|
+
vt as N,
|
|
24320
24269
|
Ee as O,
|
|
24321
24270
|
X0 as P,
|
|
24322
24271
|
UA as Q,
|
|
24323
|
-
|
|
24324
|
-
|
|
24272
|
+
vx as R,
|
|
24273
|
+
yx as S,
|
|
24325
24274
|
Cn as T,
|
|
24326
24275
|
ma as U,
|
|
24327
24276
|
ro as V,
|
|
24328
24277
|
Bd as W,
|
|
24329
24278
|
bE as X,
|
|
24330
24279
|
A1 as a,
|
|
24331
|
-
|
|
24280
|
+
At as b,
|
|
24332
24281
|
To as c,
|
|
24333
24282
|
Eb as d,
|
|
24334
24283
|
Hr as e,
|
|
24335
24284
|
Zt as f,
|
|
24336
24285
|
Ou as g,
|
|
24337
|
-
|
|
24286
|
+
f5 as h,
|
|
24338
24287
|
Ao as i,
|
|
24339
|
-
|
|
24340
|
-
|
|
24288
|
+
N_ as j,
|
|
24289
|
+
d5 as k,
|
|
24341
24290
|
nf as l,
|
|
24342
24291
|
$A as m,
|
|
24343
24292
|
fe as n,
|
|
24344
24293
|
Ae as o,
|
|
24345
|
-
|
|
24294
|
+
a5 as p,
|
|
24346
24295
|
Fd as q,
|
|
24347
24296
|
no as r,
|
|
24348
24297
|
Ne as s,
|
|
24349
24298
|
TE as t,
|
|
24350
|
-
|
|
24299
|
+
c5 as u,
|
|
24351
24300
|
J0 as v,
|
|
24352
24301
|
oo as w,
|
|
24353
|
-
|
|
24354
|
-
|
|
24302
|
+
lx as x,
|
|
24303
|
+
px as y,
|
|
24355
24304
|
Ys as z
|
|
24356
24305
|
};
|