@babylonlabs-io/ts-sdk 0.33.8 → 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 (89) 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 +127 -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/eth/index.d.ts +2 -1
  20. package/dist/tbv/core/clients/eth/index.d.ts.map +1 -1
  21. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts +21 -3
  22. package/dist/tbv/core/clients/eth/protocol-params-reader.d.ts.map +1 -1
  23. package/dist/tbv/core/clients/eth/protocol-params-validation.d.ts +27 -0
  24. package/dist/tbv/core/clients/eth/protocol-params-validation.d.ts.map +1 -0
  25. package/dist/tbv/core/clients/eth/types.d.ts +30 -0
  26. package/dist/tbv/core/clients/eth/types.d.ts.map +1 -1
  27. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts +6 -0
  28. package/dist/tbv/core/clients/eth/vault-registry-reader.d.ts.map +1 -1
  29. package/dist/tbv/core/clients/index.cjs +1 -1
  30. package/dist/tbv/core/clients/index.js +30 -27
  31. package/dist/tbv/core/index.cjs +1 -1
  32. package/dist/tbv/core/index.js +126 -122
  33. package/dist/tbv/core/managers/PeginManager.d.ts.map +1 -1
  34. package/dist/tbv/core/managers/index.cjs +1 -1
  35. package/dist/tbv/core/managers/index.js +2 -2
  36. package/dist/tbv/core/services/index.cjs +1 -1
  37. package/dist/tbv/core/services/index.js +2 -2
  38. package/dist/tbv/core/utils/eth/__tests__/waitForTransactionReceiptSmartAware.test.d.ts +2 -0
  39. package/dist/tbv/core/utils/eth/__tests__/waitForTransactionReceiptSmartAware.test.d.ts.map +1 -0
  40. package/dist/tbv/core/utils/eth/index.d.ts +2 -0
  41. package/dist/tbv/core/utils/eth/index.d.ts.map +1 -0
  42. package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts +18 -0
  43. package/dist/tbv/core/utils/eth/waitForTransactionReceiptSmartAware.d.ts.map +1 -0
  44. package/dist/tbv/core/utils/index.cjs +1 -1
  45. package/dist/tbv/core/utils/index.d.ts +1 -0
  46. package/dist/tbv/core/utils/index.d.ts.map +1 -1
  47. package/dist/tbv/core/utils/index.js +14 -13
  48. package/dist/tbv/core/vault-secrets/__tests__/deriveVaultRoot.test.d.ts +1 -1
  49. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts +4 -6
  50. package/dist/tbv/core/vault-secrets/__tests__/expand.test.d.ts.map +1 -1
  51. package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts +1 -1
  52. package/dist/tbv/core/vault-secrets/deriveVaultRoot.d.ts.map +1 -1
  53. package/dist/tbv/core/vault-secrets/index.d.ts +1 -1
  54. package/dist/tbv/core/vault-secrets/index.d.ts.map +1 -1
  55. package/dist/tbv/index.cjs +1 -1
  56. package/dist/tbv/index.js +126 -122
  57. package/dist/testing/index.cjs +1 -1
  58. package/dist/testing/index.js +1 -1
  59. package/dist/vault-registry-reader-BBk0p-u-.js +1292 -0
  60. package/dist/vault-registry-reader-BBk0p-u-.js.map +1 -0
  61. package/dist/vault-registry-reader-DQgnZilV.cjs +2 -0
  62. package/dist/vault-registry-reader-DQgnZilV.cjs.map +1 -0
  63. package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js +217 -0
  64. package/dist/waitForTransactionReceiptSmartAware-Cj_DKm0G.js.map +1 -0
  65. package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs +2 -0
  66. package/dist/waitForTransactionReceiptSmartAware-D9ykVriz.cjs.map +1 -0
  67. package/package.json +1 -2
  68. package/dist/PayoutManager-C9XHKZ5j.js.map +0 -1
  69. package/dist/PayoutManager-DDnNB0mj.cjs.map +0 -1
  70. package/dist/PeginManager-C8-I4gFH.js +0 -1280
  71. package/dist/PeginManager-C8-I4gFH.js.map +0 -1
  72. package/dist/PeginManager-D0TW9RET.cjs +0 -2
  73. package/dist/PeginManager-D0TW9RET.cjs.map +0 -1
  74. package/dist/psbtInputFields-2224j2ZY.js +0 -128
  75. package/dist/psbtInputFields-2224j2ZY.js.map +0 -1
  76. package/dist/psbtInputFields-B1lrwYzH.cjs +0 -2
  77. package/dist/psbtInputFields-B1lrwYzH.cjs.map +0 -1
  78. package/dist/sha2-6wN58S6R.js +0 -280
  79. package/dist/sha2-CsTynrfJ.cjs +0 -2
  80. package/dist/tbv/core/vault-secrets/__tests__/info.test.d.ts +0 -8
  81. package/dist/tbv/core/vault-secrets/__tests__/info.test.d.ts.map +0 -1
  82. package/dist/tbv/core/vault-secrets/expand.d.ts +0 -58
  83. package/dist/tbv/core/vault-secrets/expand.d.ts.map +0 -1
  84. package/dist/tbv/core/vault-secrets/info.d.ts +0 -55
  85. package/dist/tbv/core/vault-secrets/info.d.ts.map +0 -1
  86. package/dist/vault-registry-reader-DNiXOSYM.cjs +0 -2
  87. package/dist/vault-registry-reader-DNiXOSYM.cjs.map +0 -1
  88. package/dist/vault-registry-reader-PsSxB0JZ.js +0 -1162
  89. package/dist/vault-registry-reader-PsSxB0JZ.js.map +0 -1
