@laceio/sdk 0.1.1-canary.2 → 0.1.1

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 (386) hide show
  1. package/dist/{TransactionBuilder-CCjOn7NA.cjs → TransactionBuilder-DrB3NVTi.cjs} +0 -42
  2. package/dist/{TransactionBuilder-CIzdw18M.js → TransactionBuilder-V6aLx4SV.js} +1 -1
  3. package/dist/{_polyfill-buffer-patch-CM8X7JiY.cjs → _polyfill-buffer-patch-BnPVerlG.cjs} +2 -21
  4. package/dist/account-guards.stable-B1DSSh9D.cjs +10 -0
  5. package/dist/account-guards.stable-JRQ5qx2V.js +5 -0
  6. package/dist/{activity-type-Ch6ljxBy.cjs → activity-type.stable-BJEfeLxL.cjs} +1 -2
  7. package/dist/{activity-type-GsJGWs-3.js → activity-type.stable-C76_hWd7.js} +1 -2
  8. package/dist/{address-book-address-validator-ByIZOdO-.js → address-book-address-validator-DIUolI-s.js} +2 -2
  9. package/dist/{address-book-address-validator-BjOWerRE.cjs → address-book-address-validator-DNwQGlOB.cjs} +2 -2
  10. package/dist/bitcoin.cjs +0 -45
  11. package/dist/bitcoin.d.ts +1 -29782
  12. package/dist/bitcoin.js +0 -20
  13. package/dist/{blockfrost-tx-submit-provider-CLNQ5ycR.cjs → blockfrost-tx-submit-provider-BAIzV5o3.cjs} +167 -3
  14. package/dist/{blockfrost-tx-submit-provider-CBWQ0wK9.js → blockfrost-tx-submit-provider-DPTrapz-.js} +157 -5
  15. package/dist/{secret-box-DrjLZuS1.cjs → bytes.vo-Ck5u40RA.cjs} +35 -1
  16. package/dist/{secret-box-DUR0ACYz.js → bytes.vo-TgiwogWF.js} +25 -3
  17. package/dist/{cardano-network-id.vo-wfLiAxpY.js → cardano-network-id.vo-CK1tNQDg.js} +1 -1
  18. package/dist/{cardano-network-id.vo-BEvFd_74.cjs → cardano-network-id.vo-DSxrFk9S.cjs} +1 -1
  19. package/dist/cardano.cjs +18 -22
  20. package/dist/cardano.d.ts +3982 -18409
  21. package/dist/cardano.js +11 -16
  22. package/dist/codecs-B7X9pAsK.cjs +1945 -0
  23. package/dist/codecs-CC1Xjntz.js +1882 -0
  24. package/dist/{const-oMF-TLow.cjs → const-BDEg2Trq.cjs} +4 -4
  25. package/dist/{const-iwzZEE_w.cjs → const-BY8B3_0_.cjs} +1 -1
  26. package/dist/{const-CBGn60yu.js → const-C84qHkjp.js} +4 -4
  27. package/dist/{const-CjmfjBP3.js → const-DXk2tFyv.js} +1 -1
  28. package/dist/{delegation-tx-builder-BR6bt1fE.js → delegation-tx-builder-CGVqlaFE.js} +5 -5
  29. package/dist/{delegation-tx-builder-DVwGfiV0.cjs → delegation-tx-builder-CRpLP6jH.cjs} +6 -6
  30. package/dist/{deregistration-tx-builder-BhJRGj1M.js → deregistration-tx-builder-B-CrUyX6.js} +5 -5
  31. package/dist/{deregistration-tx-builder-Cv_09HGf.cjs → deregistration-tx-builder-DZGwB4cz.cjs} +6 -6
  32. package/dist/{earn-rewards-tx-builder-RYzKsZ6-.js → earn-rewards-tx-builder-BDbTDZmD.js} +5 -5
  33. package/dist/{earn-rewards-tx-builder-52gJiJYa.cjs → earn-rewards-tx-builder-D5sUT5v8.cjs} +6 -6
  34. package/dist/{group-cardano-addresses-by-account-D06r7daZ.cjs → group-cardano-addresses-by-account-B533oVXR.cjs} +35 -19
  35. package/dist/{group-cardano-addresses-by-account-CxCqFDrX.js → group-cardano-addresses-by-account-RHKoEskR.js} +35 -19
  36. package/dist/{guarded-transaction-signer-BhnTBjf6.cjs → guarded-transaction-signer-Bxl6_XNd.cjs} +18 -17
  37. package/dist/{guarded-transaction-signer-BSEx83R-.js → guarded-transaction-signer-CpKLj8Kp.js} +15 -8
  38. package/dist/{in-memory-wallet-integration-CH4rcg92.cjs → in-memory-wallet-integration-CnLYeX4-.cjs} +108 -17
  39. package/dist/{in-memory-wallet-integration-BKu985Jz.js → in-memory-wallet-integration-Croiuopx.js} +104 -7
  40. package/dist/{in-memory-wallet-integration-B0blZBxM.js → in-memory-wallet-integration-D-qn65Kx.js} +2 -5
  41. package/dist/{in-memory-wallet-integration-CwPCDMIe.cjs → in-memory-wallet-integration-DVh9sRXa.cjs} +2 -3
  42. package/dist/index.cjs +47 -84
  43. package/dist/index.d.ts +13618 -40268
  44. package/dist/index.js +24 -52
  45. package/dist/{init-DUF4ar8P.cjs → init-B64zCLxG.cjs} +4 -4
  46. package/dist/{init-Y3mkB4XS.js → init-BAJJzBza.js} +2 -2
  47. package/dist/{init-BTzOjA8x.cjs → init-BJVU54pI.cjs} +1 -1
  48. package/dist/{init-D6BxBs7e.cjs → init-BKhH6mVR.cjs} +1 -1
  49. package/dist/{init-EP0CUWNK.cjs → init-BsCBAGWf.cjs} +2 -2
  50. package/dist/{init-Dy-05ktr.cjs → init-BtzMZ7Pk.cjs} +1 -1
  51. package/dist/init-Bv53hpLM.js +19 -0
  52. package/dist/{init-BopV9ed4.cjs → init-C-jErzp5.cjs} +2 -2
  53. package/dist/{init-CjT-WZcW.cjs → init-C4Bkib9u.cjs} +59 -49
  54. package/dist/{init-BEjCRHxU.cjs → init-C7IeJwQR.cjs} +61 -258
  55. package/dist/{init-C-G32J12.cjs → init-CB__aLD7.cjs} +2 -2
  56. package/dist/{init-CyAY4Lzl.js → init-CFYsq82V.js} +1 -1
  57. package/dist/{init-0zzs9aqU.js → init-CLHuAMB-.js} +4 -4
  58. package/dist/{init-DA7zmptx.js → init-CNLGJJRx.js} +1 -1
  59. package/dist/{init-B-YE57gg.js → init-CR6tpw1B.js} +33 -25
  60. package/dist/init-CRbjI7p1.js +3494 -0
  61. package/dist/{init-CSDpdu0Q.cjs → init-CSHwHnfg.cjs} +2 -2
  62. package/dist/{init-CNM5m7M2.js → init-Cg9XdAru.js} +4 -4
  63. package/dist/{init-B3-1ghyx.js → init-CigestoM.js} +2 -2
  64. package/dist/{init-Dv3zKj0r.cjs → init-D6DBUsD3.cjs} +4 -4
  65. package/dist/init-DAna1KCg.cjs +3495 -0
  66. package/dist/{init-D74mn8nH2.js → init-DDdhguVC.js} +2 -2
  67. package/dist/init-DGe47B22.cjs +364 -0
  68. package/dist/init-DMtyvYfC.cjs +21 -0
  69. package/dist/{init-BrdVzxei.cjs → init-DX4WyB0R.cjs} +3 -3
  70. package/dist/{init-C8URA2OX.js → init-DcYY6zMD.js} +1 -1
  71. package/dist/{init-DFMiP2ZH.cjs → init-DkIc5nqF.cjs} +1 -1
  72. package/dist/{init-vqxOQNZi.js → init-Dku4b2lG.js} +1 -1
  73. package/dist/{init-NdhG_VrF.cjs → init-DxUHsN53.cjs} +6 -6
  74. package/dist/{init-COMH3Hfo.js → init-FMGDET-9.js} +60 -259
  75. package/dist/{init-DrkOb-wd.cjs → init-LfyMo-sS.cjs} +2 -2
  76. package/dist/{init-NCjgwCZy.js → init-Rxohwpmu.js} +2 -2
  77. package/dist/init-TkPDD750.js +363 -0
  78. package/dist/{init-C2RgrfZe.js → init-TkPq_Ny_.js} +1 -1
  79. package/dist/{init-5KcGcBb5.cjs → init-U8c9yHYx.cjs} +1 -1
  80. package/dist/{init-CX0AMQUn.js → init-aJHl-7AO.js} +2 -2
  81. package/dist/{init-rmt7-fQE.cjs → init-anYu6XB7.cjs} +2 -2
  82. package/dist/{init-Fw89ZmrR.js → init-w9GEs73W.js} +2 -2
  83. package/dist/{init-Dnsv155v.js → init-y2Ra0vZP.js} +3 -3
  84. package/dist/{init-DFjT8YvT.js → init-zSzCjoor.js} +4 -4
  85. package/dist/{is-retriable-error-BUiVJDwH.js → is-retriable-error-BU0e3hVI.js} +1 -1
  86. package/dist/{is-retriable-error-Dpt860if.cjs → is-retriable-error-CeeuHqDa.cjs} +1 -1
  87. package/dist/{lace-context-BZciB9c7.js → lace-context-CZcNHr4M.js} +4 -4
  88. package/dist/{lace-context-DgR6vLli.cjs → lace-context-fJTDghdp.cjs} +4 -4
  89. package/dist/{libsodium-wrappers-BhbOA8dQ.js → libsodium-wrappers-UH0LaOUE.js} +1647 -3
  90. package/dist/modules-cardano-BDvuL4Xx.js +5248 -0
  91. package/dist/modules-cardano-D2G3De2P.cjs +5432 -0
  92. package/dist/{retry-config-Dmgt28wM.js → retry-config-BcUmMS--.js} +1 -1
  93. package/dist/{retry-config-BaCfVC1H.cjs → retry-config-DC5IMaH7.cjs} +1 -1
  94. package/dist/{seam-cardano-B_etH4F4.js → seam-cardano-CATqBEyK.js} +1 -1
  95. package/dist/{signer-factory-B7PMe3lQ.js → signer-factory-9URFliA5.js} +3 -6
  96. package/dist/{signer-factory-DduwpsQj.cjs → signer-factory-BWGUmnvm.cjs} +3 -4
  97. package/dist/{slice-CqVNnz-j.js → slice-B2PhoWAg.js} +125 -316
  98. package/dist/{slice-DyNs7oWp.js → slice-BNu73oBa.js} +2 -2
  99. package/dist/{slice-GwiiJRoq.js → slice-CB4SnzMm.js} +3 -3
  100. package/dist/slice-CGVHXHDt.cjs +125 -0
  101. package/dist/{slice-CU80pbiu.js → slice-CnyWevM9.js} +3 -3
  102. package/dist/{slice-CwyYrh1H.js → slice-CobanYgn.js} +2 -2
  103. package/dist/{slice-7G2xxYKJ.cjs → slice-CuHUaPZx.cjs} +3 -3
  104. package/dist/{slice-DayJvMRD.cjs → slice-D11m2EKl.cjs} +1 -1
  105. package/dist/{slice-Bg6HEr3K.cjs → slice-DGcNrbPR.cjs} +4 -4
  106. package/dist/{slice-B4CdYoPu.cjs → slice-DZmQJNV8.cjs} +2 -2
  107. package/dist/slice-DhvF7L6X.js +107 -0
  108. package/dist/{slice-C9TT5KhY.cjs → slice-Do2R2CYW.cjs} +6 -6
  109. package/dist/{slice-Bs2aMERu.cjs → slice-DtaO72qY.cjs} +3 -3
  110. package/dist/{slice-C34iOOUH.cjs → slice-HeHCv3bl.cjs} +7 -7
  111. package/dist/{slice-D-9aPKG-.js → slice-d0p6-xj5.js} +6 -6
  112. package/dist/{slice-CK07EBCo.js → slice-eIwcwKHI.js} +4 -4
  113. package/dist/{slice-DBpJ2QGf.js → slice-maaskdUn.js} +6 -6
  114. package/dist/{slice-6sP0Qs5V.cjs → slice-mxLQ_FeY.cjs} +127 -343
  115. package/dist/{slice-DnG-yvpI.cjs → slice-oqm_r1cS.cjs} +2 -2
  116. package/dist/{slice-Da426sf9.js → slice-zJ9XVYjZ.js} +1 -1
  117. package/dist/{sync-operation-utils-KT5Y9yFK.js → sync-operation-utils-BYXLO80m.js} +52 -1
  118. package/dist/{sync-operation-utils-C9kcmjKH.cjs → sync-operation-utils-SdPbwFoD.cjs} +87 -0
  119. package/dist/{token-id-mapper-qx7XfH0b.js → token-id-mapper-B2ivlLv3.js} +2 -2
  120. package/dist/{token-id-mapper-IApjwuJb.cjs → token-id-mapper-DsPAL6Nh.cjs} +2 -2
  121. package/dist/{util-D1e0skzp.js → util-BaLzwa32.js} +1 -1
  122. package/dist/{util-BeG7WXzM.cjs → util-CGzqQ8IV.cjs} +1 -1
  123. package/dist/{utils-DsElZgCI.cjs → utils-5JvjbqH3.cjs} +1 -7
  124. package/dist/{utils-BfBEUvWA.js → utils-o8aMjfln.js} +2 -2
  125. package/dist/{vote-delegation-tx-builder-CtdIgaIt.cjs → vote-delegation-tx-builder-BpEMSti4.cjs} +6 -6
  126. package/dist/{vote-delegation-tx-builder-CQjGvVNZ.js → vote-delegation-tx-builder-CmKv6GoG.js} +5 -5
  127. package/package.json +4 -96
  128. package/dist/_polyfill-buffer-patch-yNxN4d5E.js +0 -1467
  129. package/dist/_web-crypto-random-bytes-Bo-GTcRS.js +0 -197
  130. package/dist/acc-module-4iIUv6My.cjs +0 -27654
  131. package/dist/acc-module-Cmj8EsIb.js +0 -27624
  132. package/dist/account-BlYkEmcs.cjs +0 -11
  133. package/dist/account-DVX0F5_M.js +0 -6
  134. package/dist/account-call-D68oF6bh.js +0 -267
  135. package/dist/account-call-DIIa2rK_.cjs +0 -314
  136. package/dist/account-call-NgLhYein.cjs +0 -4
  137. package/dist/account-call-n-Nkp35e.js +0 -3
  138. package/dist/account-guards-BtjTGxDZ.cjs +0 -42
  139. package/dist/account-guards-D9Lu5T3W.js +0 -36
  140. package/dist/account-tokens-CtN2BaFy.js +0 -16
  141. package/dist/account-tokens-DXr8DlpW.cjs +0 -21
  142. package/dist/address-B9ntKL8K.js +0 -13761
  143. package/dist/address-BXp-mY8H.cjs +0 -11270
  144. package/dist/address-book-address-validator-DK0dnsRS.cjs +0 -41
  145. package/dist/address-book-address-validator-Di_ywo8M.js +0 -39
  146. package/dist/artefact-loader-54uK5RAa.js +0 -160
  147. package/dist/artefact-loader-DZPYrq-6.cjs +0 -183
  148. package/dist/auto-dismiss-failure-on-success-C-qoJuid.cjs +0 -37
  149. package/dist/auto-dismiss-failure-on-success-s8MGDEIu.js +0 -31
  150. package/dist/bip32-D6wd_QMn.cjs +0 -3851
  151. package/dist/bitcoin-data-provider-BYPSmuZS.js +0 -21
  152. package/dist/bitcoin-data-provider-w1oEDSU3.cjs +0 -26
  153. package/dist/bn-d3nSOIf7.cjs +0 -2553
  154. package/dist/browser-B1eMbDwh.js +0 -7468
  155. package/dist/bytes.vo-BB7_4JK6.js +0 -23
  156. package/dist/bytes.vo-BNRquqaO.cjs +0 -34
  157. package/dist/cardano-DfPwhwm-.js +0 -3
  158. package/dist/client-DXBLHk7K.cjs +0 -808
  159. package/dist/codecs-Cswkg7Tm.cjs +0 -4051
  160. package/dist/codecs-Dc1Krpbt.js +0 -3903
  161. package/dist/const-BfEnY8fg.js +0 -153
  162. package/dist/const-BhYOdznB.cjs +0 -42
  163. package/dist/const-CUnCl5U0.js +0 -13
  164. package/dist/const-DLrX5SD9.cjs +0 -31995
  165. package/dist/contract-C_CBwwiC.cjs +0 -189
  166. package/dist/contract-s_x-9-lz.js +0 -171
  167. package/dist/create-add-accounts-Brqk84vF.js +0 -102
  168. package/dist/create-add-accounts-DzXIh7Ot.cjs +0 -114
  169. package/dist/device-commitment-hex.vo-5wFtQvDS.js +0 -26
  170. package/dist/device-commitment-hex.vo-CT3RmAug.cjs +0 -31
  171. package/dist/device-readers-70i7tQqU.cjs +0 -8
  172. package/dist/device-readers-B7--ezKM.js +0 -4
  173. package/dist/device-readers-BWOmz9eD.js +0 -145
  174. package/dist/device-readers-CIgYZN7f.cjs +0 -168
  175. package/dist/dist-BMi5ZjEq.cjs +0 -43175
  176. package/dist/dist-BtIq4XFn.cjs +0 -535
  177. package/dist/dist-C3SHC_Ho.cjs +0 -1394
  178. package/dist/dist-CykEjYEX.cjs +0 -3814
  179. package/dist/dist-Dcsxh3be.cjs +0 -3452
  180. package/dist/dist-DqJfSlTd.cjs +0 -4413
  181. package/dist/dist-nTZ70qj7.cjs +0 -1306
  182. package/dist/enc-key-circuits-C8fGAMEF.cjs +0 -24
  183. package/dist/enc-key-circuits-DA2Xs3vZ.js +0 -13
  184. package/dist/english-Byb9M0E_.cjs +0 -2057
  185. package/dist/envelopes-BkH1Qdxk.js +0 -1620
  186. package/dist/envelopes-ETZEJS_O.cjs +0 -1721
  187. package/dist/errors-BZ8hnhCM.cjs +0 -584
  188. package/dist/errors-DIJTAsLa.js +0 -392
  189. package/dist/esm-HBSUQw3w.js +0 -384
  190. package/dist/esm-LZuaZjMf.cjs +0 -389
  191. package/dist/experimental.cjs +0 -7073
  192. package/dist/experimental.d.ts +0 -84347
  193. package/dist/experimental.js +0 -6915
  194. package/dist/gated-call-Boy6rXdC.js +0 -3
  195. package/dist/gated-call-DJWY299W.cjs +0 -736
  196. package/dist/gated-call-DjoRPqn1.js +0 -695
  197. package/dist/gated-call-SomdJ5nj.cjs +0 -4
  198. package/dist/grant-circuits-_1x--moV.cjs +0 -49
  199. package/dist/grant-circuits-swuzEdUl.js +0 -26
  200. package/dist/grant-rules-7Zqi_3BN.cjs +0 -7114
  201. package/dist/grant-rules-_xJHAT2M.js +0 -6833
  202. package/dist/grant-status-B2y49iIu.js +0 -2688
  203. package/dist/grant-status-DOr3t_u8.cjs +0 -2820
  204. package/dist/grants--b0LQQzZ.cjs +0 -266
  205. package/dist/grants-BIs6qm3b.js +0 -213
  206. package/dist/grants-CSgfYlOO.js +0 -5
  207. package/dist/grants-D61131nK.cjs +0 -17
  208. package/dist/hex-D9ITYbwt.cjs +0 -263
  209. package/dist/hex-mkXcV3pN.js +0 -191
  210. package/dist/http-client-B3N-TMxu.cjs +0 -167
  211. package/dist/http-client-TRlhDZGh.js +0 -155
  212. package/dist/identity-BMLuufva.cjs +0 -263
  213. package/dist/identity-DII6f-h7.js +0 -233
  214. package/dist/in-memory-wallet-integration-B2xzxORj.cjs +0 -20741
  215. package/dist/in-memory-wallet-integration-CUKesGG1.js +0 -130
  216. package/dist/in-memory-wallet-integration-CoPx69lQ.cjs +0 -240
  217. package/dist/in-memory-wallet-integration-TM9bBphA.js +0 -20738
  218. package/dist/init-B5X_sGj9.cjs +0 -6
  219. package/dist/init-BJn-8_hf.js +0 -141
  220. package/dist/init-Bp6yJk31.js +0 -1142
  221. package/dist/init-Bu4iXcTH.cjs +0 -34
  222. package/dist/init-C00gw1zi.js +0 -422
  223. package/dist/init-CIjZaQvL.js +0 -3584
  224. package/dist/init-CR7BfztQ.cjs +0 -18
  225. package/dist/init-Cp8EJGbm.js +0 -5
  226. package/dist/init-CpIadSUb.js +0 -33
  227. package/dist/init-D5UiYI12.cjs +0 -106
  228. package/dist/init-DAikR9qU.js +0 -1177
  229. package/dist/init-DGjXwWs2.cjs +0 -143
  230. package/dist/init-DHrCbpkW.cjs +0 -121
  231. package/dist/init-DU5yYX5u.js +0 -2374
  232. package/dist/init-DWvkFDkc.cjs +0 -1176
  233. package/dist/init-DY1unoGb.cjs +0 -1141
  234. package/dist/init-DlqJuHhl.js +0 -119
  235. package/dist/init-DuYENxci.js +0 -17
  236. package/dist/init-E7c40ddW.cjs +0 -3585
  237. package/dist/init-GsT2AEa4.cjs +0 -424
  238. package/dist/init-KQnIdm39.js +0 -104
  239. package/dist/init-ZjNDDC-T.cjs +0 -2375
  240. package/dist/jubjub-authoriser-BxE3oN2y.js +0 -86
  241. package/dist/jubjub-authoriser-C6SDEP9I.cjs +0 -87
  242. package/dist/key-source-5oUBFiC7.cjs +0 -583
  243. package/dist/key-source-B08HukZg.js +0 -2550
  244. package/dist/keyDerivation-D3k9XyHg.js +0 -4077
  245. package/dist/keyDerivation-u0nBA93T.cjs +0 -274
  246. package/dist/lib--iqvW4O_.js +0 -2354
  247. package/dist/lib-Yk6Upl5D.cjs +0 -2359
  248. package/dist/midnight-account-id.vo-0x9X-r3l.cjs +0 -10
  249. package/dist/midnight-account-id.vo-DjCAGcqc.js +0 -5
  250. package/dist/midnight-engine-DpemplKO.js +0 -5
  251. package/dist/midnight-engine-xU1wotne.cjs +0 -6
  252. package/dist/midnight-wallet-DIsAlSn6.js +0 -18
  253. package/dist/midnight-wallet-XTZc2li7.cjs +0 -24
  254. package/dist/midnight.cjs +0 -1406
  255. package/dist/midnight.d.ts +0 -28586
  256. package/dist/midnight.js +0 -1350
  257. package/dist/modules-cardano-CtWLntet.cjs +0 -1108
  258. package/dist/modules-cardano-D2dkeKHY.js +0 -995
  259. package/dist/node-relay-Cv0cNknM.js +0 -48
  260. package/dist/node-relay-DblH5fKv.cjs +0 -49
  261. package/dist/outputs-Bd2yZVjx.js +0 -720
  262. package/dist/outputs-CJoQBIA2.cjs +0 -990
  263. package/dist/pbkdf2-CIW-oWrm.cjs +0 -1337
  264. package/dist/pending-operation-B0_P78Jo.cjs +0 -26
  265. package/dist/pending-operation-BIS6mpjB.js +0 -21
  266. package/dist/providers-BLgJ0uQs.cjs +0 -366
  267. package/dist/providers-CwnT4vEE.js +0 -343
  268. package/dist/redacted-BmE2aXqr.js +0 -81
  269. package/dist/redacted-CRZJLS3w.cjs +0 -86
  270. package/dist/safe-buffer-B_vMqJWU.js +0 -43
  271. package/dist/safe-buffer-DYOwEfHB.cjs +0 -48
  272. package/dist/sdk-DIcjlgLF.js +0 -1241
  273. package/dist/sdk-Dgal10kG.cjs +0 -1439
  274. package/dist/sdk-init-BKkqFtWZ.cjs +0 -3791
  275. package/dist/sdk-init-DNd-oQXp.js +0 -1044
  276. package/dist/send-proof-progress-DTK3ZuYB.js +0 -22
  277. package/dist/send-proof-progress-dDoqIohG.cjs +0 -33
  278. package/dist/side-effects-BnqYz7Nl.js +0 -768
  279. package/dist/side-effects-CngaeXi0.cjs +0 -804
  280. package/dist/sign-bitcoin-transaction-with-seed-D4z62-jV.js +0 -147
  281. package/dist/sign-bitcoin-transaction-with-seed-DsLYXnCY.cjs +0 -158
  282. package/dist/signer-3fk8lZtE.cjs +0 -7
  283. package/dist/signer-CsL28DrK.cjs +0 -121
  284. package/dist/signer-DGluibtn.js +0 -92
  285. package/dist/signer-RqB5pu3K.js +0 -2
  286. package/dist/signer-factory-BA7WFJVZ.js +0 -282
  287. package/dist/signer-factory-CORIG4Yl.cjs +0 -130
  288. package/dist/signer-factory-Cd2TwD50.js +0 -129
  289. package/dist/signer-factory-Cwd6o-lG.cjs +0 -281
  290. package/dist/slice-BOyAAaj0.cjs +0 -378
  291. package/dist/slice-BnTJeMOb.js +0 -354
  292. package/dist/slice-C4uXUT7S.js +0 -9013
  293. package/dist/slice-CxKWDuBP.js +0 -87
  294. package/dist/slice-DQv_RhsI.cjs +0 -9031
  295. package/dist/slice-HjLXJyQG2.cjs +0 -105
  296. package/dist/src-BDzYIksE.cjs +0 -20637
  297. package/dist/src-BFoefPv_.js +0 -20755
  298. package/dist/store-B1Lq3cEf.cjs +0 -66
  299. package/dist/store-DuBG8qh5.js +0 -37
  300. package/dist/submit-BBYjnZu8.cjs +0 -87
  301. package/dist/submit-D_yxYM_T.js +0 -70
  302. package/dist/submit-bitcoin-tx-BkZIeF4b.js +0 -983
  303. package/dist/submit-bitcoin-tx-DZNQgihl.cjs +0 -1049
  304. package/dist/token-id-mapper-Bnds3xKH.cjs +0 -18
  305. package/dist/token-id-mapper-CnKHQ8DV.js +0 -16
  306. package/dist/tokens-Cevp7rdU.cjs +0 -62
  307. package/dist/tokens-Diw4MLRM.js +0 -44
  308. package/dist/types-B8uiJn-X.js +0 -12
  309. package/dist/types-CJT6XF2c.js +0 -10
  310. package/dist/types-CLRUYpfe.cjs +0 -23
  311. package/dist/types-DWbVZpnF.cjs +0 -15
  312. package/dist/types-T0cjaR75.js +0 -33
  313. package/dist/types-Zj78LtYu.cjs +0 -50
  314. package/dist/unwrap-provider-result-BZSiwabU.js +0 -32
  315. package/dist/unwrap-provider-result-ZqfBsTkk.cjs +0 -39
  316. package/dist/utils-BfMdr_1w.cjs +0 -112
  317. package/dist/utils-CvAW5Yw7.js +0 -65
  318. package/dist/v8Signatures-CO_Uloy7.cjs +0 -71
  319. package/dist/watch-Cz1J42um.cjs +0 -52205
  320. package/dist/watch-Z53L4yoK.js +0 -13054
  321. /package/dist/{account-id.vo-DwqFjK5u.cjs → account-id.vo-LvCBVn5r.cjs} +0 -0
  322. /package/dist/{account-id.vo-OPz2v-JZ.js → account-id.vo-MYSI7YFm.js} +0 -0
  323. /package/dist/{actions-iLXdgL5Y.js → actions-9QSQR-GB.js} +0 -0
  324. /package/dist/{actions-B2BJ4RTy.cjs → actions-DdGbj7c7.cjs} +0 -0
  325. /package/dist/{apply-vkey-witnesses-ZnFS0jnJ.cjs → apply-vkey-witnesses-CLzVSWxl.cjs} +0 -0
  326. /package/dist/{apply-vkey-witnesses-BKx3lcs0.js → apply-vkey-witnesses-ClZbpk5w.js} +0 -0
  327. /package/dist/{asyncoption-CruEYOBI.js → asyncoption-Cw07zPH7.js} +0 -0
  328. /package/dist/{asyncoption-i0VbqVTq.cjs → asyncoption-DYoGuQfP.cjs} +0 -0
  329. /package/dist/{bignum.vo-CEXOIew0.js → bignum.vo-B0rK_PQ1.js} +0 -0
  330. /package/dist/{bignum.vo-hx2kuqlA.cjs → bignum.vo-DsG3kNiZ.cjs} +0 -0
  331. /package/dist/{bip32ed25519-B7Yat217.cjs → bip32ed25519-1ApqeAZk.cjs} +0 -0
  332. /package/dist/{bip32ed25519-FQ8qvdcq.js → bip32ed25519-DetAdGwD.js} +0 -0
  333. /package/dist/{blake2b-DEeVUdKR.cjs → blake2b-B9tftbvG.cjs} +0 -0
  334. /package/dist/{blake2b-BiQTw3GC.js → blake2b-DOEVc57D.js} +0 -0
  335. /package/dist/{blockchain-network-id.vo-BAKEwGjG.cjs → blockchain-network-id.vo-BXpZhvvQ.cjs} +0 -0
  336. /package/dist/{blockchain-network-id.vo-CiVykuqG.js → blockchain-network-id.vo-DNRkuT5B.js} +0 -0
  337. /package/dist/{blockingWithLatestFrom-Cd8c8EPG.js → blockingWithLatestFrom-C5wp_uA-.js} +0 -0
  338. /package/dist/{blockingWithLatestFrom-D8kBPBMX.cjs → blockingWithLatestFrom-DY8OPg0w.cjs} +0 -0
  339. /package/dist/{cardano-network-id-to-network-type-C0ufJOyE.cjs → cardano-network-id-to-network-type-BDTF-HmK.cjs} +0 -0
  340. /package/dist/{cardano-network-id-to-network-type-BWwzeEtM.js → cardano-network-id-to-network-type-CrZfUcyP.js} +0 -0
  341. /package/dist/{cardano-tx-id.vo-D3ASTIMd.cjs → cardano-tx-id.vo-BPhV-AmZ.cjs} +0 -0
  342. /package/dist/{cardano-tx-id.vo-BXLo1b7Q.js → cardano-tx-id.vo-DF9NzZXk.js} +0 -0
  343. /package/dist/{composite-signer-factory-m5cVs9h_.cjs → composite-signer-factory-BpF1mIYA.cjs} +0 -0
  344. /package/dist/{composite-signer-factory-CR8YHA1y.js → composite-signer-factory-_46QsNBz.js} +0 -0
  345. /package/dist/{error-DIZOY2Lw.js → error-BCp9NkPi.js} +0 -0
  346. /package/dist/{error-Cb3EnD0u.cjs → error-CNIquqT5.cjs} +0 -0
  347. /package/dist/{esm-browser-MG97cre9.js → esm-browser-C93Q-EOI.js} +0 -0
  348. /package/dist/{esm-browser-bweqfBlL.cjs → esm-browser-DTc9IK3D.cjs} +0 -0
  349. /package/dist/{feature-flag-key.vo-RlfHL3hq.cjs → feature-flag-key.vo-BPz-ZAp6.cjs} +0 -0
  350. /package/dist/{feature-flag-key.vo-DN_-4-sG.js → feature-flag-key.vo-ofrB6ZVQ.js} +0 -0
  351. /package/dist/{first-state-of-status-unPynOuM.js → first-state-of-status-DQnMT3ya.js} +0 -0
  352. /package/dist/{first-state-of-status-CbT7hPa4.cjs → first-state-of-status-OROkXcRv.cjs} +0 -0
  353. /package/dist/{init-zUoRG_EC2.cjs → init-C5CEZ1m0.cjs} +0 -0
  354. /package/dist/{init-DHaMxHM1.js → init-CKipPE_c.js} +0 -0
  355. /package/dist/{init-Atisw4x2.cjs → init-DFQQ9dTW.cjs} +0 -0
  356. /package/dist/{init-829HRYcz.js → init-Es3wHW7D.js} +0 -0
  357. /package/dist/{init-BgNobbNq.cjs → init-IAk_CkGa.cjs} +0 -0
  358. /package/dist/{init-atCFur0v.js → init-cqN3uX2j.js} +0 -0
  359. /package/dist/{is-redux-persist-state-BCFnSm36.cjs → is-redux-persist-state-CTn3WZVh.cjs} +0 -0
  360. /package/dist/{is-redux-persist-state-yBfq0h_E.js → is-redux-persist-state-Cxcd0_bM.js} +0 -0
  361. /package/dist/{key-value-store--W3SrMaw.js → key-value-store-8cMzeNyG.js} +0 -0
  362. /package/dist/{key-value-store-C2Xt5Emp.cjs → key-value-store-DUAepXQf.cjs} +0 -0
  363. /package/dist/{repo-slice-RxFm0zDZ.js → repo-slice-DwyMhCR1.js} +0 -0
  364. /package/dist/{repo-slice-7X4AYYVm.cjs → repo-slice-WxetRhMY.cjs} +0 -0
  365. /package/dist/{reselect-CGoLzEPv.js → reselect-C06X06oX.js} +0 -0
  366. /package/dist/{reselect-Bd94u0K-.cjs → reselect-CRDqmQY9.cjs} +0 -0
  367. /package/dist/{serializable-BHdKIgk3.js → serializable-B8GahgE1.js} +0 -0
  368. /package/dist/{serializable-BxHkoPdk.cjs → serializable-CRdnFaLZ.cjs} +0 -0
  369. /package/dist/{slice-obCSLm1x.js → slice-B87b52iM.js} +0 -0
  370. /package/dist/{slice-Bk0Sv05J.js → slice-Be7hj4Iy.js} +0 -0
  371. /package/dist/{slice-BiRsDKOK.cjs → slice-D11FHQuQ.cjs} +0 -0
  372. /package/dist/{slice-Dqw1ecum.cjs → slice-FioKeHtA.cjs} +0 -0
  373. /package/dist/{src-Cqp0B2M_.cjs → src-BTPIvlDI.cjs} +0 -0
  374. /package/dist/{src-BlxEp6Mm.js → src-vq1wS9sZ.js} +0 -0
  375. /package/dist/{time.vo-D3wWRw9L.cjs → time.vo-CQ8pSXz2.cjs} +0 -0
  376. /package/dist/{time.vo-tNheinXm.js → time.vo-DkYYGYp6.js} +0 -0
  377. /package/dist/{toEmpty-8Zax1MPd.js → toEmpty-CgAl3097.js} +0 -0
  378. /package/dist/{toEmpty-CYAbupM4.cjs → toEmpty-DAMmNB5r.cjs} +0 -0
  379. /package/dist/{token-id.vo-DXv5uS9n.cjs → token-id.vo-BxG9TG0O.cjs} +0 -0
  380. /package/dist/{token-id.vo-Bvwhr3ZE.js → token-id.vo-ClsroxHO.js} +0 -0
  381. /package/dist/{util-CzeB3hfa.cjs → util-CmdAhheh.cjs} +0 -0
  382. /package/dist/{util-C8a4fA9p.js → util-DxzlYNS5.js} +0 -0
  383. /package/dist/{util-selector-BWPH68_l.cjs → util-selector-BcAncU4L.cjs} +0 -0
  384. /package/dist/{util-selector-BSTsxgne.js → util-selector-CcK-GAdE.js} +0 -0
  385. /package/dist/{while-active-B0lWy_6l.js → while-active-BpppWuCs.js} +0 -0
  386. /package/dist/{while-active-Dsowp0Fi.cjs → while-active-Dhc2LwOm.cjs} +0 -0
