@babylonlabs-io/ts-sdk 5.1.0 → 6.0.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/{PayoutManager-BHeiLQ1j.js → PayoutManager-3-MzBVLj.js} +2 -2
- package/dist/{PayoutManager-BHeiLQ1j.js.map → PayoutManager-3-MzBVLj.js.map} +1 -1
- package/dist/{PayoutManager-B5nR0x1t.cjs → PayoutManager-PQqeqX41.cjs} +2 -2
- package/dist/{PayoutManager-B5nR0x1t.cjs.map → PayoutManager-PQqeqX41.cjs.map} +1 -1
- package/dist/{PeginManager-6ghglb4r.cjs → PeginManager-D_ZUfbIy.cjs} +2 -2
- package/dist/{PeginManager-6ghglb4r.cjs.map → PeginManager-D_ZUfbIy.cjs.map} +1 -1
- package/dist/{PeginManager-CXNqbgA4.js → PeginManager-m3IlM4wS.js} +4 -4
- package/dist/{PeginManager-CXNqbgA4.js.map → PeginManager-m3IlM4wS.js.map} +1 -1
- package/dist/{buildAndBroadcastReclaim-Cf05JFP-.cjs → buildAndBroadcastReclaim-CMjlyooo.cjs} +2 -2
- package/dist/{buildAndBroadcastReclaim-Cf05JFP-.cjs.map → buildAndBroadcastReclaim-CMjlyooo.cjs.map} +1 -1
- package/dist/{buildAndBroadcastReclaim-Acz637Vf.js → buildAndBroadcastReclaim-D8l-QJWo.js} +793 -772
- package/dist/{buildAndBroadcastReclaim-Acz637Vf.js.map → buildAndBroadcastReclaim-D8l-QJWo.js.map} +1 -1
- package/dist/{challengeAssert-CuX_8Twt.cjs → challengeAssert-DlzX_kjF.cjs} +2 -2
- package/dist/{challengeAssert-CuX_8Twt.cjs.map → challengeAssert-DlzX_kjF.cjs.map} +1 -1
- package/dist/{challengeAssert-D_lRvsO0.js → challengeAssert-hpOHGPXX.js} +2 -2
- package/dist/{challengeAssert-D_lRvsO0.js.map → challengeAssert-hpOHGPXX.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +312 -309
- package/dist/index.js.map +1 -1
- package/dist/peginState-B4t_PDgj.cjs.map +1 -1
- package/dist/peginState-CXdbSit3.js.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +306 -303
- 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.d.ts +5 -0
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +31 -29
- package/dist/tbv/core/primitives/index.js.map +1 -1
- package/dist/tbv/core/primitives/psbt/__tests__/signetPeginHashlockSpend.fixture.d.ts +19 -0
- package/dist/tbv/core/primitives/psbt/__tests__/signetPeginHashlockSpend.fixture.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/__tests__/verifyPeginHashlockSpend.test.d.ts +9 -0
- package/dist/tbv/core/primitives/psbt/__tests__/verifyPeginHashlockSpend.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/verifyPeginHashlockSpend.d.ts +73 -0
- package/dist/tbv/core/primitives/psbt/verifyPeginHashlockSpend.d.ts.map +1 -0
- package/dist/tbv/core/recovery/reconstructPeginParams.d.ts +6 -0
- package/dist/tbv/core/recovery/reconstructPeginParams.d.ts.map +1 -1
- package/dist/tbv/core/recovery/toRefundInputs.d.ts +0 -2
- package/dist/tbv/core/recovery/toRefundInputs.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/peginState.d.ts +16 -5
- package/dist/tbv/core/services/deposit/peginState.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +74 -73
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts +6 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/core/services/refund/errors.d.ts +15 -0
- package/dist/tbv/core/services/refund/errors.d.ts.map +1 -1
- package/dist/tbv/core/services/refund/index.d.ts +1 -1
- package/dist/tbv/core/services/refund/index.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +306 -303
- package/dist/tbv/index.js.map +1 -1
- package/dist/{toRefundInputs-DwXpKQxN.js → toRefundInputs-D5tx3eeA.js} +152 -152
- package/dist/{toRefundInputs-DwXpKQxN.js.map → toRefundInputs-D5tx3eeA.js.map} +1 -1
- package/dist/{toRefundInputs-BzyN0zvj.cjs → toRefundInputs-Df6eRITl.cjs} +2 -2
- package/dist/{toRefundInputs-BzyN0zvj.cjs.map → toRefundInputs-Df6eRITl.cjs.map} +1 -1
- package/dist/{verifyKeyPathSchnorrSignature-BVrAmVL3.cjs → verifyKeyPathSchnorrSignature-B7Za6aa1.cjs} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-BVrAmVL3.cjs.map → verifyKeyPathSchnorrSignature-B7Za6aa1.cjs.map} +1 -1
- package/dist/{verifyKeyPathSchnorrSignature-CIE3jlVt.js → verifyKeyPathSchnorrSignature-dw7xhm5Y.js} +2 -2
- package/dist/{verifyKeyPathSchnorrSignature-CIE3jlVt.js.map → verifyKeyPathSchnorrSignature-dw7xhm5Y.js.map} +1 -1
- package/dist/verifyPeginHashlockSpend-CdTFR2K6.js +167 -0
- package/dist/verifyPeginHashlockSpend-CdTFR2K6.js.map +1 -0
- package/dist/verifyPeginHashlockSpend-CisfqMuT.cjs +2 -0
- package/dist/verifyPeginHashlockSpend-CisfqMuT.cjs.map +1 -0
- package/dist/{verifyScriptPathSchnorrSignature-DLNGgm4j.js → verifyScriptPathSchnorrSignature-BVGPEZXW.js} +9 -8
- package/dist/{verifyScriptPathSchnorrSignature-DLNGgm4j.js.map → verifyScriptPathSchnorrSignature-BVGPEZXW.js.map} +1 -1
- package/dist/{verifyScriptPathSchnorrSignature-BHskbJJx.cjs → verifyScriptPathSchnorrSignature-p3sVoWQi.cjs} +2 -2
- package/dist/{verifyScriptPathSchnorrSignature-BHskbJJx.cjs.map → verifyScriptPathSchnorrSignature-p3sVoWQi.cjs.map} +1 -1
- package/package.json +1 -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-D_ZUfbIy.cjs"),a=require("../../../PayoutManager-PQqeqX41.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-m3IlM4wS.js";
|
|
2
|
+
import { P } from "../../../PayoutManager-3-MzBVLj.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-p3sVoWQi.cjs"),s=require("../../../secp256k1-DDHQ1_za.cjs"),r=require("../wasm/index.cjs"),a=require("../../../verifyKeyPathSchnorrSignature-B7Za6aa1.cjs"),i=require("../../../challengeAssert-DlzX_kjF.cjs"),n=require("../../../verifyPeginHashlockSpend-CisfqMuT.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.verifyPeginHashlockSpend=n.verifyPeginHashlockSpend;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
|
|
@@ -46,6 +46,9 @@
|
|
|
46
46
|
* - {@link buildNoPayoutPsbt} - Create NoPayout PSBT per challenger (depositor-as-claimer path)
|
|
47
47
|
* - {@link buildChallengeAssertPsbt} - Create ChallengeAssert PSBT (tooling only; not claimer-signed)
|
|
48
48
|
*
|
|
49
|
+
* ### Transaction Verification
|
|
50
|
+
* - {@link verifyPeginHashlockSpend} - Check a served PegIn spends its vault's HTLC with a witness Bitcoin would accept
|
|
51
|
+
*
|
|
49
52
|
* ### Script Generators
|
|
50
53
|
* - {@link createPayoutScript} - Generate taproot payout script
|
|
51
54
|
*
|
|
@@ -100,6 +103,8 @@ export { PsbtSubstitutionError, assertPsbtUnsignedTxMatches, } from './psbt/asse
|
|
|
100
103
|
export type { AssertPsbtUnsignedTxMatchesParams } from './psbt/assertPsbtUnsignedTxMatches';
|
|
101
104
|
export { assertScriptPathSchnorrSignature } from './psbt/verifyScriptPathSchnorrSignature';
|
|
102
105
|
export type { VerifyScriptPathSchnorrSignatureParams } from './psbt/verifyScriptPathSchnorrSignature';
|
|
106
|
+
export { verifyPeginHashlockSpend } from './psbt/verifyPeginHashlockSpend';
|
|
107
|
+
export type { PeginHashlockSpendVerdict, VerifyPeginHashlockSpendParams, } from './psbt/verifyPeginHashlockSpend';
|
|
103
108
|
export { finalizeScriptPathWithSignatures } from './psbt/finalizeScriptPathWithSignatures';
|
|
104
109
|
export type { FinalizeScriptPathWithSignaturesParams } from './psbt/finalizeScriptPathWithSignatures';
|
|
105
110
|
export { assertKeyPathSchnorrSignature, assertReturnedKeyPathSignatures, } from './psbt/verifyKeyPathSchnorrSignature';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { P as s, h as t, i as r, j as i, f as o, b as
|
|
1
|
+
import { P as s, h as t, i as r, j as i, f as o, b as n, a as u, c as P, k as l, d, e as c, g as p } from "../../../verifyScriptPathSchnorrSignature-BVGPEZXW.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 { d as
|
|
6
|
-
import {
|
|
3
|
+
import { computeMinClaimValue as x, computeMinPeginFee as S, deriveVaultId as y, peginP2aAnchorOutput as f, supportedTxGraphVersions as h, 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-dw7xhm5Y.js";
|
|
5
|
+
import { d as K, c as k, a as F, b as R, e as z, f as D, r as M } from "../../../challengeAssert-hpOHGPXX.js";
|
|
6
|
+
import { v as B } from "../../../verifyPeginHashlockSpend-CdTFR2K6.js";
|
|
7
|
+
import { c as U, d as X, a as _, b as j, e as G, f as L, g as W, h as w, i as q, j as J, p as Q, s as Y, t as Z, u as $, v as ee } from "../../../bitcoin-C-TuHb-v.js";
|
|
7
8
|
export {
|
|
8
9
|
s as PEGIN_DEPOSITOR_CLAIM_VOUT,
|
|
9
10
|
t as PsbtSubstitutionError,
|
|
@@ -12,44 +13,45 @@ export {
|
|
|
12
13
|
V as assertReturnedKeyPathSignatures,
|
|
13
14
|
i as assertScriptPathSchnorrSignature,
|
|
14
15
|
g as assertValidVaultCoreVersion,
|
|
15
|
-
|
|
16
|
-
|
|
16
|
+
K as buildChallengeAssertPsbt,
|
|
17
|
+
k as buildNoPayoutPsbt,
|
|
17
18
|
o as buildPayoutPsbt,
|
|
18
19
|
C as buildPeginInputPsbt,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
n as buildPeginTxFromFundedPrePegin,
|
|
21
|
+
u as buildPrePeginPsbt,
|
|
22
|
+
F as buildReclaimPsbt,
|
|
23
|
+
R as buildRefundPsbt,
|
|
24
|
+
U as canonicalizeBtcPubkey,
|
|
24
25
|
x as computeMinClaimValue,
|
|
25
26
|
S as computeMinPeginFee,
|
|
26
27
|
P as computeNumLocalChallengers,
|
|
27
28
|
l as createPayoutScript,
|
|
28
|
-
|
|
29
|
+
X as deriveBip86ScriptPubKeyHex,
|
|
29
30
|
d as deriveDepositorClaimDescriptor,
|
|
30
31
|
c as deriveDepositorClaimScriptPubKey,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
_ as deriveNativeSegwitAddress,
|
|
33
|
+
j as deriveTaprootAddress,
|
|
33
34
|
y as deriveVaultId,
|
|
34
|
-
|
|
35
|
+
G as ensureHexPrefix,
|
|
35
36
|
z as estimateReclaimFeeSats,
|
|
36
|
-
|
|
37
|
+
p as extractPayoutSignature,
|
|
37
38
|
I as extractPeginInputSignature,
|
|
38
39
|
O as finalizePeginInputPsbt,
|
|
39
40
|
D as finalizeScriptPathWithSignatures,
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
41
|
+
L as formatSatoshisToBtc,
|
|
42
|
+
W as getSortedXOnlyPubkeys,
|
|
43
|
+
w as hexToUint8Array,
|
|
44
|
+
q as isAddressFromPublicKey,
|
|
45
|
+
J as isValidHex,
|
|
46
|
+
f as peginP2aAnchorOutput,
|
|
47
|
+
Q as processPublicKeyToXOnly,
|
|
47
48
|
M as reclaimVsize,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
49
|
+
Y as stripHexPrefix,
|
|
50
|
+
h as supportedTxGraphVersions,
|
|
51
|
+
Z as toXOnly,
|
|
52
|
+
$ as uint8ArrayToHex,
|
|
52
53
|
v as validatePeginP2aAnchor,
|
|
53
|
-
|
|
54
|
+
ee as validateWalletPubkey,
|
|
55
|
+
B as verifyPeginHashlockSpend
|
|
54
56
|
};
|
|
55
57
|
//# 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,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A real PegIn and its Pre-PegIn from the devnet deployment on Bitcoin signet:
|
|
3
|
+
* vault 0x9a3ea0240d1e11c003fac439a6768d81caeef57c89a63912fec0f603a1e39ed8,
|
|
4
|
+
* activated (and redeemed) on 2026-10-16, after which its vault provider
|
|
5
|
+
* broadcast the PegIn with the full hashlock-leaf witness — 4 vault keepers and
|
|
6
|
+
* 4 universal challengers. Public chain data, fetched from mempool.space signet.
|
|
7
|
+
* It is the Rust finalizer's own output, so a check that accepts it agrees with
|
|
8
|
+
* the reference implementation on the witness layout.
|
|
9
|
+
*/
|
|
10
|
+
/** PegIn txid 6a83bca7246baf0e81a063315e6f893a21421363f6d1c9d24ad46bbb467f413f. */
|
|
11
|
+
export declare const SIGNET_PEGIN_TX_HEX: string;
|
|
12
|
+
/** Pre-PegIn txid 49edbd4f9d76dbbe7642b669c9e3bda1c903aeb98483ee5f63b5bfde81ece0a0. */
|
|
13
|
+
export declare const SIGNET_PRE_PEGIN_TX_HEX: string;
|
|
14
|
+
export declare const SIGNET_PEGIN_TXID = "6a83bca7246baf0e81a063315e6f893a21421363f6d1c9d24ad46bbb467f413f";
|
|
15
|
+
export declare const SIGNET_PRE_PEGIN_TXID = "49edbd4f9d76dbbe7642b669c9e3bda1c903aeb98483ee5f63b5bfde81ece0a0";
|
|
16
|
+
export declare const SIGNET_HTLC_VOUT = 0;
|
|
17
|
+
/** The vault's registered hashlock (BTCVaultRegistry protocol info). */
|
|
18
|
+
export declare const SIGNET_HASHLOCK = "0xeebd9d402a79ff3fffc53ea426ba181fddc796237c49ff92c830a4f35dc17891";
|
|
19
|
+
//# sourceMappingURL=signetPeginHashlockSpend.fixture.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signetPeginHashlockSpend.fixture.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/signetPeginHashlockSpend.fixture.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,mFAAmF;AACnF,eAAO,MAAM,mBAAmB,QA2BoD,CAAC;AAErF,uFAAuF;AACvF,eAAO,MAAM,uBAAuB,QAO1B,CAAC;AAEX,eAAO,MAAM,iBAAiB,qEACsC,CAAC;AACrE,eAAO,MAAM,qBAAqB,qEACkC,CAAC;AACrE,eAAO,MAAM,gBAAgB,IAAI,CAAC;AAClC,wEAAwE;AACxE,eAAO,MAAM,eAAe,uEAC0C,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* verifyPeginHashlockSpend — a served PegIn counts as a valid spend of its
|
|
3
|
+
* vault's HTLC only when its witness would pass Bitcoin's own checks. The real cases
|
|
4
|
+
* replay a PegIn the vault provider broadcast on signet (the Rust finalizer's
|
|
5
|
+
* output); the synthetic cases build the HTLC taptree and sign it with test keys
|
|
6
|
+
* to reach the shapes a real deposit never shows.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=verifyPeginHashlockSpend.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyPeginHashlockSpend.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/verifyPeginHashlockSpend.test.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Consensus check of a PegIn's spend of its vault's Pre-PegIn HTLC through the
|
|
3
|
+
* hashlock leaf.
|
|
4
|
+
*
|
|
5
|
+
* A Bitcoin API is not trusted to say that a vault's PegIn swept its HTLC. It
|
|
6
|
+
* can name the PegIn's public txid as the HTLC's spender, and serve back the
|
|
7
|
+
* depositor-signed PegIn the registry publishes: a txid does not commit to the
|
|
8
|
+
* witness. Finding the hashlock preimage in a served witness is not enough
|
|
9
|
+
* either — a secret disclosed in a reverted activation's calldata can be copied
|
|
10
|
+
* into a witness whose signatures are garbage. This check verifies the witness
|
|
11
|
+
* the way Bitcoin would:
|
|
12
|
+
*
|
|
13
|
+
* - the Pre-PegIn is the registered one (its txid), so the HTLC output's script
|
|
14
|
+
* and value are authentic;
|
|
15
|
+
* - the leaf script and control block commit to that output (BIP-341);
|
|
16
|
+
* - the leaf is the hashlock leaf, its preimage opens the registered hashlock,
|
|
17
|
+
* and every signature it requires verifies against the PegIn's script-path
|
|
18
|
+
* sighash (BIP-342).
|
|
19
|
+
*
|
|
20
|
+
* A PegIn that passes is a valid spend of the HTLC: while the HTLC is unspent,
|
|
21
|
+
* its holder can broadcast it to sweep the HTLC. It proves that much — not that
|
|
22
|
+
* it was broadcast, nor that the HTLC is still unspent (the depositor's refund
|
|
23
|
+
* may have taken it). The participants' PegIn input signatures are public —
|
|
24
|
+
* the registry serves them
|
|
25
|
+
* (vault-contracts-aave-v4@f5ef5633:src/protocol/BTCVaultRegistry.sol:918-925,
|
|
26
|
+
* `getPeginInputSignaturesForVault`) and the depositor's is in the signed
|
|
27
|
+
* PegIn — so the secret is the one ingredient that is not. Until it is public
|
|
28
|
+
* no one can produce a passing PegIn; once it is, anyone can.
|
|
29
|
+
*
|
|
30
|
+
* The leaf (btc-vault@1d841f73:crates/vault/src/connectors/prepegin_htlc.rs:88-126,
|
|
31
|
+
* multisig blocks from crates/vault/src/connectors/script_utils.rs:29-78):
|
|
32
|
+
*
|
|
33
|
+
* OP_SIZE <32> OP_EQUALVERIFY OP_SHA256 <h> OP_EQUALVERIFY
|
|
34
|
+
* <D> OP_CHECKSIGVERIFY <VP> OP_CHECKSIGVERIFY
|
|
35
|
+
* <VK_1> OP_CHECKSIG <VK_2..N> OP_CHECKSIGADD <N> OP_NUMEQUALVERIFY
|
|
36
|
+
* <UC_1> OP_CHECKSIG <UC_2..M> OP_CHECKSIGADD <M> OP_NUMEQUAL
|
|
37
|
+
*
|
|
38
|
+
* With no universal challengers the keeper block ends in `OP_NUMEQUAL`. The
|
|
39
|
+
* witness is the evaluation order reversed:
|
|
40
|
+
* `[UC_M..UC_1, VK_N..VK_1, VP, D, preimage, script, control block]`
|
|
41
|
+
* (btc-vault@1d841f73:crates/vault/src/sign.rs:718-761).
|
|
42
|
+
*
|
|
43
|
+
* @module primitives/psbt/verifyPeginHashlockSpend
|
|
44
|
+
*/
|
|
45
|
+
/** The on-chain facts a served PegIn and Pre-PegIn are checked against. */
|
|
46
|
+
export interface VerifyPeginHashlockSpendParams {
|
|
47
|
+
/** The PegIn as a Bitcoin API served it, witness included. */
|
|
48
|
+
peginTxHex: string;
|
|
49
|
+
/** The vault's Pre-PegIn as a Bitcoin API served it; authenticated by its txid. */
|
|
50
|
+
prePeginTxHex: string;
|
|
51
|
+
/** Txid of the vault's on-chain signed PegIn. */
|
|
52
|
+
peginTxid: string;
|
|
53
|
+
/** The vault's registered Pre-PegIn txid. */
|
|
54
|
+
prePeginTxid: string;
|
|
55
|
+
/** The vault's registered HTLC output index in the Pre-PegIn. */
|
|
56
|
+
htlcVout: number;
|
|
57
|
+
/** The vault's registered hashlock, `sha256(secret)`. */
|
|
58
|
+
hashlock: string;
|
|
59
|
+
}
|
|
60
|
+
/** Whether the PegIn validly spends the HTLC; a refusal names its reason. */
|
|
61
|
+
export type PeginHashlockSpendVerdict = {
|
|
62
|
+
valid: true;
|
|
63
|
+
} | {
|
|
64
|
+
valid: false;
|
|
65
|
+
reason: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* Verify a served PegIn spends the vault's HTLC through the hashlock leaf with
|
|
69
|
+
* a witness Bitcoin would accept. Never throws on malformed input: anything that
|
|
70
|
+
* is not such a spend is a refusal.
|
|
71
|
+
*/
|
|
72
|
+
export declare function verifyPeginHashlockSpend(params: VerifyPeginHashlockSpendParams): PeginHashlockSpendVerdict;
|
|
73
|
+
//# sourceMappingURL=verifyPeginHashlockSpend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyPeginHashlockSpend.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/verifyPeginHashlockSpend.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AA8CH,2EAA2E;AAC3E,MAAM,WAAW,8BAA8B;IAC7C,8DAA8D;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,mFAAmF;IACnF,aAAa,EAAE,MAAM,CAAC;IACtB,iDAAiD;IACjD,SAAS,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,iEAAiE;IACjE,QAAQ,EAAE,MAAM,CAAC;IACjB,yDAAyD;IACzD,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,6EAA6E;AAC7E,MAAM,MAAM,yBAAyB,GACjC;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GACf;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AA0GrC;;;;GAIG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,8BAA8B,GACrC,yBAAyB,CA8I3B"}
|
|
@@ -55,6 +55,12 @@ export interface ReconstructPeginParamsResult {
|
|
|
55
55
|
peginAmounts: readonly bigint[];
|
|
56
56
|
/** The transaction's `SHA256(authAnchor)` commitment, for the refund rebuild. */
|
|
57
57
|
authAnchorHash: string;
|
|
58
|
+
/**
|
|
59
|
+
* The funded Pre-PegIn transaction this result was verified against,
|
|
60
|
+
* without `0x`. These are the bytes hashed into `terms.prepeginTxid`, so
|
|
61
|
+
* the refund spends the transaction that was actually checked.
|
|
62
|
+
*/
|
|
63
|
+
fundedPrePeginTxHex: string;
|
|
58
64
|
/** Size of the space actually trialled, for the recovery record. */
|
|
59
65
|
candidatesTried: number;
|
|
60
66
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reconstructPeginParams.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/reconstructPeginParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAelE,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,WAAW,2BAA2B;IAC1C,2EAA2E;IAC3E,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C;;;;;;;;OAQG;IACH,kBAAkB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,SAAS,EAAE,oBAAoB,CAAC;IAChC;;;;;;;;OAQG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACpD;AAgGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,4BAA4B,CAAC,
|
|
1
|
+
{"version":3,"file":"reconstructPeginParams.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/reconstructPeginParams.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAelE,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACvB,MAAM,yBAAyB,CAAC;AAkBjC,MAAM,WAAW,2BAA2B;IAC1C,2EAA2E;IAC3E,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B,mEAAmE;IACnE,mBAAmB,EAAE,MAAM,CAAC;IAC5B,kEAAkE;IAClE,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,0BAA0B,EAAE,MAAM,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,UAAU,EAAE,SAAS,oBAAoB,EAAE,CAAC;IAC5C;;;;;;;;OAQG;IACH,kBAAkB,EAAE,SAAS,iBAAiB,EAAE,CAAC;CAClD;AAED,MAAM,WAAW,4BAA4B;IAC3C,yEAAyE;IACzE,SAAS,EAAE,oBAAoB,CAAC;IAChC;;;;;;;;OAQG;IACH,KAAK,EAAE,YAAY,CAAC;IACpB;;;OAGG;IACH,YAAY,EAAE,SAAS,MAAM,EAAE,CAAC;IAChC,iFAAiF;IACjF,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,CAAC;IAC5B,oEAAoE;IACpE,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;;;;OAQG;IACH,iBAAiB,EAAE,SAAS,oBAAoB,EAAE,CAAC;CACpD;AAgGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAsB,sBAAsB,CAC1C,KAAK,EAAE,2BAA2B,GACjC,OAAO,CAAC,4BAA4B,CAAC,CAgMvC"}
|
|
@@ -29,8 +29,6 @@ export interface ToRefundInputsOptions {
|
|
|
29
29
|
* survives the reorg untouched.
|
|
30
30
|
*/
|
|
31
31
|
applicationEntryPoint: Address;
|
|
32
|
-
/** Funded Pre-PegIn transaction hex, `0x` optional. */
|
|
33
|
-
fundedPrePeginTxHex: string;
|
|
34
32
|
/** Hashlocks indexed by `htlcVout`, as passed to the reconstruction. */
|
|
35
33
|
hashlocks: readonly string[];
|
|
36
34
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toRefundInputs.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/toRefundInputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAGzC,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAChB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,
|
|
1
|
+
{"version":3,"file":"toRefundInputs.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/recovery/toRefundInputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,KAAK,EAAE,OAAO,EAAO,MAAM,MAAM,CAAC;AAGzC,OAAO,KAAK,EACV,qBAAqB,EACrB,eAAe,EAChB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0BAA0B,CAAC;AAE7E,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;;;;;OAWG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAC3B;;;;;OAKG;IACH,qBAAqB,EAAE,OAAO,CAAC;IAC/B,wEAAwE;IACxE,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC;IAC7B;;;;;OAKG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,qBAAqB,CAAC;CAChC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,4BAA4B,EACpC,OAAO,EAAE,qBAAqB,GAC7B,wBAAwB,CAsE1B"}
|
|
@@ -107,7 +107,15 @@ export interface GetPeginProtocolStateOptions {
|
|
|
107
107
|
* bare "spent" observation is not sufficient: the spend may be the
|
|
108
108
|
* depositor's own CSV refund, and offering the secret-revealing hatch
|
|
109
109
|
* against a refund burns the secret for a vault whose funds already
|
|
110
|
-
* returned.
|
|
110
|
+
* returned. Nor is that match alone, when the outspend comes from an API
|
|
111
|
+
* the caller does not control: the PegIn txid is public, so an API can name
|
|
112
|
+
* it for a healthy vault and hide the normal activation. Fetch the PegIn by
|
|
113
|
+
* the txid of the on-chain signed PegIn and require its HTLC input's
|
|
114
|
+
* witness to pass `verifyPeginHashlockSpend`. Then the PegIn is a valid
|
|
115
|
+
* spend of the HTLC — broadcast, or broadcastable by anyone while the HTLC
|
|
116
|
+
* is unspent: the participants' signatures are public, so a witness Bitcoin
|
|
117
|
+
* would accept needs only the secret, which an API cannot produce before it
|
|
118
|
+
* is public.
|
|
111
119
|
*/
|
|
112
120
|
htlcSpentByPeginTx?: boolean;
|
|
113
121
|
/**
|
|
@@ -115,10 +123,13 @@ export interface GetPeginProtocolStateOptions {
|
|
|
115
123
|
* transaction has spent the Pre-PegIn HTLC, and the claim window has not
|
|
116
124
|
* elapsed. The CSV refund is gone, so the claim is the remaining exit.
|
|
117
125
|
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
* `
|
|
126
|
+
* Set it from the same spender attribution as `htlcSpentByPeginTx` — the
|
|
127
|
+
* outspend's `spendingTxid` equal to the vault's PegIn txid — never from a
|
|
128
|
+
* bare "spent". Before the claim reveals the secret, the PegIn must also
|
|
129
|
+
* pass `verifyPeginHashlockSpend`, as for `htlcSpentByPeginTx`: revealing
|
|
130
|
+
* the secret while the HTLC is unspent lets anyone broadcast the PegIn ahead
|
|
131
|
+
* of the depositor's refund. When set, it takes precedence over
|
|
132
|
+
* `canRefund`: once the PegIn has spent the HTLC, the refund cannot.
|
|
122
133
|
*/
|
|
123
134
|
canClaimExpired?: boolean;
|
|
124
135
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peginState.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/peginState.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,oBAAY,cAAc;IACxB,oDAAoD;IACpD,OAAO,IAAI;IACX,gEAAgE;IAChE,QAAQ,IAAI;IACZ,qGAAqG;IACrG,MAAM,IAAI;IACV,0DAA0D;IAC1D,QAAQ,IAAI;IACZ,2FAA2F;IAC3F,UAAU,IAAI;IACd,kGAAkG;IAClG,OAAO,IAAI;IACX,uFAAuF;IACvF,mBAAmB,IAAI;IACvB,oFAAoF;IACpF,OAAO,IAAI;IACX;;;;;OAKG;IACH,mBAAmB,IAAI;CACxB;AAED,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,eAAe,GACf,oBAAoB,CAAC;AAMzB;;GAEG;AACH,oBAAY,WAAW;IACrB,kEAAkE;IAClE,eAAe,oBAAoB;IACnC,+BAA+B;IAC/B,wBAAwB,6BAA6B;IACrD,uDAAuD;IACvD,6BAA6B,kCAAkC;IAC/D,uDAAuD;IACvD,cAAc,mBAAmB;IACjC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAC3C,sEAAsE;IACtE,WAAW,gBAAgB;IAC3B;;;;;;OAMG;IACH,mBAAmB,wBAAwB;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,cAAc,EAAE,cAAc,CAAC;IAC/B,uEAAuE;IACvE,gBAAgB,EAAE,WAAW,EAAE,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC
|
|
1
|
+
{"version":3,"file":"peginState.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/peginState.ts"],"names":[],"mappings":"AAIA;;;;;;;;;;GAUG;AACH,oBAAY,cAAc;IACxB,oDAAoD;IACpD,OAAO,IAAI;IACX,gEAAgE;IAChE,QAAQ,IAAI;IACZ,qGAAqG;IACrG,MAAM,IAAI;IACV,0DAA0D;IAC1D,QAAQ,IAAI;IACZ,2FAA2F;IAC3F,UAAU,IAAI;IACd,kGAAkG;IAClG,OAAO,IAAI;IACX,uFAAuF;IACvF,mBAAmB,IAAI;IACvB,oFAAoF;IACpF,OAAO,IAAI;IACX;;;;;OAKG;IACH,mBAAmB,IAAI;CACxB;AAED,iCAAiC;AACjC,MAAM,MAAM,gBAAgB,GACxB,aAAa,GACb,eAAe,GACf,oBAAoB,CAAC;AAMzB;;GAEG;AACH,oBAAY,WAAW;IACrB,kEAAkE;IAClE,eAAe,oBAAoB;IACnC,+BAA+B;IAC/B,wBAAwB,6BAA6B;IACrD,uDAAuD;IACvD,6BAA6B,kCAAkC;IAC/D,uDAAuD;IACvD,cAAc,mBAAmB;IACjC;;;;;OAKG;IACH,mBAAmB,wBAAwB;IAC3C,sEAAsE;IACtE,WAAW,gBAAgB;IAC3B;;;;;;OAMG;IACH,mBAAmB,wBAAwB;CAC5C;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iEAAiE;IACjE,cAAc,EAAE,cAAc,CAAC;IAC/B,uEAAuE;IACvE,gBAAgB,EAAE,WAAW,EAAE,CAAC;CACjC;AAED;;;;;;GAMG;AACH,MAAM,WAAW,4BAA4B;IAC3C,0DAA0D;IAC1D,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gFAAgF;IAChF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,yEAAyE;IACzE,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,6DAA6D;IAC7D,0BAA0B,CAAC,EAAE,OAAO,CAAC;IACrC;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAMD;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CACnC,cAAc,EAAE,cAAc,EAC9B,OAAO,GAAE,4BAAiC,GACzC,kBAAkB,CAqGpB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,kBAAkB,EACzB,MAAM,EAAE,WAAW,GAClB,OAAO,CAET;AAMD;;;;;GAKG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;CAChC,GAAG,OAAO,CAGV;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,iCAAiC,CAAC,MAAM,EAAE;IACxD,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;CAChC,GAAG,MAAM,CAKT"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../../PayoutManager-PQqeqX41.cjs"),t=require("../../../buildAndBroadcastReclaim-CMjlyooo.cjs"),r=require("../wasm/index.cjs"),e=require("../../../peginState-B4t_PDgj.cjs"),a=require("../../../state-C4WoNCy1.cjs");exports.computeHashlock=i.computeHashlock;exports.validateSecretAgainstHashlock=i.validateSecretAgainstHashlock;exports.ApplicationEntryPointMismatchError=t.ApplicationEntryPointMismatchError;exports.ArtifactsVaultMismatchError=t.ArtifactsVaultMismatchError;exports.AssertBindingError=t.AssertBindingError;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ChallengerSetMismatchError=t.ChallengerSetMismatchError;exports.DELEGATED_CLAIM_TX_GRAPH_VERSION=t.DELEGATED_CLAIM_TX_GRAPH_VERSION;exports.DelegatedClaimSigningIncompleteError=t.DelegatedClaimSigningIncompleteError;exports.GraphFingerprintError=t.GraphFingerprintError;exports.PEGIN_ETH_CONFIRMATIONS=t.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=t.ParticipantKeyDriftError;exports.PayoutDestinationError=t.PayoutDestinationError;exports.PayoutInputLeafError=t.PayoutInputLeafError;exports.PeginRegistrationMissingError=t.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=t.PeginRegistrationNotFinalError;exports.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR=t.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR;exports.RECLAIM_MAX_FEE_FRACTION_NUMERATOR=t.RECLAIM_MAX_FEE_FRACTION_NUMERATOR;exports.RECLAIM_MAX_FEE_RATE_SATS_VB=t.RECLAIM_MAX_FEE_RATE_SATS_VB;exports.RECLAIM_WARN_FEE_FRACTION_NUMERATOR=t.RECLAIM_WARN_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=t.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=t.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=t.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=t.REFUND_VSIZE;exports.ReclaimUneconomicalError=t.ReclaimUneconomicalError;exports.RefundBroadcastRejectedError=t.RefundBroadcastRejectedError;exports.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.SigningPlanMismatchError=t.SigningPlanMismatchError;exports.UnsupportedPayoutScriptError=t.UnsupportedPayoutScriptError;exports.VaultIdBindingError=t.VaultIdBindingError;exports.activateVault=t.activateVault;exports.activateVaultAndRedeem=t.activateVaultAndRedeem;exports.assembleWatchtowerArtifacts=t.assembleWatchtowerArtifacts;exports.assembleWatchtowerArtifactsFromSignatures=t.assembleWatchtowerArtifactsFromSignatures;exports.assertArtifactsUsableForVault=t.assertArtifactsUsableForVault;exports.assertAssertBindsClaimAndPayout=t.assertAssertBindsClaimAndPayout;exports.assertChallengerSetMatchesVault=t.assertChallengerSetMatchesVault;exports.assertClaimSpendsVault=t.assertClaimSpendsVault;exports.assertPayoutPaysRegisteredScript=t.assertPayoutPaysRegisteredScript;exports.assertReturnedGraphMatchesFingerprint=t.assertReturnedGraphMatchesFingerprint;exports.assertStandardPayoutScriptsAtEpochs=t.assertStandardPayoutScriptsAtEpochs;exports.assertTermsMatchVault=t.assertTermsMatchVault;exports.assertVaultProviderHintAccepted=t.assertVaultProviderHintAccepted;exports.buildAndBroadcastReclaim=t.buildAndBroadcastReclaim;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.claimExpiredVault=t.claimExpiredVault;exports.copyAssertConnectorLeaf=t.copyAssertConnectorLeaf;exports.deriveClaimerWotsKeypair=t.deriveClaimerWotsKeypair;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.fingerprintReturnedGraph=t.fingerprintReturnedGraph;exports.isApplicationEntryPointMismatchError=t.isApplicationEntryPointMismatchError;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isHintAccepted=t.isHintAccepted;exports.isParticipantKeyDriftError=t.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=t.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=t.isPeginRegistrationNotFinalError;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.isUnsupportedPayoutScriptError=t.isUnsupportedPayoutScriptError;exports.matchKeyHint=t.matchKeyHint;exports.matchKeySetHint=t.matchKeySetHint;exports.planDelegatedClaimSigning=t.planDelegatedClaimSigning;exports.readDelegatedClaimVaultContext=t.readDelegatedClaimVaultContext;exports.readRefundPrePeginContext=t.readRefundPrePeginContext;exports.readStampedParticipantKeys=t.readStampedParticipantKeys;exports.resolveCurrentParticipantKeys=t.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=t.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDelegatedClaimPlan=t.signDelegatedClaimPlan;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.summarizeWatchtowerArtifacts=t.summarizeWatchtowerArtifacts;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=t.validateOnChainParticipantKeys;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=t.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=t.waitForPeginRegistrationDepth;exports.waitForPeginStatus=t.waitForPeginStatus;exports.attachFinalizedAssert=r.attachFinalizedAssert;exports.finalizePayout=r.finalizePayout;exports.finalizeWronglyChallenged=r.finalizeWronglyChallenged;exports.pinPegoutProof=r.pinPegoutProof;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.activationDeadlineBlocksRemaining=e.activationDeadlineBlocksRemaining;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=e.isActivationDeadlinePassedOnChain;exports.ClaimerPegoutStatusValue=a.ClaimerPegoutStatusValue;exports.isPegoutTerminalStatus=a.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=a.isRecognizedPegoutStatus;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { c as s, v as e } from "../../../PayoutManager-
|
|
2
|
-
import { J as i, l as n, A as o, ab as l, C as c, D as E, n as d, G as u, u as g, W as A, P as p, j as
|
|
3
|
-
import { attachFinalizedAssert as
|
|
4
|
-
import { C as ba, P as
|
|
5
|
-
import { C as
|
|
1
|
+
import { c as s, v as e } from "../../../PayoutManager-3-MzBVLj.js";
|
|
2
|
+
import { J as i, l as n, A as o, ab as l, C as c, D as E, n as d, G as u, u as g, W as A, P as p, j as R, v as P, w as m, am as _, an as C, ao as h, ap as M, af as S, ag as y, ah as F, ai as f, ak as V, ac as N, a0 as D, S as I, X as v, V as T, a as O, b as K, d as U, e as B, m as b, f as x, g as H, t as L, i as G, B as W, Y as X, o as w, a4 as k, al as z, ad as j, c as Z, k as q, h as J, ae as Q, E as Y, K as $, M as aa, a5 as ta, Z as sa, x as ea, y as ra, a1 as ia, _ as na, a6 as oa, a7 as la, p as ca, r as Ea, aj as da, a8 as ua, a9 as ga, aa as Aa, F as pa, q as Ra, H as Pa, I as ma, s as _a, N as Ca, O as ha, L as Ma, Q as Sa, R as ya, T as Fa, U as fa, $ as Va, a2 as Na, z as Da, a3 as Ia } from "../../../buildAndBroadcastReclaim-D8l-QJWo.js";
|
|
3
|
+
import { attachFinalizedAssert as Ta, finalizePayout as Oa, finalizeWronglyChallenged as Ka, pinPegoutProof as Ua } from "../wasm/index.js";
|
|
4
|
+
import { C as ba, P as xa, a as Ha, c as La, g as Ga, i as Wa } from "../../../peginState-CXdbSit3.js";
|
|
5
|
+
import { C as wa, g as ka, f as za } from "../../../state-CFn1rT74.js";
|
|
6
6
|
export {
|
|
7
7
|
i as ApplicationEntryPointMismatchError,
|
|
8
8
|
n as ArtifactsVaultMismatchError,
|
|
9
9
|
o as AssertBindingError,
|
|
10
10
|
l as BIP68NotMatureError,
|
|
11
11
|
c as ChallengerSetMismatchError,
|
|
12
|
-
|
|
12
|
+
wa as ClaimerPegoutStatusValue,
|
|
13
13
|
ba as ContractStatus,
|
|
14
14
|
E as DELEGATED_CLAIM_TX_GRAPH_VERSION,
|
|
15
15
|
d as DelegatedClaimSigningIncompleteError,
|
|
@@ -17,9 +17,9 @@ export {
|
|
|
17
17
|
g as PEGIN_ETH_CONFIRMATIONS,
|
|
18
18
|
A as ParticipantKeyDriftError,
|
|
19
19
|
p as PayoutDestinationError,
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
R as PayoutInputLeafError,
|
|
21
|
+
xa as PeginAction,
|
|
22
|
+
P as PeginRegistrationMissingError,
|
|
23
23
|
m as PeginRegistrationNotFinalError,
|
|
24
24
|
_ as RECLAIM_MAX_FEE_FRACTION_DENOMINATOR,
|
|
25
25
|
C as RECLAIM_MAX_FEE_FRACTION_NUMERATOR,
|
|
@@ -30,73 +30,74 @@ export {
|
|
|
30
30
|
F as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
31
31
|
f as REFUND_VSIZE,
|
|
32
32
|
V as ReclaimUneconomicalError,
|
|
33
|
-
N as
|
|
34
|
-
D as
|
|
35
|
-
I as
|
|
36
|
-
v as
|
|
37
|
-
T as
|
|
38
|
-
O as
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
U as
|
|
33
|
+
N as RefundBroadcastRejectedError,
|
|
34
|
+
D as RegisteredVaultVersionMismatchError,
|
|
35
|
+
I as SigningPlanMismatchError,
|
|
36
|
+
v as UnsupportedPayoutScriptError,
|
|
37
|
+
T as VaultIdBindingError,
|
|
38
|
+
O as activateVault,
|
|
39
|
+
K as activateVaultAndRedeem,
|
|
40
|
+
Ha as activationDeadlineBlocksRemaining,
|
|
41
|
+
U as assembleWatchtowerArtifacts,
|
|
42
|
+
B as assembleWatchtowerArtifactsFromSignatures,
|
|
42
43
|
b as assertArtifactsUsableForVault,
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
44
|
+
x as assertAssertBindsClaimAndPayout,
|
|
45
|
+
H as assertChallengerSetMatchesVault,
|
|
46
|
+
L as assertClaimSpendsVault,
|
|
47
|
+
G as assertPayoutPaysRegisteredScript,
|
|
48
|
+
W as assertReturnedGraphMatchesFingerprint,
|
|
49
|
+
X as assertStandardPayoutScriptsAtEpochs,
|
|
50
|
+
w as assertTermsMatchVault,
|
|
51
|
+
k as assertVaultProviderHintAccepted,
|
|
52
|
+
Ta as attachFinalizedAssert,
|
|
53
|
+
z as buildAndBroadcastReclaim,
|
|
54
|
+
j as buildAndBroadcastRefund,
|
|
55
|
+
La as canPerformAction,
|
|
56
|
+
Z as claimExpiredVault,
|
|
56
57
|
s as computeHashlock,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
58
|
+
q as copyAssertConnectorLeaf,
|
|
59
|
+
J as deriveClaimerWotsKeypair,
|
|
60
|
+
Q as estimateRefundFeeSats,
|
|
61
|
+
Oa as finalizePayout,
|
|
62
|
+
Ka as finalizeWronglyChallenged,
|
|
63
|
+
Y as fingerprintReturnedGraph,
|
|
64
|
+
Ga as getPeginProtocolState,
|
|
65
|
+
Wa as isActivationDeadlinePassedOnChain,
|
|
66
|
+
$ as isApplicationEntryPointMismatchError,
|
|
67
|
+
aa as isDepositAmountValid,
|
|
68
|
+
ta as isHintAccepted,
|
|
69
|
+
sa as isParticipantKeyDriftError,
|
|
70
|
+
ea as isPeginRegistrationMissingError,
|
|
71
|
+
ra as isPeginRegistrationNotFinalError,
|
|
72
|
+
ka as isPegoutTerminalStatus,
|
|
73
|
+
za as isRecognizedPegoutStatus,
|
|
74
|
+
ia as isRegisteredVaultVersionMismatchError,
|
|
75
|
+
na as isUnsupportedPayoutScriptError,
|
|
76
|
+
oa as matchKeyHint,
|
|
77
|
+
la as matchKeySetHint,
|
|
78
|
+
Ua as pinPegoutProof,
|
|
79
|
+
ca as planDelegatedClaimSigning,
|
|
80
|
+
Ea as readDelegatedClaimVaultContext,
|
|
81
|
+
da as readRefundPrePeginContext,
|
|
82
|
+
ua as readStampedParticipantKeys,
|
|
83
|
+
ga as resolveCurrentParticipantKeys,
|
|
84
|
+
Aa as resolveParticipantKeysAtEpochs,
|
|
85
|
+
pa as runDepositorPresignFlow,
|
|
86
|
+
Ra as signDelegatedClaimPlan,
|
|
86
87
|
Pa as signDepositorGraph,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
88
|
+
ma as submitWotsPublicKey,
|
|
89
|
+
_a as summarizeWatchtowerArtifacts,
|
|
90
|
+
Ca as validateDepositAmount,
|
|
91
|
+
ha as validateMultiVaultDepositInputs,
|
|
92
|
+
Ma as validateOnChainParticipantKeys,
|
|
93
|
+
Sa as validateProviderSelection,
|
|
94
|
+
ya as validateRemainingCapacity,
|
|
94
95
|
e as validateSecretAgainstHashlock,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
Fa as validateVaultAmounts,
|
|
97
|
+
fa as validateVaultProviderPubkey,
|
|
98
|
+
Va as verifyRegisteredParticipantKeys,
|
|
99
|
+
Na as verifyRegisteredVaultVersions,
|
|
100
|
+
Da as waitForPeginRegistrationDepth,
|
|
101
|
+
Ia as waitForPeginStatus
|
|
101
102
|
};
|
|
102
103
|
//# sourceMappingURL=index.js.map
|
|
@@ -172,13 +172,17 @@ export interface RefundInput<R extends BtcBroadcastResult = BtcBroadcastResult>
|
|
|
172
172
|
*
|
|
173
173
|
* The broadcast transport is expected to surface Bitcoin's `non-BIP68-final`
|
|
174
174
|
* policy rejection as an `Error` whose message contains that string; when
|
|
175
|
-
* it does, the SDK wraps it in {@link BIP68NotMatureError}.
|
|
176
|
-
*
|
|
175
|
+
* it does, the SDK wraps it in {@link BIP68NotMatureError}. Relayed bitcoind
|
|
176
|
+
* `-25` / `-27` rejections are wrapped in {@link RefundBroadcastRejectedError}.
|
|
177
|
+
* All other transport errors propagate unchanged.
|
|
177
178
|
*
|
|
178
179
|
* @returns whatever the injected `broadcastTx` returns (generic pass-through)
|
|
179
180
|
* @throws `Error` if any validation fails
|
|
180
181
|
* @throws {@link BIP68NotMatureError} if the broadcast is rejected because
|
|
181
182
|
* the refund CSV timelock has not yet matured
|
|
183
|
+
* @throws {@link RefundBroadcastRejectedError} if the broadcast is rejected
|
|
184
|
+
* with bitcoind `-25` (a general transaction error, usually missing
|
|
185
|
+
* or spent inputs) or `-27` (already in the chain)
|
|
182
186
|
* @throws anything `readVault`, `readPrePeginContext`,
|
|
183
187
|
* `signPsbt`, or `broadcastTx` throws
|
|
184
188
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAErE,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;AA+B3F,eAAO,MAAM,YAAY,MAAM,CAAC;AAgBhC,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAQhD,eAAO,MAAM,iCAAiC,MAAM,CAAC;AACrD,eAAO,MAAM,mCAAmC,OAAO,CAAC;AAExD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,CAOnE;
|
|
1
|
+
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"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"}
|