package/dist/index.js CHANGED
@@ -1,170 +1,174 @@
1
1
  import { a as s, 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 R, b as g, c as _, e as m } 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 y, s as F, t as h, 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 w } 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 sa, c as ta, v as ra } from "./PayoutManager-C9XHKZ5j.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 w, H as X, 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
13
  import { C as pa, e as Pa, g as ca, h as Ta, i as Sa } from "./errors-CznAK5NB.js";
14
- import { BitcoinNetworks as Aa } from "./shared/index.js";
15
- import { B as ga, D as _a, F as ma, L as xa, M as fa, P as ba, b as Ia, a as va, S as Ca, T as Ua, W as Va, f as Oa, c as ya, p as Fa, r as ha } from "./fundPeginTransaction-oV-dNJOU.js";
14
+ import { BitcoinNetworks as Ea } from "./shared/index.js";
15
+ import { B as ga, D as ma, F as _a, L as xa, M as fa, P as ba, b as Ia, a as va, S as Ca, T as Ua, W as Va, f as Oa, c as Fa, p as ya, r as ha } from "./fundPeginTransaction-oV-dNJOU.js";
16
16
  import { U as Ba, a as Da, c as Ma, e as Ha, s as La, v as ka } from "./reservation-CHUGW0F_.js";
17
- import { B as Xa, c as wa, g as Ka, d as Ga, b as Ya, s as Za, a as Ja } from "./psbtInputFields-2224j2ZY.js";
18
- import { M as za, g as qa, a as Qa, b as $a, c as ae, d as ee, e as se, f as te, p as re } from "./mempoolApi-CAIge7Nj.js";
19
- import { S as ie, V as ne, g as le, h as ue, i as de, j as pe, a as Pe, d as ce, b as Te, f as Se, p as Ee, r as Ae, v as Re, c as ge, e as _e } from "./vault-registry-reader-PsSxB0JZ.js";
20
- import { D as xe, b as fe, J as be, a as Ie, d as ve, P as Ce, R as Ue, e as Ve, c as Oe, V as ye } from "./types-TiIjyo2b.js";
21
- import { i as he, p as Ne } from "./errors-9AkghWyk.js";
22
- import { B as De, C as Me, R as He, a as Le, k as ke, l as We, i as Xe, j as we, h as Ke, r as Ge, b as Ye, s as Ze, v as Je, g as je, d as ze, c as qe, e as Qe, f as $e, w as as } from "./buildAndBroadcastRefund-B6fGRmvo.js";
23
- import { C as ss, P as ts, c as rs, g as os } from "./peginState-CBAlxgXk.js";
17
+ import { B as wa, c as Xa, g as Ka, d as Ga, b as Ya, s as Za, a as Ja, w as ja } from "./waitForTransactionReceiptSmartAware-Cj_DKm0G.js";
18
+ import { M as qa, g as Qa, a as $a, b as ae, c as ee, d as se, e as te, f as re, p as oe } from "./mempoolApi-CAIge7Nj.js";
19
+ import { S as ne, V as le, j as ue, k as de, l as pe, m as Pe, a as ce, d as Te, b as Se, f as Ae, p as Ee, r as Re, g as ge, h as me, v as _e, i as xe, c as fe, e as be } from "./vault-registry-reader-BBk0p-u-.js";
20
+ import { D as ve, b as Ce, J as Ue, a as Ve, d as Oe, P as Fe, R as ye, e as he, c as Ne, V as Be } from "./types-TiIjyo2b.js";
21
+ import { i as Me, p as He } from "./errors-9AkghWyk.js";
22
+ import { B as ke, C as We, R as we, a as Xe, k as Ke, l as Ge, i as Ye, j as Ze, h as Je, r as je, b as ze, s as qe, v as Qe, g as $e, d as as, c as es, e as ss, f as ts, w as rs } from "./buildAndBroadcastRefund-DzX11N9S.js";
23
+ import { C as is, P as ns, c as ls, g as us } from "./peginState-CBAlxgXk.js";
24
24
  export {
25
25
  ia as ApplicationRegistryABI,
26
- De as BIP68NotMatureError,
27
- L as BITCOIN_ADDRESS_RE,
26
+ ke as BIP68NotMatureError,
27
+ w as BITCOIN_ADDRESS_RE,
28
28
  ua as BTCVaultRegistryABI,
29
29
  ga as BTC_DUST_SAT,
30
- Aa as BitcoinNetworks,
31
- Xa as BitcoinScriptType,
30
+ Ea as BitcoinNetworks,
31
+ wa as BitcoinScriptType,
32
32
  pa as CONTRACT_ERRORS,
33
- Me as ClaimerPegoutStatusValue,
34
- ss as ContractStatus,
35
- _a as DUST_THRESHOLD,
36
- xe as DaemonStatus,
37
- ma as FEE_SAFETY_MARGIN,
38
- k as HEX_RE,
39
- fe as JSON_RPC_ERROR_CODES,
40
- be as JsonRpcClient,
41
- Ie as JsonRpcError,
42
- W as KNOWN_SCRIPT_PREFIXES,
33
+ We as ClaimerPegoutStatusValue,
34
+ is as ContractStatus,
35
+ ma as DUST_THRESHOLD,
36
+ ve as DaemonStatus,
37
+ _a as FEE_SAFETY_MARGIN,
38
+ X as HEX_RE,
39
+ Ce as JSON_RPC_ERROR_CODES,
40
+ Ue as JsonRpcClient,
41
+ Ve as JsonRpcError,
42
+ K as KNOWN_SCRIPT_PREFIXES,
43
43
  xa as LOW_RATE_ESTIMATION_ACCURACY_BUFFER,
44
44
  fa as MAX_NON_LEGACY_OUTPUT_SIZE,
45
- X as MAX_REASONABLE_FEE_SATS,
46
- za as MEMPOOL_API_URLS,
45
+ G as MAX_REASONABLE_FEE_SATS,
46
+ qa as MEMPOOL_API_URLS,
47
47
  ba as P2TR_INPUT_SIZE,
48
48
  Ia as PEGIN_AUTH_ANCHOR_OUTPUTS,
49
49
  va as PEGIN_FIXED_OUTPUTS,
50
- ve as POST_WOTS_STATUSES,
51
- Ce as PRE_DEPOSITOR_SIGNATURES_STATES,
50
+ Oe as POST_WOTS_STATUSES,
51
+ Fe as PRE_DEPOSITOR_SIGNATURES_STATES,
52
52
  sa as PayoutManager,
53
- ts as PeginAction,
54
- G as PeginManager,
53
+ ns as PeginAction,
54
+ J as PeginManager,
55
55
  na as ProtocolParamsABI,
56
- He as REFUND_VSIZE,
57
- Ue as RpcErrorCode,
56
+ we as REFUND_VSIZE,
57
+ ye as RpcErrorCode,
58
58
  Ca as SPLIT_TX_FEE_SAFETY_MULTIPLIER,
59
- ie as ServerIdentityError,
60
- w as TXID_RE,
59
+ ne as ServerIdentityError,
60
+ Y as TXID_RE,
61
61
  Ua as TX_BUFFER_SIZE_OVERHEAD,
62
62
  Ba as UtxoNotAvailableError,
63
- Y as VAULT_APP_NAME,
64
- Ve as VP_BATCH_MAX_SIZE,
65
- Oe as VP_TERMINAL_STATUSES,
66
- ye as VP_TRANSIENT_STATUSES,
67
- ne as VaultProviderRpcClient,
68
- le as ViemProtocolParamsReader,
69
- ue as ViemUniversalChallengerReader,
70
- de as ViemVaultKeeperReader,
71
- pe as ViemVaultRegistryReader,
72
- Pe as VpResponseValidationError,
73
- ce as VpTokenRegistry,
63
+ j as VAULT_APP_NAME,
64
+ he as VP_BATCH_MAX_SIZE,
65
+ Ne as VP_TERMINAL_STATUSES,
66
+ Be as VP_TRANSIENT_STATUSES,
67
+ le as VaultProviderRpcClient,
68
+ ue as ViemProtocolParamsReader,
69
+ de as ViemUniversalChallengerReader,
70
+ pe as ViemVaultKeeperReader,
71
+ Pe as ViemVaultRegistryReader,
72
+ ce as VpResponseValidationError,
73
+ Te as VpTokenRegistry,
74
74
  Va as WALLET_RELAY_FEE_RATE_THRESHOLD,
75
- Le as activateVault,
76
- R as assertPayoutOutputMatchesRegistered,
75
+ Xe as activateVault,
76
+ _ as assertPayoutOutputMatchesRegistered,
77
77
  Da as assertUtxosAvailable,
78
- Te as batchPollByProvider,
79
- ke as buildAndBroadcastRefund,
78
+ Se as batchPollByProvider,
79
+ Ke as buildAndBroadcastRefund,
80
80
  s as buildChallengeAssertPsbt,
81
81
  t as buildDepositorPayoutPsbt,
82
- Z as buildFundingOutpointsCommitment,
83
- S as buildNoPayoutPsbt,
84
- g as buildPayoutPsbt,
85
- u as buildPeginInputPsbt,
86
- d as buildPeginTxFromFundedPrePegin,
87
- p as buildPrePeginPsbt,
88
- E as buildRefundPsbt,
89
- J as buildVaultContext,
90
- wa as calculateBtcTxHash,
91
- rs as canPerformAction,
82
+ z as buildFundingOutpointsCommitment,
83
+ R as buildNoPayoutPsbt,
84
+ x as buildPayoutPsbt,
85
+ P as buildPeginInputPsbt,
86
+ c as buildPeginTxFromFundedPrePegin,
87
+ T as buildPrePeginPsbt,
88
+ g as buildRefundPsbt,
89
+ q as buildVaultContext,
90
+ Xa as calculateBtcTxHash,
91
+ ls as canPerformAction,
92
92
  Ma as collectReservedUtxoRefs,
93
93
  ta as computeHashlock,
94
94
  i as computeMinClaimValue,
95
95
  r as computeNumLocalChallengers,
96
- j as computeWotsBlockPublicKeysHash,
97
- Se as createAuthenticatedVpClient,
98
- _ as createPayoutScript,
99
- M as createTaprootScriptPathSignOptions,
100
- f as deriveNativeSegwitAddress,
101
- b as deriveTaprootAddress,
96
+ Q as computeWotsBlockPublicKeysHash,
97
+ Ae as createAuthenticatedVpClient,
98
+ f as createPayoutScript,
99
+ k as createTaprootScriptPathSignOptions,
100
+ v as deriveNativeSegwitAddress,
101
+ C as deriveTaprootAddress,
102
102
  n as deriveVaultId,
103
- z as deriveVaultRoot,
104
- q as deriveWotsBlocksFromSeed,
105
- I as ensureHexPrefix,
106
- We as estimateRefundFeeSats,
107
- Q as expandAuthAnchor,
108
- $ as expandHashlockSecret,
109
- aa as expandWotsSeed,
103
+ $ as deriveVaultRoot,
104
+ aa as deriveWotsBlocksFromSeed,
105
+ U as ensureHexPrefix,
106
+ Ge as estimateRefundFeeSats,
107
+ l as expandAuthAnchor,
108
+ u as expandHashlockSecret,
109
+ d as expandWotsSeed,
110
110
  Pa as extractErrorData,
111
111
  Ha as extractInputsFromTransaction,
112
- m as extractPayoutSignature,
113
- P as extractPeginInputSignature,
114
- c as finalizePeginInputPsbt,
115
- v as formatSatoshisToBtc,
112
+ b as extractPayoutSignature,
113
+ S as extractPeginInputSignature,
114
+ A as finalizePeginInputPsbt,
115
+ V as formatSatoshisToBtc,
116
116
  Oa as fundPeginTransaction,
117
- qa as getAddressTxs,
118
- Qa as getAddressUtxos,
117
+ Qa as getAddressTxs,
118
+ $a as getAddressUtxos,
119
119
  ca as getContractErrorMessage,
120
120
  Ka as getDustThreshold,
121
- $a as getMempoolApiUrl,
122
- C as getNetwork,
123
- ae as getNetworkFees,
124
- os as getPeginProtocolState,
121
+ ae as getMempoolApiUrl,
122
+ O as getNetwork,
123
+ ee as getNetworkFees,
124
+ us as getPeginProtocolState,
125
125
  Ga as getPsbtInputFields,
126
126
  Ya as getScriptType,
127
- ee as getTxHex,
128
- se as getTxInfo,
129
- te as getUtxoInfo,
127
+ se as getTxHex,
128
+ te as getTxInfo,
129
+ re as getUtxoInfo,
130
130
  Ta as handleContractError,
131
- U as hexToUint8Array,
132
- V as isAddressFromPublicKey,
133
- Xe as isDepositAmountValid,
131
+ F as hexToUint8Array,
132
+ y as isAddressFromPublicKey,
133
+ Ye as isDepositAmountValid,
134
134
  Sa as isKnownContractError,
135
- we as isPegoutTerminalStatus,
136
- Ke as isRecognizedPegoutStatus,
137
- O as isValidHex,
138
- he as isWotsMismatchError,
139
- Ne as parseFundingOutpointsFromTx,
140
- ya as parseUnfundedWasmTransaction,
141
- Fa as peginOutputCount,
135
+ Ze as isPegoutTerminalStatus,
136
+ Je as isRecognizedPegoutStatus,
137
+ h as isValidHex,
138
+ Me as isWotsMismatchError,
139
+ He as parseFundingOutpointsFromTx,
140
+ Fa as parseUnfundedWasmTransaction,
141
+ ya as peginOutputCount,
142
142
  Ee as primeVpTokenRegistry,
143
- y as processPublicKeyToXOnly,
144
- re as pushTx,
143
+ N as processPublicKeyToXOnly,
144
+ oe as pushTx,
145
145
  ha as rateBasedTxBufferFee,
146
- Ae as resolveProtocolAddresses,
147
- Ge as runDepositorPresignFlow,
146
+ Re as resolveProtocolAddresses,
147
+ je as runDepositorPresignFlow,
148
148
  La as selectUtxosForDeposit,
149
149
  Za as selectUtxosForPegin,
150
150
  Ja as shouldAddChangeOutput,
151
- Ye as signDepositorGraph,
152
- F as stripHexPrefix,
153
- Ze as submitWotsPublicKey,
154
- h as toXOnly,
155
- N as uint8ArrayToHex,
156
- Je as validateDepositAmount,
157
- je as validateMultiVaultDepositInputs,
158
- ze as validateProviderSelection,
159
- qe as validateRemainingCapacity,
160
- Re as validateRequestDepositorClaimerArtifactsResponse,
151
+ ze as signDepositorGraph,
152
+ B as stripHexPrefix,
153
+ qe as submitWotsPublicKey,
154
+ D as toXOnly,
155
+ M as uint8ArrayToHex,
156
+ Qe as validateDepositAmount,
157
+ $e as validateMultiVaultDepositInputs,
158
+ ge as validateOffchainParams,
159
+ me as validatePegInConfiguration,
160
+ as as validateProviderSelection,
161
+ es as validateRemainingCapacity,
162
+ _e as validateRequestDepositorClaimerArtifactsResponse,
161
163
  ra as validateSecretAgainstHashlock,
164
+ xe as validateTBVProtocolParams,
162
165
  ka as validateUtxosAvailable,
163
- Qe as validateVaultAmounts,
164
- $e as validateVaultProviderPubkey,
165
- B as validateWalletPubkey,
166
- ge as verifyServerIdentity,
167
- _e as vpTokenRegistry,
168
- as as waitForPeginStatus
166
+ ss as validateVaultAmounts,
167
+ ts as validateVaultProviderPubkey,
168
+ H as validateWalletPubkey,
169
+ fe as verifyServerIdentity,
170
+ be as vpTokenRegistry,
171
+ rs as waitForPeginStatus,
172
+ ja as waitForTransactionReceiptSmartAware
169
173
  };
