@babylonlabs-io/ts-sdk 0.16.1 → 0.17.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.
Files changed (145) hide show
  1. package/README.md +17 -3
  2. package/dist/challengeAssert-D_k_ADgP.cjs +2 -0
  3. package/dist/challengeAssert-D_k_ADgP.cjs.map +1 -0
  4. package/dist/challengeAssert-k5_LWUtO.js +362 -0
  5. package/dist/challengeAssert-k5_LWUtO.js.map +1 -0
  6. package/dist/constants-EiyZkXce.cjs +2 -0
  7. package/dist/constants-EiyZkXce.cjs.map +1 -0
  8. package/dist/constants-Q7v2O7Ps.js +155 -0
  9. package/dist/constants-Q7v2O7Ps.js.map +1 -0
  10. package/dist/errors-DKLboMnq.cjs +2 -0
  11. package/dist/errors-DKLboMnq.cjs.map +1 -0
  12. package/dist/errors-KY63mgWT.js +1510 -0
  13. package/dist/errors-KY63mgWT.js.map +1 -0
  14. package/dist/fundPeginTransaction-DpwnDslW.js +50 -0
  15. package/dist/fundPeginTransaction-DpwnDslW.js.map +1 -0
  16. package/dist/fundPeginTransaction-EbrZzlrh.cjs +2 -0
  17. package/dist/fundPeginTransaction-EbrZzlrh.cjs.map +1 -0
  18. package/dist/index-D3z3SZAj.cjs +2 -0
  19. package/dist/index-D3z3SZAj.cjs.map +1 -0
  20. package/dist/index-Dw7FAwne.js +913 -0
  21. package/dist/index-Dw7FAwne.js.map +1 -0
  22. package/dist/index.cjs +1 -1
  23. package/dist/index.js +98 -74
  24. package/dist/index.js.map +1 -1
  25. package/dist/payout-Ce9vSs9e.js +164 -0
  26. package/dist/payout-Ce9vSs9e.js.map +1 -0
  27. package/dist/payout-CfsDnjKI.cjs +2 -0
  28. package/dist/payout-CfsDnjKI.cjs.map +1 -0
  29. package/dist/psbtInputFields-C0nKn_GD.cjs +2 -0
  30. package/dist/psbtInputFields-C0nKn_GD.cjs.map +1 -0
  31. package/dist/psbtInputFields-DO0ELwiv.js +116 -0
  32. package/dist/psbtInputFields-DO0ELwiv.js.map +1 -0
  33. package/dist/signAndSubmitPayouts-CAOEAQp9.js +490 -0
  34. package/dist/signAndSubmitPayouts-CAOEAQp9.js.map +1 -0
  35. package/dist/signAndSubmitPayouts-CSJmcPQN.cjs +2 -0
  36. package/dist/signAndSubmitPayouts-CSJmcPQN.cjs.map +1 -0
  37. package/dist/signing-Deg5lCoC.cjs +2 -0
  38. package/dist/signing-Deg5lCoC.cjs.map +1 -0
  39. package/dist/signing-Drwr3bXB.js +16 -0
  40. package/dist/signing-Drwr3bXB.js.map +1 -0
  41. package/dist/tbv/core/clients/eth/__tests__/vault-registry-reader.test.d.ts +2 -0
  42. package/dist/tbv/core/clients/eth/__tests__/vault-registry-reader.test.d.ts.map +1 -0
  43. package/dist/tbv/core/clients/eth/index.d.ts +3 -0
  44. package/dist/tbv/core/clients/eth/index.d.ts.map +1 -0
  45. package/dist/tbv/core/clients/eth/types.d.ts +37 -0
  46. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -0
  47. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +20 -0
  48. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -0
  49. package/dist/tbv/core/clients/index.cjs +2 -0
  50. package/dist/tbv/core/clients/index.cjs.map +1 -0
  51. package/dist/tbv/core/clients/index.d.ts +2 -0
  52. package/dist/tbv/core/clients/index.d.ts.map +1 -1
  53. package/dist/tbv/core/clients/index.js +26 -0
  54. package/dist/tbv/core/clients/index.js.map +1 -0
  55. package/dist/tbv/core/clients/vault-provider/__tests__/json-rpc-client.test.d.ts +2 -0
  56. package/dist/tbv/core/clients/vault-provider/__tests__/json-rpc-client.test.d.ts.map +1 -0
  57. package/dist/tbv/core/clients/vault-provider/__tests__/validators.test.d.ts +2 -0
  58. package/dist/tbv/core/clients/vault-provider/__tests__/validators.test.d.ts.map +1 -0
  59. package/dist/tbv/core/clients/vault-provider/api.d.ts +53 -0
  60. package/dist/tbv/core/clients/vault-provider/api.d.ts.map +1 -0
  61. package/dist/tbv/core/clients/vault-provider/index.d.ts +7 -0
  62. package/dist/tbv/core/clients/vault-provider/index.d.ts.map +1 -0
  63. package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts +90 -0
  64. package/dist/tbv/core/clients/vault-provider/json-rpc-client.d.ts.map +1 -0
  65. package/dist/tbv/core/clients/vault-provider/types.d.ts +256 -0
  66. package/dist/tbv/core/clients/vault-provider/types.d.ts.map +1 -0
  67. package/dist/tbv/core/clients/vault-provider/validators.d.ts +30 -0
  68. package/dist/tbv/core/clients/vault-provider/validators.d.ts.map +1 -0
  69. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +29 -74
  70. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  71. package/dist/tbv/core/index.cjs +1 -1
  72. package/dist/tbv/core/index.d.ts +1 -0
  73. package/dist/tbv/core/index.d.ts.map +1 -1
  74. package/dist/tbv/core/index.js +97 -73
  75. package/dist/tbv/core/index.js.map +1 -1
  76. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  77. package/dist/tbv/core/primitives/index.cjs +1 -1
  78. package/dist/tbv/core/primitives/index.d.ts +8 -0
  79. package/dist/tbv/core/primitives/index.d.ts.map +1 -1
  80. package/dist/tbv/core/primitives/index.js +26 -24
  81. package/dist/tbv/core/primitives/index.js.map +1 -1
  82. package/dist/tbv/core/primitives/utils/bitcoin.d.ts +0 -11
  83. package/dist/tbv/core/primitives/utils/bitcoin.d.ts.map +1 -1
  84. package/dist/tbv/core/services/deposit/__tests__/submitWotsPublicKey.test.d.ts +2 -0
  85. package/dist/tbv/core/services/deposit/__tests__/submitWotsPublicKey.test.d.ts.map +1 -0
  86. package/dist/tbv/core/services/deposit/__tests__/waitForPeginStatus.test.d.ts +2 -0
  87. package/dist/tbv/core/services/deposit/__tests__/waitForPeginStatus.test.d.ts.map +1 -0
  88. package/dist/tbv/core/services/deposit/index.d.ts +10 -0
  89. package/dist/tbv/core/services/deposit/index.d.ts.map +1 -0
  90. package/dist/tbv/core/services/deposit/interfaces.d.ts +21 -0
  91. package/dist/tbv/core/services/deposit/interfaces.d.ts.map +1 -0
  92. package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts +55 -0
  93. package/dist/tbv/core/services/deposit/signAndSubmitPayouts.d.ts.map +1 -0
  94. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts +21 -0
  95. package/dist/tbv/core/services/deposit/signDepositorGraph.d.ts.map +1 -0
  96. package/dist/tbv/core/services/deposit/submitWotsPublicKey.d.ts +25 -0
  97. package/dist/tbv/core/services/deposit/submitWotsPublicKey.d.ts.map +1 -0
  98. package/dist/tbv/core/services/deposit/waitForPeginStatus.d.ts +24 -0
  99. package/dist/tbv/core/services/deposit/waitForPeginStatus.d.ts.map +1 -0
  100. package/dist/tbv/core/services/index.cjs +2 -0
  101. package/dist/tbv/core/services/index.cjs.map +1 -0
  102. package/dist/tbv/core/services/index.d.ts +10 -0
  103. package/dist/tbv/core/services/index.d.ts.map +1 -0
  104. package/dist/tbv/core/services/index.js +8 -0
  105. package/dist/tbv/core/services/index.js.map +1 -0
  106. package/dist/tbv/core/utils/index.cjs +2 -0
  107. package/dist/tbv/core/utils/index.cjs.map +1 -0
  108. package/dist/tbv/core/utils/index.js +30 -0
  109. package/dist/tbv/core/utils/index.js.map +1 -0
  110. package/dist/tbv/core/utils/transaction/fundPeginTransaction.d.ts.map +1 -1
  111. package/dist/tbv/index.cjs +1 -1
  112. package/dist/tbv/index.js +97 -73
  113. package/dist/tbv/index.js.map +1 -1
  114. package/dist/tbv/integrations/aave/clients/abis/AaveSpoke.abi.json.d.ts +28 -18
  115. package/dist/tbv/integrations/aave/clients/spoke.d.ts +2 -2
  116. package/dist/tbv/integrations/aave/clients/spoke.d.ts.map +1 -1
  117. package/dist/tbv/integrations/aave/constants.d.ts +7 -0
  118. package/dist/tbv/integrations/aave/constants.d.ts.map +1 -1
  119. package/dist/tbv/integrations/aave/index.cjs +1 -1
  120. package/dist/tbv/integrations/aave/index.cjs.map +1 -1
  121. package/dist/tbv/integrations/aave/index.d.ts +2 -2
  122. package/dist/tbv/integrations/aave/index.d.ts.map +1 -1
  123. package/dist/tbv/integrations/aave/index.js +124 -120
  124. package/dist/tbv/integrations/aave/index.js.map +1 -1
  125. package/dist/tbv/integrations/aave/types.d.ts +4 -6
  126. package/dist/tbv/integrations/aave/types.d.ts.map +1 -1
  127. package/dist/tbv/integrations/aave/utils/aaveConversions.d.ts +10 -1
  128. package/dist/tbv/integrations/aave/utils/aaveConversions.d.ts.map +1 -1
  129. package/dist/tbv/integrations/aave/utils/debtUtils.d.ts +0 -1
  130. package/dist/tbv/integrations/aave/utils/debtUtils.d.ts.map +1 -1
  131. package/dist/tbv/integrations/aave/utils/index.d.ts +1 -1
  132. package/dist/tbv/integrations/aave/utils/index.d.ts.map +1 -1
  133. package/dist/types-D1rYwwCu.js +235 -0
  134. package/dist/types-D1rYwwCu.js.map +1 -0
  135. package/dist/types-DEWiqXYp.cjs +2 -0
  136. package/dist/types-DEWiqXYp.cjs.map +1 -0
  137. package/package.json +13 -3
  138. package/dist/challengeAssert-C5DQSUnp.js +0 -708
  139. package/dist/challengeAssert-C5DQSUnp.js.map +0 -1
  140. package/dist/challengeAssert-D7SqsNpQ.cjs +0 -2
  141. package/dist/challengeAssert-D7SqsNpQ.cjs.map +0 -1
  142. package/dist/errors-Bk7eb5h3.cjs +0 -2
  143. package/dist/errors-Bk7eb5h3.cjs.map +0 -1
  144. package/dist/errors-Ld-2tiK3.js +0 -2268
  145. package/dist/errors-Ld-2tiK3.js.map +0 -1
