@babylonlabs-io/ts-sdk 0.34.0 → 0.35.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 (75) hide show
  1. package/dist/{PayoutManager-DDnNB0mj.cjs → PayoutManager-BhJoQZsG.cjs} +2 -2
  2. package/dist/PayoutManager-BhJoQZsG.cjs.map +1 -0
  3. package/dist/{PayoutManager-C9XHKZ5j.js → PayoutManager-s_uH8Uuj.js} +2 -2
  4. package/dist/PayoutManager-s_uH8Uuj.js.map +1 -0
  5. package/dist/PeginManager-DF1oinIQ.js +1172 -0
  6. package/dist/PeginManager-DF1oinIQ.js.map +1 -0
  7. package/dist/PeginManager-cPQuJTB9.cjs +2 -0
  8. package/dist/PeginManager-cPQuJTB9.cjs.map +1 -0
  9. package/dist/{buildAndBroadcastRefund-C7hnNWbj.cjs → buildAndBroadcastRefund-BQ0CaL6Q.cjs} +2 -2
  10. package/dist/{buildAndBroadcastRefund-C7hnNWbj.cjs.map → buildAndBroadcastRefund-BQ0CaL6Q.cjs.map} +1 -1
  11. package/dist/{buildAndBroadcastRefund-B6fGRmvo.js → buildAndBroadcastRefund-DzX11N9S.js} +2 -2
  12. package/dist/{buildAndBroadcastRefund-B6fGRmvo.js.map → buildAndBroadcastRefund-DzX11N9S.js.map} +1 -1
  13. package/dist/index.cjs +1 -1
  14. package/dist/index.js +124 -123
  15. package/dist/sha2-BYVxyZzX.js +274 -0
  16. package/dist/{sha2-6wN58S6R.js.map → sha2-BYVxyZzX.js.map} +1 -1
  17. package/dist/sha2-DsrLC4NM.cjs +2 -0
  18. package/dist/{sha2-CsTynrfJ.cjs.map → sha2-DsrLC4NM.cjs.map} +1 -1
  19. package/dist/tbv/core/clients/index.cjs +1 -1
  20. package/dist/tbv/core/clients/index.js +1 -1
  21. package/dist/tbv/core/index.cjs +1 -1
  22. package/dist/tbv/core/index.js +134 -133
  23. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  24. package/dist/tbv/core/managers/index.cjs +1 -1
  25. package/dist/tbv/core/managers/index.js +2 -2
  26. package/dist/tbv/core/services/index.cjs +1 -1
  27. package/dist/tbv/core/services/index.js +2 -2
  28. package/dist/tbv/core/utils/eth/__tests__/waitForTransactionReceiptSmartAware.test.d.ts +2 -0
  29. package/dist/tbv/core/utils/eth/__tests__/waitForTransactionReceiptSmartAware.test.d.ts.map +1 -0
  30. package/dist/tbv/core/utils/eth/index.d.ts +2 -0
  31. package/dist/tbv/core/utils/eth/index.d.ts.map +1 -0
  32. package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts +18 -0
  33. package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts.map +1 -0
  34. package/dist/tbv/core/utils/index.cjs +1 -1
  35. package/dist/tbv/core/utils/index.d.ts +1 -0
  36. package/dist/tbv/core/utils/index.d.ts.map +1 -1
  37. package/dist/tbv/core/utils/index.js +14 -13
  38. package/dist/tbv/core/vault-secrets/__tests__/deriveVaultRoot.test.d.ts +1 -1
  39. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts +4 -6
  40. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts.map +1 -1
  41. package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts +1 -1
  42. package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts.map +1 -1
  43. package/dist/tbv/core/vault-secrets/index.d.ts +1 -1
  44. package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
  45. package/dist/tbv/index.cjs +1 -1
  46. package/dist/tbv/index.js +134 -133
  47. package/dist/testing/index.cjs +1 -1
  48. package/dist/testing/index.js +1 -1
  49. package/dist/{vault-registry-reader-CqhD3Iyd.js → vault-registry-reader-BBk0p-u-.js} +2 -2
  50. package/dist/{vault-registry-reader-CqhD3Iyd.js.map → vault-registry-reader-BBk0p-u-.js.map} +1 -1
  51. package/dist/{vault-registry-reader-Brkh1j7p.cjs → vault-registry-reader-DQgnZilV.cjs} +2 -2
  52. package/dist/{vault-registry-reader-Brkh1j7p.cjs.map → vault-registry-reader-DQgnZilV.cjs.map} +1 -1
  53. package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js +217 -0
  54. package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js.map +1 -0
  55. package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs +2 -0
  56. package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs.map +1 -0
  57. package/package.json +1 -2
  58. package/dist/PayoutManager-C9XHKZ5j.js.map +0 -1
  59. package/dist/PayoutManager-DDnNB0mj.cjs.map +0 -1
  60. package/dist/PeginManager-C8-I4gFH.js +0 -1280
  61. package/dist/PeginManager-C8-I4gFH.js.map +0 -1
  62. package/dist/PeginManager-D0TW9RET.cjs +0 -2
  63. package/dist/PeginManager-D0TW9RET.cjs.map +0 -1
  64. package/dist/psbtInputFields-2224j2ZY.js +0 -128
  65. package/dist/psbtInputFields-2224j2ZY.js.map +0 -1
  66. package/dist/psbtInputFields-B1lrwYzH.cjs +0 -2
  67. package/dist/psbtInputFields-B1lrwYzH.cjs.map +0 -1
  68. package/dist/sha2-6wN58S6R.js +0 -280
  69. package/dist/sha2-CsTynrfJ.cjs +0 -2
  70. package/dist/tbv/core/vault-secrets/__tests__/info.test.d.ts +0 -8
  71. package/dist/tbv/core/vault-secrets/__tests__/info.test.d.ts.map +0 -1
  72. package/dist/tbv/core/vault-secrets/expand.d.ts +0 -58
  73. package/dist/tbv/core/vault-secrets/expand.d.ts.map +0 -1
  74. package/dist/tbv/core/vault-secrets/info.d.ts +0 -55
  75. package/dist/tbv/core/vault-secrets/info.d.ts.map +0 -1
