@babylonlabs-io/ts-sdk 0.61.0 → 0.62.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-BLBB_vMl.cjs +2 -0
- package/dist/PeginManager-BLBB_vMl.cjs.map +1 -0
- package/dist/{PeginManager-C2vPVud-.js → PeginManager-Dj6_tWRA.js} +78 -67
- package/dist/PeginManager-Dj6_tWRA.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-CoPc7UHA.js → buildAndBroadcastRefund-CH2awK6h.js} +552 -447
- package/dist/buildAndBroadcastRefund-CH2awK6h.js.map +1 -0
- package/dist/buildAndBroadcastRefund-CYzhA_B8.cjs +2 -0
- package/dist/buildAndBroadcastRefund-CYzhA_B8.cjs.map +1 -0
- package/dist/errors-D2zp7Vzk.cjs +2 -0
- package/dist/errors-D2zp7Vzk.cjs.map +1 -0
- package/dist/errors-lMX8Q6zb.js +137 -0
- package/dist/errors-lMX8Q6zb.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +204 -193
- package/dist/{noPayout-qUEtRKc_.cjs → noPayout-CbxQqBw1.cjs} +2 -2
- package/dist/{noPayout-qUEtRKc_.cjs.map → noPayout-CbxQqBw1.cjs.map} +1 -1
- package/dist/{noPayout-DuE-UyhQ.js → noPayout-oaUVsEjk.js} +2 -2
- package/dist/{noPayout-DuE-UyhQ.js.map → noPayout-oaUVsEjk.js.map} +1 -1
- package/dist/parseFundingOutpoints-CIO9Ok1L.cjs +2 -0
- package/dist/parseFundingOutpoints-CIO9Ok1L.cjs.map +1 -0
- package/dist/parseFundingOutpoints-pBRE11Hr.js +92 -0
- package/dist/parseFundingOutpoints-pBRE11Hr.js.map +1 -0
- package/dist/{signPsbtsWithFallback-eY1YgV13.js → signPsbtsWithFallback-DC4rUCsy.js} +5 -5
- package/dist/{signPsbtsWithFallback-eY1YgV13.js.map → signPsbtsWithFallback-DC4rUCsy.js.map} +1 -1
- package/dist/{signPsbtsWithFallback-Xs4jZw5z.cjs → signPsbtsWithFallback-DbOmw8Ou.cjs} +2 -2
- package/dist/{signPsbtsWithFallback-Xs4jZw5z.cjs.map → signPsbtsWithFallback-DbOmw8Ou.cjs.map} +1 -1
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsCore.test.d.ts +16 -0
- package/dist/tbv/core/deposit-terms/__tests__/rebuildDepositTermsCore.test.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/commissionCeiling.d.ts +33 -0
- package/dist/tbv/core/deposit-terms/commissionCeiling.d.ts.map +1 -0
- package/dist/tbv/core/deposit-terms/index.d.ts +2 -0
- package/dist/tbv/core/deposit-terms/index.d.ts.map +1 -1
- package/dist/tbv/core/deposit-terms/rebuildDepositTermsCore.d.ts +36 -0
- package/dist/tbv/core/deposit-terms/rebuildDepositTermsCore.d.ts.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +200 -189
- package/dist/tbv/core/managers/PeginManager.d.ts +8 -0
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/__tests__/PeginManager.rebuildDepositTerms.test.d.ts +12 -0
- package/dist/tbv/core/managers/__tests__/PeginManager.rebuildDepositTerms.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/index.cjs +1 -1
- package/dist/tbv/core/managers/index.js +2 -2
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.js +2 -2
- package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts +3 -0
- package/dist/tbv/core/primitives/psbt/assertWasmPeginSizing.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/__tests__/peginRegistrationDepth.test.d.ts +2 -0
- package/dist/tbv/core/services/deposit/__tests__/peginRegistrationDepth.test.d.ts.map +1 -0
- package/dist/tbv/core/services/deposit/index.d.ts +1 -0
- package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/peginRegistrationDepth.d.ts +87 -0
- package/dist/tbv/core/services/deposit/peginRegistrationDepth.d.ts.map +1 -0
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +48 -42
- package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts +11 -0
- package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts.map +1 -1
- package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts +4 -0
- package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts.map +1 -1
- package/dist/tbv/core/vault-secrets/index.cjs +1 -1
- package/dist/tbv/core/vault-secrets/index.d.ts +1 -1
- package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
- package/dist/tbv/core/vault-secrets/index.js +9 -8
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +200 -189
- package/dist/{verifyScriptPathSchnorrSignature-CYjK4IP_.cjs → verifyScriptPathSchnorrSignature-B8zK1ctE.cjs} +2 -2
- package/dist/verifyScriptPathSchnorrSignature-B8zK1ctE.cjs.map +1 -0
- package/dist/{verifyScriptPathSchnorrSignature-Bav08_7R.js → verifyScriptPathSchnorrSignature-XsICweGG.js} +2 -1
- package/dist/verifyScriptPathSchnorrSignature-XsICweGG.js.map +1 -0
- package/dist/waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs.map +1 -1
- package/dist/waitForTransactionReceiptSmartAware-lobLm0q0.js.map +1 -1
- package/package.json +1 -1
- package/dist/PeginManager-C2vPVud-.js.map +0 -1
- package/dist/PeginManager-Cu5Dh6L-.cjs +0 -2
- package/dist/PeginManager-Cu5Dh6L-.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-BqYlx6rb.cjs +0 -2
- package/dist/buildAndBroadcastRefund-BqYlx6rb.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-CoPc7UHA.js.map +0 -1
- package/dist/errors-2aF9oRwM.cjs +0 -2
- package/dist/errors-2aF9oRwM.cjs.map +0 -1
- package/dist/errors-kXGQXKxZ.js +0 -28
- package/dist/errors-kXGQXKxZ.js.map +0 -1
- package/dist/parseFundingOutpoints-DUuOAUjA.cjs +0 -2
- package/dist/parseFundingOutpoints-DUuOAUjA.cjs.map +0 -1
- package/dist/parseFundingOutpoints-deCXK7ft.js +0 -86
- package/dist/parseFundingOutpoints-deCXK7ft.js.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-Bav08_7R.js.map +0 -1
- package/dist/verifyScriptPathSchnorrSignature-CYjK4IP_.cjs.map +0 -1
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { VaultBasicInfo, VaultRegistryReader } from '../../clients/eth/types';
|
|
3
|
+
/**
|
|
4
|
+
* Ethereum block confirmations required before the Pre-PegIn BTC transaction
|
|
5
|
+
* may be broadcast.
|
|
6
|
+
*
|
|
7
|
+
* 8 exceeds the deepest reorg ever observed on Ethereum (7, pre-merge, caused
|
|
8
|
+
* by a client bug), and costs ~1.6 min at 12s slots. Deliberately not the
|
|
9
|
+
* `safe` block tag: a full epoch (~12.8 min) was rejected as too slow for the
|
|
10
|
+
* benefit. This is a liveness guard against an orphaned registration, not a
|
|
11
|
+
* theft mitigation — every Pre-PegIn HTLC spend path requires the depositor's
|
|
12
|
+
* own BTC key regardless.
|
|
13
|
+
*/
|
|
14
|
+
export declare const PEGIN_ETH_CONFIRMATIONS = 8;
|
|
15
|
+
/**
|
|
16
|
+
* The vault is not registered on-chain, and stayed that way past the grace
|
|
17
|
+
* window — long enough that a lagging backend has been ruled out. Retrying
|
|
18
|
+
* will not help.
|
|
19
|
+
*/
|
|
20
|
+
export declare class PeginRegistrationMissingError extends Error {
|
|
21
|
+
constructor(message: string);
|
|
22
|
+
}
|
|
23
|
+
/** The registration did not reach the required depth within the budget. */
|
|
24
|
+
export declare class PeginRegistrationNotFinalError extends Error {
|
|
25
|
+
constructor(message: string);
|
|
26
|
+
}
|
|
27
|
+
export declare function isPeginRegistrationMissingError(err: unknown): err is PeginRegistrationMissingError;
|
|
28
|
+
export declare function isPeginRegistrationNotFinalError(err: unknown): err is PeginRegistrationNotFinalError;
|
|
29
|
+
export interface RegistrationDepthParams {
|
|
30
|
+
/** Current chain tip block number. */
|
|
31
|
+
currentBlock: bigint;
|
|
32
|
+
/** Block number the registration was mined at (`VaultBasicInfo.createdAt`). */
|
|
33
|
+
createdAtBlock: bigint;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Confirmations accrued by a registration: the mining block counts as the
|
|
37
|
+
* first confirmation, so `tip === createdAt` is 1.
|
|
38
|
+
*
|
|
39
|
+
* Clamped at 0. A reorg between the tip read and the vault read can surface a
|
|
40
|
+
* `createdAt` above the tip already in hand; a negative depth must never
|
|
41
|
+
* propagate into a comparison.
|
|
42
|
+
*/
|
|
43
|
+
export declare function computeRegistrationConfirmations(params: RegistrationDepthParams): number;
|
|
44
|
+
export interface RegistrationDepthProgress {
|
|
45
|
+
/** Shallowest depth across every vault being waited on. */
|
|
46
|
+
confirmations: number;
|
|
47
|
+
required: number;
|
|
48
|
+
}
|
|
49
|
+
export interface WaitForPeginRegistrationDepthParams {
|
|
50
|
+
vaultRegistryReader: VaultRegistryReader;
|
|
51
|
+
/**
|
|
52
|
+
* Chain-tip reader. A thunk rather than a `PublicClient` so this module has
|
|
53
|
+
* no viem-client dependency and stays testable with two plain fakes — the
|
|
54
|
+
* same shape `verifyRegisteredVaultVersions` uses for its reader.
|
|
55
|
+
*/
|
|
56
|
+
getBlockNumber: () => Promise<bigint>;
|
|
57
|
+
/** Vaults registered by the same transaction; the shallowest one gates. */
|
|
58
|
+
vaultIds: readonly Hex[];
|
|
59
|
+
required?: number;
|
|
60
|
+
pollIntervalMs?: number;
|
|
61
|
+
timeoutMs?: number;
|
|
62
|
+
signal?: AbortSignal;
|
|
63
|
+
onProgress?: (progress: RegistrationDepthProgress) => void;
|
|
64
|
+
}
|
|
65
|
+
export interface PeginRegistrationDepthResult {
|
|
66
|
+
confirmations: number;
|
|
67
|
+
/**
|
|
68
|
+
* The final observation for the shallowest vault. Callers that gated on
|
|
69
|
+
* `status` before the wait should re-assert it against this — the wait can
|
|
70
|
+
* span minutes, and a vault can leave PENDING in that time.
|
|
71
|
+
*/
|
|
72
|
+
basicInfo: VaultBasicInfo;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Poll until every vault's registration is at least `required` blocks deep.
|
|
76
|
+
*
|
|
77
|
+
* A read that comes back empty is treated as "not visible yet", not as
|
|
78
|
+
* "absent": both callers reach this having already proven the registration
|
|
79
|
+
* exists, so an empty read means a lagging RPC backend or a reorg, and both
|
|
80
|
+
* resolve on their own.
|
|
81
|
+
*
|
|
82
|
+
* @throws {PeginRegistrationMissingError} if no vault has ever been observed and the grace window is spent.
|
|
83
|
+
* @throws {PeginRegistrationNotFinalError} on timeout.
|
|
84
|
+
* @throws if aborted.
|
|
85
|
+
*/
|
|
86
|
+
export declare function waitForPeginRegistrationDepth(params: WaitForPeginRegistrationDepthParams): Promise<PeginRegistrationDepthResult>;
|
|
87
|
+
//# sourceMappingURL=peginRegistrationDepth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"peginRegistrationDepth.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/services/deposit/peginRegistrationDepth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAE7C,OAAO,KAAK,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAEnF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,uBAAuB,IAAI,CAAC;AAyBzC;;;;GAIG;AACH,qBAAa,6BAA8B,SAAQ,KAAK;gBAC1C,OAAO,EAAE,MAAM;CAI5B;AAED,2EAA2E;AAC3E,qBAAa,8BAA+B,SAAQ,KAAK;gBAC3C,OAAO,EAAE,MAAM;CAI5B;AAKD,wBAAgB,+BAA+B,CAC7C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,6BAA6B,CAKtC;AAED,wBAAgB,gCAAgC,CAC9C,GAAG,EAAE,OAAO,GACX,GAAG,IAAI,8BAA8B,CAKvC;AAED,MAAM,WAAW,uBAAuB;IACtC,sCAAsC;IACtC,YAAY,EAAE,MAAM,CAAC;IACrB,+EAA+E;IAC/E,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,wBAAgB,gCAAgC,CAC9C,MAAM,EAAE,uBAAuB,GAC9B,MAAM,CAIR;AAED,MAAM,WAAW,yBAAyB;IACxC,2DAA2D;IAC3D,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mCAAmC;IAClD,mBAAmB,EAAE,mBAAmB,CAAC;IACzC;;;;OAIG;IACH,cAAc,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,CAAC;IACtC,2EAA2E;IAC3E,QAAQ,EAAE,SAAS,GAAG,EAAE,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,yBAAyB,KAAK,IAAI,CAAC;CAC5D;AAED,MAAM,WAAW,4BAA4B;IAC3C,aAAa,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,SAAS,EAAE,cAAc,CAAC;CAC3B;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,6BAA6B,CACjD,MAAM,EAAE,mCAAmC,GAC1C,OAAO,CAAC,4BAA4B,CAAC,CAkKvC"}
|
|
@@ -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 e=require("../../../signPsbtsWithFallback-DbOmw8Ou.cjs"),t=require("../../../buildAndBroadcastRefund-CYzhA_B8.cjs"),i=require("../../../peginState-eaQ4IO_R.cjs");exports.computeHashlock=e.computeHashlock;exports.validateSecretAgainstHashlock=e.validateSecretAgainstHashlock;exports.BIP68NotMatureError=t.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=t.ClaimerPegoutStatusValue;exports.PEGIN_ETH_CONFIRMATIONS=t.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=t.ParticipantKeyDriftError;exports.PeginRegistrationMissingError=t.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=t.PeginRegistrationNotFinalError;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.activateVaultAndRedeem=t.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=t.assertVaultProviderHintAccepted;exports.buildAndBroadcastRefund=t.buildAndBroadcastRefund;exports.estimateRefundFeeSats=t.estimateRefundFeeSats;exports.isDepositAmountValid=t.isDepositAmountValid;exports.isHintAccepted=t.isHintAccepted;exports.isParticipantKeyDriftError=t.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=t.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=t.isPeginRegistrationNotFinalError;exports.isPegoutTerminalStatus=t.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=t.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=t.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=t.matchKeyHint;exports.matchKeySetHint=t.matchKeySetHint;exports.resolveCurrentParticipantKeys=t.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=t.resolveParticipantKeysAtEpochs;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.verifyRegisteredParticipantKeys=t.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=t.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=t.waitForPeginRegistrationDepth;exports.waitForPeginStatus=t.waitForPeginStatus;exports.ContractStatus=i.ContractStatus;exports.PeginAction=i.PeginAction;exports.canPerformAction=i.canPerformAction;exports.getPeginProtocolState=i.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=i.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,49 +1,55 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
3
|
-
import { C as
|
|
1
|
+
import { c as s, v as i } from "../../../signPsbtsWithFallback-DC4rUCsy.js";
|
|
2
|
+
import { H as r, E as o, P as n, o as c, c as l, d as u, K as g, L as P, M as d, N as E, R, a as p, b as A, y as v, I as m, J as F, g as N, z as V, p as _, i as D, e as y, G as S, F as M, t as h, A as f, B as C, C as I, D as K, r as O, s as T, f as H, h as b, j as U, v as k, k as w, l as x, m as B, n as G, q as X, u as z, w as j, x as q } from "../../../buildAndBroadcastRefund-CH2awK6h.js";
|
|
3
|
+
import { C as L, P as W, c as Z, g as Q, i as Y } from "../../../peginState-CxDiaKuk.js";
|
|
4
4
|
export {
|
|
5
5
|
r as BIP68NotMatureError,
|
|
6
6
|
o as ClaimerPegoutStatusValue,
|
|
7
|
-
|
|
8
|
-
n as
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
P as
|
|
7
|
+
L as ContractStatus,
|
|
8
|
+
n as PEGIN_ETH_CONFIRMATIONS,
|
|
9
|
+
c as ParticipantKeyDriftError,
|
|
10
|
+
W as PeginAction,
|
|
11
|
+
l as PeginRegistrationMissingError,
|
|
12
|
+
u as PeginRegistrationNotFinalError,
|
|
13
|
+
g as REFUND_MAX_FEE_FRACTION_DENOMINATOR,
|
|
14
|
+
P as REFUND_MAX_FEE_FRACTION_NUMERATOR,
|
|
15
|
+
d as REFUND_MAX_FEE_RATE_SATS_VB,
|
|
16
|
+
E as REFUND_VSIZE,
|
|
17
|
+
R as RegisteredVaultVersionMismatchError,
|
|
15
18
|
p as activateVault,
|
|
16
19
|
A as activateVaultAndRedeem,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
f as
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
H as
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
20
|
+
v as assertVaultProviderHintAccepted,
|
|
21
|
+
m as buildAndBroadcastRefund,
|
|
22
|
+
Z as canPerformAction,
|
|
23
|
+
s as computeHashlock,
|
|
24
|
+
F as estimateRefundFeeSats,
|
|
25
|
+
Q as getPeginProtocolState,
|
|
26
|
+
Y as isActivationDeadlinePassedOnChain,
|
|
27
|
+
N as isDepositAmountValid,
|
|
28
|
+
V as isHintAccepted,
|
|
29
|
+
_ as isParticipantKeyDriftError,
|
|
30
|
+
D as isPeginRegistrationMissingError,
|
|
31
|
+
y as isPeginRegistrationNotFinalError,
|
|
32
|
+
S as isPegoutTerminalStatus,
|
|
33
|
+
M as isRecognizedPegoutStatus,
|
|
34
|
+
h as isRegisteredVaultVersionMismatchError,
|
|
35
|
+
f as matchKeyHint,
|
|
36
|
+
C as matchKeySetHint,
|
|
37
|
+
I as resolveCurrentParticipantKeys,
|
|
38
|
+
K as resolveParticipantKeysAtEpochs,
|
|
39
|
+
O as runDepositorPresignFlow,
|
|
40
|
+
T as signDepositorGraph,
|
|
41
|
+
H as submitWotsPublicKey,
|
|
42
|
+
b as validateDepositAmount,
|
|
43
|
+
U as validateMultiVaultDepositInputs,
|
|
44
|
+
k as validateOnChainParticipantKeys,
|
|
45
|
+
w as validateProviderSelection,
|
|
46
|
+
x as validateRemainingCapacity,
|
|
47
|
+
i as validateSecretAgainstHashlock,
|
|
48
|
+
B as validateVaultAmounts,
|
|
49
|
+
G as validateVaultProviderPubkey,
|
|
50
|
+
X as verifyRegisteredParticipantKeys,
|
|
51
|
+
z as verifyRegisteredVaultVersions,
|
|
52
|
+
j as waitForPeginRegistrationDepth,
|
|
53
|
+
q as waitForPeginStatus
|
|
48
54
|
};
|
|
49
55
|
//# sourceMappingURL=index.js.map
|
|
@@ -3,6 +3,17 @@ export interface WaitForTransactionReceiptSmartAwareParams {
|
|
|
3
3
|
publicClient: PublicClient;
|
|
4
4
|
walletAddress: Address;
|
|
5
5
|
hash: Hash;
|
|
6
|
+
/**
|
|
7
|
+
* Forwarded to viem verbatim.
|
|
8
|
+
*
|
|
9
|
+
* MUST NOT be used as a finality/reorg gate. viem fetches the receipt once
|
|
10
|
+
* and then only compares block numbers against that cached copy — it never
|
|
11
|
+
* re-checks that the receipt's block is still canonical, so it resolves
|
|
12
|
+
* happily for a transaction that has been reorged out. Setting this buys a
|
|
13
|
+
* delay, not a guarantee. For peg-in registration finality use
|
|
14
|
+
* `waitForPeginRegistrationDepth`, which re-reads live contract state on
|
|
15
|
+
* every poll.
|
|
16
|
+
*/
|
|
6
17
|
confirmations?: number;
|
|
7
18
|
/**
|
|
8
19
|
* Forwarded to viem on the EOA (externally owned account) path.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"waitForTransactionReceiptSmartAware.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,kBAAkB,EACnB,MAAM,MAAM,CAAC;AAed,MAAM,WAAW,yCAAyC;IACxD,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,yCAAyC,GAChD,OAAO,CAAC,kBAAkB,CAAC,CAkC7B"}
|
|
1
|
+
{"version":3,"file":"waitForTransactionReceiptSmartAware.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EACV,OAAO,EACP,IAAI,EACJ,YAAY,EACZ,kBAAkB,EACnB,MAAM,MAAM,CAAC;AAed,MAAM,WAAW,yCAAyC;IACxD,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,IAAI,EAAE,IAAI,CAAC;IACX;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,qEAAqE;IACrE,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,wBAAsB,mCAAmC,CACvD,MAAM,EAAE,yCAAyC,GAChD,OAAO,CAAC,kBAAkB,CAAC,CAkC7B"}
|
|
@@ -18,6 +18,10 @@ export declare const VAULT_APP_NAME = "babylon-btc-vault";
|
|
|
18
18
|
export interface DeriveContextHashCapableWallet {
|
|
19
19
|
deriveContextHash(appName: string, context: string): Promise<string>;
|
|
20
20
|
}
|
|
21
|
+
/** Forward the deriveContextHash capability only when the wallet actually has it,
|
|
22
|
+
* so seam guards (ensurePrePeginTermsApproval) can fire their typed error instead
|
|
23
|
+
* of a mid-ceremony TypeError. */
|
|
24
|
+
export declare function forwardDeriveContextHash(wallet: Partial<DeriveContextHashCapableWallet>): Partial<DeriveContextHashCapableWallet>;
|
|
21
25
|
/**
|
|
22
26
|
* Derive the 32-byte vault root from a wallet by encoding the
|
|
23
27
|
* canonical {@link VaultContextInput} and forwarding to
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deriveVaultRoot.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/vault-secrets/deriveVaultRoot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEtE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAUlD;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,8BAA8B,EACtC,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,UAAU,CAAC,CAuBrB"}
|
|
1
|
+
{"version":3,"file":"deriveVaultRoot.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/vault-secrets/deriveVaultRoot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAIH,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEtE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,sBAAsB,CAAC;AAUlD;;;;;;GAMG;AACH,MAAM,WAAW,8BAA8B;IAC7C,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtE;AAED;;kCAEkC;AAClC,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,OAAO,CAAC,8BAA8B,CAAC,GAC9C,OAAO,CAAC,8BAA8B,CAAC,CAOzC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,wBAAsB,eAAe,CACnC,MAAM,EAAE,8BAA8B,EACtC,KAAK,EAAE,iBAAiB,GACvB,OAAO,CAAC,UAAU,CAAC,CAuBrB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@babylonlabs-io/babylon-tbv-rust-wasm"),e=require("../../../parseFundingOutpoints-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@babylonlabs-io/babylon-tbv-rust-wasm"),e=require("../../../parseFundingOutpoints-CIO9Ok1L.cjs");Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>t.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>t.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>t.expandWotsSeed});exports.VAULT_APP_NAME=e.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=e.buildFundingOutpointsCommitment;exports.buildVaultContext=e.buildVaultContext;exports.deriveVaultRoot=e.deriveVaultRoot;exports.forwardDeriveContextHash=e.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=e.parseFundingOutpointsFromTx;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
export { expandAuthAnchor, expandHashlockSecret, expandWotsSeed, } from '@babylonlabs-io/babylon-tbv-rust-wasm';
|
|
16
16
|
export { buildFundingOutpointsCommitment, buildVaultContext } from './context';
|
|
17
17
|
export type { FundingOutpoint, VaultContextInput } from './context';
|
|
18
|
-
export { deriveVaultRoot,
|
|
18
|
+
export { VAULT_APP_NAME, deriveVaultRoot, forwardDeriveContextHash, } from './deriveVaultRoot';
|
|
19
19
|
export type { DeriveContextHashCapableWallet } from './deriveVaultRoot';
|
|
20
20
|
export { parseFundingOutpointsFromTx } from './parseFundingOutpoints';
|
|
21
21
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/vault-secrets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iIAAiI;AACjI,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE/E,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEpE,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/vault-secrets/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,iIAAiI;AACjI,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,+BAA+B,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAE/E,YAAY,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEpE,OAAO,EACL,cAAc,EACd,eAAe,EACf,wBAAwB,GACzB,MAAM,mBAAmB,CAAC;AAE3B,YAAY,EAAE,8BAA8B,EAAE,MAAM,mBAAmB,CAAC;AAExE,OAAO,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import { expandAuthAnchor as
|
|
2
|
-
import { V as s, b as
|
|
1
|
+
import { expandAuthAnchor as a, expandHashlockSecret as o, expandWotsSeed as n } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
2
|
+
import { V as s, b as d, a as i, d as p, f as u, p as x } from "../../../parseFundingOutpoints-pBRE11Hr.js";
|
|
3
3
|
export {
|
|
4
4
|
s as VAULT_APP_NAME,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
5
|
+
d as buildFundingOutpointsCommitment,
|
|
6
|
+
i as buildVaultContext,
|
|
7
|
+
p as deriveVaultRoot,
|
|
8
|
+
a as expandAuthAnchor,
|
|
9
|
+
o as expandHashlockSecret,
|
|
10
10
|
n as expandWotsSeed,
|
|
11
|
-
|
|
11
|
+
u as forwardDeriveContextHash,
|
|
12
|
+
x as parseFundingOutpointsFromTx
|
|
12
13
|
};
|
|
13
14
|
//# sourceMappingURL=index.js.map
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("../challengeAssert-BFRE2DM-.cjs"),m=require("../constants-DU5CGcqO.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),u=require("../verifyScriptPathSchnorrSignature-CYjK4IP_.cjs"),R=require("../peginInput-Ci921gTl.cjs"),g=require("../noPayout-qUEtRKc_.cjs"),t=require("../bitcoin-m84N5a8o.cjs"),l=require("../validation-CDbOaDj7.cjs"),O=require("../signing-Bnsro0hE.cjs"),c=require("../PeginManager-Cu5Dh6L-.cjs"),d=require("../signPsbtsWithFallback-Xs4jZw5z.cjs"),_=require("../ProtocolParams.abi-C8U7BHCS.cjs"),y=require("../BTCVaultRegistry.abi-3VLWva2x.cjs"),b=require("../BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs"),P=require("../errors-CGcNP0rV.cjs"),p=require("../parseFundingOutpoints-DUuOAUjA.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),i=require("../fundPeginTransaction-BLD8FRL9.cjs"),E=require("../reservation-CDbInVw0.cjs"),a=require("../mempoolApi-BxhMqJ4f.cjs"),r=require("../batchPoll-CbbCcNZP.cjs"),s=require("../json-rpc-client-BiAmg_ho.cjs"),C=require("../onChainBtcPubkey-C_a2L3kL.cjs"),A=require("../errors-2aF9oRwM.cjs"),e=require("../buildAndBroadcastRefund-BqYlx6rb.cjs"),T=require("../peginState-eaQ4IO_R.cjs");exports.buildChallengeAssertPsbt=S.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=S.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=m.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=u.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=u.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=u.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=u.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=u.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=u.buildPrePeginPsbt;exports.createPayoutScript=u.createPayoutScript;exports.extractPayoutSignature=u.extractPayoutSignature;exports.buildPeginInputPsbt=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=g.buildNoPayoutPsbt;exports.buildRefundPsbt=g.buildRefundPsbt;exports.canonicalizeBtcPubkey=t.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;exports.BITCOIN_ADDRESS_RE=l.BITCOIN_ADDRESS_RE;exports.HEX_RE=l.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=l.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=l.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=l.TXID_RE;exports.combineAbortSignals=l.combineAbortSignals;exports.createTaprootScriptPathSignOptions=O.createTaprootScriptPathSignOptions;exports.PeginManager=c.PeginManager;exports.buildDepositTerms=c.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=c.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=c.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=c.ensurePrePeginTermsApproval;exports.estimateSubmitPeginRequestBatchGas=c.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=y.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=b.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=P.CONTRACT_ERRORS;exports.extractErrorData=P.extractErrorData;exports.getContractErrorMessage=P.getContractErrorMessage;exports.handleContractError=P.handleContractError;exports.isKnownContractError=P.isKnownContractError;exports.VAULT_APP_NAME=p.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=p.buildFundingOutpointsCommitment;exports.buildVaultContext=p.buildVaultContext;exports.deriveVaultRoot=p.deriveVaultRoot;exports.parseFundingOutpointsFromTx=p.parseFundingOutpointsFromTx;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=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=E.UtxoNotAvailableError;exports.assertUtxosAvailable=E.assertUtxosAvailable;exports.extractInputsFromTransaction=E.extractInputsFromTransaction;exports.findOverlappingPendingVaults=E.findOverlappingPendingVaults;exports.validateUtxosAvailable=E.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.getOutspend=a.getOutspend;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=r.OnChainBtcVaultStatus;exports.ServerIdentityError=r.ServerIdentityError;exports.VaultProviderRpcClient=r.VaultProviderRpcClient;exports.ViemOperationKeyReader=r.ViemOperationKeyReader;exports.ViemProtocolParamsReader=r.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=r.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=r.ViemVaultKeeperReader;exports.VpResponseValidationError=r.VpResponseValidationError;exports.VpTokenRegistry=r.VpTokenRegistry;exports.batchPollByProvider=r.batchPollByProvider;exports.createAuthenticatedVpClient=r.createAuthenticatedVpClient;exports.primeVpTokenRegistry=r.primeVpTokenRegistry;exports.resolveProtocolAddresses=r.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=r.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=r.verifyServerIdentity;exports.vpTokenRegistry=r.vpTokenRegistry;exports.AUTH_REJECTED_RPC_CODE=s.AUTH_REJECTED_RPC_CODE;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.isAuthRejectedError=s.isAuthRejectedError;exports.assertOnChainBtcPubkey=C.assertOnChainBtcPubkey;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=A.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=A.DepositTermsRejectedError;exports.isDepositTermsRejectedError=A.isDepositTermsRejectedError;exports.isWotsMismatchError=A.isWotsMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;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.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;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.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=T.ContractStatus;exports.PeginAction=T.PeginAction;exports.canPerformAction=T.canPerformAction;exports.getPeginProtocolState=T.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=T.isActivationDeadlinePassedOnChain;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const R=require("../challengeAssert-BFRE2DM-.cjs"),m=require("../constants-DU5CGcqO.cjs"),n=require("@babylonlabs-io/babylon-tbv-rust-wasm"),l=require("../verifyScriptPathSchnorrSignature-B8zK1ctE.cjs"),A=require("../peginInput-Ci921gTl.cjs"),S=require("../noPayout-CbxQqBw1.cjs"),t=require("../bitcoin-m84N5a8o.cjs"),c=require("../validation-CDbOaDj7.cjs"),O=require("../signing-Bnsro0hE.cjs"),u=require("../PeginManager-BLBB_vMl.cjs"),d=require("../signPsbtsWithFallback-DbOmw8Ou.cjs"),_=require("../ProtocolParams.abi-C8U7BHCS.cjs"),C=require("../BTCVaultRegistry.abi-3VLWva2x.cjs"),b=require("../BTCVaultRegistryKeyEpochs.abi-_NERAdc5.cjs"),p=require("../errors-CGcNP0rV.cjs"),P=require("../parseFundingOutpoints-CIO9Ok1L.cjs"),o=require("../waitForTransactionReceiptSmartAware-AgZ-3WV_.cjs"),i=require("../fundPeginTransaction-BLD8FRL9.cjs"),E=require("../reservation-CDbInVw0.cjs"),a=require("../mempoolApi-BxhMqJ4f.cjs"),r=require("../batchPoll-CbbCcNZP.cjs"),s=require("../json-rpc-client-BiAmg_ho.cjs"),y=require("../onChainBtcPubkey-C_a2L3kL.cjs"),T=require("../errors-D2zp7Vzk.cjs"),e=require("../buildAndBroadcastRefund-CYzhA_B8.cjs"),g=require("../peginState-eaQ4IO_R.cjs");exports.buildChallengeAssertPsbt=R.buildChallengeAssertPsbt;exports.computeNumLocalChallengers=R.computeNumLocalChallengers;exports.assertValidVaultCoreVersion=m.assertValidVaultCoreVersion;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>n.computeMinClaimValue});Object.defineProperty(exports,"computeMinPeginFee",{enumerable:!0,get:()=>n.computeMinPeginFee});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>n.deriveVaultId});Object.defineProperty(exports,"expandAuthAnchor",{enumerable:!0,get:()=>n.expandAuthAnchor});Object.defineProperty(exports,"expandHashlockSecret",{enumerable:!0,get:()=>n.expandHashlockSecret});Object.defineProperty(exports,"expandWotsSeed",{enumerable:!0,get:()=>n.expandWotsSeed});Object.defineProperty(exports,"peginP2aAnchorOutput",{enumerable:!0,get:()=>n.peginP2aAnchorOutput});Object.defineProperty(exports,"supportedTxGraphVersions",{enumerable:!0,get:()=>n.supportedTxGraphVersions});Object.defineProperty(exports,"validatePeginP2aAnchor",{enumerable:!0,get:()=>n.validatePeginP2aAnchor});exports.PsbtSubstitutionError=l.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=l.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=l.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=l.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=l.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=l.buildPrePeginPsbt;exports.createPayoutScript=l.createPayoutScript;exports.extractPayoutSignature=l.extractPayoutSignature;exports.buildPeginInputPsbt=A.buildPeginInputPsbt;exports.extractPeginInputSignature=A.extractPeginInputSignature;exports.finalizePeginInputPsbt=A.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=S.buildNoPayoutPsbt;exports.buildRefundPsbt=S.buildRefundPsbt;exports.canonicalizeBtcPubkey=t.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=t.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=t.deriveNativeSegwitAddress;exports.deriveTaprootAddress=t.deriveTaprootAddress;exports.ensureHexPrefix=t.ensureHexPrefix;exports.formatSatoshisToBtc=t.formatSatoshisToBtc;exports.getNetwork=t.getNetwork;exports.getSortedXOnlyPubkeys=t.getSortedXOnlyPubkeys;exports.hexToUint8Array=t.hexToUint8Array;exports.isAddressFromPublicKey=t.isAddressFromPublicKey;exports.isValidHex=t.isValidHex;exports.processPublicKeyToXOnly=t.processPublicKeyToXOnly;exports.stripHexPrefix=t.stripHexPrefix;exports.toXOnly=t.toXOnly;exports.uint8ArrayToHex=t.uint8ArrayToHex;exports.validateWalletPubkey=t.validateWalletPubkey;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.combineAbortSignals=c.combineAbortSignals;exports.createTaprootScriptPathSignOptions=O.createTaprootScriptPathSignOptions;exports.COMMISSION_BPS_HEADROOM=u.COMMISSION_BPS_HEADROOM;exports.MAX_ACCEPTABLE_COMMISSION_BPS_CAP=u.MAX_ACCEPTABLE_COMMISSION_BPS_CAP;exports.PeginManager=u.PeginManager;exports.buildDepositTerms=u.buildDepositTerms;exports.capMaxAcceptableCommissionBps=u.capMaxAcceptableCommissionBps;exports.computeWotsBlockPublicKeysHash=u.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=u.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=u.ensurePrePeginTermsApproval;exports.estimateSubmitPeginRequestBatchGas=u.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.ApplicationRegistryABI=_.ApplicationRegistryABI;exports.ProtocolParamsABI=_.ProtocolParamsABI;exports.BTCVaultRegistryABI=C.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=b.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=p.CONTRACT_ERRORS;exports.extractErrorData=p.extractErrorData;exports.getContractErrorMessage=p.getContractErrorMessage;exports.handleContractError=p.handleContractError;exports.isKnownContractError=p.isKnownContractError;exports.VAULT_APP_NAME=P.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=P.buildFundingOutpointsCommitment;exports.buildVaultContext=P.buildVaultContext;exports.deriveVaultRoot=P.deriveVaultRoot;exports.forwardDeriveContextHash=P.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=P.parseFundingOutpointsFromTx;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=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=E.UtxoNotAvailableError;exports.assertUtxosAvailable=E.assertUtxosAvailable;exports.extractInputsFromTransaction=E.extractInputsFromTransaction;exports.findOverlappingPendingVaults=E.findOverlappingPendingVaults;exports.validateUtxosAvailable=E.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.getOutspend=a.getOutspend;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=r.OnChainBtcVaultStatus;exports.ServerIdentityError=r.ServerIdentityError;exports.VaultProviderRpcClient=r.VaultProviderRpcClient;exports.ViemOperationKeyReader=r.ViemOperationKeyReader;exports.ViemProtocolParamsReader=r.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=r.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=r.ViemVaultKeeperReader;exports.VpResponseValidationError=r.VpResponseValidationError;exports.VpTokenRegistry=r.VpTokenRegistry;exports.batchPollByProvider=r.batchPollByProvider;exports.createAuthenticatedVpClient=r.createAuthenticatedVpClient;exports.primeVpTokenRegistry=r.primeVpTokenRegistry;exports.resolveProtocolAddresses=r.resolveProtocolAddresses;exports.validateRequestDepositorClaimerArtifactsResponse=r.validateRequestDepositorClaimerArtifactsResponse;exports.verifyServerIdentity=r.verifyServerIdentity;exports.vpTokenRegistry=r.vpTokenRegistry;exports.AUTH_REJECTED_RPC_CODE=s.AUTH_REJECTED_RPC_CODE;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.isAuthRejectedError=s.isAuthRejectedError;exports.assertOnChainBtcPubkey=y.assertOnChainBtcPubkey;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=T.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=T.DepositTermsRejectedError;exports.isDepositTermsRejectedError=T.isDepositTermsRejectedError;exports.isWotsMismatchError=T.isWotsMismatchError;exports.rebuildDepositTermsCore=T.rebuildDepositTermsCore;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PEGIN_ETH_CONFIRMATIONS=e.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.PeginRegistrationMissingError=e.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=e.PeginRegistrationNotFinalError;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.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=e.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=e.isPeginRegistrationNotFinalError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;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.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=e.waitForPeginRegistrationDepth;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=g.ContractStatus;exports.PeginAction=g.PeginAction;exports.canPerformAction=g.canPerformAction;exports.getPeginProtocolState=g.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=g.isActivationDeadlinePassedOnChain;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|