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