@lombard.finance/sdk 4.7.2 → 5.0.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 (292) hide show
  1. package/CHANGELOG.md +83 -2
  2. package/README.md +22 -21
  3. package/dist/api-functions/generateDepositBtcAddress/generateDepositBtcAddress.d.ts.map +1 -1
  4. package/dist/api-functions/getDepositBtcAddress/getDepositBtcAddress.d.ts.map +1 -1
  5. package/dist/api.js +5 -5
  6. package/dist/bridge.js +1 -1
  7. package/dist/btc.cjs +1 -1
  8. package/dist/btc.js +2 -2
  9. package/dist/chains/btc/actions/deposit/BtcDeposit.d.ts.map +1 -1
  10. package/dist/chains/btc/actions/deposit/config/evm.d.ts.map +1 -1
  11. package/dist/chains/btc/actions/deposit/config/solana.d.ts.map +1 -1
  12. package/dist/chains/btc/actions/depositAndDeploy/config/index.d.ts.map +1 -1
  13. package/dist/chains/btc/actions/depositAndDeploy/types.d.ts.map +1 -1
  14. package/dist/chains/btc/actions/stake/BtcStake.d.ts.map +1 -1
  15. package/dist/chains/btc/actions/stake/config/evm.d.ts.map +1 -1
  16. package/dist/chains/btc/actions/stake/config/solana.d.ts.map +1 -1
  17. package/dist/chains/btc/actions/stakeAndDeploy/config/index.d.ts.map +1 -1
  18. package/dist/chains/btc/actions/stakeAndDeploy/types.d.ts.map +1 -1
  19. package/dist/chains/btc/client/getCurrentBlockHeight.d.ts.map +1 -1
  20. package/dist/chains/evm/actions/deploy/EvmDeploy.d.ts +19 -4
  21. package/dist/chains/evm/actions/deploy/EvmDeploy.d.ts.map +1 -1
  22. package/dist/chains/evm/actions/deploy/index.d.ts.map +1 -1
  23. package/dist/chains/evm/actions/deploy/types.d.ts.map +1 -1
  24. package/dist/chains/evm/actions/deposit/config/evm.d.ts.map +1 -1
  25. package/dist/chains/evm/actions/deposit/index.d.ts.map +1 -1
  26. package/dist/chains/evm/actions/redeem/EvmRedeem.d.ts.map +1 -1
  27. package/dist/chains/evm/actions/redeem/config/evm.d.ts.map +1 -1
  28. package/dist/chains/evm/actions/redeem/index.d.ts.map +1 -1
  29. package/dist/chains/evm/actions/redeem/types.d.ts.map +1 -1
  30. package/dist/chains/evm/actions/stake/config/index.d.ts.map +1 -1
  31. package/dist/chains/evm/actions/stake/config/types.d.ts.map +1 -1
  32. package/dist/chains/evm/actions/stake/index.d.ts.map +1 -1
  33. package/dist/chains/evm/actions/stake/types.d.ts.map +1 -1
  34. package/dist/chains/evm/actions/unstake/EvmUnstake.d.ts.map +1 -1
  35. package/dist/chains/evm/actions/unstake/index.d.ts.map +1 -1
  36. package/dist/chains/evm/actions/unstake/types.d.ts.map +1 -1
  37. package/dist/chains/evm/actions/withdraw/EvmCancelWithdraw.d.ts.map +1 -1
  38. package/dist/chains/evm/actions/withdraw/EvmWithdraw.d.ts +6 -0
  39. package/dist/chains/evm/actions/withdraw/EvmWithdraw.d.ts.map +1 -1
  40. package/dist/chains/evm/actions/withdraw/config/types.d.ts.map +1 -1
  41. package/dist/chains/evm/actions/withdraw/types.d.ts.map +1 -1
  42. package/dist/chains/solana/SolanaActions.d.ts.map +1 -1
  43. package/dist/chains/solana/actions/redeem/SolanaRedeem.d.ts.map +1 -1
  44. package/dist/chains/solana/actions/redeem/types.d.ts.map +1 -1
  45. package/dist/chains/solana/actions/stake/SolanaStake.d.ts.map +1 -1
  46. package/dist/chains/solana/actions/stake/types.d.ts.map +1 -1
  47. package/dist/chains/solana/actions/unstake/SolanaUnstake.d.ts.map +1 -1
  48. package/dist/chains/solana/actions/unstake/factory.d.ts.map +1 -1
  49. package/dist/chains/solana/actions/unstake/types.d.ts.map +1 -1
  50. package/dist/chains/solana/utils.d.ts.map +1 -1
  51. package/dist/chains/starknet/actions/unstake/config/index.d.ts.map +1 -1
  52. package/dist/chains/starknet/actions/unstake/factory.d.ts.map +1 -1
  53. package/dist/chains/starknet/actions/unstake/types.d.ts.map +1 -1
  54. package/dist/chains/sui/actions/unstake/config/index.d.ts.map +1 -1
  55. package/dist/chains/sui/actions/unstake/factory.d.ts.map +1 -1
  56. package/dist/chains/sui/actions/unstake/types.d.ts.map +1 -1
  57. package/dist/chunks/{BtcActions-Ds6YrAKZ.js → BtcActions-CFGiDxtv.js} +20 -22
  58. package/dist/chunks/BtcActions-CFGiDxtv.js.map +1 -0
  59. package/dist/chunks/BtcActions-DJJmmyzi.cjs +2 -0
  60. package/dist/chunks/BtcActions-DJJmmyzi.cjs.map +1 -0
  61. package/dist/chunks/EvmActions-CUKBeiUw.js +1508 -0
  62. package/dist/chunks/EvmActions-CUKBeiUw.js.map +1 -0
  63. package/dist/chunks/EvmActions-CxipDb7X.cjs +7 -0
  64. package/dist/chunks/EvmActions-CxipDb7X.cjs.map +1 -0
  65. package/dist/chunks/{ReferralsClient-DT3qvRXP.js → ReferralsClient-BRa26dYS.js} +4 -4
  66. package/dist/chunks/ReferralsClient-BRa26dYS.js.map +1 -0
  67. package/dist/chunks/ReferralsClient-o-3AUm7s.cjs.map +1 -1
  68. package/dist/chunks/{approveLBTC-DZQpza0E.js → approveLBTC-DnCt6ZZF.js} +3 -3
  69. package/dist/chunks/{approveLBTC-DZQpza0E.js.map → approveLBTC-DnCt6ZZF.js.map} +1 -1
  70. package/dist/chunks/{blockchain-identifier-C2GkWxmw.js → blockchain-identifier-BkASqCgZ.js} +2 -2
  71. package/dist/chunks/blockchain-identifier-BkASqCgZ.js.map +1 -0
  72. package/dist/chunks/blockchain-identifier-DWfC3Es2.cjs.map +1 -1
  73. package/dist/chunks/{bridge-62Nuzkt6.js → bridge-DV4fOcHe.js} +4 -4
  74. package/dist/chunks/bridge-DV4fOcHe.js.map +1 -0
  75. package/dist/chunks/bridge-DZp5x4Yb.cjs.map +1 -1
  76. package/dist/chunks/{config-8IroHCdP.cjs → config-BfX8lrdO.cjs} +2 -2
  77. package/dist/chunks/config-BfX8lrdO.cjs.map +1 -0
  78. package/dist/chunks/{config-ej-tsP3s.js → config-wnjPtnjd.js} +46 -53
  79. package/dist/chunks/config-wnjPtnjd.js.map +1 -0
  80. package/dist/chunks/{defi-registry-QwFZR4oK.cjs → defi-registry-CyMKVT3z.cjs} +2 -2
  81. package/dist/chunks/defi-registry-CyMKVT3z.cjs.map +1 -0
  82. package/dist/chunks/{defi-registry-DLP7nuRn.js → defi-registry-DULXbu3D.js} +9 -9
  83. package/dist/chunks/defi-registry-DULXbu3D.js.map +1 -0
  84. package/dist/chunks/depositStatus-B9P1YXEU.cjs.map +1 -1
  85. package/dist/chunks/{depositStatus-DMDUj1Zi.js → depositStatus-Cgd_GDUt.js} +5 -5
  86. package/dist/chunks/depositStatus-Cgd_GDUt.js.map +1 -0
  87. package/dist/chunks/events-B9b3YdgM.cjs +2 -0
  88. package/dist/chunks/events-B9b3YdgM.cjs.map +1 -0
  89. package/dist/chunks/{events-DmrU6jV2.js → events-DU2wYlt_.js} +189 -191
  90. package/dist/chunks/events-DU2wYlt_.js.map +1 -0
  91. package/dist/chunks/{get-exchange-ratio-D_5R035-.js → get-exchange-ratio-BvPUfcIQ.js} +2 -2
  92. package/dist/chunks/{get-exchange-ratio-D_5R035-.js.map → get-exchange-ratio-BvPUfcIQ.js.map} +1 -1
  93. package/dist/chunks/get-exchange-ratio-DGztGO7i.cjs.map +1 -1
  94. package/dist/chunks/get-positions-summary-CC7BDtlY.cjs.map +1 -1
  95. package/dist/chunks/{get-positions-summary-CSTG4Ni0.js → get-positions-summary-DxAgmaMl.js} +2 -2
  96. package/dist/chunks/get-positions-summary-DxAgmaMl.js.map +1 -0
  97. package/dist/chunks/get-vault-tvl-B6rSrGi_.js +203 -0
  98. package/dist/chunks/get-vault-tvl-B6rSrGi_.js.map +1 -0
  99. package/dist/chunks/get-vault-tvl-dvEPPxvT.cjs +2 -0
  100. package/dist/chunks/get-vault-tvl-dvEPPxvT.cjs.map +1 -0
  101. package/dist/chunks/get-vault-withdrawals-Cgx7VsM1.cjs +2 -0
  102. package/dist/chunks/get-vault-withdrawals-Cgx7VsM1.cjs.map +1 -0
  103. package/dist/chunks/get-vault-withdrawals-W5CgNbqE.js +154 -0
  104. package/dist/chunks/get-vault-withdrawals-W5CgNbqE.js.map +1 -0
  105. package/dist/chunks/{getUserStakeAndBakeSignature-Bqp_BTOt.js → getUserStakeAndBakeSignature-BRhWFYyY.js} +4 -4
  106. package/dist/chunks/getUserStakeAndBakeSignature-BRhWFYyY.js.map +1 -0
  107. package/dist/chunks/getUserStakeAndBakeSignature-VlC_GHmz.cjs.map +1 -1
  108. package/dist/chunks/hex-BiCL4CPh.js +11 -0
  109. package/dist/chunks/hex-BiCL4CPh.js.map +1 -0
  110. package/dist/chunks/hex-DeJtv8eu.cjs +2 -0
  111. package/dist/chunks/hex-DeJtv8eu.cjs.map +1 -0
  112. package/dist/chunks/{lbtc-addresses-BzalXq8D.js → lbtc-addresses-ClXt-tuB.js} +2 -2
  113. package/dist/chunks/{lbtc-addresses-BzalXq8D.js.map → lbtc-addresses-ClXt-tuB.js.map} +1 -1
  114. package/dist/chunks/parameters-CcpaKGU2.js +24 -0
  115. package/dist/chunks/parameters-CcpaKGU2.js.map +1 -0
  116. package/dist/chunks/parameters-YNWmaAho.cjs +2 -0
  117. package/dist/chunks/parameters-YNWmaAho.cjs.map +1 -0
  118. package/dist/chunks/{statusConstants-C4MCQQX7.cjs → statusConstants-B-7VEYgO.cjs} +2 -2
  119. package/dist/chunks/statusConstants-B-7VEYgO.cjs.map +1 -0
  120. package/dist/chunks/{statusConstants-DAn1Atsp.js → statusConstants-C3JHNUTC.js} +15 -17
  121. package/dist/chunks/statusConstants-C3JHNUTC.js.map +1 -0
  122. package/dist/chunks/{storeNetworkFeeSignature-B4xx2WLI.js → storeNetworkFeeSignature-CY_Z-Wtn.js} +2 -2
  123. package/dist/chunks/{storeNetworkFeeSignature-B4xx2WLI.js.map → storeNetworkFeeSignature-CY_Z-Wtn.js.map} +1 -1
  124. package/dist/chunks/token-addresses-C7H9E4qz.cjs.map +1 -1
  125. package/dist/chunks/{token-addresses-J-EuQVP6.js → token-addresses-DVnRPyu4.js} +4 -2
  126. package/dist/chunks/token-addresses-DVnRPyu4.js.map +1 -0
  127. package/dist/chunks/{tokens-CwbSzyK9.js → tokens-Btl3GXbc.js} +3 -3
  128. package/dist/chunks/tokens-Btl3GXbc.js.map +1 -0
  129. package/dist/chunks/tokens-DEYY7W7O.cjs.map +1 -1
  130. package/dist/chunks/unwrapBtceToLbtcv-C4OxoVVU.js +321 -0
  131. package/dist/chunks/unwrapBtceToLbtcv-C4OxoVVU.js.map +1 -0
  132. package/dist/chunks/unwrapBtceToLbtcv-Dg-yUGpg.cjs +2 -0
  133. package/dist/chunks/unwrapBtceToLbtcv-Dg-yUGpg.cjs.map +1 -0
  134. package/dist/chunks/withdrawEarn-CTtVruit.cjs +7 -0
  135. package/dist/chunks/withdrawEarn-CTtVruit.cjs.map +1 -0
  136. package/dist/chunks/{unstakeLBTC-CEqb4N-_.js → withdrawEarn-QFaMhs0t.js} +965 -612
  137. package/dist/chunks/withdrawEarn-QFaMhs0t.js.map +1 -0
  138. package/dist/client/ApiNamespace.d.ts +3 -6
  139. package/dist/client/ApiNamespace.d.ts.map +1 -1
  140. package/dist/common/blockchain-identifier.d.ts.map +1 -1
  141. package/dist/common/chains.d.ts.map +1 -1
  142. package/dist/common/feature-config.d.ts.map +1 -1
  143. package/dist/contract-functions/cancelEarnWithdrawal/cancelEarnWithdrawal.d.ts +19 -0
  144. package/dist/contract-functions/cancelEarnWithdrawal/cancelEarnWithdrawal.d.ts.map +1 -0
  145. package/dist/contract-functions/cancelEarnWithdrawal/index.d.ts +2 -0
  146. package/dist/contract-functions/cancelEarnWithdrawal/index.d.ts.map +1 -0
  147. package/dist/contract-functions/depositEarn/depositEarn.d.ts +36 -0
  148. package/dist/contract-functions/depositEarn/depositEarn.d.ts.map +1 -0
  149. package/dist/contract-functions/depositEarn/index.d.ts +2 -0
  150. package/dist/contract-functions/depositEarn/index.d.ts.map +1 -0
  151. package/dist/contract-functions/getBasculeDepositStatus/getBasculeDepositStatus.d.ts.map +1 -1
  152. package/dist/contract-functions/getEarnPosition/getEarnPosition.d.ts +17 -16
  153. package/dist/contract-functions/getEarnPosition/getEarnPosition.d.ts.map +1 -1
  154. package/dist/contract-functions/getShareValue/getShareValue.d.ts +5 -15
  155. package/dist/contract-functions/getShareValue/getShareValue.d.ts.map +1 -1
  156. package/dist/contract-functions/getSharesByAddress/getSharesByAddress.d.ts +5 -20
  157. package/dist/contract-functions/getSharesByAddress/getSharesByAddress.d.ts.map +1 -1
  158. package/dist/contract-functions/index.d.ts +4 -2
  159. package/dist/contract-functions/index.d.ts.map +1 -1
  160. package/dist/contract-functions/previewWithdrawEarn/index.d.ts +2 -0
  161. package/dist/contract-functions/previewWithdrawEarn/index.d.ts.map +1 -0
  162. package/dist/contract-functions/previewWithdrawEarn/previewWithdrawEarn.d.ts +38 -0
  163. package/dist/contract-functions/previewWithdrawEarn/previewWithdrawEarn.d.ts.map +1 -0
  164. package/dist/contract-functions/signStakeAndBake/validation.d.ts.map +1 -1
  165. package/dist/contract-functions/withdrawEarn/index.d.ts +2 -0
  166. package/dist/contract-functions/withdrawEarn/index.d.ts.map +1 -0
  167. package/dist/contract-functions/withdrawEarn/withdrawEarn.d.ts +46 -0
  168. package/dist/contract-functions/withdrawEarn/withdrawEarn.d.ts.map +1 -0
  169. package/dist/contract-functions/wrapToBtce/wrapToBtce.d.ts.map +1 -1
  170. package/dist/contracts.cjs +1 -1
  171. package/dist/contracts.js +32 -30
  172. package/dist/core/assets/catalog.d.ts.map +1 -1
  173. package/dist/core/assets/utils.d.ts.map +1 -1
  174. package/dist/core/chains/utils.d.ts.map +1 -1
  175. package/dist/core.cjs +1 -1
  176. package/dist/core.js +19 -19
  177. package/dist/defi/defi-registry.d.ts.map +1 -1
  178. package/dist/defi/index.d.ts +1 -1
  179. package/dist/defi/index.d.ts.map +1 -1
  180. package/dist/defi.cjs +1 -1
  181. package/dist/defi.js +4 -4
  182. package/dist/entries/api.d.ts +14 -14
  183. package/dist/entries/api.d.ts.map +1 -1
  184. package/dist/entries/contracts.d.ts +4 -2
  185. package/dist/entries/contracts.d.ts.map +1 -1
  186. package/dist/entries/defi.d.ts +1 -1
  187. package/dist/entries/defi.d.ts.map +1 -1
  188. package/dist/entries/evm.d.ts +7 -7
  189. package/dist/entries/evm.d.ts.map +1 -1
  190. package/dist/entries/utils.d.ts +9 -9
  191. package/dist/entries/utils.d.ts.map +1 -1
  192. package/dist/entries/vaults.d.ts +1 -1
  193. package/dist/entries/vaults.d.ts.map +1 -1
  194. package/dist/evm.cjs +1 -1
  195. package/dist/evm.js +4 -4
  196. package/dist/index.cjs +1 -1
  197. package/dist/index.d.ts +67 -65
  198. package/dist/index.d.ts.map +1 -1
  199. package/dist/index.js +171 -174
  200. package/dist/index.js.map +1 -1
  201. package/dist/metrics.js +1 -1
  202. package/dist/services/EvmService.d.ts.map +1 -1
  203. package/dist/shared/actions/BaseAction.d.ts.map +1 -1
  204. package/dist/shared/deposits/depositStatus.d.ts.map +1 -1
  205. package/dist/shared/validation/index.d.ts.map +1 -1
  206. package/dist/tokens/tokens.d.ts.map +1 -1
  207. package/dist/utils/chain.d.ts.map +1 -1
  208. package/dist/utils/consoleLogger.d.ts.map +1 -1
  209. package/dist/utils.cjs +1 -1
  210. package/dist/utils.js +16 -16
  211. package/dist/vaults/index.d.ts +8 -10
  212. package/dist/vaults/index.d.ts.map +1 -1
  213. package/dist/vaults/lib/config.d.ts +148 -150
  214. package/dist/vaults/lib/config.d.ts.map +1 -1
  215. package/dist/vaults/lib/metrics/get-vault-apy.d.ts +2 -4
  216. package/dist/vaults/lib/metrics/get-vault-apy.d.ts.map +1 -1
  217. package/dist/vaults/lib/metrics/get-vault-points.d.ts +2 -5
  218. package/dist/vaults/lib/metrics/get-vault-points.d.ts.map +1 -1
  219. package/dist/vaults/lib/metrics/get-vault-tvl.d.ts +5 -8
  220. package/dist/vaults/lib/metrics/get-vault-tvl.d.ts.map +1 -1
  221. package/dist/vaults/lib/ops/deposit.d.ts +5 -14
  222. package/dist/vaults/lib/ops/deposit.d.ts.map +1 -1
  223. package/dist/vaults/lib/ops/get-vault-deposits.d.ts +9 -13
  224. package/dist/vaults/lib/ops/get-vault-deposits.d.ts.map +1 -1
  225. package/dist/vaults/lib/ops/get-vault-minimum-deposit.d.ts +4 -7
  226. package/dist/vaults/lib/ops/get-vault-minimum-deposit.d.ts.map +1 -1
  227. package/dist/vaults/lib/ops/get-vault-withdrawals.d.ts +14 -18
  228. package/dist/vaults/lib/ops/get-vault-withdrawals.d.ts.map +1 -1
  229. package/dist/vaults/lib/ops/preview-vault-deposit.d.ts +4 -8
  230. package/dist/vaults/lib/ops/preview-vault-deposit.d.ts.map +1 -1
  231. package/dist/vaults/lib/ops/withdraw.d.ts +11 -27
  232. package/dist/vaults/lib/ops/withdraw.d.ts.map +1 -1
  233. package/dist/vaults.cjs +1 -1
  234. package/dist/vaults.cjs.map +1 -1
  235. package/dist/vaults.js +91 -103
  236. package/dist/vaults.js.map +1 -1
  237. package/package.json +1 -1
  238. package/dist/chunks/BtcActions-Ds6YrAKZ.js.map +0 -1
  239. package/dist/chunks/BtcActions-DywyNv3O.cjs +0 -2
  240. package/dist/chunks/BtcActions-DywyNv3O.cjs.map +0 -1
  241. package/dist/chunks/EvmActions-BDk1vvRY.js +0 -1341
  242. package/dist/chunks/EvmActions-BDk1vvRY.js.map +0 -1
  243. package/dist/chunks/EvmActions-BzlEACJk.cjs +0 -2
  244. package/dist/chunks/EvmActions-BzlEACJk.cjs.map +0 -1
  245. package/dist/chunks/ReferralsClient-DT3qvRXP.js.map +0 -1
  246. package/dist/chunks/blockchain-identifier-C2GkWxmw.js.map +0 -1
  247. package/dist/chunks/bridge-62Nuzkt6.js.map +0 -1
  248. package/dist/chunks/config-8IroHCdP.cjs.map +0 -1
  249. package/dist/chunks/config-ej-tsP3s.js.map +0 -1
  250. package/dist/chunks/defi-registry-DLP7nuRn.js.map +0 -1
  251. package/dist/chunks/defi-registry-QwFZR4oK.cjs.map +0 -1
  252. package/dist/chunks/depositStatus-DMDUj1Zi.js.map +0 -1
  253. package/dist/chunks/events-DADaEsss.cjs +0 -2
  254. package/dist/chunks/events-DADaEsss.cjs.map +0 -1
  255. package/dist/chunks/events-DmrU6jV2.js.map +0 -1
  256. package/dist/chunks/get-positions-summary-CSTG4Ni0.js.map +0 -1
  257. package/dist/chunks/get-vault-tvl-D6XcYucx.cjs +0 -2
  258. package/dist/chunks/get-vault-tvl-D6XcYucx.cjs.map +0 -1
  259. package/dist/chunks/get-vault-tvl-DwdB1FA1.js +0 -226
  260. package/dist/chunks/get-vault-tvl-DwdB1FA1.js.map +0 -1
  261. package/dist/chunks/get-vault-withdrawals-BLwcsT0Q.js +0 -161
  262. package/dist/chunks/get-vault-withdrawals-BLwcsT0Q.js.map +0 -1
  263. package/dist/chunks/get-vault-withdrawals-CuSwGy0M.cjs +0 -2
  264. package/dist/chunks/get-vault-withdrawals-CuSwGy0M.cjs.map +0 -1
  265. package/dist/chunks/getUserStakeAndBakeSignature-Bqp_BTOt.js.map +0 -1
  266. package/dist/chunks/parameters-C_16L5ft.js +0 -11
  267. package/dist/chunks/parameters-C_16L5ft.js.map +0 -1
  268. package/dist/chunks/parameters-DK9cYCAH.cjs +0 -2
  269. package/dist/chunks/parameters-DK9cYCAH.cjs.map +0 -1
  270. package/dist/chunks/statusConstants-C4MCQQX7.cjs.map +0 -1
  271. package/dist/chunks/statusConstants-DAn1Atsp.js.map +0 -1
  272. package/dist/chunks/time-I-BeyUkG.cjs +0 -2
  273. package/dist/chunks/time-I-BeyUkG.cjs.map +0 -1
  274. package/dist/chunks/time-Sa5gggPG.js +0 -24
  275. package/dist/chunks/time-Sa5gggPG.js.map +0 -1
  276. package/dist/chunks/token-addresses-J-EuQVP6.js.map +0 -1
  277. package/dist/chunks/tokens-CwbSzyK9.js.map +0 -1
  278. package/dist/chunks/unstakeLBTC-CEqb4N-_.js.map +0 -1
  279. package/dist/chunks/unstakeLBTC-DMI79XHm.cjs +0 -2
  280. package/dist/chunks/unstakeLBTC-DMI79XHm.cjs.map +0 -1
  281. package/dist/chunks/withdraw-CYUXQ9HY.js +0 -209
  282. package/dist/chunks/withdraw-CYUXQ9HY.js.map +0 -1
  283. package/dist/chunks/withdraw-D-FlPc10.cjs +0 -12
  284. package/dist/chunks/withdraw-D-FlPc10.cjs.map +0 -1
  285. package/dist/chunks/wrapToBtce-D-TaAhqb.cjs +0 -2
  286. package/dist/chunks/wrapToBtce-D-TaAhqb.cjs.map +0 -1
  287. package/dist/chunks/wrapToBtce-yEQfbDAw.js +0 -298
  288. package/dist/chunks/wrapToBtce-yEQfbDAw.js.map +0 -1
  289. package/dist/contract-functions/getShareValue/index.d.ts +0 -2
  290. package/dist/contract-functions/getShareValue/index.d.ts.map +0 -1
  291. package/dist/contract-functions/getSharesByAddress/index.d.ts +0 -2
  292. package/dist/contract-functions/getSharesByAddress/index.d.ts.map +0 -1