170
174
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,274 @@
1
+ var U = Object.defineProperty;
2
+ var m = (e, t, s) => t in e ? U(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
+ var x = (e, t, s) => m(e, typeof t != "symbol" ? t + "" : t, s);
4
+ function B(e) {
5
+ return e instanceof Uint8Array || ArrayBuffer.isView(e) && e.constructor.name === "Uint8Array";
6
+ }
7
+ function W(e, t = "") {
8
+ if (!Number.isSafeInteger(e) || e < 0) {
9
+ const s = t && `"${t}" `;
10
+ throw new Error(`${s}expected integer >= 0, got ${e}`);
11
+ }
12
+ }
13
+ function H(e, t, s = "") {
14
+ const n = B(e), i = e == null ? void 0 : e.length;
15
+ if (!n || t !== void 0) {
16
+ const o = s && `"${s}" `, c = "", a = n ? `length=${i}` : `type=${typeof e}`;
17
+ throw new Error(o + "expected Uint8Array" + c + ", got " + a);
18
+ }
19
+ return e;
20
+ }
21
+ function E(e, t = !0) {
22
+ if (e.destroyed)
23
+ throw new Error("Hash instance has been destroyed");
24
+ if (t && e.finished)
25
+ throw new Error("Hash#digest() has already been called");
26
+ }
27
+ function I(e, t) {
28
+ H(e, void 0, "digestInto() output");
29
+ const s = t.outputLen;
30
+ if (e.length < s)
31
+ throw new Error('"digestInto() output" expected to be of length >=' + s);
32
+ }
33
+ function N(e) {
34
+ return new Uint32Array(e.buffer, e.byteOffset, Math.floor(e.byteLength / 4));
35
+ }
36
+ function L(...e) {
37
+ for (let t = 0; t < e.length; t++)
38
+ e[t].fill(0);
39
+ }
40
+ function w(e) {
41
+ return new DataView(e.buffer, e.byteOffset, e.byteLength);
42
+ }
43
+ function h(e, t) {
44
+ return e << 32 - t | e >>> t;
45
+ }
46
+ function T(e, t) {
47
+ return e << t | e >>> 32 - t >>> 0;
48
+ }
49
+ const _ = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
50
+ function S(e) {
51
+ return e << 24 & 4278190080 | e << 8 & 16711680 | e >>> 8 & 65280 | e >>> 24 & 255;
52
+ }
53
+ function k(e) {
54
+ for (let t = 0; t < e.length; t++)
55
+ e[t] = S(e[t]);
56
+ return e;
57
+ }
58
+ const z = _ ? (e) => e : k;
59
+ function C(e, t = {}) {
60
+ const s = (i, f) => e(f).update(i).digest(), n = e(void 0);
61
+ return s.outputLen = n.outputLen, s.blockLen = n.blockLen, s.create = (i) => e(i), Object.assign(s, t), Object.freeze(s);
62
+ }
63
+ const D = (e) => ({
64
+ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, e])
65
+ });
66
+ function O(e, t, s) {
67
+ return e & t ^ ~e & s;
68
+ }
69
+ function $(e, t, s) {
70
+ return e & t ^ e & s ^ t & s;
71
+ }
72
+ class F {
73
+ constructor(t, s, n, i) {
74
+ x(this, "blockLen");
75
+ x(this, "outputLen");
76
+ x(this, "padOffset");
77
+ x(this, "isLE");
78
+ // For partial updates less than block size
79
+ x(this, "buffer");
80
+ x(this, "view");
81
+ x(this, "finished", !1);
82
+ x(this, "length", 0);
83
+ x(this, "pos", 0);
84
+ x(this, "destroyed", !1);
85
+ this.blockLen = t, this.outputLen = s, this.padOffset = n, this.isLE = i, this.buffer = new Uint8Array(t), this.view = w(this.buffer);
86
+ }
87
+ update(t) {
88
+ E(this), H(t);
89
+ const { view: s, buffer: n, blockLen: i } = this, f = t.length;
90
+ for (let o = 0; o < f; ) {
91
+ const c = Math.min(i - this.pos, f - o);
92
+ if (c === i) {
93
+ const a = w(t);
94
+ for (; i <= f - o; o += i)
95
+ this.process(a, o);
96
+ continue;
97
+ }
98
+ n.set(t.subarray(o, o + c), this.pos), this.pos += c, o += c, this.pos === i && (this.process(s, 0), this.pos = 0);
99
+ }
100
+ return this.length += t.length, this.roundClean(), this;
101
+ }
102
+ digestInto(t) {
103
+ E(this), I(t, this), this.finished = !0;
104
+ const { buffer: s, view: n, blockLen: i, isLE: f } = this;
105
+ let { pos: o } = this;
106
+ s[o++] = 128, L(this.buffer.subarray(o)), this.padOffset > i - o && (this.process(n, 0), o = 0);
107
+ for (let r = o; r < i; r++)
108
+ s[r] = 0;
109
+ n.setBigUint64(i - 8, BigInt(this.length * 8), f), this.process(n, 0);
110
+ const c = w(t), a = this.outputLen;
111
+ if (a % 4)
112
+ throw new Error("_sha2: outputLen must be aligned to 32bit");
113
+ const u = a / 4, b = this.get();
114
+ if (u > b.length)
115
+ throw new Error("_sha2: outputLen bigger than state");
116
+ for (let r = 0; r < u; r++)
117
+ c.setUint32(4 * r, b[r], f);
118
+ }
119
+ digest() {
120
+ const { buffer: t, outputLen: s } = this;
121
+ this.digestInto(t);
122
+ const n = t.slice(0, s);
123
+ return this.destroy(), n;
124
+ }
125
+ _cloneInto(t) {
126
+ t || (t = new this.constructor()), t.set(...this.get());
127
+ const { blockLen: s, buffer: n, length: i, finished: f, destroyed: o, pos: c } = this;
128
+ return t.destroyed = o, t.finished = f, t.length = i, t.pos = c, i % s && t.buffer.set(n), t;
129
+ }
130
+ clone() {
131
+ return this._cloneInto();
132
+ }
133
+ }
134
+ const d = /* @__PURE__ */ Uint32Array.from([
135
+ 1779033703,
136
+ 3144134277,
137
+ 1013904242,
138
+ 2773480762,
139
+ 1359893119,
140
+ 2600822924,
141
+ 528734635,
142
+ 1541459225
143
+ ]), G = /* @__PURE__ */ Uint32Array.from([
144
+ 1116352408,
145
+ 1899447441,
146
+ 3049323471,
147
+ 3921009573,
148
+ 961987163,
149
+ 1508970993,
150
+ 2453635748,
151
+ 2870763221,
152
+ 3624381080,
153
+ 310598401,
154
+ 607225278,
155
+ 1426881987,
156
+ 1925078388,
157
+ 2162078206,
158
+ 2614888103,
159
+ 3248222580,
160
+ 3835390401,
161
+ 4022224774,
162
+ 264347078,
163
+ 604807628,
164
+ 770255983,
165
+ 1249150122,
166
+ 1555081692,
167
+ 1996064986,
168
+ 2554220882,
169
+ 2821834349,
170
+ 2952996808,
171
+ 3210313671,
172
+ 3336571891,
173
+ 3584528711,
174
+ 113926993,
175
+ 338241895,
176
+ 666307205,
177
+ 773529912,
178
+ 1294757372,
179
+ 1396182291,
180
+ 1695183700,
181
+ 1986661051,
182
+ 2177026350,
183
+ 2456956037,
184
+ 2730485921,
185
+ 2820302411,
186
+ 3259730800,
187
+ 3345764771,
188
+ 3516065817,
189
+ 3600352804,
190
+ 4094571909,
191
+ 275423344,
192
+ 430227734,
193
+ 506948616,
194
+ 659060556,
195
+ 883997877,
196
+ 958139571,
197
+ 1322822218,
198
+ 1537002063,
199
+ 1747873779,
200
+ 1955562222,
201
+ 2024104815,
202
+ 2227730452,
203
+ 2361852424,
204
+ 2428436474,
205
+ 2756734187,
206
+ 3204031479,
207
+ 3329325298
208
+ ]), l = /* @__PURE__ */ new Uint32Array(64);
209
+ class V extends F {
210
+ constructor(t) {
211
+ super(64, t, 8, !1);
212
+ }
213
+ get() {
214
+ const { A: t, B: s, C: n, D: i, E: f, F: o, G: c, H: a } = this;
215
+ return [t, s, n, i, f, o, c, a];
216
+ }
217
+ // prettier-ignore
218
+ set(t, s, n, i, f, o, c, a) {
219
+ this.A = t | 0, this.B = s | 0, this.C = n | 0, this.D = i | 0, this.E = f | 0, this.F = o | 0, this.G = c | 0, this.H = a | 0;
220
+ }
221
+ process(t, s) {
222
+ for (let r = 0; r < 16; r++, s += 4)
223
+ l[r] = t.getUint32(s, !1);
224
+ for (let r = 16; r < 64; r++) {
225
+ const g = l[r - 15], p = l[r - 2], A = h(g, 7) ^ h(g, 18) ^ g >>> 3, y = h(p, 17) ^ h(p, 19) ^ p >>> 10;
226
+ l[r] = y + l[r - 7] + A + l[r - 16] | 0;
227
+ }
228
+ let { A: n, B: i, C: f, D: o, E: c, F: a, G: u, H: b } = this;
229
+ for (let r = 0; r < 64; r++) {
230
+ const g = h(c, 6) ^ h(c, 11) ^ h(c, 25), p = b + g + O(c, a, u) + G[r] + l[r] | 0, y = (h(n, 2) ^ h(n, 13) ^ h(n, 22)) + $(n, i, f) | 0;
231
+ b = u, u = a, a = c, c = o + p | 0, o = f, f = i, i = n, n = p + y | 0;
232
+ }
233
+ n = n + this.A | 0, i = i + this.B | 0, f = f + this.C | 0, o = o + this.D | 0, c = c + this.E | 0, a = a + this.F | 0, u = u + this.G | 0, b = b + this.H | 0, this.set(n, i, f, o, c, a, u, b);
234
+ }
235
+ roundClean() {
236
+ L(l);
237
+ }
238
+ destroy() {
239
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), L(this.buffer);
240
+ }
241
+ }
242
+ class M extends V {
243
+ constructor() {
244
+ super(32);
245
+ // We cannot use array here since array allows indexing by variable
246
+ // which means optimizer/compiler cannot use registers.
247
+ x(this, "A", d[0] | 0);
248
+ x(this, "B", d[1] | 0);
249
+ x(this, "C", d[2] | 0);
250
+ x(this, "D", d[3] | 0);
251
+ x(this, "E", d[4] | 0);
252
+ x(this, "F", d[5] | 0);
253
+ x(this, "G", d[6] | 0);
254
+ x(this, "H", d[7] | 0);
255
+ }
256
+ }
257
+ const K = /* @__PURE__ */ C(
258
+ () => new M(),
259
+ /* @__PURE__ */ D(1)
260
+ );
261
+ export {
262
+ F as H,
263
+ L as a,
264
+ W as b,
265
+ C as c,
266
+ z as d,
267
+ E as e,
268
+ H as f,
269
+ I as g,
270
+ T as r,
271
+ K as s,
272
+ N as u
273
+ };
274
+ //# sourceMappingURL=sha2-BYVxyZzX.js.map