@babylonlabs-io/ts-sdk 0.78.0 → 0.79.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 (105) hide show
  1. package/dist/{BTCVaultRegistry.abi-BT3eo60h.js → BTCVaultRegistry.abi-B0x9_Bza.js} +43 -1
  2. package/dist/BTCVaultRegistry.abi-B0x9_Bza.js.map +1 -0
  3. package/dist/BTCVaultRegistry.abi-BQ5tFNSu.cjs +2 -0
  4. package/dist/BTCVaultRegistry.abi-BQ5tFNSu.cjs.map +1 -0
  5. package/dist/{BTCVaultRegistryKeyEpochs.abi-D8cIbMtH.js → BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js} +57 -20
  6. package/dist/BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js.map +1 -0
  7. package/dist/BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs +2 -0
  8. package/dist/BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs.map +1 -0
  9. package/dist/{PeginManager-Cz0Ytdwo.js → PeginManager-BXlh3ar0.js} +289 -348
  10. package/dist/PeginManager-BXlh3ar0.js.map +1 -0
  11. package/dist/PeginManager-BuVSknB0.cjs +2 -0
  12. package/dist/PeginManager-BuVSknB0.cjs.map +1 -0
  13. package/dist/ProtocolParams.abi-Db2USqQm.cjs +2 -0
  14. package/dist/ProtocolParams.abi-Db2USqQm.cjs.map +1 -0
  15. package/dist/ProtocolParams.abi-q0AidvYX.js +526 -0
  16. package/dist/ProtocolParams.abi-q0AidvYX.js.map +1 -0
  17. package/dist/buildAndBroadcastReclaim-N9dXH9dm.cjs +2 -0
  18. package/dist/buildAndBroadcastReclaim-N9dXH9dm.cjs.map +1 -0
  19. package/dist/{buildAndBroadcastReclaim-DD50pVB1.js → buildAndBroadcastReclaim-O6z9kvc4.js} +502 -468
  20. package/dist/buildAndBroadcastReclaim-O6z9kvc4.js.map +1 -0
  21. package/dist/index.cjs +1 -1
  22. package/dist/index.js +227 -222
  23. package/dist/pegin-registration-client-CZgcU2_0.cjs +2 -0
  24. package/dist/pegin-registration-client-CZgcU2_0.cjs.map +1 -0
  25. package/dist/{pegin-registration-client-7Vbtdypu.js → pegin-registration-client-pcczkzMg.js} +184 -143
  26. package/dist/pegin-registration-client-pcczkzMg.js.map +1 -0
  27. package/dist/tbv/core/clients/eth/index.cjs +1 -1
  28. package/dist/tbv/core/clients/eth/index.js +2 -2
  29. package/dist/tbv/core/clients/eth/pegin-registration-client.d.ts +17 -0
  30. package/dist/tbv/core/clients/eth/pegin-registration-client.d.ts.map +1 -1
  31. package/dist/tbv/core/clients/eth/signer-set-reader.d.ts +2 -0
  32. package/dist/tbv/core/clients/eth/signer-set-reader.d.ts.map +1 -1
  33. package/dist/tbv/core/clients/eth/types.d.ts +28 -0
  34. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  35. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +12 -0
  36. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
  37. package/dist/tbv/core/clients/index.cjs +1 -1
  38. package/dist/tbv/core/clients/index.js +2 -2
  39. package/dist/tbv/core/contracts/__tests__/peginFingerprintAbi.test.d.ts +24 -0
  40. package/dist/tbv/core/contracts/__tests__/peginFingerprintAbi.test.d.ts.map +1 -0
  41. package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts +14 -0
  42. package/dist/tbv/core/contracts/abis/ApplicationRegistry.abi.d.ts.map +1 -1
  43. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts +38 -0
  44. package/dist/tbv/core/contracts/abis/BTCVaultRegistry.abi.d.ts.map +1 -1
  45. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts +10 -0
  46. package/dist/tbv/core/contracts/abis/ProtocolParams.abi.d.ts.map +1 -1
  47. package/dist/tbv/core/contracts/errors.d.ts +41 -4
  48. package/dist/tbv/core/contracts/errors.d.ts.map +1 -1
  49. package/dist/tbv/core/contracts/index.cjs +1 -1
  50. package/dist/tbv/core/contracts/index.cjs.map +1 -1
  51. package/dist/tbv/core/contracts/index.d.ts +1 -1
  52. package/dist/tbv/core/contracts/index.d.ts.map +1 -1
  53. package/dist/tbv/core/contracts/index.js +15 -492
  54. package/dist/tbv/core/contracts/index.js.map +1 -1
  55. package/dist/tbv/core/index.cjs +1 -1
  56. package/dist/tbv/core/index.js +222 -217
  57. package/dist/tbv/core/managers/PeginManager.d.ts +13 -25
  58. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  59. package/dist/tbv/core/managers/index.cjs +1 -1
  60. package/dist/tbv/core/managers/index.d.ts +2 -2
  61. package/dist/tbv/core/managers/index.d.ts.map +1 -1
  62. package/dist/tbv/core/managers/index.js +4 -5
  63. package/dist/tbv/core/pegin-fingerprint/index.d.ts +1 -1
  64. package/dist/tbv/core/pegin-fingerprint/index.d.ts.map +1 -1
  65. package/dist/tbv/core/pegin-fingerprint/peginFingerprint.d.ts +10 -0
  66. package/dist/tbv/core/pegin-fingerprint/peginFingerprint.d.ts.map +1 -1
  67. package/dist/tbv/core/services/deposit/index.d.ts +1 -1
  68. package/dist/tbv/core/services/deposit/index.d.ts.map +1 -1
  69. package/dist/tbv/core/services/deposit/validateOnChainParticipantKeys.d.ts +50 -3
  70. package/dist/tbv/core/services/deposit/validateOnChainParticipantKeys.d.ts.map +1 -1
  71. package/dist/tbv/core/services/index.cjs +1 -1
  72. package/dist/tbv/core/services/index.js +56 -54
  73. package/dist/tbv/core/services/participants/__tests__/fixtures/rotation.d.ts.map +1 -1
  74. package/dist/tbv/index.cjs +1 -1
  75. package/dist/tbv/index.js +222 -217
  76. package/dist/{toRefundInputs-D708M8MA.js → toRefundInputs-9inv4Ai4.js} +96 -92
  77. package/dist/toRefundInputs-9inv4Ai4.js.map +1 -0
  78. package/dist/toRefundInputs-DitGWAnz.cjs +2 -0
  79. package/dist/toRefundInputs-DitGWAnz.cjs.map +1 -0
  80. package/dist/{types-BwqkOoJ6.js → types-B9YhlXe8.js} +109 -83
  81. package/dist/types-B9YhlXe8.js.map +1 -0
  82. package/dist/types-C1tpDycc.cjs +2 -0
  83. package/dist/types-C1tpDycc.cjs.map +1 -0
  84. package/package.json +3 -3
  85. package/dist/BTCVaultRegistry.abi-BJnjzEWD.cjs +0 -2
  86. package/dist/BTCVaultRegistry.abi-BJnjzEWD.cjs.map +0 -1
  87. package/dist/BTCVaultRegistry.abi-BT3eo60h.js.map +0 -1
  88. package/dist/BTCVaultRegistryKeyEpochs.abi-CrQiTLfA.cjs +0 -2
  89. package/dist/BTCVaultRegistryKeyEpochs.abi-CrQiTLfA.cjs.map +0 -1
  90. package/dist/BTCVaultRegistryKeyEpochs.abi-D8cIbMtH.js.map +0 -1
  91. package/dist/PeginManager-Cz0Ytdwo.js.map +0 -1
  92. package/dist/PeginManager-DE2lTWMl.cjs +0 -2
  93. package/dist/PeginManager-DE2lTWMl.cjs.map +0 -1
  94. package/dist/buildAndBroadcastReclaim-CB5VPETy.cjs +0 -2
  95. package/dist/buildAndBroadcastReclaim-CB5VPETy.cjs.map +0 -1
  96. package/dist/buildAndBroadcastReclaim-DD50pVB1.js.map +0 -1
  97. package/dist/pegin-registration-client-7Vbtdypu.js.map +0 -1
  98. package/dist/pegin-registration-client-CSe1vOum.cjs +0 -2
  99. package/dist/pegin-registration-client-CSe1vOum.cjs.map +0 -1
  100. package/dist/toRefundInputs-BH3wkNC4.cjs +0 -2
  101. package/dist/toRefundInputs-BH3wkNC4.cjs.map +0 -1
  102. package/dist/toRefundInputs-D708M8MA.js.map +0 -1
  103. package/dist/types-BN0jOH8K.cjs +0 -2
  104. package/dist/types-BN0jOH8K.cjs.map +0 -1
  105. package/dist/types-BwqkOoJ6.js.map +0 -1
