@babylonlabs-io/ts-sdk 0.36.3 → 0.37.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-BxAY2x0g.cjs +2 -0
- package/dist/PayoutManager-BxAY2x0g.cjs.map +1 -0
- package/dist/{PayoutManager-s_uH8Uuj.js → PayoutManager-sfxuOBGq.js} +51 -43
- package/dist/PayoutManager-sfxuOBGq.js.map +1 -0
- package/dist/{PeginManager-CB-dVkT2.js → PeginManager-B1Mh8dJ3.js} +332 -323
- package/dist/PeginManager-B1Mh8dJ3.js.map +1 -0
- package/dist/PeginManager-BbHPyz-G.cjs +2 -0
- package/dist/PeginManager-BbHPyz-G.cjs.map +1 -0
- package/dist/assertPsbtUnsignedTxMatches-BoHwgW30.cjs +2 -0
- package/dist/assertPsbtUnsignedTxMatches-BoHwgW30.cjs.map +1 -0
- package/dist/assertPsbtUnsignedTxMatches-D7RxpR4A.js +263 -0
- package/dist/assertPsbtUnsignedTxMatches-D7RxpR4A.js.map +1 -0
- package/dist/{bitcoin-B0S8SHCX.js → bitcoin-B5aNKtsk.js} +77 -60
- package/dist/{bitcoin-B0S8SHCX.js.map → bitcoin-B5aNKtsk.js.map} +1 -1
- package/dist/bitcoin-CHfKAhcI.cjs +2 -0
- package/dist/{bitcoin-B3aqjuMP.cjs.map → bitcoin-CHfKAhcI.cjs.map} +1 -1
- package/dist/{buildAndBroadcastRefund-C2VqXiOx.js → buildAndBroadcastRefund-Ck_ddlLk.js} +333 -328
- package/dist/buildAndBroadcastRefund-Ck_ddlLk.js.map +1 -0
- package/dist/buildAndBroadcastRefund-DyPQyghx.cjs +2 -0
- package/dist/buildAndBroadcastRefund-DyPQyghx.cjs.map +1 -0
- package/dist/{challengeAssert-Yyyj-EdR.cjs → challengeAssert-BKDS_ADt.cjs} +2 -2
- package/dist/{challengeAssert-Yyyj-EdR.cjs.map → challengeAssert-BKDS_ADt.cjs.map} +1 -1
- package/dist/{challengeAssert-BzxQmdZy.js → challengeAssert-BXESW00N.js} +7 -7
- package/dist/{challengeAssert-BzxQmdZy.js.map → challengeAssert-BXESW00N.js.map} +1 -1
- package/dist/fundPeginTransaction-BBE3wTjR.cjs +2 -0
- package/dist/{fundPeginTransaction-DaWoYCgO.cjs.map → fundPeginTransaction-BBE3wTjR.cjs.map} +1 -1
- package/dist/fundPeginTransaction-t-6TsHAY.js +84 -0
- package/dist/{fundPeginTransaction-oV-dNJOU.js.map → fundPeginTransaction-t-6TsHAY.js.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +174 -166
- package/dist/{noPayout-BXeUw0Qq.cjs → noPayout-B6s8vrW6.cjs} +2 -2
- package/dist/{noPayout-BXeUw0Qq.cjs.map → noPayout-B6s8vrW6.cjs.map} +1 -1
- package/dist/{noPayout-DBX6G96_.js → noPayout-BhgknZBx.js} +2 -2
- package/dist/{noPayout-DBX6G96_.js.map → noPayout-BhgknZBx.js.map} +1 -1
- package/dist/{peginInput-tbw9BpZy.cjs → peginInput-57FK2O99.cjs} +2 -2
- package/dist/{peginInput-tbw9BpZy.cjs.map → peginInput-57FK2O99.cjs.map} +1 -1
- package/dist/{peginInput-C2QPvuhR.js → peginInput-CYJzbuwA.js} +3 -3
- package/dist/{peginInput-C2QPvuhR.js.map → peginInput-CYJzbuwA.js.map} +1 -1
- package/dist/{reservation-fZUvejYK.js → reservation-CB-4FBPk.js} +3 -3
- package/dist/{reservation-fZUvejYK.js.map → reservation-CB-4FBPk.js.map} +1 -1
- package/dist/{reservation-DF0uiCUC.cjs → reservation-hjXStM03.cjs} +2 -2
- package/dist/{reservation-DF0uiCUC.cjs.map → reservation-hjXStM03.cjs.map} +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.js +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +172 -164
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts +7 -8
- 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 +3 -1
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +31 -27
- package/dist/tbv/core/primitives/psbt/__tests__/assertPsbtUnsignedTxMatches.test.d.ts +5 -0
- package/dist/tbv/core/primitives/psbt/__tests__/assertPsbtUnsignedTxMatches.test.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/assertPsbtUnsignedTxMatches.d.ts +31 -0
- package/dist/tbv/core/primitives/psbt/assertPsbtUnsignedTxMatches.d.ts.map +1 -0
- package/dist/tbv/core/primitives/psbt/index.d.ts +2 -0
- package/dist/tbv/core/primitives/psbt/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/utils/bitcoin.d.ts +33 -3
- package/dist/tbv/core/primitives/utils/bitcoin.d.ts.map +1 -1
- package/dist/tbv/core/primitives/utils/index.d.ts +1 -1
- package/dist/tbv/core/primitives/utils/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/runDepositorPresignFlow.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +2 -2
- package/dist/tbv/core/services/refund/buildAndBroadcastRefund.d.ts.map +1 -1
- package/dist/tbv/core/utils/fee/__tests__/peginFeeMath.test.d.ts +19 -0
- package/dist/tbv/core/utils/fee/__tests__/peginFeeMath.test.d.ts.map +1 -0
- package/dist/tbv/core/utils/fee/index.d.ts +1 -0
- package/dist/tbv/core/utils/fee/index.d.ts.map +1 -1
- package/dist/tbv/core/utils/fee/peginFeeMath.d.ts +99 -0
- package/dist/tbv/core/utils/fee/peginFeeMath.d.ts.map +1 -0
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.js +44 -40
- package/dist/tbv/core/utils/transaction/fundPeginTransaction.d.ts.map +1 -1
- package/dist/tbv/core/utils/utxo/selectUtxos.d.ts.map +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +172 -164
- package/dist/testing/index.cjs +1 -1
- package/dist/testing/index.js +1 -1
- package/dist/{vault-registry-reader-Br9m8bHF.cjs → vault-registry-reader-7gOYnrQD.cjs} +2 -2
- package/dist/{vault-registry-reader-Br9m8bHF.cjs.map → vault-registry-reader-7gOYnrQD.cjs.map} +1 -1
- package/dist/{vault-registry-reader-CohvzvoH.js → vault-registry-reader-Blhu9FW2.js} +2 -2
- package/dist/{vault-registry-reader-CohvzvoH.js.map → vault-registry-reader-Blhu9FW2.js.map} +1 -1
- package/dist/waitForTransactionReceiptSmartAware-CmgFXFza.js +265 -0
- package/dist/waitForTransactionReceiptSmartAware-CmgFXFza.js.map +1 -0
- package/dist/waitForTransactionReceiptSmartAware-tv1mtSIY.cjs +2 -0
- package/dist/waitForTransactionReceiptSmartAware-tv1mtSIY.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/PayoutManager-BhJoQZsG.cjs +0 -2
- package/dist/PayoutManager-BhJoQZsG.cjs.map +0 -1
- package/dist/PayoutManager-s_uH8Uuj.js.map +0 -1
- package/dist/PeginManager-BPXVXu8t.cjs +0 -2
- package/dist/PeginManager-BPXVXu8t.cjs.map +0 -1
- package/dist/PeginManager-CB-dVkT2.js.map +0 -1
- package/dist/bitcoin-B3aqjuMP.cjs +0 -2
- package/dist/buildAndBroadcastRefund-C2VqXiOx.js.map +0 -1
- package/dist/buildAndBroadcastRefund-CBIfcF47.cjs +0 -2
- package/dist/buildAndBroadcastRefund-CBIfcF47.cjs.map +0 -1
- package/dist/fundPeginTransaction-DaWoYCgO.cjs +0 -2
- package/dist/fundPeginTransaction-oV-dNJOU.js +0 -76
- package/dist/payout-BNFMBXS6.js +0 -193
- package/dist/payout-BNFMBXS6.js.map +0 -1
- package/dist/payout-DQ_fmJUA.cjs +0 -2
- package/dist/payout-DQ_fmJUA.cjs.map +0 -1
- package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js +0 -217
- package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js.map +0 -1
- package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs +0 -2
- package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs.map +0 -1
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,176 +1,184 @@
|
|
|
1
|
-
import { a as s, b as t, c as r } from "../../challengeAssert-
|
|
2
|
-
import { computeMinClaimValue as i, deriveVaultId as n, expandAuthAnchor as
|
|
3
|
-
import { c as P, a as c, b as T, e as S, f as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { d as
|
|
7
|
-
import { c as
|
|
8
|
-
import { B as
|
|
9
|
-
import { P as
|
|
10
|
-
import { P as
|
|
11
|
-
import { A as
|
|
12
|
-
import { B as
|
|
13
|
-
import { C as
|
|
14
|
-
import { B as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import { M as
|
|
18
|
-
import { S as
|
|
19
|
-
import { D as
|
|
20
|
-
import { i as
|
|
21
|
-
import { B as
|
|
22
|
-
import { C as
|
|
1
|
+
import { a as s, b as t, c as r } from "../../challengeAssert-BXESW00N.js";
|
|
2
|
+
import { computeMinClaimValue as i, deriveVaultId as n, expandAuthAnchor as u, expandHashlockSecret as l, expandWotsSeed as p } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { c as P, a as c, b as T, e as S, f as g } from "../../peginInput-CYJzbuwA.js";
|
|
4
|
+
import { a as m, b as R } from "../../noPayout-BhgknZBx.js";
|
|
5
|
+
import { P as _, a as x, c as f, b, d as v, e as I } from "../../assertPsbtUnsignedTxMatches-D7RxpR4A.js";
|
|
6
|
+
import { d as V, a as y, b as O, e as h, f as U, j as F, g as B, h as N, i as D, c as M, p as H, s as L, t as k, u as W, v as X } from "../../bitcoin-B5aNKtsk.js";
|
|
7
|
+
import { c as K } from "../../signing-DaLvGwQe.js";
|
|
8
|
+
import { B as Y, H as Z, K as J, M as j, T as z } from "../../validation-CxqROCno.js";
|
|
9
|
+
import { P as Q, V as $, b as aa, a as ea, c as sa, e as ta, d as ra } from "../../PeginManager-B1Mh8dJ3.js";
|
|
10
|
+
import { P as ia, c as na, v as ua } from "../../PayoutManager-sfxuOBGq.js";
|
|
11
|
+
import { A as pa, P as da } from "../../ProtocolParams.abi-DXu8L0Fn.js";
|
|
12
|
+
import { B as ca } from "../../BTCVaultRegistry.abi-DbJ5lsFJ.js";
|
|
13
|
+
import { C as Sa, e as ga, g as Ea, h as ma, i as Ra } from "../../errors-CznAK5NB.js";
|
|
14
|
+
import { B as _a, a as xa, f as fa, c as ba, b as va, d as Ia, g as Ca, i as Va, h as ya, s as Oa, e as ha, w as Ua } from "../../waitForTransactionReceiptSmartAware-CmgFXFza.js";
|
|
15
|
+
import { B as Ba, D as Na, F as Da, L as Ma, M as Ha, P as La, b as ka, a as Wa, S as Xa, T as wa, W as Ka, f as Ga, c as Ya, p as Za, r as Ja } from "../../fundPeginTransaction-t-6TsHAY.js";
|
|
16
|
+
import { U as za, a as qa, c as Qa, e as $a, s as ae, v as ee } from "../../reservation-CB-4FBPk.js";
|
|
17
|
+
import { M as te, g as re, a as oe, b as ie, c as ne, d as ue, e as le, f as pe, p as de } from "../../mempoolApi-CAIge7Nj.js";
|
|
18
|
+
import { S as ce, V as Te, j as Se, k as ge, l as Ee, m as me, a as Re, d as Ae, b as _e, f as xe, p as fe, r as be, g as ve, h as Ie, v as Ce, i as Ve, c as ye, e as Oe } from "../../vault-registry-reader-Blhu9FW2.js";
|
|
19
|
+
import { D as Ue, b as Fe, J as Be, a as Ne, d as De, P as Me, R as He, e as Le, c as ke, V as We } from "../../types-TiIjyo2b.js";
|
|
20
|
+
import { i as we, p as Ke } from "../../errors-9AkghWyk.js";
|
|
21
|
+
import { B as Ye, C as Ze, p as Je, R as je, a as ze, n as qe, o as Qe, i as $e, m as as, l as es, j as ss, r as ts, b as rs, s as os, v as is, g as ns, h as us, d as ls, c as ps, e as ds, f as Ps, k as cs, w as Ts } from "../../buildAndBroadcastRefund-Ck_ddlLk.js";
|
|
22
|
+
import { C as gs, P as Es, c as ms, g as Rs } from "../../peginState-CBAlxgXk.js";
|
|
23
23
|
export {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
24
|
+
pa as ApplicationRegistryABI,
|
|
25
|
+
Ye as BIP68NotMatureError,
|
|
26
|
+
Y as BITCOIN_ADDRESS_RE,
|
|
27
|
+
ca as BTCVaultRegistryABI,
|
|
28
|
+
Ba as BTC_DUST_SAT,
|
|
29
|
+
_a as BitcoinScriptType,
|
|
30
|
+
Sa as CONTRACT_ERRORS,
|
|
31
|
+
Ze as ClaimerPegoutStatusValue,
|
|
32
|
+
gs as ContractStatus,
|
|
33
|
+
Na as DUST_THRESHOLD,
|
|
34
|
+
Ue as DaemonStatus,
|
|
35
|
+
Da as FEE_SAFETY_MARGIN,
|
|
36
|
+
Z as HEX_RE,
|
|
37
|
+
Fe as JSON_RPC_ERROR_CODES,
|
|
38
|
+
Be as JsonRpcClient,
|
|
39
|
+
Ne as JsonRpcError,
|
|
40
|
+
J as KNOWN_SCRIPT_PREFIXES,
|
|
41
|
+
Ma as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
42
|
+
Ha as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
43
|
+
j as MAX_REASONABLE_FEE_SATS,
|
|
44
|
+
te as MEMPOOL_API_URLS,
|
|
45
|
+
La as P2TR_INPUT_SIZE,
|
|
46
|
+
ka as PEGIN_AUTH_ANCHOR_OUTPUTS,
|
|
47
|
+
Wa as PEGIN_FIXED_OUTPUTS,
|
|
48
|
+
De as POST_WOTS_STATUSES,
|
|
49
|
+
Me as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
50
|
+
ia as PayoutManager,
|
|
51
|
+
Es as PeginAction,
|
|
52
|
+
Q as PeginManager,
|
|
53
|
+
da as ProtocolParamsABI,
|
|
54
|
+
_ as PsbtSubstitutionError,
|
|
55
|
+
Je as REFUND_VSIZE,
|
|
56
|
+
je as RegisteredVaultVersionMismatchError,
|
|
57
|
+
He as RpcErrorCode,
|
|
58
|
+
Xa as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
59
|
+
ce as ServerIdentityError,
|
|
60
|
+
z as TXID_RE,
|
|
61
|
+
wa as TX_BUFFER_SIZE_OVERHEAD,
|
|
62
|
+
za as UtxoNotAvailableError,
|
|
63
|
+
$ as VAULT_APP_NAME,
|
|
64
|
+
Le as VP_BATCH_MAX_SIZE,
|
|
65
|
+
ke as VP_TERMINAL_STATUSES,
|
|
66
|
+
We as VP_TRANSIENT_STATUSES,
|
|
67
|
+
Te as VaultProviderRpcClient,
|
|
68
|
+
Se as ViemProtocolParamsReader,
|
|
69
|
+
ge as ViemUniversalChallengerReader,
|
|
70
|
+
Ee as ViemVaultKeeperReader,
|
|
71
|
+
me as ViemVaultRegistryReader,
|
|
72
|
+
Re as VpResponseValidationError,
|
|
73
|
+
Ae as VpTokenRegistry,
|
|
74
|
+
Ka as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
75
|
+
ze as activateVault,
|
|
76
|
+
xa as applyChangeOutputPolicy,
|
|
77
|
+
x as assertPayoutOutputMatchesRegistered,
|
|
78
|
+
f as assertPsbtUnsignedTxMatches,
|
|
79
|
+
qa as assertUtxosAvailable,
|
|
80
|
+
_e as batchPollByProvider,
|
|
81
|
+
qe as buildAndBroadcastRefund,
|
|
79
82
|
s as buildChallengeAssertPsbt,
|
|
80
83
|
t as buildDepositorPayoutPsbt,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
+
aa as buildFundingOutpointsCommitment,
|
|
85
|
+
m as buildNoPayoutPsbt,
|
|
86
|
+
b as buildPayoutPsbt,
|
|
84
87
|
P as buildPeginInputPsbt,
|
|
85
88
|
c as buildPeginTxFromFundedPrePegin,
|
|
86
89
|
T as buildPrePeginPsbt,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
90
|
+
R as buildRefundPsbt,
|
|
91
|
+
ea as buildVaultContext,
|
|
92
|
+
fa as calculateBtcTxHash,
|
|
93
|
+
ms as canPerformAction,
|
|
94
|
+
Qa as collectReservedUtxoRefs,
|
|
95
|
+
ba as computeChangeOutputFeeSats,
|
|
96
|
+
na as computeHashlock,
|
|
97
|
+
va as computeMaxDeposit,
|
|
93
98
|
i as computeMinClaimValue,
|
|
94
99
|
r as computeNumLocalChallengers,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
V as
|
|
100
|
+
Ia as computePeginBaseFeeSats,
|
|
101
|
+
sa as computeWotsBlockPublicKeysHash,
|
|
102
|
+
xe as createAuthenticatedVpClient,
|
|
103
|
+
v as createPayoutScript,
|
|
104
|
+
K as createTaprootScriptPathSignOptions,
|
|
105
|
+
V as deriveBip86ScriptPubKeyHex,
|
|
106
|
+
y as deriveNativeSegwitAddress,
|
|
107
|
+
O as deriveTaprootAddress,
|
|
101
108
|
n as deriveVaultId,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
109
|
+
ta as deriveVaultRoot,
|
|
110
|
+
ra as deriveWotsBlocksFromSeed,
|
|
111
|
+
h as ensureHexPrefix,
|
|
112
|
+
Qe as estimateRefundFeeSats,
|
|
113
|
+
u as expandAuthAnchor,
|
|
114
|
+
l as expandHashlockSecret,
|
|
115
|
+
p as expandWotsSeed,
|
|
116
|
+
ga as extractErrorData,
|
|
117
|
+
$a as extractInputsFromTransaction,
|
|
118
|
+
I as extractPayoutSignature,
|
|
112
119
|
S as extractPeginInputSignature,
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
120
|
+
g as finalizePeginInputPsbt,
|
|
121
|
+
U as formatSatoshisToBtc,
|
|
122
|
+
Ga as fundPeginTransaction,
|
|
123
|
+
re as getAddressTxs,
|
|
124
|
+
oe as getAddressUtxos,
|
|
125
|
+
Ea as getContractErrorMessage,
|
|
126
|
+
Ca as getDustThreshold,
|
|
127
|
+
ie as getMempoolApiUrl,
|
|
128
|
+
F as getNetwork,
|
|
129
|
+
ne as getNetworkFees,
|
|
130
|
+
Rs as getPeginProtocolState,
|
|
131
|
+
Va as getPsbtInputFields,
|
|
132
|
+
ya as getScriptType,
|
|
133
|
+
B as getSortedXOnlyPubkeys,
|
|
134
|
+
ue as getTxHex,
|
|
135
|
+
le as getTxInfo,
|
|
136
|
+
pe as getUtxoInfo,
|
|
137
|
+
ma as handleContractError,
|
|
138
|
+
N as hexToUint8Array,
|
|
139
|
+
D as isAddressFromPublicKey,
|
|
140
|
+
$e as isDepositAmountValid,
|
|
141
|
+
Ra as isKnownContractError,
|
|
142
|
+
as as isPegoutTerminalStatus,
|
|
143
|
+
es as isRecognizedPegoutStatus,
|
|
144
|
+
ss as isRegisteredVaultVersionMismatchError,
|
|
145
|
+
M as isValidHex,
|
|
146
|
+
we as isWotsMismatchError,
|
|
147
|
+
Ke as parseFundingOutpointsFromTx,
|
|
148
|
+
Ya as parseUnfundedWasmTransaction,
|
|
149
|
+
Za as peginOutputCount,
|
|
150
|
+
fe as primeVpTokenRegistry,
|
|
151
|
+
H as processPublicKeyToXOnly,
|
|
152
|
+
de as pushTx,
|
|
153
|
+
Ja as rateBasedTxBufferFee,
|
|
154
|
+
be as resolveProtocolAddresses,
|
|
155
|
+
ts as runDepositorPresignFlow,
|
|
156
|
+
ae as selectUtxosForDeposit,
|
|
157
|
+
Oa as selectUtxosForPegin,
|
|
158
|
+
ha as shouldAddChangeOutput,
|
|
159
|
+
rs as signDepositorGraph,
|
|
160
|
+
L as stripHexPrefix,
|
|
161
|
+
os as submitWotsPublicKey,
|
|
162
|
+
k as toXOnly,
|
|
163
|
+
W as uint8ArrayToHex,
|
|
164
|
+
is as validateDepositAmount,
|
|
165
|
+
ns as validateMultiVaultDepositInputs,
|
|
166
|
+
ve as validateOffchainParams,
|
|
167
|
+
us as validateOnChainParticipantKeys,
|
|
168
|
+
Ie as validatePegInConfiguration,
|
|
169
|
+
ls as validateProviderSelection,
|
|
170
|
+
ps as validateRemainingCapacity,
|
|
171
|
+
Ce as validateRequestDepositorClaimerArtifactsResponse,
|
|
172
|
+
ua as validateSecretAgainstHashlock,
|
|
173
|
+
Ve as validateTBVProtocolParams,
|
|
174
|
+
ee as validateUtxosAvailable,
|
|
175
|
+
ds as validateVaultAmounts,
|
|
176
|
+
Ps as validateVaultProviderPubkey,
|
|
177
|
+
X as validateWalletPubkey,
|
|
178
|
+
cs as verifyRegisteredVaultVersions,
|
|
179
|
+
ye as verifyServerIdentity,
|
|
180
|
+
Oe as vpTokenRegistry,
|
|
181
|
+
Ts as waitForPeginStatus,
|
|
182
|
+
Ua as waitForTransactionReceiptSmartAware
|
|
175
183
|
};
|
|
176
184
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PayoutManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PayoutManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,yBAAyB,CAAC;AAEjC,OAAO,
|
|
1
|
+
{"version":3,"file":"PayoutManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PayoutManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EACV,aAAa,EAEd,MAAM,yBAAyB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EAAE,gBAAgB,EAAE,GAC/B,OAAO,CACR,KAAK,CAAC;QACJ,eAAe,EAAE,MAAM,CAAC;QACxB,kBAAkB,EAAE,MAAM,CAAC;KAC5B,CAAC,CACH;IAoFD;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,qBAAqB;CAS9B"}
|
|
@@ -445,14 +445,13 @@ export declare class PeginManager {
|
|
|
445
445
|
/**
|
|
446
446
|
* Resolve the BTC scriptPubKey to register as the depositor's payout sink.
|
|
447
447
|
*
|
|
448
|
-
* `address` is validated against the verified depositor pubkey,
|
|
449
|
-
*
|
|
450
|
-
*
|
|
451
|
-
*
|
|
452
|
-
*
|
|
453
|
-
*
|
|
454
|
-
*
|
|
455
|
-
* address the wallet does not actually control.
|
|
448
|
+
* `address` is validated against the verified depositor pubkey, sourced
|
|
449
|
+
* from `assertPopMatchesBtcWallet`'s return value rather than
|
|
450
|
+
* `popSignature.depositorBtcPubkey` (which is x-only, parity stripped).
|
|
451
|
+
* For wallets that expose a compressed key this preserves y-parity end to
|
|
452
|
+
* end. For Taproot wallets that only expose an x-only key, the helper
|
|
453
|
+
* itself fails closed for P2WPKH — the parity is unknowable, so the
|
|
454
|
+
* payout sink must be a P2TR address derived from that same x.
|
|
456
455
|
*
|
|
457
456
|
* The helper does not call into the wallet so the batch path can resolve
|
|
458
457
|
* many requests without any extra adapter reads. Threat closed: a
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAcH,OAAO,EAIL,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EACjB,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EA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AAoB,CACxB,MAAM,EAAE,mBAAmB,GAC1B,OAAO,CAAC,mBAAmB,CAAC;IAiK/B;;;;;;;;;OASG;IACG,yBAAyB,CAC7B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAiKpC;;;;;;;;;;;;OAYG;YACW,gBAAgB;IAa9B;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,yBAAyB;IA6BjC;;;;;OAKG;IACG,qBAAqB,IAAI,OAAO,CAAC,YAAY,CAAC;IAyBpD;;;;;;;OAOG;YACW,yBAAyB;IAkBvC;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,uBAAuB,IAAI,OAAO;CAGnC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../../PeginManager-BbHPyz-G.cjs"),a=require("../../../PayoutManager-BxAY2x0g.cjs");exports.PeginManager=e.PeginManager;exports.PayoutManager=a.PayoutManager;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { P as e } from "../../../PeginManager-
|
|
2
|
-
import { P } from "../../../PayoutManager-
|
|
1
|
+
import { P as e } from "../../../PeginManager-B1Mh8dJ3.js";
|
|
2
|
+
import { P } from "../../../PayoutManager-sfxuOBGq.js";
|
|
3
3
|
export {
|
|
4
4
|
P as PayoutManager,
|
|
5
5
|
e as PeginManager
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../challengeAssert-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("../../../challengeAssert-BKDS_ADt.cjs"),s=require("@babylonlabs-io/babylon-tbv-rust-wasm"),i=require("../../../peginInput-57FK2O99.cjs"),u=require("../../../noPayout-B6s8vrW6.cjs"),t=require("../../../assertPsbtUnsignedTxMatches-BoHwgW30.cjs"),e=require("../../../bitcoin-CHfKAhcI.cjs");exports.buildChallengeAssertPsbt=r.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=r.buildDepositorPayoutPsbt;exports.computeNumLocalChallengers=r.computeNumLocalChallengers;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>s.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>s.deriveVaultId});exports.buildPeginInputPsbt=i.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=i.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=i.buildPrePeginPsbt;exports.extractPeginInputSignature=i.extractPeginInputSignature;exports.finalizePeginInputPsbt=i.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=u.buildNoPayoutPsbt;exports.buildRefundPsbt=u.buildRefundPsbt;exports.PsbtSubstitutionError=t.PsbtSubstitutionError;exports.assertPayoutOutputMatchesRegistered=t.assertPayoutOutputMatchesRegistered;exports.assertPsbtUnsignedTxMatches=t.assertPsbtUnsignedTxMatches;exports.buildPayoutPsbt=t.buildPayoutPsbt;exports.createPayoutScript=t.createPayoutScript;exports.extractPayoutSignature=t.extractPayoutSignature;exports.deriveBip86ScriptPubKeyHex=e.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.formatSatoshisToBtc=e.formatSatoshisToBtc;exports.getSortedXOnlyPubkeys=e.getSortedXOnlyPubkeys;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -92,6 +92,8 @@ export { buildRefundPsbt } from './psbt/refund';
|
|
|
92
92
|
export type { BuildRefundPsbtParams, BuildRefundPsbtResult, } from './psbt/refund';
|
|
93
93
|
export { assertPayoutOutputMatchesRegistered, buildPayoutPsbt, extractPayoutSignature, } from './psbt/payout';
|
|
94
94
|
export type { PayoutParams, PayoutPsbtResult } from './psbt/payout';
|
|
95
|
+
export { assertPsbtUnsignedTxMatches, PsbtSubstitutionError, } from './psbt/assertPsbtUnsignedTxMatches';
|
|
96
|
+
export type { AssertPsbtUnsignedTxMatchesParams } from './psbt/assertPsbtUnsignedTxMatches';
|
|
95
97
|
export { buildDepositorPayoutPsbt } from './psbt/depositorPayout';
|
|
96
98
|
export type { DepositorPayoutParams } from './psbt/depositorPayout';
|
|
97
99
|
export { buildNoPayoutPsbt } from './psbt/noPayout';
|
|
@@ -100,5 +102,5 @@ export { buildChallengeAssertPsbt } from './psbt/challengeAssert';
|
|
|
100
102
|
export type { ChallengeAssertParams } from './psbt/challengeAssert';
|
|
101
103
|
export { createPayoutScript } from './scripts/payout';
|
|
102
104
|
export type { PayoutScriptParams, PayoutScriptResult } from './scripts/payout';
|
|
103
|
-
export { deriveNativeSegwitAddress, deriveTaprootAddress, hexToUint8Array, isAddressFromPublicKey, isValidHex, ensureHexPrefix, formatSatoshisToBtc, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './utils/bitcoin';
|
|
105
|
+
export { deriveBip86ScriptPubKeyHex, deriveNativeSegwitAddress, deriveTaprootAddress, getSortedXOnlyPubkeys, hexToUint8Array, isAddressFromPublicKey, isValidHex, ensureHexPrefix, formatSatoshisToBtc, processPublicKeyToXOnly, stripHexPrefix, toXOnly, uint8ArrayToHex, validateWalletPubkey, type WalletPubkeyValidationResult, } from './utils/bitcoin';
|
|
104
106
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AAGH,OAAO,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AAG3D,YAAY,EAAE,OAAO,EAAE,MAAM,uCAAuC,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,aAAa,EAAE,MAAM,uCAAuC,CAAC;AAE5F;;;;;;GAMG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AACpC,YAAY,EACV,mCAAmC,EACnC,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,uCAAuC,CAAC;AAG/C,OAAO,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,cAAc,CAAC;AACjF,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC;AAC5G,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,EACL,mCAAmC,EACnC,eAAe,EACf,sBAAsB,GACvB,MAAM,eAAe,CAAC;AACvB,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEpE,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,YAAY,EAAE,qBAAqB,EAAE,MA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
1
|
-
import { a
|
|
1
|
+
import { a, b as t, c as r } from "../../../challengeAssert-BXESW00N.js";
|
|
2
2
|
import { computeMinClaimValue as o, deriveVaultId as u } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
-
import { c as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import { d as
|
|
3
|
+
import { c as b, a as d, b as l, e as n, f as p } from "../../../peginInput-CYJzbuwA.js";
|
|
4
|
+
import { a as x, b as y } from "../../../noPayout-BhgknZBx.js";
|
|
5
|
+
import { P as f, a as m, c as S, b as h, d as v, e as T } from "../../../assertPsbtUnsignedTxMatches-D7RxpR4A.js";
|
|
6
|
+
import { d as H, a as I, b as O, e as C, f as F, g as K, h as M, i as N, c as V, p as X, s as k, t as B, u as R, v as U } from "../../../bitcoin-B5aNKtsk.js";
|
|
7
7
|
export {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
f as PsbtSubstitutionError,
|
|
9
|
+
m as assertPayoutOutputMatchesRegistered,
|
|
10
|
+
S as assertPsbtUnsignedTxMatches,
|
|
11
|
+
a as buildChallengeAssertPsbt,
|
|
10
12
|
t as buildDepositorPayoutPsbt,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
x as buildNoPayoutPsbt,
|
|
14
|
+
h as buildPayoutPsbt,
|
|
15
|
+
b as buildPeginInputPsbt,
|
|
16
|
+
d as buildPeginTxFromFundedPrePegin,
|
|
17
|
+
l as buildPrePeginPsbt,
|
|
18
|
+
y as buildRefundPsbt,
|
|
17
19
|
o as computeMinClaimValue,
|
|
18
20
|
r as computeNumLocalChallengers,
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
21
|
+
v as createPayoutScript,
|
|
22
|
+
H as deriveBip86ScriptPubKeyHex,
|
|
23
|
+
I as deriveNativeSegwitAddress,
|
|
24
|
+
O as deriveTaprootAddress,
|
|
22
25
|
u as deriveVaultId,
|
|
23
|
-
|
|
24
|
-
|
|
26
|
+
C as ensureHexPrefix,
|
|
27
|
+
T as extractPayoutSignature,
|
|
25
28
|
n as extractPeginInputSignature,
|
|
26
29
|
p as finalizePeginInputPsbt,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
N as
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
R as
|
|
30
|
+
F as formatSatoshisToBtc,
|
|
31
|
+
K as getSortedXOnlyPubkeys,
|
|
32
|
+
M as hexToUint8Array,
|
|
33
|
+
N as isAddressFromPublicKey,
|
|
34
|
+
V as isValidHex,
|
|
35
|
+
X as processPublicKeyToXOnly,
|
|
36
|
+
k as stripHexPrefix,
|
|
37
|
+
B as toXOnly,
|
|
38
|
+
R as uint8ArrayToHex,
|
|
39
|
+
U as validateWalletPubkey
|
|
36
40
|
};
|
|
37
41
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertPsbtUnsignedTxMatches.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/primitives/psbt/__tests__/assertPsbtUnsignedTxMatches.test.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Asserts a wallet-returned PSBT encodes the same unsigned transaction
|
|
3
|
+
* as the locally-built PSBT we asked the wallet to sign. Per-input PSBT
|
|
4
|
+
* metadata (witnessUtxo, tapLeafScript, sighashType) is intentionally NOT
|
|
5
|
+
* compared — those fields are committed to the Schnorr sighash and the
|
|
6
|
+
* vault provider's `verify_depositor_signature` rejects mismatches there.
|
|
7
|
+
* This primitive defends the path where a colluding VP would otherwise
|
|
8
|
+
* accept a wallet-substituted signature.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Thrown when a wallet-returned PSBT encodes a different unsigned
|
|
12
|
+
* transaction than the one the caller asked the wallet to sign.
|
|
13
|
+
*/
|
|
14
|
+
export declare class PsbtSubstitutionError extends Error {
|
|
15
|
+
constructor(detail: string);
|
|
16
|
+
}
|
|
17
|
+
export interface AssertPsbtUnsignedTxMatchesParams {
|
|
18
|
+
/** PSBT we built locally and asked the wallet to sign. */
|
|
19
|
+
requestedPsbtHex: string;
|
|
20
|
+
/** PSBT the wallet returned after signing. */
|
|
21
|
+
returnedPsbtHex: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Compare two PSBTs and throw `PsbtSubstitutionError` unless they encode
|
|
25
|
+
* the same unsigned transaction (version, locktime, inputs, outputs).
|
|
26
|
+
*
|
|
27
|
+
* @throws PsbtSubstitutionError on any mismatch in the unsigned tx
|
|
28
|
+
* @throws Error if either PSBT cannot be parsed
|
|
29
|
+
*/
|
|
30
|
+
export declare function assertPsbtUnsignedTxMatches(params: AssertPsbtUnsignedTxMatchesParams): void;
|
|
31
|
+
//# sourceMappingURL=assertPsbtUnsignedTxMatches.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertPsbtUnsignedTxMatches.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/assertPsbtUnsignedTxMatches.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;GAGG;AACH,qBAAa,qBAAsB,SAAQ,KAAK;gBAClC,MAAM,EAAE,MAAM;CAM3B;AAED,MAAM,WAAW,iCAAiC;IAChD,0DAA0D;IAC1D,gBAAgB,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,eAAe,EAAE,MAAM,CAAC;CACzB;AAiCD;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,iCAAiC,GACxC,IAAI,CAyDN"}
|
|
@@ -29,4 +29,6 @@ export { buildNoPayoutPsbt } from './noPayout';
|
|
|
29
29
|
export type { NoPayoutParams } from './noPayout';
|
|
30
30
|
export { buildChallengeAssertPsbt } from './challengeAssert';
|
|
31
31
|
export type { ChallengeAssertParams } from './challengeAssert';
|
|
32
|
+
export { assertPsbtUnsignedTxMatches, PsbtSubstitutionError, } from './assertPsbtUnsignedTxMatches';
|
|
33
|
+
export type { AssertPsbtUnsignedTxMatchesParams } from './assertPsbtUnsignedTxMatches';
|
|
32
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,iBAAiB,EAAE,8BAA8B,EAAE,MAAM,SAAS,CAAC;AAC5E,YAAY,EACV,cAAc,EACd,kBAAkB,EAClB,kBAAkB,EAClB,aAAa,GACd,MAAM,SAAS,CAAC;AAEjB,OAAO,EAAE,mBAAmB,EAAE,0BAA0B,EAAE,MAAM,cAAc,CAAC;AAC/E,YAAY,EACV,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACnE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAE/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,YAAY,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAE,wBAAwB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,YAAY,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/primitives/psbt/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,iBAAiB,EA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