package/dist/tbv/index.js CHANGED
@@ -1,171 +1,172 @@
1
- import { a as e, b as t, c as r } from "../challengeAssert-BzxQmdZy.js";
2
- import { computeMinClaimValue as i, deriveVaultId as n } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
- import { c as u, a as d, b as P, e as p, f as c } from "../peginInput-C2QPvuhR.js";
4
- import { a as S, b as E } from "../noPayout-DBX6G96_.js";
5
- import { a as g, b as R, c as m, e as _ } from "../payout-BNFMBXS6.js";
6
- import { d as f, a as b, e as I, f as v, g as C, h as U, i as V, b as O, p as h, s as y, t as F, u as N, v as B } from "../bitcoin-B0S8SHCX.js";
7
- import { c as M } from "../signing-DaLvGwQe.js";
8
- import { B as L, H as k, K as W, M as X, T as K } from "../validation-CxqROCno.js";
9
- import { P as G, V as Y, f as Z, g as J, c as j, h as z, d as q, e as Q, a as $, b as aa } from "../PeginManager-C8-I4gFH.js";
10
- import { P as ea, c as ta, v as ra } from "../PayoutManager-C9XHKZ5j.js";
1
+ import { a as s, b as t, c as r } from "../challengeAssert-BzxQmdZy.js";
2
+ import { computeMinClaimValue as i, deriveVaultId as n, expandAuthAnchor as l, expandHashlockSecret as u, expandWotsSeed as d } from "@babylonlabs-io/babylon-tbv-rust-wasm";
3
+ import { c as P, a as c, b as T, e as S, f as A } from "../peginInput-C2QPvuhR.js";
4
+ import { a as R, b as g } from "../noPayout-DBX6G96_.js";
5
+ import { a as _, b as x, c as f, e as b } from "../payout-BNFMBXS6.js";
6
+ import { d as v, a as C, e as U, f as V, g as O, h as F, i as y, b as h, p as N, s as B, t as D, u as M, v as H } from "../bitcoin-B0S8SHCX.js";
7
+ import { c as k } from "../signing-DaLvGwQe.js";
8
+ import { B as X, H as w, K, M as G, T as Y } from "../validation-CxqROCno.js";
9
+ import { P as J, V as j, b as z, a as q, c as Q, e as $, d as aa } from "../PeginManager-DF1oinIQ.js";
10
+ import { P as sa, c as ta, v as ra } from "../PayoutManager-s_uH8Uuj.js";
11
11
  import { A as ia, P as na } from "../ProtocolParams.abi-DXu8L0Fn.js";
12
12
  import { B as ua } from "../BTCVaultRegistry.abi-DbJ5lsFJ.js";