@@ -2,22 +2,25 @@ var $ = Object.defineProperty;
2
2
  var q = (s, t, e) => t in s ? $(s, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : s[t] = e;
3
3
  var a = (s, t, e) => q(s, typeof t != "symbol" ? t + "" : t, e);
4
4
  import "axios";
5
- import { SDK_RUNTIME as z, SDK_VERSION as W, LombardError as d, bitcoinAddressSchema as I, Chain as h, BaseAction as C, NonEvmOperationStatus as i, validatePrepareParams as f, StepStatus as o, objectType as E, amountSchema as A, solanaAddressSchema as w, CapabilityRegistry as S, PartnerConfiguration as _, getProviderGetter as D, ASSET_CATALOG as b, getAssetAddress as X, getAssetDecimals as Z, getAssetMetadata as J, usesAssetRouter as Q, getAssetRouter as tt, getBridgeAdapter as et, getPublicMarketMaker as st, getAssetByAddress as nt, isAssetDeployed as rt, getAssetChains as it, getAssetEnvironments as at, getSupportedAssets as ot, ProviderErrorCode as ct } from "./statusConstants-DAn1Atsp.js";
6
- import { generateDepositBtcAddress as ut } from "./getUserStakeAndBakeSignature-Bqp_BTOt.js";
7
- import { getDepositsByAddress as y, getUnstakesByAddress as ht, getPointsByAddress as dt, getDepositBtcAddress as O, storeStakeAndBakeSignature as gt, ReferralsClient as lt } from "./ReferralsClient-DT3qvRXP.js";
8
- import { storeNetworkFeeSignature as pt, getNetworkFeeSignature as mt } from "./storeNetworkFeeSignature-B4xx2WLI.js";
9
- import { btcModule as vt, BtcActions as Ct } from "./BtcActions-Ds6YrAKZ.js";
10
- import { evmModule as ft, EvmActions as Et } from "./EvmActions-BDk1vvRY.js";
11
- import { SOLANA_DEVNET_CHAIN as At, SOLANA_MAINNET_CHAIN as It, getSolanaTokenAddress as L, Token as k } from "./token-addresses-J-EuQVP6.js";
5
+ import { SDK_RUNTIME as z, SDK_VERSION as W, LombardError as d, bitcoinAddressSchema as I, Chain as h, BaseAction as C, NonEvmOperationStatus as r, validatePrepareParams as f, StepStatus as o, objectType as E, amountSchema as A, solanaAddressSchema as w, CapabilityRegistry as S, PartnerConfiguration as _, getProviderGetter as D, ASSET_CATALOG as b, getAssetAddress as X, getAssetDecimals as Z, getAssetMetadata as J, usesAssetRouter as Q, getAssetRouter as tt, getBridgeAdapter as et, getPublicMarketMaker as st, getAssetByAddress as nt, isAssetDeployed as rt, getAssetChains as it, getAssetEnvironments as at, getSupportedAssets as ot, ProviderErrorCode as ct } from "./statusConstants-C3JHNUTC.js";
6
+ import { generateDepositBtcAddress as ut } from "./getUserStakeAndBakeSignature-BRhWFYyY.js";
7
+ import { getDepositsByAddress as O, getUnstakesByAddress as ht, getPointsByAddress as dt, getDepositBtcAddress as y, storeStakeAndBakeSignature as gt, ReferralsClient as lt } from "./ReferralsClient-BRa26dYS.js";
8
+ import { storeNetworkFeeSignature as pt, getNetworkFeeSignature as mt } from "./storeNetworkFeeSignature-CY_Z-Wtn.js";
9
+ import { btcModule as vt, BtcActions as Ct } from "./BtcActions-CFGiDxtv.js";
10
+ import { evmModule as ft, EvmActions as Et } from "./EvmActions-CUKBeiUw.js";
11
+ import { SOLANA_DEVNET_CHAIN as At, SOLANA_MAINNET_CHAIN as It, getSolanaTokenAddress as L, Token as k } from "./token-addresses-DVnRPyu4.js";
12
12
  import { toSatoshi as T } from "./satoshi-CSoJBXc6.js";
13
13
  import { p as B, r as c } from "./index-CfcQ_g3t.js";
14
- import { AssetId as g } from "./defi-registry-DLP7nuRn.js";
15
- import { getExchangeRatio as St } from "./get-exchange-ratio-D_5R035-.js";
16
- import { Vault as _t } from "./config-ej-tsP3s.js";
17
- import { getVaultWithdrawals as Dt, getVaultWithdrawalsAllChains as Nt } from "./get-vault-withdrawals-BLwcsT0Q.js";
14
+ import { AssetId as g } from "./defi-registry-DULXbu3D.js";
15
+ import { getExchangeRatio as St } from "./get-exchange-ratio-BvPUfcIQ.js";
16
+ import { getEarnWithdrawals as _t, getEarnWithdrawalsAllChains as Dt } from "./get-vault-withdrawals-W5CgNbqE.js";
18
17
  const P = ["debug", "info", "warn", "error", "none"];
19
- function Tt(s = {}) {
20
- const { level: t = "debug", prefix: e = "[Lombard SDK]", timestamp: n = !1 } = s, r = P.indexOf(t), u = (p) => P.indexOf(p) >= r && t !== "none", l = (p) => {
18
+ function Nt(s = {}) {
19
+ const {
20
+ level: t = "debug",
21
+ prefix: e = "[Lombard SDK]",
22
+ timestamp: n = !1
23
+ } = s, i = P.indexOf(t), u = (p) => P.indexOf(p) >= i && t !== "none", l = (p) => {
21
24
  if (n) {
22
25
  const v = (/* @__PURE__ */ new Date()).toISOString();
23
26
  return `${e} ${v} ${p}`;
@@ -39,7 +42,7 @@ function Tt(s = {}) {
39
42
  }
40
43
  };
41
44
  }
42
- function me() {
45
+ function le() {
43
46
  return {
44
47
  debug: () => {
45
48
  },
@@ -51,13 +54,13 @@ function me() {
51
54
  }
52
55
  };
53
56
  }
54
- function ve() {
57
+ function pe() {
55
58
  return {
56
59
  "X-SDK-Version": W,
57
60
  "X-SDK-Runtime": z
58
61
  };
59
62
  }
60
- class xt {
63
+ class Tt {
61
64
  constructor(t = B) {
62
65
  /**
63
66
  * Internal API version flag for future v2 migration.
@@ -87,7 +90,7 @@ class xt {
87
90
  * ```
88
91
  */
89
92
  async deposits(t) {
90
- return y({ address: t, env: this.env });
93
+ return O({ address: t, env: this.env });
91
94
  }
92
95
  /* -------------------------------------------------------------------------- */
93
96
  /* Unstakes */
@@ -167,7 +170,7 @@ class xt {
167
170
  * ```
168
171
  */
169
172
  async depositAddress(t, e, n) {
170
- return O({
173
+ return y({
171
174
  address: t,
172
175
  chainId: e,
173
176
  env: this.env,
@@ -206,16 +209,14 @@ class xt {
206
209
  * ```
207
210
  */
208
211
  async vaultWithdrawals(t, e) {
209
- const n = t, r = (e == null ? void 0 : e.vault) ?? _t.Veda;
210
- return e != null && e.chainId ? Dt({
212
+ const n = t;
213
+ return e != null && e.chainId ? _t({
211
214
  account: n,
212
215
  chainId: e.chainId,
213
- vaultKey: r,
214
216
  rpcUrl: e.rpcUrl,
215
217
  env: this.env
216
- }) : Nt({
218
+ }) : Dt({
217
219
  account: n,
218
- vaultKey: r,
219
220
  rpcUrl: e == null ? void 0 : e.rpcUrl
220
221
  });
221
222
  }
@@ -231,16 +232,16 @@ class xt {
231
232
  return this.apiVersion;
232
233
  }
233
234
  }
234
- function Pt(s) {
235
+ function xt(s) {
235
236
  if (!s.env)
236
237
  throw d.missingParameter("env");
237
238
  const t = {
238
239
  env: s.env,
239
240
  providers: s.providers || {}
240
241
  };
241
- return s.partner && (wt(s.partner), t.partner = s.partner), t;
242
+ return s.partner && (Pt(s.partner), t.partner = s.partner), t;
242
243
  }
243
- function wt(s) {
244
+ function Pt(s) {
244
245
  if (typeof s != "object" || s === null)
245
246
  throw d.invalidConfiguration(
246
247
  "Partner configuration must be an object"
@@ -251,7 +252,7 @@ function wt(s) {
251
252
  if (t.partnerId.trim().length === 0)
252
253
  throw d.invalidConfiguration("Partner ID cannot be empty");
253
254
  }
254
- class bt {
255
+ class wt {
255
256
  constructor(t) {
256
257
  this.env = t;
257
258
  }
@@ -278,7 +279,7 @@ class bt {
278
279
  */
279
280
  async getDepositAddress(t) {
280
281
  try {
281
- return await O({
282
+ return await y({
282
283
  address: t.address,
283
284
  chainId: t.chainId,
284
285
  token: t.token,
@@ -293,17 +294,17 @@ class bt {
293
294
  * Get deposits for an address
294
295
  */
295
296
  async getDeposits(t) {
296
- return (await y({
297
+ return (await O({
297
298
  address: t,
298
299
  env: this.env
299
300
  })).map((n) => {
300
- var r;
301
+ var i;
301
302
  return {
302
303
  depositAddress: n.depositAddress ?? "",
303
304
  blockHeight: n.blockHeight,
304
305
  isClaimed: n.isClaimed,
305
306
  txid: n.txHash,
306
- amount: (r = n.amount) == null ? void 0 : r.toString()
307
+ amount: (i = n.amount) == null ? void 0 : i.toString()
307
308
  };
308
309
  });
309
310
  }
@@ -341,16 +342,16 @@ class bt {
341
342
  });
342
343
  }
343
344
  }
344
- function yt() {
345
+ function bt() {
345
346
  return {
346
347
  id: "api",
347
348
  register(s) {
348
- return new bt(s.env);
349
+ return new wt(s.env);
349
350
  }
350
351
  };
351
352
  }
352
353
  function Ot(s) {
353
- const t = /* @__PURE__ */ new Map(), e = [vt(), ft(), yt()];
354
+ const t = /* @__PURE__ */ new Map(), e = [vt(), ft(), bt()];
354
355
  for (const n of e)
355
356
  t.set(n.id, n);
356
357
  if (s)
@@ -358,23 +359,23 @@ function Ot(s) {
358
359
  t.set(n.id, n);
359
360
  return Array.from(t.values());
360
361
  }
361
- function Lt(s, t) {
362
+ function yt(s, t) {
362
363
  for (const e of s)
363
364
  for (const n of e.requiresProviders ?? [])
364
- if (!kt(t, n))
365
+ if (!Lt(t, n))
365
366
  throw d.providerMissing(n, n);
366
367
  }
367
- function kt(s, t) {
368
+ function Lt(s, t) {
368
369
  var e;
369
370
  return !!((e = s.providers) != null && e[t]);
370
371
  }
371
- function Bt(s) {
372
- const t = Pt(s), e = Ot(
372
+ function kt(s) {
373
+ const t = xt(s), e = Ot(
373
374
  s.modules
374
375
  );
375
- Lt(e, t);
376
+ yt(e, t);
376
377
  let n = s.logger;
377
- return !n && s.debug && (n = Tt({ level: "debug" })), {
378
+ return !n && s.debug && (n = Nt({ level: "debug" })), {
378
379
  ...t,
379
380
  modules: e,
380
381
  logger: n
@@ -423,18 +424,18 @@ const R = {
423
424
  ],
424
425
  recipientSchema: I
425
426
  };
426
- function Mt(s, t, e, n, r) {
427
+ function Bt(s, t, e, n, i) {
427
428
  return R.routes.some(
428
- (u) => u.sourceChains.includes(s) && u.destChain === t && u.assetIn === e && u.assetOut === n && u.envs.includes(r)
429
+ (u) => u.sourceChains.includes(s) && u.destChain === t && u.assetIn === e && u.assetOut === n && u.envs.includes(i)
429
430
  );
430
431
  }
431
- class Rt extends C {
432
+ class Mt extends C {
432
433
  constructor(e, n) {
433
- super(i.IDLE);
434
+ super(r.IDLE);
434
435
  a(this, "_amount");
435
436
  a(this, "_recipient");
436
437
  a(this, "_txHash");
437
- if (this.ctx = e, this.params = n, !Mt(
438
+ if (this.ctx = e, this.params = n, !Bt(
438
439
  n.sourceChain,
439
440
  n.destChain,
440
441
  n.assetIn,
@@ -458,44 +459,46 @@ class Rt extends C {
458
459
  return this._txHash;
459
460
  }
460
461
  async prepare(e) {
461
- return this.assertStatus(i.IDLE, "prepare"), this.act(async () => {
462
+ return this.assertStatus(r.IDLE, "prepare"), this.act(async () => {
462
463
  const n = f(this.prepareSchema, e, {
463
464
  destChain: this.params.destChain
464
465
  });
465
466
  this._amount = n.amount, this._recipient = n.recipient, this.emitProgress({
466
- status: i.READY,
467
+ status: r.READY,
467
468
  steps: { burning: o.IDLE, releasing: o.IDLE }
468
469
  });
469
- }, i.READY);
470
+ }, r.READY);
470
471
  }
471
472
  async execute() {
472
- return this.assertStatus(i.READY, "execute"), this.act(async () => {
473
+ return this.assertStatus(r.READY, "execute"), this.act(async () => {
473
474
  const e = this._amount, n = this._recipient;
474
475
  if (!e || !n)
475
476
  throw d.missingParameter("amount or recipient");
476
477
  this.emitProgress({
477
- status: i.READY,
478
+ status: r.READY,
478
479
  steps: { burning: o.PENDING, releasing: o.IDLE }
479
480
  });
480
- const r = T(e).toString(), u = x(this.ctx.env), l = L(
481
+ const i = T(e).toString(), u = x(this.ctx.env), l = L(
481
482
  M(this.ctx.env),
482
483
  this.ctx.env,
483
484
  k.BTCb
484
485
  );
485
486
  if (!l)
486
- throw d.missingParameter("Solana BTC.b mint for this environment");
487
+ throw d.missingParameter(
488
+ "Solana BTC.b mint for this environment"
489
+ );
487
490
  const { signature: m } = await this.ctx.solana.redeemForBtc({
488
- amount: r,
491
+ amount: i,
489
492
  btcAddress: n,
490
493
  network: u,
491
494
  env: this.ctx.env,
492
495
  tokenMint: l
493
496
  });
494
497
  return this._txHash = m, this.emitProgress({
495
- status: i.COMPLETED,
498
+ status: r.COMPLETED,
496
499
  steps: { burning: o.COMPLETE, releasing: o.COMPLETE }
497
500
  }), this.emitCompleted(), { txHash: m };
498
- }, i.COMPLETED);
501
+ }, r.COMPLETED);
499
502
  }
500
503
  get prepareSchema() {
501
504
  return E({
@@ -521,24 +524,19 @@ const H = {
521
524
  ],
522
525
  recipientSchema: w
523
526
  };
524
- function Ht(s, t, e, n) {
527
+ function Rt(s, t, e, n) {
525
528
  return H.routes.some(
526
- (r) => r.chain === s && r.assetIn === t && r.assetOut === e && r.envs.includes(n)
529
+ (i) => i.chain === s && i.assetIn === t && i.assetOut === e && i.envs.includes(n)
527
530
  );
528
531
  }
529
- class Ft extends C {
532
+ class Ht extends C {
530
533
  constructor(e, n) {
531
- super(i.IDLE);
534
+ super(r.IDLE);
532
535
  a(this, "_amount");
533
536
  a(this, "_recipient");
534
537
  a(this, "_txHash");
535
538
  a(this, "env");
536
- if (this.ctx = e, this.params = n, this.env = e.env, !Ht(
537
- n.chain,
538
- n.assetIn,
539
- n.assetOut,
540
- this.env
541
- ))
539
+ if (this.ctx = e, this.params = n, this.env = e.env, !Rt(n.chain, n.assetIn, n.assetOut, this.env))
542
540
  throw d.routeNotFound({
543
541
  assetOut: n.assetOut,
544
542
  chain: n.chain,
@@ -555,37 +553,37 @@ class Ft extends C {
555
553
  return this._txHash;
556
554
  }
557
555
  async prepare(e) {
558
- return this.assertStatus(i.IDLE, "prepare"), this.act(async () => {
556
+ return this.assertStatus(r.IDLE, "prepare"), this.act(async () => {
559
557
  const n = f(this.prepareSchema, e, {
560
558
  destChain: this.params.chain
561
559
  });
562
560
  this._amount = n.amount, this._recipient = n.recipient, this.emitProgress({
563
- status: i.READY,
561
+ status: r.READY,
564
562
  steps: { burning: o.IDLE, minting: o.IDLE }
565
563
  });
566
- }, i.READY);
564
+ }, r.READY);
567
565
  }
568
566
  async execute() {
569
- return this.assertStatus(i.READY, "execute"), this.act(async () => {
567
+ return this.assertStatus(r.READY, "execute"), this.act(async () => {
570
568
  const e = this._amount, n = this._recipient;
571
569
  if (!e || !n)
572
570
  throw d.missingParameter("amount or recipient");
573
571
  this.emitProgress({
574
- status: i.READY,
572
+ status: r.READY,
575
573
  steps: { burning: o.PENDING, minting: o.IDLE }
576
574
  });
577
- const r = T(e).toString(), u = x(this.env), { signature: l } = await this.ctx.solana.deposit({
578
- amount: r,
575
+ const i = T(e).toString(), u = x(this.env), { signature: l } = await this.ctx.solana.deposit({
576
+ amount: i,
579
577
  recipient: n,
580
578
  network: u,
581
579
  env: this.env
582
580
  });
583
581
  return this._txHash = l, this.emitProgress({
584
- status: i.CONFIRMING,
582
+ status: r.CONFIRMING,
585
583
  steps: { burning: o.COMPLETE, minting: o.PENDING },
586
584
  txHash: l
587
585
  }), this.emitCompleted(), { txHash: l };
588
- }, i.CONFIRMING);
586
+ }, r.CONFIRMING);
589
587
  }
590
588
  get prepareSchema() {
591
589
  return E({
@@ -630,20 +628,20 @@ const F = {
630
628
  }
631
629
  ],
632
630
  recipientSchema: w
633
- }, Yt = [...F.routes, ...Y.routes];
634
- function Gt(s, t, e, n, r) {
635
- return Yt.some(
636
- (u) => u.sourceChains.includes(s) && u.destChain === t && u.assetIn === e && u.assetOut === n && u.envs.includes(r)
631
+ }, Ft = [...F.routes, ...Y.routes];
632
+ function Yt(s, t, e, n, i) {
633
+ return Ft.some(
634
+ (u) => u.sourceChains.includes(s) && u.destChain === t && u.assetIn === e && u.assetOut === n && u.envs.includes(i)
637
635
  );
638
636
  }
639
- class Ut extends C {
637
+ class Gt extends C {
640
638
  constructor(e, n) {
641
- super(i.IDLE);
639
+ super(r.IDLE);
642
640
  a(this, "_amount");
643
641
  a(this, "_recipient");
644
642
  a(this, "_txHash");
645
643
  a(this, "isBtcbOutput");
646
- if (this.ctx = e, this.params = n, this.isBtcbOutput = n.assetOut === g.BTCb, !Gt(
644
+ if (this.ctx = e, this.params = n, this.isBtcbOutput = n.assetOut === g.BTCb, !Yt(
647
645
  n.sourceChain,
648
646
  n.destChain,
649
647
  n.assetIn,
@@ -667,30 +665,30 @@ class Ut extends C {
667
665
  return this._txHash;
668
666
  }
669
667
  async prepare(e) {
670
- return this.assertStatus(i.IDLE, "prepare"), this.act(async () => {
668
+ return this.assertStatus(r.IDLE, "prepare"), this.act(async () => {
671
669
  const n = f(this.prepareSchema, e, {
672
670
  destChain: this.params.destChain
673
671
  });
674
672
  this._amount = n.amount, this._recipient = n.recipient, this.emitProgress({
675
- status: i.READY,
673
+ status: r.READY,
676
674
  steps: { burning: o.IDLE, releasing: o.IDLE }
677
675
  });
678
- }, i.READY);
676
+ }, r.READY);
679
677
  }
680
678
  async execute() {
681
- return this.assertStatus(i.READY, "execute"), this.act(async () => {
679
+ return this.assertStatus(r.READY, "execute"), this.act(async () => {
682
680
  const e = this._amount, n = this._recipient;
683
681
  if (!e || !n)
684
682
  throw d.missingParameter("amount or recipient");
685
683
  this.emitProgress({
686
- status: i.READY,
684
+ status: r.READY,
687
685
  steps: { burning: o.PENDING, releasing: o.IDLE }
688
686
  });
689
- const r = T(e).toString(), u = x(this.ctx.env);
687
+ const i = T(e).toString(), u = x(this.ctx.env);
690
688
  let l;
691
689
  if (this.isBtcbOutput)
692
690
  ({ signature: l } = await this.ctx.solana.redeem({
693
- amount: r,
691
+ amount: i,
694
692
  recipient: n,
695
693
  network: u,
696
694
  env: this.ctx.env
@@ -706,7 +704,7 @@ class Ut extends C {
706
704
  "Solana LBTC mint for this environment"
707
705
  );
708
706
  ({ signature: l } = await this.ctx.solana.redeemForBtc({
709
- amount: r,
707
+ amount: i,
710
708
  btcAddress: n,
711
709
  network: u,
712
710
  env: this.ctx.env,
@@ -714,10 +712,10 @@ class Ut extends C {
714
712
  }));
715
713
  }
716
714
  return this._txHash = l, this.emitProgress({
717
- status: i.COMPLETED,
715
+ status: r.COMPLETED,
718
716
  steps: { burning: o.COMPLETE, releasing: o.COMPLETE }
719
717
  }), this.emitCompleted(), { txHash: l };
720
- }, i.COMPLETED);
718
+ }, r.COMPLETED);
721
719
  }
722
720
  get prepareSchema() {
723
721
  const e = this.isBtcbOutput ? Y : F;
@@ -727,15 +725,15 @@ class Ut extends C {
727
725
  });
728
726
  }
729
727
  }
730
- function Vt(s) {
728
+ function Ut(s) {
731
729
  const e = new S(s.modules, s).require("solana");
732
730
  return {
733
731
  env: s.env,
734
732
  partner: new _(s.partner),
735
733
  getProvider: async (n) => {
736
- const r = D(s.providers, n);
737
- if (r)
738
- return r();
734
+ const i = D(s.providers, n);
735
+ if (i)
736
+ return i();
739
737
  },
740
738
  solana: e
741
739
  };
@@ -746,7 +744,7 @@ class G {
746
744
  this.config = t;
747
745
  }
748
746
  get ctx() {
749
- return this._ctx || (this._ctx = Vt(this.config)), this._ctx;
747
+ return this._ctx || (this._ctx = Ut(this.config)), this._ctx;
750
748
  }
751
749
  /**
752
750
  * Stake BTC.b → LBTC
@@ -757,7 +755,7 @@ class G {
757
755
  * @throws LombardError if route is not supported
758
756
  */
759
757
  stake(t) {
760
- return new Ft(this.ctx, t);
758
+ return new Ht(this.ctx, t);
761
759
  }
762
760
  /**
763
761
  * Unstake LBTC → BTC (cross-chain) or LBTC → BTC.b (same-chain)
@@ -770,7 +768,7 @@ class G {
770
768
  * @throws LombardError if route is not supported
771
769
  */
772
770
  unstake(t) {
773
- return new Ut(this.ctx, t);
771
+ return new Gt(this.ctx, t);
774
772
  }
775
773
  /**
776
774
  * Redeem BTC.b → BTC (cross-chain)
@@ -781,10 +779,10 @@ class G {
781
779
  * @throws LombardError if route is not supported
782
780
  */
783
781
  redeem(t) {
784
- return new Rt(this.ctx, t);
782
+ return new Mt(this.ctx, t);
785
783
  }
786
784
  }
787
- function Ce(s) {
785
+ function me(s) {
788
786
  return new G(s);
789
787
  }
790
788
  const U = {
@@ -807,9 +805,9 @@ function Kt(s, t) {
807
805
  (e) => e.sourceChains.includes(s) && e.envs.includes(t)
808
806
  );
809
807
  }
810
- class jt extends C {
808
+ class Vt extends C {
811
809
  constructor(e, n) {
812
- super(i.IDLE);
810
+ super(r.IDLE);
813
811
  a(this, "_amount");
814
812
  a(this, "_recipient");
815
813
  a(this, "_txHash");
@@ -832,35 +830,35 @@ class jt extends C {
832
830
  return this._txHash;
833
831
  }
834
832
  async prepare(e) {
835
- return this.assertStatus(i.IDLE, "prepare"), this.act(async () => {
833
+ return this.assertStatus(r.IDLE, "prepare"), this.act(async () => {
836
834
  const n = f(this.prepareSchema, e, {
837
835
  destChain: this.params.destChain
838
836
  });
839
837
  this._amount = n.amount, this._recipient = n.recipient, this.emitProgress({
840
- status: i.READY,
838
+ status: r.READY,
841
839
  steps: { burning: o.IDLE, releasing: o.IDLE }
842
840
  });
843
- }, i.READY);
841
+ }, r.READY);
844
842
  }
845
843
  async execute() {
846
- return this.assertStatus(i.READY, "execute"), this.act(async () => {
844
+ return this.assertStatus(r.READY, "execute"), this.act(async () => {
847
845
  const e = this._amount, n = this._recipient;
848
846
  if (!e || !n)
849
847
  throw d.missingParameter("amount or recipient");
850
848
  this.emitProgress({
851
- status: i.READY,
849
+ status: r.READY,
852
850
  steps: { burning: o.PENDING, releasing: o.IDLE }
853
851
  });
854
- const { txHash: r } = await this.ctx.starknet.unstake({
852
+ const { txHash: i } = await this.ctx.starknet.unstake({
855
853
  amount: e,
856
854
  btcAddress: n,
857
855
  env: this.env
858
856
  });
859
- return this._txHash = r, this.emitProgress({
860
- status: i.COMPLETED,
857
+ return this._txHash = i, this.emitProgress({
858
+ status: r.COMPLETED,
861
859
  steps: { burning: o.COMPLETE, releasing: o.PENDING }
862
- }), this.emitCompleted(), { txHash: r };
863
- }, i.COMPLETED);
860
+ }), this.emitCompleted(), { txHash: i };
861
+ }, r.COMPLETED);
864
862
  }
865
863
  get prepareSchema() {
866
864
  return E({
@@ -869,26 +867,26 @@ class jt extends C {
869
867
  });
870
868
  }
871
869
  }
872
- function $t(s) {
870
+ function jt(s) {
873
871
  const e = new S(s.modules, s).require("starknet");
874
872
  return {
875
873
  env: s.env,
876
874
  partner: new _(s.partner),
877
875
  getProvider: async (n) => {
878
- const r = D(s.providers, n);
879
- if (r)
880
- return r();
876
+ const i = D(s.providers, n);
877
+ if (i)
878
+ return i();
881
879
  },
882
880
  starknet: e
883
881
  };
884
882
  }
885
- class V {
883
+ class K {
886
884
  constructor(t) {
887
885
  a(this, "_ctx", null);
888
886
  this.config = t;
889
887
  }
890
888
  get ctx() {
891
- return this._ctx || (this._ctx = $t(this.config)), this._ctx;
889
+ return this._ctx || (this._ctx = jt(this.config)), this._ctx;
892
890
  }
893
891
  /**
894
892
  * Unstake LBTC → BTC
@@ -898,13 +896,13 @@ class V {
898
896
  * @throws LombardError if starknet module is not registered
899
897
  */
900
898
  unstake(t) {
901
- return new jt(this.ctx, t);
899
+ return new Vt(this.ctx, t);
902
900
  }
903
901
  }
904
- function fe(s) {
905
- return new V(s);
902
+ function ve(s) {
903
+ return new K(s);
906
904
  }
907
- const K = {
905
+ const V = {
908
906
  routes: [
909
907
  {
910
908
  sourceChains: [h.SUI_MAINNET],
@@ -919,12 +917,12 @@ const K = {
919
917
  ],
920
918
  recipientSchema: I
921
919
  };
922
- function qt(s, t) {
923
- return K.routes.some(
920
+ function $t(s, t) {
921
+ return V.routes.some(
924
922
  (e) => e.sourceChains.includes(s) && e.envs.includes(t)
925
923
  );
926
924
  }
927
- function zt(s) {
925
+ function qt(s) {
928
926
  switch (s) {
929
927
  case h.SUI_MAINNET:
930
928
  return "sui:mainnet";
@@ -934,14 +932,14 @@ function zt(s) {
934
932
  return "sui:testnet";
935
933
  }
936
934
  }
937
- class Wt extends C {
935
+ class zt extends C {
938
936
  constructor(e, n) {
939
- super(i.IDLE);
937
+ super(r.IDLE);
940
938
  a(this, "_amount");
941
939
  a(this, "_recipient");
942
940
  a(this, "_txHash");
943
941
  a(this, "env");
944
- if (this.ctx = e, this.params = n, this.env = e.env, !qt(n.sourceChain, this.env))
942
+ if (this.ctx = e, this.params = n, this.env = e.env, !$t(n.sourceChain, this.env))
945
943
  throw d.routeNotFound({
946
944
  assetOut: n.assetOut,
947
945
  sourceChain: n.sourceChain,
@@ -959,53 +957,53 @@ class Wt extends C {
959
957
  return this._txHash;
960
958
  }
961
959
  async prepare(e) {
962
- return this.assertStatus(i.IDLE, "prepare"), this.act(async () => {
960
+ return this.assertStatus(r.IDLE, "prepare"), this.act(async () => {
963
961
  const n = f(this.prepareSchema, e, {
964
962
  destChain: this.params.destChain
965
963
  });
966
964
  this._amount = n.amount, this._recipient = n.recipient, this.emitProgress({
967
- status: i.READY,
965
+ status: r.READY,
968
966
  steps: { burning: o.IDLE, releasing: o.IDLE }
969
967
  });
970
- }, i.READY);
968
+ }, r.READY);
971
969
  }
972
970
  async execute() {
973
- return this.assertStatus(i.READY, "execute"), this.act(async () => {
971
+ return this.assertStatus(r.READY, "execute"), this.act(async () => {
974
972
  const e = this._amount, n = this._recipient;
975
973
  if (!e || !n)
976
974
  throw d.missingParameter("amount or recipient");
977
975
  this.emitProgress({
978
- status: i.READY,
976
+ status: r.READY,
979
977
  steps: { burning: o.PENDING, releasing: o.IDLE }
980
978
  });
981
- const r = zt(this.params.sourceChain), { txHash: u } = await this.ctx.sui.unstake({
979
+ const i = qt(this.params.sourceChain), { txHash: u } = await this.ctx.sui.unstake({
982
980
  amount: e,
983
981
  btcAddress: n,
984
- chainId: r,
982
+ chainId: i,
985
983
  env: this.env
986
984
  });
987
985
  return this._txHash = u, this.emitProgress({
988
- status: i.COMPLETED,
986
+ status: r.COMPLETED,
989
987
  steps: { burning: o.COMPLETE, releasing: o.PENDING }
990
988
  }), this.emitCompleted(), { txHash: u };
991
- }, i.COMPLETED);
989
+ }, r.COMPLETED);
992
990
  }
993
991
  get prepareSchema() {
994
992
  return E({
995
993
  amount: A,
996
- recipient: K.recipientSchema
994
+ recipient: V.recipientSchema
997
995
  });
998
996
  }
999
997
  }
1000
- function Xt(s) {
998
+ function Wt(s) {
1001
999
  const e = new S(s.modules, s).require("sui");
1002
1000
  return {
1003
1001
  env: s.env,
1004
1002
  partner: new _(s.partner),
1005
1003
  getProvider: async (n) => {
1006
- const r = D(s.providers, n);
1007
- if (r)
1008
- return r();
1004
+ const i = D(s.providers, n);
1005
+ if (i)
1006
+ return i();
1009
1007
  },
1010
1008
  sui: e
1011
1009
  };
@@ -1016,7 +1014,7 @@ class j {
1016
1014
  this.config = t;
1017
1015
  }
1018
1016
  get ctx() {
1019
- return this._ctx || (this._ctx = Xt(this.config)), this._ctx;
1017
+ return this._ctx || (this._ctx = Wt(this.config)), this._ctx;
1020
1018
  }
1021
1019
  /**
1022
1020
  * Unstake LBTC → BTC
@@ -1026,13 +1024,13 @@ class j {
1026
1024
  * @throws LombardError if sui module is not registered
1027
1025
  */
1028
1026
  unstake(t) {
1029
- return new Wt(this.ctx, t);
1027
+ return new zt(this.ctx, t);
1030
1028
  }
1031
1029
  }
1032
- function Ee(s) {
1030
+ function Ce(s) {
1033
1031
  return new j(s);
1034
1032
  }
1035
- class Zt {
1033
+ class Xt {
1036
1034
  constructor(t = B, e) {
1037
1035
  a(this, "catalog");
1038
1036
  this.env = t, this.catalog = e ?? b;
@@ -1090,7 +1088,7 @@ class Zt {
1090
1088
  return this.catalog;
1091
1089
  }
1092
1090
  }
1093
- class Jt {
1091
+ class Zt {
1094
1092
  constructor(t) {
1095
1093
  a(this, "config");
1096
1094
  a(this, "env");
@@ -1133,8 +1131,8 @@ class Jt {
1133
1131
  evm: new Et(this.config),
1134
1132
  solana: new G(this.config),
1135
1133
  sui: new j(this.config),
1136
- starknet: new V(this.config)
1137
- }, this.referrals = new lt(this), this.assets = new Zt(this.env), this.api = new xt(this.env);
1134
+ starknet: new K(this.config)
1135
+ }, this.referrals = new lt(this), this.assets = new Xt(this.env), this.api = new Tt(this.env);
1138
1136
  }
1139
1137
  async getProvider(t) {
1140
1138
  const e = t;
@@ -1143,13 +1141,13 @@ class Jt {
1143
1141
  const n = D(this.config.providers, t);
1144
1142
  if (!n)
1145
1143
  throw d.providerMissing(t, t);
1146
- const r = await n();
1147
- if (!r)
1144
+ const i = await n();
1145
+ if (!i)
1148
1146
  throw new d(
1149
1147
  ct.PROVIDER_INITIALIZATION_FAILED,
1150
1148
  `Failed to initialize ${t} provider`
1151
1149
  );
1152
- return this.providerCache.set(e, r), r;
1150
+ return this.providerCache.set(e, i), i;
1153
1151
  }
1154
1152
  /**
1155
1153
  * Configure partner settings
@@ -1178,32 +1176,32 @@ class Jt {
1178
1176
  }
1179
1177
  }
1180
1178
  const N = /* @__PURE__ */ new Map();
1181
- function Qt(s) {
1179
+ function Jt(s) {
1182
1180
  return N.has(s) || N.set(s, Promise.resolve(b)), N.get(s);
1183
1181
  }
1184
- async function Ae(s) {
1185
- const t = "modules" in s && Array.isArray(s.modules) ? s : Bt(s), e = await Qt(t.env), n = {
1182
+ async function fe(s) {
1183
+ const t = "modules" in s && Array.isArray(s.modules) ? s : kt(s), e = await Jt(t.env), n = {
1186
1184
  ...t,
1187
1185
  catalog: e
1188
1186
  };
1189
- return new Jt(n);
1187
+ return new Zt(n);
1190
1188
  }
1191
- function Ie(s) {
1189
+ function Ee(s) {
1192
1190
  return typeof s == "object" && s !== null && "request" in s && typeof s.request == "function";
1193
1191
  }
1194
- function Se(s) {
1192
+ function Ae(s) {
1195
1193
  return typeof s == "object" && s !== null && "getAddresses" in s && typeof s.getAddresses == "function";
1196
1194
  }
1197
- function _e(s) {
1195
+ function Ie(s) {
1198
1196
  return typeof s == "object" && s !== null && "publicKey" in s && "signAndSendTransaction" in s;
1199
1197
  }
1200
- function De(s) {
1198
+ function Se(s) {
1201
1199
  return typeof s == "object" && s !== null && "getAddress" in s && "signAndExecuteTransactionBlock" in s;
1202
1200
  }
1203
- function Ne(s) {
1201
+ function _e(s) {
1204
1202
  return typeof s == "object" && s !== null && "address" in s && "execute" in s;
1205
1203
  }
1206
- const Te = {
1204
+ const De = {
1207
1205
  /** Progress update with detailed step information */
1208
1206
  Progress: "progress",
1209
1207
  /** Status change (e.g., 'idle' → 'preparing' → 'ready') */
@@ -1214,31 +1212,31 @@ const Te = {
1214
1212
  Failed: "failed",
1215
1213
  /** Error occurred */
1216
1214
  Error: "error"
1217
- }, xe = {
1215
+ }, Ne = {
1218
1216
  Progress: "progress",
1219
1217
  StatusChange: "status-change",
1220
1218
  Completed: "completed",
1221
1219
  Failed: "failed",
1222
1220
  Error: "error"
1223
- }, Pe = {
1221
+ }, Te = {
1224
1222
  Progress: "progress",
1225
1223
  StatusChange: "status-change",
1226
1224
  Completed: "completed",
1227
1225
  Failed: "failed",
1228
1226
  Error: "error"
1229
- }, we = {
1227
+ }, xe = {
1230
1228
  Progress: "progress",
1231
1229
  StatusChange: "status-change",
1232
1230
  Completed: "completed",
1233
1231
  Failed: "failed",
1234
1232
  Error: "error"
1235
- }, be = {
1233
+ }, Pe = {
1236
1234
  Progress: "progress",
1237
1235
  StatusChange: "status-change",
1238
1236
  Completed: "completed",
1239
1237
  Failed: "failed",
1240
1238
  Error: "error"
1241
- }, ye = {
1239
+ }, we = {
1242
1240
  Progress: "progress",
1243
1241
  StatusChange: "status-change",
1244
1242
  Completed: "completed",
@@ -1246,29 +1244,29 @@ const Te = {
1246
1244
  Error: "error"
1247
1245
  };
1248
1246
  export {
1249
- xt as ApiNamespace,
1250
- ye as BridgeEvent,
1251
- be as DeployEvent,
1252
- xe as DepositEvent,
1253
- Jt as LombardSDK,
1254
- Pe as RedeemEvent,
1247
+ Tt as ApiNamespace,
1248
+ we as BridgeEvent,
1249
+ Pe as DeployEvent,
1250
+ Ne as DepositEvent,
1251
+ Zt as LombardSDK,
1252
+ Te as RedeemEvent,
1255
1253
  G as SolanaActions,
1256
- Te as StakeEvent,
1257
- V as StarknetActions,
1254
+ De as StakeEvent,
1255
+ K as StarknetActions,
1258
1256
  j as SuiActions,
1259
- we as UnstakeEvent,
1260
- Bt as createConfig,
1261
- Tt as createConsoleLogger,
1262
- Ae as createLombardSDK,
1263
- me as createSilentLogger,
1264
- ve as getSdkHeaders,
1265
- Se as isBtcProvider,
1266
- Ie as isEvmProvider,
1267
- _e as isSolanaProvider,
1268
- Ne as isStarknetProvider,
1269
- De as isSuiProvider,
1270
- Ce as solanaActions,
1271
- fe as starknetActions,
1272
- Ee as suiActions
1257
+ xe as UnstakeEvent,
1258
+ kt as createConfig,
1259
+ Nt as createConsoleLogger,
1260
+ fe as createLombardSDK,
1261
+ le as createSilentLogger,
1262
+ pe as getSdkHeaders,
1263
+ Ae as isBtcProvider,
1264
+ Ee as isEvmProvider,
1265
+ Ie as isSolanaProvider,
1266
+ _e as isStarknetProvider,
1267
+ Se as isSuiProvider,
1268
+ me as solanaActions,
1269
+ ve as starknetActions,
1270
+ Ce as suiActions
1273
1271
  };
1274
- //# sourceMappingURL=events-DmrU6jV2.js.map
1272
+ //# sourceMappingURL=events-DU2wYlt_.js.map