@@ -0,0 +1,256 @@
1
+ /**
2
+ * Type definitions for Vault Provider JSON-RPC API.
3
+ *
4
+ * These types match the `vaultProvider_*` RPC namespace defined by the
5
+ * btc-vault daemon. They are the SDK's canonical copy of the VP protocol
6
+ * contract, independent of any frontend framework.
7
+ *
8
+ * @see https://github.com/babylonlabs-io/btc-vault/blob/main/docs/pegin.md
9
+ */
10
+ /**
11
+ * Backend daemon status (vault provider database).
12
+ * Source: btc-vault crates/vaultd/src/workers/claimer/mod.rs PegInStatus enum
13
+ *
14
+ * State flow (happy path):
15
+ * PendingIngestion -> PendingDepositorWotsPK -> PendingBabeSetup -> PendingChallengerPresigning
16
+ * -> PendingPeginSigsAvailability -> PendingPrePegInConfirmations
17
+ * -> PendingDepositorSignatures -> PendingACKs -> PendingActivation -> Activated
18
+ *
19
+ * Terminal / branching states:
20
+ * - Expired: vault timed out before activation
21
+ * - ClaimPosted: claim transaction posted on-chain
22
+ * - PeggedOut: BTC has been returned to the depositor
23
+ */
24
+ export declare enum DaemonStatus {
25
+ PENDING_INGESTION = "PendingIngestion",
26
+ PENDING_DEPOSITOR_WOTS_PK = "PendingDepositorWotsPK",
27
+ PENDING_BABE_SETUP = "PendingBabeSetup",
28
+ PENDING_CHALLENGER_PRESIGNING = "PendingChallengerPresigning",
29
+ PENDING_PEGIN_SIGS_AVAILABILITY = "PendingPeginSigsAvailability",
30
+ PENDING_PRE_PEGIN_CONFIRMATIONS = "PendingPrePegInConfirmations",
31
+ PENDING_DEPOSITOR_SIGNATURES = "PendingDepositorSignatures",
32
+ PENDING_ACKS = "PendingACKs",
33
+ PENDING_ACTIVATION = "PendingActivation",
34
+ ACTIVATED = "Activated",
35
+ EXPIRED = "Expired",
36
+ CLAIM_POSTED = "ClaimPosted",
37
+ PEGGED_OUT = "PeggedOut"
38
+ }
39
+ /**
40
+ * States where the VP is still processing (no depositor action needed).
41
+ * Excludes PENDING_DEPOSITOR_WOTS_PK (requires depositor action).
42
+ */
43
+ export declare const PRE_DEPOSITOR_SIGNATURES_STATES: readonly DaemonStatus[];
44
+ /**
45
+ * Statuses where no depositor action is needed (VP processing or already past
46
+ * depositor interaction). Excludes PENDING_INGESTION and PENDING_DEPOSITOR_WOTS_PK.
47
+ */
48
+ export declare const VP_TRANSIENT_STATUSES: ReadonlySet<DaemonStatus>;
49
+ /**
50
+ * Terminal VP statuses where no further progress is possible.
51
+ * If the VP reaches one of these states while polling, polling should
52
+ * stop immediately with an error rather than waiting for timeout.
53
+ */
54
+ export declare const VP_TERMINAL_STATUSES: ReadonlySet<DaemonStatus>;
55
+ /**
56
+ * Statuses that come after WOTS key submission.
57
+ * If the VP is already in one of these states, the WOTS key was already
58
+ * submitted and we can skip.
59
+ */
60
+ export declare const POST_WOTS_STATUSES: ReadonlySet<DaemonStatus>;
61
+ /**
62
+ * WOTS configuration for a single block.
63
+ * Matches Rust `babe::wots::Config` serde format.
64
+ */
65
+ export interface WotsConfig {
66
+ /** Digit bit-width (e.g. 4 → base-16 digits). */
67
+ d: number;
68
+ /** Number of message digits in this block. */
69
+ n: number;
70
+ /** Radix used for the checksum computation. */
71
+ checksum_radix: number;
72
+ }
73
+ /**
74
+ * A single block of WOTS public keys.
75
+ * Chain values are arrays of byte values (matching Rust `[u8; 20]`).
76
+ */
77
+ export interface WotsBlockPublicKey {
78
+ config: WotsConfig;
79
+ message_terminals: number[][];
80
+ checksum_major_terminal: number[];
81
+ checksum_minor_terminal: number[];
82
+ }
83
+ /** Params for requesting the payout/claim/assert transactions to pre-sign. */
84
+ export interface RequestDepositorPresignTransactionsParams {
85
+ pegin_txid: string;
86
+ depositor_pk: string;
87
+ }
88
+ /** Params for submitting the depositor's WOTS public key to the VP. */
89
+ export interface SubmitDepositorWotsKeyParams {
90
+ pegin_txid: string;
91
+ depositor_pk: string;
92
+ wots_public_keys: WotsBlockPublicKey[];
93
+ }
94
+ /** Per-challenger signatures for the depositor-as-claimer flow. */
95
+ export interface DepositorPreSigsPerChallenger {
96
+ nopayout_signature: string;
97
+ }
98
+ /** Depositor-as-claimer pre-signatures (payout + per-challenger). */
99
+ export interface DepositorAsClaimerPresignatures {
100
+ payout_signatures: ClaimerSignatures;
101
+ per_challenger: Record<string, DepositorPreSigsPerChallenger>;
102
+ }
103
+ /** Params for submitting depositor pre-signatures including claimer presignatures. */
104
+ export interface SubmitDepositorPresignaturesParams {
105
+ pegin_txid: string;
106
+ depositor_pk: string;
107
+ signatures: Record<string, ClaimerSignatures>;
108
+ depositor_claimer_presignatures: DepositorAsClaimerPresignatures;
109
+ }
110
+ /** Payout signatures per claimer. */
111
+ export interface ClaimerSignatures {
112
+ payout_signature: string;
113
+ }
114
+ /** Params for requesting BaBe DecryptorArtifacts from the VP. */
115
+ export interface RequestDepositorClaimerArtifactsParams {
116
+ pegin_txid: string;
117
+ depositor_pk: string;
118
+ }
119
+ /** Params for querying pegin status. Either pegin_txid or vault_id must be provided. */
120
+ export type GetPeginStatusParams = {
121
+ pegin_txid: string;
122
+ vault_id?: never;
123
+ } | {
124
+ vault_id: string;
125
+ pegin_txid?: never;
126
+ };
127
+ /** A raw Bitcoin transaction with its hex encoding. */
128
+ export interface TransactionData {
129
+ tx_hex: string;
130
+ }
131
+ /** Set of transactions the depositor must pre-sign for a single claimer. */
132
+ export interface ClaimerTransactions {
133
+ claimer_pubkey: string;
134
+ claim_tx: TransactionData;
135
+ assert_tx: TransactionData;
136
+ payout_tx: TransactionData;
137
+ payout_psbt: string;
138
+ }
139
+ /** Per-segment connector data for ChallengeAssert inputs. */
140
+ export interface ChallengeAssertConnectorData {
141
+ wots_pks_json: string;
142
+ gc_wots_keys_json: string;
143
+ }
144
+ /** Challenger-specific transactions and signing data for the depositor graph. */
145
+ export interface PresignDataPerChallenger {
146
+ challenger_pubkey: string;
147
+ challenge_assert_x_tx: TransactionData;
148
+ challenge_assert_y_tx: TransactionData;
149
+ nopayout_tx: TransactionData;
150
+ nopayout_psbt: string;
151
+ challenge_assert_connectors: ChallengeAssertConnectorData[];
152
+ output_label_hashes: string[];
153
+ }
154
+ /** Depositor-as-claimer TxGraph transactions. */
155
+ export interface DepositorGraphTransactions {
156
+ claim_tx: TransactionData;
157
+ assert_tx: TransactionData;
158
+ payout_tx: TransactionData;
159
+ payout_psbt: string;
160
+ challenger_presign_data: PresignDataPerChallenger[];
161
+ offchain_params_version: number;
162
+ }
163
+ /** Response from `requestDepositorPresignTransactions`. */
164
+ export interface RequestDepositorPresignTransactionsResponse {
165
+ txs: ClaimerTransactions[];
166
+ depositor_graph: DepositorGraphTransactions;
167
+ }
168
+ /** BaBe garbled-circuit session data for a single challenger. */
169
+ export interface BaBeSessionData {
170
+ decryptor_artifacts_hex: string;
171
+ }
172
+ /** Response from `requestDepositorClaimerArtifacts`. */
173
+ export interface RequestDepositorClaimerArtifactsResponse {
174
+ tx_graph_json: string;
175
+ verifying_key_hex: string;
176
+ babe_sessions: Record<string, BaBeSessionData>;
177
+ }
178
+ /** Progress tracker for a multi-challenger operation. */
179
+ export interface ChallengerProgress {
180
+ total_challengers: number;
181
+ completed_challengers: number;
182
+ completed_challenger_pubkeys: string[];
183
+ pending_challenger_pubkeys: string[];
184
+ }
185
+ export type GcDataProgress = ChallengerProgress;
186
+ export type AckCollectionProgress = ChallengerProgress;
187
+ /** Extended presigning progress with all 3 concurrent phases. */
188
+ export interface PresigningProgress extends ChallengerProgress {
189
+ depositor_graph_created?: boolean;
190
+ vk_challenger_presigning_completed?: number;
191
+ vk_challenger_presigning_total?: number;
192
+ }
193
+ /** Detailed progress breakdown for an in-progress pegin. */
194
+ export interface PeginProgressDetails {
195
+ gc_data?: GcDataProgress;
196
+ presigning?: PresigningProgress;
197
+ ack_collection?: AckCollectionProgress;
198
+ claimer_graphs?: ClaimerGraphStatus[];
199
+ }
200
+ /** Per-claimer graph status (challenger perspective). */
201
+ export interface ClaimerGraphStatus {
202
+ claimer_pubkey: string;
203
+ presigned: boolean;
204
+ }
205
+ /** Response from `getPeginStatus`. */
206
+ export interface GetPeginStatusResponse {
207
+ pegin_txid: string;
208
+ status: string;
209
+ progress: PeginProgressDetails;
210
+ health_info: string;
211
+ last_error?: string;
212
+ }
213
+ /** Params for querying pegout status from the VP daemon. */
214
+ export interface GetPegoutStatusParams {
215
+ pegin_txid: string;
216
+ }
217
+ /** Claimer-side pegout progress. */
218
+ export interface ClaimerPegoutStatus {
219
+ status: string;
220
+ failed: boolean;
221
+ claim_txid?: string;
222
+ claimer_pubkey?: string;
223
+ challenger_pubkey?: string;
224
+ created_at?: string;
225
+ updated_at?: string;
226
+ }
227
+ /** Challenger-side pegout progress. */
228
+ export interface ChallengerPegoutStatus {
229
+ status: string;
230
+ claim_txid?: string;
231
+ claimer_pubkey?: string;
232
+ assert_txid?: string;
233
+ challenge_assert_txid?: string;
234
+ nopayout_txid?: string;
235
+ created_at?: string;
236
+ updated_at?: string;
237
+ }
238
+ /** Response from `getPegoutStatus`. */
239
+ export interface GetPegoutStatusResponse {
240
+ pegin_txid: string;
241
+ found: boolean;
242
+ claimer?: ClaimerPegoutStatus;
243
+ challenger?: ChallengerPegoutStatus;
244
+ }
245
+ /** JSON-RPC error codes returned by the vault provider. */
246
+ export declare enum RpcErrorCode {
247
+ DATABASE_ERROR = -32005,
248
+ PRESIGN_ERROR = -32006,
249
+ JSON_SERIALIZATION_ERROR = -32007,
250
+ TX_GRAPH_ERROR = -32008,
251
+ INVALID_GRAPH = -32009,
252
+ VALIDATION_ERROR = -32010,
253
+ NOT_FOUND = -32011,
254
+ INTERNAL_ERROR = -32603
255
+ }
256
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/vault-provider/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH;;;;;;;;;;;;;GAaG;AACH,oBAAY,YAAY;IACtB,iBAAiB,qBAAqB;IACtC,yBAAyB,2BAA2B;IACpD,kBAAkB,qBAAqB;IACvC,6BAA6B,gCAAgC;IAC7D,+BAA+B,iCAAiC;IAChE,+BAA+B,iCAAiC;IAChE,4BAA4B,+BAA+B;IAC3D,YAAY,gBAAgB;IAC5B,kBAAkB,sBAAsB;IACxC,SAAS,cAAc;IACvB,OAAO,YAAY;IACnB,YAAY,gBAAgB;IAC5B,UAAU,cAAc;CACzB;AAMD;;;GAGG;AACH,eAAO,MAAM,+BAA+B,EAAE,SAAS,YA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wBAAwB,SAAS;IACjC,cAAc,SAAS;IACvB,aAAa,SAAS;IACtB,gBAAgB,SAAS;IACzB,SAAS,SAAS;IAClB,cAAc,SAAS;CACxB"}
@@ -0,0 +1,30 @@
1
+ import { GetPeginStatusResponse, GetPegoutStatusResponse, RequestDepositorClaimerArtifactsResponse, RequestDepositorPresignTransactionsResponse } from './types';
2
+ /**
3
+ * Thrown when a VP RPC response fails runtime validation.
4
+ *
5
+ * `.message` is a user-facing string safe to display in the UI.
6
+ * `.detail` contains the technical reason, suitable for logging.
7
+ */
8
+ export declare class VpResponseValidationError extends Error {
9
+ readonly detail: string;
10
+ constructor(detail: string);
11
+ }
12
+ /**
13
+ * Validate a getPeginStatus response.
14
+ *
15
+ * Throws if the status field is not a recognized DaemonStatus value.
16
+ */
17
+ export declare function validateGetPeginStatusResponse(response: unknown): asserts response is GetPeginStatusResponse;
18
+ /**
19
+ * Validate a requestDepositorPresignTransactions response.
20
+ */
21
+ export declare function validateRequestDepositorPresignTransactionsResponse(response: unknown): asserts response is RequestDepositorPresignTransactionsResponse;
22
+ /**
23
+ * Validate a requestDepositorClaimerArtifacts response.
24
+ */
25
+ export declare function validateRequestDepositorClaimerArtifactsResponse(response: unknown): asserts response is RequestDepositorClaimerArtifactsResponse;
26
+ /**
27
+ * Validate a getPegoutStatus response.
28
+ */
29
+ export declare function validateGetPegoutStatusResponse(response: unknown): asserts response is GetPegoutStatusResponse;
30
+ //# sourceMappingURL=validators.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validators.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/clients/vault-provider/validators.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EACV,sBAAsB,EACtB,uBAAuB,EACvB,wCAAwC,EACxC,2CAA2C,EAC5C,MAAM,SAAS,CAAC;AAejB;;;;;GAKG;AACH,qBAAa,yBAA0B,SAAQ,KAAK;IAClD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,MAAM,EAAE,MAAM;CAK3B;AAiGD;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,sBAAsB,CAkD5C;AAED;;GAEG;AACH,wBAAgB,mDAAmD,CACjE,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,2CAA2C,CA4BjE;AA2FD;;GAEG;AACH,wBAAgB,gDAAgD,CAC9D,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,wCAAwC,CA0C9D;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,QAAQ,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,IAAI,uBAAuB,CAqD7C"}
@@ -8,7 +8,7 @@
8
8
  */