13
- import { C as Pa, e as pa, g as ca, h as Ta, i as Sa } from "../errors-CznAK5NB.js";
14
- import { B as Aa, D as ga, F as Ra, L as ma, M as _a, P as xa, b as fa, a as ba, S as Ia, T as va, W as Ca, f as Ua, c as Va, p as Oa, r as ha } from "../fundPeginTransaction-oV-dNJOU.js";
15
- import { U as Fa, a as Na, c as Ba, e as Da, s as Ma, v as Ha } from "../reservation-CHUGW0F_.js";
16
- import { B as ka, c as Wa, g as Xa, d as Ka, b as wa, s as Ga, a as Ya } from "../psbtInputFields-2224j2ZY.js";
17
- import { M as Ja, g as ja, a as za, b as qa, c as Qa, d as $a, e as as, f as ss, p as es } from "../mempoolApi-CAIge7Nj.js";
18
- import { S as rs, V as os, j as is, k as ns, l as ls, m as us, a as ds, d as Ps, b as ps, f as cs, p as Ts, r as Ss, g as Es, h as As, v as gs, i as Rs, c as ms, e as _s } from "../vault-registry-reader-CqhD3Iyd.js";
19
- import { D as fs, b as bs, J as Is, a as vs, d as Cs, P as Us, R as Vs, e as Os, c as hs, V as ys } from "../types-TiIjyo2b.js";
20
- import { i as Ns, p as Bs } from "../errors-9AkghWyk.js";
21
- import { B as Ms, C as Hs, R as Ls, a as ks, k as Ws, l as Xs, i as Ks, j as ws, h as Gs, r as Ys, b as Zs, s as Js, v as js, g as zs, d as qs, c as Qs, e as $s, f as ae, w as se } from "../buildAndBroadcastRefund-B6fGRmvo.js";
22
- import { C as te, P as re, c as oe, g as ie } from "../peginState-CBAlxgXk.js";
13
+ import { C as pa, e as Pa, g as ca, h as Ta, i as Sa } from "../errors-CznAK5NB.js";
14
+ import { B as Ea, D as Ra, F as ga, L as ma, M as _a, P as xa, b as fa, a as ba, S as Ia, T as va, W as Ca, f as Ua, c as Va, p as Oa, r as Fa } from "../fundPeginTransaction-oV-dNJOU.js";
15
+ import { U as ha, a as Na, c as Ba, e as Da, s as Ma, v as Ha } from "../reservation-CHUGW0F_.js";
16
+ import { B as ka, c as Wa, g as Xa, d as wa, b as Ka, s as Ga, a as Ya, w as Za } from "../waitForTransactionReceiptSmartAware-Cj_DKm0G.js";
17
+ import { M as ja, g as za, a as qa, b as Qa, c as $a, d as ae, e as ee, f as se, p as te } from "../mempoolApi-CAIge7Nj.js";
18
+ import { S as oe, V as ie, j as ne, k as le, l as ue, m as de, a as pe, d as Pe, b as ce, f as Te, p as Se, r as Ae, g as Ee, h as Re, v as ge, i as me, c as _e, e as xe } from "../vault-registry-reader-BBk0p-u-.js";
19
+ import { D as be, b as Ie, J as ve, a as Ce, d as Ue, P as Ve, R as Oe, e as Fe, c as ye, V as he } from "../types-TiIjyo2b.js";
20
+ import { i as Be, p as De } from "../errors-9AkghWyk.js";
21
+ import { B as He, C as Le, R as ke, a as We, k as Xe, l as we, i as Ke, j as Ge, h as Ye, r as Ze, b as Je, s as je, v as ze, g as qe, d as Qe, c as $e, e as as, f as es, w as ss } from "../buildAndBroadcastRefund-DzX11N9S.js";
22
+ import { C as rs, P as os, c as is, g as ns } from "../peginState-CBAlxgXk.js";
23
23
  export {
24
24
  ia as ApplicationRegistryABI,
25
- Ms as BIP68NotMatureError,
26
- L as BITCOIN_ADDRESS_RE,
25
+ He as BIP68NotMatureError,
26
+ X as BITCOIN_ADDRESS_RE,
27
27
  ua as BTCVaultRegistryABI,
28
- Aa as BTC_DUST_SAT,
28
+ Ea as BTC_DUST_SAT,
29
29
  ka as BitcoinScriptType,
30
- Pa as CONTRACT_ERRORS,
31
- Hs as ClaimerPegoutStatusValue,
32
- te as ContractStatus,
33
- ga as DUST_THRESHOLD,
34
- fs as DaemonStatus,
35
- Ra as FEE_SAFETY_MARGIN,
36
- k as HEX_RE,
37
- bs as JSON_RPC_ERROR_CODES,
38
- Is as JsonRpcClient,
39
- vs as JsonRpcError,
40
- W as KNOWN_SCRIPT_PREFIXES,
30
+ pa as CONTRACT_ERRORS,
31
+ Le as ClaimerPegoutStatusValue,
32
+ rs as ContractStatus,
33
+ Ra as DUST_THRESHOLD,
34
+ be as DaemonStatus,
35
+ ga as FEE_SAFETY_MARGIN,
36
+ w as HEX_RE,
37
+ Ie as JSON_RPC_ERROR_CODES,
38
+ ve as JsonRpcClient,
39
+ Ce as JsonRpcError,
40
+ K as KNOWN_SCRIPT_PREFIXES,
41
41
  ma as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
42
42
  _a as MAX_NON_LEGACY_OUTPUT_SIZE,
43
- X as MAX_REASONABLE_FEE_SATS,
44
- Ja as MEMPOOL_API_URLS,
43
+ G as MAX_REASONABLE_FEE_SATS,
44
+ ja as MEMPOOL_API_URLS,
45
45
  xa as P2TR_INPUT_SIZE,
46
46
  fa as PEGIN_AUTH_ANCHOR_OUTPUTS,
47
47
  ba as PEGIN_FIXED_OUTPUTS,
48
- Cs as POST_WOTS_STATUSES,
49
- Us as PRE_DEPOSITOR_SIGNATURES_STATES,
50
- ea as PayoutManager,
51
- re as PeginAction,
52
- G as PeginManager,
48
+ Ue as POST_WOTS_STATUSES,
49
+ Ve as PRE_DEPOSITOR_SIGNATURES_STATES,
50
+ sa as PayoutManager,
51
+ os as PeginAction,
52
+ J as PeginManager,
53
53
  na as ProtocolParamsABI,
54
- Ls as REFUND_VSIZE,
55
- Vs as RpcErrorCode,
54
+ ke as REFUND_VSIZE,
55
+ Oe as RpcErrorCode,
56
56
  Ia as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
57
- rs as ServerIdentityError,
58
- K as TXID_RE,
57
+ oe as ServerIdentityError,
58
+ Y as TXID_RE,
59
59
  va as TX_BUFFER_SIZE_OVERHEAD,
60
- Fa as UtxoNotAvailableError,
61
- Y as VAULT_APP_NAME,
62
- Os as VP_BATCH_MAX_SIZE,
63
- hs as VP_TERMINAL_STATUSES,
64
- ys as VP_TRANSIENT_STATUSES,
65
- os as VaultProviderRpcClient,
66
- is as ViemProtocolParamsReader,
67
- ns as ViemUniversalChallengerReader,
68
- ls as ViemVaultKeeperReader,
69
- us as ViemVaultRegistryReader,
70
- ds as VpResponseValidationError,
71
- Ps as VpTokenRegistry,
60
+ ha as UtxoNotAvailableError,
61
+ j as VAULT_APP_NAME,
62
+ Fe as VP_BATCH_MAX_SIZE,
63
+ ye as VP_TERMINAL_STATUSES,
64
+ he as VP_TRANSIENT_STATUSES,
65
+ ie as VaultProviderRpcClient,
66
+ ne as ViemProtocolParamsReader,
67
+ le as ViemUniversalChallengerReader,
68
+ ue as ViemVaultKeeperReader,
69
+ de as ViemVaultRegistryReader,
70
+ pe as VpResponseValidationError,
71
+ Pe as VpTokenRegistry,
72
72
  Ca as WALLET_RELAY_FEE_RATE_THRESHOLD,
73
- ks as activateVault,
74
- g as assertPayoutOutputMatchesRegistered,
73
+ We as activateVault,
74
+ _ as assertPayoutOutputMatchesRegistered,
75
75
  Na as assertUtxosAvailable,
76
- ps as batchPollByProvider,
77
- Ws as buildAndBroadcastRefund,
78
- e as buildChallengeAssertPsbt,
76
+ ce as batchPollByProvider,
77
+ Xe as buildAndBroadcastRefund,
78
+ s as buildChallengeAssertPsbt,
79
79
  t as buildDepositorPayoutPsbt,
80
- Z as buildFundingOutpointsCommitment,
81
- S as buildNoPayoutPsbt,
82
- R as buildPayoutPsbt,
83
- u as buildPeginInputPsbt,
84
- d as buildPeginTxFromFundedPrePegin,
85
- P as buildPrePeginPsbt,
86
- E as buildRefundPsbt,
87
- J as buildVaultContext,
80
+ z as buildFundingOutpointsCommitment,
81
+ R as buildNoPayoutPsbt,
82
+ x as buildPayoutPsbt,
83
+ P as buildPeginInputPsbt,
84
+ c as buildPeginTxFromFundedPrePegin,
85
+ T as buildPrePeginPsbt,
86
+ g as buildRefundPsbt,
87
+ q as buildVaultContext,
88
88
  Wa as calculateBtcTxHash,
89
- oe as canPerformAction,
89
+ is as canPerformAction,
90
90
  Ba as collectReservedUtxoRefs,
91
91
  ta as computeHashlock,
92
92
  i as computeMinClaimValue,
93
93
  r as computeNumLocalChallengers,
94
- j as computeWotsBlockPublicKeysHash,
95
- cs as createAuthenticatedVpClient,
96
- m as createPayoutScript,
97
- M as createTaprootScriptPathSignOptions,
98
- f as deriveNativeSegwitAddress,
99
- b as deriveTaprootAddress,
94
+ Q as computeWotsBlockPublicKeysHash,
95
+ Te as createAuthenticatedVpClient,
96
+ f as createPayoutScript,
97
+ k as createTaprootScriptPathSignOptions,
98
+ v as deriveNativeSegwitAddress,
99
+ C as deriveTaprootAddress,
100
100
  n as deriveVaultId,
101
- z as deriveVaultRoot,
102
- q as deriveWotsBlocksFromSeed,
103
- I as ensureHexPrefix,
104
- Xs as estimateRefundFeeSats,
105
- Q as expandAuthAnchor,
106
- $ as expandHashlockSecret,
107
- aa as expandWotsSeed,
108
- pa as extractErrorData,
101
+ $ as deriveVaultRoot,
102
+ aa as deriveWotsBlocksFromSeed,
103
+ U as ensureHexPrefix,
104
+ we as estimateRefundFeeSats,
105
+ l as expandAuthAnchor,
106
+ u as expandHashlockSecret,
107
+ d as expandWotsSeed,
108
+ Pa as extractErrorData,
109
109
  Da as extractInputsFromTransaction,
110
- _ as extractPayoutSignature,
111
- p as extractPeginInputSignature,
112
- c as finalizePeginInputPsbt,
113
- v as formatSatoshisToBtc,
110
+ b as extractPayoutSignature,
111
+ S as extractPeginInputSignature,
112
+ A as finalizePeginInputPsbt,
113
+ V as formatSatoshisToBtc,
114
114
  Ua as fundPeginTransaction,
115
- ja as getAddressTxs,
116
- za as getAddressUtxos,
115
+ za as getAddressTxs,
116
+ qa as getAddressUtxos,
117
117
  ca as getContractErrorMessage,
118
118
  Xa as getDustThreshold,
119
- qa as getMempoolApiUrl,
120
- C as getNetwork,
121
- Qa as getNetworkFees,
122
- ie as getPeginProtocolState,
123
- Ka as getPsbtInputFields,
124
- wa as getScriptType,
125
- $a as getTxHex,
126
- as as getTxInfo,
127
- ss as getUtxoInfo,
119
+ Qa as getMempoolApiUrl,
120
+ O as getNetwork,
121
+ $a as getNetworkFees,
122
+ ns as getPeginProtocolState,
123
+ wa as getPsbtInputFields,
124
+ Ka as getScriptType,
125
+ ae as getTxHex,
126
+ ee as getTxInfo,
127
+ se as getUtxoInfo,
128
128
  Ta as handleContractError,
129
- U as hexToUint8Array,
130
- V as isAddressFromPublicKey,
131
- Ks as isDepositAmountValid,
129
+ F as hexToUint8Array,
130
+ y as isAddressFromPublicKey,
131
+ Ke as isDepositAmountValid,
132
132
  Sa as isKnownContractError,
133
- ws as isPegoutTerminalStatus,
134
- Gs as isRecognizedPegoutStatus,
135
- O as isValidHex,
136
- Ns as isWotsMismatchError,
137
- Bs as parseFundingOutpointsFromTx,
133
+ Ge as isPegoutTerminalStatus,
134
+ Ye as isRecognizedPegoutStatus,
135
+ h as isValidHex,
136
+ Be as isWotsMismatchError,
137
+ De as parseFundingOutpointsFromTx,
138
138
  Va as parseUnfundedWasmTransaction,
139
139
  Oa as peginOutputCount,
140
- Ts as primeVpTokenRegistry,
141
- h as processPublicKeyToXOnly,
142
- es as pushTx,
143
- ha as rateBasedTxBufferFee,
144
- Ss as resolveProtocolAddresses,
145
- Ys as runDepositorPresignFlow,
140
+ Se as primeVpTokenRegistry,
141
+ N as processPublicKeyToXOnly,
142
+ te as pushTx,
143
+ Fa as rateBasedTxBufferFee,
144
+ Ae as resolveProtocolAddresses,
145
+ Ze as runDepositorPresignFlow,
146
146
  Ma as selectUtxosForDeposit,
147
147
  Ga as selectUtxosForPegin,
148
148
  Ya as shouldAddChangeOutput,
149
- Zs as signDepositorGraph,
150
- y as stripHexPrefix,
151
- Js as submitWotsPublicKey,
152
- F as toXOnly,
153
- N as uint8ArrayToHex,
154
- js as validateDepositAmount,
155
- zs as validateMultiVaultDepositInputs,
156
- Es as validateOffchainParams,
157
- As as validatePegInConfiguration,
158
- qs as validateProviderSelection,
159
- Qs as validateRemainingCapacity,
160
- gs as validateRequestDepositorClaimerArtifactsResponse,
149
+ Je as signDepositorGraph,
150
+ B as stripHexPrefix,
151
+ je as submitWotsPublicKey,
152
+ D as toXOnly,
153
+ M as uint8ArrayToHex,
154
+ ze as validateDepositAmount,
155
+ qe as validateMultiVaultDepositInputs,
156
+ Ee as validateOffchainParams,
157
+ Re as validatePegInConfiguration,
158
+ Qe as validateProviderSelection,
159
+ $e as validateRemainingCapacity,
160
+ ge as validateRequestDepositorClaimerArtifactsResponse,
161
161
  ra as validateSecretAgainstHashlock,
162
- Rs as validateTBVProtocolParams,
162
+ me as validateTBVProtocolParams,
163
163
  Ha as validateUtxosAvailable,
164
- $s as validateVaultAmounts,
165
- ae as validateVaultProviderPubkey,
166
- B as validateWalletPubkey,
167
- ms as verifyServerIdentity,
168
- _s as vpTokenRegistry,
169
- se as waitForPeginStatus
164
+ as as validateVaultAmounts,
165
+ es as validateVaultProviderPubkey,
166
+ H as validateWalletPubkey,
167
+ _e as verifyServerIdentity,
168
+ xe as vpTokenRegistry,
169
+ ss as waitForPeginStatus,
170
+ Za as waitForTransactionReceiptSmartAware
170
171
  };