@@ -1,495 +1,18 @@
1
- import { B as a } from "../../../BTCVaultRegistry.abi-BT3eo60h.js";
2
- import { B as s, C as y, e as r, g as u, h as l, i as m } from "../../../BTCVaultRegistryKeyEpochs.abi-D8cIbMtH.js";
3
- const e = [
4
- {
5
- type: "function",
6
- name: "getVaultKeepersByVersion",
7
- inputs: [
8
- {
9
- name: "appEntryPoint",
10
- type: "address",
11
- internalType: "address"
12
- },
13
- {
14
- name: "versionNumber",
15
- type: "uint16",
16
- internalType: "uint16"
17
- }
18
- ],
19
- outputs: [
20
- {
21
- name: "",
22
- type: "tuple[]",
23
- internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]",
24
- components: [
25
- {
26
- name: "ethAddress",
27
- type: "address",
28
- internalType: "address"
29
- },
30
- {
31
- name: "btcPubKey",
32
- type: "bytes32",
33
- internalType: "bytes32"
34
- }
35
- ]
36
- }
37
- ],
38
- stateMutability: "view"
39
- },
40
- {
41
- type: "function",
42
- name: "getCurrentVaultKeepers",
43
- inputs: [
44
- {
45
- name: "appEntryPoint",
46
- type: "address",
47
- internalType: "address"
48
- }
49
- ],
50
- outputs: [
51
- {
52
- name: "",
53
- type: "tuple[]",
54
- internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]",
55
- components: [
56
- {
57
- name: "ethAddress",
58
- type: "address",
59
- internalType: "address"
60
- },
61
- {
62
- name: "btcPubKey",
63
- type: "bytes32",
64
- internalType: "bytes32"
65
- }
66
- ]
67
- }
68
- ],
69
- stateMutability: "view"
70
- },
71
- {
72
- type: "function",
73
- name: "getCurrentVaultKeepersVersion",
74
- inputs: [
75
- {
76
- name: "appEntryPoint",
77
- type: "address",
78
- internalType: "address"
79
- }
80
- ],
81
- outputs: [
82
- {
83
- name: "",
84
- type: "uint16",
85
- internalType: "uint16"
86
- }
87
- ],
88
- stateMutability: "view"
89
- },
90
- // --- RFC-006 operation-key resolution ---------------------------------
91
- // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*
92
- // ETH address and its *genesis* BTC key. The key that actually goes into
93
- // the scripts is the operation key bonded at the vault's frozen
94
- // `appKeeperKeyEpoch`, which the admin address keys the lookup for.
95
- //
96
- // The `...OrGenesis` variant takes the roster key explicitly because the
97
- // correct genesis for a keeper is its key in the vault's *frozen membership
98
- // version* — a keeper may have been dropped from the current roster, or
99
- // listed under a different key in an older version. The plain
100
- // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically
101
- // and can therefore pick the wrong one; do not use it for a frozen vault.
102
- {
103
- type: "function",
104
- name: "getCurrentOperationBtcKey",
105
- inputs: [
106
- { name: "appEntryPoint", type: "address", internalType: "address" },
107
- { name: "keeperAdmin", type: "address", internalType: "address" }
108
- ],
109
- outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
110
- stateMutability: "view"
111
- },
112
- {
113
- type: "function",
114
- name: "getOperationBtcKeyAtEpochOrGenesis",
115
- inputs: [
116
- { name: "appEntryPoint", type: "address", internalType: "address" },
117
- { name: "keeperAdmin", type: "address", internalType: "address" },
118
- { name: "epoch", type: "uint64", internalType: "uint64" },
119
- { name: "rosterGenesisKey", type: "bytes32", internalType: "bytes32" }
120
- ],
121
- outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
122
- stateMutability: "view"
123
- },
124
- {
125
- type: "function",
126
- name: "getPayoutScriptAtEpoch",
127
- inputs: [
128
- { name: "appEntryPoint", type: "address", internalType: "address" },
129
- { name: "keeperAdmin", type: "address", internalType: "address" },
130
- { name: "epoch", type: "uint64", internalType: "uint64" }
131
- ],
132
- outputs: [{ name: "", type: "bytes", internalType: "bytes" }],
133
- stateMutability: "view"
134
- }
135
- ], t = [
136
- {
137
- type: "function",
138
- name: "activeVaultCoreVersion",
139
- inputs: [],
140
- outputs: [
141
- {
142
- name: "",
143
- type: "uint16",
144
- internalType: "uint16"
145
- }
146
- ],
147
- stateMutability: "view"
148
- },
149
- {
150
- type: "function",
151
- name: "getTBVProtocolParams",
152
- inputs: [],
153
- outputs: [
154
- {
155
- name: "",
156
- type: "tuple",
157
- internalType: "struct IProtocolParams.TBVProtocolParams",
158
- components: [
159
- {
160
- name: "minimumPegInAmount",
161
- type: "uint64",
162
- internalType: "uint64"
163
- },
164
- {
165
- name: "maxPegInAmount",
166
- type: "uint64",
167
- internalType: "uint64"
168
- },
169
- {
170
- name: "pegInAckTimeout",
171
- type: "uint64",
172
- internalType: "uint64"
173
- },
174
- {
175
- name: "pegInActivationTimeout",
176
- type: "uint64",
177
- internalType: "uint64"
178
- },
179
- {
180
- name: "maxHtlcOutputCount",
181
- type: "uint8",
182
- internalType: "uint8"
183
- },
184
- {
185
- name: "expiredPegInGraceBlocks",
186
- type: "uint64",
187
- internalType: "uint64"
188
- }
189
- ]
190
- }
191
- ],
192
- stateMutability: "view"
193
- },
194
- {
195
- type: "function",
196
- name: "getLatestOffchainParams",
197
- inputs: [],
198
- outputs: [
199
- {
200
- name: "",
201
- type: "tuple",
202
- internalType: "struct IProtocolParams.VersionedOffchainParams",
203
- components: [
204
- {
205
- name: "timelockAssert",
206
- type: "uint256",
207
- internalType: "uint256"
208
- },
209
- {
210
- name: "timelockChallengeAssert",
211
- type: "uint256",
212
- internalType: "uint256"
213
- },
214
- {
215
- name: "securityCouncilKeys",
216
- type: "bytes32[]",
217
- internalType: "bytes32[]"
218
- },
219
- {
220
- name: "councilQuorum",
221
- type: "uint8",
222
- internalType: "uint8"
223
- },
224
- {
225
- name: "feeRate",
226
- type: "uint64",
227
- internalType: "uint64"
228
- },
229
- {
230
- name: "babeTotalInstances",
231
- type: "uint16",
232
- internalType: "uint16"
233
- },
234
- {
235
- name: "babeInstancesToFinalize",
236
- type: "uint8",
237
- internalType: "uint8"
238
- },
239
- {
240
- name: "minVpCommissionBps",
241
- type: "uint16",
242
- internalType: "uint16"
243
- },
244
- {
245
- name: "tRefund",
246
- type: "uint32",
247
- internalType: "uint32"
248
- },
249
- {
250
- name: "tStale",
251
- type: "uint32",
252
- internalType: "uint32"
253
- },
254
- {
255
- name: "minPeginFeeRate",
256
- type: "uint64",
257
- internalType: "uint64"
258
- },
259
- {
260
- name: "proverCircuitVersion",
261
- type: "uint16",
262
- internalType: "uint16"
263
- },
264
- {
265
- name: "minPrepeginDepth",
266
- type: "uint32",
267
- internalType: "uint32"
268
- }
269
- ]
270
- }
271
- ],
272
- stateMutability: "view"
273
- },
274
- {
275
- type: "function",
276
- name: "getOffchainParamsByVersion",
277
- inputs: [
278
- {
279
- name: "versionNumber",
280
- type: "uint16",
281
- internalType: "uint16"
282
- }
283
- ],
284
- outputs: [
285
- {
286
- name: "",
287
- type: "tuple",
288
- internalType: "struct IProtocolParams.VersionedOffchainParams",
289
- components: [
290
- {
291
- name: "timelockAssert",
292
- type: "uint256",
293
- internalType: "uint256"
294
- },
295
- {
296
- name: "timelockChallengeAssert",
297
- type: "uint256",
298
- internalType: "uint256"
299
- },
300
- {
301
- name: "securityCouncilKeys",
302
- type: "bytes32[]",
303
- internalType: "bytes32[]"
304
- },
305
- {
306
- name: "councilQuorum",
307
- type: "uint8",
308
- internalType: "uint8"
309
- },
310
- {
311
- name: "feeRate",
312
- type: "uint64",
313
- internalType: "uint64"
314
- },
315
- {
316
- name: "babeTotalInstances",
317
- type: "uint16",
318
- internalType: "uint16"
319
- },
320
- {
321
- name: "babeInstancesToFinalize",
322
- type: "uint8",
323
- internalType: "uint8"
324
- },
325
- {
326
- name: "minVpCommissionBps",
327
- type: "uint16",
328
- internalType: "uint16"
329
- },
330
- {
331
- name: "tRefund",
332
- type: "uint32",
333
- internalType: "uint32"
334
- },
335
- {
336
- name: "tStale",
337
- type: "uint32",
338
- internalType: "uint32"
339
- },
340
- {
341
- name: "minPeginFeeRate",
342
- type: "uint64",
343
- internalType: "uint64"
344
- },
345
- {
346
- name: "proverCircuitVersion",
347
- type: "uint16",
348
- internalType: "uint16"
349
- },
350
- {
351
- name: "minPrepeginDepth",
352
- type: "uint32",
353
- internalType: "uint32"
354
- }
355
- ]
356
- }
357
- ],
358
- stateMutability: "view"
359
- },
360
- {
361
- type: "function",
362
- name: "latestOffchainParamsVersion",
363
- inputs: [],
364
- outputs: [
365
- {
366
- name: "",
367
- type: "uint16",
368
- internalType: "uint16"
369
- }
370
- ],
371
- stateMutability: "view"
372
- },
373
- {
374
- type: "function",
375
- name: "getUniversalChallengersByVersion",
376
- inputs: [
377
- {
378
- name: "versionNumber",
379
- type: "uint16",
380
- internalType: "uint16"
381
- }
382
- ],
383
- outputs: [
384
- {
385
- name: "",
386
- type: "tuple[]",
387
- internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]",
388
- components: [
389
- {
390
- name: "ethAddress",
391
- type: "address",
392
- internalType: "address"
393
- },
394
- {
395
- name: "btcPubKey",
396
- type: "bytes32",
397
- internalType: "bytes32"
398
- }
399
- ]
400
- }
401
- ],
402
- stateMutability: "view"
403
- },
404
- {
405
- type: "function",
406
- name: "getCurrentUniversalChallengers",
407
- inputs: [],
408
- outputs: [
409
- {
410
- name: "",
411
- type: "tuple[]",
412
- internalType: "struct BTCVaultTypes.AddressBTCKeyPair[]",
413
- components: [
414
- {
415
- name: "ethAddress",
416
- type: "address",
417
- internalType: "address"
418
- },
419
- {
420
- name: "btcPubKey",
421
- type: "bytes32",
422
- internalType: "bytes32"
423
- }
424
- ]
425
- }
426
- ],
427
- stateMutability: "view"
428
- },
429
- {
430
- type: "function",
431
- name: "latestUniversalChallengersVersion",
432
- inputs: [],
433
- outputs: [
434
- {
435
- name: "",
436
- type: "uint16",
437
- internalType: "uint16"
438
- }
439
- ],
440
- stateMutability: "view"
441
- },
442
- // --- RFC-006 operation-key resolution ---------------------------------
443
- // Universal challengers get the reduced RFC-006 model: an operation key
444
- // that goes into the challenge scripts, resolved against the vault's frozen
445
- // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only
446
- // BTC output is the NoPayout anchor) and no per-UC setter — key changes go
447
- // through a roster version bump. The roster entry's `ethAddress` is the
448
- // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.
449
- {
450
- type: "function",
451
- name: "getCurrentOperationBtcKey",
452
- inputs: [{ name: "ucAdmin", type: "address", internalType: "address" }],
453
- outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
454
- stateMutability: "view"
455
- },
456
- {
457
- type: "function",
458
- name: "getOperationBtcKeyAtEpochOrGenesis",
459
- inputs: [
460
- { name: "ucAdmin", type: "address", internalType: "address" },
461
- { name: "epoch", type: "uint64", internalType: "uint64" },
462
- { name: "rosterGenesisKey", type: "bytes32", internalType: "bytes32" }
463
- ],
464
- outputs: [{ name: "", type: "bytes32", internalType: "bytes32" }],
465
- stateMutability: "view"
466
- },
467
- // Observation window between a vault's final ACK and its activation, in ETH
468
- // blocks, measured from `verifiedAt`. Read through this standalone getter
469
- // rather than as a 7th component of `getTBVProtocolParams` above: the field
470
- // was appended to the struct, so a 7-component tuple decodes only against
471
- // deployments that carry it and throws `PositionOutOfBoundsError` against
472
- // the 6-word return of those that don't. Deployments are currently split
473
- // (devnet has it, testnet/staging do not), and that tuple feeds
474
- // `getPegInConfiguration` -> `ProtocolParamsContext`, whose failure blanks
475
- // the app. `uint256` (not the `uint64` storage width) — the accessor widens.
476
- {
477
- type: "function",
478
- name: "peginActivationDelay",
479
- inputs: [],
480
- outputs: [{ name: "", type: "uint256", internalType: "uint256" }],
481
- stateMutability: "view"
482
- }
483
- ];
1
+ import { A as t, P as o } from "../../../ProtocolParams.abi-q0AidvYX.js";
2
+ import { B as e } from "../../../BTCVaultRegistry.abi-B0x9_Bza.js";
3
+ import { B as i, C as E, P as g, a as C, e as R, g as p, h as A, i as B, b as P } from "../../../BTCVaultRegistryKeyEpochs.abi-BWoxwPQv.js";
484
4
  export {
485
- e as ApplicationRegistryABI,
486
- a as BTCVaultRegistryABI,
487
- s as BTCVaultRegistryKeyEpochsABI,
488
- y as CONTRACT_ERRORS,
489
- t as ProtocolParamsABI,
490
- r as extractErrorData,
491
- u as getContractErrorMessage,
492
- l as handleContractError,
493
- m as isKnownContractError
5
+ t as ApplicationRegistryABI,
6
+ e as BTCVaultRegistryABI,
7
+ i as BTCVaultRegistryKeyEpochsABI,
8
+ E as CONTRACT_ERRORS,
9
+ g as PEGIN_FINGERPRINT_CHANGED_SELECTOR,
10
+ C as PeginFingerprintChangedError,
11
+ o as ProtocolParamsABI,
12
+ R as extractErrorData,
13
+ p as getContractErrorMessage,
14
+ A as handleContractError,
15
+ B as isKnownContractError,
16
+ P as isPeginFingerprintChangedError
494
17
  };
