@babylonlabs-io/ts-sdk 0.28.1 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PeginManager-Zrv-ncJi.cjs +2 -0
- package/dist/PeginManager-Zrv-ncJi.cjs.map +1 -0
- package/dist/{PeginManager-DzMSIQ0I.js → PeginManager-_pamUKlS.js} +622 -580
- package/dist/PeginManager-_pamUKlS.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-xWS8frc6.js → buildAndBroadcastRefund-BY6mYmFl.js} +406 -303
- package/dist/buildAndBroadcastRefund-BY6mYmFl.js.map +1 -0
- package/dist/buildAndBroadcastRefund-CO60ReNf.cjs +2 -0
- package/dist/buildAndBroadcastRefund-CO60ReNf.cjs.map +1 -0
- package/dist/challengeAssert-mYikGC34.js +269 -0
- package/dist/challengeAssert-mYikGC34.js.map +1 -0
- package/dist/challengeAssert-yYFflBOx.cjs +2 -0
- package/dist/challengeAssert-yYFflBOx.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +144 -143
- package/dist/noPayout-B8JiTaYt.js +333 -0
- package/dist/noPayout-B8JiTaYt.js.map +1 -0
- package/dist/noPayout-CwgYkZYs.cjs +2 -0
- package/dist/noPayout-CwgYkZYs.cjs.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +145 -144
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts +17 -14
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts +25 -0
- package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts +25 -0
- package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/index.d.ts +12 -0
- package/dist/tbv/core/managers/pegin/index.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts +23 -0
- package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts +12 -0
- package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts.map +1 -0
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.d.ts +1 -1
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +26 -25
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts +18 -1
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/payout.d.ts +15 -0
- package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/index.d.ts +1 -1
- package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts +21 -0
- package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +50 -4
- 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 +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +145 -144
- package/package.json +1 -1
- package/dist/PeginManager-Da4uSHzl.cjs +0 -2
- package/dist/PeginManager-Da4uSHzl.cjs.map +0 -1
- package/dist/PeginManager-DzMSIQ0I.js.map +0 -1
- package/dist/buildAndBroadcastRefund-DkEpTFkv.cjs +0 -2
- package/dist/buildAndBroadcastRefund-DkEpTFkv.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-xWS8frc6.js.map +0 -1
- package/dist/challengeAssert-BM8m9gPM.cjs +0 -2
- package/dist/challengeAssert-BM8m9gPM.cjs.map +0 -1
- package/dist/challengeAssert-j2Vwqo0-.js +0 -304
- package/dist/challengeAssert-j2Vwqo0-.js.map +0 -1
- package/dist/payout-B_fvQU3q.js +0 -261
- package/dist/payout-B_fvQU3q.js.map +0 -1
- package/dist/payout-DP6KMFP1.cjs +0 -2
- package/dist/payout-DP6KMFP1.cjs.map +0 -1
|
@@ -1,33 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computeMinClaimValue as
|
|
3
|
-
import { a as c,
|
|
4
|
-
import { d as
|
|
1
|
+
import { h as s, g as t, d as i, a as r, b as u, c as o, e as d, f as P } from "../../../challengeAssert-mYikGC34.js";
|
|
2
|
+
import { computeMinClaimValue as b, deriveVaultId as n } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { a as c, d as x, c as g, b as y, f, e as m } from "../../../noPayout-B8JiTaYt.js";
|
|
4
|
+
import { d as v, a as A, e as T, f as S, h as H, i as I, b as C, p as F, s as N, t as O, u as V, v as K } from "../../../bitcoin-B-Y0DlqR.js";
|
|
5
5
|
export {
|
|
6
|
+
c as assertPayoutOutputMatchesRegistered,
|
|
6
7
|
s as buildChallengeAssertPsbt,
|
|
7
8
|
t as buildDepositorPayoutPsbt,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
x as buildNoPayoutPsbt,
|
|
10
|
+
g as buildPayoutPsbt,
|
|
11
|
+
i as buildPeginInputPsbt,
|
|
12
|
+
r as buildPeginTxFromFundedPrePegin,
|
|
12
13
|
u as buildPrePeginPsbt,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
y as buildRefundPsbt,
|
|
15
|
+
b as computeMinClaimValue,
|
|
16
|
+
o as computeNumLocalChallengers,
|
|
17
|
+
f as createPayoutScript,
|
|
18
|
+
v as deriveNativeSegwitAddress,
|
|
19
|
+
A as deriveTaprootAddress,
|
|
20
|
+
n as deriveVaultId,
|
|
21
|
+
T as ensureHexPrefix,
|
|
22
|
+
m as extractPayoutSignature,
|
|
22
23
|
d as extractPeginInputSignature,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
24
|
+
P as finalizePeginInputPsbt,
|
|
25
|
+
S as formatSatoshisToBtc,
|
|
26
|
+
H as hexToUint8Array,
|
|
27
|
+
I as isAddressFromPublicKey,
|
|
28
|
+
C as isValidHex,
|
|
29
|
+
F as processPublicKeyToXOnly,
|
|
30
|
+
N as stripHexPrefix,
|
|
31
|
+
O as toXOnly,
|
|
31
32
|
V as uint8ArrayToHex,
|
|
32
33
|
K as validateWalletPubkey
|
|
33
34
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssertPayoutNoPayoutConnectorParams } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
1
|
+
import { AssertPayoutNoPayoutConnectorParams, Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
2
2
|
/**
|
|
3
3
|
* Parameters for building a NoPayout PSBT
|
|
4
4
|
*/
|
|
@@ -25,4 +25,21 @@ export interface NoPayoutParams {
|
|
|
25
25
|
* @returns Unsigned PSBT hex ready for signing
|
|
26
26
|
*/
|
|
27
27
|
export declare function buildNoPayoutPsbt(params: NoPayoutParams): Promise<string>;
|
|
28
|
+
/**
|
|
29
|
+
* Validate that a NoPayout transaction pays to the challenger via the
|
|
30
|
+
* protocol-defined output structure: a single BIP-86 P2TR output derived from
|
|
31
|
+
* the challenger's x-only pubkey.
|
|
32
|
+
*
|
|
33
|
+
* Mirrors `assertPayoutOutputMatchesRegistered` for the NoPayout path, where
|
|
34
|
+
* the sink is fixed by the protocol rather than read from on-chain registration
|
|
35
|
+
* (see `crates/vault/src/transactions/nopayout.rs::NoPayoutTx::new`).
|
|
36
|
+
*
|
|
37
|
+
* @param noPayoutTxHex - Raw NoPayout transaction hex
|
|
38
|
+
* @param challengerPubkey - Challenger's x-only public key (hex)
|
|
39
|
+
* @param network - Bitcoin network used to derive the P2TR scriptPubKey
|
|
40
|
+
* @throws If the transaction does not have exactly one output
|
|
41
|
+
* @throws If the single output's scriptPubKey does not equal the BIP-86 P2TR
|
|
42
|
+
* scriptPubKey for the challenger
|
|
43
|
+
*/
|
|
44
|
+
export declare function assertNoPayoutOutputMatchesChallenger(noPayoutTxHex: string, challengerPubkey: string, network: Network): void;
|
|
28
45
|
//# 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,
|
|
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,uCAAuC,CAAC;AAY/C;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,kDAAkD;IAClD,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,gBAAgB,EAAE,MAAM,CAAC;IACzB,+DAA+D;IAC/D,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;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,qCAAqC,CACnD,aAAa,EAAE,MAAM,EACrB,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,OAAO,GACf,IAAI,CAyBN"}
|
|
@@ -77,6 +77,21 @@ export interface PayoutPsbtResult {
|
|
|
77
77
|
* @throws If previous output is not found for either input
|
|
78
78
|
*/
|
|
79
79
|
export declare function buildPayoutPsbt(params: PayoutParams): Promise<PayoutPsbtResult>;
|
|
80
|
+
/**
|
|
81
|
+
* Validate that a payout transaction's largest output pays to the registered
|
|
82
|
+
* depositor payout scriptPubKey.
|
|
83
|
+
*
|
|
84
|
+
* Prevents a malicious vault provider from substituting the payout destination
|
|
85
|
+
* (or routing funds through a dust output to the correct address while sending
|
|
86
|
+
* the actual value to an attacker-controlled script).
|
|
87
|
+
*
|
|
88
|
+
* @param payoutTxHex - Raw payout transaction hex
|
|
89
|
+
* @param registeredPayoutScriptPubKey - On-chain registered scriptPubKey (hex, with or without 0x prefix)
|
|
90
|
+
* @throws If scriptPubKey is invalid hex
|
|
91
|
+
* @throws If the transaction has no outputs
|
|
92
|
+
* @throws If the largest output does not pay to the registered scriptPubKey
|
|
93
|
+
*/
|
|
94
|
+
export declare function assertPayoutOutputMatchesRegistered(payoutTxHex: string, registeredPayoutScriptPubKey: string): void;
|
|
80
95
|
/**
|
|
81
96
|
* Extract Schnorr signature from signed payout PSBT.
|
|
82
97
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/payout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"payout.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/payout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,KAAK,OAAO,EAEb,MAAM,uCAAuC,CAAC;AAuB/C;;;;;GAKG;AACH,MAAM,WAAW,YAAY;IAC3B;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,kBAAkB,EAAE,MAAM,CAAC;IAE3B;;OAEG;IACH,sBAAsB,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAEhC;;OAEG;IACH,6BAA6B,EAAE,MAAM,EAAE,CAAC;IAExC;;OAEG;IACH,aAAa,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,YAAY,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAqI3B;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,EAAE,MAAM,EACnB,4BAA4B,EAAE,MAAM,GACnC,IAAI,CAwBN;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CACpC,aAAa,EAAE,MAAM,EACrB,eAAe,EAAE,MAAM,EACvB,UAAU,SAAI,GACb,MAAM,CA+CR"}
|
|
@@ -4,7 +4,7 @@ export type { WaitForPeginStatusParams } from './waitForPeginStatus';
|
|
|
4
4
|
export { submitWotsPublicKey } from './submitWotsPublicKey';
|
|
5
5
|
export type { SubmitWotsPublicKeyParams } from './submitWotsPublicKey';
|
|
6
6
|
export { signDepositorGraph } from './signDepositorGraph';
|
|
7
|
-
export type { SignDepositorGraphParams } from './signDepositorGraph';
|
|
7
|
+
export type { DepositorGraphSigningContext, SignDepositorGraphParams, } from './signDepositorGraph';
|
|
8
8
|
export { pollAndSignPayouts } from './signAndSubmitPayouts';
|
|
9
9
|
export type { PayoutSigningContext, PollAndSignPayoutsParams, } from './signAndSubmitPayouts';
|
|
10
10
|
export { ContractStatus, PeginAction, canPerformAction, getPeginProtocolState, } from './peginState';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,iBAAiB,EACjB,gBAAgB,EAChB,aAAa,EACb,sBAAsB,GACvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EACV,4BAA4B,EAC5B,wBAAwB,GACzB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,YAAY,EACV,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,WAAW,EACX,gBAAgB,EAChB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,kBAAkB,GACnB,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,EACzB,oBAAoB,EACpB,2BAA2B,EAC3B,+BAA+B,GAChC,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,gBAAgB,EAChB,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,cAAc,CAAC"}
|
|
@@ -18,6 +18,27 @@ export interface PayoutSigningContext {
|
|
|
18
18
|
depositorBtcPubkey: string;
|
|
19
19
|
/** Pegin timelock from the locked offchain params version */
|
|
20
20
|
timelockPegin: number;
|
|
21
|
+
/**
|
|
22
|
+
* Assert CSV timelock from the locked offchain params version (blocks).
|
|
23
|
+
* Source: ProtocolParams contract via
|
|
24
|
+
* `ViemProtocolParamsReader.getOffchainParamsByVersion(...).timelockAssert`.
|
|
25
|
+
* Required for the depositor-graph NoPayout local rebuild.
|
|
26
|
+
*/
|
|
27
|
+
timelockAssert: number;
|
|
28
|
+
/**
|
|
29
|
+
* Security council member x-only public keys (hex, no prefix).
|
|
30
|
+
* Source: ProtocolParams contract via
|
|
31
|
+
* `getOffchainParamsByVersion(...).securityCouncilKeys`.
|
|
32
|
+
* Required for the depositor-graph NoPayout local rebuild.
|
|
33
|
+
*/
|
|
34
|
+
councilMembers: string[];
|
|
35
|
+
/**
|
|
36
|
+
* M-of-N council quorum threshold.
|
|
37
|
+
* Source: ProtocolParams contract via
|
|
38
|
+
* `getOffchainParamsByVersion(...).councilQuorum`.
|
|
39
|
+
* Required for the depositor-graph NoPayout local rebuild.
|
|
40
|
+
*/
|
|
41
|
+
councilQuorum: number;
|
|
21
42
|
/** BTC network (Mainnet, Testnet, etc.) */
|
|
22
43
|
network: Network;
|
|
23
44
|
/** On-chain registered depositor payout scriptPubKey (hex) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signAndSubmitPayouts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signAndSubmitPayouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAW3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,yDAAyD;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,oEAAoE;IACpE,aAAa,EAAE,aAAa,CAAC;IAC7B,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,cAAc,EAAE,oBAAoB,CAAC;IACrC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAqKD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"signAndSubmitPayouts.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signAndSubmitPayouts.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAIrE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAW3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAQrE;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,yDAAyD;IACzD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,6DAA6D;IAC7D,aAAa,EAAE,MAAM,CAAC;IACtB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;OAKG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,8DAA8D;IAC9D,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,yDAAyD;IACzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,oEAAoE;IACpE,aAAa,EAAE,aAAa,CAAC;IAC7B,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,0DAA0D;IAC1D,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,+CAA+C;IAC/C,cAAc,EAAE,oBAAoB,CAAC;IACrC,gEAAgE;IAChE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,sEAAsE;IACtE,UAAU,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzD;AAqKD;;;;;;;GAOG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,IAAI,CAAC,CAkGf"}
|
|
@@ -1,18 +1,64 @@
|
|
|
1
|
+
import { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
1
2
|
import { BitcoinWallet } from '../../../../shared/wallets/interfaces';
|
|
2
3
|
import { DepositorAsClaimerPresignatures, DepositorGraphTransactions } from '../../clients/vault-provider/types';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
/**
|
|
5
|
+
* Authoritative inputs required to construct the depositor's Payout AND every
|
|
6
|
+
* per-challenger NoPayout PSBT locally. Every field here must come from
|
|
7
|
+
* trusted on-chain sources, not from the vault provider response. They feed
|
|
8
|
+
* directly into the Taproot sighash.
|
|
9
|
+
*/
|
|
10
|
+
export interface DepositorGraphSigningContext {
|
|
11
|
+
/** Raw pegin BTC transaction hex (provides the depositor's signed prevout) */
|
|
12
|
+
peginTxHex: string;
|
|
6
13
|
/** Depositor's BTC public key (x-only, 64-char hex, no 0x prefix) */
|
|
7
14
|
depositorBtcPubkey: string;
|
|
15
|
+
/** Vault provider's BTC public key (x-only hex, no prefix) */
|
|
16
|
+
vaultProviderBtcPubkey: string;
|
|
17
|
+
/** Sorted vault keeper BTC public keys (x-only hex, no prefix) */
|
|
18
|
+
vaultKeeperBtcPubkeys: string[];
|
|
19
|
+
/** Sorted universal challenger BTC public keys (x-only hex, no prefix) */
|
|
20
|
+
universalChallengerBtcPubkeys: string[];
|
|
21
|
+
/** Pegin CSV timelock from the locked offchain params version (blocks) */
|
|
22
|
+
timelockPegin: number;
|
|
23
|
+
/**
|
|
24
|
+
* Assert CSV timelock from the locked offchain params version (blocks).
|
|
25
|
+
* Sourced from the on-chain ProtocolParams contract via
|
|
26
|
+
* `ViemProtocolParamsReader.getOffchainParamsByVersion(...).timelockAssert`.
|
|
27
|
+
*/
|
|
28
|
+
timelockAssert: number;
|
|
29
|
+
/**
|
|
30
|
+
* Security council member x-only public keys (hex, no prefix). Sourced from
|
|
31
|
+
* the on-chain ProtocolParams contract via
|
|
32
|
+
* `ViemProtocolParamsReader.getOffchainParamsByVersion(...).securityCouncilKeys`.
|
|
33
|
+
*/
|
|
34
|
+
councilMembers: string[];
|
|
35
|
+
/**
|
|
36
|
+
* M-of-N council quorum threshold. Sourced from the on-chain ProtocolParams
|
|
37
|
+
* contract via `ViemProtocolParamsReader.getOffchainParamsByVersion(...).councilQuorum`.
|
|
38
|
+
*/
|
|
39
|
+
councilQuorum: number;
|
|
40
|
+
/** BTC network (Mainnet, Testnet, etc.) */
|
|
41
|
+
network: Network;
|
|
42
|
+
/**
|
|
43
|
+
* On-chain registered depositor payout scriptPubKey (hex, with or without
|
|
44
|
+
* 0x prefix). Used to assert the VP-advertised payout transaction pays to
|
|
45
|
+
* the depositor's registered address before the wallet produces a signature.
|
|
46
|
+
*/
|
|
47
|
+
registeredPayoutScriptPubKey: string;
|
|
48
|
+
}
|
|
49
|
+
export interface SignDepositorGraphParams {
|
|
50
|
+
/** The depositor graph from VP response */
|
|
51
|
+
depositorGraph: DepositorGraphTransactions;
|
|
8
52
|
/** Bitcoin wallet for signing */
|
|
9
53
|
btcWallet: BitcoinWallet;
|
|
54
|
+
/** Authoritative inputs used to rebuild every PSBT locally */
|
|
55
|
+
signingContext: DepositorGraphSigningContext;
|
|
10
56
|
}
|
|
11
57
|
/**
|
|
12
58
|
* Sign all depositor graph transactions and assemble into presignatures.
|
|
13
59
|
*
|
|
14
60
|
* Flow:
|
|
15
|
-
* 1.
|
|
61
|
+
* 1. Build payout + per-challenger nopayout PSBTs locally
|
|
16
62
|
* 2. Batch sign via wallet.signPsbts() if available, else sequential signPsbt()
|
|
17
63
|
* 3. Extract Schnorr signatures from each signed PSBT
|
|
18
64
|
* 4. Assemble into DepositorAsClaimerPresignatures
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"signDepositorGraph.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/signDepositorGraph.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,uCAAuC,CAAC;AAGrE,OAAO,KAAK,EAAE,aAAa,EAAmB,MAAM,uCAAuC,CAAC;AAC5F,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AAiX5C;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,8EAA8E;IAC9E,UAAU,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,kBAAkB,EAAE,MAAM,CAAC;IAC3B,8DAA8D;IAC9D,sBAAsB,EAAE,MAAM,CAAC;IAC/B,kEAAkE;IAClE,qBAAqB,EAAE,MAAM,EAAE,CAAC;IAChC,0EAA0E;IAC1E,6BAA6B,EAAE,MAAM,EAAE,CAAC;IACxC,0EAA0E;IAC1E,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB;;;OAGG;IACH,aAAa,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB;;;;OAIG;IACH,4BAA4B,EAAE,MAAM,CAAC;CACtC;AAED,MAAM,WAAW,wBAAwB;IACvC,2CAA2C;IAC3C,cAAc,EAAE,0BAA0B,CAAC;IAC3C,iCAAiC;IACjC,SAAS,EAAE,aAAa,CAAC;IACzB,8DAA8D;IAC9D,cAAc,EAAE,4BAA4B,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,wBAAsB,kBAAkB,CACtC,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,+BAA+B,CAAC,CAiC1C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../buildAndBroadcastRefund-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("../../../buildAndBroadcastRefund-CO60ReNf.cjs"),a=require("../../../signing-DHSXjhLM.cjs");exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.computeHashlock=t.computeHashlock;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.pollAndSignPayouts=t.pollAndSignPayouts;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=a.ContractStatus;exports.PeginAction=a.PeginAction;exports.canPerformAction=a.canPerformAction;exports.getPeginProtocolState=a.getPeginProtocolState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as s, C as e, a as i, m as o, h as u, i as l, l as r, k as n, p as d, b as c, s as P, v as g, g as m, d as p, c as v, j as S, e as A, f as V, w as b } from "../../../buildAndBroadcastRefund-
|
|
1
|
+
import { B as s, C as e, a as i, m as o, h as u, i as l, l as r, k as n, p as d, b as c, s as P, v as g, g as m, d as p, c as v, j as S, e as A, f as V, w as b } from "../../../buildAndBroadcastRefund-BY6mYmFl.js";
|
|
2
2
|
import { C, P as h, a as k, g as y } from "../../../signing-BZigafm0.js";
|
|
3
3
|
export {
|
|
4
4
|
s as BIP68NotMatureError,
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-yYFflBOx.cjs"),P=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../noPayout-CwgYkZYs.cjs"),o=require("../bitcoin-DIN0OupO.cjs"),l=require("../signing-DHSXjhLM.cjs"),d=require("../validation-u8W7Lp2x.cjs"),t=require("../buildAndBroadcastRefund-CO60ReNf.cjs"),a=require("../fundPeginTransaction-DaWoYCgO.cjs"),i=require("../psbtInputFields-CB8hqjQ5.cjs"),r=require("../PeginManager-Zrv-ncJi.cjs"),e=require("../vault-registry-reader-DdruADqa.cjs"),s=require("../types-jmEyzzhY.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>P.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>P.deriveVaultId});exports.assertPayoutOutputMatchesRegistered=u.assertPayoutOutputMatchesRegistered;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.deriveNativeSegwitAddress=o.deriveNativeSegwitAddress;exports.deriveTaprootAddress=o.deriveTaprootAddress;exports.ensureHexPrefix=o.ensureHexPrefix;exports.formatSatoshisToBtc=o.formatSatoshisToBtc;exports.getNetwork=o.getNetwork;exports.hexToUint8Array=o.hexToUint8Array;exports.isAddressFromPublicKey=o.isAddressFromPublicKey;exports.isValidHex=o.isValidHex;exports.processPublicKeyToXOnly=o.processPublicKeyToXOnly;exports.stripHexPrefix=o.stripHexPrefix;exports.toXOnly=o.toXOnly;exports.uint8ArrayToHex=o.uint8ArrayToHex;exports.validateWalletPubkey=o.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=d.BITCOIN_ADDRESS_RE;exports.HEX_RE=d.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=d.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=d.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=d.TXID_RE;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.PayoutManager=t.PayoutManager;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.computeHashlock=t.computeHashlock;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.pollAndSignPayouts=t.pollAndSignPayouts;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;exports.validateDepositAmount=t.validateDepositAmount;exports.validateMultiVaultDepositInputs=t.validateMultiVaultDepositInputs;exports.validateProviderSelection=t.validateProviderSelection;exports.validateRemainingCapacity=t.validateRemainingCapacity;exports.validateSecretAgainstHashlock=t.validateSecretAgainstHashlock;exports.validateVaultAmounts=t.validateVaultAmounts;exports.validateVaultProviderPubkey=t.validateVaultProviderPubkey;exports.waitForPeginStatus=t.waitForPeginStatus;exports.BTC_DUST_SAT=a.BTC_DUST_SAT;exports.DUST_THRESHOLD=a.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=a.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=a.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=a.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=a.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=a.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=a.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=a.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=a.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=a.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=a.fundPeginTransaction;exports.parseUnfundedWasmTransaction=a.parseUnfundedWasmTransaction;exports.peginOutputCount=a.peginOutputCount;exports.rateBasedTxBufferFee=a.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.VAULT_APP_NAME=r.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=r.buildFundingOutpointsCommitment;exports.buildVaultContext=r.buildVaultContext;exports.computeWotsBlockPublicKeysHash=r.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=r.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=r.deriveWotsBlocksFromSeed;exports.expandAuthAnchor=r.expandAuthAnchor;exports.expandHashlockSecret=r.expandHashlockSecret;exports.expandWotsSeed=r.expandWotsSeed;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.ApplicationRegistryABI=e.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=e.MEMPOOL_API_URLS;exports.ProtocolParamsABI=e.ProtocolParamsABI;exports.ServerIdentityError=e.ServerIdentityError;exports.VaultProviderRpcClient=e.VaultProviderRpcClient;exports.ViemProtocolParamsReader=e.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=e.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=e.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=e.ViemVaultRegistryReader;exports.VpResponseValidationError=e.VpResponseValidationError;exports.VpTokenProvider=e.VpTokenProvider;exports.getAddressTxs=e.getAddressTxs;exports.getAddressUtxos=e.getAddressUtxos;exports.getMempoolApiUrl=e.getMempoolApiUrl;exports.getNetworkFees=e.getNetworkFees;exports.getTxHex=e.getTxHex;exports.getTxInfo=e.getTxInfo;exports.getUtxoInfo=e.getUtxoInfo;exports.pushTx=e.pushTx;exports.resolveProtocolAddresses=e.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=e.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=e.verifyServerIdentity;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
package/dist/tbv/index.js
CHANGED
|
@@ -1,149 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { computeMinClaimValue as
|
|
3
|
-
import { a as S,
|
|
4
|
-
import { d as
|
|
5
|
-
import { C as
|
|
6
|
-
import { B as
|
|
7
|
-
import { B as
|
|
8
|
-
import { B as
|
|
9
|
-
import { B as
|
|
10
|
-
import { C as
|
|
11
|
-
import { A as
|
|
12
|
-
import { B as
|
|
1
|
+
import { h as e, g as t, d as r, a as o, b as i, c as n, e as l, f as u } from "../challengeAssert-mYikGC34.js";
|
|
2
|
+
import { computeMinClaimValue as P, deriveVaultId as c } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { a as p, d as S, c as A, b as E, f as g, e as R } from "../noPayout-B8JiTaYt.js";
|
|
4
|
+
import { d as m, a as x, e as b, f as I, g as f, h as v, i as C, b as U, p as O, s as V, t as h, u as y, v as N } from "../bitcoin-B-Y0DlqR.js";
|
|
5
|
+
import { C as B, P as D, a as M, c as H, g as L } from "../signing-BZigafm0.js";
|
|
6
|
+
import { B as W, H as X, K, M as w, T as G } from "../validation-CxqROCno.js";
|
|
7
|
+
import { B as J, C as j, P as Z, a as z, m as q, h as Q, i as $, l as aa, k as sa, p as ea, b as ta, s as ra, v as oa, g as ia, d as na, c as la, j as ua, e as da, f as Pa, w as ca } from "../buildAndBroadcastRefund-BY6mYmFl.js";
|
|
8
|
+
import { B as pa, D as Sa, F as Aa, L as Ea, M as ga, P as Ra, b as _a, a as ma, S as xa, T as ba, W as Ia, f as fa, c as va, p as Ca, r as Ua } from "../fundPeginTransaction-oV-dNJOU.js";
|
|
9
|
+
import { B as Va, U as ha, a as ya, f as Na, c as Fa, e as Ba, g as Da, i as Ma, h as Ha, s as La, b as ka, d as Wa, v as Xa } from "../psbtInputFields-DeTFSJOq.js";
|
|
10
|
+
import { C as wa, P as Ga, V as Ya, k as Ja, l as ja, c as Za, m as za, d as qa, b as Qa, f as $a, j as as, e as ss, g as es, h as ts, i as rs, a as os } from "../PeginManager-_pamUKlS.js";
|
|
11
|
+
import { A as ns, M as ls, P as us, S as ds, V as Ps, k as cs, l as Ts, m as ps, n as Ss, h as As, j as Es, g as gs, a as Rs, b as _s, c as ms, d as xs, e as bs, f as Is, p as fs, r as vs, v as Cs, i as Us } from "../vault-registry-reader-BywZhqJL.js";
|
|
12
|
+
import { B as Vs, D as hs, b as ys, J as Ns, a as Fs, d as Bs, P as Ds, R as Ms, c as Hs, V as Ls } from "../types-CnG3JsRs.js";
|
|
13
13
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
14
|
+
ns as ApplicationRegistryABI,
|
|
15
|
+
J as BIP68NotMatureError,
|
|
16
|
+
W as BITCOIN_ADDRESS_RE,
|
|
17
|
+
Vs as BTCVaultRegistryABI,
|
|
18
|
+
pa as BTC_DUST_SAT,
|
|
19
|
+
Va as BitcoinScriptType,
|
|
20
|
+
wa as CONTRACT_ERRORS,
|
|
21
|
+
j as ClaimerPegoutStatusValue,
|
|
22
|
+
B as ContractStatus,
|
|
23
|
+
Sa as DUST_THRESHOLD,
|
|
24
|
+
hs as DaemonStatus,
|
|
25
|
+
Aa as FEE_SAFETY_MARGIN,
|
|
26
|
+
X as HEX_RE,
|
|
27
|
+
ys as JSON_RPC_ERROR_CODES,
|
|
28
|
+
Ns as JsonRpcClient,
|
|
29
|
+
Fs as JsonRpcError,
|
|
30
|
+
K as KNOWN_SCRIPT_PREFIXES,
|
|
31
|
+
Ea as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
32
|
+
ga as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
33
|
+
w as MAX_REASONABLE_FEE_SATS,
|
|
34
|
+
ls as MEMPOOL_API_URLS,
|
|
35
|
+
Ra as P2TR_INPUT_SIZE,
|
|
36
|
+
_a as PEGIN_AUTH_ANCHOR_OUTPUTS,
|
|
37
|
+
ma as PEGIN_FIXED_OUTPUTS,
|
|
38
|
+
Bs as POST_WOTS_STATUSES,
|
|
39
|
+
Ds as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
40
|
+
Z as PayoutManager,
|
|
41
|
+
D as PeginAction,
|
|
42
|
+
Ga as PeginManager,
|
|
43
|
+
us as ProtocolParamsABI,
|
|
44
|
+
Ms as RpcErrorCode,
|
|
45
|
+
xa as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
46
|
+
ds as ServerIdentityError,
|
|
47
|
+
G as TXID_RE,
|
|
48
|
+
ba as TX_BUFFER_SIZE_OVERHEAD,
|
|
49
|
+
ha as UtxoNotAvailableError,
|
|
50
|
+
Ya as VAULT_APP_NAME,
|
|
51
|
+
Hs as VP_TERMINAL_STATUSES,
|
|
52
|
+
Ls as VP_TRANSIENT_STATUSES,
|
|
53
|
+
Ps as VaultProviderRpcClient,
|
|
54
|
+
cs as ViemProtocolParamsReader,
|
|
55
|
+
Ts as ViemUniversalChallengerReader,
|
|
56
|
+
ps as ViemVaultKeeperReader,
|
|
57
|
+
Ss as ViemVaultRegistryReader,
|
|
58
|
+
As as VpResponseValidationError,
|
|
59
|
+
Es as VpTokenProvider,
|
|
60
|
+
Ia as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
61
|
+
z as activateVault,
|
|
62
|
+
p as assertPayoutOutputMatchesRegistered,
|
|
63
|
+
ya as assertUtxosAvailable,
|
|
64
|
+
q as buildAndBroadcastRefund,
|
|
64
65
|
e as buildChallengeAssertPsbt,
|
|
65
66
|
t as buildDepositorPayoutPsbt,
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
67
|
+
Ja as buildFundingOutpointsCommitment,
|
|
68
|
+
S as buildNoPayoutPsbt,
|
|
69
|
+
A as buildPayoutPsbt,
|
|
70
|
+
r as buildPeginInputPsbt,
|
|
71
|
+
o as buildPeginTxFromFundedPrePegin,
|
|
72
|
+
i as buildPrePeginPsbt,
|
|
73
|
+
E as buildRefundPsbt,
|
|
74
|
+
ja as buildVaultContext,
|
|
75
|
+
Na as calculateBtcTxHash,
|
|
76
|
+
M as canPerformAction,
|
|
77
|
+
Fa as collectReservedUtxoRefs,
|
|
78
|
+
Q as computeHashlock,
|
|
79
|
+
P as computeMinClaimValue,
|
|
80
|
+
n as computeNumLocalChallengers,
|
|
81
|
+
Za as computeWotsBlockPublicKeysHash,
|
|
82
|
+
g as createPayoutScript,
|
|
83
|
+
H as createTaprootScriptPathSignOptions,
|
|
84
|
+
m as deriveNativeSegwitAddress,
|
|
85
|
+
x as deriveTaprootAddress,
|
|
86
|
+
c as deriveVaultId,
|
|
87
|
+
za as deriveVaultRoot,
|
|
88
|
+
qa as deriveWotsBlocksFromSeed,
|
|
89
|
+
b as ensureHexPrefix,
|
|
90
|
+
Qa as expandAuthAnchor,
|
|
91
|
+
$a as expandHashlockSecret,
|
|
92
|
+
as as expandWotsSeed,
|
|
93
|
+
ss as extractErrorData,
|
|
94
|
+
Ba as extractInputsFromTransaction,
|
|
95
|
+
R as extractPayoutSignature,
|
|
96
|
+
l as extractPeginInputSignature,
|
|
97
|
+
u as finalizePeginInputPsbt,
|
|
98
|
+
I as formatSatoshisToBtc,
|
|
99
|
+
fa as fundPeginTransaction,
|
|
100
|
+
gs as getAddressTxs,
|
|
101
|
+
Rs as getAddressUtxos,
|
|
102
|
+
es as getContractErrorMessage,
|
|
103
|
+
Da as getDustThreshold,
|
|
104
|
+
_s as getMempoolApiUrl,
|
|
105
|
+
f as getNetwork,
|
|
106
|
+
ms as getNetworkFees,
|
|
107
|
+
L as getPeginProtocolState,
|
|
108
|
+
Ma as getPsbtInputFields,
|
|
109
|
+
Ha as getScriptType,
|
|
110
|
+
xs as getTxHex,
|
|
111
|
+
bs as getTxInfo,
|
|
112
|
+
Is as getUtxoInfo,
|
|
113
|
+
ts as handleContractError,
|
|
114
|
+
v as hexToUint8Array,
|
|
115
|
+
C as isAddressFromPublicKey,
|
|
116
|
+
$ as isDepositAmountValid,
|
|
117
|
+
rs as isKnownContractError,
|
|
118
|
+
aa as isPegoutTerminalStatus,
|
|
119
|
+
sa as isRecognizedPegoutStatus,
|
|
120
|
+
U as isValidHex,
|
|
121
|
+
os as isWotsMismatchError,
|
|
122
|
+
va as parseUnfundedWasmTransaction,
|
|
123
|
+
Ca as peginOutputCount,
|
|
124
|
+
ea as pollAndSignPayouts,
|
|
125
|
+
O as processPublicKeyToXOnly,
|
|
126
|
+
fs as pushTx,
|
|
127
|
+
Ua as rateBasedTxBufferFee,
|
|
128
|
+
vs as resolveProtocolAddresses,
|
|
129
|
+
La as selectUtxosForDeposit,
|
|
130
|
+
ka as selectUtxosForPegin,
|
|
131
|
+
Wa as shouldAddChangeOutput,
|
|
132
|
+
ta as signDepositorGraph,
|
|
133
|
+
V as stripHexPrefix,
|
|
134
|
+
ra as submitWotsPublicKey,
|
|
135
|
+
h as toXOnly,
|
|
136
|
+
y as uint8ArrayToHex,
|
|
137
|
+
oa as validateDepositAmount,
|
|
138
|
+
ia as validateMultiVaultDepositInputs,
|
|
139
|
+
na as validateProviderSelection,
|
|
140
|
+
la as validateRemainingCapacity,
|
|
141
|
+
Cs as validateRequestDepositorClaimerArtifactsResponse,
|
|
142
|
+
ua as validateSecretAgainstHashlock,
|
|
143
|
+
Xa as validateUtxosAvailable,
|
|
144
|
+
da as validateVaultAmounts,
|
|
145
|
+
Pa as validateVaultProviderPubkey,
|
|
146
|
+
N as validateWalletPubkey,
|
|
147
|
+
Us as verifyServerIdentity,
|
|
148
|
+
ca as waitForPeginStatus
|
|
148
149
|
};
|
|
149
150
|
//# sourceMappingURL=index.js.map
|