@@ -0,0 +1,1882 @@
1
+ //#region ../../node_modules/@noble/hashes/esm/_u64.js
2
+ /**
3
+ * Internal helpers for u64. BigUint64Array is too slow as per 2025, so we implement it using Uint32Array.
4
+ * @todo re-check https://issues.chromium.org/issues/42212588
5
+ * @module
6
+ */
7
+ const U32_MASK64 = /* @__PURE__ */ BigInt(2 ** 32 - 1);
8
+ const _32n = /* @__PURE__ */ BigInt(32);
9
+ function fromBig(n, le = false) {
10
+ if (le) return {
11
+ h: Number(n & U32_MASK64),
12
+ l: Number(n >> _32n & U32_MASK64)
13
+ };
14
+ return {
15
+ h: Number(n >> _32n & U32_MASK64) | 0,
16
+ l: Number(n & U32_MASK64) | 0
17
+ };
18
+ }
19
+ function split(lst, le = false) {
20
+ const len = lst.length;
21
+ let Ah = new Uint32Array(len);
22
+ let Al = new Uint32Array(len);
23
+ for (let i = 0; i < len; i++) {
24
+ const { h, l } = fromBig(lst[i], le);
25
+ [Ah[i], Al[i]] = [h, l];
26
+ }
27
+ return [Ah, Al];
28
+ }
29
+ const shrSH = (h, _l, s) => h >>> s;
30
+ const shrSL = (h, l, s) => h << 32 - s | l >>> s;
31
+ const rotrSH = (h, l, s) => h >>> s | l << 32 - s;
32
+ const rotrSL = (h, l, s) => h << 32 - s | l >>> s;
33
+ const rotrBH = (h, l, s) => h << 64 - s | l >>> s - 32;
34
+ const rotrBL = (h, l, s) => h >>> s - 32 | l << 64 - s;
35
+ const rotr32H = (_h, l) => l;
36
+ const rotr32L = (h, _l) => h;
37
+ function add(Ah, Al, Bh, Bl) {
38
+ const l = (Al >>> 0) + (Bl >>> 0);
39
+ return {
40
+ h: Ah + Bh + (l / 2 ** 32 | 0) | 0,
41
+ l: l | 0
42
+ };
43
+ }
44
+ const add3L = (Al, Bl, Cl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0);
45
+ const add3H = (low, Ah, Bh, Ch) => Ah + Bh + Ch + (low / 2 ** 32 | 0) | 0;
46
+ const add4L = (Al, Bl, Cl, Dl) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0);
47
+ const add4H = (low, Ah, Bh, Ch, Dh) => Ah + Bh + Ch + Dh + (low / 2 ** 32 | 0) | 0;
48
+ const add5L = (Al, Bl, Cl, Dl, El) => (Al >>> 0) + (Bl >>> 0) + (Cl >>> 0) + (Dl >>> 0) + (El >>> 0);
49
+ const add5H = (low, Ah, Bh, Ch, Dh, Eh) => Ah + Bh + Ch + Dh + Eh + (low / 2 ** 32 | 0) | 0;
50
+ //#endregion
51
+ //#region ../../node_modules/@noble/hashes/esm/crypto.js
52
+ const crypto = typeof globalThis === "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
53
+ //#endregion
54
+ //#region ../../node_modules/@noble/hashes/esm/utils.js
55
+ /**
56
+ * Utilities for hex, bytes, CSPRNG.
57
+ * @module
58
+ */
59
+ /*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */
60
+ /** Checks if something is Uint8Array. Be careful: nodejs Buffer will return true. */
61
+ function isBytes(a) {
62
+ return a instanceof Uint8Array || ArrayBuffer.isView(a) && a.constructor.name === "Uint8Array";
63
+ }
64
+ /** Asserts something is positive integer. */
65
+ function anumber(n) {
66
+ if (!Number.isSafeInteger(n) || n < 0) throw new Error("positive integer expected, got " + n);
67
+ }
68
+ /** Asserts something is Uint8Array. */
69
+ function abytes(b, ...lengths) {
70
+ if (!isBytes(b)) throw new Error("Uint8Array expected");
71
+ if (lengths.length > 0 && !lengths.includes(b.length)) throw new Error("Uint8Array expected of length " + lengths + ", got length=" + b.length);
72
+ }
73
+ /** Asserts something is hash */
74
+ function ahash(h) {
75
+ if (typeof h !== "function" || typeof h.create !== "function") throw new Error("Hash should be wrapped by utils.createHasher");
76
+ anumber(h.outputLen);
77
+ anumber(h.blockLen);
78
+ }
79
+ /** Asserts a hash instance has not been destroyed / finished */
80
+ function aexists(instance, checkFinished = true) {
81
+ if (instance.destroyed) throw new Error("Hash instance has been destroyed");
82
+ if (checkFinished && instance.finished) throw new Error("Hash#digest() has already been called");
83
+ }
84
+ /** Asserts output is properly-sized byte array */
85
+ function aoutput(out, instance) {
86
+ abytes(out);
87
+ const min = instance.outputLen;
88
+ if (out.length < min) throw new Error("digestInto() expects output buffer of length at least " + min);
89
+ }
90
+ /** Cast u8 / u16 / u32 to u8. */
91
+ function u8(arr) {
92
+ return new Uint8Array(arr.buffer, arr.byteOffset, arr.byteLength);
93
+ }
94
+ /** Cast u8 / u16 / u32 to u32. */
95
+ function u32(arr) {
96
+ return new Uint32Array(arr.buffer, arr.byteOffset, Math.floor(arr.byteLength / 4));
97
+ }
98
+ /** Zeroize a byte array. Warning: JS provides no guarantees. */
99
+ function clean(...arrays) {
100
+ for (let i = 0; i < arrays.length; i++) arrays[i].fill(0);
101
+ }
102
+ /** Create DataView of an array for easy byte-level manipulation. */
103
+ function createView(arr) {
104
+ return new DataView(arr.buffer, arr.byteOffset, arr.byteLength);
105
+ }
106
+ /** The rotate right (circular right shift) operation for uint32 */
107
+ function rotr(word, shift) {
108
+ return word << 32 - shift | word >>> shift;
109
+ }
110
+ /** Is current platform little-endian? Most are. Big-Endian platform: IBM */
111
+ const isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
112
+ /** The byte swap operation for uint32 */
113
+ function byteSwap(word) {
114
+ return word << 24 & 4278190080 | word << 8 & 16711680 | word >>> 8 & 65280 | word >>> 24 & 255;
115
+ }
116
+ /** Conditionally byte swap if on a big-endian platform */
117
+ const swap8IfBE = isLE ? (n) => n : (n) => byteSwap(n);
118
+ /** In place byte swap for Uint32Array */
119
+ function byteSwap32(arr) {
120
+ for (let i = 0; i < arr.length; i++) arr[i] = byteSwap(arr[i]);
121
+ return arr;
122
+ }
123
+ const swap32IfBE = isLE ? (u) => u : byteSwap32;
124
+ const hasHexBuiltin = typeof Uint8Array.from([]).toHex === "function" && typeof Uint8Array.fromHex === "function";
125
+ const hexes = /* @__PURE__ */ Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
126
+ /**
127
+ * Convert byte array to hex string. Uses built-in function, when available.
128
+ * @example bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])) // 'cafe0123'
129
+ */
130
+ function bytesToHex(bytes) {
131
+ abytes(bytes);
132
+ if (hasHexBuiltin) return bytes.toHex();
133
+ let hex = "";
134
+ for (let i = 0; i < bytes.length; i++) hex += hexes[bytes[i]];
135
+ return hex;
136
+ }
137
+ const asciis = {
138
+ _0: 48,
139
+ _9: 57,
140
+ A: 65,
141
+ F: 70,
142
+ a: 97,
143
+ f: 102
144
+ };
145
+ function asciiToBase16(ch) {
146
+ if (ch >= asciis._0 && ch <= asciis._9) return ch - asciis._0;
147
+ if (ch >= asciis.A && ch <= asciis.F) return ch - (asciis.A - 10);
148
+ if (ch >= asciis.a && ch <= asciis.f) return ch - (asciis.a - 10);
149
+ }
150
+ /**
151
+ * Convert hex string to byte array. Uses built-in function, when available.
152
+ * @example hexToBytes('cafe0123') // Uint8Array.from([0xca, 0xfe, 0x01, 0x23])
153
+ */
154
+ function hexToBytes(hex) {
155
+ if (typeof hex !== "string") throw new Error("hex string expected, got " + typeof hex);
156
+ if (hasHexBuiltin) return Uint8Array.fromHex(hex);
157
+ const hl = hex.length;
158
+ const al = hl / 2;
159
+ if (hl % 2) throw new Error("hex string expected, got unpadded hex of length " + hl);
160
+ const array = new Uint8Array(al);
161
+ for (let ai = 0, hi = 0; ai < al; ai++, hi += 2) {
162
+ const n1 = asciiToBase16(hex.charCodeAt(hi));
163
+ const n2 = asciiToBase16(hex.charCodeAt(hi + 1));
164
+ if (n1 === void 0 || n2 === void 0) {
165
+ const char = hex[hi] + hex[hi + 1];
166
+ throw new Error("hex string expected, got non-hex character \"" + char + "\" at index " + hi);
167
+ }
168
+ array[ai] = n1 * 16 + n2;
169
+ }
170
+ return array;
171
+ }
172
+ /**
173
+ * There is no setImmediate in browser and setTimeout is slow.
174
+ * Call of async fn will return Promise, which will be fullfiled only on
175
+ * next scheduler queue processing step and this is exactly what we need.
176
+ */
177
+ const nextTick = async () => {};
178
+ /**
179
+ * Converts string to bytes using UTF8 encoding.
180
+ * @example utf8ToBytes('abc') // Uint8Array.from([97, 98, 99])
181
+ */
182
+ function utf8ToBytes(str) {
183
+ if (typeof str !== "string") throw new Error("string expected");
184
+ return new Uint8Array(new TextEncoder().encode(str));
185
+ }
186
+ /**
187
+ * Normalizes (non-hex) string or Uint8Array to Uint8Array.
188
+ * Warning: when Uint8Array is passed, it would NOT get copied.
189
+ * Keep in mind for future mutable operations.
190
+ */
191
+ function toBytes(data) {
192
+ if (typeof data === "string") data = utf8ToBytes(data);
193
+ abytes(data);
194
+ return data;
195
+ }
196
+ /**
197
+ * Helper for KDFs: consumes uint8array or string.
198
+ * When string is passed, does utf8 decoding, using TextDecoder.
199
+ */
200
+ function kdfInputToBytes(data) {
201
+ if (typeof data === "string") data = utf8ToBytes(data);
202
+ abytes(data);
203
+ return data;
204
+ }
205
+ function checkOpts(defaults, opts) {
206
+ if (opts !== void 0 && {}.toString.call(opts) !== "[object Object]") throw new Error("options should be object or undefined");
207
+ return Object.assign(defaults, opts);
208
+ }
209
+ /** For runtime check if class implements interface */
210
+ var Hash = class {};
211
+ /** Wraps hash function, creating an interface on top of it */
212
+ function createHasher(hashCons) {
213
+ const hashC = (msg) => hashCons().update(toBytes(msg)).digest();
214
+ const tmp = hashCons();
215
+ hashC.outputLen = tmp.outputLen;
216
+ hashC.blockLen = tmp.blockLen;
217
+ hashC.create = () => hashCons();
218
+ return hashC;
219
+ }
220
+ function createOptHasher(hashCons) {
221
+ const hashC = (msg, opts) => hashCons(opts).update(toBytes(msg)).digest();
222
+ const tmp = hashCons({});
223
+ hashC.outputLen = tmp.outputLen;
224
+ hashC.blockLen = tmp.blockLen;
225
+ hashC.create = (opts) => hashCons(opts);
226
+ return hashC;
227
+ }
228
+ /** Cryptographically secure PRNG. Uses internal OS-level `crypto.getRandomValues`. */
229
+ function randomBytes(bytesLength = 32) {
230
+ if (crypto && typeof crypto.getRandomValues === "function") return crypto.getRandomValues(new Uint8Array(bytesLength));
231
+ if (crypto && typeof crypto.randomBytes === "function") return Uint8Array.from(crypto.randomBytes(bytesLength));
232
+ throw new Error("crypto.getRandomValues must be defined");
233
+ }
234
+ //#endregion
235
+ //#region ../../node_modules/@noble/hashes/esm/_blake.js
236
+ /**
237
+ * Internal blake variable.
238
+ * For BLAKE2b, the two extra permutations for rounds 10 and 11 are SIGMA[10..11] = SIGMA[0..1].
239
+ */
240
+ const BSIGMA = /* @__PURE__ */ Uint8Array.from([
241
+ 0,
242
+ 1,
243
+ 2,
244
+ 3,
245
+ 4,
246
+ 5,
247
+ 6,
248
+ 7,
249
+ 8,
250
+ 9,
251
+ 10,
252
+ 11,
253
+ 12,
254
+ 13,
255
+ 14,
256
+ 15,
257
+ 14,
258
+ 10,
259
+ 4,
260
+ 8,
261
+ 9,
262
+ 15,
263
+ 13,
264
+ 6,
265
+ 1,
266
+ 12,
267
+ 0,
268
+ 2,
269
+ 11,
270
+ 7,
271
+ 5,
272
+ 3,
273
+ 11,
274
+ 8,
275
+ 12,
276
+ 0,
277
+ 5,
278
+ 2,
279
+ 15,
280
+ 13,
281
+ 10,
282
+ 14,
283
+ 3,
284
+ 6,
285
+ 7,
286
+ 1,
287
+ 9,
288
+ 4,
289
+ 7,
290
+ 9,
291
+ 3,
292
+ 1,
293
+ 13,
294
+ 12,
295
+ 11,
296
+ 14,
297
+ 2,
298
+ 6,
299
+ 5,
300
+ 10,
301
+ 4,
302
+ 0,
303
+ 15,
304
+ 8,
305
+ 9,
306
+ 0,
307
+ 5,
308
+ 7,
309
+ 2,
310
+ 4,
311
+ 10,
312
+ 15,
313
+ 14,
314
+ 1,
315
+ 11,
316
+ 12,
317
+ 6,
318
+ 8,
319
+ 3,
320
+ 13,
321
+ 2,
322
+ 12,
323
+ 6,
324
+ 10,
325
+ 0,
326
+ 11,
327
+ 8,
328
+ 3,
329
+ 4,
330
+ 13,
331
+ 7,
332
+ 5,
333
+ 15,
334
+ 14,
335
+ 1,
336
+ 9,
337
+ 12,
338
+ 5,
339
+ 1,
340
+ 15,
341
+ 14,
342
+ 13,
343
+ 4,
344
+ 10,
345
+ 0,
346
+ 7,
347
+ 6,
348
+ 3,
349
+ 9,
350
+ 2,
351
+ 8,
352
+ 11,
353
+ 13,
354
+ 11,
355
+ 7,
356
+ 14,
357
+ 12,
358
+ 1,
359
+ 3,
360
+ 9,
361
+ 5,
362
+ 0,
363
+ 15,
364
+ 4,
365
+ 8,
366
+ 6,
367
+ 2,
368
+ 10,
369
+ 6,
370
+ 15,
371
+ 14,
372
+ 9,
373
+ 11,
374
+ 3,
375
+ 0,
376
+ 8,
377
+ 12,
378
+ 2,
379
+ 13,
380
+ 7,
381
+ 1,
382
+ 4,
383
+ 10,
384
+ 5,
385
+ 10,
386
+ 2,
387
+ 8,
388
+ 4,
389
+ 7,
390
+ 6,
391
+ 1,
392
+ 5,
393
+ 15,
394
+ 11,
395
+ 9,
396
+ 14,
397
+ 3,
398
+ 12,
399
+ 13,
400
+ 0,
401
+ 0,
402
+ 1,
403
+ 2,
404
+ 3,
405
+ 4,
406
+ 5,
407
+ 6,
408
+ 7,
409
+ 8,
410
+ 9,
411
+ 10,
412
+ 11,
413
+ 12,
414
+ 13,
415
+ 14,
416
+ 15,
417
+ 14,
418
+ 10,
419
+ 4,
420
+ 8,
421
+ 9,
422
+ 15,
423
+ 13,
424
+ 6,
425
+ 1,
426
+ 12,
427
+ 0,
428
+ 2,
429
+ 11,
430
+ 7,
431
+ 5,
432
+ 3,
433
+ 11,
434
+ 8,
435
+ 12,
436
+ 0,
437
+ 5,
438
+ 2,
439
+ 15,
440
+ 13,
441
+ 10,
442
+ 14,
443
+ 3,
444
+ 6,
445
+ 7,
446
+ 1,
447
+ 9,
448
+ 4,
449
+ 7,
450
+ 9,
451
+ 3,
452
+ 1,
453
+ 13,
454
+ 12,
455
+ 11,
456
+ 14,
457
+ 2,
458
+ 6,
459
+ 5,
460
+ 10,
461
+ 4,
462
+ 0,
463
+ 15,
464
+ 8,
465
+ 9,
466
+ 0,
467
+ 5,
468
+ 7,
469
+ 2,
470
+ 4,
471
+ 10,
472
+ 15,
473
+ 14,
474
+ 1,
475
+ 11,
476
+ 12,
477
+ 6,
478
+ 8,
479
+ 3,
480
+ 13,
481
+ 2,
482
+ 12,
483
+ 6,
484
+ 10,
485
+ 0,
486
+ 11,
487
+ 8,
488
+ 3,
489
+ 4,
490
+ 13,
491
+ 7,
492
+ 5,
493
+ 15,
494
+ 14,
495
+ 1,
496
+ 9
497
+ ]);
498
+ //#endregion
499
+ //#region ../../node_modules/@noble/hashes/esm/_md.js
500
+ /**
501
+ * Internal Merkle-Damgard hash utils.
502
+ * @module
503
+ */
504
+ /** Polyfill for Safari 14. https://caniuse.com/mdn-javascript_builtins_dataview_setbiguint64 */
505
+ function setBigUint64(view, byteOffset, value, isLE) {
506
+ if (typeof view.setBigUint64 === "function") return view.setBigUint64(byteOffset, value, isLE);
507
+ const _32n = BigInt(32);
508
+ const _u32_max = BigInt(4294967295);
509
+ const wh = Number(value >> _32n & _u32_max);
510
+ const wl = Number(value & _u32_max);
511
+ const h = isLE ? 4 : 0;
512
+ const l = isLE ? 0 : 4;
513
+ view.setUint32(byteOffset + h, wh, isLE);
514
+ view.setUint32(byteOffset + l, wl, isLE);
515
+ }
516
+ /** Choice: a ? b : c */
517
+ function Chi(a, b, c) {
518
+ return a & b ^ ~a & c;
519
+ }
520
+ /** Majority function, true if any two inputs is true. */
521
+ function Maj(a, b, c) {
522
+ return a & b ^ a & c ^ b & c;
523
+ }
524
+ /**
525
+ * Merkle-Damgard hash construction base class.
526
+ * Could be used to create MD5, RIPEMD, SHA1, SHA2.
527
+ */
528
+ var HashMD = class extends Hash {
529
+ constructor(blockLen, outputLen, padOffset, isLE) {
530
+ super();
531
+ this.finished = false;
532
+ this.length = 0;
533
+ this.pos = 0;
534
+ this.destroyed = false;
535
+ this.blockLen = blockLen;
536
+ this.outputLen = outputLen;
537
+ this.padOffset = padOffset;
538
+ this.isLE = isLE;
539
+ this.buffer = new Uint8Array(blockLen);
540
+ this.view = createView(this.buffer);
541
+ }
542
+ update(data) {
543
+ aexists(this);
544
+ data = toBytes(data);
545
+ abytes(data);
546
+ const { view, buffer, blockLen } = this;
547
+ const len = data.length;
548
+ for (let pos = 0; pos < len;) {
549
+ const take = Math.min(blockLen - this.pos, len - pos);
550
+ if (take === blockLen) {
551
+ const dataView = createView(data);
552
+ for (; blockLen <= len - pos; pos += blockLen) this.process(dataView, pos);
553
+ continue;
554
+ }
555
+ buffer.set(data.subarray(pos, pos + take), this.pos);
556
+ this.pos += take;
557
+ pos += take;
558
+ if (this.pos === blockLen) {
559
+ this.process(view, 0);
560
+ this.pos = 0;
561
+ }
562
+ }
563
+ this.length += data.length;
564
+ this.roundClean();
565
+ return this;
566
+ }
567
+ digestInto(out) {
568
+ aexists(this);
569
+ aoutput(out, this);
570
+ this.finished = true;
571
+ const { buffer, view, blockLen, isLE } = this;
572
+ let { pos } = this;
573
+ buffer[pos++] = 128;
574
+ clean(this.buffer.subarray(pos));
575
+ if (this.padOffset > blockLen - pos) {
576
+ this.process(view, 0);
577
+ pos = 0;
578
+ }
579
+ for (let i = pos; i < blockLen; i++) buffer[i] = 0;
580
+ setBigUint64(view, blockLen - 8, BigInt(this.length * 8), isLE);
581
+ this.process(view, 0);
582
+ const oview = createView(out);
583
+ const len = this.outputLen;
584
+ if (len % 4) throw new Error("_sha2: outputLen should be aligned to 32bit");
585
+ const outLen = len / 4;
586
+ const state = this.get();
587
+ if (outLen > state.length) throw new Error("_sha2: outputLen bigger than state");
588
+ for (let i = 0; i < outLen; i++) oview.setUint32(4 * i, state[i], isLE);
589
+ }
590
+ digest() {
591
+ const { buffer, outputLen } = this;
592
+ this.digestInto(buffer);
593
+ const res = buffer.slice(0, outputLen);
594
+ this.destroy();
595
+ return res;
596
+ }
597
+ _cloneInto(to) {
598
+ to || (to = new this.constructor());
599
+ to.set(...this.get());
600
+ const { blockLen, buffer, length, finished, destroyed, pos } = this;
601
+ to.destroyed = destroyed;
602
+ to.finished = finished;
603
+ to.length = length;
604
+ to.pos = pos;
605
+ if (length % blockLen) to.buffer.set(buffer);
606
+ return to;
607
+ }
608
+ clone() {
609
+ return this._cloneInto();
610
+ }
611
+ };
612
+ /**
613
+ * Initial SHA-2 state: fractional parts of square roots of first 16 primes 2..53.
614
+ * Check out `test/misc/sha2-gen-iv.js` for recomputation guide.
615
+ */
616
+ /** Initial SHA256 state. Bits 0..32 of frac part of sqrt of primes 2..19 */
617
+ const SHA256_IV = /* @__PURE__ */ Uint32Array.from([
618
+ 1779033703,
619
+ 3144134277,
620
+ 1013904242,
621
+ 2773480762,
622
+ 1359893119,
623
+ 2600822924,
624
+ 528734635,
625
+ 1541459225
626
+ ]);
627
+ /** Initial SHA512 state. Bits 0..64 of frac part of sqrt of primes 2..19 */
628
+ const SHA512_IV = /* @__PURE__ */ Uint32Array.from([
629
+ 1779033703,
630
+ 4089235720,
631
+ 3144134277,
632
+ 2227873595,
633
+ 1013904242,
634
+ 4271175723,
635
+ 2773480762,
636
+ 1595750129,
637
+ 1359893119,
638
+ 2917565137,
639
+ 2600822924,
640
+ 725511199,
641
+ 528734635,
642
+ 4215389547,
643
+ 1541459225,
644
+ 327033209
645
+ ]);
646
+ //#endregion
647
+ //#region ../../node_modules/@noble/hashes/esm/blake2.js
648
+ /**
649
+ * blake2b (64-bit) & blake2s (8 to 32-bit) hash functions.
650
+ * b could have been faster, but there is no fast u64 in js, so s is 1.5x faster.
651
+ * @module
652
+ */
653
+ const B2B_IV = /* @__PURE__ */ Uint32Array.from([
654
+ 4089235720,
655
+ 1779033703,
656
+ 2227873595,
657
+ 3144134277,
658
+ 4271175723,
659
+ 1013904242,
660
+ 1595750129,
661
+ 2773480762,
662
+ 2917565137,
663
+ 1359893119,
664
+ 725511199,
665
+ 2600822924,
666
+ 4215389547,
667
+ 528734635,
668
+ 327033209,
669
+ 1541459225
670
+ ]);
671
+ const BBUF = /* @__PURE__ */ new Uint32Array(32);
672
+ function G1b(a, b, c, d, msg, x) {
673
+ const Xl = msg[x], Xh = msg[x + 1];
674
+ let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1];
675
+ let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1];
676
+ let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1];
677
+ let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1];
678
+ let ll = add3L(Al, Bl, Xl);
679
+ Ah = add3H(ll, Ah, Bh, Xh);
680
+ Al = ll | 0;
681
+ ({Dh, Dl} = {
682
+ Dh: Dh ^ Ah,
683
+ Dl: Dl ^ Al
684
+ });
685
+ ({Dh, Dl} = {
686
+ Dh: rotr32H(Dh, Dl),
687
+ Dl: rotr32L(Dh, Dl)
688
+ });
689
+ ({h: Ch, l: Cl} = add(Ch, Cl, Dh, Dl));
690
+ ({Bh, Bl} = {
691
+ Bh: Bh ^ Ch,
692
+ Bl: Bl ^ Cl
693
+ });
694
+ ({Bh, Bl} = {
695
+ Bh: rotrSH(Bh, Bl, 24),
696
+ Bl: rotrSL(Bh, Bl, 24)
697
+ });
698
+ BBUF[2 * a] = Al, BBUF[2 * a + 1] = Ah;
699
+ BBUF[2 * b] = Bl, BBUF[2 * b + 1] = Bh;
700
+ BBUF[2 * c] = Cl, BBUF[2 * c + 1] = Ch;
701
+ BBUF[2 * d] = Dl, BBUF[2 * d + 1] = Dh;
702
+ }
703
+ function G2b(a, b, c, d, msg, x) {
704
+ const Xl = msg[x], Xh = msg[x + 1];
705
+ let Al = BBUF[2 * a], Ah = BBUF[2 * a + 1];
706
+ let Bl = BBUF[2 * b], Bh = BBUF[2 * b + 1];
707
+ let Cl = BBUF[2 * c], Ch = BBUF[2 * c + 1];
708
+ let Dl = BBUF[2 * d], Dh = BBUF[2 * d + 1];
709
+ let ll = add3L(Al, Bl, Xl);
710
+ Ah = add3H(ll, Ah, Bh, Xh);
711
+ Al = ll | 0;
712
+ ({Dh, Dl} = {
713
+ Dh: Dh ^ Ah,
714
+ Dl: Dl ^ Al
715
+ });
716
+ ({Dh, Dl} = {
717
+ Dh: rotrSH(Dh, Dl, 16),
718
+ Dl: rotrSL(Dh, Dl, 16)
719
+ });
720
+ ({h: Ch, l: Cl} = add(Ch, Cl, Dh, Dl));
721
+ ({Bh, Bl} = {
722
+ Bh: Bh ^ Ch,
723
+ Bl: Bl ^ Cl
724
+ });
725
+ ({Bh, Bl} = {
726
+ Bh: rotrBH(Bh, Bl, 63),
727
+ Bl: rotrBL(Bh, Bl, 63)
728
+ });
729
+ BBUF[2 * a] = Al, BBUF[2 * a + 1] = Ah;
730
+ BBUF[2 * b] = Bl, BBUF[2 * b + 1] = Bh;
731
+ BBUF[2 * c] = Cl, BBUF[2 * c + 1] = Ch;
732
+ BBUF[2 * d] = Dl, BBUF[2 * d + 1] = Dh;
733
+ }
734
+ function checkBlake2Opts(outputLen, opts = {}, keyLen, saltLen, persLen) {
735
+ anumber(keyLen);
736
+ if (outputLen < 0 || outputLen > keyLen) throw new Error("outputLen bigger than keyLen");
737
+ const { key, salt, personalization } = opts;
738
+ if (key !== void 0 && (key.length < 1 || key.length > keyLen)) throw new Error("key length must be undefined or 1.." + keyLen);
739
+ if (salt !== void 0 && salt.length !== saltLen) throw new Error("salt must be undefined or " + saltLen);
740
+ if (personalization !== void 0 && personalization.length !== persLen) throw new Error("personalization must be undefined or " + persLen);
741
+ }
742
+ /** Class, from which others are subclassed. */
743
+ var BLAKE2 = class extends Hash {
744
+ constructor(blockLen, outputLen) {
745
+ super();
746
+ this.finished = false;
747
+ this.destroyed = false;
748
+ this.length = 0;
749
+ this.pos = 0;
750
+ anumber(blockLen);
751
+ anumber(outputLen);
752
+ this.blockLen = blockLen;
753
+ this.outputLen = outputLen;
754
+ this.buffer = new Uint8Array(blockLen);
755
+ this.buffer32 = u32(this.buffer);
756
+ }
757
+ update(data) {
758
+ aexists(this);
759
+ data = toBytes(data);
760
+ abytes(data);
761
+ const { blockLen, buffer, buffer32 } = this;
762
+ const len = data.length;
763
+ const offset = data.byteOffset;
764
+ const buf = data.buffer;
765
+ for (let pos = 0; pos < len;) {
766
+ if (this.pos === blockLen) {
767
+ swap32IfBE(buffer32);
768
+ this.compress(buffer32, 0, false);
769
+ swap32IfBE(buffer32);
770
+ this.pos = 0;
771
+ }
772
+ const take = Math.min(blockLen - this.pos, len - pos);
773
+ const dataOffset = offset + pos;
774
+ if (take === blockLen && !(dataOffset % 4) && pos + take < len) {
775
+ const data32 = new Uint32Array(buf, dataOffset, Math.floor((len - pos) / 4));
776
+ swap32IfBE(data32);
777
+ for (let pos32 = 0; pos + blockLen < len; pos32 += buffer32.length, pos += blockLen) {
778
+ this.length += blockLen;
779
+ this.compress(data32, pos32, false);
780
+ }
781
+ swap32IfBE(data32);
782
+ continue;
783
+ }
784
+ buffer.set(data.subarray(pos, pos + take), this.pos);
785
+ this.pos += take;
786
+ this.length += take;
787
+ pos += take;
788
+ }
789
+ return this;
790
+ }
791
+ digestInto(out) {
792
+ aexists(this);
793
+ aoutput(out, this);
794
+ const { pos, buffer32 } = this;
795
+ this.finished = true;
796
+ clean(this.buffer.subarray(pos));
797
+ swap32IfBE(buffer32);
798
+ this.compress(buffer32, 0, true);
799
+ swap32IfBE(buffer32);
800
+ const out32 = u32(out);
801
+ this.get().forEach((v, i) => out32[i] = swap8IfBE(v));
802
+ }
803
+ digest() {
804
+ const { buffer, outputLen } = this;
805
+ this.digestInto(buffer);
806
+ const res = buffer.slice(0, outputLen);
807
+ this.destroy();
808
+ return res;
809
+ }
810
+ _cloneInto(to) {
811
+ const { buffer, length, finished, destroyed, outputLen, pos } = this;
812
+ to || (to = new this.constructor({ dkLen: outputLen }));
813
+ to.set(...this.get());
814
+ to.buffer.set(buffer);
815
+ to.destroyed = destroyed;
816
+ to.finished = finished;
817
+ to.length = length;
818
+ to.pos = pos;
819
+ to.outputLen = outputLen;
820
+ return to;
821
+ }
822
+ clone() {
823
+ return this._cloneInto();
824
+ }
825
+ };
826
+ var BLAKE2b = class extends BLAKE2 {
827
+ constructor(opts = {}) {
828
+ const olen = opts.dkLen === void 0 ? 64 : opts.dkLen;
829
+ super(128, olen);
830
+ this.v0l = B2B_IV[0] | 0;
831
+ this.v0h = B2B_IV[1] | 0;
832
+ this.v1l = B2B_IV[2] | 0;
833
+ this.v1h = B2B_IV[3] | 0;
834
+ this.v2l = B2B_IV[4] | 0;
835
+ this.v2h = B2B_IV[5] | 0;
836
+ this.v3l = B2B_IV[6] | 0;
837
+ this.v3h = B2B_IV[7] | 0;
838
+ this.v4l = B2B_IV[8] | 0;
839
+ this.v4h = B2B_IV[9] | 0;
840
+ this.v5l = B2B_IV[10] | 0;
841
+ this.v5h = B2B_IV[11] | 0;
842
+ this.v6l = B2B_IV[12] | 0;
843
+ this.v6h = B2B_IV[13] | 0;
844
+ this.v7l = B2B_IV[14] | 0;
845
+ this.v7h = B2B_IV[15] | 0;
846
+ checkBlake2Opts(olen, opts, 64, 16, 16);
847
+ let { key, personalization, salt } = opts;
848
+ let keyLength = 0;
849
+ if (key !== void 0) {
850
+ key = toBytes(key);
851
+ keyLength = key.length;
852
+ }
853
+ this.v0l ^= this.outputLen | keyLength << 8 | 16842752;
854
+ if (salt !== void 0) {
855
+ salt = toBytes(salt);
856
+ const slt = u32(salt);
857
+ this.v4l ^= swap8IfBE(slt[0]);
858
+ this.v4h ^= swap8IfBE(slt[1]);
859
+ this.v5l ^= swap8IfBE(slt[2]);
860
+ this.v5h ^= swap8IfBE(slt[3]);
861
+ }
862
+ if (personalization !== void 0) {
863
+ personalization = toBytes(personalization);
864
+ const pers = u32(personalization);
865
+ this.v6l ^= swap8IfBE(pers[0]);
866
+ this.v6h ^= swap8IfBE(pers[1]);
867
+ this.v7l ^= swap8IfBE(pers[2]);
868
+ this.v7h ^= swap8IfBE(pers[3]);
869
+ }
870
+ if (key !== void 0) {
871
+ const tmp = new Uint8Array(this.blockLen);
872
+ tmp.set(key);
873
+ this.update(tmp);
874
+ }
875
+ }
876
+ get() {
877
+ let { v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h } = this;
878
+ return [
879
+ v0l,
880
+ v0h,
881
+ v1l,
882
+ v1h,
883
+ v2l,
884
+ v2h,
885
+ v3l,
886
+ v3h,
887
+ v4l,
888
+ v4h,
889
+ v5l,
890
+ v5h,
891
+ v6l,
892
+ v6h,
893
+ v7l,
894
+ v7h
895
+ ];
896
+ }
897
+ set(v0l, v0h, v1l, v1h, v2l, v2h, v3l, v3h, v4l, v4h, v5l, v5h, v6l, v6h, v7l, v7h) {
898
+ this.v0l = v0l | 0;
899
+ this.v0h = v0h | 0;
900
+ this.v1l = v1l | 0;
901
+ this.v1h = v1h | 0;
902
+ this.v2l = v2l | 0;
903
+ this.v2h = v2h | 0;
904
+ this.v3l = v3l | 0;
905
+ this.v3h = v3h | 0;
906
+ this.v4l = v4l | 0;
907
+ this.v4h = v4h | 0;
908
+ this.v5l = v5l | 0;
909
+ this.v5h = v5h | 0;
910
+ this.v6l = v6l | 0;
911
+ this.v6h = v6h | 0;
912
+ this.v7l = v7l | 0;
913
+ this.v7h = v7h | 0;
914
+ }
915
+ compress(msg, offset, isLast) {
916
+ this.get().forEach((v, i) => BBUF[i] = v);
917
+ BBUF.set(B2B_IV, 16);
918
+ let { h, l } = fromBig(BigInt(this.length));
919
+ BBUF[24] = B2B_IV[8] ^ l;
920
+ BBUF[25] = B2B_IV[9] ^ h;
921
+ if (isLast) {
922
+ BBUF[28] = ~BBUF[28];
923
+ BBUF[29] = ~BBUF[29];
924
+ }
925
+ let j = 0;
926
+ const s = BSIGMA;
927
+ for (let i = 0; i < 12; i++) {
928
+ G1b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
929
+ G2b(0, 4, 8, 12, msg, offset + 2 * s[j++]);
930
+ G1b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
931
+ G2b(1, 5, 9, 13, msg, offset + 2 * s[j++]);
932
+ G1b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
933
+ G2b(2, 6, 10, 14, msg, offset + 2 * s[j++]);
934
+ G1b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
935
+ G2b(3, 7, 11, 15, msg, offset + 2 * s[j++]);
936
+ G1b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
937
+ G2b(0, 5, 10, 15, msg, offset + 2 * s[j++]);
938
+ G1b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
939
+ G2b(1, 6, 11, 12, msg, offset + 2 * s[j++]);
940
+ G1b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
941
+ G2b(2, 7, 8, 13, msg, offset + 2 * s[j++]);
942
+ G1b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
943
+ G2b(3, 4, 9, 14, msg, offset + 2 * s[j++]);
944
+ }
945
+ this.v0l ^= BBUF[0] ^ BBUF[16];
946
+ this.v0h ^= BBUF[1] ^ BBUF[17];
947
+ this.v1l ^= BBUF[2] ^ BBUF[18];
948
+ this.v1h ^= BBUF[3] ^ BBUF[19];
949
+ this.v2l ^= BBUF[4] ^ BBUF[20];
950
+ this.v2h ^= BBUF[5] ^ BBUF[21];
951
+ this.v3l ^= BBUF[6] ^ BBUF[22];
952
+ this.v3h ^= BBUF[7] ^ BBUF[23];
953
+ this.v4l ^= BBUF[8] ^ BBUF[24];
954
+ this.v4h ^= BBUF[9] ^ BBUF[25];
955
+ this.v5l ^= BBUF[10] ^ BBUF[26];
956
+ this.v5h ^= BBUF[11] ^ BBUF[27];
957
+ this.v6l ^= BBUF[12] ^ BBUF[28];
958
+ this.v6h ^= BBUF[13] ^ BBUF[29];
959
+ this.v7l ^= BBUF[14] ^ BBUF[30];
960
+ this.v7h ^= BBUF[15] ^ BBUF[31];
961
+ clean(BBUF);
962
+ }
963
+ destroy() {
964
+ this.destroyed = true;
965
+ clean(this.buffer32);
966
+ this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
967
+ }
968
+ };
969
+ /**
970
+ * Blake2b hash function. 64-bit. 1.5x slower than blake2s in JS.
971
+ * @param msg - message that would be hashed
972
+ * @param opts - dkLen output length, key for MAC mode, salt, personalization
973
+ */
974
+ const blake2b = /* @__PURE__ */ createOptHasher((opts) => new BLAKE2b(opts));
975
+ //#endregion
976
+ //#region ../../node_modules/@noble/hashes/esm/argon2.js
977
+ /**
978
+ * Argon2 KDF from RFC 9106. Can be used to create a key from password and salt.
979
+ * We suggest to use Scrypt. JS Argon is 2-10x slower than native code because of 64-bitness:
980
+ * * argon uses uint64, but JS doesn't have fast uint64array
981
+ * * uint64 multiplication is 1/3 of time
982
+ * * `P` function would be very nice with u64, because most of value will be in registers,
983
+ * hovewer with u32 it will require 32 registers, which is too much.
984
+ * * JS arrays do slow bound checks, so reading from `A2_BUF` slows it down
985
+ * @module
986
+ */
987
+ const AT = {
988
+ Argond2d: 0,
989
+ Argon2i: 1,
990
+ Argon2id: 2
991
+ };
992
+ const ARGON2_SYNC_POINTS = 4;
993
+ const abytesOrZero = (buf) => {
994
+ if (buf === void 0) return Uint8Array.of();
995
+ return kdfInputToBytes(buf);
996
+ };
997
+ function mul(a, b) {
998
+ const aL = a & 65535;
999
+ const aH = a >>> 16;
1000
+ const bL = b & 65535;
1001
+ const bH = b >>> 16;
1002
+ const ll = Math.imul(aL, bL);
1003
+ const hl = Math.imul(aH, bL);
1004
+ const lh = Math.imul(aL, bH);
1005
+ const hh = Math.imul(aH, bH);
1006
+ const carry = (ll >>> 16) + (hl & 65535) + lh;
1007
+ return {
1008
+ h: hh + (hl >>> 16) + (carry >>> 16) | 0,
1009
+ l: carry << 16 | ll & 65535
1010
+ };
1011
+ }
1012
+ function mul2(a, b) {
1013
+ const { h, l } = mul(a, b);
1014
+ return {
1015
+ h: (h << 1 | l >>> 31) & 4294967295,
1016
+ l: l << 1 & 4294967295
1017
+ };
1018
+ }
1019
+ function blamka(Ah, Al, Bh, Bl) {
1020
+ const { h: Ch, l: Cl } = mul2(Al, Bl);
1021
+ const Rll = add3L(Al, Bl, Cl);
1022
+ return {
1023
+ h: add3H(Rll, Ah, Bh, Ch),
1024
+ l: Rll | 0
1025
+ };
1026
+ }
1027
+ const A2_BUF = new Uint32Array(256);
1028
+ function G(a, b, c, d) {
1029
+ let Al = A2_BUF[2 * a], Ah = A2_BUF[2 * a + 1];
1030
+ let Bl = A2_BUF[2 * b], Bh = A2_BUF[2 * b + 1];
1031
+ let Cl = A2_BUF[2 * c], Ch = A2_BUF[2 * c + 1];
1032
+ let Dl = A2_BUF[2 * d], Dh = A2_BUF[2 * d + 1];
1033
+ ({h: Ah, l: Al} = blamka(Ah, Al, Bh, Bl));
1034
+ ({Dh, Dl} = {
1035
+ Dh: Dh ^ Ah,
1036
+ Dl: Dl ^ Al
1037
+ });
1038
+ ({Dh, Dl} = {
1039
+ Dh: rotr32H(Dh, Dl),
1040
+ Dl: rotr32L(Dh, Dl)
1041
+ });
1042
+ ({h: Ch, l: Cl} = blamka(Ch, Cl, Dh, Dl));
1043
+ ({Bh, Bl} = {
1044
+ Bh: Bh ^ Ch,
1045
+ Bl: Bl ^ Cl
1046
+ });
1047
+ ({Bh, Bl} = {
1048
+ Bh: rotrSH(Bh, Bl, 24),
1049
+ Bl: rotrSL(Bh, Bl, 24)
1050
+ });
1051
+ ({h: Ah, l: Al} = blamka(Ah, Al, Bh, Bl));
1052
+ ({Dh, Dl} = {
1053
+ Dh: Dh ^ Ah,
1054
+ Dl: Dl ^ Al
1055
+ });
1056
+ ({Dh, Dl} = {
1057
+ Dh: rotrSH(Dh, Dl, 16),
1058
+ Dl: rotrSL(Dh, Dl, 16)
1059
+ });
1060
+ ({h: Ch, l: Cl} = blamka(Ch, Cl, Dh, Dl));
1061
+ ({Bh, Bl} = {
1062
+ Bh: Bh ^ Ch,
1063
+ Bl: Bl ^ Cl
1064
+ });
1065
+ ({Bh, Bl} = {
1066
+ Bh: rotrBH(Bh, Bl, 63),
1067
+ Bl: rotrBL(Bh, Bl, 63)
1068
+ });
1069
+ A2_BUF[2 * a] = Al, A2_BUF[2 * a + 1] = Ah;
1070
+ A2_BUF[2 * b] = Bl, A2_BUF[2 * b + 1] = Bh;
1071
+ A2_BUF[2 * c] = Cl, A2_BUF[2 * c + 1] = Ch;
1072
+ A2_BUF[2 * d] = Dl, A2_BUF[2 * d + 1] = Dh;
1073
+ }
1074
+ function P(v00, v01, v02, v03, v04, v05, v06, v07, v08, v09, v10, v11, v12, v13, v14, v15) {
1075
+ G(v00, v04, v08, v12);
1076
+ G(v01, v05, v09, v13);
1077
+ G(v02, v06, v10, v14);
1078
+ G(v03, v07, v11, v15);
1079
+ G(v00, v05, v10, v15);
1080
+ G(v01, v06, v11, v12);
1081
+ G(v02, v07, v08, v13);
1082
+ G(v03, v04, v09, v14);
1083
+ }
1084
+ function block(x, xPos, yPos, outPos, needXor) {
1085
+ for (let i = 0; i < 256; i++) A2_BUF[i] = x[xPos + i] ^ x[yPos + i];
1086
+ for (let i = 0; i < 128; i += 16) P(i, i + 1, i + 2, i + 3, i + 4, i + 5, i + 6, i + 7, i + 8, i + 9, i + 10, i + 11, i + 12, i + 13, i + 14, i + 15);
1087
+ for (let i = 0; i < 16; i += 2) P(i, i + 1, i + 16, i + 17, i + 32, i + 33, i + 48, i + 49, i + 64, i + 65, i + 80, i + 81, i + 96, i + 97, i + 112, i + 113);
1088
+ if (needXor) for (let i = 0; i < 256; i++) x[outPos + i] ^= A2_BUF[i] ^ x[xPos + i] ^ x[yPos + i];
1089
+ else for (let i = 0; i < 256; i++) x[outPos + i] = A2_BUF[i] ^ x[xPos + i] ^ x[yPos + i];
1090
+ clean(A2_BUF);
1091
+ }
1092
+ function Hp(A, dkLen) {
1093
+ const A8 = u8(A);
1094
+ const T = new Uint32Array(1);
1095
+ const T8 = u8(T);
1096
+ T[0] = dkLen;
1097
+ if (dkLen <= 64) return blake2b.create({ dkLen }).update(T8).update(A8).digest();
1098
+ const out = new Uint8Array(dkLen);
1099
+ let V = blake2b.create({}).update(T8).update(A8).digest();
1100
+ let pos = 0;
1101
+ out.set(V.subarray(0, 32));
1102
+ pos += 32;
1103
+ for (; dkLen - pos > 64; pos += 32) {
1104
+ const Vh = blake2b.create({}).update(V);
1105
+ Vh.digestInto(V);
1106
+ Vh.destroy();
1107
+ out.set(V.subarray(0, 32), pos);
1108
+ }
1109
+ out.set(blake2b(V, { dkLen: dkLen - pos }), pos);
1110
+ clean(V, T);
1111
+ return u32(out);
1112
+ }
1113
+ function indexAlpha(r, s, laneLen, segmentLen, index, randL, sameLane = false) {
1114
+ let area;
1115
+ if (r === 0) if (s === 0) area = index - 1;
1116
+ else if (sameLane) area = s * segmentLen + index - 1;
1117
+ else area = s * segmentLen + (index == 0 ? -1 : 0);
1118
+ else if (sameLane) area = laneLen - segmentLen + index - 1;
1119
+ else area = laneLen - segmentLen + (index == 0 ? -1 : 0);
1120
+ return ((r !== 0 && s !== ARGON2_SYNC_POINTS - 1 ? (s + 1) * segmentLen : 0) + (area - 1 - mul(area, mul(randL, randL).h).h)) % laneLen;
1121
+ }
1122
+ const maxUint32 = Math.pow(2, 32);
1123
+ function isU32(num) {
1124
+ return Number.isSafeInteger(num) && num >= 0 && num < maxUint32;
1125
+ }
1126
+ function argon2Opts(opts) {
1127
+ const merged = {
1128
+ version: 19,
1129
+ dkLen: 32,
1130
+ maxmem: maxUint32 - 1,
1131
+ asyncTick: 10
1132
+ };
1133
+ for (let [k, v] of Object.entries(opts)) if (v != null) merged[k] = v;
1134
+ const { dkLen, p, m, t, version, onProgress } = merged;
1135
+ if (!isU32(dkLen) || dkLen < 4) throw new Error("dkLen should be at least 4 bytes");
1136
+ if (!isU32(p) || p < 1 || p >= Math.pow(2, 24)) throw new Error("p should be 1 <= p < 2^24");
1137
+ if (!isU32(m)) throw new Error("m should be 0 <= m < 2^32");
1138
+ if (!isU32(t) || t < 1) throw new Error("t (iterations) should be 1 <= t < 2^32");
1139
+ if (onProgress !== void 0 && typeof onProgress !== "function") throw new Error("progressCb should be function");
1140
+ if (!isU32(m) || m < 8 * p) throw new Error("memory should be at least 8*p bytes");
1141
+ if (version !== 16 && version !== 19) throw new Error("unknown version=" + version);
1142
+ return merged;
1143
+ }
1144
+ function argon2Init(password, salt, type, opts) {
1145
+ password = kdfInputToBytes(password);
1146
+ salt = kdfInputToBytes(salt);
1147
+ abytes(password);
1148
+ abytes(salt);
1149
+ if (!isU32(password.length)) throw new Error("password should be less than 4 GB");
1150
+ if (!isU32(salt.length) || salt.length < 8) throw new Error("salt should be at least 8 bytes and less than 4 GB");
1151
+ if (!Object.values(AT).includes(type)) throw new Error("invalid type");
1152
+ let { p, dkLen, m, t, version, key, personalization, maxmem, onProgress, asyncTick } = argon2Opts(opts);
1153
+ key = abytesOrZero(key);
1154
+ personalization = abytesOrZero(personalization);
1155
+ const h = blake2b.create({});
1156
+ const BUF = new Uint32Array(1);
1157
+ const BUF8 = u8(BUF);
1158
+ for (let item of [
1159
+ p,
1160
+ dkLen,
1161
+ m,
1162
+ t,
1163
+ version,
1164
+ type
1165
+ ]) {
1166
+ BUF[0] = item;
1167
+ h.update(BUF8);
1168
+ }
1169
+ for (let i of [
1170
+ password,
1171
+ salt,
1172
+ key,
1173
+ personalization
1174
+ ]) {
1175
+ BUF[0] = i.length;
1176
+ h.update(BUF8).update(i);
1177
+ }
1178
+ const H0 = new Uint32Array(18);
1179
+ const H0_8 = u8(H0);
1180
+ h.digestInto(H0_8);
1181
+ const lanes = p;
1182
+ const mP = 4 * p * Math.floor(m / (ARGON2_SYNC_POINTS * p));
1183
+ const laneLen = Math.floor(mP / p);
1184
+ const segmentLen = Math.floor(laneLen / ARGON2_SYNC_POINTS);
1185
+ const memUsed = mP * 256;
1186
+ if (!isU32(maxmem) || memUsed > maxmem) throw new Error("mem should be less than 2**32, got: maxmem=" + maxmem + ", memused=" + memUsed);
1187
+ const B = new Uint32Array(memUsed);
1188
+ for (let l = 0; l < p; l++) {
1189
+ const i = 256 * laneLen * l;
1190
+ H0[17] = l;
1191
+ H0[16] = 0;
1192
+ B.set(Hp(H0, 1024), i);
1193
+ H0[16] = 1;
1194
+ B.set(Hp(H0, 1024), i + 256);
1195
+ }
1196
+ let perBlock = () => {};
1197
+ if (onProgress) {
1198
+ const totalBlock = t * ARGON2_SYNC_POINTS * p * segmentLen;
1199
+ const callbackPer = Math.max(Math.floor(totalBlock / 1e4), 1);
1200
+ let blockCnt = 0;
1201
+ perBlock = () => {
1202
+ blockCnt++;
1203
+ if (onProgress && (!(blockCnt % callbackPer) || blockCnt === totalBlock)) onProgress(blockCnt / totalBlock);
1204
+ };
1205
+ }
1206
+ clean(BUF, H0);
1207
+ return {
1208
+ type,
1209
+ mP,
1210
+ p,
1211
+ t,
1212
+ version,
1213
+ B,
1214
+ laneLen,
1215
+ lanes,
1216
+ segmentLen,
1217
+ dkLen,
1218
+ perBlock,
1219
+ asyncTick
1220
+ };
1221
+ }
1222
+ function argon2Output(B, p, laneLen, dkLen) {
1223
+ const B_final = new Uint32Array(256);
1224
+ for (let l = 0; l < p; l++) for (let j = 0; j < 256; j++) B_final[j] ^= B[256 * (laneLen * l + laneLen - 1) + j];
1225
+ const res = u8(Hp(B_final, dkLen));
1226
+ clean(B_final);
1227
+ return res;
1228
+ }
1229
+ function processBlock(B, address, l, r, s, index, laneLen, segmentLen, lanes, offset, prev, dataIndependent, needXor) {
1230
+ if (offset % laneLen) prev = offset - 1;
1231
+ let randL, randH;
1232
+ if (dataIndependent) {
1233
+ let i128 = index % 128;
1234
+ if (i128 === 0) {
1235
+ address[268]++;
1236
+ block(address, 256, 2 * 256, 0, false);
1237
+ block(address, 0, 2 * 256, 0, false);
1238
+ }
1239
+ randL = address[2 * i128];
1240
+ randH = address[2 * i128 + 1];
1241
+ } else {
1242
+ const T = 256 * prev;
1243
+ randL = B[T];
1244
+ randH = B[T + 1];
1245
+ }
1246
+ const refLane = r === 0 && s === 0 ? l : randH % lanes;
1247
+ const refPos = indexAlpha(r, s, laneLen, segmentLen, index, randL, refLane == l);
1248
+ const refBlock = laneLen * refLane + refPos;
1249
+ block(B, 256 * prev, 256 * refBlock, offset * 256, needXor);
1250
+ }
1251
+ async function argon2Async(type, password, salt, opts) {
1252
+ const { mP, p, t, version, B, laneLen, lanes, segmentLen, dkLen, perBlock, asyncTick } = argon2Init(password, salt, type, opts);
1253
+ const address = new Uint32Array(3 * 256);
1254
+ address[262] = mP;
1255
+ address[264] = t;
1256
+ address[266] = type;
1257
+ let ts = Date.now();
1258
+ for (let r = 0; r < t; r++) {
1259
+ const needXor = r !== 0 && version === 19;
1260
+ address[256] = r;
1261
+ for (let s = 0; s < ARGON2_SYNC_POINTS; s++) {
1262
+ address[260] = s;
1263
+ const dataIndependent = type == AT.Argon2i || type == AT.Argon2id && r === 0 && s < 2;
1264
+ for (let l = 0; l < p; l++) {
1265
+ address[258] = l;
1266
+ address[268] = 0;
1267
+ let startPos = 0;
1268
+ if (r === 0 && s === 0) {
1269
+ startPos = 2;
1270
+ if (dataIndependent) {
1271
+ address[268]++;
1272
+ block(address, 256, 2 * 256, 0, false);
1273
+ block(address, 0, 2 * 256, 0, false);
1274
+ }
1275
+ }
1276
+ let offset = l * laneLen + s * segmentLen + startPos;
1277
+ let prev = offset % laneLen ? offset - 1 : offset + laneLen - 1;
1278
+ for (let index = startPos; index < segmentLen; index++, offset++, prev++) {
1279
+ perBlock();
1280
+ processBlock(B, address, l, r, s, index, laneLen, segmentLen, lanes, offset, prev, dataIndependent, needXor);
1281
+ const diff = Date.now() - ts;
1282
+ if (!(diff >= 0 && diff < asyncTick)) {
1283
+ await nextTick();
1284
+ ts += diff;
1285
+ }
1286
+ }
1287
+ }
1288
+ }
1289
+ }
1290
+ clean(address);
1291
+ return argon2Output(B, p, laneLen, dkLen);
1292
+ }
1293
+ /** argon2id async, combining i+d, the most popular version from RFC 9106 */
1294
+ const argon2idAsync = (password, salt, opts) => argon2Async(AT.Argon2id, password, salt, opts);
1295
+ //#endregion
1296
+ //#region ../../node_modules/@noble/hashes/esm/hmac.js
1297
+ /**
1298
+ * HMAC: RFC2104 message authentication code.
1299
+ * @module
1300
+ */
1301
+ var HMAC = class extends Hash {
1302
+ constructor(hash, _key) {
1303
+ super();
1304
+ this.finished = false;
1305
+ this.destroyed = false;
1306
+ ahash(hash);
1307
+ const key = toBytes(_key);
1308
+ this.iHash = hash.create();
1309
+ if (typeof this.iHash.update !== "function") throw new Error("Expected instance of class which extends utils.Hash");
1310
+ this.blockLen = this.iHash.blockLen;
1311
+ this.outputLen = this.iHash.outputLen;
1312
+ const blockLen = this.blockLen;
1313
+ const pad = new Uint8Array(blockLen);
1314
+ pad.set(key.length > blockLen ? hash.create().update(key).digest() : key);
1315
+ for (let i = 0; i < pad.length; i++) pad[i] ^= 54;
1316
+ this.iHash.update(pad);
1317
+ this.oHash = hash.create();
1318
+ for (let i = 0; i < pad.length; i++) pad[i] ^= 106;
1319
+ this.oHash.update(pad);
1320
+ clean(pad);
1321
+ }
1322
+ update(buf) {
1323
+ aexists(this);
1324
+ this.iHash.update(buf);
1325
+ return this;
1326
+ }
1327
+ digestInto(out) {
1328
+ aexists(this);
1329
+ abytes(out, this.outputLen);
1330
+ this.finished = true;
1331
+ this.iHash.digestInto(out);
1332
+ this.oHash.update(out);
1333
+ this.oHash.digestInto(out);
1334
+ this.destroy();
1335
+ }
1336
+ digest() {
1337
+ const out = new Uint8Array(this.oHash.outputLen);
1338
+ this.digestInto(out);
1339
+ return out;
1340
+ }
1341
+ _cloneInto(to) {
1342
+ to || (to = Object.create(Object.getPrototypeOf(this), {}));
1343
+ const { oHash, iHash, finished, destroyed, blockLen, outputLen } = this;
1344
+ to = to;
1345
+ to.finished = finished;
1346
+ to.destroyed = destroyed;
1347
+ to.blockLen = blockLen;
1348
+ to.outputLen = outputLen;
1349
+ to.oHash = oHash._cloneInto(to.oHash);
1350
+ to.iHash = iHash._cloneInto(to.iHash);
1351
+ return to;
1352
+ }
1353
+ clone() {
1354
+ return this._cloneInto();
1355
+ }
1356
+ destroy() {
1357
+ this.destroyed = true;
1358
+ this.oHash.destroy();
1359
+ this.iHash.destroy();
1360
+ }
1361
+ };
1362
+ /**
1363
+ * HMAC: RFC2104 message authentication code.
1364
+ * @param hash - function that would be used e.g. sha256
1365
+ * @param key - message key
1366
+ * @param message - message data
1367
+ * @example
1368
+ * import { hmac } from '@noble/hashes/hmac';
1369
+ * import { sha256 } from '@noble/hashes/sha2';
1370
+ * const mac1 = hmac(sha256, 'key', 'message');
1371
+ */
1372
+ const hmac = (hash, key, message) => new HMAC(hash, key).update(message).digest();
1373
+ hmac.create = (hash, key) => new HMAC(hash, key);
1374
+ //#endregion
1375
+ //#region ../../node_modules/@noble/hashes/esm/hkdf.js
1376
+ /**
1377
+ * HKDF (RFC 5869): extract + expand in one step.
1378
+ * See https://soatok.blog/2021/11/17/understanding-hkdf/.
1379
+ * @module
1380
+ */
1381
+ /**
1382
+ * HKDF-extract from spec. Less important part. `HKDF-Extract(IKM, salt) -> PRK`
1383
+ * Arguments position differs from spec (IKM is first one, since it is not optional)
1384
+ * @param hash - hash function that would be used (e.g. sha256)
1385
+ * @param ikm - input keying material, the initial key
1386
+ * @param salt - optional salt value (a non-secret random value)
1387
+ */
1388
+ function extract(hash, ikm, salt) {
1389
+ ahash(hash);
1390
+ if (salt === void 0) salt = new Uint8Array(hash.outputLen);
1391
+ return hmac(hash, toBytes(salt), toBytes(ikm));
1392
+ }
1393
+ const HKDF_COUNTER = /* @__PURE__ */ Uint8Array.from([0]);
1394
+ const EMPTY_BUFFER = /* @__PURE__ */ Uint8Array.of();
1395
+ /**
1396
+ * HKDF-expand from the spec. The most important part. `HKDF-Expand(PRK, info, L) -> OKM`
1397
+ * @param hash - hash function that would be used (e.g. sha256)
1398
+ * @param prk - a pseudorandom key of at least HashLen octets (usually, the output from the extract step)
1399
+ * @param info - optional context and application specific information (can be a zero-length string)
1400
+ * @param length - length of output keying material in bytes
1401
+ */
1402
+ function expand(hash, prk, info, length = 32) {
1403
+ ahash(hash);
1404
+ anumber(length);
1405
+ const olen = hash.outputLen;
1406
+ if (length > 255 * olen) throw new Error("Length should be <= 255*HashLen");
1407
+ const blocks = Math.ceil(length / olen);
1408
+ if (info === void 0) info = EMPTY_BUFFER;
1409
+ const okm = new Uint8Array(blocks * olen);
1410
+ const HMAC = hmac.create(hash, prk);
1411
+ const HMACTmp = HMAC._cloneInto();
1412
+ const T = new Uint8Array(HMAC.outputLen);
1413
+ for (let counter = 0; counter < blocks; counter++) {
1414
+ HKDF_COUNTER[0] = counter + 1;
1415
+ HMACTmp.update(counter === 0 ? EMPTY_BUFFER : T).update(info).update(HKDF_COUNTER).digestInto(T);
1416
+ okm.set(T, olen * counter);
1417
+ HMAC._cloneInto(HMACTmp);
1418
+ }
1419
+ HMAC.destroy();
1420
+ HMACTmp.destroy();
1421
+ clean(T, HKDF_COUNTER);
1422
+ return okm.slice(0, length);
1423
+ }
1424
+ /**
1425
+ * HKDF (RFC 5869): derive keys from an initial input.
1426
+ * Combines hkdf_extract + hkdf_expand in one step
1427
+ * @param hash - hash function that would be used (e.g. sha256)
1428
+ * @param ikm - input keying material, the initial key
1429
+ * @param salt - optional salt value (a non-secret random value)
1430
+ * @param info - optional context and application specific information (can be a zero-length string)
1431
+ * @param length - length of output keying material in bytes
1432
+ * @example
1433
+ * import { hkdf } from '@noble/hashes/hkdf';
1434
+ * import { sha256 } from '@noble/hashes/sha2';
1435
+ * import { randomBytes } from '@noble/hashes/utils';
1436
+ * const inputKey = randomBytes(32);
1437
+ * const salt = randomBytes(32);
1438
+ * const info = 'application-key';
1439
+ * const hk1 = hkdf(sha256, inputKey, salt, info, 32);
1440
+ */
1441
+ const hkdf = (hash, ikm, salt, info, length) => expand(hash, extract(hash, ikm, salt), info, length);
1442
+ //#endregion
1443
+ //#region ../../node_modules/@noble/hashes/esm/sha2.js
1444
+ /**
1445
+ * SHA2 hash function. A.k.a. sha256, sha384, sha512, sha512_224, sha512_256.
1446
+ * SHA256 is the fastest hash implementable in JS, even faster than Blake3.
1447
+ * Check out [RFC 4634](https://datatracker.ietf.org/doc/html/rfc4634) and
1448
+ * [FIPS 180-4](https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf).
1449
+ * @module
1450
+ */
1451
+ /**
1452
+ * Round constants:
1453
+ * First 32 bits of fractional parts of the cube roots of the first 64 primes 2..311)
1454
+ */
1455
+ const SHA256_K = /* @__PURE__ */ Uint32Array.from([
1456
+ 1116352408,
1457
+ 1899447441,
1458
+ 3049323471,
1459
+ 3921009573,
1460
+ 961987163,
1461
+ 1508970993,
1462
+ 2453635748,
1463
+ 2870763221,
1464
+ 3624381080,
1465
+ 310598401,
1466
+ 607225278,
1467
+ 1426881987,
1468
+ 1925078388,
1469
+ 2162078206,
1470
+ 2614888103,
1471
+ 3248222580,
1472
+ 3835390401,
1473
+ 4022224774,
1474
+ 264347078,
1475
+ 604807628,
1476
+ 770255983,
1477
+ 1249150122,
1478
+ 1555081692,
1479
+ 1996064986,
1480
+ 2554220882,
1481
+ 2821834349,
1482
+ 2952996808,
1483
+ 3210313671,
1484
+ 3336571891,
1485
+ 3584528711,
1486
+ 113926993,
1487
+ 338241895,
1488
+ 666307205,
1489
+ 773529912,
1490
+ 1294757372,
1491
+ 1396182291,
1492
+ 1695183700,
1493
+ 1986661051,
1494
+ 2177026350,
1495
+ 2456956037,
1496
+ 2730485921,
1497
+ 2820302411,
1498
+ 3259730800,
1499
+ 3345764771,
1500
+ 3516065817,
1501
+ 3600352804,
1502
+ 4094571909,
1503
+ 275423344,
1504
+ 430227734,
1505
+ 506948616,
1506
+ 659060556,
1507
+ 883997877,
1508
+ 958139571,
1509
+ 1322822218,
1510
+ 1537002063,
1511
+ 1747873779,
1512
+ 1955562222,
1513
+ 2024104815,
1514
+ 2227730452,
1515
+ 2361852424,
1516
+ 2428436474,
1517
+ 2756734187,
1518
+ 3204031479,
1519
+ 3329325298
1520
+ ]);
1521
+ /** Reusable temporary buffer. "W" comes straight from spec. */
1522
+ const SHA256_W = /* @__PURE__ */ new Uint32Array(64);
1523
+ var SHA256 = class extends HashMD {
1524
+ constructor(outputLen = 32) {
1525
+ super(64, outputLen, 8, false);
1526
+ this.A = SHA256_IV[0] | 0;
1527
+ this.B = SHA256_IV[1] | 0;
1528
+ this.C = SHA256_IV[2] | 0;
1529
+ this.D = SHA256_IV[3] | 0;
1530
+ this.E = SHA256_IV[4] | 0;
1531
+ this.F = SHA256_IV[5] | 0;
1532
+ this.G = SHA256_IV[6] | 0;
1533
+ this.H = SHA256_IV[7] | 0;
1534
+ }
1535
+ get() {
1536
+ const { A, B, C, D, E, F, G, H } = this;
1537
+ return [
1538
+ A,
1539
+ B,
1540
+ C,
1541
+ D,
1542
+ E,
1543
+ F,
1544
+ G,
1545
+ H
1546
+ ];
1547
+ }
1548
+ set(A, B, C, D, E, F, G, H) {
1549
+ this.A = A | 0;
1550
+ this.B = B | 0;
1551
+ this.C = C | 0;
1552
+ this.D = D | 0;
1553
+ this.E = E | 0;
1554
+ this.F = F | 0;
1555
+ this.G = G | 0;
1556
+ this.H = H | 0;
1557
+ }
1558
+ process(view, offset) {
1559
+ for (let i = 0; i < 16; i++, offset += 4) SHA256_W[i] = view.getUint32(offset, false);
1560
+ for (let i = 16; i < 64; i++) {
1561
+ const W15 = SHA256_W[i - 15];
1562
+ const W2 = SHA256_W[i - 2];
1563
+ const s0 = rotr(W15, 7) ^ rotr(W15, 18) ^ W15 >>> 3;
1564
+ SHA256_W[i] = (rotr(W2, 17) ^ rotr(W2, 19) ^ W2 >>> 10) + SHA256_W[i - 7] + s0 + SHA256_W[i - 16] | 0;
1565
+ }
1566
+ let { A, B, C, D, E, F, G, H } = this;
1567
+ for (let i = 0; i < 64; i++) {
1568
+ const sigma1 = rotr(E, 6) ^ rotr(E, 11) ^ rotr(E, 25);
1569
+ const T1 = H + sigma1 + Chi(E, F, G) + SHA256_K[i] + SHA256_W[i] | 0;
1570
+ const T2 = (rotr(A, 2) ^ rotr(A, 13) ^ rotr(A, 22)) + Maj(A, B, C) | 0;
1571
+ H = G;
1572
+ G = F;
1573
+ F = E;
1574
+ E = D + T1 | 0;
1575
+ D = C;
1576
+ C = B;
1577
+ B = A;
1578
+ A = T1 + T2 | 0;
1579
+ }
1580
+ A = A + this.A | 0;
1581
+ B = B + this.B | 0;
1582
+ C = C + this.C | 0;
1583
+ D = D + this.D | 0;
1584
+ E = E + this.E | 0;
1585
+ F = F + this.F | 0;
1586
+ G = G + this.G | 0;
1587
+ H = H + this.H | 0;
1588
+ this.set(A, B, C, D, E, F, G, H);
1589
+ }
1590
+ roundClean() {
1591
+ clean(SHA256_W);
1592
+ }
1593
+ destroy() {
1594
+ this.set(0, 0, 0, 0, 0, 0, 0, 0);
1595
+ clean(this.buffer);
1596
+ }
1597
+ };
1598
+ const K512 = split([
1599
+ "0x428a2f98d728ae22",
1600
+ "0x7137449123ef65cd",
1601
+ "0xb5c0fbcfec4d3b2f",
1602
+ "0xe9b5dba58189dbbc",
1603
+ "0x3956c25bf348b538",
1604
+ "0x59f111f1b605d019",
1605
+ "0x923f82a4af194f9b",
1606
+ "0xab1c5ed5da6d8118",
1607
+ "0xd807aa98a3030242",
1608
+ "0x12835b0145706fbe",
1609
+ "0x243185be4ee4b28c",
1610
+ "0x550c7dc3d5ffb4e2",
1611
+ "0x72be5d74f27b896f",
1612
+ "0x80deb1fe3b1696b1",
1613
+ "0x9bdc06a725c71235",
1614
+ "0xc19bf174cf692694",
1615
+ "0xe49b69c19ef14ad2",
1616
+ "0xefbe4786384f25e3",
1617
+ "0x0fc19dc68b8cd5b5",
1618
+ "0x240ca1cc77ac9c65",
1619
+ "0x2de92c6f592b0275",
1620
+ "0x4a7484aa6ea6e483",
1621
+ "0x5cb0a9dcbd41fbd4",
1622
+ "0x76f988da831153b5",
1623
+ "0x983e5152ee66dfab",
1624
+ "0xa831c66d2db43210",
1625
+ "0xb00327c898fb213f",
1626
+ "0xbf597fc7beef0ee4",
1627
+ "0xc6e00bf33da88fc2",
1628
+ "0xd5a79147930aa725",
1629
+ "0x06ca6351e003826f",
1630
+ "0x142929670a0e6e70",
1631
+ "0x27b70a8546d22ffc",
1632
+ "0x2e1b21385c26c926",
1633
+ "0x4d2c6dfc5ac42aed",
1634
+ "0x53380d139d95b3df",
1635
+ "0x650a73548baf63de",
1636
+ "0x766a0abb3c77b2a8",
1637
+ "0x81c2c92e47edaee6",
1638
+ "0x92722c851482353b",
1639
+ "0xa2bfe8a14cf10364",
1640
+ "0xa81a664bbc423001",
1641
+ "0xc24b8b70d0f89791",
1642
+ "0xc76c51a30654be30",
1643
+ "0xd192e819d6ef5218",
1644
+ "0xd69906245565a910",
1645
+ "0xf40e35855771202a",
1646
+ "0x106aa07032bbd1b8",
1647
+ "0x19a4c116b8d2d0c8",
1648
+ "0x1e376c085141ab53",
1649
+ "0x2748774cdf8eeb99",
1650
+ "0x34b0bcb5e19b48a8",
1651
+ "0x391c0cb3c5c95a63",
1652
+ "0x4ed8aa4ae3418acb",
1653
+ "0x5b9cca4f7763e373",
1654
+ "0x682e6ff3d6b2b8a3",
1655
+ "0x748f82ee5defb2fc",
1656
+ "0x78a5636f43172f60",
1657
+ "0x84c87814a1f0ab72",
1658
+ "0x8cc702081a6439ec",
1659
+ "0x90befffa23631e28",
1660
+ "0xa4506cebde82bde9",
1661
+ "0xbef9a3f7b2c67915",
1662
+ "0xc67178f2e372532b",
1663
+ "0xca273eceea26619c",
1664
+ "0xd186b8c721c0c207",
1665
+ "0xeada7dd6cde0eb1e",
1666
+ "0xf57d4f7fee6ed178",
1667
+ "0x06f067aa72176fba",
1668
+ "0x0a637dc5a2c898a6",
1669
+ "0x113f9804bef90dae",
1670
+ "0x1b710b35131c471b",
1671
+ "0x28db77f523047d84",
1672
+ "0x32caab7b40c72493",
1673
+ "0x3c9ebe0a15c9bebc",
1674
+ "0x431d67c49c100d4c",
1675
+ "0x4cc5d4becb3e42b6",
1676
+ "0x597f299cfc657e2a",
1677
+ "0x5fcb6fab3ad6faec",
1678
+ "0x6c44198c4a475817"
1679
+ ].map((n) => BigInt(n)));
1680
+ const SHA512_Kh = K512[0];
1681
+ const SHA512_Kl = K512[1];
1682
+ const SHA512_W_H = /* @__PURE__ */ new Uint32Array(80);
1683
+ const SHA512_W_L = /* @__PURE__ */ new Uint32Array(80);
1684
+ var SHA512 = class extends HashMD {
1685
+ constructor(outputLen = 64) {
1686
+ super(128, outputLen, 16, false);
1687
+ this.Ah = SHA512_IV[0] | 0;
1688
+ this.Al = SHA512_IV[1] | 0;
1689
+ this.Bh = SHA512_IV[2] | 0;
1690
+ this.Bl = SHA512_IV[3] | 0;
1691
+ this.Ch = SHA512_IV[4] | 0;
1692
+ this.Cl = SHA512_IV[5] | 0;
1693
+ this.Dh = SHA512_IV[6] | 0;
1694
+ this.Dl = SHA512_IV[7] | 0;
1695
+ this.Eh = SHA512_IV[8] | 0;
1696
+ this.El = SHA512_IV[9] | 0;
1697
+ this.Fh = SHA512_IV[10] | 0;
1698
+ this.Fl = SHA512_IV[11] | 0;
1699
+ this.Gh = SHA512_IV[12] | 0;
1700
+ this.Gl = SHA512_IV[13] | 0;
1701
+ this.Hh = SHA512_IV[14] | 0;
1702
+ this.Hl = SHA512_IV[15] | 0;
1703
+ }
1704
+ get() {
1705
+ const { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
1706
+ return [
1707
+ Ah,
1708
+ Al,
1709
+ Bh,
1710
+ Bl,
1711
+ Ch,
1712
+ Cl,
1713
+ Dh,
1714
+ Dl,
1715
+ Eh,
1716
+ El,
1717
+ Fh,
1718
+ Fl,
1719
+ Gh,
1720
+ Gl,
1721
+ Hh,
1722
+ Hl
1723
+ ];
1724
+ }
1725
+ set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl) {
1726
+ this.Ah = Ah | 0;
1727
+ this.Al = Al | 0;
1728
+ this.Bh = Bh | 0;
1729
+ this.Bl = Bl | 0;
1730
+ this.Ch = Ch | 0;
1731
+ this.Cl = Cl | 0;
1732
+ this.Dh = Dh | 0;
1733
+ this.Dl = Dl | 0;
1734
+ this.Eh = Eh | 0;
1735
+ this.El = El | 0;
1736
+ this.Fh = Fh | 0;
1737
+ this.Fl = Fl | 0;
1738
+ this.Gh = Gh | 0;
1739
+ this.Gl = Gl | 0;
1740
+ this.Hh = Hh | 0;
1741
+ this.Hl = Hl | 0;
1742
+ }
1743
+ process(view, offset) {
1744
+ for (let i = 0; i < 16; i++, offset += 4) {
1745
+ SHA512_W_H[i] = view.getUint32(offset);
1746
+ SHA512_W_L[i] = view.getUint32(offset += 4);
1747
+ }
1748
+ for (let i = 16; i < 80; i++) {
1749
+ const W15h = SHA512_W_H[i - 15] | 0;
1750
+ const W15l = SHA512_W_L[i - 15] | 0;
1751
+ const s0h = rotrSH(W15h, W15l, 1) ^ rotrSH(W15h, W15l, 8) ^ shrSH(W15h, W15l, 7);
1752
+ const s0l = rotrSL(W15h, W15l, 1) ^ rotrSL(W15h, W15l, 8) ^ shrSL(W15h, W15l, 7);
1753
+ const W2h = SHA512_W_H[i - 2] | 0;
1754
+ const W2l = SHA512_W_L[i - 2] | 0;
1755
+ const s1h = rotrSH(W2h, W2l, 19) ^ rotrBH(W2h, W2l, 61) ^ shrSH(W2h, W2l, 6);
1756
+ const SUMl = add4L(s0l, rotrSL(W2h, W2l, 19) ^ rotrBL(W2h, W2l, 61) ^ shrSL(W2h, W2l, 6), SHA512_W_L[i - 7], SHA512_W_L[i - 16]);
1757
+ SHA512_W_H[i] = add4H(SUMl, s0h, s1h, SHA512_W_H[i - 7], SHA512_W_H[i - 16]) | 0;
1758
+ SHA512_W_L[i] = SUMl | 0;
1759
+ }
1760
+ let { Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl } = this;
1761
+ for (let i = 0; i < 80; i++) {
1762
+ const sigma1h = rotrSH(Eh, El, 14) ^ rotrSH(Eh, El, 18) ^ rotrBH(Eh, El, 41);
1763
+ const sigma1l = rotrSL(Eh, El, 14) ^ rotrSL(Eh, El, 18) ^ rotrBL(Eh, El, 41);
1764
+ const CHIh = Eh & Fh ^ ~Eh & Gh;
1765
+ const CHIl = El & Fl ^ ~El & Gl;
1766
+ const T1ll = add5L(Hl, sigma1l, CHIl, SHA512_Kl[i], SHA512_W_L[i]);
1767
+ const T1h = add5H(T1ll, Hh, sigma1h, CHIh, SHA512_Kh[i], SHA512_W_H[i]);
1768
+ const T1l = T1ll | 0;
1769
+ const sigma0h = rotrSH(Ah, Al, 28) ^ rotrBH(Ah, Al, 34) ^ rotrBH(Ah, Al, 39);
1770
+ const sigma0l = rotrSL(Ah, Al, 28) ^ rotrBL(Ah, Al, 34) ^ rotrBL(Ah, Al, 39);
1771
+ const MAJh = Ah & Bh ^ Ah & Ch ^ Bh & Ch;
1772
+ const MAJl = Al & Bl ^ Al & Cl ^ Bl & Cl;
1773
+ Hh = Gh | 0;
1774
+ Hl = Gl | 0;
1775
+ Gh = Fh | 0;
1776
+ Gl = Fl | 0;
1777
+ Fh = Eh | 0;
1778
+ Fl = El | 0;
1779
+ ({h: Eh, l: El} = add(Dh | 0, Dl | 0, T1h | 0, T1l | 0));
1780
+ Dh = Ch | 0;
1781
+ Dl = Cl | 0;
1782
+ Ch = Bh | 0;
1783
+ Cl = Bl | 0;
1784
+ Bh = Ah | 0;
1785
+ Bl = Al | 0;
1786
+ const All = add3L(T1l, sigma0l, MAJl);
1787
+ Ah = add3H(All, T1h, sigma0h, MAJh);
1788
+ Al = All | 0;
1789
+ }
1790
+ ({h: Ah, l: Al} = add(this.Ah | 0, this.Al | 0, Ah | 0, Al | 0));
1791
+ ({h: Bh, l: Bl} = add(this.Bh | 0, this.Bl | 0, Bh | 0, Bl | 0));
1792
+ ({h: Ch, l: Cl} = add(this.Ch | 0, this.Cl | 0, Ch | 0, Cl | 0));
1793
+ ({h: Dh, l: Dl} = add(this.Dh | 0, this.Dl | 0, Dh | 0, Dl | 0));
1794
+ ({h: Eh, l: El} = add(this.Eh | 0, this.El | 0, Eh | 0, El | 0));
1795
+ ({h: Fh, l: Fl} = add(this.Fh | 0, this.Fl | 0, Fh | 0, Fl | 0));
1796
+ ({h: Gh, l: Gl} = add(this.Gh | 0, this.Gl | 0, Gh | 0, Gl | 0));
1797
+ ({h: Hh, l: Hl} = add(this.Hh | 0, this.Hl | 0, Hh | 0, Hl | 0));
1798
+ this.set(Ah, Al, Bh, Bl, Ch, Cl, Dh, Dl, Eh, El, Fh, Fl, Gh, Gl, Hh, Hl);
1799
+ }
1800
+ roundClean() {
1801
+ clean(SHA512_W_H, SHA512_W_L);
1802
+ }
1803
+ destroy() {
1804
+ clean(this.buffer);
1805
+ this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1806
+ }
1807
+ };
1808
+ /**
1809
+ * SHA2-256 hash function from RFC 4634.
1810
+ *
1811
+ * It is the fastest JS hash, even faster than Blake3.
1812
+ * To break sha256 using birthday attack, attackers need to try 2^128 hashes.
1813
+ * BTC network is doing 2^70 hashes/sec (2^95 hashes/year) as per 2025.
1814
+ */
1815
+ const sha256 = /* @__PURE__ */ createHasher(() => new SHA256());
1816
+ /** SHA2-512 hash function from RFC 4634. */
1817
+ const sha512 = /* @__PURE__ */ createHasher(() => new SHA512());
1818
+ //#endregion
1819
+ //#region ../../node_modules/@noble/hashes/esm/pbkdf2.js
1820
+ /**
1821
+ * PBKDF (RFC 2898). Can be used to create a key from password and salt.
1822
+ * @module
1823
+ */
1824
+ function pbkdf2Init(hash, _password, _salt, _opts) {
1825
+ ahash(hash);
1826
+ const { c, dkLen, asyncTick } = checkOpts({
1827
+ dkLen: 32,
1828
+ asyncTick: 10
1829
+ }, _opts);
1830
+ anumber(c);
1831
+ anumber(dkLen);
1832
+ anumber(asyncTick);
1833
+ if (c < 1) throw new Error("iterations (c) should be >= 1");
1834
+ const password = kdfInputToBytes(_password);
1835
+ const salt = kdfInputToBytes(_salt);
1836
+ const DK = new Uint8Array(dkLen);
1837
+ const PRF = hmac.create(hash, password);
1838
+ return {
1839
+ c,
1840
+ dkLen,
1841
+ asyncTick,
1842
+ DK,
1843
+ PRF,
1844
+ PRFSalt: PRF._cloneInto().update(salt)
1845
+ };
1846
+ }
1847
+ function pbkdf2Output(PRF, PRFSalt, DK, prfW, u) {
1848
+ PRF.destroy();
1849
+ PRFSalt.destroy();
1850
+ if (prfW) prfW.destroy();
1851
+ clean(u);
1852
+ return DK;
1853
+ }
1854
+ /**
1855
+ * PBKDF2-HMAC: RFC 2898 key derivation function
1856
+ * @param hash - hash function that would be used e.g. sha256
1857
+ * @param password - password from which a derived key is generated
1858
+ * @param salt - cryptographic salt
1859
+ * @param opts - {c, dkLen} where c is work factor and dkLen is output message size
1860
+ * @example
1861
+ * const key = pbkdf2(sha256, 'password', 'salt', { dkLen: 32, c: Math.pow(2, 18) });
1862
+ */
1863
+ function pbkdf2(hash, password, salt, opts) {
1864
+ const { c, dkLen, DK, PRF, PRFSalt } = pbkdf2Init(hash, password, salt, opts);
1865
+ let prfW;
1866
+ const arr = new Uint8Array(4);
1867
+ const view = createView(arr);
1868
+ const u = new Uint8Array(PRF.outputLen);
1869
+ for (let ti = 1, pos = 0; pos < dkLen; ti++, pos += PRF.outputLen) {
1870
+ const Ti = DK.subarray(pos, pos + PRF.outputLen);
1871
+ view.setInt32(0, ti, false);
1872
+ (prfW = PRFSalt._cloneInto(prfW)).update(arr).digestInto(u);
1873
+ Ti.set(u.subarray(0, Ti.length));
1874
+ for (let ui = 1; ui < c; ui++) {
1875
+ PRF._cloneInto(prfW).update(u).digestInto(u);
1876
+ for (let i = 0; i < Ti.length; i++) Ti[i] ^= u[i];
1877
+ }
1878
+ }
1879
+ return pbkdf2Output(PRF, PRFSalt, DK, prfW, u);
1880
+ }
1881
+ //#endregion
1882
+ export { argon2idAsync as a, hexToBytes as c, hkdf as i, randomBytes as l, sha256 as n, abytes as o, sha512 as r, bytesToHex as s, pbkdf2 as t };