495
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/tbv/core/contracts/abis/ApplicationRegistry.abi.ts","../../../../src/tbv/core/contracts/abis/ProtocolParams.abi.ts"],"sourcesContent":["/**\n * ApplicationRegistry Contract ABI\n *\n * Minimal ABI containing only the vault keeper read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IApplicationRegistry.sol interface.\n *\n * @module contracts/abis/ApplicationRegistry\n */\n\nexport const ApplicationRegistryABI = [\n {\n type: \"function\",\n name: \"getVaultKeepersByVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepers\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentVaultKeepersVersion\",\n inputs: [\n {\n name: \"appEntryPoint\",\n type: \"address\",\n internalType: \"address\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // A keeper's roster entry (`AddressBTCKeyPair` above) carries its *admin*\n // ETH address and its *genesis* BTC key. The key that actually goes into\n // the scripts is the operation key bonded at the vault's frozen\n // `appKeeperKeyEpoch`, which the admin address keys the lookup for.\n //\n // The `...OrGenesis` variant takes the roster key explicitly because the\n // correct genesis for a keeper is its key in the vault's *frozen membership\n // version* — a keeper may have been dropped from the current roster, or\n // listed under a different key in an older version. The plain\n // `getOperationBtcKeyAtEpoch` variant resolves genesis version-agnostically\n // and can therefore pick the wrong one; do not use it for a frozen vault.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getPayoutScriptAtEpoch\",\n inputs: [\n { name: \"appEntryPoint\", type: \"address\", internalType: \"address\" },\n { name: \"keeperAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n ],\n outputs: [{ name: \"\", type: \"bytes\", internalType: \"bytes\" }],\n stateMutability: \"view\",\n },\n] as const;\n","/**\n * ProtocolParams Contract ABI\n *\n * Minimal ABI containing only the read functions needed by the SDK.\n * Generated from vault-contracts-aave-v4 IProtocolParams.sol interface.\n *\n * @module contracts/abis/ProtocolParams\n */\n\nexport const ProtocolParamsABI = [\n {\n type: \"function\",\n name: \"activeVaultCoreVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getTBVProtocolParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.TBVProtocolParams\",\n components: [\n {\n name: \"minimumPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxPegInAmount\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInAckTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"pegInActivationTimeout\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"maxHtlcOutputCount\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"expiredPegInGraceBlocks\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getLatestOffchainParams\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOffchainParamsByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple\",\n internalType: \"struct IProtocolParams.VersionedOffchainParams\",\n components: [\n {\n name: \"timelockAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"timelockChallengeAssert\",\n type: \"uint256\",\n internalType: \"uint256\",\n },\n {\n name: \"securityCouncilKeys\",\n type: \"bytes32[]\",\n internalType: \"bytes32[]\",\n },\n {\n name: \"councilQuorum\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"feeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"babeTotalInstances\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"babeInstancesToFinalize\",\n type: \"uint8\",\n internalType: \"uint8\",\n },\n {\n name: \"minVpCommissionBps\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"tRefund\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"tStale\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n {\n name: \"minPeginFeeRate\",\n type: \"uint64\",\n internalType: \"uint64\",\n },\n {\n name: \"proverCircuitVersion\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n {\n name: \"minPrepeginDepth\",\n type: \"uint32\",\n internalType: \"uint32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestOffchainParamsVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getUniversalChallengersByVersion\",\n inputs: [\n {\n name: \"versionNumber\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getCurrentUniversalChallengers\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"tuple[]\",\n internalType: \"struct BTCVaultTypes.AddressBTCKeyPair[]\",\n components: [\n {\n name: \"ethAddress\",\n type: \"address\",\n internalType: \"address\",\n },\n {\n name: \"btcPubKey\",\n type: \"bytes32\",\n internalType: \"bytes32\",\n },\n ],\n },\n ],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"latestUniversalChallengersVersion\",\n inputs: [],\n outputs: [\n {\n name: \"\",\n type: \"uint16\",\n internalType: \"uint16\",\n },\n ],\n stateMutability: \"view\",\n },\n // --- RFC-006 operation-key resolution ---------------------------------\n // Universal challengers get the reduced RFC-006 model: an operation key\n // that goes into the challenge scripts, resolved against the vault's frozen\n // `ucKeyEpoch`, but no payout script (a UC is never a claimer, so its only\n // BTC output is the NoPayout anchor) and no per-UC setter — key changes go\n // through a roster version bump. The roster entry's `ethAddress` is the\n // `ucAdmin` lookup key and its `btcPubKey` is the genesis key.\n {\n type: \"function\",\n name: \"getCurrentOperationBtcKey\",\n inputs: [{ name: \"ucAdmin\", type: \"address\", internalType: \"address\" }],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n {\n type: \"function\",\n name: \"getOperationBtcKeyAtEpochOrGenesis\",\n inputs: [\n { name: \"ucAdmin\", type: \"address\", internalType: \"address\" },\n { name: \"epoch\", type: \"uint64\", internalType: \"uint64\" },\n { name: \"rosterGenesisKey\", type: \"bytes32\", internalType: \"bytes32\" },\n ],\n outputs: [{ name: \"\", type: \"bytes32\", internalType: \"bytes32\" }],\n stateMutability: \"view\",\n },\n // Observation window between a vault's final ACK and its activation, in ETH\n // blocks, measured from `verifiedAt`. Read through this standalone getter\n // rather than as a 7th component of `getTBVProtocolParams` above: the field\n // was appended to the struct, so a 7-component tuple decodes only against\n // deployments that carry it and throws `PositionOutOfBoundsError` against\n // the 6-word return of those that don't. Deployments are currently split\n // (devnet has it, testnet/staging do not), and that tuple feeds\n // `getPegInConfiguration` -> `ProtocolParamsContext`, whose failure blanks\n // the app. `uint256` (not the `uint64` storage width) — the accessor widens.\n {\n type: \"function\",\n name: \"peginActivationDelay\",\n inputs: [],\n outputs: [{ name: \"\", type: \"uint256\", internalType: \"uint256\" }],\n stateMutability: \"view\",\n },\n] as const;\n"],"names":["ApplicationRegistryABI","ProtocolParamsABI"],"mappings":";;AASO,MAAMA,IAAyB;AAAA,EACpC;AAAA,IACE,MAAM;AAAA,IACN,MAAM;AAAA,IACN,QAAQ;AAAA,MACN;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,MAEhB;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,MAAA;AAAA,IAChB;AAAA,IAEF,SAAS;AAAA,MACP;AAAA,QACE,MAAM;AAAA,QACN,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,UACV;AAAA,YACE,MAAM;AAAA,YACN,MAAM;AAAA,YACN,cAAc;AAAA,UAAA;AAAA,UAEhB;AAAA,YACE,MAA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IAAI,MAAM,WAAW,cAAc,WAAW;AAAA,IAChE,iBAAiB;AAAA,EAAA;AAErB;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../verifyScriptPathSchnorrSignature-DaRqvEgW.cjs"),O=require("../../secp256k1-DDHQ1_za.cjs"),P=require("./wasm/index.cjs"),A=require("../../verifyKeyPathSchnorrSignature-BjB8Znly.cjs"),l=require("../../noPayout-4RZB2g1e.cjs"),N=require("../../challengeAssert-Z7_YULBb.cjs"),r=require("../../bitcoin-D-O2GjbC.cjs"),h=require("../../abortSignals-msbmbqFe.cjs"),I=require("../../signing-BJ3X66b-.cjs"),c=require("../../validation-C6XTfZak.cjs"),v=require("./utils/eth/index.cjs"),E=require("../../PeginManager-DE2lTWMl.cjs"),d=require("../../signPsbtsWithFallback-DtwzL5AA.cjs"),s=require("./clients/mempool/index.cjs"),_=require("../../types-BN0jOH8K.cjs"),b=require("../../onChainBtcPubkey-BbxRrbvg.cjs"),n=require("../../pegin-registration-client-CSe1vOum.cjs"),C=require("./contracts/index.cjs"),F=require("../../BTCVaultRegistry.abi-BJnjzEWD.cjs"),p=require("../../BTCVaultRegistryKeyEpochs.abi-CrQiTLfA.cjs"),g=require("../../parseFundingOutpoints-B4iQeX6q.cjs"),u=require("../../psbtInputFields-BrV_ZfL_.cjs"),i=require("../../fundPeginTransaction-54-Rwb2k.cjs"),T=require("../../reservation-Dr2HLCxx.cjs"),m=require("../../index-CK1Xvq4K.cjs"),o=require("../../json-rpc-client-BiAmg_ho.cjs"),R=require("../../primeVpAuth-BOGKniTl.cjs"),t=require("../../toRefundInputs-BH3wkNC4.cjs"),e=require("../../buildAndBroadcastReclaim-CB5VPETy.cjs"),S=require("../../peginState-eaQ4IO_R.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=a.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=a.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=a.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=a.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=a.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=a.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=a.buildPrePeginPsbt;exports.computeNumLocalChallengers=a.computeNumLocalChallengers;exports.createPayoutScript=a.createPayoutScript;exports.deriveDepositorClaimDescriptor=a.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=a.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=a.extractPayoutSignature;exports.assertValidVaultCoreVersion=O.assertValidVaultCoreVersion;exports.computeMinClaimValue=P.computeMinClaimValue;exports.computeMinPeginFee=P.computeMinPeginFee;exports.deriveVaultId=P.deriveVaultId;exports.expandAuthAnchor=P.expandAuthAnchor;exports.expandHashlockSecret=P.expandHashlockSecret;exports.expandWotsSeed=P.expandWotsSeed;exports.peginP2aAnchorOutput=P.peginP2aAnchorOutput;exports.supportedTxGraphVersions=P.supportedTxGraphVersions;exports.validatePeginP2aAnchor=P.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=A.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=A.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=A.buildPeginInputPsbt;exports.extractPeginInputSignature=A.extractPeginInputSignature;exports.finalizePeginInputPsbt=A.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=l.buildNoPayoutPsbt;exports.buildReclaimPsbt=l.buildReclaimPsbt;exports.buildRefundPsbt=l.buildRefundPsbt;exports.estimateReclaimFeeSats=l.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=l.finalizeScriptPathWithSignatures;exports.reclaimVsize=l.reclaimVsize;exports.buildChallengeAssertPsbt=N.buildChallengeAssertPsbt;exports.canonicalizeBtcPubkey=r.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.combineAbortSignals=h.combineAbortSignals;exports.calculateBtcTxHash=I.calculateBtcTxHash;exports.createTaprootScriptPathSignOptions=I.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=c.BITCOIN_ADDRESS_RE;exports.COMPRESSED_PUBKEY_HEX_LEN=c.COMPRESSED_PUBKEY_HEX_LEN;exports.HEX_RE=c.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=c.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=c.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=c.TXID_RE;exports.X_ONLY_PUBKEY_HEX_LEN=c.X_ONLY_PUBKEY_HEX_LEN;exports.waitForTransactionReceiptSmartAware=v.waitForTransactionReceiptSmartAware;exports.PeginManager=E.PeginManager;exports.buildDepositTerms=E.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=E.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=E.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=E.ensurePrePeginTermsApproval;exports.estimateSubmitPeginRequestBatchGas=E.estimateSubmitPeginRequestBatchGas;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.requireChangeAddress=d.requireChangeAddress;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.MEMPOOL_API_URLS=s.MEMPOOL_API_URLS;exports.getAddressTxs=s.getAddressTxs;exports.getAddressUtxos=s.getAddressUtxos;exports.getMempoolApiUrl=s.getMempoolApiUrl;exports.getNetworkFees=s.getNetworkFees;exports.getOutspend=s.getOutspend;exports.getTipHeight=s.getTipHeight;exports.getTxHex=s.getTxHex;exports.getTxInfo=s.getTxInfo;exports.getUtxoInfo=s.getUtxoInfo;exports.pushTx=s.pushTx;exports.OnChainBtcVaultStatus=_.OnChainBtcVaultStatus;exports.ViemOperationKeyReader=_.ViemOperationKeyReader;exports.ViemProtocolParamsReader=_.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=_.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=_.ViemVaultKeeperReader;exports.resolveProtocolAddresses=_.resolveProtocolAddresses;exports.assertOnChainBtcPubkey=b.assertOnChainBtcPubkey;exports.COMMISSION_BPS_HEADROOM=n.COMMISSION_BPS_HEADROOM;exports.MAX_ACCEPTABLE_COMMISSION_BPS_CAP=n.MAX_ACCEPTABLE_COMMISSION_BPS_CAP;exports.RegistrationLogsUnavailableError=n.RegistrationLogsUnavailableError;exports.ViemPeginRegistrationClient=n.ViemPeginRegistrationClient;exports.ViemVaultRegistryReader=n.ViemVaultRegistryReader;exports.capMaxAcceptableCommissionBps=n.capMaxAcceptableCommissionBps;exports.derivePeginVaultId=n.derivePeginVaultId;exports.isRegistrationLogsUnavailableError=n.isRegistrationLogsUnavailableError;exports.validateOffchainParams=n.validateOffchainParams;exports.validatePegInConfiguration=n.validatePegInConfiguration;exports.validateTBVProtocolParams=n.validateTBVProtocolParams;exports.ApplicationRegistryABI=C.ApplicationRegistryABI;exports.ProtocolParamsABI=C.ProtocolParamsABI;exports.BTCVaultRegistryABI=F.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=p.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=p.CONTRACT_ERRORS;exports.extractErrorData=p.extractErrorData;exports.getContractErrorMessage=p.getContractErrorMessage;exports.handleContractError=p.handleContractError;exports.isKnownContractError=p.isKnownContractError;exports.VAULT_APP_NAME=g.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=g.buildFundingOutpointsCommitment;exports.buildVaultContext=g.buildVaultContext;exports.deriveVaultRoot=g.deriveVaultRoot;exports.forwardDeriveContextHash=g.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=g.parseFundingOutpointsFromTx;exports.BitcoinScriptType=u.BitcoinScriptType;exports.applyChangeOutputPolicy=u.applyChangeOutputPolicy;exports.computeChangeOutputFeeSats=u.computeChangeOutputFeeSats;exports.computeMaxDeposit=u.computeMaxDeposit;exports.computePeginBaseFeeSats=u.computePeginBaseFeeSats;exports.getDustThreshold=u.getDustThreshold;exports.getPsbtInputFields=u.getPsbtInputFields;exports.getScriptType=u.getScriptType;exports.selectUtxosForPegin=u.selectUtxosForPegin;exports.shouldAddChangeOutput=u.shouldAddChangeOutput;exports.BTC_DUST_SAT=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.VaultProviderRpcClient=m.VaultProviderRpcClient;exports.VpResponseValidationError=m.VpResponseValidationError;exports.batchPollByProvider=m.batchPollByProvider;exports.validateRequestDepositorClaimerArtifactsResponse=m.validateRequestDepositorClaimerArtifactsResponse;exports.AUTH_REJECTED_RPC_CODE=o.AUTH_REJECTED_RPC_CODE;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_BATCH_MAX_SIZE=o.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=o.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=o.VP_TRANSIENT_STATUSES;exports.isAuthRejectedError=o.isAuthRejectedError;exports.ServerIdentityError=R.ServerIdentityError;exports.VpTokenRegistry=R.VpTokenRegistry;exports.createAuthenticatedVpClient=R.createAuthenticatedVpClient;exports.primeVpTokenRegistry=R.primeVpTokenRegistry;exports.verifyServerIdentity=R.verifyServerIdentity;exports.vpTokenRegistry=R.vpTokenRegistry;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=t.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=t.DepositTermsRejectedError;exports.PEGIN_FINGERPRINT_DOMAIN=t.PEGIN_FINGERPRINT_DOMAIN;exports.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE=t.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE;exports.PeginFingerprintInputError=t.PeginFingerprintInputError;exports.PeginParamsAmbiguousError=t.PeginParamsAmbiguousError;exports.PeginParamsIncompleteSpaceError=t.PeginParamsIncompleteSpaceError;exports.PeginParamsNotFoundError=t.PeginParamsNotFoundError;exports.PeginSizingIntegrityError=t.PeginSizingIntegrityError;exports.UnanchoredPrePeginError=t.UnanchoredPrePeginError;exports.VaultRootMismatchError=t.VaultRootMismatchError;exports.buildPeginParamsCandidates=t.buildPeginParamsCandidates;exports.computePeginFingerprint=t.computePeginFingerprint;exports.deriveHashlocksFromPrePegin=t.deriveHashlocksFromPrePegin;exports.describePeginParamsCandidate=t.describePeginParamsCandidate;exports.describeUnresolvedVersion=t.describeUnresolvedVersion;exports.encodePeginFingerprintPreimage=t.encodePeginFingerprintPreimage;exports.isDepositTermsRejectedError=t.isDepositTermsRejectedError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.rebuildDepositTermsCore=t.rebuildDepositTermsCore;exports.reconstructPeginParams=t.reconstructPeginParams;exports.toRefundInputs=t.toRefundInputs;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PEGIN_ETH_CONFIRMATIONS=e.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.PeginRegistrationMissingError=e.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=e.PeginRegistrationNotFinalError;exports.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR=e.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR;exports.RECLAIM_MAX_FEE_FRACTION_NUMERATOR=e.RECLAIM_MAX_FEE_FRACTION_NUMERATOR;exports.RECLAIM_MAX_FEE_RATE_SATS_VB=e.RECLAIM_MAX_FEE_RATE_SATS_VB;exports.RECLAIM_WARN_FEE_FRACTION_NUMERATOR=e.RECLAIM_WARN_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.ReclaimUneconomicalError=e.ReclaimUneconomicalError;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastReclaim=e.buildAndBroadcastReclaim;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=e.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=e.isPeginRegistrationNotFinalError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=e.waitForPeginRegistrationDepth;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=S.ContractStatus;exports.PeginAction=S.PeginAction;exports.canPerformAction=S.canPerformAction;exports.getPeginProtocolState=S.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=S.isActivationDeadlinePassedOnChain;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("../../verifyScriptPathSchnorrSignature-DaRqvEgW.cjs"),O=require("../../secp256k1-DDHQ1_za.cjs"),P=require("./wasm/index.cjs"),R=require("../../verifyKeyPathSchnorrSignature-BjB8Znly.cjs"),l=require("../../noPayout-4RZB2g1e.cjs"),N=require("../../challengeAssert-Z7_YULBb.cjs"),r=require("../../bitcoin-D-O2GjbC.cjs"),h=require("../../abortSignals-msbmbqFe.cjs"),I=require("../../signing-BJ3X66b-.cjs"),c=require("../../validation-C6XTfZak.cjs"),F=require("./utils/eth/index.cjs"),A=require("../../PeginManager-BuVSknB0.cjs"),d=require("../../signPsbtsWithFallback-DtwzL5AA.cjs"),o=require("./clients/mempool/index.cjs"),p=require("../../types-C1tpDycc.cjs"),v=require("../../onChainBtcPubkey-BbxRrbvg.cjs"),s=require("../../pegin-registration-client-CZgcU2_0.cjs"),C=require("../../ProtocolParams.abi-Db2USqQm.cjs"),y=require("../../BTCVaultRegistry.abi-BQ5tFNSu.cjs"),E=require("../../BTCVaultRegistryKeyEpochs.abi-DCJnzKer.cjs"),_=require("../../parseFundingOutpoints-B4iQeX6q.cjs"),u=require("../../psbtInputFields-BrV_ZfL_.cjs"),i=require("../../fundPeginTransaction-54-Rwb2k.cjs"),T=require("../../reservation-Dr2HLCxx.cjs"),m=require("../../index-CK1Xvq4K.cjs"),n=require("../../json-rpc-client-BiAmg_ho.cjs"),g=require("../../primeVpAuth-BOGKniTl.cjs"),t=require("../../toRefundInputs-DitGWAnz.cjs"),e=require("../../buildAndBroadcastReclaim-N9dXH9dm.cjs"),S=require("../../peginState-eaQ4IO_R.cjs");exports.PEGIN_DEPOSITOR_CLAIM_VOUT=a.PEGIN_DEPOSITOR_CLAIM_VOUT;exports.PsbtSubstitutionError=a.PsbtSubstitutionError;exports.assertPsbtUnsignedTxMatches=a.assertPsbtUnsignedTxMatches;exports.assertScriptPathSchnorrSignature=a.assertScriptPathSchnorrSignature;exports.buildPayoutPsbt=a.buildPayoutPsbt;exports.buildPeginTxFromFundedPrePegin=a.buildPeginTxFromFundedPrePegin;exports.buildPrePeginPsbt=a.buildPrePeginPsbt;exports.computeNumLocalChallengers=a.computeNumLocalChallengers;exports.createPayoutScript=a.createPayoutScript;exports.deriveDepositorClaimDescriptor=a.deriveDepositorClaimDescriptor;exports.deriveDepositorClaimScriptPubKey=a.deriveDepositorClaimScriptPubKey;exports.extractPayoutSignature=a.extractPayoutSignature;exports.assertValidVaultCoreVersion=O.assertValidVaultCoreVersion;exports.computeMinClaimValue=P.computeMinClaimValue;exports.computeMinPeginFee=P.computeMinPeginFee;exports.deriveVaultId=P.deriveVaultId;exports.expandAuthAnchor=P.expandAuthAnchor;exports.expandHashlockSecret=P.expandHashlockSecret;exports.expandWotsSeed=P.expandWotsSeed;exports.peginP2aAnchorOutput=P.peginP2aAnchorOutput;exports.supportedTxGraphVersions=P.supportedTxGraphVersions;exports.validatePeginP2aAnchor=P.validatePeginP2aAnchor;exports.assertKeyPathSchnorrSignature=R.assertKeyPathSchnorrSignature;exports.assertReturnedKeyPathSignatures=R.assertReturnedKeyPathSignatures;exports.buildPeginInputPsbt=R.buildPeginInputPsbt;exports.extractPeginInputSignature=R.extractPeginInputSignature;exports.finalizePeginInputPsbt=R.finalizePeginInputPsbt;exports.buildNoPayoutPsbt=l.buildNoPayoutPsbt;exports.buildReclaimPsbt=l.buildReclaimPsbt;exports.buildRefundPsbt=l.buildRefundPsbt;exports.estimateReclaimFeeSats=l.estimateReclaimFeeSats;exports.finalizeScriptPathWithSignatures=l.finalizeScriptPathWithSignatures;exports.reclaimVsize=l.reclaimVsize;exports.buildChallengeAssertPsbt=N.buildChallengeAssertPsbt;exports.canonicalizeBtcPubkey=r.canonicalizeBtcPubkey;exports.deriveBip86ScriptPubKeyHex=r.deriveBip86ScriptPubKeyHex;exports.deriveNativeSegwitAddress=r.deriveNativeSegwitAddress;exports.deriveTaprootAddress=r.deriveTaprootAddress;exports.ensureHexPrefix=r.ensureHexPrefix;exports.formatSatoshisToBtc=r.formatSatoshisToBtc;exports.getNetwork=r.getNetwork;exports.getSortedXOnlyPubkeys=r.getSortedXOnlyPubkeys;exports.hexToUint8Array=r.hexToUint8Array;exports.isAddressFromPublicKey=r.isAddressFromPublicKey;exports.isValidHex=r.isValidHex;exports.processPublicKeyToXOnly=r.processPublicKeyToXOnly;exports.stripHexPrefix=r.stripHexPrefix;exports.toXOnly=r.toXOnly;exports.uint8ArrayToHex=r.uint8ArrayToHex;exports.validateWalletPubkey=r.validateWalletPubkey;exports.combineAbortSignals=h.combineAbortSignals;exports.calculateBtcTxHash=I.calculateBtcTxHash;exports.createTaprootScriptPathSignOptions=I.createTaprootScriptPathSignOptions;exports.BITCOIN_ADDRESS_RE=c.BITCOIN_ADDRESS_RE;exports.COMPRESSED_PUBKEY_HEX_LEN=c.COMPRESSED_PUBKEY_HEX_LEN;exports.HEX_RE=c.HEX_RE;exports.KNOWN_SCRIPT_PREFIXES=c.KNOWN_SCRIPT_PREFIXES;exports.MAX_REASONABLE_FEE_SATS=c.MAX_REASONABLE_FEE_SATS;exports.TXID_RE=c.TXID_RE;exports.X_ONLY_PUBKEY_HEX_LEN=c.X_ONLY_PUBKEY_HEX_LEN;exports.waitForTransactionReceiptSmartAware=F.waitForTransactionReceiptSmartAware;exports.PeginManager=A.PeginManager;exports.buildDepositTerms=A.buildDepositTerms;exports.computeWotsBlockPublicKeysHash=A.computeWotsBlockPublicKeysHash;exports.deriveWotsBlocksFromSeed=A.deriveWotsBlocksFromSeed;exports.ensurePrePeginTermsApproval=A.ensurePrePeginTermsApproval;exports.PayoutManager=d.PayoutManager;exports.computeHashlock=d.computeHashlock;exports.forwardDepositApproval=d.forwardDepositApproval;exports.requireChangeAddress=d.requireChangeAddress;exports.supportsDepositApproval=d.supportsDepositApproval;exports.validateSecretAgainstHashlock=d.validateSecretAgainstHashlock;exports.MEMPOOL_API_URLS=o.MEMPOOL_API_URLS;exports.getAddressTxs=o.getAddressTxs;exports.getAddressUtxos=o.getAddressUtxos;exports.getMempoolApiUrl=o.getMempoolApiUrl;exports.getNetworkFees=o.getNetworkFees;exports.getOutspend=o.getOutspend;exports.getTipHeight=o.getTipHeight;exports.getTxHex=o.getTxHex;exports.getTxInfo=o.getTxInfo;exports.getUtxoInfo=o.getUtxoInfo;exports.pushTx=o.pushTx;exports.OnChainBtcVaultStatus=p.OnChainBtcVaultStatus;exports.ViemOperationKeyReader=p.ViemOperationKeyReader;exports.ViemProtocolParamsReader=p.ViemProtocolParamsReader;exports.ViemUniversalChallengerReader=p.ViemUniversalChallengerReader;exports.ViemVaultKeeperReader=p.ViemVaultKeeperReader;exports.resolveProtocolAddresses=p.resolveProtocolAddresses;exports.assertOnChainBtcPubkey=v.assertOnChainBtcPubkey;exports.COMMISSION_BPS_HEADROOM=s.COMMISSION_BPS_HEADROOM;exports.MAX_ACCEPTABLE_COMMISSION_BPS_CAP=s.MAX_ACCEPTABLE_COMMISSION_BPS_CAP;exports.RegistrationLogsUnavailableError=s.RegistrationLogsUnavailableError;exports.ViemPeginRegistrationClient=s.ViemPeginRegistrationClient;exports.ViemVaultRegistryReader=s.ViemVaultRegistryReader;exports.capMaxAcceptableCommissionBps=s.capMaxAcceptableCommissionBps;exports.derivePeginVaultId=s.derivePeginVaultId;exports.isRegistrationLogsUnavailableError=s.isRegistrationLogsUnavailableError;exports.validateOffchainParams=s.validateOffchainParams;exports.validatePegInConfiguration=s.validatePegInConfiguration;exports.validateTBVProtocolParams=s.validateTBVProtocolParams;exports.ApplicationRegistryABI=C.ApplicationRegistryABI;exports.ProtocolParamsABI=C.ProtocolParamsABI;exports.BTCVaultRegistryABI=y.BTCVaultRegistryABI;exports.BTCVaultRegistryKeyEpochsABI=E.BTCVaultRegistryKeyEpochsABI;exports.CONTRACT_ERRORS=E.CONTRACT_ERRORS;exports.PEGIN_FINGERPRINT_CHANGED_SELECTOR=E.PEGIN_FINGERPRINT_CHANGED_SELECTOR;exports.PeginFingerprintChangedError=E.PeginFingerprintChangedError;exports.extractErrorData=E.extractErrorData;exports.getContractErrorMessage=E.getContractErrorMessage;exports.handleContractError=E.handleContractError;exports.isKnownContractError=E.isKnownContractError;exports.isPeginFingerprintChangedError=E.isPeginFingerprintChangedError;exports.VAULT_APP_NAME=_.VAULT_APP_NAME;exports.buildFundingOutpointsCommitment=_.buildFundingOutpointsCommitment;exports.buildVaultContext=_.buildVaultContext;exports.deriveVaultRoot=_.deriveVaultRoot;exports.forwardDeriveContextHash=_.forwardDeriveContextHash;exports.parseFundingOutpointsFromTx=_.parseFundingOutpointsFromTx;exports.BitcoinScriptType=u.BitcoinScriptType;exports.applyChangeOutputPolicy=u.applyChangeOutputPolicy;exports.computeChangeOutputFeeSats=u.computeChangeOutputFeeSats;exports.computeMaxDeposit=u.computeMaxDeposit;exports.computePeginBaseFeeSats=u.computePeginBaseFeeSats;exports.getDustThreshold=u.getDustThreshold;exports.getPsbtInputFields=u.getPsbtInputFields;exports.getScriptType=u.getScriptType;exports.selectUtxosForPegin=u.selectUtxosForPegin;exports.shouldAddChangeOutput=u.shouldAddChangeOutput;exports.BTC_DUST_SAT=i.BTC_DUST_SAT;exports.DUST_THRESHOLD=i.DUST_THRESHOLD;exports.LOW_RATE_ESTIMATION_ACCURACY_BUFFER=i.LOW_RATE_ESTIMATION_ACCURACY_BUFFER;exports.MAX_NON_LEGACY_OUTPUT_SIZE=i.MAX_NON_LEGACY_OUTPUT_SIZE;exports.MAX_REASONABLE_PEGIN_VBYTES=i.MAX_REASONABLE_PEGIN_VBYTES;exports.P2TR_INPUT_SIZE=i.P2TR_INPUT_SIZE;exports.PEGIN_AUTH_ANCHOR_OUTPUTS=i.PEGIN_AUTH_ANCHOR_OUTPUTS;exports.PEGIN_FIXED_OUTPUTS=i.PEGIN_FIXED_OUTPUTS;exports.SPLIT_TX_FEE_SAFETY_MULTIPLIER=i.SPLIT_TX_FEE_SAFETY_MULTIPLIER;exports.TX_BUFFER_SIZE_OVERHEAD=i.TX_BUFFER_SIZE_OVERHEAD;exports.WALLET_RELAY_FEE_RATE_THRESHOLD=i.WALLET_RELAY_FEE_RATE_THRESHOLD;exports.fundPeginTransaction=i.fundPeginTransaction;exports.parseUnfundedWasmTransaction=i.parseUnfundedWasmTransaction;exports.peginOutputCount=i.peginOutputCount;exports.rateBasedTxBufferFee=i.rateBasedTxBufferFee;exports.UtxoNotAvailableError=T.UtxoNotAvailableError;exports.assertUtxosAvailable=T.assertUtxosAvailable;exports.extractInputsFromTransaction=T.extractInputsFromTransaction;exports.findOverlappingPendingVaults=T.findOverlappingPendingVaults;exports.validateUtxosAvailable=T.validateUtxosAvailable;exports.VaultProviderRpcClient=m.VaultProviderRpcClient;exports.VpResponseValidationError=m.VpResponseValidationError;exports.batchPollByProvider=m.batchPollByProvider;exports.validateRequestDepositorClaimerArtifactsResponse=m.validateRequestDepositorClaimerArtifactsResponse;exports.AUTH_REJECTED_RPC_CODE=n.AUTH_REJECTED_RPC_CODE;exports.DaemonStatus=n.DaemonStatus;exports.JSON_RPC_ERROR_CODES=n.JSON_RPC_ERROR_CODES;exports.JsonRpcClient=n.JsonRpcClient;exports.JsonRpcError=n.JsonRpcError;exports.POST_WOTS_STATUSES=n.POST_WOTS_STATUSES;exports.PRE_DEPOSITOR_SIGNATURES_STATES=n.PRE_DEPOSITOR_SIGNATURES_STATES;exports.RpcErrorCode=n.RpcErrorCode;exports.VP_BATCH_MAX_SIZE=n.VP_BATCH_MAX_SIZE;exports.VP_TERMINAL_FAILURE_STATUSES=n.VP_TERMINAL_FAILURE_STATUSES;exports.VP_TRANSIENT_STATUSES=n.VP_TRANSIENT_STATUSES;exports.isAuthRejectedError=n.isAuthRejectedError;exports.ServerIdentityError=g.ServerIdentityError;exports.VpTokenRegistry=g.VpTokenRegistry;exports.createAuthenticatedVpClient=g.createAuthenticatedVpClient;exports.primeVpTokenRegistry=g.primeVpTokenRegistry;exports.verifyServerIdentity=g.verifyServerIdentity;exports.vpTokenRegistry=g.vpTokenRegistry;exports.DEPOSIT_TERMS_REJECTED_ERROR_NAME=t.DEPOSIT_TERMS_REJECTED_ERROR_NAME;exports.DepositTermsRejectedError=t.DepositTermsRejectedError;exports.PEGIN_FINGERPRINT_DOMAIN=t.PEGIN_FINGERPRINT_DOMAIN;exports.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE=t.PEGIN_FINGERPRINT_DOMAIN_PREIMAGE;exports.PeginFingerprintInputError=t.PeginFingerprintInputError;exports.PeginParamsAmbiguousError=t.PeginParamsAmbiguousError;exports.PeginParamsIncompleteSpaceError=t.PeginParamsIncompleteSpaceError;exports.PeginParamsNotFoundError=t.PeginParamsNotFoundError;exports.PeginSizingIntegrityError=t.PeginSizingIntegrityError;exports.UnanchoredPrePeginError=t.UnanchoredPrePeginError;exports.VaultRootMismatchError=t.VaultRootMismatchError;exports.buildPeginParamsCandidates=t.buildPeginParamsCandidates;exports.computePeginFingerprint=t.computePeginFingerprint;exports.deriveHashlocksFromPrePegin=t.deriveHashlocksFromPrePegin;exports.describePeginParamsCandidate=t.describePeginParamsCandidate;exports.describeUnresolvedVersion=t.describeUnresolvedVersion;exports.encodePeginFingerprintPreimage=t.encodePeginFingerprintPreimage;exports.isDepositTermsRejectedError=t.isDepositTermsRejectedError;exports.isPeginFingerprintInputError=t.isPeginFingerprintInputError;exports.isWotsMismatchError=t.isWotsMismatchError;exports.rebuildDepositTermsCore=t.rebuildDepositTermsCore;exports.reconstructPeginParams=t.reconstructPeginParams;exports.toRefundInputs=t.toRefundInputs;exports.ApplicationEntryPointMismatchError=e.ApplicationEntryPointMismatchError;exports.BIP68NotMatureError=e.BIP68NotMatureError;exports.ClaimerPegoutStatusValue=e.ClaimerPegoutStatusValue;exports.PEGIN_ETH_CONFIRMATIONS=e.PEGIN_ETH_CONFIRMATIONS;exports.ParticipantKeyDriftError=e.ParticipantKeyDriftError;exports.PeginRegistrationMissingError=e.PeginRegistrationMissingError;exports.PeginRegistrationNotFinalError=e.PeginRegistrationNotFinalError;exports.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR=e.RECLAIM_MAX_FEE_FRACTION_DENOMINATOR;exports.RECLAIM_MAX_FEE_FRACTION_NUMERATOR=e.RECLAIM_MAX_FEE_FRACTION_NUMERATOR;exports.RECLAIM_MAX_FEE_RATE_SATS_VB=e.RECLAIM_MAX_FEE_RATE_SATS_VB;exports.RECLAIM_WARN_FEE_FRACTION_NUMERATOR=e.RECLAIM_WARN_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_FRACTION_DENOMINATOR=e.REFUND_MAX_FEE_FRACTION_DENOMINATOR;exports.REFUND_MAX_FEE_FRACTION_NUMERATOR=e.REFUND_MAX_FEE_FRACTION_NUMERATOR;exports.REFUND_MAX_FEE_RATE_SATS_VB=e.REFUND_MAX_FEE_RATE_SATS_VB;exports.REFUND_VSIZE=e.REFUND_VSIZE;exports.ReclaimUneconomicalError=e.ReclaimUneconomicalError;exports.RegisteredVaultVersionMismatchError=e.RegisteredVaultVersionMismatchError;exports.activateVault=e.activateVault;exports.activateVaultAndRedeem=e.activateVaultAndRedeem;exports.assertVaultProviderHintAccepted=e.assertVaultProviderHintAccepted;exports.buildAndBroadcastReclaim=e.buildAndBroadcastReclaim;exports.buildAndBroadcastRefund=e.buildAndBroadcastRefund;exports.estimateRefundFeeSats=e.estimateRefundFeeSats;exports.isApplicationEntryPointMismatchError=e.isApplicationEntryPointMismatchError;exports.isDepositAmountValid=e.isDepositAmountValid;exports.isHintAccepted=e.isHintAccepted;exports.isParticipantKeyDriftError=e.isParticipantKeyDriftError;exports.isPeginRegistrationMissingError=e.isPeginRegistrationMissingError;exports.isPeginRegistrationNotFinalError=e.isPeginRegistrationNotFinalError;exports.isPegoutTerminalStatus=e.isPegoutTerminalStatus;exports.isRecognizedPegoutStatus=e.isRecognizedPegoutStatus;exports.isRegisteredVaultVersionMismatchError=e.isRegisteredVaultVersionMismatchError;exports.matchKeyHint=e.matchKeyHint;exports.matchKeySetHint=e.matchKeySetHint;exports.resolveCurrentParticipantKeys=e.resolveCurrentParticipantKeys;exports.resolveParticipantKeysAtEpochs=e.resolveParticipantKeysAtEpochs;exports.runDepositorPresignFlow=e.runDepositorPresignFlow;exports.signDepositorGraph=e.signDepositorGraph;exports.submitWotsPublicKey=e.submitWotsPublicKey;exports.validateDepositAmount=e.validateDepositAmount;exports.validateMultiVaultDepositInputs=e.validateMultiVaultDepositInputs;exports.validateOnChainParticipantKeys=e.validateOnChainParticipantKeys;exports.validateProviderSelection=e.validateProviderSelection;exports.validateRemainingCapacity=e.validateRemainingCapacity;exports.validateVaultAmounts=e.validateVaultAmounts;exports.validateVaultProviderPubkey=e.validateVaultProviderPubkey;exports.verifyRegisteredParticipantKeys=e.verifyRegisteredParticipantKeys;exports.verifyRegisteredVaultVersions=e.verifyRegisteredVaultVersions;exports.waitForPeginRegistrationDepth=e.waitForPeginRegistrationDepth;exports.waitForPeginStatus=e.waitForPeginStatus;exports.ContractStatus=S.ContractStatus;exports.PeginAction=S.PeginAction;exports.canPerformAction=S.canPerformAction;exports.getPeginProtocolState=S.getPeginProtocolState;exports.isActivationDeadlinePassedOnChain=S.isActivationDeadlinePassedOnChain;
2
2
  //# sourceMappingURL=index.cjs.map