9
9
  /**
10
10
  * Minimal ABI for BTCVaultRegistry contract.
11
- * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, and getBTCVault.
11
+ * Contains submitPeginRequest, submitPeginRequestBatch, activateVaultWithSecret, getPegInFee, and getBtcVaultBasicInfo.
12
12
  */
13
13
  export declare const BTCVaultRegistryABI: readonly [{
14
14
  readonly type: "function";
@@ -207,85 +207,40 @@ export declare const BTCVaultRegistryABI: readonly [{
207
207
  readonly stateMutability: "view";
208
208
  }, {
209
209
  readonly type: "function";
210
- readonly name: "getBTCVault";
210
+ readonly name: "getBtcVaultBasicInfo";
211
211
  readonly inputs: readonly [{
212
212
  readonly name: "vaultId";
213
213
  readonly type: "bytes32";
214
214
  readonly internalType: "bytes32";
215
215
  }];
216
216
  readonly outputs: readonly [{
217
- readonly name: "vault";
218
- readonly type: "tuple";
219
- readonly internalType: "struct IBTCVaultRegistry.BTCVault";
220
- readonly components: readonly [{
221
- readonly name: "depositor";
222
- readonly type: "address";
223
- readonly internalType: "address";
224
- }, {
225
- readonly name: "depositorBtcPubKey";
226
- readonly type: "bytes32";
227
- readonly internalType: "bytes32";
228
- }, {
229
- readonly name: "depositorSignedPeginTx";
230
- readonly type: "bytes";
231
- readonly internalType: "bytes";
232
- }, {
233
- readonly name: "amount";
234
- readonly type: "uint256";
235
- readonly internalType: "uint256";
236
- }, {
237
- readonly name: "vaultProvider";
238
- readonly type: "address";
239
- readonly internalType: "address";
240
- }, {
241
- readonly name: "status";
242
- readonly type: "uint8";
243
- readonly internalType: "enum IBTCVaultRegistry.BTCVaultStatus";
244
- }, {
245
- readonly name: "applicationEntryPoint";
246
- readonly type: "address";
247
- readonly internalType: "address";
248
- }, {
249
- readonly name: "universalChallengersVersion";
250
- readonly type: "uint16";
251
- readonly internalType: "uint16";
252
- }, {
253
- readonly name: "appVaultKeepersVersion";
254
- readonly type: "uint16";
255
- readonly internalType: "uint16";
256
- }, {
257
- readonly name: "offchainParamsVersion";
258
- readonly type: "uint16";
259
- readonly internalType: "uint16";
260
- }, {
261
- readonly name: "createdAt";
262
- readonly type: "uint256";
263
- readonly internalType: "uint256";
264
- }, {
265
- readonly name: "verifiedAt";
266
- readonly type: "uint256";
267
- readonly internalType: "uint256";
268
- }, {
269
- readonly name: "depositorWotsPkHash";
270
- readonly type: "bytes32";
271
- readonly internalType: "bytes32";
272
- }, {
273
- readonly name: "hashlock";
274
- readonly type: "bytes32";
275
- readonly internalType: "bytes32";
276
- }, {
277
- readonly name: "htlcVout";
278
- readonly type: "uint8";
279
- readonly internalType: "uint8";
280
- }, {
281
- readonly name: "depositorPopSignature";
282
- readonly type: "bytes";
283
- readonly internalType: "bytes";
284
- }, {
285
- readonly name: "prePeginTxHash";
286
- readonly type: "bytes32";
287
- readonly internalType: "bytes32";
288
- }];
217
+ readonly name: "depositor";
218
+ readonly type: "address";
219
+ readonly internalType: "address";
220
+ }, {
221
+ readonly name: "depositorBtcPubKey";
222
+ readonly type: "bytes32";
223
+ readonly internalType: "bytes32";
224
+ }, {
225
+ readonly name: "amount";
226
+ readonly type: "uint256";
227
+ readonly internalType: "uint256";
228
+ }, {
229
+ readonly name: "vaultProvider";
230
+ readonly type: "address";
231
+ readonly internalType: "address";
232
+ }, {
233
+ readonly name: "status";
234
+ readonly type: "uint8";
235
+ readonly internalType: "enum IBTCVaultRegistry.BTCVaultStatus";
236
+ }, {
237
+ readonly name: "applicationEntryPoint";
238
+ readonly type: "address";
239
+ readonly internalType: "address";
240
+ }, {
241
+ readonly name: "createdAt";
242
+ readonly type: "uint256";
243
+ readonly internalType: "uint256";
289
244
  }];
290
245
  readonly stateMutability: "view";
291
246
  }, {
@@ -1 +1 @@
1
- {"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAqStB,CAAC"}
1
+ {"version":3,"file":"BTCVaultRegistry.abi.d.ts","sourceRoot":"","sources":["../../../../../src/tbv/core/contracts/abis/BTCVaultRegistry.abi.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAoRtB,CAAC"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../challengeAssert-D7SqsNpQ.cjs"),r=require("@babylonlabs-io/babylon-tbv-rust-wasm"),t=require("../../errors-Bk7eb5h3.cjs");exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.buildChallengeAssertPsbt=e.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=e.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=e.buildNoPayoutPsbt;exports.buildPayoutPsbt=e.buildPayoutPsbt;exports.buildPeginInputPsbt=e.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=e.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=e.buildPrePeginPsbt;exports.buildRefundPsbt=e.buildRefundPsbt;exports.computeNumLocalChallengers=e.computeNumLocalChallengers;exports.createPayoutScript=e.createPayoutScript;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.extractPayoutSignature=e.extractPayoutSignature;exports.extractPeginInputSignature=e.extractPeginInputSignature;exports.finalizePeginInputPsbt=e.finalizePeginInputPsbt;exports.fundPeginTransaction=e.fundPeginTransaction;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.parseUnfundedWasmTransaction=e.parseUnfundedWasmTransaction;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>r.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>r.deriveVaultId});exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.BitcoinScriptType=t.BitcoinScriptType;exports.CONTRACT_ERRORS=t.CONTRACT_ERRORS;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.PayoutManager=t.PayoutManager;exports.PeginManager=t.PeginManager;exports.calculateBtcTxHash=t.calculateBtcTxHash;exports.computeWotsPkHash=t.computeWotsPkHash;exports.createTaprootScriptPathSignOptions=t.createTaprootScriptPathSignOptions;exports.deriveWotsKeypair=t.deriveWotsKeypair;exports.deriveWotsPkHash=t.deriveWotsPkHash;exports.extractErrorData=t.extractErrorData;exports.getAddressTxs=t.getAddressTxs;exports.getAddressUtxos=t.getAddressUtxos;exports.getContractErrorMessage=t.getContractErrorMessage;exports.getDustThreshold=t.getDustThreshold;exports.getMempoolApiUrl=t.getMempoolApiUrl;exports.getNetworkFees=t.getNetworkFees;exports.getPsbtInputFields=t.getPsbtInputFields;exports.getScriptType=t.getScriptType;exports.getTxHex=t.getTxHex;exports.getTxInfo=t.getTxInfo;exports.getUtxoInfo=t.getUtxoInfo;exports.handleContractError=t.handleContractError;exports.isKnownContractError=t.isKnownContractError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.keypairToPublicKey=t.keypairToPublicKey;exports.mnemonicToWotsSeed=t.mnemonicToWotsSeed;exports.pushTx=t.pushTx;exports.selectUtxosForPegin=t.selectUtxosForPegin;exports.shouldAddChangeOutput=t.shouldAddChangeOutput;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("../../challengeAssert-D_k_ADgP.cjs"),u=require("@babylonlabs-io/babylon-tbv-rust-wasm"),a=require("../../payout-CfsDnjKI.cjs"),e=require("../../constants-EiyZkXce.cjs"),s=require("../../psbtInputFields-C0nKn_GD.cjs"),T=require("../../fundPeginTransaction-EbrZzlrh.cjs"),P=require("../../signing-Deg5lCoC.cjs"),r=require("../../errors-DKLboMnq.cjs"),n=require("../../signAndSubmitPayouts-CSJmcPQN.cjs"),t=require("../../index-D3z3SZAj.cjs"),o=require("../../types-DEWiqXYp.cjs");exports.buildChallengeAssertPsbt=i.buildChallengeAssertPsbt;exports.buildDepositorPayoutPsbt=i.buildDepositorPayoutPsbt;exports.buildNoPayoutPsbt=i.buildNoPayoutPsbt;exports.buildPeginInputPsbt=i.buildPeginInputPsbt;exports.buildPeginTxFromFundedPrePegin=i.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=i.buildPrePeginPsbt;exports.buildRefundPsbt=i.buildRefundPsbt;exports.computeNumLocalChallengers=i.computeNumLocalChallengers;exports.extractPeginInputSignature=i.extractPeginInputSignature;exports.finalizePeginInputPsbt=i.finalizePeginInputPsbt;Object.defineProperty(exports,"computeMinClaimValue",{enumerable:!0,get:()=>u.computeMinClaimValue});Object.defineProperty(exports,"deriveVaultId",{enumerable:!0,get:()=>u.deriveVaultId});exports.buildPayoutPsbt=a.buildPayoutPsbt;exports.createPayoutScript=a.createPayoutScript;exports.extractPayoutSignature=a.extractPayoutSignature;exports.BTC_DUST_SAT=e.BTC_DUST_SAT;exports.DUST_THRESHOLD=e.DUST_THRESHOLD;exports.FEE_SAFETY_MARGIN=e.FEE_SAFETY_MARGIN;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=e.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=e.MAX_NON_LEGACY_OUTPUT_SIZE;exports.P2TR_INPUT_SIZE=e.P2TR_INPUT_SIZE;exports.PEGIN_FIXED_OUTPUTS=e.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=e.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=e.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=e.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.deriveNativeSegwitAddress=e.deriveNativeSegwitAddress;exports.deriveTaprootAddress=e.deriveTaprootAddress;exports.ensureHexPrefix=e.ensureHexPrefix;exports.getNetwork=e.getNetwork;exports.hexToUint8Array=e.hexToUint8Array;exports.isAddressFromPublicKey=e.isAddressFromPublicKey;exports.isValidHex=e.isValidHex;exports.peginOutputCount=e.peginOutputCount;exports.processPublicKeyToXOnly=e.processPublicKeyToXOnly;exports.rateBasedTxBufferFee=e.rateBasedTxBufferFee;exports.stripHexPrefix=e.stripHexPrefix;exports.toXOnly=e.toXOnly;exports.uint8ArrayToHex=e.uint8ArrayToHex;exports.validateWalletPubkey=e.validateWalletPubkey;exports.BitcoinScriptType=s.BitcoinScriptType;exports.calculateBtcTxHash=s.calculateBtcTxHash;exports.getDustThreshold=s.getDustThreshold;exports.getPsbtInputFields=s.getPsbtInputFields;exports.getScriptType=s.getScriptType;exports.selectUtxosForPegin=s.selectUtxosForPegin;exports.shouldAddChangeOutput=s.shouldAddChangeOutput;exports.fundPeginTransaction=T.fundPeginTransaction;exports.parseUnfundedWasmTransaction=T.parseUnfundedWasmTransaction;exports.createTaprootScriptPathSignOptions=P.createTaprootScriptPathSignOptions;exports.CONTRACT_ERRORS=r.CONTRACT_ERRORS;exports.PeginManager=r.PeginManager;exports.computeWotsPkHash=r.computeWotsPkHash;exports.deriveWotsKeypair=r.deriveWotsKeypair;exports.deriveWotsPkHash=r.deriveWotsPkHash;exports.extractErrorData=r.extractErrorData;exports.getContractErrorMessage=r.getContractErrorMessage;exports.handleContractError=r.handleContractError;exports.isKnownContractError=r.isKnownContractError;exports.isWotsMismatchError=r.isWotsMismatchError;exports.keypairToPublicKey=r.keypairToPublicKey;exports.mnemonicToWotsSeed=r.mnemonicToWotsSeed;exports.PayoutManager=n.PayoutManager;exports.pollAndSignPayouts=n.pollAndSignPayouts;exports.signDepositorGraph=n.signDepositorGraph;exports.submitWotsPublicKey=n.submitWotsPublicKey;exports.waitForPeginStatus=n.waitForPeginStatus;exports.BTCVaultRegistryABI=t.BTCVaultRegistryABI;exports.MEMPOOL_API_URLS=t.MEMPOOL_API_URLS;exports.VaultProviderRpcClient=t.VaultProviderRpcClient;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.DaemonStatus=o.DaemonStatus;exports.JSON_RPC_ERROR_CODES=o.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=o.JsonRpcClient;exports.JsonRpcError=o.JsonRpcError;exports.POST_WOTS_STATUSES=o.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=o.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=o.RpcErrorCode;exports.VP_TERMINAL_STATUSES=o.VP_TERMINAL_STATUSES;exports.VP_TRANSIENT_STATUSES=o.VP_TRANSIENT_STATUSES;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -16,4 +16,5 @@ export * from './managers';
16
16
  export * from './clients';
17
17
  export * from './contracts';
18
18
  export * from './wots';
19
+ export * from './services';
19
20
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tbv/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tbv/core/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,aAAa,CAAC;AAC5B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
@@ -1,78 +1,102 @@
1
- import { B as e, D as t, F as r, L as o, M as i, P as n, z as u, S as P, T, W as d, l, j as g, k as E, h as p, d as c, a as _, b as A, g as x, c as S, m as b, n as y, o as I, s as R, i as C, e as F, f as U, E as m, G as O, p as h, q as f, r as L, C as M, A as H, t as N, y as B, u as D, v as W, w as v, x as k } from "../../challengeAssert-C5DQSUnp.js";
2
- import { computeMinClaimValue as X, deriveVaultId as K } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
- import { o as Y, B as G, C as z, M as Z, f as j, P as q, c as J, y as Q, e as $, w as aa, z as sa, q as ea, h as ta, i as ra, r as oa, g as ia, j as na, k as ua, d as Pa, b as Ta, l as da, m as la, n as ga, u as Ea, t as pa, A as ca, x as _a, v as Aa, p as xa, s as Sa, a as ba } from "../../errors-Ld-2tiK3.js";
1
+ import { j as e, h as t, i as r, d as o, a as i, b as n, g as T, c as P, e as u, f as p } from "../../challengeAssert-k5_LWUtO.js";
2
+ import { computeMinClaimValue as E, deriveVaultId as S } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
+ import { b as _, c, e as g } from "../../payout-Ce9vSs9e.js";
4
+ import { B as A, D as x, F as b, L as m, M as f, P as I, c as O, S as y, T as C, W as U, d as h, a as F, e as N, g as D, h as L, i as M, b as V, f as H, p as B, r as W, s as v, t as k, u as w, v as K } from "../../constants-Q7v2O7Ps.js";
5
+ import { B as G, c as Y, g as J, d as Z, b as j, s as z, a as q } from "../../psbtInputFields-DO0ELwiv.js";
6
+ import { f as $, p as aa } from "../../fundPeginTransaction-DpwnDslW.js";
7
+ import { c as ea } from "../../signing-Drwr3bXB.js";
8
+ import { C as ra, P as oa, c as ia, d as na, a as Ta, e as Pa, g as ua, h as pa, i as da, b as Ea, k as Sa, m as la } from "../../errors-KY63mgWT.js";
9
+ import { P as ca, p as ga, a as Ra, s as Aa, w as xa } from "../../signAndSubmitPayouts-CAOEAQp9.js";
10
+ import { B as ma, M as fa, V as Ia, i as Oa, h as ya, g as Ca, a as Ua, b as ha, c as Fa, d as Na, e as Da, f as La, p as Ma } from "../../index-Dw7FAwne.js";
11
+ import { D as Ha, b as Ba, J as Wa, a as va, d as ka, P as wa, R as Ka, c as Xa, V as Ga } from "../../types-D1rYwwCu.js";
4
12
  export {
5
- Y as BTCVaultRegistryABI,
6
- e as BTC_DUST_SAT,
13
+ ma as BTCVaultRegistryABI,
14
+ A as BTC_DUST_SAT,
7
15
  G as BitcoinScriptType,
8
- z as CONTRACT_ERRORS,
9
- t as DUST_THRESHOLD,
10
- r as FEE_SAFETY_MARGIN,
11
- o as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
12
- i as MAX_NON_LEGACY_OUTPUT_SIZE,
13
- Z as MEMPOOL_API_URLS,
14
- n as P2TR_INPUT_SIZE,
15
- u as PEGIN_FIXED_OUTPUTS,
16
- j as PayoutManager,
17
- q as PeginManager,
18
- P as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
19
- T as TX_BUFFER_SIZE_OVERHEAD,
20
- d as WALLET_RELAY_FEE_RATE_THRESHOLD,
21
- l as buildChallengeAssertPsbt,
22
- g as buildDepositorPayoutPsbt,
23
- E as buildNoPayoutPsbt,
24
- p as buildPayoutPsbt,
25
- c as buildPeginInputPsbt,
26
- _ as buildPeginTxFromFundedPrePegin,
27
- A as buildPrePeginPsbt,
28
- x as buildRefundPsbt,
29
- J as calculateBtcTxHash,
30
- X as computeMinClaimValue,
31
- S as computeNumLocalChallengers,
32
- Q as computeWotsPkHash,
33
- b as createPayoutScript,
34
- $ as createTaprootScriptPathSignOptions,
35
- y as deriveNativeSegwitAddress,
36
- I as deriveTaprootAddress,
37
- K as deriveVaultId,
38
- aa as deriveWotsKeypair,
39
- sa as deriveWotsPkHash,
40
- R as ensureHexPrefix,
41
- ea as extractErrorData,
42
- C as extractPayoutSignature,
43
- F as extractPeginInputSignature,
44
- U as finalizePeginInputPsbt,
45
- m as fundPeginTransaction,
46
- ta as getAddressTxs,
47
- ra as getAddressUtxos,
48
- oa as getContractErrorMessage,
49
- ia as getDustThreshold,
50
- na as getMempoolApiUrl,
51
- O as getNetwork,
52
- ua as getNetworkFees,
53
- Pa as getPsbtInputFields,
54
- Ta as getScriptType,
55
- da as getTxHex,
56
- la as getTxInfo,
57
- ga as getUtxoInfo,
58
- Ea as handleContractError,
59
- h as hexToUint8Array,
60
- f as isAddressFromPublicKey,
61
- pa as isKnownContractError,
62
- L as isValidHex,
63
- ca as isWotsMismatchError,
64
- _a as keypairToPublicKey,
65
- Aa as mnemonicToWotsSeed,
66
- M as parseUnfundedWasmTransaction,
16
+ ra as CONTRACT_ERRORS,
17
+ x as DUST_THRESHOLD,
18
+ Ha as DaemonStatus,
19
+ b as FEE_SAFETY_MARGIN,
20
+ Ba as JSON_RPC_ERROR_CODES,
21
+ Wa as JsonRpcClient,
22
+ va as JsonRpcError,
23
+ m as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
24
+ f as MAX_NON_LEGACY_OUTPUT_SIZE,
25
+ fa as MEMPOOL_API_URLS,
26
+ I as P2TR_INPUT_SIZE,
27
+ O as PEGIN_FIXED_OUTPUTS,
28
+ ka as POST_WOTS_STATUSES,
29
+ wa as PRE_DEPOSITOR_SIGNATURES_STATES,
30
+ ca as PayoutManager,
31
+ oa as PeginManager,
32
+ Ka as RpcErrorCode,
33
+ y as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
34
+ C as TX_BUFFER_SIZE_OVERHEAD,
35
+ Xa as VP_TERMINAL_STATUSES,
36
+ Ga as VP_TRANSIENT_STATUSES,
37
+ Ia as VaultProviderRpcClient,
38
+ Oa as ViemVaultRegistryReader,
39
+ ya as VpResponseValidationError,
40
+ U as WALLET_RELAY_FEE_RATE_THRESHOLD,
41
+ e as buildChallengeAssertPsbt,
42
+ t as buildDepositorPayoutPsbt,
43
+ r as buildNoPayoutPsbt,
44
+ _ as buildPayoutPsbt,
45
+ o as buildPeginInputPsbt,
46
+ i as buildPeginTxFromFundedPrePegin,
47
+ n as buildPrePeginPsbt,
48
+ T as buildRefundPsbt,
49
+ Y as calculateBtcTxHash,
50
+ E as computeMinClaimValue,
51
+ P as computeNumLocalChallengers,
52
+ ia as computeWotsPkHash,
53
+ c as createPayoutScript,
54
+ ea as createTaprootScriptPathSignOptions,
55
+ h as deriveNativeSegwitAddress,
56
+ F as deriveTaprootAddress,
57
+ S as deriveVaultId,
58
+ na as deriveWotsKeypair,
59
+ Ta as deriveWotsPkHash,
60
+ N as ensureHexPrefix,
61
+ Pa as extractErrorData,
62
+ g as extractPayoutSignature,
63
+ u as extractPeginInputSignature,
64
+ p as finalizePeginInputPsbt,
65
+ $ as fundPeginTransaction,
66
+ Ca as getAddressTxs,
67
+ Ua as getAddressUtxos,
68
+ ua as getContractErrorMessage,
69
+ J as getDustThreshold,
70
+ ha as getMempoolApiUrl,
71
+ D as getNetwork,
72
+ Fa as getNetworkFees,
73
+ Z as getPsbtInputFields,
74
+ j as getScriptType,
75
+ Na as getTxHex,
76
+ Da as getTxInfo,
77
+ La as getUtxoInfo,
78
+ pa as handleContractError,
79
+ L as hexToUint8Array,
80
+ M as isAddressFromPublicKey,
81
+ da as isKnownContractError,
82
+ V as isValidHex,
83
+ Ea as isWotsMismatchError,
84
+ Sa as keypairToPublicKey,
85
+ la as mnemonicToWotsSeed,
86
+ aa as parseUnfundedWasmTransaction,
67
87
  H as peginOutputCount,
68
- N as processPublicKeyToXOnly,
69
- xa as pushTx,
70
- B as rateBasedTxBufferFee,
71
- Sa as selectUtxosForPegin,
72
- ba as shouldAddChangeOutput,
73
- D as stripHexPrefix,
74
- W as toXOnly,
75
- v as uint8ArrayToHex,
76
- k as validateWalletPubkey
88
+ ga as pollAndSignPayouts,
89
+ B as processPublicKeyToXOnly,
90
+ Ma as pushTx,
91
+ W as rateBasedTxBufferFee,
92
+ z as selectUtxosForPegin,
93
+ q as shouldAddChangeOutput,
94
+ Ra as signDepositorGraph,
95
+ v as stripHexPrefix,
96
+ Aa as submitWotsPublicKey,
97
+ k as toXOnly,
98
+ w as uint8ArrayToHex,
99
+ K as validateWalletPubkey,
100
+ xa as waitForPeginStatus
77
101
  };
78
102
  //# sourceMappingURL=index.js.map