@babylonlabs-io/ts-sdk 3.3.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{BTCVaultRegistry.abi-BzNTa_EU.js → BTCVaultRegistry.abi-DnP4UkB5.js} +9 -140
- package/dist/BTCVaultRegistry.abi-DnP4UkB5.js.map +1 -0
- package/dist/{BTCVaultRegistry.abi-BH2-LHxN.cjs → BTCVaultRegistry.abi-DzbfZ9_s.cjs} +2 -2
- package/dist/BTCVaultRegistry.abi-DzbfZ9_s.cjs.map +1 -0
- package/dist/{PayoutManager-xEGvTbhL.js → PayoutManager-BUWP-H-q.js} +3 -3
- package/dist/PayoutManager-BUWP-H-q.js.map +1 -0
- package/dist/{PayoutManager-B1Ev0r7o.cjs → PayoutManager-Dopxq_Jv.cjs} +2 -2
- package/dist/PayoutManager-Dopxq_Jv.cjs.map +1 -0
- package/dist/{PeginManager-D2R4Q1bN.cjs → PeginManager-CMbRRTnr.cjs} +2 -2
- package/dist/{PeginManager-D2R4Q1bN.cjs.map → PeginManager-CMbRRTnr.cjs.map} +1 -1
- package/dist/{PeginManager-CQ9bVPR3.js → PeginManager-Cas6_j7t.js} +7 -7
- package/dist/{PeginManager-CQ9bVPR3.js.map → PeginManager-Cas6_j7t.js.map} +1 -1
- package/dist/{ProtocolParams.abi-Cv77fsUe.js → ProtocolParams.abi-CuDl7AuC.js} +3 -3
- package/dist/{ProtocolParams.abi-Cv77fsUe.js.map → ProtocolParams.abi-CuDl7AuC.js.map} +1 -1
- package/dist/{ProtocolParams.abi-BgEZaQ2I.cjs → ProtocolParams.abi-DWfIh6VH.cjs} +2 -2
- package/dist/{ProtocolParams.abi-BgEZaQ2I.cjs.map → ProtocolParams.abi-DWfIh6VH.cjs.map} +1 -1
- package/dist/VaultErrors.abi-Dc3UnB_h.js +5 -0
- package/dist/{VaultErrors.abi-Boz4w97c.js.map → VaultErrors.abi-Dc3UnB_h.js.map} +1 -1
- package/dist/VaultErrors.abi-Hjn1CdLs.cjs +2 -0
- package/dist/{VaultErrors.abi-DQ18kM0L.cjs.map → VaultErrors.abi-Hjn1CdLs.cjs.map} +1 -1
- package/dist/buildAndBroadcastReclaim-CVmG3ldA.cjs +2 -0
- package/dist/buildAndBroadcastReclaim-CVmG3ldA.cjs.map +1 -0
- package/dist/{buildAndBroadcastReclaim-CQANDXVJ.js → buildAndBroadcastReclaim-XRWuJWVL.js} +48 -50
- package/dist/buildAndBroadcastReclaim-XRWuJWVL.js.map +1 -0
- package/dist/{challengeAssert-C3eMcM5Y.cjs → challengeAssert-BE6Wm4x1.cjs} +2 -2
- package/dist/challengeAssert-BE6Wm4x1.cjs.map +1 -0
- package/dist/{challengeAssert-B2otuf7y.js → challengeAssert-DUKSjirl.js} +3 -3
- package/dist/challengeAssert-DUKSjirl.js.map +1 -0
- package/dist/constants-BCg6O0PX.cjs +2 -0
- package/dist/constants-BCg6O0PX.cjs.map +1 -0
- package/dist/constants-CmDDuM3L.js +50 -0
- package/dist/constants-CmDDuM3L.js.map +1 -0
- package/dist/{index-BRsWXDlv.js → index-B-9aXMxk.js} +6 -6
- package/dist/{index-BRsWXDlv.js.map → index-B-9aXMxk.js.map} +1 -1
- package/dist/{index-C6avwx1s.cjs → index-Dn7RlsKK.cjs} +2 -2
- package/dist/{index-C6avwx1s.cjs.map → index-Dn7RlsKK.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +16 -16
- package/dist/pegin-registration-client-DLlaZbsZ.cjs +2 -0
- package/dist/pegin-registration-client-DLlaZbsZ.cjs.map +1 -0
- package/dist/{pegin-registration-client-Cvjk4ILq.js → pegin-registration-client-ZI0k10_3.js} +90 -96
- package/dist/pegin-registration-client-ZI0k10_3.js.map +1 -0
- package/dist/{primeVpAuth-D4UWXQ76.js → primeVpAuth-C-ET0XF4.js} +2 -2
- package/dist/{primeVpAuth-D4UWXQ76.js.map → primeVpAuth-C-ET0XF4.js.map} +1 -1
- package/dist/{primeVpAuth-CXNXYKrh.cjs → primeVpAuth-Ch-ig2My.cjs} +2 -2
- package/dist/{primeVpAuth-CXNXYKrh.cjs.map → primeVpAuth-Ch-ig2My.cjs.map} +1 -1
- package/dist/registration-records-CKc0OVuK.cjs +2 -0
- package/dist/registration-records-CKc0OVuK.cjs.map +1 -0
- package/dist/{registration-records-DJJC2NiO.js → registration-records-D39ApuHS.js} +141 -141
- package/dist/registration-records-D39ApuHS.js.map +1 -0
- package/dist/{signer-set-reader-GrFe_rsW.cjs → signer-set-reader-CJfV-GDz.cjs} +2 -2
- package/dist/{signer-set-reader-GrFe_rsW.cjs.map → signer-set-reader-CJfV-GDz.cjs.map} +1 -1
- package/dist/{signer-set-reader-CSUe92zE.js → signer-set-reader-DiwLeqik.js} +3 -3
- package/dist/{signer-set-reader-CSUe92zE.js.map → signer-set-reader-DiwLeqik.js.map} +1 -1
- package/dist/tbv/core/clients/eth/index.cjs +1 -1
- package/dist/tbv/core/clients/eth/index.js +4 -4
- package/dist/tbv/core/clients/eth/protocol-params-validation.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/registration-logs-error.d.ts +6 -6
- package/dist/tbv/core/clients/eth/registration-records.d.ts +1 -1
- package/dist/tbv/core/clients/eth/types.d.ts +12 -13
- package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
- package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +1 -1
- package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +6 -6
- package/dist/tbv/core/clients/vault-provider/status/index.cjs +1 -1
- package/dist/tbv/core/clients/vault-provider/status/index.js +1 -1
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +5 -111
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +2 -2
- package/dist/tbv/core/contracts/abis/vaultErrors.abi.json.d.ts +1 -1
- package/dist/tbv/core/contracts/index.cjs +1 -1
- package/dist/tbv/core/contracts/index.js +3 -3
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsCore.test.d.ts +1 -1
- package/dist/tbv/core/deposit-terms/commissionCeiling.d.ts +1 -1
- package/dist/tbv/core/deposit-terms/depositTerms.d.ts +5 -5
- package/dist/tbv/core/deposit-terms/rebuildDepositTermsCore.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +16 -16
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/__tests__/vaultCoreVersion.test.d.ts +1 -1
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +3 -3
- package/dist/tbv/core/primitives/psbt/__tests__/deriveExpectedPeginPayoutScriptPubKey.test.d.ts +1 -1
- package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/constants.d.ts +38 -13
- package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/depositorClaim.d.ts +3 -6
- package/dist/tbv/core/primitives/psbt/depositorClaim.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/pegin.d.ts +3 -5
- package/dist/tbv/core/primitives/psbt/pegin.d.ts.map +1 -1
- package/dist/tbv/core/recovery/peginParamsCandidates.d.ts +1 -1
- package/dist/tbv/core/recovery/reconstructPeginParams.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.d.ts +2 -2
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts +2 -1
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/deriveClaimerWotsKeypair.d.ts +1 -1
- package/dist/tbv/core/services/delegated-claim/deriveClaimerWotsKeypair.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts +2 -1
- package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts +1 -1
- package/dist/tbv/core/services/delegated-claim/readDelegatedClaimVaultContext.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts +3 -3
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/types.d.ts +5 -6
- package/dist/tbv/core/services/delegated-claim/types.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/__tests__/signDepositorGraph.realGraph.test.d.ts +3 -3
- package/dist/tbv/core/services/deposit/signDepositorGraph.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/wasm/index.cjs.map +1 -1
- package/dist/tbv/core/wasm/index.d.ts +8 -11
- package/dist/tbv/core/wasm/index.d.ts.map +1 -1
- package/dist/tbv/core/wasm/index.js.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +16 -16
- package/dist/toRefundInputs-BSQjDOK9.cjs +2 -0
- package/dist/toRefundInputs-BSQjDOK9.cjs.map +1 -0
- package/dist/{toRefundInputs-DH-1bRNY.js → toRefundInputs-BbbvPb2A.js} +175 -173
- package/dist/toRefundInputs-BbbvPb2A.js.map +1 -0
- package/dist/{types-BC2TGzcp.cjs → types-BnZIbDHb.cjs} +2 -2
- package/dist/types-BnZIbDHb.cjs.map +1 -0
- package/dist/{types-24A9Qoxb.js → types-K_aM5GZO.js} +39 -39
- package/dist/types-K_aM5GZO.js.map +1 -0
- package/dist/{verifyKeyPathSchnorrSignature-IIj3Z2se.js → verifyKeyPathSchnorrSignature-DPXOFOol.js} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-IIj3Z2se.js.map → verifyKeyPathSchnorrSignature-DPXOFOol.js.map} +1 -1
- package/dist/{verifyKeyPathSchnorrSignature-BRTpEH9X.cjs → verifyKeyPathSchnorrSignature-DcxCojp0.cjs} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-BRTpEH9X.cjs.map → verifyKeyPathSchnorrSignature-DcxCojp0.cjs.map} +1 -1
- package/dist/verifyScriptPathSchnorrSignature-CgDa9Rcg.cjs +2 -0
- package/dist/verifyScriptPathSchnorrSignature-CgDa9Rcg.cjs.map +1 -0
- package/dist/{verifyScriptPathSchnorrSignature-owu3BfyT.js → verifyScriptPathSchnorrSignature-D-fdi-sG.js} +462 -459
- package/dist/verifyScriptPathSchnorrSignature-D-fdi-sG.js.map +1 -0
- package/package.json +3 -3
- package/dist/BTCVaultRegistry.abi-BH2-LHxN.cjs.map +0 -1
- package/dist/BTCVaultRegistry.abi-BzNTa_EU.js.map +0 -1
- package/dist/PayoutManager-B1Ev0r7o.cjs.map +0 -1
- package/dist/PayoutManager-xEGvTbhL.js.map +0 -1
- package/dist/VaultErrors.abi-Boz4w97c.js +0 -5
- package/dist/VaultErrors.abi-DQ18kM0L.cjs +0 -2
- package/dist/buildAndBroadcastReclaim-CQANDXVJ.js.map +0 -1
- package/dist/buildAndBroadcastReclaim-DPk36Uhp.cjs +0 -2
- package/dist/buildAndBroadcastReclaim-DPk36Uhp.cjs.map +0 -1
- package/dist/challengeAssert-B2otuf7y.js.map +0 -1
- package/dist/challengeAssert-C3eMcM5Y.cjs.map +0 -1
- package/dist/constants-CAm10Qwp.cjs +0 -2
- package/dist/constants-CAm10Qwp.cjs.map +0 -1
- package/dist/constants-CvQZuxKv.js +0 -48
- package/dist/constants-CvQZuxKv.js.map +0 -1
- package/dist/pegin-registration-client-CdRyXP3j.cjs +0 -2
- package/dist/pegin-registration-client-CdRyXP3j.cjs.map +0 -1
- package/dist/pegin-registration-client-Cvjk4ILq.js.map +0 -1
- package/dist/registration-records-DJJC2NiO.js.map +0 -1
- package/dist/registration-records-XQMIKjGV.cjs +0 -2
- package/dist/registration-records-XQMIKjGV.cjs.map +0 -1
- package/dist/toRefundInputs-DH-1bRNY.js.map +0 -1
- package/dist/toRefundInputs-DRmK83fv.cjs +0 -2
- package/dist/toRefundInputs-DRmK83fv.cjs.map +0 -1
- package/dist/types-24A9Qoxb.js.map +0 -1
- package/dist/types-BC2TGzcp.cjs.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-CahYx5Td.cjs +0 -2
- package/dist/verifyScriptPathSchnorrSignature-CahYx5Td.cjs.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-owu3BfyT.js.map +0 -1
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
var Zt = Object.defineProperty;
|
|
2
2
|
var er = (e, t, r) => t in e ? Zt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
3
|
var W = (e, t, r) => er(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
-
import { B as Be } from "./BTCVaultRegistry.abi-
|
|
4
|
+
import { B as Be } from "./BTCVaultRegistry.abi-DnP4UkB5.js";
|
|
5
5
|
import { e as Ie, s as b, i as tr, u as yt, c as _, v as rr, g as or, p as pe, f as N } from "./bitcoin-C-TuHb-v.js";
|
|
6
|
-
import { v as sr, s as vt, b as bt, P as nr, d as ir } from "./PayoutManager-
|
|
6
|
+
import { v as sr, s as vt, b as bt, P as nr, d as ir } from "./PayoutManager-BUWP-H-q.js";
|
|
7
7
|
import { verifyWatchtowerArtifacts as ar, buildClaimPsbt as ur, buildAssertClaimerPsbt as cr, buildPayoutClaimerPsbt as lr, buildWronglyChallengedPsbts as dr, buildPayoutDepositorPsbt as hr, finalizeClaimTx as pr, buildWatchtowerArtifacts as gr, extractTapScriptSig as mt, expandWotsSeed as fr, wotsKeypairFromSeed as yr, validateWotsKeypairAgainstGraph as vr, getChallengeAssertOutputScriptPubKey as br, deriveVaultId as mr } from "./tbv/core/wasm/index.js";
|
|
8
|
-
import { m as Pr, d as Pt, k as wr, a as _e, V as Le, i as xr, g as Er, f as kr, r as $r, h as Cr } from "./registration-records-
|
|
8
|
+
import { m as Pr, d as Pt, k as wr, a as _e, V as Le, i as xr, g as Er, f as kr, r as $r, h as Cr } from "./registration-records-D39ApuHS.js";
|
|
9
9
|
import { Psbt as q, Transaction as S } from "bitcoinjs-lib";
|
|
10
|
-
import {
|
|
11
|
-
import { p as Br, q as Ir, r as wt, P as X, j as oe, f as Vr, i as ae, g as ue } from "./verifyScriptPathSchnorrSignature-
|
|
10
|
+
import { F as U, G as A, H as re, I as Q, A as G, z as Z, J as ge, v as Me, E as ee, K as Ve, w as Ue, x as Fe, y as qe, W as Tr, D as Ge, C as Xe, L as _r, O as Sr, Q as Ar } from "./constants-CmDDuM3L.js";
|
|
11
|
+
import { p as Br, q as Ir, r as wt, P as X, j as oe, f as Vr, i as ae, g as ue } from "./verifyScriptPathSchnorrSignature-D-fdi-sG.js";
|
|
12
12
|
import { Buffer as H } from "buffer";
|
|
13
13
|
import { C as xt, X as Et } from "./validation-OSC0xTHB.js";
|
|
14
14
|
import { a as kt, c as ce } from "./signing-C1rR4tqs.js";
|
|
15
15
|
import { d as $t } from "./deriveVaultRoot-BcvmER1E.js";
|
|
16
|
-
import { O as ze, d as Rr } from "./types-
|
|
16
|
+
import { O as ze, d as Rr } from "./types-K_aM5GZO.js";
|
|
17
17
|
import { zeroAddress as Kr, isAddress as Hr, isAddressEqual as Or } from "viem";
|
|
18
18
|
import { v as je, D as R, c as Nr, b as Dr, R as Lr, d as Ct } from "./state-CFn1rT74.js";
|
|
19
|
-
import { h as We, b as Mr, s as
|
|
20
|
-
import { c as qr, g as Gr, h as Xr, i as zr, b as jr, f as Tt, e as Wr, a as Yr } from "./challengeAssert-
|
|
19
|
+
import { h as We, b as Mr, s as Ur, j as Fr } from "./sha2-YqVHJiFj.js";
|
|
20
|
+
import { c as qr, g as Gr, h as Xr, i as zr, b as jr, f as Tt, e as Wr, a as Yr } from "./challengeAssert-DUKSjirl.js";
|
|
21
21
|
import { a as Jr } from "./secp256k1-BuxBFUHm.js";
|
|
22
22
|
import { c as Qr } from "./btcTxHash-BRZ8_EZq.js";
|
|
23
23
|
const Zr = /^0x[0-9a-fA-F]{64}$/, eo = /^0x[0-9a-fA-F]{40}$/, to = /^0x([0-9a-fA-F]{2})*$/;
|
|
@@ -142,10 +142,10 @@ function be(e, t, r, o, s, n) {
|
|
|
142
142
|
}
|
|
143
143
|
function no(e, t) {
|
|
144
144
|
var s;
|
|
145
|
-
const r = (s = e.data.inputs[
|
|
145
|
+
const r = (s = e.data.inputs[U]) == null ? void 0 : s.witnessUtxo;
|
|
146
146
|
if (r === void 0)
|
|
147
147
|
throw new K(
|
|
148
|
-
`Assert input ${
|
|
148
|
+
`Assert input ${U} carries no witnessUtxo, so the amount and script its signature commits to cannot be checked; refusing to sign assert.`
|
|
149
149
|
);
|
|
150
150
|
const o = t.txOutputs[Q];
|
|
151
151
|
if (!o)
|
|
@@ -154,11 +154,11 @@ function no(e, t) {
|
|
|
154
154
|
);
|
|
155
155
|
if (r.value !== o.value)
|
|
156
156
|
throw new K(
|
|
157
|
-
`Assert input ${
|
|
157
|
+
`Assert input ${U} declares a prevout of ${r.value} sats but the Claim's output ${Q} is worth ${o.value}; refusing to sign assert.`
|
|
158
158
|
);
|
|
159
159
|
if (!r.script.equals(o.script))
|
|
160
160
|
throw new K(
|
|
161
|
-
`Assert input ${
|
|
161
|
+
`Assert input ${U} declares a prevout script that is not the Claim's output ${Q} script; refusing to sign assert.`
|
|
162
162
|
);
|
|
163
163
|
}
|
|
164
164
|
function io(e) {
|
|
@@ -166,7 +166,7 @@ function io(e) {
|
|
|
166
166
|
be(
|
|
167
167
|
"Assert",
|
|
168
168
|
r,
|
|
169
|
-
|
|
169
|
+
U,
|
|
170
170
|
Ye(t),
|
|
171
171
|
Q,
|
|
172
172
|
"Claim:0"
|
|
@@ -333,9 +333,9 @@ function ho(e) {
|
|
|
333
333
|
throw new Error("Payout PSBT cannot be parsed.", { cause: c });
|
|
334
334
|
}
|
|
335
335
|
const { version: r, locktime: o, outs: s } = po(t);
|
|
336
|
-
if (r !==
|
|
336
|
+
if (r !== Ue || o !== Fe)
|
|
337
337
|
throw new Error(
|
|
338
|
-
`Payout transaction has version ${r} and locktime ${o}, expected ${
|
|
338
|
+
`Payout transaction has version ${r} and locktime ${o}, expected ${Ue} and ${Fe}.`
|
|
339
339
|
);
|
|
340
340
|
if (s.length !== ee)
|
|
341
341
|
throw new Error(
|
|
@@ -477,7 +477,7 @@ function At(e) {
|
|
|
477
477
|
`Vault provider served Groth16 verifying key ${t} but the trusted key for prover circuit version ${e.proverCircuitVersion} is ${r}; refusing to sign a claim whose proof would verify under a substituted key.`
|
|
478
478
|
);
|
|
479
479
|
}
|
|
480
|
-
const
|
|
480
|
+
const F = 1;
|
|
481
481
|
class bo extends Error {
|
|
482
482
|
constructor(t, r) {
|
|
483
483
|
super(
|
|
@@ -509,14 +509,17 @@ function wo(e) {
|
|
|
509
509
|
const r = Pe(t.vault_id, "vault_id"), o = xo(Pe(t.claim_tx, "claim_tx")), s = we(
|
|
510
510
|
t.prover_circuit_version,
|
|
511
511
|
"prover_circuit_version"
|
|
512
|
-
), n =
|
|
512
|
+
), n = BigInt(
|
|
513
513
|
we(
|
|
514
514
|
t.claimable_event_block_number,
|
|
515
515
|
"claimable_event_block_number"
|
|
516
516
|
)
|
|
517
517
|
);
|
|
518
518
|
return {
|
|
519
|
-
vaultCoreVersion:
|
|
519
|
+
vaultCoreVersion: we(
|
|
520
|
+
t.vault_core_version,
|
|
521
|
+
"vault_core_version"
|
|
522
|
+
),
|
|
520
523
|
vaultId: r,
|
|
521
524
|
claimTxid: o.getId(),
|
|
522
525
|
peginTxid: vo(o),
|
|
@@ -538,8 +541,8 @@ async function cn(e) {
|
|
|
538
541
|
depositorEthAddress: e.depositorEthAddress,
|
|
539
542
|
expectedVaultId: r
|
|
540
543
|
});
|
|
541
|
-
const s = e.txGraphVersion ??
|
|
542
|
-
if (t.vaultCoreVersion !==
|
|
544
|
+
const s = e.txGraphVersion ?? F;
|
|
545
|
+
if (t.vaultCoreVersion !== s)
|
|
543
546
|
throw new Error(
|
|
544
547
|
`Artifacts record vault core version ${t.vaultCoreVersion}, but verification was asked for version ${s}.`
|
|
545
548
|
);
|
|
@@ -588,7 +591,6 @@ function we(e, t) {
|
|
|
588
591
|
return e;
|
|
589
592
|
}
|
|
590
593
|
function Eo(e, t) {
|
|
591
|
-
if (e === void 0) return {};
|
|
592
594
|
if (typeof e != "object" || e === null || Array.isArray(e))
|
|
593
595
|
throw new Error(`Artifacts file is missing a usable "${t}".`);
|
|
594
596
|
return e;
|
|
@@ -608,7 +610,7 @@ function It(e) {
|
|
|
608
610
|
id: "assert",
|
|
609
611
|
kind: "assert",
|
|
610
612
|
psbtBase64: e.assert,
|
|
611
|
-
inputIndex:
|
|
613
|
+
inputIndex: U
|
|
612
614
|
},
|
|
613
615
|
{
|
|
614
616
|
id: "payoutClaimer",
|
|
@@ -675,9 +677,9 @@ async function Vt(e, t, r, o) {
|
|
|
675
677
|
{ cause: h }
|
|
676
678
|
);
|
|
677
679
|
}
|
|
678
|
-
if (e !==
|
|
680
|
+
if (e !== F)
|
|
679
681
|
throw new Error(
|
|
680
|
-
`Graph version ${e} is not the delegated-claim graph version ${
|
|
682
|
+
`Graph version ${e} is not the delegated-claim graph version ${F}; vaults on other graphs have no delegated-claim path.`
|
|
681
683
|
);
|
|
682
684
|
if (e !== r.vaultCoreVersion)
|
|
683
685
|
throw new Error(
|
|
@@ -1124,7 +1126,7 @@ function xe(e, t, r) {
|
|
|
1124
1126
|
rotated: n !== s
|
|
1125
1127
|
};
|
|
1126
1128
|
}
|
|
1127
|
-
function
|
|
1129
|
+
function Uo(e) {
|
|
1128
1130
|
const t = /* @__PURE__ */ new Map();
|
|
1129
1131
|
for (const r of e) {
|
|
1130
1132
|
const o = t.get(r.operationBtcPubkey);
|
|
@@ -1152,7 +1154,7 @@ function Ot(e, t, r) {
|
|
|
1152
1154
|
), n = e.universalChallengers.map(
|
|
1153
1155
|
(a, i) => xe("universal challenger", a, t.universalChallengers[i])
|
|
1154
1156
|
);
|
|
1155
|
-
return
|
|
1157
|
+
return Uo([
|
|
1156
1158
|
o,
|
|
1157
1159
|
...s,
|
|
1158
1160
|
...n
|
|
@@ -1167,7 +1169,7 @@ function Ot(e, t, r) {
|
|
|
1167
1169
|
query: e
|
|
1168
1170
|
};
|
|
1169
1171
|
}
|
|
1170
|
-
async function
|
|
1172
|
+
async function Fo(e) {
|
|
1171
1173
|
const t = await e.operationKeyReader.getCurrentOperationKeys(
|
|
1172
1174
|
e.query,
|
|
1173
1175
|
e.blockNumber
|
|
@@ -1228,9 +1230,9 @@ async function qo(e) {
|
|
|
1228
1230
|
}
|
|
1229
1231
|
async function hn(e) {
|
|
1230
1232
|
const { vaultId: t, readers: r } = e, o = await r.registryReader.getVaultData(t), { basic: s, protocol: n } = o;
|
|
1231
|
-
if (n.vaultCoreVersion !==
|
|
1233
|
+
if (n.vaultCoreVersion !== F)
|
|
1232
1234
|
throw new Error(
|
|
1233
|
-
`Vault ${t} is stamped vault core version ${n.vaultCoreVersion}; delegated claim requires ${
|
|
1235
|
+
`Vault ${t} is stamped vault core version ${n.vaultCoreVersion}; delegated claim requires ${F}.`
|
|
1234
1236
|
);
|
|
1235
1237
|
const a = _e(
|
|
1236
1238
|
s.depositorBtcPubKey,
|
|
@@ -1361,7 +1363,7 @@ async function hn(e) {
|
|
|
1361
1363
|
universalChallengerBtcPubkeys: [
|
|
1362
1364
|
...i.universalChallengerOperationKeysSorted
|
|
1363
1365
|
],
|
|
1364
|
-
txGraphVersion:
|
|
1366
|
+
txGraphVersion: F,
|
|
1365
1367
|
proverCircuitVersion: c.proverCircuitVersion,
|
|
1366
1368
|
vaultCoreVersion: n.vaultCoreVersion,
|
|
1367
1369
|
claimableEventBlockNumber: l.blockNumber,
|
|
@@ -1585,7 +1587,7 @@ function Mt(e, t) {
|
|
|
1585
1587
|
vout: r.index
|
|
1586
1588
|
};
|
|
1587
1589
|
}
|
|
1588
|
-
function
|
|
1590
|
+
function Ut(e, t) {
|
|
1589
1591
|
if (!e.outs[de])
|
|
1590
1592
|
throw new P(
|
|
1591
1593
|
`Presign ${t}.claim_tx must have output ${de}`
|
|
@@ -1596,7 +1598,7 @@ function ts(e, t, r) {
|
|
|
1596
1598
|
throw new P(
|
|
1597
1599
|
`Presign ${r}.claim_tx must have exactly one input, got ${e.ins.length}`
|
|
1598
1600
|
);
|
|
1599
|
-
|
|
1601
|
+
Ut(e, r);
|
|
1600
1602
|
const o = Mt(e, 0);
|
|
1601
1603
|
if ((o == null ? void 0 : o.txid) !== t || o.vout !== X) {
|
|
1602
1604
|
const s = o ? `${o.txid}:${o.vout}` : "no input";
|
|
@@ -1614,16 +1616,16 @@ function Oe(e, t, r) {
|
|
|
1614
1616
|
);
|
|
1615
1617
|
}
|
|
1616
1618
|
}
|
|
1617
|
-
function
|
|
1619
|
+
function Ft(e) {
|
|
1618
1620
|
const t = D(e.peginTxHex, `${e.path}.pegin_tx`), r = D(e.claimTxHex, `${e.path}.claim_tx`), o = D(e.assertTxHex, `${e.path}.assert_tx`);
|
|
1619
1621
|
return { peginTx: t, claimTx: r, assertTx: o };
|
|
1620
1622
|
}
|
|
1621
1623
|
function rs(e) {
|
|
1622
1624
|
const t = D(e.claimTxHex, `${e.path}.claim_tx`), r = D(e.assertTxHex, `${e.path}.assert_tx`);
|
|
1623
|
-
|
|
1625
|
+
Ut(t, e.path), Oe(r, t.getId(), e.path);
|
|
1624
1626
|
}
|
|
1625
1627
|
function os(e) {
|
|
1626
|
-
const { peginTx: t, claimTx: r, assertTx: o } =
|
|
1628
|
+
const { peginTx: t, claimTx: r, assertTx: o } = Ft(e);
|
|
1627
1629
|
ts(r, t.getId(), e.path), Oe(o, r.getId(), e.path);
|
|
1628
1630
|
}
|
|
1629
1631
|
function ss(e, t) {
|
|
@@ -1661,10 +1663,10 @@ function qt(e) {
|
|
|
1661
1663
|
r.push(We(n), o.nopayoutTx);
|
|
1662
1664
|
for (const a of o.outputLabelHashes)
|
|
1663
1665
|
r.push(We(he(a, "output_label_hashes entry")));
|
|
1664
|
-
}), Mr(Fr(
|
|
1666
|
+
}), Mr(Ur(Fr(...r)));
|
|
1665
1667
|
}
|
|
1666
1668
|
function ns(e) {
|
|
1667
|
-
const t = b(e.peginTxid).toLowerCase(), { peginTx: r, claimTx: o, assertTx: s } =
|
|
1669
|
+
const t = b(e.peginTxid).toLowerCase(), { peginTx: r, claimTx: o, assertTx: s } = Ft({
|
|
1668
1670
|
peginTxHex: e.peginTxHex,
|
|
1669
1671
|
claimTxHex: e.claimTxHex,
|
|
1670
1672
|
assertTxHex: e.assertTxHex,
|
|
@@ -1774,11 +1776,11 @@ function cs(e, t, r) {
|
|
|
1774
1776
|
);
|
|
1775
1777
|
return or(n);
|
|
1776
1778
|
}
|
|
1777
|
-
function ls(e, t
|
|
1778
|
-
const
|
|
1779
|
-
if (e.outs.length !==
|
|
1779
|
+
function ls(e, t) {
|
|
1780
|
+
const r = _r + Sr * t + Ar;
|
|
1781
|
+
if (e.outs.length !== r)
|
|
1780
1782
|
throw new Error(
|
|
1781
|
-
`Assert must have ${
|
|
1783
|
+
`Assert must have ${r} outputs for ${t} challengers, got ${e.outs.length}`
|
|
1782
1784
|
);
|
|
1783
1785
|
}
|
|
1784
1786
|
async function Gt(e, t) {
|
|
@@ -1794,11 +1796,7 @@ async function Gt(e, t) {
|
|
|
1794
1796
|
), s = b(t.depositorBtcPubkey), n = S.fromHex(
|
|
1795
1797
|
b(e.assert_tx.tx_hex)
|
|
1796
1798
|
);
|
|
1797
|
-
ls(
|
|
1798
|
-
n,
|
|
1799
|
-
o.length,
|
|
1800
|
-
t.vaultCoreVersion
|
|
1801
|
-
);
|
|
1799
|
+
ls(n, o.length);
|
|
1802
1800
|
const a = [];
|
|
1803
1801
|
for (const i of e.challenger_presign_data) {
|
|
1804
1802
|
const u = b(i.challenger_pubkey), l = o.indexOf(
|
|
@@ -2450,7 +2448,7 @@ async function Pn(e) {
|
|
|
2450
2448
|
vaultProvider: _(p),
|
|
2451
2449
|
vaultKeepers: at(x.map((C) => C.btcPubKey)),
|
|
2452
2450
|
universalChallengers: at(v.map((C) => C.btcPubKey))
|
|
2453
|
-
}, T = await
|
|
2451
|
+
}, T = await Fo({
|
|
2454
2452
|
operationKeyReader: l,
|
|
2455
2453
|
query: {
|
|
2456
2454
|
vaultProviderEthAddress: s,
|
|
@@ -3036,7 +3034,7 @@ export {
|
|
|
3036
3034
|
K as A,
|
|
3037
3035
|
fn as B,
|
|
3038
3036
|
uo as C,
|
|
3039
|
-
|
|
3037
|
+
F as D,
|
|
3040
3038
|
is as E,
|
|
3041
3039
|
yn as F,
|
|
3042
3040
|
P as G,
|
|
@@ -3067,7 +3065,7 @@ export {
|
|
|
3067
3065
|
ks as a3,
|
|
3068
3066
|
nt as a4,
|
|
3069
3067
|
qo as a5,
|
|
3070
|
-
|
|
3068
|
+
Fo as a6,
|
|
3071
3069
|
Nt as a7,
|
|
3072
3070
|
Bs as a8,
|
|
3073
3071
|
Bn as a9,
|
|
@@ -3108,4 +3106,4 @@ export {
|
|
|
3108
3106
|
pn as y,
|
|
3109
3107
|
gn as z
|
|
3110
3108
|
};
|
|
3111
|
-
//# sourceMappingURL=buildAndBroadcastReclaim-
|
|
3109
|
+
//# sourceMappingURL=buildAndBroadcastReclaim-XRWuJWVL.js.map
|