@babylonlabs-io/ts-sdk 0.48.1 → 0.48.2
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-BbemBIo9.js → PayoutManager-D02AePm4.js} +78 -65
- package/dist/PayoutManager-D02AePm4.js.map +1 -0
- package/dist/PayoutManager-DD1audlx.cjs +2 -0
- package/dist/PayoutManager-DD1audlx.cjs.map +1 -0
- package/dist/{PeginManager-BMO6R9I9.js → PeginManager-6seoi9mV.js} +217 -198
- package/dist/PeginManager-6seoi9mV.js.map +1 -0
- package/dist/PeginManager-CHZieoEQ.cjs +2 -0
- package/dist/PeginManager-CHZieoEQ.cjs.map +1 -0
- package/dist/buildAndBroadcastRefund-Bi07LxuY.cjs +2 -0
- package/dist/buildAndBroadcastRefund-Bi07LxuY.cjs.map +1 -0
- package/dist/{buildAndBroadcastRefund-hM9Wo0VZ.js → buildAndBroadcastRefund-DXHs6unL.js} +448 -422
- package/dist/buildAndBroadcastRefund-DXHs6unL.js.map +1 -0
- package/dist/{challengeAssert-1fy_EzAi.js → challengeAssert-ChvLypwc.js} +7 -7
- package/dist/{challengeAssert-1fy_EzAi.js.map → challengeAssert-ChvLypwc.js.map} +1 -1
- package/dist/challengeAssert-Culc7DoS.cjs +2 -0
- package/dist/{challengeAssert-DEw-z3n9.cjs.map → challengeAssert-Culc7DoS.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +170 -169
- package/dist/{noPayout-BwSaoU7w.js → noPayout-CA4-x5vZ.js} +2 -2
- package/dist/{noPayout-BwSaoU7w.js.map → noPayout-CA4-x5vZ.js.map} +1 -1
- package/dist/noPayout-CJ_Acpl_.cjs +2 -0
- package/dist/{noPayout-B2Xd40nk.cjs.map → noPayout-CJ_Acpl_.cjs.map} +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +168 -167
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.d.ts +8 -7
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +30 -29
- package/dist/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.d.ts +14 -0
- package/dist/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature.d.ts +53 -0
- package/dist/tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +2 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +168 -167
- package/dist/verifyScriptPathSchnorrSignature-D43cncKJ.cjs +2 -0
- package/dist/verifyScriptPathSchnorrSignature-D43cncKJ.cjs.map +1 -0
- package/dist/verifyScriptPathSchnorrSignature-DFJAEleY.js +563 -0
- package/dist/verifyScriptPathSchnorrSignature-DFJAEleY.js.map +1 -0
- package/package.json +1 -1
- package/dist/PayoutManager-BLpgkfOS.cjs +0 -2
- package/dist/PayoutManager-BLpgkfOS.cjs.map +0 -1
- package/dist/PayoutManager-BbemBIo9.js.map +0 -1
- package/dist/PeginManager-BMO6R9I9.js.map +0 -1
- package/dist/PeginManager-CfkjDMy7.cjs +0 -2
- package/dist/PeginManager-CfkjDMy7.cjs.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js +0 -481
- package/dist/assertPsbtUnsignedTxMatches-BHyBdtxs.js.map +0 -1
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs +0 -2
- package/dist/assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-CLvF5ETe.cjs +0 -2
- package/dist/buildAndBroadcastRefund-CLvF5ETe.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-hM9Wo0VZ.js.map +0 -1
- package/dist/challengeAssert-DEw-z3n9.cjs +0 -2
- package/dist/noPayout-B2Xd40nk.cjs +0 -2
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
* @module primitives
|
|
75
75
|
*/
|
|
76
76
|
export { computeNumLocalChallengers } from './challengers';
|
|
77
|
-
export type { Network } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
78
77
|
export { computeMinClaimValue, computeMinPeginFee, deriveVaultId, } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
78
|
+
export type { AssertPayoutNoPayoutConnectorParams, ChallengeAssertConnectorParams, Network, PayoutConnectorParams, } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
79
79
|
/**
|
|
80
80
|
* 0x-prefixed bytes32, keccak256(abi.encode(peginTxHash, depositor)).
|
|
81
81
|
* On-chain vault identifier used by BTCVaultRegistry contract.
|
|
@@ -84,17 +84,18 @@ export { computeMinClaimValue, computeMinPeginFee, deriveVaultId, } from '@babyl
|
|
|
84
84
|
* Derive with `deriveVaultId(peginTxHash, depositorAddress)`.
|
|
85
85
|
*/
|
|
86
86
|
export type VaultId = `0x${string}`;
|
|
87
|
-
export
|
|
88
|
-
export {
|
|
89
|
-
export
|
|
90
|
-
export { buildPeginInputPsbt, extractPeginInputSignature, finalizePeginInputPsbt } from './psbt/peginInput';
|
|
87
|
+
export { buildPeginTxFromFundedPrePegin, buildPrePeginPsbt, } from './psbt/pegin';
|
|
88
|
+
export type { BuildPeginTxParams, PeginTxResult, PrePeginParams, PrePeginPsbtResult, } from './psbt/pegin';
|
|
89
|
+
export { buildPeginInputPsbt, extractPeginInputSignature, finalizePeginInputPsbt, } from './psbt/peginInput';
|
|
91
90
|
export type { BuildPeginInputPsbtParams, BuildPeginInputPsbtResult, } from './psbt/peginInput';
|
|
92
91
|
export { buildRefundPsbt } from './psbt/refund';
|
|
93
92
|
export type { BuildRefundPsbtParams, BuildRefundPsbtResult, } from './psbt/refund';
|
|
94
93
|
export { buildPayoutPsbt, extractPayoutSignature } from './psbt/payout';
|
|
95
94
|
export type { PayoutParams, PayoutPsbtResult } from './psbt/payout';
|
|
96
|
-
export {
|
|
95
|
+
export { PsbtSubstitutionError, assertPsbtUnsignedTxMatches, } from './psbt/assertPsbtUnsignedTxMatches';
|
|
97
96
|
export type { AssertPsbtUnsignedTxMatchesParams } from './psbt/assertPsbtUnsignedTxMatches';
|
|
97
|
+
export { assertScriptPathSchnorrSignature } from './psbt/verifyScriptPathSchnorrSignature';
|
|
98
|
+
export type { VerifyScriptPathSchnorrSignatureParams } from './psbt/verifyScriptPathSchnorrSignature';
|
|
98
99
|
export { buildDepositorPayoutPsbt } from './psbt/depositorPayout';
|
|
99
100
|
export type { DepositorPayoutParams } from './psbt/depositorPayout';
|
|
100
101
|
export { buildNoPayoutPsbt } from './psbt/noPayout';
|
|
@@ -103,5 +104,5 @@ export { buildChallengeAssertPsbt } from './psbt/challengeAssert';
|
|
|
103
104
|
export type { ChallengeAssertParams } from './psbt/challengeAssert';
|
|
104
105
|
export { createPayoutScript } from './scripts/payout';
|
|
105
106
|
export type { PayoutScriptParams, PayoutScriptResult } from './scripts/payout';
|
|
106
|
-
export { deriveBip86ScriptPubKeyHex, deriveNativeSegwitAddress, deriveTaprootAddress, getSortedXOnlyPubkeys, hexToUint8Array, isAddressFromPublicKey, isValidHex,
|
|
107
|
+
export { deriveBip86ScriptPubKeyHex, deriveNativeSegwitAddress, deriveTaprootAddress, ensureHexPrefix, formatSatoshisToBtc, getSortedXOnlyPubkeys, hexToUint8Array, isAddressFromPublicKey, isValidHex, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './utils/bitcoin';
|
|
107
108
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/primitives/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0EG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,GACd,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,OAAO,EACP,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAE/C;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAGpC,OAAO,EACL,8BAA8B,EAC9B,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,YAAY,EACV,kBAAkB,EAClB,aAAa,EACb,cAAc,EACd,kBAAkB,GACnB,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,mBAAmB,EACnB,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,YAAY,EACV,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACxE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EACL,qBAAqB,EACrB,2BAA2B,GAC5B,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EAAE,iCAAiC,EAAE,MAAM,oCAAoC,CAAC;AAE5F,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAC3F,YAAY,EAAE,sCAAsC,EAAE,MAAM,yCAAyC,CAAC;AAEtG,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAGpE,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAG/E,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,eAAe,EACf,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,EACf,sBAAsB,EACtB,UAAU,EACV,uBAAuB,EACvB,cAAc,EACd,OAAO,EACP,eAAe,EACf,oBAAoB,EACpB,KAAK,4BAA4B,GAClC,MAAM,iBAAiB,CAAC"}
|
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
import { a, b as t, c as r } from "../../../challengeAssert-
|
|
1
|
+
import { a, b as t, c as r } from "../../../challengeAssert-ChvLypwc.js";
|
|
2
2
|
import { computeMinClaimValue as o, computeMinPeginFee as u, deriveVaultId as P } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import { P as
|
|
4
|
-
import { b as
|
|
5
|
-
import { a as T, b as
|
|
6
|
-
import { d as
|
|
3
|
+
import { P as b, d, f as l, c as p, b as c, a as x, g, e as y } from "../../../verifyScriptPathSchnorrSignature-DFJAEleY.js";
|
|
4
|
+
import { b as m, e as S, f as h } from "../../../peginInput-BPRB9tUi.js";
|
|
5
|
+
import { a as T, b as A } from "../../../noPayout-CA4-x5vZ.js";
|
|
6
|
+
import { d as F, a as I, b as C, e as K, f as M, g as N, h as O, i as V, c as X, p as k, s as B, t as U, u as w, v as z } from "../../../bitcoin-B5aNKtsk.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
b as PsbtSubstitutionError,
|
|
9
|
+
d as assertPsbtUnsignedTxMatches,
|
|
10
|
+
l as assertScriptPathSchnorrSignature,
|
|
10
11
|
a as buildChallengeAssertPsbt,
|
|
11
12
|
t as buildDepositorPayoutPsbt,
|
|
12
13
|
T as buildNoPayoutPsbt,
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
p as buildPayoutPsbt,
|
|
15
|
+
m as buildPeginInputPsbt,
|
|
16
|
+
c as buildPeginTxFromFundedPrePegin,
|
|
16
17
|
x as buildPrePeginPsbt,
|
|
17
|
-
|
|
18
|
+
A as buildRefundPsbt,
|
|
18
19
|
o as computeMinClaimValue,
|
|
19
20
|
u as computeMinPeginFee,
|
|
20
21
|
r as computeNumLocalChallengers,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
g as createPayoutScript,
|
|
23
|
+
F as deriveBip86ScriptPubKeyHex,
|
|
24
|
+
I as deriveNativeSegwitAddress,
|
|
25
|
+
C as deriveTaprootAddress,
|
|
25
26
|
P as deriveVaultId,
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
K as ensureHexPrefix,
|
|
28
|
+
y as extractPayoutSignature,
|
|
29
|
+
S as extractPeginInputSignature,
|
|
30
|
+
h as finalizePeginInputPsbt,
|
|
31
|
+
M as formatSatoshisToBtc,
|
|
32
|
+
N as getSortedXOnlyPubkeys,
|
|
33
|
+
O as hexToUint8Array,
|
|
34
|
+
V as isAddressFromPublicKey,
|
|
35
|
+
X as isValidHex,
|
|
36
|
+
k as processPublicKeyToXOnly,
|
|
37
|
+
B as stripHexPrefix,
|
|
38
|
+
U as toXOnly,
|
|
39
|
+
w as uint8ArrayToHex,
|
|
40
|
+
z as validateWalletPubkey
|
|
40
41
|
};
|
|
41
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tests for assertScriptPathSchnorrSignature — BIP-340 verification of a
|
|
3
|
+
* wallet-returned Taproot script-path signature against an independently
|
|
4
|
+
* recomputed sighash (Critical Path #7).
|
|
5
|
+
*
|
|
6
|
+
* The positive cases build a PSBT exactly as the SDK does (witnessUtxo on every
|
|
7
|
+
* input, one tapLeafScript on the signed input), compute the real BIP-341
|
|
8
|
+
* script-path sighash, and sign it with a test key. The negative cases model the
|
|
9
|
+
* threat scenarios the guard exists for: a tweaked/wrong-key signature, a tampered
|
|
10
|
+
* signature, and a wallet that keeps the unsigned tx but substitutes prevout
|
|
11
|
+
* metadata.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=verifyScriptPathSchnorrSignature.test.d.ts.map
|
package/dist/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyScriptPathSchnorrSignature.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/verifyScriptPathSchnorrSignature.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Independent BIP-340 verification of a wallet-returned Taproot script-path
|
|
3
|
+
* Schnorr signature against an independently-recomputed sighash.
|
|
4
|
+
*
|
|
5
|
+
* Critical Path #7 (CLAUDE.md): the SDK requests script-path signatures with
|
|
6
|
+
* `useTweakedSigner: false, autoFinalized: false`. Wallet support for the
|
|
7
|
+
* untweaked-key flag is inconsistent — older OKX / mobile bridges silently sign
|
|
8
|
+
* with the *tweaked* key, Keystone ignores the flag — and a compromised
|
|
9
|
+
* extension can stuff a 64-byte stub into `tapScriptSig`. A bad signature that
|
|
10
|
+
* the SDK forwards is only caught on broadcast; in the worst case it passes the
|
|
11
|
+
* VP off-chain but Bitcoin rejects it, leaving the depositor's BTC locked in the
|
|
12
|
+
* HTLC until `timelockRefund` matures. This guard rejects such signatures before
|
|
13
|
+
* they are trusted.
|
|
14
|
+
*
|
|
15
|
+
* Why verify against the *locally-built* PSBT, not the wallet-returned one:
|
|
16
|
+
* `assertPsbtUnsignedTxMatches` pins the unsigned transaction but deliberately
|
|
17
|
+
* skips per-input metadata (`witnessUtxo`, `tapLeafScript`). A malicious wallet
|
|
18
|
+
* could rewrite those consistently in the returned PSBT so a wrong-message
|
|
19
|
+
* signature self-validates. The trusted prevout scripts/values and leaf script
|
|
20
|
+
* therefore come from the PSBT we built ourselves (derived from on-chain / WASM
|
|
21
|
+
* sources); only the 64-byte signature comes from the wallet.
|
|
22
|
+
*
|
|
23
|
+
* Reuses the exact primitives `bip322Verify.ts` already depends on — no new
|
|
24
|
+
* dependency:
|
|
25
|
+
* - `@bitcoin-js/tiny-secp256k1-asmjs` → `verifySchnorr`
|
|
26
|
+
* - `bitcoinjs-lib` → `Transaction.hashForWitnessV1`, `crypto.taggedHash` (TapLeaf hash)
|
|
27
|
+
*
|
|
28
|
+
* @module tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature
|
|
29
|
+
*/
|
|
30
|
+
export interface VerifyScriptPathSchnorrSignatureParams {
|
|
31
|
+
/**
|
|
32
|
+
* Hex of the PSBT we built locally and sent to the wallet (the trusted
|
|
33
|
+
* source of prevout scripts/values and the leaf script). NOT the
|
|
34
|
+
* wallet-returned PSBT.
|
|
35
|
+
*/
|
|
36
|
+
requestedPsbtHex: string;
|
|
37
|
+
/** The 64-byte Schnorr signature extracted from the wallet's response (128 hex chars). */
|
|
38
|
+
signatureHex: string;
|
|
39
|
+
/** X-only public key (64 hex chars) the wallet signed the script-path leaf with. */
|
|
40
|
+
signerXOnlyPubkeyHex: string;
|
|
41
|
+
/** Index of the input the signature is for. */
|
|
42
|
+
inputIndex: number;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Assert that `signatureHex` is a valid BIP-340 Schnorr signature by the
|
|
46
|
+
* `signerXOnlyPubkeyHex` key over the Taproot script-path sighash of
|
|
47
|
+
* `requestedPsbtHex` input `inputIndex` (SIGHASH_DEFAULT).
|
|
48
|
+
*
|
|
49
|
+
* @throws If the requested PSBT is malformed, lacks the prevout/leaf data needed
|
|
50
|
+
* to recompute the sighash, or the signature does not verify.
|
|
51
|
+
*/
|
|
52
|
+
export declare function assertScriptPathSchnorrSignature(params: VerifyScriptPathSchnorrSignatureParams): void;
|
|
53
|
+
//# sourceMappingURL=verifyScriptPathSchnorrSignature.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyScriptPathSchnorrSignature.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/verifyScriptPathSchnorrSignature.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AA4DH,MAAM,WAAW,sCAAsC;IACrD;;;;OAIG;IACH,gBAAgB,EAAE,MAAM,CAAC;IACzB,0FAA0F;IAC1F,YAAY,EAAE,MAAM,CAAC;IACrB,oFAAoF;IACpF,oBAAoB,EAAE,MAAM,CAAC;IAC7B,+CAA+C;IAC/C,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,sCAAsC,GAC7C,IAAI,CAmGN"}
|
|
@@ -1 +1 @@
|
|
|
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,
|
|
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,EACV,aAAa,EAEd,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EACV,+BAA+B,EAC/B,0BAA0B,EAG3B,MAAM,oCAAoC,CAAC;AAyd5C;;;;;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,CA2C1C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../../PayoutManager-DD1audlx.cjs"),t=require("../../../buildAndBroadcastRefund-Bi07LxuY.cjs"),e=require("../../../peginState-BijNNT15.cjs");exports.computeHashlock=a.computeHashlock;exports.validateSecretAgainstHashlock=a.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;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.RegisteredVaultVersionMismatchError=t.RegisteredVaultVersionMismatchError;exports.activateVault=t.activateVault;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=t.runDepositorPresignFlow;exports.signDepositorGraph=t.signDepositorGraph;exports.submitWotsPublicKey=t.submitWotsPublicKey;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.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=e.ContractStatus;exports.PeginAction=e.PeginAction;exports.canPerformAction=e.canPerformAction;exports.getPeginProtocolState=e.getPeginProtocolState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as s, v as e } from "../../../PayoutManager-
|
|
2
|
-
import { B as o, C as r, p as u, q as n, t as l, u as c, R as d, a as R, n as g, o as E, i as m, m as A, l as P, j as p, r as v, b as V, s as _, v as F, g as S, h as D, d as N, c as M, e as f, f as C, k as h, w as T } from "../../../buildAndBroadcastRefund-
|
|
1
|
+
import { c as s, v as e } from "../../../PayoutManager-D02AePm4.js";
|
|
2
|
+
import { B as o, C as r, p as u, q as n, t as l, u as c, R as d, a as R, n as g, o as E, i as m, m as A, l as P, j as p, r as v, b as V, s as _, v as F, g as S, h as D, d as N, c as M, e as f, f as C, k as h, w as T } from "../../../buildAndBroadcastRefund-DXHs6unL.js";
|
|
3
3
|
import { C as O, P as b, c as y, g as U } from "../../../peginState-CBAlxgXk.js";
|
|
4
4
|
export {
|
|
5
5
|
o as BIP68NotMatureError,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAGL,KAAK,OAAO,EACb,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEzC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qDAAqD,CAAC;
|
|
1
|
+
{"version":3,"file":"buildAndBroadcastRefund.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/refund/buildAndBroadcastRefund.ts"],"names":[],"mappings":"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"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../challengeAssert-DEw-z3n9.cjs"),l=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../assertPsbtUnsignedTxMatches-s9H0Qqkl.cjs"),A=require("../peginInput-DH6X4ITS.cjs"),S=require("../noPayout-B2Xd40nk.cjs"),r=require("../bitcoin-CHfKAhcI.cjs"),R=require("../signing-Bnsro0hE.cjs"),P=require("../validation-u8W7Lp2x.cjs"),n=require("../PeginManager-CfkjDMy7.cjs"),p=require("../PayoutManager-BLpgkfOS.cjs"),_=require("../ApplicationRegistry.abi-BAPhJch3.cjs"),m=require("../BTCVaultRegistry.abi-JdeqLz4x.cjs"),d=require("../errors-CGcNP0rV.cjs"),o=require("../waitForTransactionReceiptSmartAware-U706oKTc.cjs"),t=require("../fundPeginTransaction-DuMwnytD.cjs"),c=require("../reservation-xTL2a9Q-.cjs"),a=require("../mempoolApi-C_9JhjCI.cjs"),i=require("../primeVpAuth-Br6RwE3r.cjs"),s=require("../types-WA0LrDk1.cjs"),g=require("../errors-Bu0H-dZD.cjs"),e=require("../buildAndBroadcastRefund-CLvF5ETe.cjs"),T=require("../peginState-BijNNT15.cjs");exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=E.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=E.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>l.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>l.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>l.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>l.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>l.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>l.expandWotsSeed});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=A.buildPeginInputPsbt;exports.extractPeginInputSignature=A.extractPeginInputSignature;exports.finalizePeginInputPsbt=A.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=S.buildNoPayoutPsbt;exports.buildRefundPsbt=S.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.createTaprootScriptPathSignOptions=R.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=P.BITCOIN_ADDRESS_RE;exports.HEX_RE=P.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=P.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=P.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=P.TXID_RE;exports.PeginManager=n.PeginManager;exports.VAULT_APP_NAME=n.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=n.buildFundingOutpointsCommitment;exports.buildVaultContext=n.buildVaultContext;exports.computeWotsBlockPublicKeysHash=n.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=n.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=n.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=n.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=p.PayoutManager;exports.computeHashlock=p.computeHashlock;exports.validateSecretAgainstHashlock=p.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=m.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=d.CONTRACT_ERRORS;exports.extractErrorData=d.extractErrorData;exports.getContractErrorMessage=d.getContractErrorMessage;exports.handleContractError=d.handleContractError;exports.isKnownContractError=d.isKnownContractError;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=t.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=c.UtxoNotAvailableError;exports.assertUtxosAvailable=c.assertUtxosAvailable;exports.extractInputsFromTransaction=c.extractInputsFromTransaction;exports.findOverlappingPendingVaults=c.findOverlappingPendingVaults;exports.validateUtxosAvailable=c.validateUtxosAvailable;exports.MEMPOOL_API_URLS=a.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=a.ViemVaultRegistryReader;exports.getAddressTxs=a.getAddressTxs;exports.getAddressUtxos=a.getAddressUtxos;exports.getMempoolApiUrl=a.getMempoolApiUrl;exports.getNetworkFees=a.getNetworkFees;exports.getTipHeight=a.getTipHeight;exports.getTxHex=a.getTxHex;exports.getTxInfo=a.getTxInfo;exports.getUtxoInfo=a.getUtxoInfo;exports.pushTx=a.pushTx;exports.validateOffchainParams=a.validateOffchainParams;exports.validatePegInConfiguration=a.validatePegInConfiguration;exports.validateTBVProtocolParams=a.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=i.OnChainBtcVaultStatus;exports.ServerIdentityError=i.ServerIdentityError;exports.VaultProviderRpcClient=i.VaultProviderRpcClient;exports.ViemProtocolParamsReader=i.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=i.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=i.ViemVaultKeeperReader;exports.VpResponseValidationError=i.VpResponseValidationError;exports.VpTokenRegistry=i.VpTokenRegistry;exports.batchPollByProvider=i.batchPollByProvider;exports.createAuthenticatedVpClient=i.createAuthenticatedVpClient;exports.primeVpTokenRegistry=i.primeVpTokenRegistry;exports.resolveProtocolAddresses=i.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=i.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=i.verifyServerIdentity;exports.vpTokenRegistry=i.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;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_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=g.isWotsMismatchError;exports.parseFundingOutpointsFromTx=g.parseFundingOutpointsFromTx;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../challengeAssert-Culc7DoS.cjs"),l=require("@babylonlabs-io/babylon-tbv-rust-wasm"),n=require("../verifyScriptPathSchnorrSignature-D43cncKJ.cjs"),S=require("../peginInput-DH6X4ITS.cjs"),A=require("../noPayout-CJ_Acpl_.cjs"),r=require("../bitcoin-CHfKAhcI.cjs"),R=require("../signing-Bnsro0hE.cjs"),c=require("../validation-u8W7Lp2x.cjs"),u=require("../PeginManager-CHZieoEQ.cjs"),p=require("../PayoutManager-DD1audlx.cjs"),_=require("../ApplicationRegistry.abi-BAPhJch3.cjs"),m=require("../BTCVaultRegistry.abi-JdeqLz4x.cjs"),P=require("../errors-CGcNP0rV.cjs"),o=require("../waitForTransactionReceiptSmartAware-U706oKTc.cjs"),t=require("../fundPeginTransaction-DuMwnytD.cjs"),d=require("../reservation-xTL2a9Q-.cjs"),a=require("../mempoolApi-C_9JhjCI.cjs"),i=require("../primeVpAuth-Br6RwE3r.cjs"),s=require("../types-WA0LrDk1.cjs"),g=require("../errors-Bu0H-dZD.cjs"),e=require("../buildAndBroadcastRefund-Bi07LxuY.cjs"),T=require("../peginState-BijNNT15.cjs");exports.buildChallengeAssertPsbt=E.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=E.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=E.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>l.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>l.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>l.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>l.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>l.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>l.expandWotsSeed});exports.PsbtSubstitutionError=n.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=n.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=n.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=n.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.createPayoutScript=n.createPayoutScript;exports.extractPayoutSignature=n.extractPayoutSignature;exports.buildPeginInputPsbt=S.buildPeginInputPsbt;exports.extractPeginInputSignature=S.extractPeginInputSignature;exports.finalizePeginInputPsbt=S.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=A.buildNoPayoutPsbt;exports.buildRefundPsbt=A.buildRefundPsbt;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.createTaprootScriptPathSignOptions=R.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=c.BITCOIN_ADDRESS_RE;exports.HEX_RE=c.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=c.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=c.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=c.TXID_RE;exports.PeginManager=u.PeginManager;exports.VAULT_APP_NAME=u.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=u.buildFundingOutpointsCommitment;exports.buildVaultContext=u.buildVaultContext;exports.computeWotsBlockPublicKeysHash=u.computeWotsBlockPublicKeysHash;exports.deriveVaultRoot=u.deriveVaultRoot;exports.deriveWotsBlocksFromSeed=u.deriveWotsBlocksFromSeed;exports.estimateSubmitPeginRequestBatchGas=u.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=p.PayoutManager;exports.computeHashlock=p.computeHashlock;exports.validateSecretAgainstHashlock=p.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=m.BTCVaultRegistryABI;exports.CONTRACT_ERRORS=P.CONTRACT_ERRORS;exports.extractErrorData=P.extractErrorData;exports.getContractErrorMessage=P.getContractErrorMessage;exports.handleContractError=P.handleContractError;exports.isKnownContractError=P.isKnownContractError;exports.BitcoinScriptType=o.BitcoinScriptType;exports.applyChangeOutputPolicy=o.applyChangeOutputPolicy;exports.calculateBtcTxHash=o.calculateBtcTxHash;exports.computeChangeOutputFeeSats=o.computeChangeOutputFeeSats;exports.computeMaxDeposit=o.computeMaxDeposit;exports.computePeginBaseFeeSats=o.computePeginBaseFeeSats;exports.getDustThreshold=o.getDustThreshold;exports.getPsbtInputFields=o.getPsbtInputFields;exports.getScriptType=o.getScriptType;exports.selectUtxosForPegin=o.selectUtxosForPegin;exports.shouldAddChangeOutput=o.shouldAddChangeOutput;exports.waitForTransactionReceiptSmartAware=o.waitForTransactionReceiptSmartAware;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=t.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=t.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=t.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.UtxoNotAvailableError=d.UtxoNotAvailableError;exports.assertUtxosAvailable=d.assertUtxosAvailable;exports.extractInputsFromTransaction=d.extractInputsFromTransaction;exports.findOverlappingPendingVaults=d.findOverlappingPendingVaults;exports.validateUtxosAvailable=d.validateUtxosAvailable;exports.MEMPOOL_API_URLS=a.MEMPOOL_API_URLS;exports.ViemVaultRegistryReader=a.ViemVaultRegistryReader;exports.getAddressTxs=a.getAddressTxs;exports.getAddressUtxos=a.getAddressUtxos;exports.getMempoolApiUrl=a.getMempoolApiUrl;exports.getNetworkFees=a.getNetworkFees;exports.getTipHeight=a.getTipHeight;exports.getTxHex=a.getTxHex;exports.getTxInfo=a.getTxInfo;exports.getUtxoInfo=a.getUtxoInfo;exports.pushTx=a.pushTx;exports.validateOffchainParams=a.validateOffchainParams;exports.validatePegInConfiguration=a.validatePegInConfiguration;exports.validateTBVProtocolParams=a.validateTBVProtocolParams;exports.OnChainBtcVaultStatus=i.OnChainBtcVaultStatus;exports.ServerIdentityError=i.ServerIdentityError;exports.VaultProviderRpcClient=i.VaultProviderRpcClient;exports.ViemProtocolParamsReader=i.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=i.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=i.ViemVaultKeeperReader;exports.VpResponseValidationError=i.VpResponseValidationError;exports.VpTokenRegistry=i.VpTokenRegistry;exports.batchPollByProvider=i.batchPollByProvider;exports.createAuthenticatedVpClient=i.createAuthenticatedVpClient;exports.primeVpTokenRegistry=i.primeVpTokenRegistry;exports.resolveProtocolAddresses=i.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=i.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=i.verifyServerIdentity;exports.vpTokenRegistry=i.vpTokenRegistry;exports.AUTH_EXPIRED_DATA_KIND=s.AUTH_EXPIRED_DATA_KIND;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_BATCH_MAX_SIZE=s.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=s.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;exports.isWotsMismatchError=g.isWotsMismatchError;exports.parseFundingOutpointsFromTx=g.parseFundingOutpointsFromTx;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|