@babylonlabs-io/ts-sdk 0.28.1 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/PeginManager-Zrv-ncJi.cjs +2 -0
- package/dist/PeginManager-Zrv-ncJi.cjs.map +1 -0
- package/dist/{PeginManager-DzMSIQ0I.js → PeginManager-_pamUKlS.js} +622 -580
- package/dist/PeginManager-_pamUKlS.js.map +1 -0
- package/dist/{buildAndBroadcastRefund-xWS8frc6.js → buildAndBroadcastRefund-BY6mYmFl.js} +406 -303
- package/dist/buildAndBroadcastRefund-BY6mYmFl.js.map +1 -0
- package/dist/buildAndBroadcastRefund-CO60ReNf.cjs +2 -0
- package/dist/buildAndBroadcastRefund-CO60ReNf.cjs.map +1 -0
- package/dist/challengeAssert-mYikGC34.js +269 -0
- package/dist/challengeAssert-mYikGC34.js.map +1 -0
- package/dist/challengeAssert-yYFflBOx.cjs +2 -0
- package/dist/challengeAssert-yYFflBOx.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +144 -143
- package/dist/noPayout-B8JiTaYt.js +333 -0
- package/dist/noPayout-B8JiTaYt.js.map +1 -0
- package/dist/noPayout-CwgYkZYs.cjs +2 -0
- package/dist/noPayout-CwgYkZYs.cjs.map +1 -0
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +145 -144
- package/dist/tbv/core/managers/PayoutManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts +17 -14
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts +2 -0
- package/dist/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts +25 -0
- package/dist/tbv/core/managers/pegin/assertAuthAnchorOpReturn.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts +25 -0
- package/dist/tbv/core/managers/pegin/expandPerVaultSecrets.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/index.d.ts +12 -0
- package/dist/tbv/core/managers/pegin/index.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts +23 -0
- package/dist/tbv/core/managers/pegin/normalizeWalletInputs.d.ts.map +1 -0
- package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts +12 -0
- package/dist/tbv/core/managers/pegin/signPsbtsWithFallback.d.ts.map +1 -0
- package/dist/tbv/core/primitives/index.cjs +1 -1
- package/dist/tbv/core/primitives/index.d.ts +1 -1
- package/dist/tbv/core/primitives/index.d.ts.map +1 -1
- package/dist/tbv/core/primitives/index.js +26 -25
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts +18 -1
- package/dist/tbv/core/primitives/psbt/noPayout.d.ts.map +1 -1
- package/dist/tbv/core/primitives/psbt/payout.d.ts +15 -0
- package/dist/tbv/core/primitives/psbt/payout.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/index.d.ts +1 -1
- package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts +21 -0
- package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts.map +1 -1
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +50 -4
- package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -1
- package/dist/tbv/core/services/index.cjs +1 -1
- package/dist/tbv/core/services/index.js +1 -1
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +145 -144
- package/package.json +1 -1
- package/dist/PeginManager-Da4uSHzl.cjs +0 -2
- package/dist/PeginManager-Da4uSHzl.cjs.map +0 -1
- package/dist/PeginManager-DzMSIQ0I.js.map +0 -1
- package/dist/buildAndBroadcastRefund-DkEpTFkv.cjs +0 -2
- package/dist/buildAndBroadcastRefund-DkEpTFkv.cjs.map +0 -1
- package/dist/buildAndBroadcastRefund-xWS8frc6.js.map +0 -1
- package/dist/challengeAssert-BM8m9gPM.cjs +0 -2
- package/dist/challengeAssert-BM8m9gPM.cjs.map +0 -1
- package/dist/challengeAssert-j2Vwqo0-.js +0 -304
- package/dist/challengeAssert-j2Vwqo0-.js.map +0 -1
- package/dist/payout-B_fvQU3q.js +0 -261
- package/dist/payout-B_fvQU3q.js.map +0 -1
- package/dist/payout-DP6KMFP1.cjs +0 -2
- package/dist/payout-DP6KMFP1.cjs.map +0 -1
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,EACb,MAAM,eAAe,CAAC;AAEvB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,EAAE,aAAa,CAAC;CAC1B;AAED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
|
@@ -156,6 +156,17 @@ export interface PreparePeginDerivedSecrets {
|
|
|
156
156
|
* via `expandHashlockSecret(root, htlcVout)`; not persisted.
|
|
157
157
|
*/
|
|
158
158
|
htlcSecretHexes: string[];
|
|
159
|
+
/**
|
|
160
|
+
* Raw 32-byte auth-anchor preimage as 64-char lowercase hex (no `0x`).
|
|
161
|
+
* Sent to the VP via `auth_createDepositorToken` to obtain a bearer
|
|
162
|
+
* token; the VP validates `SHA256(authAnchorHex) === OP_RETURN_PUSH32`
|
|
163
|
+
* in the broadcast Pre-PegIn. Reveal is intentional: once exposed
|
|
164
|
+
* the anchor is public, but its scope is bound to a single
|
|
165
|
+
* `peginTxid`. Domain-separated from `htlcSecretHexes` and
|
|
166
|
+
* `perVaultWotsKeys` via the HKDF `info` label, so revealing it does
|
|
167
|
+
* not weaken the other derived secrets.
|
|
168
|
+
*/
|
|
169
|
+
authAnchorHex: string;
|
|
159
170
|
}
|
|
160
171
|
export interface PreparePeginResult {
|
|
161
172
|
/** Broadcast-ready Pre-PegIn + per-vault PegIn txs. Safe to log. */
|
|
@@ -339,12 +350,6 @@ export declare class PeginManager {
|
|
|
339
350
|
* invariant violation.
|
|
340
351
|
*/
|
|
341
352
|
preparePegin(params: PreparePeginParams): Promise<PreparePeginResult>;
|
|
342
|
-
/**
|
|
343
|
-
* Derive per-vault WOTS keys + HTLC preimages from the wallet root.
|
|
344
|
-
* Takes ownership of `root`: zeros the buffer (and per-vault secret
|
|
345
|
-
* buffers) before returning, regardless of how the caller exits.
|
|
346
|
-
*/
|
|
347
|
-
private expandPerVaultSecrets;
|
|
348
353
|
/**
|
|
349
354
|
* Build unfunded Pre-PegIn + select UTXOs. No PSBT signing.
|
|
350
355
|
*
|
|
@@ -354,18 +359,16 @@ export declare class PeginManager {
|
|
|
354
359
|
* `selectUtxosForPegin` in the commit pass would be deterministic given
|
|
355
360
|
* the same inputs, but threading the result through guarantees the
|
|
356
361
|
* domain separator structurally matches the funded tx inputs.
|
|
362
|
+
*
|
|
363
|
+
* Sizing runs before the wallet popup, so neither the real per-vault
|
|
364
|
+
* hashlocks nor the real `authAnchorHash` are known yet. Both slots
|
|
365
|
+
* are filled with a 32-byte placeholder; the commit pass swaps in the
|
|
366
|
+
* real values. Output budget is identical (32-byte push regardless of
|
|
367
|
+
* content), so UTXO selection is invariant under substitution.
|
|
357
368
|
*/
|
|
358
369
|
private prepareSizing;
|
|
359
370
|
/** Build PegIn txs and batch-sign their inputs with real hashlocks. */
|
|
360
371
|
private preparePeginCommit;
|
|
361
|
-
/**
|
|
362
|
-
* Signs multiple PSBTs using batch signing if available, falling back to sequential signing.
|
|
363
|
-
*
|
|
364
|
-
* Wallets that support native batch signing (e.g. UniSat) will sign all PSBTs
|
|
365
|
-
* in a single interaction. Others (e.g. Ledger, AppKit) implement signPsbts
|
|
366
|
-
* by looping signPsbt internally, so the UX depends on the wallet adapter.
|
|
367
|
-
*/
|
|
368
|
-
private signPsbtsWithFallback;
|
|
369
372
|
/**
|
|
370
373
|
* Signs and broadcasts a funded peg-in transaction to the Bitcoin network.
|
|
371
374
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;
|
|
1
|
+
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAcH,OAAO,EAML,KAAK,OAAO,EACZ,KAAK,KAAK,EACV,KAAK,GAAG,EACR,KAAK,YAAY,EAClB,MAAM,MAAM,CAAC;AAEd,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAmB,MAAM,yBAAyB,CAAC;AACpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAG1E,OAAO,EAQL,KAAK,OAAO,EACb,MAAM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core/managers/pegin/__tests__/assertAuthAnchorOpReturn.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandPerVaultSecrets.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/expandPerVaultSecrets.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeWalletInputs.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/normalizeWalletInputs.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signPsbtsWithFallback.test.d.ts","sourceRoot":"","sources":["../../../../../../src/tbv/core/managers/pegin/__tests__/signPsbtsWithFallback.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structural verifier for the auth-anchor OP_RETURN in a funded
|
|
3
|
+
* Pre-PegIn transaction.
|
|
4
|
+
*
|
|
5
|
+
* @module managers/pegin/assertAuthAnchorOpReturn
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Verify the broadcast Pre-PegIn carries the expected OP_RETURN
|
|
9
|
+
* commitment to the auth anchor.
|
|
10
|
+
*
|
|
11
|
+
* The OP_RETURN sits at `vout = vaultCount` (right after the per-vault
|
|
12
|
+
* HTLC outputs and before the depositor-claim/change outputs) and
|
|
13
|
+
* pushes the 32-byte `SHA256(authAnchor)`. The script encoding is
|
|
14
|
+
* exactly `OP_RETURN || PUSH32 || <32 bytes>` (34 bytes). A
|
|
15
|
+
* non-conformant WASM build that omitted the OP_RETURN, swapped its
|
|
16
|
+
* position, or changed its push payload would let the depositor
|
|
17
|
+
* obtain a valid bearer token for a Pre-PegIn whose on-chain
|
|
18
|
+
* commitment doesn't actually bind the anchor — degrading the auth
|
|
19
|
+
* from on-chain-bound to a shared secret. Fail closed.
|
|
20
|
+
*
|
|
21
|
+
* @throws If the OP_RETURN is missing, mis-located, mis-encoded, or
|
|
22
|
+
* pushes a payload other than `expectedAuthAnchorHashHex`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function assertAuthAnchorOpReturn(fundedPrePeginTxHex: string, vaultCount: number, expectedAuthAnchorHashHex: string): void;
|
|
25
|
+
//# sourceMappingURL=assertAuthAnchorOpReturn.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assertAuthAnchorOpReturn.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/assertAuthAnchorOpReturn.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAaH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,wBAAwB,CACtC,mBAAmB,EAAE,MAAM,EAC3B,UAAU,EAAE,MAAM,EAClB,yBAAyB,EAAE,MAAM,GAChC,IAAI,CAwCN"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
import { WotsBlockPublicKey } from '../../clients/vault-provider/types';
|
|
3
|
+
/**
|
|
4
|
+
* Result of {@link expandPerVaultSecrets}.
|
|
5
|
+
*/
|
|
6
|
+
export interface PerVaultExpansionResult {
|
|
7
|
+
perVaultWotsKeys: WotsBlockPublicKey[][];
|
|
8
|
+
/** Keccak256 of WOTS keys, ready as `depositorWotsPkHash` (0x-prefixed). */
|
|
9
|
+
wotsPkHashes: Hex[];
|
|
10
|
+
/** HTLC preimage hex per vault (no 0x prefix). */
|
|
11
|
+
htlcSecretHexes: string[];
|
|
12
|
+
/** SHA-256 of each HTLC preimage as 64-char hex (no 0x prefix). */
|
|
13
|
+
hashlocks: string[];
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Derive per-vault WOTS keys + HTLC preimages from the wallet root.
|
|
17
|
+
*
|
|
18
|
+
* Takes ownership of `root`: zeros the buffer (and per-vault secret
|
|
19
|
+
* buffers) before returning, regardless of how the caller exits.
|
|
20
|
+
*
|
|
21
|
+
* @param root 32-byte wallet-derived root from `deriveVaultRoot`.
|
|
22
|
+
* @param vaultCount Number of vaults (= length of `amounts`).
|
|
23
|
+
*/
|
|
24
|
+
export declare function expandPerVaultSecrets(root: Uint8Array, vaultCount: number): Promise<PerVaultExpansionResult>;
|
|
25
|
+
//# sourceMappingURL=expandPerVaultSecrets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"expandPerVaultSecrets.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/expandPerVaultSecrets.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAEhC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAe7E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,gBAAgB,EAAE,kBAAkB,EAAE,EAAE,CAAC;IACzC,4EAA4E;IAC5E,YAAY,EAAE,GAAG,EAAE,CAAC;IACpB,kDAAkD;IAClD,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,mEAAmE;IACnE,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,UAAU,EAChB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,uBAAuB,CAAC,CA+BlC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal-only re-exports for the Pre-PegIn / PegIn building blocks.
|
|
3
|
+
* Consumers should depend on `PeginManager`; these helpers exist to
|
|
4
|
+
* keep that file a thin coordinator.
|
|
5
|
+
*
|
|
6
|
+
* @module managers/pegin
|
|
7
|
+
*/
|
|
8
|
+
export { assertAuthAnchorOpReturn } from './assertAuthAnchorOpReturn';
|
|
9
|
+
export { expandPerVaultSecrets, type PerVaultExpansionResult, } from './expandPerVaultSecrets';
|
|
10
|
+
export { normalizePopSignature, normalizeXOnlyPubkey, } from './normalizeWalletInputs';
|
|
11
|
+
export { signPsbtsWithFallback } from './signPsbtsWithFallback';
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EACL,qBAAqB,EACrB,KAAK,uBAAuB,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Hex } from 'viem';
|
|
2
|
+
/**
|
|
3
|
+
* Normalize a wallet-returned BTC public key to the canonical x-only
|
|
4
|
+
* 64-char lowercase hex form (no 0x prefix).
|
|
5
|
+
*
|
|
6
|
+
* Throws on empty/non-string input. Idempotent on x-only input.
|
|
7
|
+
*/
|
|
8
|
+
export declare function normalizeXOnlyPubkey(raw: unknown): string;
|
|
9
|
+
/**
|
|
10
|
+
* Normalize a wallet-returned BIP-322 signature into 0x-prefixed hex.
|
|
11
|
+
*
|
|
12
|
+
* Accepts:
|
|
13
|
+
* - 0x-prefixed lowercase/uppercase hex
|
|
14
|
+
* - unprefixed hex (wins over base64 when input is pure `[0-9a-fA-F]+`)
|
|
15
|
+
* - canonical standard base64 (`[A-Za-z0-9+/]` with `=` padding to a
|
|
16
|
+
* multiple of 4 and no non-canonical encodings)
|
|
17
|
+
*
|
|
18
|
+
* Rejects URL-safe base64 (`-`/`_`) and base64 without padding. Wallets
|
|
19
|
+
* known to return BIP-322 signatures (Keystone, UniSat, OKX, OneKey,
|
|
20
|
+
* Unisat) all use standard base64; URL-safe is an explicit non-goal.
|
|
21
|
+
*/
|
|
22
|
+
export declare function normalizePopSignature(raw: unknown): Hex;
|
|
23
|
+
//# sourceMappingURL=normalizeWalletInputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalizeWalletInputs.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/normalizeWalletInputs.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,MAAM,CAAC;AAQhC;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,CAQzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,CAoCvD"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { BitcoinWallet, SignPsbtOptions } from '../../../../shared/wallets';
|
|
2
|
+
/**
|
|
3
|
+
* Sign multiple PSBTs against a wallet. Wallets exposing native batch
|
|
4
|
+
* signing (e.g. UniSat) sign all PSBTs in a single interaction; others
|
|
5
|
+
* (Ledger, AppKit) loop `signPsbt` internally, so the popup UX depends
|
|
6
|
+
* on the wallet adapter.
|
|
7
|
+
*
|
|
8
|
+
* @throws If `signPsbts` returns a different number of signed PSBTs
|
|
9
|
+
* than were submitted.
|
|
10
|
+
*/
|
|
11
|
+
export declare function signPsbtsWithFallback(wallet: BitcoinWallet, psbtsHexes: string[], options: SignPsbtOptions[]): Promise<string[]>;
|
|
12
|
+
//# sourceMappingURL=signPsbtsWithFallback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"signPsbtsWithFallback.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/managers/pegin/signPsbtsWithFallback.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,eAAe,EAChB,MAAM,4BAA4B,CAAC;AAEpC;;;;;;;;GAQG;AACH,wBAAsB,qBAAqB,CACzC,MAAM,EAAE,aAAa,EACrB,UAAU,EAAE,MAAM,EAAE,EACpB,OAAO,EAAE,eAAe,EAAE,GACzB,OAAO,CAAC,MAAM,EAAE,CAAC,CAiBnB"}
|
|
@@ -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,E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