171
172
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- "use strict";var d=Object.defineProperty;var l=(i,t,e)=>t in i?d(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>l(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../sha2-CsTynrfJ.cjs"),o=require("buffer"),g=require("../bitcoin-B3aqjuMP.cjs"),q=require("../shared/index.cjs"),f=async(i,t)=>{const e=new TextEncoder,n=e.encode(i),s=e.encode(t),a=new Uint8Array(4+n.length+4+s.length),c=new DataView(a.buffer);return c.setUint32(0,n.length),a.set(n,4),c.setUint32(4+n.length,s.length),a.set(s,4+n.length+4),g.uint8ArrayToHex(u.sha256(a))},h={publicKeyHex:"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",address:"tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx6jks",network:q.BitcoinNetworks.SIGNET,shouldFailSigning:!1,deriveContextHash:f};class b{constructor(t={}){r(this,"config");this.config={...h,...t.publicKeyHex?{publicKeyHex:t.publicKeyHex}:{},...t.address?{address:t.address}:{},...t.network!==void 0?{network:t.network}:{},...t.shouldFailSigning!==void 0?{shouldFailSigning:t.shouldFailSigning}:{},...t.deriveContextHash?{deriveContextHash:t.deriveContextHash}:{}}}async getPublicKeyHex(){return this.config.publicKeyHex}async getAddress(){return this.config.address}async signPsbt(t){if(this.config.shouldFailSigning)throw new Error("Mock signing failed");if(!t||t.length===0)throw new Error("Invalid PSBT: empty hex string");return t+"deadbeef"}async signPsbts(t,e){const n=[];for(const s of t){const a=await this.signPsbt(s);n.push(a)}return n}async signMessage(t,e){if(this.config.shouldFailSigning)throw new Error("Mock signing failed");if(!t||t.length===0)throw new Error("Invalid message: empty string");return o.Buffer.from(`mock-signature-${e}-${t}-${this.config.publicKeyHex}`).toString("base64")}async getNetwork(){return this.config.network}async deriveContextHash(t,e){return this.config.deriveContextHash(t,e)}updateConfig(t){this.config={...this.config,...t}}reset(){this.config={...h}}}class y{constructor(t={}){r(this,"account");r(this,"chain");r(this,"shouldFailOperations");r(this,"transactionDelay");r(this,"nonce",0);this.account={address:t.address||"0x742d35cc6634c0532925a3b844bc9e7595f0beb0"},this.chain={id:t.chainId??11155111},this.shouldFailOperations=t.shouldFailOperations??!1,this.transactionDelay=t.transactionDelay??0,this.signMessage=this.signMessage.bind(this),this.sendTransaction=this.sendTransaction.bind(this)}async signMessage(t){const e=t.message,n=t.account||this.account.address;if(this.shouldFailOperations)throw new Error("Mock signing failed");if(!e||e.length===0)throw new Error("Invalid message: empty string");const s=`personal_sign:${e}-${n}-${this.chain.id}`;return`0x${o.Buffer.from(s).toString("hex").slice(0,130).padEnd(130,"0")}`}async sendTransaction(t){var s;if(this.shouldFailOperations)throw new Error("Mock transaction failed");if(!t.to)throw new Error("Invalid transaction: missing 'to' address");this.transactionDelay>0&&await new Promise(a=>setTimeout(a,this.transactionDelay)),this.nonce++;const e=JSON.stringify({from:this.account.address,to:t.to,value:((s=t.value)==null?void 0:s.toString())||"0",nonce:this.nonce,chainId:this.chain.id});return`0x${o.Buffer.from(e).toString("hex").slice(0,64).padEnd(64,"0")}`}updateConfig(t){t.address!==void 0&&(this.account.address=t.address),t.chainId!==void 0&&(this.chain.id=t.chainId),t.shouldFailOperations!==void 0&&(this.shouldFailOperations=t.shouldFailOperations),t.transactionDelay!==void 0&&(this.transactionDelay=t.transactionDelay)}reset(){this.account.address="0x742d35cc6634c0532925a3b844bc9e7595f0beb0",this.chain.id=11155111,this.shouldFailOperations=!1,this.transactionDelay=0,this.nonce=0}getCurrentNonce(){return this.nonce}}exports.MockBitcoinWallet=b;exports.MockEthereumWallet=y;
1
+ "use strict";var d=Object.defineProperty;var l=(i,t,e)=>t in i?d(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e;var r=(i,t,e)=>l(i,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../sha2-DsrLC4NM.cjs"),o=require("buffer"),g=require("../bitcoin-B3aqjuMP.cjs"),q=require("../shared/index.cjs"),f=async(i,t)=>{const e=new TextEncoder,n=e.encode(i),s=e.encode(t),a=new Uint8Array(4+n.length+4+s.length),c=new DataView(a.buffer);return c.setUint32(0,n.length),a.set(n,4),c.setUint32(4+n.length,s.length),a.set(s,4+n.length+4),g.uint8ArrayToHex(u.sha256(a))},h={publicKeyHex:"a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5b6c7d8e9f0a1b2",address:"tb1pqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkx6jks",network:q.BitcoinNetworks.SIGNET,shouldFailSigning:!1,deriveContextHash:f};class b{constructor(t={}){r(this,"config");this.config={...h,...t.publicKeyHex?{publicKeyHex:t.publicKeyHex}:{},...t.address?{address:t.address}:{},...t.network!==void 0?{network:t.network}:{},...t.shouldFailSigning!==void 0?{shouldFailSigning:t.shouldFailSigning}:{},...t.deriveContextHash?{deriveContextHash:t.deriveContextHash}:{}}}async getPublicKeyHex(){return this.config.publicKeyHex}async getAddress(){return this.config.address}async signPsbt(t){if(this.config.shouldFailSigning)throw new Error("Mock signing failed");if(!t||t.length===0)throw new Error("Invalid PSBT: empty hex string");return t+"deadbeef"}async signPsbts(t,e){const n=[];for(const s of t){const a=await this.signPsbt(s);n.push(a)}return n}async signMessage(t,e){if(this.config.shouldFailSigning)throw new Error("Mock signing failed");if(!t||t.length===0)throw new Error("Invalid message: empty string");return o.Buffer.from(`mock-signature-${e}-${t}-${this.config.publicKeyHex}`).toString("base64")}async getNetwork(){return this.config.network}async deriveContextHash(t,e){return this.config.deriveContextHash(t,e)}updateConfig(t){this.config={...this.config,...t}}reset(){this.config={...h}}}class y{constructor(t={}){r(this,"account");r(this,"chain");r(this,"shouldFailOperations");r(this,"transactionDelay");r(this,"nonce",0);this.account={address:t.address||"0x742d35cc6634c0532925a3b844bc9e7595f0beb0"},this.chain={id:t.chainId??11155111},this.shouldFailOperations=t.shouldFailOperations??!1,this.transactionDelay=t.transactionDelay??0,this.signMessage=this.signMessage.bind(this),this.sendTransaction=this.sendTransaction.bind(this)}async signMessage(t){const e=t.message,n=t.account||this.account.address;if(this.shouldFailOperations)throw new Error("Mock signing failed");if(!e||e.length===0)throw new Error("Invalid message: empty string");const s=`personal_sign:${e}-${n}-${this.chain.id}`;return`0x${o.Buffer.from(s).toString("hex").slice(0,130).padEnd(130,"0")}`}async sendTransaction(t){var s;if(this.shouldFailOperations)throw new Error("Mock transaction failed");if(!t.to)throw new Error("Invalid transaction: missing 'to' address");this.transactionDelay>0&&await new Promise(a=>setTimeout(a,this.transactionDelay)),this.nonce++;const e=JSON.stringify({from:this.account.address,to:t.to,value:((s=t.value)==null?void 0:s.toString())||"0",nonce:this.nonce,chainId:this.chain.id});return`0x${o.Buffer.from(e).toString("hex").slice(0,64).padEnd(64,"0")}`}updateConfig(t){t.address!==void 0&&(this.account.address=t.address),t.chainId!==void 0&&(this.chain.id=t.chainId),t.shouldFailOperations!==void 0&&(this.shouldFailOperations=t.shouldFailOperations),t.transactionDelay!==void 0&&(this.transactionDelay=t.transactionDelay)}reset(){this.account.address="0x742d35cc6634c0532925a3b844bc9e7595f0beb0",this.chain.id=11155111,this.shouldFailOperations=!1,this.transactionDelay=0,this.nonce=0}getCurrentNonce(){return this.nonce}}exports.MockBitcoinWallet=b;exports.MockEthereumWallet=y;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1,7 +1,7 @@
1
1
  var d = Object.defineProperty;
2
2
  var l = (e, t, s) => t in e ? d(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
3
  var o = (e, t, s) => l(e, typeof t != "symbol" ? t + "" : t, s);
4
- import { s as g } from "../sha2-6wN58S6R.js";
4
+ import { s as g } from "../sha2-BYVxyZzX.js";
5
5
  import { Buffer as r } from "buffer";
6
6
  import { u } from "../bitcoin-B0S8SHCX.js";
7
7
  import { BitcoinNetworks as q } from "../shared/index.js";
@@ -7,7 +7,7 @@ import { H as T } from "./validation-CxqROCno.js";
7
7
  import * as j from "@bitcoin-js/tiny-secp256k1-asmjs";
8
8
  import { payments as we, Transaction as K } from "bitcoinjs-lib";
9
9
  import { Buffer as A } from "buffer";
10
- import { s as q } from "./sha2-6wN58S6R.js";
10
+ import { s as q } from "./sha2-BYVxyZzX.js";
11
11
  import { B as V } from "./BTCVaultRegistry.abi-DbJ5lsFJ.js";
12
12
  import { P as _, A as F } from "./ProtocolParams.abi-DXu8L0Fn.js";
13
13
  const W = new Set(Object.values(be)), ve = 200;
@@ -1289,4 +1289,4 @@ export {
1289
1289
  dt as r,
1290
1290
  Se as v
1291
1291
  };
1292
- //# sourceMappingURL=vault-registry-reader-CqhD3Iyd.js.map
1292
+ //# sourceMappingURL=vault-registry-reader-BBk0p-u-.js.map