@babylonlabs-io/ts-sdk 0.20.1 → 0.21.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/README.md +14 -6
- package/dist/errors-Cbyg_QQf.cjs +2 -0
- package/dist/errors-Cbyg_QQf.cjs.map +1 -0
- package/dist/{errors-D_PI__IT.js → errors-DvIudLXV.js} +344 -338
- package/dist/errors-DvIudLXV.js.map +1 -0
- package/dist/{index-CFwoGJNQ.js → index-BORWfdUU.js} +140 -115
- package/dist/index-BORWfdUU.js.map +1 -0
- package/dist/index-DNSV--0P.cjs +2 -0
- package/dist/index-DNSV--0P.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.js +126 -120
- package/dist/index.js.map +1 -1
- package/dist/shared/wallets/index.d.ts +8 -0
- package/dist/shared/wallets/index.d.ts.map +1 -1
- package/dist/tbv/core/clients/index.cjs +1 -1
- package/dist/tbv/core/clients/index.d.ts +3 -2
- package/dist/tbv/core/clients/index.d.ts.map +1 -1
- package/dist/tbv/core/clients/index.js +1 -1
- package/dist/tbv/core/clients/mempool/mempoolApi.d.ts.map +1 -1
- package/dist/tbv/core/index.cjs +1 -1
- package/dist/tbv/core/index.js +122 -116
- package/dist/tbv/core/index.js.map +1 -1
- package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
- package/dist/tbv/core/managers/index.d.ts +15 -62
- package/dist/tbv/core/managers/index.d.ts.map +1 -1
- package/dist/tbv/core/services/index.d.ts +2 -4
- package/dist/tbv/core/services/index.d.ts.map +1 -1
- package/dist/tbv/core/utils/index.cjs +1 -1
- package/dist/tbv/core/utils/index.d.ts +2 -7
- package/dist/tbv/core/utils/index.d.ts.map +1 -1
- package/dist/tbv/core/utils/index.js +37 -31
- package/dist/tbv/core/utils/index.js.map +1 -1
- package/dist/tbv/core/utils/validation.d.ts +35 -0
- package/dist/tbv/core/utils/validation.d.ts.map +1 -0
- package/dist/tbv/index.cjs +1 -1
- package/dist/tbv/index.js +122 -116
- package/dist/tbv/index.js.map +1 -1
- package/dist/validation-CxqROCno.js +15 -0
- package/dist/validation-CxqROCno.js.map +1 -0
- package/dist/validation-u8W7Lp2x.cjs +2 -0
- package/dist/validation-u8W7Lp2x.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/errors-D9EtjJoD.cjs +0 -2
- package/dist/errors-D9EtjJoD.cjs.map +0 -1
- package/dist/errors-D_PI__IT.js.map +0 -1
- package/dist/index-BpXpESWu.cjs +0 -2
- package/dist/index-BpXpESWu.cjs.map +0 -1
- package/dist/index-CFwoGJNQ.js.map +0 -1
package/dist/tbv/core/index.js
CHANGED
|
@@ -1,136 +1,142 @@
|
|
|
1
1
|
import { i as e, g as t, h as o, d as r, a as i, b as l, c as n, e as u, f as P } from "../../challengeAssert-D1lpvuMv.js";
|
|
2
|
-
import { computeMinClaimValue as c, deriveVaultId as
|
|
3
|
-
import { a as
|
|
4
|
-
import { d as
|
|
5
|
-
import { C as
|
|
6
|
-
import { B as
|
|
7
|
-
import { B as
|
|
8
|
-
import { B as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
2
|
+
import { computeMinClaimValue as c, deriveVaultId as T } from "@babylonlabs-io/babylon-tbv-rust-wasm";
|
|
3
|
+
import { a as S, b as E, c as g, e as A } from "../../payout-DzGsAnhf.js";
|
|
4
|
+
import { d as _, a as m, e as b, f as x, g as I, h as f, i as C, b as v, p as U, s as y, t as O, u as h, v as V } from "../../bitcoin-nOOgeRyl.js";
|
|
5
|
+
import { C as F, P as N, a as D, c as M, g as H } from "../../signing-DeWVBl7m.js";
|
|
6
|
+
import { B as W, H as k, K, M as X, T as w } from "../../validation-CxqROCno.js";
|
|
7
|
+
import { B as Y, C as J, P as j, a as Z, m as z, h as q, i as Q, l as $, k as aa, p as sa, b as ea, s as ta, v as oa, g as ra, d as ia, c as la, j as na, e as ua, f as Pa, w as da } from "../../buildAndBroadcastRefund-DnTQkCgG.js";
|
|
8
|
+
import { B as Ta, D as pa, F as Sa, L as Ea, M as ga, P as Aa, a as Ra, S as _a, T as ma, W as ba, f as xa, b as Ia, p as fa, r as Ca } from "../../fundPeginTransaction-BLYXxLBv.js";
|
|
9
|
+
import { B as Ua, U as ya, a as Oa, f as ha, c as Va, e as Ba, g as Fa, i as Na, h as Da, s as Ma, b as Ha, d as La, v as Wa } from "../../psbtInputFields-r1ss6WLU.js";
|
|
10
|
+
import { C as Ka, P as Xa, b as wa, c as Ga, a as Ya, d as Ja, f as ja, e as Za, g as za, h as qa, i as Qa, j as $a, k as as, m as ss } from "../../errors-DvIudLXV.js";
|
|
11
|
+
import { A as ts, M as os, P as rs, V as is, i as ls, j as ns, k as us, l as Ps, h as ds, g as cs, a as Ts, b as ps, c as Ss, d as Es, e as gs, f as As, p as Rs, r as _s } from "../../index-BORWfdUU.js";
|
|
12
|
+
import { B as bs, D as xs, b as Is, J as fs, a as Cs, d as vs, P as Us, R as ys, c as Os, V as hs } from "../../types-DWjaqVfP.js";
|
|
12
13
|
export {
|
|
13
|
-
|
|
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
|
-
|
|
14
|
+
ts as ApplicationRegistryABI,
|
|
15
|
+
Y as BIP68NotMatureError,
|
|
16
|
+
W as BITCOIN_ADDRESS_RE,
|
|
17
|
+
bs as BTCVaultRegistryABI,
|
|
18
|
+
Ta as BTC_DUST_SAT,
|
|
19
|
+
Ua as BitcoinScriptType,
|
|
20
|
+
Ka as CONTRACT_ERRORS,
|
|
21
|
+
J as ClaimerPegoutStatusValue,
|
|
22
|
+
F as ContractStatus,
|
|
23
|
+
pa as DUST_THRESHOLD,
|
|
24
|
+
xs as DaemonStatus,
|
|
25
|
+
Sa as FEE_SAFETY_MARGIN,
|
|
26
|
+
k as HEX_RE,
|
|
27
|
+
Is as JSON_RPC_ERROR_CODES,
|
|
28
|
+
fs as JsonRpcClient,
|
|
29
|
+
Cs 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
|
+
X as MAX_REASONABLE_FEE_SATS,
|
|
34
|
+
os as MEMPOOL_API_URLS,
|
|
35
|
+
Aa as P2TR_INPUT_SIZE,
|
|
36
|
+
Ra as PEGIN_FIXED_OUTPUTS,
|
|
37
|
+
vs as POST_WOTS_STATUSES,
|
|
38
|
+
Us as PRE_DEPOSITOR_SIGNATURES_STATES,
|
|
39
|
+
j as PayoutManager,
|
|
40
|
+
N as PeginAction,
|
|
41
|
+
Xa as PeginManager,
|
|
42
|
+
rs as ProtocolParamsABI,
|
|
43
|
+
ys as RpcErrorCode,
|
|
44
|
+
_a as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
45
|
+
w as TXID_RE,
|
|
46
|
+
ma as TX_BUFFER_SIZE_OVERHEAD,
|
|
47
|
+
ya as UtxoNotAvailableError,
|
|
48
|
+
Os as VP_TERMINAL_STATUSES,
|
|
49
|
+
hs as VP_TRANSIENT_STATUSES,
|
|
50
|
+
is as VaultProviderRpcClient,
|
|
51
|
+
ls as ViemProtocolParamsReader,
|
|
52
|
+
ns as ViemUniversalChallengerReader,
|
|
53
|
+
us as ViemVaultKeeperReader,
|
|
54
|
+
Ps as ViemVaultRegistryReader,
|
|
55
|
+
ds as VpResponseValidationError,
|
|
56
|
+
ba as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
57
|
+
Z as activateVault,
|
|
58
|
+
Oa as assertUtxosAvailable,
|
|
59
|
+
z as buildAndBroadcastRefund,
|
|
54
60
|
e as buildChallengeAssertPsbt,
|
|
55
61
|
t as buildDepositorPayoutPsbt,
|
|
56
62
|
o as buildNoPayoutPsbt,
|
|
57
|
-
|
|
63
|
+
S as buildPayoutPsbt,
|
|
58
64
|
r as buildPeginInputPsbt,
|
|
59
65
|
i as buildPeginTxFromFundedPrePegin,
|
|
60
66
|
l as buildPrePeginPsbt,
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
67
|
+
E as buildRefundPsbt,
|
|
68
|
+
ha as calculateBtcTxHash,
|
|
69
|
+
D as canPerformAction,
|
|
70
|
+
Va as collectReservedUtxoRefs,
|
|
71
|
+
q as computeHashlock,
|
|
66
72
|
c as computeMinClaimValue,
|
|
67
73
|
n as computeNumLocalChallengers,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
74
|
+
wa as computeWotsBlockPublicKeysHash,
|
|
75
|
+
Ga as computeWotsPkHash,
|
|
76
|
+
g as createPayoutScript,
|
|
71
77
|
M as createTaprootScriptPathSignOptions,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
+
_ as deriveNativeSegwitAddress,
|
|
79
|
+
m as deriveTaprootAddress,
|
|
80
|
+
T as deriveVaultId,
|
|
81
|
+
Ya as deriveWotsBlockPublicKeys,
|
|
82
|
+
Ja as deriveWotsKeypair,
|
|
83
|
+
ja as deriveWotsPkHash,
|
|
78
84
|
b as ensureHexPrefix,
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
85
|
+
Za as extractErrorData,
|
|
86
|
+
Ba as extractInputsFromTransaction,
|
|
87
|
+
A as extractPayoutSignature,
|
|
82
88
|
u as extractPeginInputSignature,
|
|
83
89
|
P as finalizePeginInputPsbt,
|
|
84
90
|
x as formatSatoshisToBtc,
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
91
|
+
xa as fundPeginTransaction,
|
|
92
|
+
cs as getAddressTxs,
|
|
93
|
+
Ts as getAddressUtxos,
|
|
94
|
+
za as getContractErrorMessage,
|
|
95
|
+
Fa as getDustThreshold,
|
|
96
|
+
ps as getMempoolApiUrl,
|
|
97
|
+
I as getNetwork,
|
|
98
|
+
Ss as getNetworkFees,
|
|
93
99
|
H as getPeginProtocolState,
|
|
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
|
-
|
|
100
|
+
Na as getPsbtInputFields,
|
|
101
|
+
Da as getScriptType,
|
|
102
|
+
Es as getTxHex,
|
|
103
|
+
gs as getTxInfo,
|
|
104
|
+
As as getUtxoInfo,
|
|
105
|
+
qa as handleContractError,
|
|
106
|
+
f as hexToUint8Array,
|
|
107
|
+
C as isAddressFromPublicKey,
|
|
108
|
+
Q as isDepositAmountValid,
|
|
109
|
+
Qa as isKnownContractError,
|
|
110
|
+
$ as isPegoutTerminalStatus,
|
|
111
|
+
aa as isRecognizedPegoutStatus,
|
|
112
|
+
v as isValidHex,
|
|
113
|
+
$a as isWotsMismatchError,
|
|
114
|
+
as as keypairToPublicKey,
|
|
115
|
+
ss as mnemonicToWotsSeed,
|
|
116
|
+
Ia as parseUnfundedWasmTransaction,
|
|
117
|
+
fa as peginOutputCount,
|
|
118
|
+
sa as pollAndSignPayouts,
|
|
119
|
+
U as processPublicKeyToXOnly,
|
|
120
|
+
Rs as pushTx,
|
|
121
|
+
Ca as rateBasedTxBufferFee,
|
|
122
|
+
_s as resolveProtocolAddresses,
|
|
123
|
+
Ma as selectUtxosForDeposit,
|
|
124
|
+
Ha as selectUtxosForPegin,
|
|
125
|
+
La as shouldAddChangeOutput,
|
|
126
|
+
ea as signDepositorGraph,
|
|
121
127
|
y as stripHexPrefix,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
128
|
+
ta as submitWotsPublicKey,
|
|
129
|
+
O as toXOnly,
|
|
130
|
+
h as uint8ArrayToHex,
|
|
131
|
+
oa as validateDepositAmount,
|
|
132
|
+
ra as validateMultiVaultDepositInputs,
|
|
133
|
+
ia as validateProviderSelection,
|
|
134
|
+
la as validateRemainingCapacity,
|
|
135
|
+
na as validateSecretAgainstHashlock,
|
|
136
|
+
Wa as validateUtxosAvailable,
|
|
137
|
+
ua as validateVaultAmounts,
|
|
138
|
+
Pa as validateVaultProviderPubkey,
|
|
133
139
|
V as validateWalletPubkey,
|
|
134
|
-
|
|
140
|
+
da as waitForPeginStatus
|
|
135
141
|
};
|
|
136
142
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PeginManager.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/PeginManager.ts"],"names":[],"mappings":"AAAA;;;;;;;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;;;;;;;;;OASG;IACG,yBAAyB,CAC7B,MAAM,EAAE,wBAAwB,GAC/B,OAAO,CAAC,wBAAwB,CAAC;IAmJpC;;;;;OAKG;YACW,gBAAgB;IAuB9B;;;;;;OAMG;YACW,yBAAyB;IAmCvC;;;;;OAKG;YACW,mBAAmB;IAwBjC;;;;OAIG;IACH,UAAU,IAAI,OAAO;IAIrB;;;;OAIG;IACH,uBAAuB,IAAI,OAAO;CAGnC"}
|
|
@@ -1,68 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @packageDocumentation
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* ↓
|
|
20
|
-
* WASM (Rust Core) ← Cryptographic operations
|
|
21
|
-
* ```
|
|
22
|
-
*
|
|
23
|
-
* ## When to Use Managers
|
|
24
|
-
*
|
|
25
|
-
* Use managers when you have:
|
|
26
|
-
* - **Frontend apps** with browser wallet integration (UniSat, OKX, etc.)
|
|
27
|
-
* - **Quick integration** needs with minimal code
|
|
28
|
-
* - **Standard flows** that don't require custom signing logic
|
|
29
|
-
*
|
|
30
|
-
* Use primitives instead when you need:
|
|
31
|
-
* - Backend services with KMS/HSM signing
|
|
32
|
-
* - Full control over every operation
|
|
33
|
-
* - Custom wallet integrations
|
|
34
|
-
*
|
|
35
|
-
* ## Available Managers
|
|
36
|
-
*
|
|
37
|
-
* ### {@link PeginManager}
|
|
38
|
-
* Orchestrates the peg-in flow:
|
|
39
|
-
* - {@link PeginManager.preparePegin | preparePegin()} - Build Pre-PegIn HTLC and sign PegIn input
|
|
40
|
-
* - {@link PeginManager.registerPeginOnChain | registerPeginOnChain()} - Submit to Ethereum
|
|
41
|
-
* - {@link PeginManager.signAndBroadcast | signAndBroadcast()} - Broadcast to Bitcoin
|
|
42
|
-
*
|
|
43
|
-
* ### {@link PayoutManager}
|
|
44
|
-
* Signs payout authorization transactions (Step 3 of peg-in).
|
|
45
|
-
* - {@link PayoutManager.signPayoutTransaction | signPayoutTransaction()} - Sign payout (uses Assert tx as reference)
|
|
46
|
-
*
|
|
47
|
-
* ## Complete Peg-in Flow
|
|
48
|
-
*
|
|
49
|
-
* The 4-step peg-in flow uses both managers:
|
|
50
|
-
*
|
|
51
|
-
* | Step | Manager | Method |
|
|
52
|
-
* |------|---------|--------|
|
|
53
|
-
* | 1 | PeginManager | `preparePegin()` |
|
|
54
|
-
* | 2 | PeginManager | `registerPeginOnChain()` |
|
|
55
|
-
* | 3 | PayoutManager | `signPayoutTransaction()` |
|
|
56
|
-
* | 4 | PeginManager | `signAndBroadcast()` |
|
|
57
|
-
*
|
|
58
|
-
* **Step 3 Details:** The vault provider provides 3 transactions per claimer:
|
|
59
|
-
* - `claim_tx` - Claim transaction
|
|
60
|
-
* - `assert_tx` - Assert transaction
|
|
61
|
-
* - `payout_tx` - Payout transaction
|
|
62
|
-
*
|
|
63
|
-
* You must sign the Payout transaction (uses assert_tx as input reference) for each claimer.
|
|
64
|
-
*
|
|
65
|
-
* @see {@link https://github.com/babylonlabs-io/babylon-toolkit/blob/main/packages/babylon-ts-sdk/docs/quickstart/managers.md | Managers Quickstart}
|
|
4
|
+
* Wallet-owning orchestration for the vault lifecycle. A vault goes from creation
|
|
5
|
+
* to `ACTIVE` through five phases — {@link https://github.com/babylonlabs-io/babylon-toolkit/blob/main/packages/babylon-ts-sdk/docs/quickstart/managers.md | Managers Quickstart}
|
|
6
|
+
* walks through them. A vault at `VERIFIED` is not done: the depositor must
|
|
7
|
+
* reveal the HTLC secret via `activateVault()` (services layer) or the vault
|
|
8
|
+
* expires.
|
|
9
|
+
*
|
|
10
|
+
* | # | Phase | SDK entry point | Contract status after |
|
|
11
|
+
* |---|-------|-----------------|-----------------------|
|
|
12
|
+
* | 1 | Prepare Pre-PegIn + PegIn txs | `PeginManager.preparePegin()` | n/a (off-chain) |
|
|
13
|
+
* | 2 | Register on Ethereum | `PeginManager.registerPeginOnChain()` | `PENDING` |
|
|
14
|
+
* | 3 | Broadcast Pre-PegIn on Bitcoin | `PeginManager.signAndBroadcast()` | still `PENDING` until VP observes the tx |
|
|
15
|
+
* | 4 | Sign payout authorisations | `pollAndSignPayouts()` (services, delegates to `PayoutManager`) | `PENDING` → `VERIFIED` |
|
|
16
|
+
* | 5 | Activate by revealing HTLC secret | `activateVault()` (services) | `VERIFIED` → `ACTIVE` |
|
|
17
|
+
*
|
|
18
|
+
* Optional exit after the CSV timelock expires: `buildAndBroadcastRefund()` (services).
|
|
66
19
|
*
|
|
67
20
|
* @module managers
|
|
68
21
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/managers/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,wBAAwB,EACxB,oBAAoB,EACpB,wBAAwB,GACzB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,YAAY,EACV,mBAAmB,EACnB,qBAAqB,EACrB,gBAAgB,GACjB,MAAM,iBAAiB,CAAC;AAGzB,YAAY,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACtD,YAAY,EACV,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,eAAe,GAChB,MAAM,kDAAkD,CAAC"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Stateless composable functions for the vault deposit protocol.
|
|
5
|
-
* All functions accept narrow interfaces, not concrete client classes.
|
|
2
|
+
* Stateless flow helpers that compose primitives + utils with injected I/O callbacks.
|
|
3
|
+
* Callers own the wallet; services own the orchestration.
|
|
6
4
|
*
|
|
7
5
|
* @module services
|
|
8
6
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/services/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../../signing-cl-lowxV.cjs"),t=require("../../../fundPeginTransaction-DxNOeyNI.cjs"),e=require("../../../psbtInputFields-05ZrwRzf.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../../../signing-cl-lowxV.cjs"),E=require("../../../validation-u8W7Lp2x.cjs"),t=require("../../../fundPeginTransaction-DxNOeyNI.cjs"),e=require("../../../psbtInputFields-05ZrwRzf.cjs"),_=require("../../../bitcoin-CNnPFU6Y.cjs");exports.createTaprootScriptPathSignOptions=T.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=E.BITCOIN_ADDRESS_RE;exports.HEX_RE=E.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=E.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=E.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=E.TXID_RE;exports.BTC_DUST_SAT=t.BTC_DUST_SAT;exports.DUST_THRESHOLD=t.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=t.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=t.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=t.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=t.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=t.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=t.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=t.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=t.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=t.fundPeginTransaction;exports.parseUnfundedWasmTransaction=t.parseUnfundedWasmTransaction;exports.peginOutputCount=t.peginOutputCount;exports.rateBasedTxBufferFee=t.rateBasedTxBufferFee;exports.BitcoinScriptType=e.BitcoinScriptType;exports.UtxoNotAvailableError=e.UtxoNotAvailableError;exports.assertUtxosAvailable=e.assertUtxosAvailable;exports.calculateBtcTxHash=e.calculateBtcTxHash;exports.collectReservedUtxoRefs=e.collectReservedUtxoRefs;exports.extractInputsFromTransaction=e.extractInputsFromTransaction;exports.getDustThreshold=e.getDustThreshold;exports.getPsbtInputFields=e.getPsbtInputFields;exports.getScriptType=e.getScriptType;exports.selectUtxosForDeposit=e.selectUtxosForDeposit;exports.selectUtxosForPegin=e.selectUtxosForPegin;exports.shouldAddChangeOutput=e.shouldAddChangeOutput;exports.validateUtxosAvailable=e.validateUtxosAvailable;exports.getNetwork=_.getNetwork;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* Transaction building utilities including:
|
|
5
|
-
* - Fee calculation constants
|
|
6
|
-
* - UTXO selection
|
|
7
|
-
* - Transaction funding
|
|
8
|
-
* - Bitcoin script utilities
|
|
2
|
+
* Pure helpers for the primitives and services layers. No wallet, no network, no contract state.
|
|
9
3
|
*
|
|
10
4
|
* @module utils
|
|
11
5
|
*/
|
|
@@ -14,4 +8,5 @@ export * from './utxo';
|
|
|
14
8
|
export * from './transaction';
|
|
15
9
|
export * from './btc';
|
|
16
10
|
export * from './signing';
|
|
11
|
+
export * from './validation';
|
|
17
12
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,OAAO,CAAC;AACtB,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC"}
|
|
@@ -1,36 +1,42 @@
|
|
|
1
1
|
import { c as t } from "../../../signing-DeWVBl7m.js";
|
|
2
|
-
import { B as
|
|
3
|
-
import { B as R,
|
|
4
|
-
import { g as b } from "../../../
|
|
2
|
+
import { B as E, H as T, K as _, M as o, T as r } from "../../../validation-CxqROCno.js";
|
|
3
|
+
import { B as A, D as R, F as i, L as p, M as n, P as I, a as U, S as c, T as F, W as l, f as x, b as O, p as P, r as u } from "../../../fundPeginTransaction-BLYXxLBv.js";
|
|
4
|
+
import { B as f, U as B, a as D, f as L, c as N, e as g, g as C, i as H, h as X, s as h, b as m, d as M, v as b } from "../../../psbtInputFields-r1ss6WLU.js";
|
|
5
|
+
import { g as W } from "../../../bitcoin-nOOgeRyl.js";
|
|
5
6
|
export {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
E as BITCOIN_ADDRESS_RE,
|
|
8
|
+
A as BTC_DUST_SAT,
|
|
9
|
+
f as BitcoinScriptType,
|
|
10
|
+
R as DUST_THRESHOLD,
|
|
11
|
+
i as FEE_SAFETY_MARGIN,
|
|
12
|
+
T as HEX_RE,
|
|
13
|
+
_ as KNOWN_SCRIPT_PREFIXES,
|
|
14
|
+
p as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
|
|
15
|
+
n as MAX_NON_LEGACY_OUTPUT_SIZE,
|
|
16
|
+
o as MAX_REASONABLE_FEE_SATS,
|
|
17
|
+
I as P2TR_INPUT_SIZE,
|
|
18
|
+
U as PEGIN_FIXED_OUTPUTS,
|
|
19
|
+
c as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
|
|
20
|
+
r as TXID_RE,
|
|
21
|
+
F as TX_BUFFER_SIZE_OVERHEAD,
|
|
22
|
+
B as UtxoNotAvailableError,
|
|
23
|
+
l as WALLET_RELAY_FEE_RATE_THRESHOLD,
|
|
24
|
+
D as assertUtxosAvailable,
|
|
25
|
+
L as calculateBtcTxHash,
|
|
26
|
+
N as collectReservedUtxoRefs,
|
|
21
27
|
t as createTaprootScriptPathSignOptions,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
g as extractInputsFromTransaction,
|
|
29
|
+
x as fundPeginTransaction,
|
|
30
|
+
C as getDustThreshold,
|
|
31
|
+
W as getNetwork,
|
|
32
|
+
H as getPsbtInputFields,
|
|
33
|
+
X as getScriptType,
|
|
34
|
+
O as parseUnfundedWasmTransaction,
|
|
35
|
+
P as peginOutputCount,
|
|
36
|
+
u as rateBasedTxBufferFee,
|
|
37
|
+
h as selectUtxosForDeposit,
|
|
38
|
+
m as selectUtxosForPegin,
|
|
39
|
+
M as shouldAddChangeOutput,
|
|
40
|
+
b as validateUtxosAvailable
|
|
35
41
|
};
|
|
36
42
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared validation constants for Bitcoin-related input sanitization.
|
|
3
|
+
*
|
|
4
|
+
* These are used across mempool API clients, broadcast services, and
|
|
5
|
+
* transaction construction to enforce consistent format checks.
|
|
6
|
+
*/
|
|
7
|
+
/** Non-empty string of hexadecimal characters (case-insensitive). */
|
|
8
|
+
export declare const HEX_RE: RegExp;
|
|
9
|
+
/** Bitcoin txid: exactly 64 hex characters (32 bytes). */
|
|
10
|
+
export declare const TXID_RE: RegExp;
|
|
11
|
+
/**
|
|
12
|
+
* Bitcoin address format gate: 25–90 alphanumeric characters.
|
|
13
|
+
* Covers legacy (P2PKH/P2SH), bech32 (P2WPKH/P2WSH), bech32m (P2TR),
|
|
14
|
+
* and regtest addresses (bcrt1... which are 62–64 chars for 32-byte witness programs).
|
|
15
|
+
* Upper bound of 90 provides headroom for future address formats.
|
|
16
|
+
* This is a format gate to prevent path-traversal — not full address validation.
|
|
17
|
+
*/
|
|
18
|
+
export declare const BITCOIN_ADDRESS_RE: RegExp;
|
|
19
|
+
/**
|
|
20
|
+
* Known Bitcoin scriptPubKey prefixes:
|
|
21
|
+
* - P2PKH: 76a914...88ac (25 bytes)
|
|
22
|
+
* - P2SH: a914...87 (23 bytes)
|
|
23
|
+
* - P2WPKH: 0014... (22 bytes)
|
|
24
|
+
* - P2WSH: 0020... (34 bytes)
|
|
25
|
+
* - P2TR: 5120... (34 bytes)
|
|
26
|
+
*/
|
|
27
|
+
export declare const KNOWN_SCRIPT_PREFIXES: readonly ["76a914", "a914", "0014", "0020", "5120"];
|
|
28
|
+
/**
|
|
29
|
+
* Upper bound on the implied miner fee (0.01 BTC = 1,000,000 sats).
|
|
30
|
+
* Catches inflated input values from a compromised mempool API — if inputs are
|
|
31
|
+
* grossly overstated the implied fee becomes unreasonably large. The April 2024
|
|
32
|
+
* Runes spike saw ~450 sat/vB; at 500 vB that's ~225k sats, well under this cap.
|
|
33
|
+
*/
|
|
34
|
+
export declare const MAX_REASONABLE_FEE_SATS = 1000000n;
|
|
35
|
+
//# sourceMappingURL=validation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../../src/tbv/core/utils/validation.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,qEAAqE;AACrE,eAAO,MAAM,MAAM,QAAmB,CAAC;AAEvC,0DAA0D;AAC1D,eAAO,MAAM,OAAO,QAAsB,CAAC;AAE3C;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,QAAyB,CAAC;AAEzD;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,qDAMxB,CAAC;AAEX;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,WAAa,CAAC"}
|
package/dist/tbv/index.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-nYlgeAI8.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("../challengeAssert-nYlgeAI8.cjs"),c=require("@babylonlabs-io/babylon-tbv-rust-wasm"),P=require("../payout-RFIh7GLN.cjs"),a=require("../bitcoin-CNnPFU6Y.cjs"),l=require("../signing-cl-lowxV.cjs"),u=require("../validation-u8W7Lp2x.cjs"),e=require("../buildAndBroadcastRefund-DWEQvj9T.cjs"),r=require("../fundPeginTransaction-DxNOeyNI.cjs"),i=require("../psbtInputFields-05ZrwRzf.cjs"),o=require("../errors-Cbyg_QQf.cjs"),t=require("../index-DNSV--0P.cjs"),s=require("../types-B-p4dhEH.cjs");exports.buildChallengeAssertPsbt=n.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=n.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=n.buildNoPayoutPsbt;exports.buildPeginInputPsbt=n.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=n.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=n.buildPrePeginPsbt;exports.computeNumLocalChallengers=n.computeNumLocalChallengers;exports.extractPeginInputSignature=n.extractPeginInputSignature;exports.finalizePeginInputPsbt=n.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>c.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>c.deriveVaultId});exports.buildPayoutPsbt=P.buildPayoutPsbt;exports.buildRefundPsbt=P.buildRefundPsbt;exports.createPayoutScript=P.createPayoutScript;exports.extractPayoutSignature=P.extractPayoutSignature;exports.deriveNativeSegwitAddress=a.deriveNativeSegwitAddress;exports.deriveTaprootAddress=a.deriveTaprootAddress;exports.ensureHexPrefix=a.ensureHexPrefix;exports.formatSatoshisToBtc=a.formatSatoshisToBtc;exports.getNetwork=a.getNetwork;exports.hexToUint8Array=a.hexToUint8Array;exports.isAddressFromPublicKey=a.isAddressFromPublicKey;exports.isValidHex=a.isValidHex;exports.processPublicKeyToXOnly=a.processPublicKeyToXOnly;exports.stripHexPrefix=a.stripHexPrefix;exports.toXOnly=a.toXOnly;exports.uint8ArrayToHex=a.uint8ArrayToHex;exports.validateWalletPubkey=a.validateWalletPubkey;exports.ContractStatus=l.ContractStatus;exports.PeginAction=l.PeginAction;exports.canPerformAction=l.canPerformAction;exports.createTaprootScriptPathSignOptions=l.createTaprootScriptPathSignOptions;exports.getPeginProtocolState=l.getPeginProtocolState;exports.BITCOIN_ADDRESS_RE=u.BITCOIN_ADDRESS_RE;exports.HEX_RE=u.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=u.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=u.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=u.TXID_RE;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PayoutManager=e.PayoutManager;exports.activateVault=e.activateVault;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.computeHashlock=e.computeHashlock;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.pollAndSignPayouts=e.pollAndSignPayouts;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateSecretAgainstHashlock=e.validateSecretAgainstHashlock;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.waitForPeginStatus=e.waitForPeginStatus;exports.BTC_DUST_SAT=r.BTC_DUST_SAT;exports.DUST_THRESHOLD=r.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=r.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=r.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=r.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=r.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=r.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=r.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=r.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=r.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=r.fundPeginTransaction;exports.parseUnfundedWasmTransaction=r.parseUnfundedWasmTransaction;exports.peginOutputCount=r.peginOutputCount;exports.rateBasedTxBufferFee=r.rateBasedTxBufferFee;exports.BitcoinScriptType=i.BitcoinScriptType;exports.UtxoNotAvailableError=i.UtxoNotAvailableError;exports.assertUtxosAvailable=i.assertUtxosAvailable;exports.calculateBtcTxHash=i.calculateBtcTxHash;exports.collectReservedUtxoRefs=i.collectReservedUtxoRefs;exports.extractInputsFromTransaction=i.extractInputsFromTransaction;exports.getDustThreshold=i.getDustThreshold;exports.getPsbtInputFields=i.getPsbtInputFields;exports.getScriptType=i.getScriptType;exports.selectUtxosForDeposit=i.selectUtxosForDeposit;exports.selectUtxosForPegin=i.selectUtxosForPegin;exports.shouldAddChangeOutput=i.shouldAddChangeOutput;exports.validateUtxosAvailable=i.validateUtxosAvailable;exports.CONTRACT_ERRORS=o.CONTRACT_ERRORS;exports.PeginManager=o.PeginManager;exports.computeWotsBlockPublicKeysHash=o.computeWotsBlockPublicKeysHash;exports.computeWotsPkHash=o.computeWotsPkHash;exports.deriveWotsBlockPublicKeys=o.deriveWotsBlockPublicKeys;exports.deriveWotsKeypair=o.deriveWotsKeypair;exports.deriveWotsPkHash=o.deriveWotsPkHash;exports.extractErrorData=o.extractErrorData;exports.getContractErrorMessage=o.getContractErrorMessage;exports.handleContractError=o.handleContractError;exports.isKnownContractError=o.isKnownContractError;exports.isWotsMismatchError=o.isWotsMismatchError;exports.keypairToPublicKey=o.keypairToPublicKey;exports.mnemonicToWotsSeed=o.mnemonicToWotsSeed;exports.ApplicationRegistryABI=t.ApplicationRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.ProtocolParamsABI=t.ProtocolParamsABI;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;exports.ViemProtocolParamsReader=t.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=t.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=t.ViemVaultKeeperReader;exports.ViemVaultRegistryReader=t.ViemVaultRegistryReader;exports.VpResponseValidationError=t.VpResponseValidationError;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.pushTx=t.pushTx;exports.resolveProtocolAddresses=t.resolveProtocolAddresses;exports.BTCVaultRegistryABI=s.BTCVaultRegistryABI;exports.DaemonStatus=s.DaemonStatus;exports.JSON_RPC_ERROR_CODES=s.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=s.JsonRpcClient;exports.JsonRpcError=s.JsonRpcError;exports.POST_WOTS_STATUSES=s.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=s.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=s.RpcErrorCode;exports.VP_TERMINAL_STATUSES=s.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=s.VP_TRANSIENT_STATUSES;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|