@babylonlabs-io/ts-sdk 0.37.1 → 0.37.3
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/{PayoutManager-BxAY2x0g.cjs → PayoutManager-BfT0V-tm.cjs} +2 -2
- package/dist/{PayoutManager-BxAY2x0g.cjs.map → PayoutManager-BfT0V-tm.cjs.map} +1 -1
- package/dist/{PayoutManager-sfxuOBGq.js → PayoutManager-Cf51DBcu.js} +2 -2
- package/dist/{PayoutManager-sfxuOBGq.js.map → PayoutManager-Cf51DBcu.js.map} +1 -1
- package/dist/PeginManager-CTznAVPT.cjs +2 -0
- package/dist/PeginManager-CTznAVPT.cjs.map +1 -0
- package/dist/{PeginManager-C7-XYrkK.js → PeginManager-HCYTUzh6.js} +325 -315
- package/dist/{PeginManager-C7-XYrkK.js.map → PeginManager-HCYTUzh6.js.map} +1 -1
- package/dist/assertPsbtUnsignedTxMatches-CagW7XqW.cjs +2 -0
- package/dist/assertPsbtUnsignedTxMatches-CagW7XqW.cjs.map +1 -0
- package/dist/{assertPsbtUnsignedTxMatches-D7RxpR4A.js → assertPsbtUnsignedTxMatches-Dry5dTfl.js} +84 -81
- package/dist/assertPsbtUnsignedTxMatches-Dry5dTfl.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-_CEDUU5H.cjs → buildAndBroadcastRefund-Bj2e94CC.cjs} +2 -2
- package/dist/{buildAndBroadcastRefund-_CEDUU5H.cjs.map → buildAndBroadcastRefund-Bj2e94CC.cjs.map} +1 -1
- package/dist/{buildAndBroadcastRefund-C1eOhIdo.js → buildAndBroadcastRefund-CI_x6OtX.js} +21 -16
- package/dist/{buildAndBroadcastRefund-C1eOhIdo.js.map → buildAndBroadcastRefund-CI_x6OtX.js.map} +1 -1
- package/dist/challengeAssert-CMb7r-je.cjs +2 -0
- package/dist/challengeAssert-CMb7r-je.cjs.map +1 -0
- package/dist/{challengeAssert-BXESW00N.js → challengeAssert-D7OCrDIc.js} +29 -29
- package/dist/challengeAssert-D7OCrDIc.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +5 -5
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +5 -5
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +2 -2
- package/dist/tbv/core/primitives/psbt/payout.d.ts +2 -2
- package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +2 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +5 -5
- package/package.json +1 -1
- package/dist/PeginManager-CRuwG4I-.cjs +0 -2
- package/dist/PeginManager-CRuwG4I-.cjs.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-BoHwgW30.cjs +0 -2
- package/dist/assertPsbtUnsignedTxMatches-BoHwgW30.cjs.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-D7RxpR4A.js.map +0 -1
- package/dist/challengeAssert-BKDS_ADt.cjs +0 -2
- package/dist/challengeAssert-BKDS_ADt.cjs.map +0 -1
- package/dist/challengeAssert-BXESW00N.js.map +0 -1
|
@@ -3,12 +3,12 @@ var Q = (e, t, r) => t in e ? W(e, t, { enumerable: !0, configurable: !0, writab
|
|
|
3
3
|
var C = (e, t, r) => Q(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
4
|
import { B as j } from "./BTCVaultRegistry.abi-DbJ5lsFJ.js";
|
|
5
5
|
import { e as Y, v as q, s as h, u as N, p as k, d as J, f as m } from "./bitcoin-B5aNKtsk.js";
|
|
6
|
-
import { v as Z, P as ee } from "./PayoutManager-
|
|
6
|
+
import { v as Z, P as ee } from "./PayoutManager-Cf51DBcu.js";
|
|
7
7
|
import { c as te, a as re, R as ne, d as L, D as x } from "./types-TiIjyo2b.js";
|
|
8
8
|
import { Transaction as T, Psbt as oe } from "bitcoinjs-lib";
|
|
9
|
-
import { a as se, b as ae, c as
|
|
9
|
+
import { a as se, b as ae, c as R, e as I } from "./assertPsbtUnsignedTxMatches-Dry5dTfl.js";
|
|
10
10
|
import { c as ie, a as ue, b as le } from "./noPayout-BhgknZBx.js";
|
|
11
|
-
import { c as
|
|
11
|
+
import { c as $ } from "./signing-DaLvGwQe.js";
|
|
12
12
|
const ce = /^0x[0-9a-fA-F]{64}$/, de = /^0x[0-9a-fA-F]{40}$/, he = /^0x([0-9a-fA-F]{2})*$/;
|
|
13
13
|
function S(e, t) {
|
|
14
14
|
if (e.length !== 66)
|
|
@@ -139,7 +139,7 @@ async function rt(e) {
|
|
|
139
139
|
));
|
|
140
140
|
}
|
|
141
141
|
const H = 1;
|
|
142
|
-
function
|
|
142
|
+
function be(e, t) {
|
|
143
143
|
const r = h(t).toLowerCase(), s = e.map((u) => h(u).toLowerCase()).filter((u) => u !== r);
|
|
144
144
|
if (s.length === 0)
|
|
145
145
|
throw new Error(
|
|
@@ -151,7 +151,7 @@ function me(e, t) {
|
|
|
151
151
|
);
|
|
152
152
|
return s;
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function me(e, t, r) {
|
|
155
155
|
const n = r.map(
|
|
156
156
|
(c) => h(c).toLowerCase()
|
|
157
157
|
), s = t.filter((c) => n.includes(c));
|
|
@@ -189,11 +189,11 @@ function B(e, t, r, n, s) {
|
|
|
189
189
|
);
|
|
190
190
|
}
|
|
191
191
|
async function ve(e, t, r) {
|
|
192
|
-
const n = [], s = [], u = [], a =
|
|
192
|
+
const n = [], s = [], u = [], a = be(
|
|
193
193
|
r.vaultKeeperBtcPubkeys,
|
|
194
194
|
r.depositorBtcPubkey
|
|
195
195
|
);
|
|
196
|
-
|
|
196
|
+
me(
|
|
197
197
|
e.challenger_presign_data,
|
|
198
198
|
a,
|
|
199
199
|
r.universalChallengerBtcPubkeys
|
|
@@ -213,7 +213,7 @@ async function ve(e, t, r) {
|
|
|
213
213
|
network: r.network
|
|
214
214
|
});
|
|
215
215
|
n.push(i.psbtHex), s.push(
|
|
216
|
-
|
|
216
|
+
$(
|
|
217
217
|
t,
|
|
218
218
|
H
|
|
219
219
|
)
|
|
@@ -231,7 +231,7 @@ async function ve(e, t, r) {
|
|
|
231
231
|
ctx: r
|
|
232
232
|
});
|
|
233
233
|
n.push(P), s.push(
|
|
234
|
-
|
|
234
|
+
$(
|
|
235
235
|
t,
|
|
236
236
|
H
|
|
237
237
|
)
|
|
@@ -309,13 +309,13 @@ async function xe(e) {
|
|
|
309
309
|
});
|
|
310
310
|
}
|
|
311
311
|
function ke(e, t, r) {
|
|
312
|
-
|
|
312
|
+
R(e[0]);
|
|
313
313
|
const n = I(
|
|
314
314
|
e[0].returnedPsbtHex,
|
|
315
315
|
r
|
|
316
316
|
), s = {};
|
|
317
317
|
for (const u of t)
|
|
318
|
-
|
|
318
|
+
R(e[u.noPayoutIdx]), s[u.challengerPubkey] = {
|
|
319
319
|
nopayout_signature: I(
|
|
320
320
|
e[u.noPayoutIdx].returnedPsbtHex,
|
|
321
321
|
r
|
|
@@ -665,10 +665,10 @@ async function lt(e) {
|
|
|
665
665
|
throw new Error(
|
|
666
666
|
`Vault keeper BTC pubkeys (v${d}) indexer set does not match ApplicationRegistry on-chain set. Refresh and try again.`
|
|
667
667
|
);
|
|
668
|
-
const
|
|
668
|
+
const V = f(o), E = f(
|
|
669
669
|
P.map((p) => p.btcPubKey)
|
|
670
670
|
);
|
|
671
|
-
if (
|
|
671
|
+
if (V.length !== E.length || V.some((p, _) => p !== E[_]))
|
|
672
672
|
throw new Error(
|
|
673
673
|
`Universal challenger BTC pubkeys (v${c}) indexer set does not match ProtocolParams on-chain set. Refresh and try again.`
|
|
674
674
|
);
|
|
@@ -854,10 +854,15 @@ async function ft(e) {
|
|
|
854
854
|
hashlock: h(o.hashlock)
|
|
855
855
|
});
|
|
856
856
|
i == null || i.throwIfAborted();
|
|
857
|
-
const P =
|
|
857
|
+
const P = $(
|
|
858
858
|
o.depositorBtcPubkey,
|
|
859
859
|
Me
|
|
860
|
-
), b = await u(g, P)
|
|
860
|
+
), b = await u(g, P);
|
|
861
|
+
R({
|
|
862
|
+
requestedPsbtHex: g,
|
|
863
|
+
returnedPsbtHex: b
|
|
864
|
+
});
|
|
865
|
+
const f = ze(b);
|
|
861
866
|
i == null || i.throwIfAborted();
|
|
862
867
|
try {
|
|
863
868
|
return await a(f);
|
|
@@ -890,4 +895,4 @@ export {
|
|
|
890
895
|
st as v,
|
|
891
896
|
D as w
|
|
892
897
|
};
|
|
893
|
-
//# sourceMappingURL=buildAndBroadcastRefund-
|
|
898
|
+
//# sourceMappingURL=buildAndBroadcastRefund-CI_x6OtX.js.map
|