@babylonlabs-io/ts-sdk 3.1.2 → 3.2.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/BTCVaultRegistry.abi-BH2-LHxN.cjs +2 -0
- package/dist/BTCVaultRegistry.abi-BH2-LHxN.cjs.map +1 -0
- package/dist/{BTCVaultRegistry.abi-BmHpMUWD.js → BTCVaultRegistry.abi-BzNTa_EU.js} +19 -1
- package/dist/BTCVaultRegistry.abi-BzNTa_EU.js.map +1 -0
- package/dist/{PayoutManager-DOdsgcUR.cjs → PayoutManager-B1Ev0r7o.cjs} +2 -2
- package/dist/{PayoutManager-DOdsgcUR.cjs.map → PayoutManager-B1Ev0r7o.cjs.map} +1 -1
- package/dist/{PayoutManager-BZ212yml.js → PayoutManager-xEGvTbhL.js} +3 -3
- package/dist/{PayoutManager-BZ212yml.js.map → PayoutManager-xEGvTbhL.js.map} +1 -1
- package/dist/{PeginManager-PyKbfy5q.cjs → PeginManager-BCRtUqyX.cjs} +2 -2
- package/dist/{PeginManager-PyKbfy5q.cjs.map → PeginManager-BCRtUqyX.cjs.map} +1 -1
- package/dist/{PeginManager-Dfr5Qe1g.js → PeginManager-sizm3dlw.js} +7 -7
- package/dist/{PeginManager-Dfr5Qe1g.js.map → PeginManager-sizm3dlw.js.map} +1 -1
- package/dist/buildAndBroadcastReclaim-CE77jzTp.cjs +2 -0
- package/dist/buildAndBroadcastReclaim-CE77jzTp.cjs.map +1 -0
- package/dist/{buildAndBroadcastReclaim-R0HNpLMD.js → buildAndBroadcastReclaim-rQyAiAUS.js} +901 -867
- package/dist/buildAndBroadcastReclaim-rQyAiAUS.js.map +1 -0
- package/dist/challengeAssert-B2otuf7y.js +509 -0
- package/dist/challengeAssert-B2otuf7y.js.map +1 -0
- package/dist/challengeAssert-C3eMcM5Y.cjs +2 -0
- package/dist/challengeAssert-C3eMcM5Y.cjs.map +1 -0
- package/dist/constants-CAm10Qwp.cjs +2 -0
- package/dist/constants-CAm10Qwp.cjs.map +1 -0
- package/dist/constants-CvQZuxKv.js +48 -0
- package/dist/constants-CvQZuxKv.js.map +1 -0
- package/dist/{index-CVBtBjQ5.js → index-BRsWXDlv.js} +6 -6
- package/dist/{index-CVBtBjQ5.js.map → index-BRsWXDlv.js.map} +1 -1
- package/dist/{index-DpjYs5yr.cjs → index-C6avwx1s.cjs} +2 -2
- package/dist/{index-DpjYs5yr.cjs.map → index-C6avwx1s.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +297 -298
- package/dist/index.js.map +1 -1
- package/dist/{pegin-registration-client-kdz4fT5_.js → pegin-registration-client-8tzSRDaq.js} +46 -45
- package/dist/pegin-registration-client-8tzSRDaq.js.map +1 -0
- package/dist/pegin-registration-client-Bmkh1OZ9.cjs +2 -0
- package/dist/pegin-registration-client-Bmkh1OZ9.cjs.map +1 -0
- package/dist/peginState-CIibG9S_.js +75 -0
- package/dist/peginState-CIibG9S_.js.map +1 -0
- package/dist/peginState-IyE22wWh.cjs +2 -0
- package/dist/peginState-IyE22wWh.cjs.map +1 -0
- package/dist/{primeVpAuth-BPj2TPdD.cjs → primeVpAuth-CXNXYKrh.cjs} +2 -2
- package/dist/{primeVpAuth-BPj2TPdD.cjs.map → primeVpAuth-CXNXYKrh.cjs.map} +1 -1
- package/dist/{primeVpAuth-CiCdRNGf.js → primeVpAuth-D4UWXQ76.js} +2 -2
- package/dist/{primeVpAuth-CiCdRNGf.js.map → primeVpAuth-D4UWXQ76.js.map} +1 -1
- package/dist/{registration-records-CKLAv3gw.js → registration-records-BBOz21Dm.js} +15 -15
- package/dist/{registration-records-CKLAv3gw.js.map → registration-records-BBOz21Dm.js.map} +1 -1
- package/dist/{registration-records-DFQgBaYi.cjs → registration-records-DaBufozs.cjs} +2 -2
- package/dist/{registration-records-DFQgBaYi.cjs.map → registration-records-DaBufozs.cjs.map} +1 -1
- package/dist/{reservation-DOAHVT3B.js → reservation-BZQABu4g.js} +2 -2
- package/dist/{reservation-DOAHVT3B.js.map → reservation-BZQABu4g.js.map} +1 -1
- package/dist/{reservation-ECxjZi5t.cjs → reservation-CA5knoQ0.cjs} +2 -2
- package/dist/{reservation-ECxjZi5t.cjs.map → reservation-CA5knoQ0.cjs.map} +1 -1
- package/dist/{signer-set-reader-DFAu6I-v.cjs → signer-set-reader-D-CyIYR5.cjs} +2 -2
- package/dist/{signer-set-reader-DFAu6I-v.cjs.map → signer-set-reader-D-CyIYR5.cjs.map} +1 -1
- package/dist/{signer-set-reader-BCtmSKUM.js → signer-set-reader-DFF9MgQN.js} +2 -2
- package/dist/{signer-set-reader-BCtmSKUM.js.map → signer-set-reader-DFF9MgQN.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/types.d.ts +8 -0
- package/dist/tbv/core/clients/eth/types.d.ts.map +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 +14 -0
- package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
- package/dist/tbv/core/contracts/index.cjs +1 -1
- package/dist/tbv/core/contracts/index.js +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +293 -294
- package/dist/tbv/core/index.js.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 +29 -30
- package/dist/tbv/core/primitives/index.js.map +1 -1
- package/dist/tbv/core/primitives/psbt/__tests__/challengeAssert.test.d.ts +2 -0
- package/dist/tbv/core/primitives/psbt/__tests__/challengeAssert.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/__tests__/noPayout.test.d.ts +2 -0
- package/dist/tbv/core/primitives/psbt/__tests__/noPayout.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/challengeAssert.d.ts +43 -0
- package/dist/tbv/core/primitives/psbt/challengeAssert.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/constants.d.ts +50 -2
- package/dist/tbv/core/primitives/psbt/constants.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts +42 -0
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts.map +1 -1
- package/dist/tbv/core/services/activation/activateVault.d.ts +50 -0
- package/dist/tbv/core/services/activation/activateVault.d.ts.map +1 -1
- package/dist/tbv/core/services/activation/index.d.ts +1 -1
- package/dist/tbv/core/services/activation/index.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.d.ts +9 -0
- package/dist/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.d.ts.map +1 -0
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts +5 -7
- package/dist/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/index.d.ts +3 -4
- package/dist/tbv/core/services/delegated-claim/index.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/planDelegatedClaimSigning.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts +14 -8
- package/dist/tbv/core/services/delegated-claim/readWatchtowerArtifacts.d.ts.map +1 -1
- package/dist/tbv/core/services/delegated-claim/types.d.ts +32 -19
- 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 +12 -0
- package/dist/tbv/core/services/deposit/__tests__/signDepositorGraph.realGraph.test.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/peginState.d.ts +20 -1
- package/dist/tbv/core/services/deposit/peginState.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts +7 -0
- package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +46 -1
- 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 +59 -59
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +1 -1
- package/dist/tbv/core/wasm/__tests__/challengeAssertOutputConnector.test.d.ts +2 -0
- package/dist/tbv/core/wasm/__tests__/challengeAssertOutputConnector.test.d.ts.map +1 -0
- package/dist/tbv/core/wasm/index.cjs +1 -1
- package/dist/tbv/core/wasm/index.cjs.map +1 -1
- package/dist/tbv/core/wasm/index.d.ts +14 -2
- package/dist/tbv/core/wasm/index.d.ts.map +1 -1
- package/dist/tbv/core/wasm/index.js +81 -77
- package/dist/tbv/core/wasm/index.js.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +293 -294
- package/dist/tbv/index.js.map +1 -1
- package/dist/{toRefundInputs-BbAOOUg6.cjs → toRefundInputs-DOCLxqC1.cjs} +2 -2
- package/dist/{toRefundInputs-BbAOOUg6.cjs.map → toRefundInputs-DOCLxqC1.cjs.map} +1 -1
- package/dist/{toRefundInputs-DW14g6wH.js → toRefundInputs-Dso_QEr-.js} +5 -5
- package/dist/{toRefundInputs-DW14g6wH.js.map → toRefundInputs-Dso_QEr-.js.map} +1 -1
- package/dist/{types-Bda75Od0.cjs → types-DGr5HWwD.cjs} +2 -2
- package/dist/types-DGr5HWwD.cjs.map +1 -0
- package/dist/{types-C5jj3Cc-.js → types-Dbs--c2M.js} +2 -2
- package/dist/types-Dbs--c2M.js.map +1 -0
- package/dist/{verifyKeyPathSchnorrSignature-CQUut2-O.cjs → verifyKeyPathSchnorrSignature-BRTpEH9X.cjs} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-CQUut2-O.cjs.map → verifyKeyPathSchnorrSignature-BRTpEH9X.cjs.map} +1 -1
- package/dist/{verifyKeyPathSchnorrSignature-DxPbeSdQ.js → verifyKeyPathSchnorrSignature-IIj3Z2se.js} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-DxPbeSdQ.js.map → verifyKeyPathSchnorrSignature-IIj3Z2se.js.map} +1 -1
- package/dist/{verifyScriptPathSchnorrSignature-D2t1yACC.cjs → verifyScriptPathSchnorrSignature-CahYx5Td.cjs} +2 -2
- package/dist/{verifyScriptPathSchnorrSignature-D2t1yACC.cjs.map → verifyScriptPathSchnorrSignature-CahYx5Td.cjs.map} +1 -1
- package/dist/{verifyScriptPathSchnorrSignature-B3-VkvnK.js → verifyScriptPathSchnorrSignature-owu3BfyT.js} +2 -2
- package/dist/{verifyScriptPathSchnorrSignature-B3-VkvnK.js.map → verifyScriptPathSchnorrSignature-owu3BfyT.js.map} +1 -1
- package/package.json +3 -3
- package/dist/BTCVaultRegistry.abi-BmHpMUWD.js.map +0 -1
- package/dist/BTCVaultRegistry.abi-DffWFdpA.cjs +0 -2
- package/dist/BTCVaultRegistry.abi-DffWFdpA.cjs.map +0 -1
- package/dist/buildAndBroadcastReclaim-Da8rD5Z7.cjs +0 -2
- package/dist/buildAndBroadcastReclaim-Da8rD5Z7.cjs.map +0 -1
- package/dist/buildAndBroadcastReclaim-R0HNpLMD.js.map +0 -1
- package/dist/challengeAssert-Cp_GeRg8.js +0 -64
- package/dist/challengeAssert-Cp_GeRg8.js.map +0 -1
- package/dist/challengeAssert-Z7_YULBb.cjs +0 -2
- package/dist/challengeAssert-Z7_YULBb.cjs.map +0 -1
- package/dist/constants-BeYquVd-.js +0 -36
- package/dist/constants-BeYquVd-.js.map +0 -1
- package/dist/constants-BwCg5K6R.cjs +0 -2
- package/dist/constants-BwCg5K6R.cjs.map +0 -1
- package/dist/noPayout-B-vGXJ-V.js +0 -361
- package/dist/noPayout-B-vGXJ-V.js.map +0 -1
- package/dist/noPayout-DOHak0ui.cjs +0 -2
- package/dist/noPayout-DOHak0ui.cjs.map +0 -1
- package/dist/pegin-registration-client-C-abxMWq.cjs +0 -2
- package/dist/pegin-registration-client-C-abxMWq.cjs.map +0 -1
- package/dist/pegin-registration-client-kdz4fT5_.js.map +0 -1
- package/dist/peginState-BU2ONFXF.js +0 -68
- package/dist/peginState-BU2ONFXF.js.map +0 -1
- package/dist/peginState-DUv10EJR.cjs +0 -2
- package/dist/peginState-DUv10EJR.cjs.map +0 -1
- package/dist/types-Bda75Od0.cjs.map +0 -1
- package/dist/types-C5jj3Cc-.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-BCRtUqyX.cjs"),a=require("../../../PayoutManager-B1Ev0r7o.cjs");exports.PeginManager=e.PeginManager;exports.PayoutManager=a.PayoutManager;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as e } from "../../../PeginManager-
|
|
2
|
-
import { P } from "../../../PayoutManager-
|
|
1
|
+
import { P as e } from "../../../PeginManager-sizm3dlw.js";
|
|
2
|
+
import { P } from "../../../PayoutManager-xEGvTbhL.js";
|
|
3
3
|
export {
|
|
4
4
|
P as PayoutManager,
|
|
5
5
|
e as PeginManager
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../verifyScriptPathSchnorrSignature-CahYx5Td.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),r=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-BRTpEH9X.cjs"),i=require("../../../challengeAssert-C3eMcM5Y.cjs"),e=require("../../../bitcoin-D-O2GjbC.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=t.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=t.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=t.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=t.buildPrePeginPsbt;exports.computeNumLocalChallengers=t.computeNumLocalChallengers;exports.createPayoutScript=t.createPayoutScript;exports.deriveDepositorClaimDescriptor=t.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=t.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=t.extractPayoutSignature;exports.assertValidVaultCoreVersion=s.assertValidVaultCoreVersion;exports.computeMinClaimValue=r.computeMinClaimValue;exports.computeMinPeginFee=r.computeMinPeginFee;exports.deriveVaultId=r.deriveVaultId;exports.peginP2aAnchorOutput=r.peginP2aAnchorOutput;exports.supportedTxGraphVersions=r.supportedTxGraphVersions;exports.validatePeginP2aAnchor=r.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=a.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=a.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=a.buildPeginInputPsbt;exports.extractPeginInputSignature=a.extractPeginInputSignature;exports.finalizePeginInputPsbt=a.finalizePeginInputPsbt;exports.buildChallengeAssertPsbt=i.buildChallengeAssertPsbt;exports.buildNoPayoutPsbt=i.buildNoPayoutPsbt;exports.buildReclaimPsbt=i.buildReclaimPsbt;exports.buildRefundPsbt=i.buildRefundPsbt;exports.estimateReclaimFeeSats=i.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=i.finalizeScriptPathWithSignatures;exports.reclaimVsize=i.reclaimVsize;exports.canonicalizeBtcPubkey=e.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-
|
|
1
|
+
import { P as s, h as t, i as r, j as i, f as o, b as u, a as n, c as P, k as l, d, e as c, g as b } from "../../../verifyScriptPathSchnorrSignature-owu3BfyT.js";
|
|
2
2
|
import { a as g } from "../../../secp256k1-BuxBFUHm.js";
|
|
3
|
-
import { computeMinClaimValue as x, computeMinPeginFee as S, deriveVaultId as y, peginP2aAnchorOutput as
|
|
4
|
-
import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-
|
|
5
|
-
import {
|
|
6
|
-
import { b as
|
|
7
|
-
import { c as E, d as U, a as X, b as _, e as j, f as G, g as L, h as W, i as w, j as q, p as J, s as Q, t as Y, u as Z, v as $ } from "../../../bitcoin-C-TuHb-v.js";
|
|
3
|
+
import { computeMinClaimValue as x, computeMinPeginFee as S, deriveVaultId as y, peginP2aAnchorOutput as h, supportedTxGraphVersions as f, validatePeginP2aAnchor as v } from "../wasm/index.js";
|
|
4
|
+
import { a as A, c as V, b as C, e as I, f as O } from "../../../verifyKeyPathSchnorrSignature-IIj3Z2se.js";
|
|
5
|
+
import { d as F, c as H, a as R, b as k, e as z, f as D, r as M } from "../../../challengeAssert-B2otuf7y.js";
|
|
6
|
+
import { c as B, d as E, a as U, b as X, e as _, f as j, g as G, h as L, i as W, j as w, p as q, s as J, t as Q, u as Y, v as Z } from "../../../bitcoin-C-TuHb-v.js";
|
|
8
7
|
export {
|
|
9
8
|
s as PEGIN_DEPOSITOR_CLAIM_VOUT,
|
|
10
9
|
t as PsbtSubstitutionError,
|
|
@@ -13,44 +12,44 @@ export {
|
|
|
13
12
|
V as assertReturnedKeyPathSignatures,
|
|
14
13
|
i as assertScriptPathSchnorrSignature,
|
|
15
14
|
g as assertValidVaultCoreVersion,
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
F as buildChallengeAssertPsbt,
|
|
16
|
+
H as buildNoPayoutPsbt,
|
|
18
17
|
o as buildPayoutPsbt,
|
|
19
18
|
C as buildPeginInputPsbt,
|
|
20
19
|
u as buildPeginTxFromFundedPrePegin,
|
|
21
20
|
n as buildPrePeginPsbt,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
R as buildReclaimPsbt,
|
|
22
|
+
k as buildRefundPsbt,
|
|
23
|
+
B as canonicalizeBtcPubkey,
|
|
25
24
|
x as computeMinClaimValue,
|
|
26
25
|
S as computeMinPeginFee,
|
|
27
26
|
P as computeNumLocalChallengers,
|
|
28
27
|
l as createPayoutScript,
|
|
29
|
-
|
|
28
|
+
E as deriveBip86ScriptPubKeyHex,
|
|
30
29
|
d as deriveDepositorClaimDescriptor,
|
|
31
30
|
c as deriveDepositorClaimScriptPubKey,
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
U as deriveNativeSegwitAddress,
|
|
32
|
+
X as deriveTaprootAddress,
|
|
34
33
|
y as deriveVaultId,
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
_ as ensureHexPrefix,
|
|
35
|
+
z as estimateReclaimFeeSats,
|
|
37
36
|
b as extractPayoutSignature,
|
|
38
37
|
I as extractPeginInputSignature,
|
|
39
38
|
O as finalizePeginInputPsbt,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
39
|
+
D as finalizeScriptPathWithSignatures,
|
|
40
|
+
j as formatSatoshisToBtc,
|
|
41
|
+
G as getSortedXOnlyPubkeys,
|
|
42
|
+
L as hexToUint8Array,
|
|
43
|
+
W as isAddressFromPublicKey,
|
|
44
|
+
w as isValidHex,
|
|
45
|
+
h as peginP2aAnchorOutput,
|
|
46
|
+
q as processPublicKeyToXOnly,
|
|
47
|
+
M as reclaimVsize,
|
|
48
|
+
J as stripHexPrefix,
|
|
49
|
+
f as supportedTxGraphVersions,
|
|
50
|
+
Q as toXOnly,
|
|
51
|
+
Y as uint8ArrayToHex,
|
|
53
52
|
v as validatePeginP2aAnchor,
|
|
54
|
-
|
|
53
|
+
Z as validateWalletPubkey
|
|
55
54
|
};
|
|
56
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"challengeAssert.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/challengeAssert.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"noPayout.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/noPayout.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ChallengeAssertConnectorParams } from '../../wasm';
|
|
2
|
+
import { Transaction } from 'bitcoinjs-lib';
|
|
2
3
|
/**
|
|
3
4
|
* Parameters for building a ChallengeAssert PSBT
|
|
4
5
|
*/
|
|
@@ -27,4 +28,46 @@ export interface ChallengeAssertParams {
|
|
|
27
28
|
* @throws If two inputs reference the same Assert output index
|
|
28
29
|
*/
|
|
29
30
|
export declare function buildChallengeAssertPsbt(params: ChallengeAssertParams): Promise<string>;
|
|
31
|
+
/** Which of a challenger's two ChallengeAssert transactions. */
|
|
32
|
+
export type ChallengeAssertHalf = "X" | "Y";
|
|
33
|
+
/**
|
|
34
|
+
* Parameters for {@link assertChallengeAssertIsCanonical}
|
|
35
|
+
*/
|
|
36
|
+
export interface AssertChallengeAssertIsCanonicalParams {
|
|
37
|
+
/** The ChallengeAssertX or ChallengeAssertY transaction the VP supplied */
|
|
38
|
+
challengeAssertTx: Transaction;
|
|
39
|
+
/** Authoritative Assert transaction, already bound to the depositor's Claim */
|
|
40
|
+
assertTx: Transaction;
|
|
41
|
+
/** Which half `challengeAssertTx` claims to be */
|
|
42
|
+
half: ChallengeAssertHalf;
|
|
43
|
+
/** The challenger's index in the hex-sorted local ∪ universal challenger set */
|
|
44
|
+
challengerIndex: number;
|
|
45
|
+
/** Number of local plus universal challengers (K) */
|
|
46
|
+
challengerCount: number;
|
|
47
|
+
/** The challenger's x-only public key (hex) */
|
|
48
|
+
challengerPubkey: string;
|
|
49
|
+
/** ChallengeAssert output connector scriptPubKey for this challenger (hex) */
|
|
50
|
+
outputConnectorScriptPubKey: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Require a VP-supplied ChallengeAssertX/Y to be exactly the transaction
|
|
54
|
+
* btc-vault builds for this challenger from the authoritative Assert.
|
|
55
|
+
*
|
|
56
|
+
* NoPayout spends output 0 of both ChallengeAsserts, and the depositor's
|
|
57
|
+
* NoPayout signature commits to their txids. The protocol collects no claimer
|
|
58
|
+
* signature on a ChallengeAssert, so that commitment is all that forces a
|
|
59
|
+
* challenger to broadcast the canonical one. A parent that does not spend this
|
|
60
|
+
* Assert, or whose output 0 is not the timelocked connector, would let a
|
|
61
|
+
* colluding challenger spend Assert:0 through NoPayout without the dispute
|
|
62
|
+
* that the claimer can answer with WronglyChallenged.
|
|
63
|
+
*
|
|
64
|
+
* The transaction is fully determined by the Assert, the challenger's sorted
|
|
65
|
+
* index and the connector script, so it is rebuilt here and compared by txid,
|
|
66
|
+
* which covers every non-witness byte.
|
|
67
|
+
*
|
|
68
|
+
* @param params - The supplied transaction and the authoritative inputs
|
|
69
|
+
* @throws If the challenger index is out of range, the Assert lacks the
|
|
70
|
+
* connector output, or the supplied transaction is not the canonical one
|
|
71
|
+
*/
|
|
72
|
+
export declare function assertChallengeAssertIsCanonical(params: AssertChallengeAssertIsCanonicalParams): void;
|
|
30
73
|
//# sourceMappingURL=challengeAssert.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"challengeAssert.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/challengeAssert.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"challengeAssert.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/challengeAssert.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EACL,KAAK,8BAA8B,EAGpC,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAQ,WAAW,EAAE,MAAM,eAAe,CAAC;AAiBlD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,iDAAiD;IACjD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,qFAAqF;IACrF,WAAW,EAAE,MAAM,CAAC;IACpB,wFAAwF;IACxF,uBAAuB,EAAE,8BAA8B,EAAE,CAAC;CAC3D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,wBAAwB,CAC5C,MAAM,EAAE,qBAAqB,GAC5B,OAAO,CAAC,MAAM,CAAC,CA+EjB;AAED,gEAAgE;AAChE,MAAM,MAAM,mBAAmB,GAAG,GAAG,GAAG,GAAG,CAAC;AAE5C;;GAEG;AACH,MAAM,WAAW,sCAAsC;IACrD,2EAA2E;IAC3E,iBAAiB,EAAE,WAAW,CAAC;IAC/B,+EAA+E;IAC/E,QAAQ,EAAE,WAAW,CAAC;IACtB,kDAAkD;IAClD,IAAI,EAAE,mBAAmB,CAAC;IAC1B,gFAAgF;IAChF,eAAe,EAAE,MAAM,CAAC;IACxB,qDAAqD;IACrD,eAAe,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,gBAAgB,EAAE,MAAM,CAAC;IACzB,8EAA8E;IAC9E,2BAA2B,EAAE,MAAM,CAAC;CACrC;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sCAAsC,GAC7C,IAAI,CASN"}
|
|
@@ -27,8 +27,9 @@ export declare const DEPOSITOR_SIGNED_INPUT_COUNT = 1;
|
|
|
27
27
|
/** PegIn vault output index spent by the depositor's Payout input 0. */
|
|
28
28
|
export declare const PEGIN_VAULT_OUTPUT_INDEX = 0;
|
|
29
29
|
/**
|
|
30
|
-
* Assert output index spent by the Payout's
|
|
31
|
-
* ({@link PAYOUT_ASSERT_INPUT_INDEX} carries the signing regimes)
|
|
30
|
+
* Assert output index of the Payout/NoPayout connector, spent by the Payout's
|
|
31
|
+
* input 1 ({@link PAYOUT_ASSERT_INPUT_INDEX} carries the signing regimes) and
|
|
32
|
+
* by every NoPayout's input 0.
|
|
32
33
|
*/
|
|
33
34
|
export declare const ASSERT_PAYOUT_OUTPUT_INDEX = 0;
|
|
34
35
|
/** Payout input that spends the Vault UTXO (PegIn:{@link PEGIN_VAULT_OUTPUT_INDEX}); the depositor signs it in both regimes. */
|
|
@@ -139,6 +140,53 @@ export declare const NON_VP_CLAIMER_PAYOUT_OUTPUT_COUNT = 2;
|
|
|
139
140
|
* @see btc-vault crates/vault/docs/btc-transactions-spec.md (ChallengeAssertX / ChallengeAssertY)
|
|
140
141
|
*/
|
|
141
142
|
export declare const CHALLENGE_ASSERT_CONNECTORS_PER_CHALLENGER = 2;
|
|
143
|
+
/**
|
|
144
|
+
* First Assert output holding a per-challenger ChallengeAssert connector.
|
|
145
|
+
* ConnectorX for sorted challenger `i` is at `1 + i`, ConnectorY at
|
|
146
|
+
* `1 + K + i` (K = local + universal challengers), per btc-vault
|
|
147
|
+
* `crates/vault/src/transactions/challenge_assert.rs:165,180` @ b534ff9e.
|
|
148
|
+
*/
|
|
149
|
+
export declare const ASSERT_FIRST_CHALLENGER_CONNECTOR_VOUT = 1;
|
|
150
|
+
/**
|
|
151
|
+
* Assert outputs besides the challenger connectors: output 0 (Payout /
|
|
152
|
+
* NoPayout / CouncilNoPayout connector) and the claimer's CPFP anchor, last
|
|
153
|
+
* (btc-vault `crates/vault/src/transactions/assert.rs:7-13` @ b534ff9e).
|
|
154
|
+
*/
|
|
155
|
+
export declare const ASSERT_NON_CHALLENGER_OUTPUT_COUNT = 2;
|
|
156
|
+
/**
|
|
157
|
+
* First `vaultCoreVersion` whose Assert carries the RFC-008 marker
|
|
158
|
+
* `OP_RETURN` before the anchor. Matches `FIRST_MARKER_CORE_VERSION` in
|
|
159
|
+
* btc-vault `crates/vault/src/assert_marker.rs:48` @ b534ff9e; the graph-v1
|
|
160
|
+
* pin (2c1177ec) predates the marker.
|
|
161
|
+
*/
|
|
162
|
+
export declare const ASSERT_MARKER_FIRST_VAULT_CORE_VERSION = 2;
|
|
163
|
+
/**
|
|
164
|
+
* ChallengeAssertX/Y literals btc-vault builds deterministically
|
|
165
|
+
* (`build_challenge_assert_tx`, `crates/vault/src/transactions/challenge_assert.rs:49-96`
|
|
166
|
+
* @ b534ff9e, identical at the 2c1177ec and 27c0062b pins): nVersion 3 with
|
|
167
|
+
* zero fee, `LockTime::ZERO`, one input at `Sequence::MAX`, and a
|
|
168
|
+
* `DUST_AMOUNT` CPFP anchor to the challenger's BIP-86 key as output 1.
|
|
169
|
+
* Output 0 is the ChallengeAssert output connector, worth the spent Assert
|
|
170
|
+
* output minus the anchor.
|
|
171
|
+
*/
|
|
172
|
+
export declare const CHALLENGE_ASSERT_TX_VERSION = 3;
|
|
173
|
+
export declare const CHALLENGE_ASSERT_TX_LOCKTIME = 0;
|
|
174
|
+
export declare const CHALLENGE_ASSERT_INPUT_SEQUENCE = 4294967295;
|
|
175
|
+
export declare const CHALLENGE_ASSERT_ANCHOR_VALUE_SATS = 546;
|
|
176
|
+
/**
|
|
177
|
+
* NoPayout literals from `NoPayoutTx::new`
|
|
178
|
+
* (`crates/vault/src/transactions/nopayout.rs:148-209` @ b534ff9e):
|
|
179
|
+
* `Version::TWO`, `LockTime::ZERO`, Assert:0 at `Sequence::MAX` as input 0,
|
|
180
|
+
* then ChallengeAssertX:0 and ChallengeAssertY:0, each with the
|
|
181
|
+
* `timelockChallengeAssert` CSV as its sequence.
|
|
182
|
+
*/
|
|
183
|
+
export declare const NOPAYOUT_TX_VERSION = 2;
|
|
184
|
+
export declare const NOPAYOUT_TX_LOCKTIME = 0;
|
|
185
|
+
export declare const NOPAYOUT_ASSERT_INPUT_SEQUENCE = 4294967295;
|
|
186
|
+
/** NoPayout input count: Assert:0, ChallengeAssertX:0, ChallengeAssertY:0. */
|
|
187
|
+
export declare const NOPAYOUT_INPUT_COUNT = 3;
|
|
188
|
+
/** ChallengeAssert output NoPayout spends (`CHALLENGE_ASSERT_OUTPUT_CONNECTOR_INDEX`). */
|
|
189
|
+
export declare const CHALLENGE_ASSERT_OUTPUT_CONNECTOR_INDEX = 0;
|
|
142
190
|
/**
|
|
143
191
|
* Exclusive upper bound on VP commission (bps). Matches
|
|
144
192
|
* `VPKeyRegistryLogic.sol` (`commissionBps >= 10000` reverts).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;GAMG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C,wEAAwE;AACxE,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,IAAI,CAAC;AAE5C,gIAAgI;AAChI,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C,yKAAyK;AACzK,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAC;AAE1C;;;GAGG;AACH,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAE9C;;;;;;;GAOG;AACH,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAE3C,iEAAiE;AACjE,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;GAIG;AACH,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD;;;GAGG;AACH,eAAO,MAAM,yBAAyB,MAAM,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC;;;GAGG;AACH,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,uEAAuE;AACvE,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAEzC,6EAA6E;AAC7E,eAAO,MAAM,6BAA6B,IAAI,CAAC;AAE/C,2EAA2E;AAC3E,eAAO,MAAM,iBAAiB,IAAI,CAAC;AAEnC,8DAA8D;AAC9D,eAAO,MAAM,oBAAoB,aAAa,CAAC;AAE/C;;;GAGG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,IAAI,CAAC;AACnC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC;;;;;;;;;GASG;AACH,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAEjD,sFAAsF;AACtF,eAAO,MAAM,8BAA8B,IAAI,CAAC;AAEhD,+EAA+E;AAC/E,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;;GAMG;AACH,eAAO,MAAM,0CAA0C,IAAI,CAAC;AAE5D;;;;;GAKG;AACH,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD;;;;GAIG;AACH,eAAO,MAAM,kCAAkC,IAAI,CAAC;AAEpD;;;;;GAKG;AACH,eAAO,MAAM,sCAAsC,IAAI,CAAC;AAExD;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAC7C,eAAO,MAAM,4BAA4B,IAAI,CAAC;AAC9C,eAAO,MAAM,+BAA+B,aAAa,CAAC;AAC1D,eAAO,MAAM,kCAAkC,MAAM,CAAC;AAEtD;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,IAAI,CAAC;AACrC,eAAO,MAAM,oBAAoB,IAAI,CAAC;AACtC,eAAO,MAAM,8BAA8B,aAAa,CAAC;AAEzD,8EAA8E;AAC9E,eAAO,MAAM,oBAAoB,IAAI,CAAC;AAEtC,0FAA0F;AAC1F,eAAO,MAAM,uCAAuC,IAAI,CAAC;AAEzD;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,QAAS,CAAC;AAEtD;;;;;GAKG;AACH,eAAO,MAAM,eAAe,QAAS,CAAC;AAEtC;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,MAAM,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AssertPayoutNoPayoutConnectorParams, Network } from '../../wasm';
|
|
2
|
+
import { Transaction } from 'bitcoinjs-lib';
|
|
2
3
|
/**
|
|
3
4
|
* Parameters for building a NoPayout PSBT
|
|
4
5
|
*/
|
|
@@ -43,4 +44,45 @@ export declare function buildNoPayoutPsbt(params: NoPayoutParams): Promise<strin
|
|
|
43
44
|
* scriptPubKey for the challenger
|
|
44
45
|
*/
|
|
45
46
|
export declare function assertNoPayoutOutputMatchesChallenger(noPayoutTxHex: string, challengerPubkey: string, network: Network): void;
|
|
47
|
+
/**
|
|
48
|
+
* Parameters for {@link assertCanonicalNoPayoutShape}
|
|
49
|
+
*/
|
|
50
|
+
export interface AssertCanonicalNoPayoutShapeParams {
|
|
51
|
+
/** The NoPayout transaction the VP supplied */
|
|
52
|
+
noPayoutTx: Transaction;
|
|
53
|
+
/** Authoritative Assert txid (display hex) */
|
|
54
|
+
assertTxid: string;
|
|
55
|
+
/** Canonical ChallengeAssertX txid (display hex) */
|
|
56
|
+
challengeAssertXTxid: string;
|
|
57
|
+
/** Canonical ChallengeAssertY txid (display hex) */
|
|
58
|
+
challengeAssertYTxid: string;
|
|
59
|
+
/** ChallengeAssert CSV timelock in blocks (offchain param `timelockChallengeAssert`) */
|
|
60
|
+
timelockChallengeAssert: number;
|
|
61
|
+
/** Values of Assert:0, ChallengeAssertX:0 and ChallengeAssertY:0, in input order */
|
|
62
|
+
prevoutValues: readonly [number, number, number];
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Require a VP-supplied NoPayout to have the shape btc-vault `NoPayoutTx::new`
|
|
66
|
+
* builds over the canonical parents
|
|
67
|
+
* (`crates/vault/src/transactions/nopayout.rs:148-209` @ b534ff9e): version 2,
|
|
68
|
+
* locktime 0, and exactly the inputs Assert:0, ChallengeAssertX:0 and
|
|
69
|
+
* ChallengeAssertY:0, in that order, with sequences `0xffffffff`, `t`, `t`.
|
|
70
|
+
*
|
|
71
|
+
* The depositor's signature commits to every one of these fields. The
|
|
72
|
+
* challenge window itself is enforced by the ChallengeAssert output connector's
|
|
73
|
+
* NoPayout leaf (`<challenger> CHECKSIGVERIFY <t> CSV`), which the txid binding
|
|
74
|
+
* of both parents pins: a NoPayout with a shorter or disabled sequence, or
|
|
75
|
+
* below version 2, fails that CSV and is invalid rather than early. Pinning the
|
|
76
|
+
* inputs, sequences, version and locktime to btc-vault's layout keeps the
|
|
77
|
+
* signature on a NoPayout that satisfies that CSV. The output value is not
|
|
78
|
+
* pinned to btc-vault's (the inputs minus its fee); it is only required not to
|
|
79
|
+
* exceed the inputs, since a larger output could never be valid. The output
|
|
80
|
+
* script is checked by {@link assertNoPayoutOutputMatchesChallenger}.
|
|
81
|
+
*
|
|
82
|
+
* @param params - The supplied NoPayout and the authoritative parents
|
|
83
|
+
* @throws If any input, sequence, version or locktime differs from the
|
|
84
|
+
* canonical layout, the timelock is not a valid relative timelock, or the
|
|
85
|
+
* output value exceeds the inputs
|
|
86
|
+
*/
|
|
87
|
+
export declare function assertCanonicalNoPayoutShape(params: AssertCanonicalNoPayoutShapeParams): void;
|
|
46
88
|
//# sourceMappingURL=noPayout.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noPayout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/noPayout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,OAAO,EAGb,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"noPayout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/noPayout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EACL,KAAK,mCAAmC,EACxC,KAAK,OAAO,EAGb,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAQ,WAAW,EAAY,MAAM,eAAe,CAAC;AAsB5D;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,wGAAwG;IACxG,QAAQ,EAAE,KAAK,CAAC;QAAE,aAAa,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC1D,0DAA0D;IAC1D,eAAe,EAAE,mCAAmC,CAAC;CACtD;AAED;;;;;;;;GAQG;AACH,wBAAsB,iBAAiB,CACrC,MAAM,EAAE,cAAc,GACrB,OAAO,CAAC,MAAM,CAAC,CA6DjB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,OAAO,GACf,IAAI,CAyBN;AAED;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,+CAA+C;IAC/C,UAAU,EAAE,WAAW,CAAC;IACxB,8CAA8C;IAC9C,UAAU,EAAE,MAAM,CAAC;IACnB,oDAAoD;IACpD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,oDAAoD;IACpD,oBAAoB,EAAE,MAAM,CAAC;IAC7B,wFAAwF;IACxF,uBAAuB,EAAE,MAAM,CAAC;IAChC,oFAAoF;IACpF,aAAa,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CAClD;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,kCAAkC,GACzC,IAAI,CAqEN"}
|
|
@@ -119,4 +119,54 @@ export interface ActivateVaultAndRedeemInput<R extends EthContractWriteResult =
|
|
|
119
119
|
* @throws `AbortError` / caller-provided abort reason if `signal` aborts
|
|
120
120
|
*/
|
|
121
121
|
export declare function activateVaultAndRedeem<R extends EthContractWriteResult = EthContractWriteResult>(input: ActivateVaultAndRedeemInput<R>): Promise<R>;
|
|
122
|
+
export interface ClaimExpiredVaultInput<R extends EthContractWriteResult = EthContractWriteResult> {
|
|
123
|
+
/** BTCVaultRegistry contract address (env-specific). */
|
|
124
|
+
btcVaultRegistryAddress: Address;
|
|
125
|
+
/** Vault ID (bytes32, 0x-prefixed). */
|
|
126
|
+
vaultId: Hex;
|
|
127
|
+
/**
|
|
128
|
+
* HTLC secret preimage (bytes32). A missing `0x` prefix or an uppercase
|
|
129
|
+
* `0X` prefix is normalised before validation.
|
|
130
|
+
*/
|
|
131
|
+
secret: string;
|
|
132
|
+
/**
|
|
133
|
+
* The vault's on-chain hashlock. Required, unlike the activation entry
|
|
134
|
+
* points: the claim is offered only after the secret is presumed leaked, and
|
|
135
|
+
* the SDK still refuses to place a secret in calldata that does not match
|
|
136
|
+
* the commitment it reveals against.
|
|
137
|
+
*/
|
|
138
|
+
hashlock: Hex;
|
|
139
|
+
/** Caller-provided write callback — see {@link EthContractWriter}. */
|
|
140
|
+
writeContract: EthContractWriter<R>;
|
|
141
|
+
/**
|
|
142
|
+
* Optional abort signal. Checked before validation runs; since validation
|
|
143
|
+
* is fully synchronous, cancellation between validation and the write is
|
|
144
|
+
* not observable and callers should rely on the transport's own
|
|
145
|
+
* cancellation support for that window.
|
|
146
|
+
*/
|
|
147
|
+
signal?: AbortSignal;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* Claim an expired vault: reveal the HTLC secret for a vault that reached
|
|
151
|
+
* Verified but expired before activation, moving it to Redeemed so the BTC is
|
|
152
|
+
* claimed out of the PegIn on Bitcoin to the vault provider and depositor keys
|
|
153
|
+
* recorded on chain.
|
|
154
|
+
*
|
|
155
|
+
* This is the only exit for a vault whose Pre-PegIn HTLC was spent by the
|
|
156
|
+
* PegIn after expiry, which removes the depositor's refund path. The contract
|
|
157
|
+
* (`claimExpiredVault`) accepts it from any caller, requires status Expired
|
|
158
|
+
* with `verifiedAt > 0`, rejects it after the vault's `claimExpiredUntil`
|
|
159
|
+
* block, and checks `sha256(s) == hashlock`.
|
|
160
|
+
*
|
|
161
|
+
* Revealing the secret while the HTLC is still unspent lets anyone broadcast
|
|
162
|
+
* the PegIn and race the depositor's own refund. Callers must offer this only
|
|
163
|
+
* once the PegIn has spent the HTLC.
|
|
164
|
+
*
|
|
165
|
+
* @throws `Error` if `btcVaultRegistryAddress` is not a valid 20-byte address
|
|
166
|
+
* @throws `Error` if `vaultId`, `secret` or `hashlock` is not a valid 32-byte
|
|
167
|
+
* hex, or if `sha256(secret) != hashlock`
|
|
168
|
+
* @throws whatever the injected `writeContract` throws
|
|
169
|
+
* @throws `AbortError` / caller-provided abort reason if `signal` aborts
|
|
170
|
+
*/
|
|
171
|
+
export declare function claimExpiredVault<R extends EthContractWriteResult = EthContractWriteResult>(input: ClaimExpiredVaultInput<R>): Promise<R>;
|
|
122
172
|
//# sourceMappingURL=activateVault.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activateVault.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/activateVault.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AA2CpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,IAAI,CACzF,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhB,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB;IAEzD,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,uCAAuC;IACvC,OAAO,EAAE,GAAG,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf;;;;;OAKG;IACH,kBAAkB,EAAE,GAAG,CAAC;IACxB,sEAAsE;IACtE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;
|
|
1
|
+
{"version":3,"file":"activateVault.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/activateVault.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AA2CpD;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,GAAG,CAAC;IACT,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,OAAO,EAAE,CAAC;CAC1B;AAED;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,EAAE,IAAI,CAAC;CACvB;AAED;;;;GAIG;AACH,MAAM,MAAM,iBAAiB,CAAC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,IAAI,CACzF,IAAI,EAAE,oBAAoB,KACvB,OAAO,CAAC,CAAC,CAAC,CAAC;AAEhB,MAAM,WAAW,kBAAkB,CACjC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB;IAEzD,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,uCAAuC;IACvC,OAAO,EAAE,GAAG,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf;;;;;OAKG;IACH,kBAAkB,EAAE,GAAG,CAAC;IACxB,sEAAsE;IACtE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAoCD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAsB,aAAa,CACjC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EACzD,KAAK,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CA2B1C;AAED,MAAM,WAAW,2BAA2B,CAC1C,CAAC,SAAS,sBAAsB,GAAG,sBAAsB;IAEzD,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,uCAAuC;IACvC,OAAO,EAAE,GAAG,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,QAAQ,CAAC,EAAE,GAAG,CAAC;IACf,sEAAsE;IACtE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,sBAAsB,CAC1C,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EACzD,KAAK,EAAE,2BAA2B,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAmBnD;AAED,MAAM,WAAW,sBAAsB,CACrC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB;IAEzD,wDAAwD;IACxD,uBAAuB,EAAE,OAAO,CAAC;IACjC,uCAAuC;IACvC,OAAO,EAAE,GAAG,CAAC;IACb;;;OAGG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,QAAQ,EAAE,GAAG,CAAC;IACd,sEAAsE;IACtE,aAAa,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC;IACpC;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,iBAAiB,CACrC,CAAC,SAAS,sBAAsB,GAAG,sBAAsB,EACzD,KAAK,EAAE,sBAAsB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAuB9C"}
|
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module services/activation
|
|
5
5
|
*/
|
|
6
|
-
export { activateVault, activateVaultAndRedeem, type ActivateVaultAndRedeemInput, type ActivateVaultInput, type EthContractWriteCall, type EthContractWriteResult, type EthContractWriter, } from './activateVault';
|
|
6
|
+
export { activateVault, activateVaultAndRedeem, type ActivateVaultAndRedeemInput, type ActivateVaultInput, claimExpiredVault, type ClaimExpiredVaultInput, type EthContractWriteCall, type EthContractWriteResult, type EthContractWriter, } from './activateVault';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/activation/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACvB,iBAAiB,EACjB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
|
package/dist/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Watchtower artifact assembly and verification through the real WASM, on a
|
|
3
|
+
* graph-v3 vault generated by btc-vault's own test recipe (see
|
|
4
|
+
* `fixtures/watchtowerArtifactsV3/README.md`). The other delegated-claim tests
|
|
5
|
+
* mock the WASM boundary, so this is the one place the SDK's reading of an
|
|
6
|
+
* unjoined or joined `babe_sessions` map meets the Rust builder and verifier.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=realWasmWatchtowerArtifacts.test.d.ts.map
|
package/dist/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"realWasmWatchtowerArtifacts.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/services/delegated-claim/__tests__/realWasmWatchtowerArtifacts.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -24,13 +24,11 @@ export interface AssembleWatchtowerArtifactsParams {
|
|
|
24
24
|
* Per-challenger BaBe sessions as `{"<pk>": {"decryptor_artifacts_hex":
|
|
25
25
|
* "..."}}`, passed through into the file unchanged.
|
|
26
26
|
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* and joins the real sessions into the file downstream —
|
|
33
|
-
* `assertArtifactsUsableForVault` refuses a file that still carries one.
|
|
27
|
+
* Omit it to build an unjoined file: real sessions run to hundreds of
|
|
28
|
+
* megabytes per challenger, too large for a browser tab. An unjoined file
|
|
29
|
+
* cannot answer a challenge, so join the sessions in before starting a
|
|
30
|
+
* claim from it (see {@link BabeSessionsState}). A map that is passed must
|
|
31
|
+
* cover exactly the graph's challengers (btc-vault `validate_babe_sessions`).
|
|
34
32
|
*/
|
|
35
33
|
babeSessionsJson?: string;
|
|
36
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"assembleWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,iEAAiE;IACjE,SAAS,EAAE,aAAa,CAAC;IACzB,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oEAAoE;IACpE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC
|
|
1
|
+
{"version":3,"file":"assembleWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/assembleWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAK7D,OAAO,KAAK,EACV,sBAAsB,EACtB,0BAA0B,EAC3B,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,MAAM,WAAW,iCAAiC;IAChD,iEAAiE;IACjE,SAAS,EAAE,aAAa,CAAC;IACzB,6DAA6D;IAC7D,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oEAAoE;IACpE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC;;;;;;;;;OASG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B;;;;OAIG;IACH,YAAY,CAAC,EAAE,iBAAiB,CAAC;CAClC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,2BAA2B,CAC/C,MAAM,EAAE,iCAAiC,GACxC,OAAO,CAAC,MAAM,CAAC,CAcjB"}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
*
|
|
12
12
|
* Produces and checks the two files a claim runs from: `artifacts.json` and
|
|
13
13
|
* `wots_keypair.json`. `vaultd vp wt` reads the same pair, so either can drive
|
|
14
|
-
* the claim.
|
|
14
|
+
* the claim once the BaBe sessions are joined into `artifacts.json`.
|
|
15
15
|
*
|
|
16
16
|
* Signing is split into plan → sign → assemble so a hardware wallet can sign
|
|
17
17
|
* the set as ordered device ceremonies (Assert and the depositor Payout under
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
* and nothing here watches the chain — a ChallengeAssert must be answered
|
|
34
34
|
* inside `timelock_challenge_assert`, and noticing one is the caller's job.
|
|
35
35
|
*
|
|
36
|
-
* @see btc-vault docs/delegated_claim.md
|
|
36
|
+
* @see btc-vault docs/operations/delegated_claim.md
|
|
37
37
|
* @module services/delegated-claim
|
|
38
38
|
*/
|
|
39
39
|
export { assembleWatchtowerArtifacts, type AssembleWatchtowerArtifactsParams, } from './assembleWatchtowerArtifacts';
|
|
@@ -47,8 +47,7 @@ export { planDelegatedClaimSigning, type PlanDelegatedClaimSigningParams, } from
|
|
|
47
47
|
export { readDelegatedClaimVaultContext, type DelegatedClaimVaultRead, type DelegatedClaimVaultReaders, type ReadDelegatedClaimVaultContextParams, } from './readDelegatedClaimVaultContext';
|
|
48
48
|
export { ArtifactsVaultMismatchError, DELEGATED_CLAIM_TX_GRAPH_VERSION, assertArtifactsUsableForVault, summarizeWatchtowerArtifacts, type AssertArtifactsUsableParams, } from './readWatchtowerArtifacts';
|
|
49
49
|
export { DelegatedClaimSigningIncompleteError, assertTermsMatchVault, signDelegatedClaimPlan, type DelegatedClaimPsbtSigner, type SignDelegatedClaimPlanOptions, } from './signDelegatedClaimPlan';
|
|
50
|
-
export {
|
|
51
|
-
export type { ClaimerArtifactsSource, DelegatedClaimSignatures, DelegatedClaimSigningKind, DelegatedClaimSigningPlan, DelegatedClaimSigningRequest, DelegatedClaimVaultContext, WatchtowerArtifactsSummary, } from './types';
|
|
50
|
+
export type { BabeSessionsState, ClaimerArtifactsSource, DelegatedClaimSignatures, DelegatedClaimSigningKind, DelegatedClaimSigningPlan, DelegatedClaimSigningRequest, DelegatedClaimVaultContext, WatchtowerArtifactsSummary, } from './types';
|
|
52
51
|
export { VaultIdBindingError, assertClaimSpendsVault, type AssertClaimSpendsVaultParams, } from './vaultIdBinding';
|
|
53
52
|
/**
|
|
54
53
|
* Claim-time execution, artifacts in and artifacts out.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,GACvC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,yCAAyC,EACzC,KAAK,4BAA4B,GAClC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,KAAK,sCAAsC,GAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,GAC1C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,EAC7B,4BAA4B,EAC5B,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oCAAoC,EACpC,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC,MAAM,0BAA0B,CAAC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EACL,2BAA2B,EAC3B,KAAK,iCAAiC,GACvC,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,wBAAwB,EACxB,yCAAyC,EACzC,KAAK,4BAA4B,GAClC,MAAM,6CAA6C,CAAC;AACrD,OAAO,EACL,kBAAkB,EAClB,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,0BAA0B,EAC1B,+BAA+B,EAC/B,KAAK,qCAAqC,GAC3C,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,8BAA8B,GACpC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,sBAAsB,EACtB,gCAAgC,EAChC,KAAK,sCAAsC,GAC5C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACvB,KAAK,6BAA6B,GACnC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,yBAAyB,EACzB,KAAK,+BAA+B,GACrC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,8BAA8B,EAC9B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,oCAAoC,GAC1C,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,6BAA6B,EAC7B,4BAA4B,EAC5B,KAAK,2BAA2B,GACjC,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oCAAoC,EACpC,qBAAqB,EACrB,sBAAsB,EACtB,KAAK,wBAAwB,EAC7B,KAAK,6BAA6B,GACnC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,iBAAiB,EACjB,sBAAsB,EACtB,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,4BAA4B,EAC5B,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,SAAS,CAAC;AACjB,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,4BAA4B,GAClC,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,yBAAyB,EACzB,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"planDelegatedClaimSigning.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/planDelegatedClaimSigning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAkBrE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"planDelegatedClaimSigning.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/planDelegatedClaimSigning.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAkBrE,OAAO,EAEL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,0BAA0B,EAEhC,MAAM,SAAS,CAAC;AAQjB,oBAAoB;AACpB,MAAM,WAAW,+BAA+B;IAC9C;;;;OAIG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B,0EAA0E;IAC1E,UAAU,EAAE,OAAO,CAAC;IACpB,mEAAmE;IACnE,MAAM,EAAE,sBAAsB,CAAC;IAC/B,oEAAoE;IACpE,sBAAsB,EAAE,MAAM,CAAC;IAC/B,KAAK,EAAE,0BAA0B,CAAC;IAClC,sEAAsE;IACtE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;GAOG;AACH,wBAAsB,iBAAiB,CACrC,cAAc,EAAE,MAAM,EACtB,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,0BAA0B,EACjC,kBAAkB,EAAE,MAAM,GACzB,OAAO,CAAC,qBAAqB,CAAC,CAmHhC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,+BAA+B,GACtC,OAAO,CAAC,yBAAyB,CAAC,CA6BpC"}
|
|
@@ -51,15 +51,15 @@ export interface AssertArtifactsUsableParams {
|
|
|
51
51
|
* The Groth16 verifying key for the vault's `proverCircuitVersion`, from
|
|
52
52
|
* the `vault-provers` release or the prover service — never from the vault
|
|
53
53
|
* provider or anything it serves (btc-vault `delegated_claim.rs:405-414`
|
|
54
|
-
* @
|
|
54
|
+
* @ b534ff9e). A file carrying a different key proves nothing at Assert.
|
|
55
55
|
*/
|
|
56
56
|
trustedVerifyingKeyHex: string;
|
|
57
57
|
/**
|
|
58
58
|
* The vault's stamped `proverCircuitVersion`, from
|
|
59
59
|
* `DelegatedClaimVaultContext`. btc-vault's verifier never reads the
|
|
60
|
-
* file's own `prover_circuit_version` — `delegated_claim.rs:
|
|
60
|
+
* file's own `prover_circuit_version` — `delegated_claim.rs:876` @ b534ff9e
|
|
61
61
|
* only writes it — while `vaultd`'s
|
|
62
|
-
* `crates/vaultd/src/cli/command/watchtower/start_claim.rs:
|
|
62
|
+
* `crates/vaultd/src/cli/command/watchtower/start_claim.rs:348-352` hands
|
|
63
63
|
* the file's key and version to the prover together, so a wrong version
|
|
64
64
|
* fails there, before Assert.
|
|
65
65
|
*/
|
|
@@ -68,7 +68,7 @@ export interface AssertArtifactsUsableParams {
|
|
|
68
68
|
* The block of the vault's finalized `VaultClaimableBy` event, from
|
|
69
69
|
* `DelegatedClaimVaultContext.claimableEventBlockNumber`. Unverified by
|
|
70
70
|
* btc-vault like the circuit version, and handed to the prover beside it
|
|
71
|
-
* (`start_claim.rs:
|
|
71
|
+
* (`start_claim.rs:349,352` @ b534ff9e), so a wrong block fails there too.
|
|
72
72
|
*/
|
|
73
73
|
expectedClaimableEventBlockNumber: bigint;
|
|
74
74
|
/**
|
|
@@ -81,6 +81,10 @@ export interface AssertArtifactsUsableParams {
|
|
|
81
81
|
/**
|
|
82
82
|
* Verifies an artifacts file and confirms it is the one for this vault.
|
|
83
83
|
*
|
|
84
|
+
* An unjoined file passes, with `babeSessions.joined` false. It cannot
|
|
85
|
+
* answer a challenge, so a caller must not start a claim from it by any
|
|
86
|
+
* route until the sessions are joined in (see {@link BabeSessionsState}).
|
|
87
|
+
*
|
|
84
88
|
* Experimental: this API can change in a minor release. Pin the SDK
|
|
85
89
|
* version if you build on it.
|
|
86
90
|
*
|
|
@@ -89,10 +93,12 @@ export interface AssertArtifactsUsableParams {
|
|
|
89
93
|
* belongs to another vault whatever the file says, a plain error when
|
|
90
94
|
* its `prover_circuit_version` is not `expectedProverCircuitVersion`,
|
|
91
95
|
* its `claimable_event_block_number` is not
|
|
92
|
-
* `expectedClaimableEventBlockNumber`,
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
* bundled signature does not hold
|
|
96
|
+
* `expectedClaimableEventBlockNumber`, its `verifying_key` is not
|
|
97
|
+
* `trustedVerifyingKeyHex`, or a `babe_sessions` entry is not
|
|
98
|
+
* non-empty hex, or a
|
|
99
|
+
* verification error when any bundled signature does not hold
|
|
100
|
+
* against that graph or a non-empty `babe_sessions` does not cover
|
|
101
|
+
* exactly its challengers.
|
|
96
102
|
* @experimental
|
|
97
103
|
*/
|
|
98
104
|
export declare function assertArtifactsUsableForVault(params: AssertArtifactsUsableParams): Promise<WatchtowerArtifactsSummary>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/readWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"readWatchtowerArtifacts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/delegated-claim/readWatchtowerArtifacts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAMH,OAAO,KAAK,EAAqB,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAQ7E;;;;;GAKG;AACH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD;;;;GAIG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IAElD,QAAQ,CAAC,eAAe,EAAE,MAAM;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM;gBADrB,eAAe,EAAE,MAAM,EACvB,aAAa,EAAE,MAAM;CAQjC;AA+CD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,4BAA4B,CAC1C,aAAa,EAAE,MAAM,GACpB,0BAA0B,CA6C5B;AAED;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B;;;;;OAKG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;;;;;;;OAQG;IACH,4BAA4B,EAAE,MAAM,CAAC;IACrC;;;;;OAKG;IACH,iCAAiC,EAAE,MAAM,CAAC;IAC1C;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,2BAA2B,GAClC,OAAO,CAAC,0BAA0B,CAAC,CAwFrC"}
|