@btc-vision/transaction 1.8.0-beta.1 → 1.8.0-beta.4

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 (765) hide show
  1. package/browser/_version.d.ts +1 -0
  2. package/browser/_version.d.ts.map +1 -0
  3. package/browser/abi/ABICoder.d.ts +1 -1
  4. package/browser/abi/ABICoder.d.ts.map +1 -0
  5. package/browser/branded/Branded.d.ts +4 -0
  6. package/browser/branded/Branded.d.ts.map +1 -0
  7. package/browser/btc-vision-bitcoin.js +12420 -3637
  8. package/browser/buffer/BinaryReader.d.ts +120 -1
  9. package/browser/buffer/BinaryReader.d.ts.map +1 -0
  10. package/browser/buffer/BinaryWriter.d.ts +51 -1
  11. package/browser/buffer/BinaryWriter.d.ts.map +1 -0
  12. package/browser/bytecode/Compressor.d.ts +12 -0
  13. package/browser/bytecode/Compressor.d.ts.map +1 -0
  14. package/browser/chain/ChainData.d.ts +2 -2
  15. package/browser/chain/ChainData.d.ts.map +1 -0
  16. package/browser/consensus/Consensus.d.ts +11 -3
  17. package/browser/consensus/Consensus.d.ts.map +1 -0
  18. package/browser/consensus/ConsensusConfig.d.ts +1 -0
  19. package/browser/consensus/ConsensusConfig.d.ts.map +1 -0
  20. package/browser/consensus/IConsensusConfig.d.ts +1 -0
  21. package/browser/consensus/IConsensusConfig.d.ts.map +1 -0
  22. package/browser/consensus/metadata/RoswellConsensus.d.ts +1 -0
  23. package/browser/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
  24. package/browser/crypto/crypto.d.ts +1 -0
  25. package/browser/crypto/crypto.d.ts.map +1 -0
  26. package/browser/deterministic/AddressMap.d.ts +6 -1
  27. package/browser/deterministic/AddressMap.d.ts.map +1 -0
  28. package/browser/deterministic/AddressSet.d.ts +3 -1
  29. package/browser/deterministic/AddressSet.d.ts.map +1 -0
  30. package/browser/deterministic/CustomMap.d.ts +3 -1
  31. package/browser/deterministic/CustomMap.d.ts.map +1 -0
  32. package/browser/deterministic/DeterministicMap.d.ts +3 -1
  33. package/browser/deterministic/DeterministicMap.d.ts.map +1 -0
  34. package/browser/deterministic/DeterministicSet.d.ts +3 -1
  35. package/browser/deterministic/DeterministicSet.d.ts.map +1 -0
  36. package/browser/deterministic/ExtendedAddressMap.d.ts +7 -1
  37. package/browser/deterministic/ExtendedAddressMap.d.ts.map +1 -0
  38. package/browser/deterministic/FastMap.d.ts +7 -1
  39. package/browser/deterministic/FastMap.d.ts.map +1 -0
  40. package/browser/ecc/backend.d.ts +13 -0
  41. package/browser/ecc/backend.d.ts.map +1 -0
  42. package/browser/epoch/ChallengeSolution.d.ts +33 -1
  43. package/browser/epoch/ChallengeSolution.d.ts.map +1 -0
  44. package/browser/epoch/interfaces/IChallengeSolution.d.ts +14 -13
  45. package/browser/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
  46. package/browser/epoch/validator/EpochValidator.d.ts +37 -7
  47. package/browser/epoch/validator/EpochValidator.d.ts.map +1 -0
  48. package/browser/event/NetEvent.d.ts +1 -0
  49. package/browser/event/NetEvent.d.ts.map +1 -0
  50. package/browser/generators/AddressGenerator.d.ts +4 -3
  51. package/browser/generators/AddressGenerator.d.ts.map +1 -0
  52. package/browser/generators/Features.d.ts +1 -0
  53. package/browser/generators/Features.d.ts.map +1 -0
  54. package/browser/generators/Generator.d.ts +46 -10
  55. package/browser/generators/Generator.d.ts.map +1 -0
  56. package/browser/generators/MLDSAData.d.ts +1 -0
  57. package/browser/generators/MLDSAData.d.ts.map +1 -0
  58. package/browser/generators/builders/CalldataGenerator.d.ts +25 -4
  59. package/browser/generators/builders/CalldataGenerator.d.ts.map +1 -0
  60. package/browser/generators/builders/CustomGenerator.d.ts +13 -3
  61. package/browser/generators/builders/CustomGenerator.d.ts.map +1 -0
  62. package/browser/generators/builders/DeploymentGenerator.d.ts +15 -4
  63. package/browser/generators/builders/DeploymentGenerator.d.ts.map +1 -0
  64. package/browser/generators/builders/HashCommitmentGenerator.d.ts +164 -12
  65. package/browser/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
  66. package/browser/generators/builders/LegacyCalldataGenerator.d.ts +26 -4
  67. package/browser/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
  68. package/browser/generators/builders/MultiSignGenerator.d.ts +6 -1
  69. package/browser/generators/builders/MultiSignGenerator.d.ts.map +1 -0
  70. package/browser/generators/builders/P2WDAGenerator.d.ts +42 -4
  71. package/browser/generators/builders/P2WDAGenerator.d.ts.map +1 -0
  72. package/browser/index.d.ts +1 -0
  73. package/browser/index.d.ts.map +1 -0
  74. package/browser/index.js +3602 -3203
  75. package/browser/keypair/Address.d.ts +283 -13
  76. package/browser/keypair/Address.d.ts.map +1 -0
  77. package/browser/keypair/AddressVerificator.d.ts +7 -6
  78. package/browser/keypair/AddressVerificator.d.ts.map +1 -0
  79. package/browser/keypair/EcKeyPair.d.ts +183 -21
  80. package/browser/keypair/EcKeyPair.d.ts.map +1 -0
  81. package/browser/keypair/MessageSigner.d.ts +17 -16
  82. package/browser/keypair/MessageSigner.d.ts.map +1 -0
  83. package/browser/keypair/Secp256k1PointDeriver.d.ts +55 -0
  84. package/browser/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
  85. package/browser/keypair/Wallet.d.ts +27 -13
  86. package/browser/keypair/Wallet.d.ts.map +1 -0
  87. package/browser/keypair/interfaces/IWallet.d.ts +19 -0
  88. package/browser/keypair/interfaces/IWallet.d.ts.map +1 -0
  89. package/browser/metadata/ContractBaseMetadata.d.ts +10 -2
  90. package/browser/metadata/ContractBaseMetadata.d.ts.map +1 -0
  91. package/browser/mnemonic/BIPStandard.d.ts +59 -0
  92. package/browser/mnemonic/BIPStandard.d.ts.map +1 -0
  93. package/browser/mnemonic/Mnemonic.d.ts +15 -3
  94. package/browser/mnemonic/Mnemonic.d.ts.map +1 -0
  95. package/browser/mnemonic/MnemonicStrength.d.ts +6 -0
  96. package/browser/mnemonic/MnemonicStrength.d.ts.map +1 -0
  97. package/browser/network/ChainId.d.ts +1 -0
  98. package/browser/network/ChainId.d.ts.map +1 -0
  99. package/browser/noble-curves.js +920 -2966
  100. package/browser/noble-hashes.js +2067 -1038
  101. package/browser/opnet.d.ts +22 -1
  102. package/browser/opnet.d.ts.map +1 -0
  103. package/browser/p2wda/P2WDADetector.d.ts +36 -9
  104. package/browser/p2wda/P2WDADetector.d.ts.map +1 -0
  105. package/browser/polyfill/disposable.d.ts +16 -0
  106. package/browser/polyfill/disposable.d.ts.map +1 -0
  107. package/browser/signer/AddressRotation.d.ts +36 -0
  108. package/browser/signer/AddressRotation.d.ts.map +1 -0
  109. package/browser/signer/IRotationSigner.d.ts +27 -3
  110. package/browser/signer/IRotationSigner.d.ts.map +1 -0
  111. package/browser/signer/ParallelSignerAdapter.d.ts +14 -0
  112. package/browser/signer/ParallelSignerAdapter.d.ts.map +1 -0
  113. package/browser/signer/SignerUtils.d.ts +11 -4
  114. package/browser/signer/SignerUtils.d.ts.map +1 -0
  115. package/browser/signer/TweakedSigner.d.ts +28 -4
  116. package/browser/signer/TweakedSigner.d.ts.map +1 -0
  117. package/browser/transaction/ContractAddress.d.ts +2 -2
  118. package/browser/transaction/ContractAddress.d.ts.map +1 -0
  119. package/browser/transaction/TransactionFactory.d.ts +140 -2
  120. package/browser/transaction/TransactionFactory.d.ts.map +1 -0
  121. package/browser/transaction/browser/BrowserSignerBase.d.ts +12 -6
  122. package/browser/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
  123. package/browser/transaction/browser/WalletNetworks.d.ts +1 -0
  124. package/browser/transaction/browser/WalletNetworks.d.ts.map +1 -0
  125. package/browser/transaction/browser/Web3Provider.d.ts +27 -0
  126. package/browser/transaction/browser/Web3Provider.d.ts.map +1 -0
  127. package/browser/transaction/browser/extensions/UnisatSigner.d.ts +9 -7
  128. package/browser/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
  129. package/browser/transaction/browser/extensions/XverseSigner.d.ts +9 -7
  130. package/browser/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
  131. package/browser/transaction/browser/types/OPWallet.d.ts +10 -0
  132. package/browser/transaction/browser/types/OPWallet.d.ts.map +1 -0
  133. package/browser/transaction/browser/types/Unisat.d.ts +1 -0
  134. package/browser/transaction/browser/types/Unisat.d.ts.map +1 -0
  135. package/browser/transaction/browser/types/Xverse.d.ts +1 -0
  136. package/browser/transaction/browser/types/Xverse.d.ts.map +1 -0
  137. package/browser/transaction/builders/CancelTransaction.d.ts +29 -4
  138. package/browser/transaction/builders/CancelTransaction.d.ts.map +1 -0
  139. package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
  140. package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
  141. package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts +137 -10
  142. package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
  143. package/browser/transaction/builders/CustomScriptTransaction.d.ts +106 -6
  144. package/browser/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
  145. package/browser/transaction/builders/DeploymentTransaction.d.ts +116 -5
  146. package/browser/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
  147. package/browser/transaction/builders/FundingTransaction.d.ts +4 -3
  148. package/browser/transaction/builders/FundingTransaction.d.ts.map +1 -0
  149. package/browser/transaction/builders/InteractionTransaction.d.ts +12 -3
  150. package/browser/transaction/builders/InteractionTransaction.d.ts.map +1 -0
  151. package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts +56 -5
  152. package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
  153. package/browser/transaction/builders/MultiSignTransaction.d.ts +125 -16
  154. package/browser/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
  155. package/browser/transaction/builders/SharedInteractionTransaction.d.ts +103 -15
  156. package/browser/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
  157. package/browser/transaction/builders/TransactionBuilder.d.ts +243 -14
  158. package/browser/transaction/builders/TransactionBuilder.d.ts.map +1 -0
  159. package/browser/transaction/enums/TransactionType.d.ts +1 -0
  160. package/browser/transaction/enums/TransactionType.d.ts.map +1 -0
  161. package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts +2 -1
  162. package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
  163. package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +46 -3
  164. package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
  165. package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts +6 -4
  166. package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
  167. package/browser/transaction/interfaces/ITransactionParameters.d.ts +22 -10
  168. package/browser/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
  169. package/browser/transaction/interfaces/ITransactionResponses.d.ts +1 -0
  170. package/browser/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
  171. package/browser/transaction/interfaces/ITweakedTransactionData.d.ts +18 -5
  172. package/browser/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
  173. package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts +26 -0
  174. package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
  175. package/browser/transaction/interfaces/Tap.d.ts +4 -3
  176. package/browser/transaction/interfaces/Tap.d.ts.map +1 -0
  177. package/browser/transaction/mineable/IP2WSHAddress.d.ts +2 -1
  178. package/browser/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
  179. package/browser/transaction/mineable/TimelockGenerator.d.ts +12 -3
  180. package/browser/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
  181. package/browser/transaction/offline/OfflineTransactionManager.d.ts +190 -9
  182. package/browser/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
  183. package/browser/transaction/offline/TransactionReconstructor.d.ts +53 -3
  184. package/browser/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
  185. package/browser/transaction/offline/TransactionSerializer.d.ts +53 -2
  186. package/browser/transaction/offline/TransactionSerializer.d.ts.map +1 -0
  187. package/browser/transaction/offline/TransactionStateCapture.d.ts +64 -5
  188. package/browser/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
  189. package/browser/transaction/offline/interfaces/ISerializableState.d.ts +71 -0
  190. package/browser/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
  191. package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts +76 -0
  192. package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
  193. package/browser/transaction/psbt/PSBTTypes.d.ts +1 -0
  194. package/browser/transaction/psbt/PSBTTypes.d.ts.map +1 -0
  195. package/browser/transaction/shared/P2TR_MS.d.ts +11 -2
  196. package/browser/transaction/shared/P2TR_MS.d.ts.map +1 -0
  197. package/browser/transaction/shared/TweakedTransaction.d.ts +275 -33
  198. package/browser/transaction/shared/TweakedTransaction.d.ts.map +1 -0
  199. package/browser/transaction/utils/WitnessUtils.d.ts +7 -1
  200. package/browser/transaction/utils/WitnessUtils.d.ts.map +1 -0
  201. package/browser/utils/BitcoinUtils.d.ts +19 -0
  202. package/browser/utils/BitcoinUtils.d.ts.map +1 -0
  203. package/browser/utils/BufferHelper.d.ts +1 -0
  204. package/browser/utils/BufferHelper.d.ts.map +1 -0
  205. package/browser/utils/StringToBuffer.d.ts +1 -0
  206. package/browser/utils/StringToBuffer.d.ts.map +1 -0
  207. package/browser/utils/lengths.d.ts +1 -0
  208. package/browser/utils/lengths.d.ts.map +1 -0
  209. package/browser/utils/types.d.ts +1 -0
  210. package/browser/utils/types.d.ts.map +1 -0
  211. package/browser/utxo/OPNetLimitedProvider.d.ts +37 -1
  212. package/browser/utxo/OPNetLimitedProvider.d.ts.map +1 -0
  213. package/browser/utxo/interfaces/BroadcastResponse.d.ts +1 -0
  214. package/browser/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
  215. package/browser/utxo/interfaces/IUTXO.d.ts +11 -5
  216. package/browser/utxo/interfaces/IUTXO.d.ts.map +1 -0
  217. package/browser/vendors.js +13940 -9389
  218. package/browser/verification/TapscriptVerificator.d.ts +10 -8
  219. package/browser/verification/TapscriptVerificator.d.ts.map +1 -0
  220. package/build/_version.d.ts +1 -0
  221. package/build/_version.d.ts.map +1 -0
  222. package/build/_version.js +1 -0
  223. package/build/_version.js.map +1 -0
  224. package/build/abi/ABICoder.d.ts +1 -1
  225. package/build/abi/ABICoder.d.ts.map +1 -0
  226. package/build/abi/ABICoder.js +9 -10
  227. package/build/abi/ABICoder.js.map +1 -0
  228. package/build/branded/Branded.d.ts +4 -0
  229. package/build/branded/Branded.d.ts.map +1 -0
  230. package/build/branded/Branded.js +2 -0
  231. package/build/branded/Branded.js.map +1 -0
  232. package/build/buffer/BinaryReader.d.ts +121 -2
  233. package/build/buffer/BinaryReader.d.ts.map +1 -0
  234. package/build/buffer/BinaryReader.js +129 -5
  235. package/build/buffer/BinaryReader.js.map +1 -0
  236. package/build/buffer/BinaryWriter.d.ts +52 -2
  237. package/build/buffer/BinaryWriter.d.ts.map +1 -0
  238. package/build/buffer/BinaryWriter.js +62 -2
  239. package/build/buffer/BinaryWriter.js.map +1 -0
  240. package/build/bytecode/Compressor.d.ts +12 -0
  241. package/build/bytecode/Compressor.d.ts.map +1 -0
  242. package/build/bytecode/Compressor.js +17 -5
  243. package/build/bytecode/Compressor.js.map +1 -0
  244. package/build/chain/ChainData.d.ts +2 -2
  245. package/build/chain/ChainData.d.ts.map +1 -0
  246. package/build/chain/ChainData.js +35 -17
  247. package/build/chain/ChainData.js.map +1 -0
  248. package/build/consensus/Consensus.d.ts +11 -3
  249. package/build/consensus/Consensus.d.ts.map +1 -0
  250. package/build/consensus/Consensus.js +8 -0
  251. package/build/consensus/Consensus.js.map +1 -0
  252. package/build/consensus/ConsensusConfig.d.ts +2 -1
  253. package/build/consensus/ConsensusConfig.d.ts.map +1 -0
  254. package/build/consensus/ConsensusConfig.js +1 -0
  255. package/build/consensus/ConsensusConfig.js.map +1 -0
  256. package/build/consensus/IConsensusConfig.d.ts +1 -0
  257. package/build/consensus/IConsensusConfig.d.ts.map +1 -0
  258. package/build/consensus/IConsensusConfig.js +2 -1
  259. package/build/consensus/IConsensusConfig.js.map +1 -0
  260. package/build/consensus/metadata/RoswellConsensus.d.ts +2 -1
  261. package/build/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
  262. package/build/consensus/metadata/RoswellConsensus.js +2 -0
  263. package/build/consensus/metadata/RoswellConsensus.js.map +1 -0
  264. package/build/crypto/crypto.d.ts +1 -0
  265. package/build/crypto/crypto.d.ts.map +1 -0
  266. package/build/crypto/crypto.js +1 -0
  267. package/build/crypto/crypto.js.map +1 -0
  268. package/build/deterministic/AddressMap.d.ts +6 -1
  269. package/build/deterministic/AddressMap.d.ts.map +1 -0
  270. package/build/deterministic/AddressMap.js +8 -0
  271. package/build/deterministic/AddressMap.js.map +1 -0
  272. package/build/deterministic/AddressSet.d.ts +3 -1
  273. package/build/deterministic/AddressSet.d.ts.map +1 -0
  274. package/build/deterministic/AddressSet.js +7 -0
  275. package/build/deterministic/AddressSet.js.map +1 -0
  276. package/build/deterministic/CustomMap.d.ts +3 -1
  277. package/build/deterministic/CustomMap.d.ts.map +1 -0
  278. package/build/deterministic/CustomMap.js +65 -47
  279. package/build/deterministic/CustomMap.js.map +1 -0
  280. package/build/deterministic/DeterministicMap.d.ts +4 -2
  281. package/build/deterministic/DeterministicMap.d.ts.map +1 -0
  282. package/build/deterministic/DeterministicMap.js +24 -27
  283. package/build/deterministic/DeterministicMap.js.map +1 -0
  284. package/build/deterministic/DeterministicSet.d.ts +3 -1
  285. package/build/deterministic/DeterministicSet.d.ts.map +1 -0
  286. package/build/deterministic/DeterministicSet.js +6 -0
  287. package/build/deterministic/DeterministicSet.js.map +1 -0
  288. package/build/deterministic/ExtendedAddressMap.d.ts +7 -1
  289. package/build/deterministic/ExtendedAddressMap.d.ts.map +1 -0
  290. package/build/deterministic/ExtendedAddressMap.js +18 -2
  291. package/build/deterministic/ExtendedAddressMap.js.map +1 -0
  292. package/build/deterministic/FastMap.d.ts +7 -1
  293. package/build/deterministic/FastMap.d.ts.map +1 -0
  294. package/build/deterministic/FastMap.js +7 -2
  295. package/build/deterministic/FastMap.js.map +1 -0
  296. package/build/ecc/backend.d.ts +13 -0
  297. package/build/ecc/backend.d.ts.map +1 -0
  298. package/build/ecc/backend.js +15 -0
  299. package/build/ecc/backend.js.map +1 -0
  300. package/build/epoch/ChallengeSolution.d.ts +34 -2
  301. package/build/epoch/ChallengeSolution.d.ts.map +1 -0
  302. package/build/epoch/ChallengeSolution.js +52 -0
  303. package/build/epoch/ChallengeSolution.js.map +1 -0
  304. package/build/epoch/interfaces/IChallengeSolution.d.ts +14 -13
  305. package/build/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
  306. package/build/epoch/interfaces/IChallengeSolution.js +2 -1
  307. package/build/epoch/interfaces/IChallengeSolution.js.map +1 -0
  308. package/build/epoch/validator/EpochValidator.d.ts +38 -8
  309. package/build/epoch/validator/EpochValidator.d.ts.map +1 -0
  310. package/build/epoch/validator/EpochValidator.js +45 -19
  311. package/build/epoch/validator/EpochValidator.js.map +1 -0
  312. package/build/event/NetEvent.d.ts +1 -0
  313. package/build/event/NetEvent.d.ts.map +1 -0
  314. package/build/event/NetEvent.js +3 -0
  315. package/build/event/NetEvent.js.map +1 -0
  316. package/build/generators/AddressGenerator.d.ts +4 -3
  317. package/build/generators/AddressGenerator.d.ts.map +1 -0
  318. package/build/generators/AddressGenerator.js +10 -3
  319. package/build/generators/AddressGenerator.js.map +1 -0
  320. package/build/generators/Features.d.ts +4 -3
  321. package/build/generators/Features.d.ts.map +1 -0
  322. package/build/generators/Features.js +1 -0
  323. package/build/generators/Features.js.map +1 -0
  324. package/build/generators/Generator.d.ts +47 -11
  325. package/build/generators/Generator.d.ts.map +1 -0
  326. package/build/generators/Generator.js +48 -12
  327. package/build/generators/Generator.js.map +1 -0
  328. package/build/generators/MLDSAData.d.ts +1 -0
  329. package/build/generators/MLDSAData.d.ts.map +1 -0
  330. package/build/generators/MLDSAData.js +1 -0
  331. package/build/generators/MLDSAData.js.map +1 -0
  332. package/build/generators/builders/CalldataGenerator.d.ts +27 -6
  333. package/build/generators/builders/CalldataGenerator.d.ts.map +1 -0
  334. package/build/generators/builders/CalldataGenerator.js +33 -4
  335. package/build/generators/builders/CalldataGenerator.js.map +1 -0
  336. package/build/generators/builders/CustomGenerator.d.ts +13 -3
  337. package/build/generators/builders/CustomGenerator.d.ts.map +1 -0
  338. package/build/generators/builders/CustomGenerator.js +11 -0
  339. package/build/generators/builders/CustomGenerator.js.map +1 -0
  340. package/build/generators/builders/DeploymentGenerator.d.ts +17 -6
  341. package/build/generators/builders/DeploymentGenerator.d.ts.map +1 -0
  342. package/build/generators/builders/DeploymentGenerator.js +18 -2
  343. package/build/generators/builders/DeploymentGenerator.js.map +1 -0
  344. package/build/generators/builders/HashCommitmentGenerator.d.ts +166 -14
  345. package/build/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
  346. package/build/generators/builders/HashCommitmentGenerator.js +193 -27
  347. package/build/generators/builders/HashCommitmentGenerator.js.map +1 -0
  348. package/build/generators/builders/LegacyCalldataGenerator.d.ts +27 -5
  349. package/build/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
  350. package/build/generators/builders/LegacyCalldataGenerator.js +35 -5
  351. package/build/generators/builders/LegacyCalldataGenerator.js.map +1 -0
  352. package/build/generators/builders/MultiSignGenerator.d.ts +6 -1
  353. package/build/generators/builders/MultiSignGenerator.d.ts.map +1 -0
  354. package/build/generators/builders/MultiSignGenerator.js +20 -10
  355. package/build/generators/builders/MultiSignGenerator.js.map +1 -0
  356. package/build/generators/builders/P2WDAGenerator.d.ts +44 -6
  357. package/build/generators/builders/P2WDAGenerator.d.ts.map +1 -0
  358. package/build/generators/builders/P2WDAGenerator.js +41 -2
  359. package/build/generators/builders/P2WDAGenerator.js.map +1 -0
  360. package/build/index.d.ts +1 -0
  361. package/build/index.d.ts.map +1 -0
  362. package/build/index.js +1 -0
  363. package/build/index.js.map +1 -0
  364. package/build/keypair/Address.d.ts +284 -14
  365. package/build/keypair/Address.d.ts.map +1 -0
  366. package/build/keypair/Address.js +447 -129
  367. package/build/keypair/Address.js.map +1 -0
  368. package/build/keypair/AddressVerificator.d.ts +7 -6
  369. package/build/keypair/AddressVerificator.d.ts.map +1 -0
  370. package/build/keypair/AddressVerificator.js +6 -5
  371. package/build/keypair/AddressVerificator.js.map +1 -0
  372. package/build/keypair/EcKeyPair.d.ts +185 -23
  373. package/build/keypair/EcKeyPair.d.ts.map +1 -0
  374. package/build/keypair/EcKeyPair.js +223 -54
  375. package/build/keypair/EcKeyPair.js.map +1 -0
  376. package/build/keypair/MessageSigner.d.ts +18 -17
  377. package/build/keypair/MessageSigner.d.ts.map +1 -0
  378. package/build/keypair/MessageSigner.js +34 -25
  379. package/build/keypair/MessageSigner.js.map +1 -0
  380. package/build/keypair/Secp256k1PointDeriver.d.ts +55 -0
  381. package/build/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
  382. package/build/keypair/Secp256k1PointDeriver.js +66 -0
  383. package/build/keypair/Secp256k1PointDeriver.js.map +1 -0
  384. package/build/keypair/Wallet.d.ts +29 -15
  385. package/build/keypair/Wallet.d.ts.map +1 -0
  386. package/build/keypair/Wallet.js +48 -14
  387. package/build/keypair/Wallet.js.map +1 -0
  388. package/build/keypair/interfaces/IWallet.d.ts +19 -0
  389. package/build/keypair/interfaces/IWallet.d.ts.map +1 -0
  390. package/build/keypair/interfaces/IWallet.js +1 -0
  391. package/build/keypair/interfaces/IWallet.js.map +1 -0
  392. package/build/metadata/ContractBaseMetadata.d.ts +10 -2
  393. package/build/metadata/ContractBaseMetadata.d.ts.map +1 -0
  394. package/build/metadata/ContractBaseMetadata.js +10 -1
  395. package/build/metadata/ContractBaseMetadata.js.map +1 -0
  396. package/build/mnemonic/BIPStandard.d.ts +59 -0
  397. package/build/mnemonic/BIPStandard.d.ts.map +1 -0
  398. package/build/mnemonic/BIPStandard.js +59 -0
  399. package/build/mnemonic/BIPStandard.js.map +1 -0
  400. package/build/mnemonic/Mnemonic.d.ts +16 -4
  401. package/build/mnemonic/Mnemonic.d.ts.map +1 -0
  402. package/build/mnemonic/Mnemonic.js +36 -8
  403. package/build/mnemonic/Mnemonic.js.map +1 -0
  404. package/build/mnemonic/MnemonicStrength.d.ts +6 -0
  405. package/build/mnemonic/MnemonicStrength.d.ts.map +1 -0
  406. package/build/mnemonic/MnemonicStrength.js +6 -0
  407. package/build/mnemonic/MnemonicStrength.js.map +1 -0
  408. package/build/network/ChainId.d.ts +1 -0
  409. package/build/network/ChainId.d.ts.map +1 -0
  410. package/build/network/ChainId.js +1 -0
  411. package/build/network/ChainId.js.map +1 -0
  412. package/build/opnet.d.ts +26 -3
  413. package/build/opnet.d.ts.map +1 -0
  414. package/build/opnet.js +23 -0
  415. package/build/opnet.js.map +1 -0
  416. package/build/p2wda/P2WDADetector.d.ts +38 -11
  417. package/build/p2wda/P2WDADetector.d.ts.map +1 -0
  418. package/build/p2wda/P2WDADetector.js +43 -10
  419. package/build/p2wda/P2WDADetector.js.map +1 -0
  420. package/build/polyfill/disposable.d.ts +16 -0
  421. package/build/polyfill/disposable.d.ts.map +1 -0
  422. package/build/polyfill/disposable.js +23 -0
  423. package/build/polyfill/disposable.js.map +1 -0
  424. package/build/signer/AddressRotation.d.ts +37 -1
  425. package/build/signer/AddressRotation.d.ts.map +1 -0
  426. package/build/signer/AddressRotation.js +16 -0
  427. package/build/signer/AddressRotation.js.map +1 -0
  428. package/build/signer/IRotationSigner.d.ts +27 -3
  429. package/build/signer/IRotationSigner.d.ts.map +1 -0
  430. package/build/signer/IRotationSigner.js +2 -1
  431. package/build/signer/IRotationSigner.js.map +1 -0
  432. package/build/signer/ParallelSignerAdapter.d.ts +14 -0
  433. package/build/signer/ParallelSignerAdapter.d.ts.map +1 -0
  434. package/build/signer/ParallelSignerAdapter.js +51 -0
  435. package/build/signer/ParallelSignerAdapter.js.map +1 -0
  436. package/build/signer/SignerUtils.d.ts +11 -4
  437. package/build/signer/SignerUtils.d.ts.map +1 -0
  438. package/build/signer/SignerUtils.js +16 -0
  439. package/build/signer/SignerUtils.js.map +1 -0
  440. package/build/signer/TweakedSigner.d.ts +28 -4
  441. package/build/signer/TweakedSigner.d.ts.map +1 -0
  442. package/build/signer/TweakedSigner.js +24 -6
  443. package/build/signer/TweakedSigner.js.map +1 -0
  444. package/build/transaction/ContractAddress.d.ts +2 -2
  445. package/build/transaction/ContractAddress.d.ts.map +1 -0
  446. package/build/transaction/ContractAddress.js +4 -8
  447. package/build/transaction/ContractAddress.js.map +1 -0
  448. package/build/transaction/TransactionFactory.d.ts +147 -9
  449. package/build/transaction/TransactionFactory.d.ts.map +1 -0
  450. package/build/transaction/TransactionFactory.js +145 -26
  451. package/build/transaction/TransactionFactory.js.map +1 -0
  452. package/build/transaction/browser/BrowserSignerBase.d.ts +12 -6
  453. package/build/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
  454. package/build/transaction/browser/BrowserSignerBase.js +7 -0
  455. package/build/transaction/browser/BrowserSignerBase.js.map +1 -0
  456. package/build/transaction/browser/WalletNetworks.d.ts +1 -0
  457. package/build/transaction/browser/WalletNetworks.d.ts.map +1 -0
  458. package/build/transaction/browser/WalletNetworks.js +1 -0
  459. package/build/transaction/browser/WalletNetworks.js.map +1 -0
  460. package/build/transaction/browser/Web3Provider.d.ts +30 -3
  461. package/build/transaction/browser/Web3Provider.d.ts.map +1 -0
  462. package/build/transaction/browser/Web3Provider.js +1 -0
  463. package/build/transaction/browser/Web3Provider.js.map +1 -0
  464. package/build/transaction/browser/extensions/UnisatSigner.d.ts +11 -9
  465. package/build/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
  466. package/build/transaction/browser/extensions/UnisatSigner.js +27 -17
  467. package/build/transaction/browser/extensions/UnisatSigner.js.map +1 -0
  468. package/build/transaction/browser/extensions/XverseSigner.d.ts +10 -8
  469. package/build/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
  470. package/build/transaction/browser/extensions/XverseSigner.js +25 -15
  471. package/build/transaction/browser/extensions/XverseSigner.js.map +1 -0
  472. package/build/transaction/browser/types/OPWallet.d.ts +12 -2
  473. package/build/transaction/browser/types/OPWallet.d.ts.map +1 -0
  474. package/build/transaction/browser/types/OPWallet.js +4 -0
  475. package/build/transaction/browser/types/OPWallet.js.map +1 -0
  476. package/build/transaction/browser/types/Unisat.d.ts +2 -1
  477. package/build/transaction/browser/types/Unisat.d.ts.map +1 -0
  478. package/build/transaction/browser/types/Unisat.js +2 -0
  479. package/build/transaction/browser/types/Unisat.js.map +1 -0
  480. package/build/transaction/browser/types/Xverse.d.ts +1 -0
  481. package/build/transaction/browser/types/Xverse.d.ts.map +1 -0
  482. package/build/transaction/browser/types/Xverse.js +1 -0
  483. package/build/transaction/browser/types/Xverse.js.map +1 -0
  484. package/build/transaction/builders/CancelTransaction.d.ts +31 -6
  485. package/build/transaction/builders/CancelTransaction.d.ts.map +1 -0
  486. package/build/transaction/builders/CancelTransaction.js +116 -33
  487. package/build/transaction/builders/CancelTransaction.js.map +1 -0
  488. package/build/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
  489. package/build/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
  490. package/build/transaction/builders/ChallengeSolutionTransaction.js +88 -0
  491. package/build/transaction/builders/ChallengeSolutionTransaction.js.map +1 -0
  492. package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts +140 -13
  493. package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
  494. package/build/transaction/builders/ConsolidatedInteractionTransaction.js +197 -20
  495. package/build/transaction/builders/ConsolidatedInteractionTransaction.js.map +1 -0
  496. package/build/transaction/builders/CustomScriptTransaction.d.ts +108 -8
  497. package/build/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
  498. package/build/transaction/builders/CustomScriptTransaction.js +176 -39
  499. package/build/transaction/builders/CustomScriptTransaction.js.map +1 -0
  500. package/build/transaction/builders/DeploymentTransaction.d.ts +120 -9
  501. package/build/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
  502. package/build/transaction/builders/DeploymentTransaction.js +194 -51
  503. package/build/transaction/builders/DeploymentTransaction.js.map +1 -0
  504. package/build/transaction/builders/FundingTransaction.d.ts +5 -4
  505. package/build/transaction/builders/FundingTransaction.d.ts.map +1 -0
  506. package/build/transaction/builders/FundingTransaction.js +15 -8
  507. package/build/transaction/builders/FundingTransaction.js.map +1 -0
  508. package/build/transaction/builders/InteractionTransaction.d.ts +14 -5
  509. package/build/transaction/builders/InteractionTransaction.d.ts.map +1 -0
  510. package/build/transaction/builders/InteractionTransaction.js +18 -5
  511. package/build/transaction/builders/InteractionTransaction.js.map +1 -0
  512. package/build/transaction/builders/InteractionTransactionP2WDA.d.ts +58 -7
  513. package/build/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
  514. package/build/transaction/builders/InteractionTransactionP2WDA.js +95 -18
  515. package/build/transaction/builders/InteractionTransactionP2WDA.js.map +1 -0
  516. package/build/transaction/builders/MultiSignTransaction.d.ts +126 -17
  517. package/build/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
  518. package/build/transaction/builders/MultiSignTransaction.js +201 -76
  519. package/build/transaction/builders/MultiSignTransaction.js.map +1 -0
  520. package/build/transaction/builders/SharedInteractionTransaction.d.ts +106 -18
  521. package/build/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
  522. package/build/transaction/builders/SharedInteractionTransaction.js +158 -40
  523. package/build/transaction/builders/SharedInteractionTransaction.js.map +1 -0
  524. package/build/transaction/builders/TransactionBuilder.d.ts +249 -19
  525. package/build/transaction/builders/TransactionBuilder.d.ts.map +1 -0
  526. package/build/transaction/builders/TransactionBuilder.js +377 -60
  527. package/build/transaction/builders/TransactionBuilder.js.map +1 -0
  528. package/build/transaction/enums/TransactionType.d.ts +1 -0
  529. package/build/transaction/enums/TransactionType.d.ts.map +1 -0
  530. package/build/transaction/enums/TransactionType.js +1 -0
  531. package/build/transaction/enums/TransactionType.js.map +1 -0
  532. package/build/transaction/interfaces/ICancelTransactionParameters.d.ts +3 -2
  533. package/build/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
  534. package/build/transaction/interfaces/ICancelTransactionParameters.js +1 -0
  535. package/build/transaction/interfaces/ICancelTransactionParameters.js.map +1 -0
  536. package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +48 -5
  537. package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
  538. package/build/transaction/interfaces/IConsolidatedTransactionParameters.js +1 -0
  539. package/build/transaction/interfaces/IConsolidatedTransactionParameters.js.map +1 -0
  540. package/build/transaction/interfaces/ICustomTransactionParameters.d.ts +7 -5
  541. package/build/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
  542. package/build/transaction/interfaces/ICustomTransactionParameters.js +1 -0
  543. package/build/transaction/interfaces/ICustomTransactionParameters.js.map +1 -0
  544. package/build/transaction/interfaces/ITransactionParameters.d.ts +27 -15
  545. package/build/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
  546. package/build/transaction/interfaces/ITransactionParameters.js +1 -0
  547. package/build/transaction/interfaces/ITransactionParameters.js.map +1 -0
  548. package/build/transaction/interfaces/ITransactionResponses.d.ts +3 -2
  549. package/build/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
  550. package/build/transaction/interfaces/ITransactionResponses.js +1 -0
  551. package/build/transaction/interfaces/ITransactionResponses.js.map +1 -0
  552. package/build/transaction/interfaces/ITweakedTransactionData.d.ts +21 -8
  553. package/build/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
  554. package/build/transaction/interfaces/ITweakedTransactionData.js +1 -0
  555. package/build/transaction/interfaces/ITweakedTransactionData.js.map +1 -0
  556. package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts +29 -3
  557. package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
  558. package/build/transaction/interfaces/IWeb3ProviderTypes.js +2 -1
  559. package/build/transaction/interfaces/IWeb3ProviderTypes.js.map +1 -0
  560. package/build/transaction/interfaces/Tap.d.ts +4 -3
  561. package/build/transaction/interfaces/Tap.d.ts.map +1 -0
  562. package/build/transaction/interfaces/Tap.js +1 -0
  563. package/build/transaction/interfaces/Tap.js.map +1 -0
  564. package/build/transaction/mineable/IP2WSHAddress.d.ts +2 -1
  565. package/build/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
  566. package/build/transaction/mineable/IP2WSHAddress.js +1 -0
  567. package/build/transaction/mineable/IP2WSHAddress.js.map +1 -0
  568. package/build/transaction/mineable/TimelockGenerator.d.ts +13 -4
  569. package/build/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
  570. package/build/transaction/mineable/TimelockGenerator.js +12 -3
  571. package/build/transaction/mineable/TimelockGenerator.js.map +1 -0
  572. package/build/transaction/offline/OfflineTransactionManager.d.ts +193 -12
  573. package/build/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
  574. package/build/transaction/offline/OfflineTransactionManager.js +192 -8
  575. package/build/transaction/offline/OfflineTransactionManager.js.map +1 -0
  576. package/build/transaction/offline/TransactionReconstructor.d.ts +56 -6
  577. package/build/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
  578. package/build/transaction/offline/TransactionReconstructor.js +111 -75
  579. package/build/transaction/offline/TransactionReconstructor.js.map +1 -0
  580. package/build/transaction/offline/TransactionSerializer.d.ts +54 -3
  581. package/build/transaction/offline/TransactionSerializer.d.ts.map +1 -0
  582. package/build/transaction/offline/TransactionSerializer.js +206 -95
  583. package/build/transaction/offline/TransactionSerializer.js.map +1 -0
  584. package/build/transaction/offline/TransactionStateCapture.d.ts +66 -7
  585. package/build/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
  586. package/build/transaction/offline/TransactionStateCapture.js +124 -60
  587. package/build/transaction/offline/TransactionStateCapture.js.map +1 -0
  588. package/build/transaction/offline/interfaces/ISerializableState.d.ts +72 -1
  589. package/build/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
  590. package/build/transaction/offline/interfaces/ISerializableState.js +10 -1
  591. package/build/transaction/offline/interfaces/ISerializableState.js.map +1 -0
  592. package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts +77 -1
  593. package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
  594. package/build/transaction/offline/interfaces/ITypeSpecificData.js +19 -0
  595. package/build/transaction/offline/interfaces/ITypeSpecificData.js.map +1 -0
  596. package/build/transaction/psbt/PSBTTypes.d.ts +1 -0
  597. package/build/transaction/psbt/PSBTTypes.d.ts.map +1 -0
  598. package/build/transaction/psbt/PSBTTypes.js +1 -0
  599. package/build/transaction/psbt/PSBTTypes.js.map +1 -0
  600. package/build/transaction/shared/P2TR_MS.d.ts +11 -2
  601. package/build/transaction/shared/P2TR_MS.d.ts.map +1 -0
  602. package/build/transaction/shared/P2TR_MS.js +10 -0
  603. package/build/transaction/shared/P2TR_MS.js.map +1 -0
  604. package/build/transaction/shared/TweakedTransaction.d.ts +281 -38
  605. package/build/transaction/shared/TweakedTransaction.d.ts.map +1 -0
  606. package/build/transaction/shared/TweakedTransaction.js +576 -114
  607. package/build/transaction/shared/TweakedTransaction.js.map +1 -0
  608. package/build/transaction/utils/WitnessUtils.d.ts +7 -1
  609. package/build/transaction/utils/WitnessUtils.d.ts.map +1 -0
  610. package/build/transaction/utils/WitnessUtils.js +17 -3
  611. package/build/transaction/utils/WitnessUtils.js.map +1 -0
  612. package/build/tsconfig.build.tsbuildinfo +1 -1
  613. package/build/utils/BitcoinUtils.d.ts +19 -0
  614. package/build/utils/BitcoinUtils.d.ts.map +1 -0
  615. package/build/utils/BitcoinUtils.js +19 -0
  616. package/build/utils/BitcoinUtils.js.map +1 -0
  617. package/build/utils/BufferHelper.d.ts +2 -1
  618. package/build/utils/BufferHelper.d.ts.map +1 -0
  619. package/build/utils/BufferHelper.js +38 -32
  620. package/build/utils/BufferHelper.js.map +1 -0
  621. package/build/utils/StringToBuffer.d.ts +1 -0
  622. package/build/utils/StringToBuffer.d.ts.map +1 -0
  623. package/build/utils/StringToBuffer.js +1 -0
  624. package/build/utils/StringToBuffer.js.map +1 -0
  625. package/build/utils/lengths.d.ts +1 -0
  626. package/build/utils/lengths.d.ts.map +1 -0
  627. package/build/utils/lengths.js +1 -0
  628. package/build/utils/lengths.js.map +1 -0
  629. package/build/utils/types.d.ts +1 -0
  630. package/build/utils/types.d.ts.map +1 -0
  631. package/build/utils/types.js +2 -1
  632. package/build/utils/types.js.map +1 -0
  633. package/build/utxo/OPNetLimitedProvider.d.ts +39 -3
  634. package/build/utxo/OPNetLimitedProvider.d.ts.map +1 -0
  635. package/build/utxo/OPNetLimitedProvider.js +41 -3
  636. package/build/utxo/OPNetLimitedProvider.js.map +1 -0
  637. package/build/utxo/interfaces/BroadcastResponse.d.ts +1 -0
  638. package/build/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
  639. package/build/utxo/interfaces/BroadcastResponse.js +1 -0
  640. package/build/utxo/interfaces/BroadcastResponse.js.map +1 -0
  641. package/build/utxo/interfaces/IUTXO.d.ts +13 -7
  642. package/build/utxo/interfaces/IUTXO.d.ts.map +1 -0
  643. package/build/utxo/interfaces/IUTXO.js +1 -0
  644. package/build/utxo/interfaces/IUTXO.js.map +1 -0
  645. package/build/verification/TapscriptVerificator.d.ts +12 -10
  646. package/build/verification/TapscriptVerificator.d.ts.map +1 -0
  647. package/build/verification/TapscriptVerificator.js +28 -38
  648. package/build/verification/TapscriptVerificator.js.map +1 -0
  649. package/eslint.config.js +0 -1
  650. package/package.json +16 -39
  651. package/src/abi/ABICoder.ts +0 -13
  652. package/src/branded/Branded.ts +5 -0
  653. package/src/buffer/BinaryReader.ts +7 -7
  654. package/src/buffer/BinaryWriter.ts +29 -24
  655. package/src/bytecode/Compressor.ts +1 -1
  656. package/src/chain/ChainData.ts +34 -27
  657. package/src/consensus/ConsensusConfig.ts +1 -1
  658. package/src/consensus/IConsensusConfig.ts +0 -17
  659. package/src/consensus/metadata/RoswellConsensus.ts +1 -17
  660. package/src/crypto/crypto-browser.js +3 -4
  661. package/src/deterministic/AddressMap.ts +5 -1
  662. package/src/deterministic/AddressSet.ts +5 -1
  663. package/src/deterministic/CustomMap.ts +6 -2
  664. package/src/deterministic/DeterministicMap.ts +8 -4
  665. package/src/deterministic/DeterministicSet.ts +6 -2
  666. package/src/deterministic/ExtendedAddressMap.ts +9 -4
  667. package/src/deterministic/FastMap.ts +9 -5
  668. package/src/ecc/backend.ts +17 -0
  669. package/src/epoch/ChallengeSolution.ts +3 -3
  670. package/src/epoch/interfaces/IChallengeSolution.ts +13 -13
  671. package/src/epoch/validator/EpochValidator.ts +24 -43
  672. package/src/generators/AddressGenerator.ts +6 -6
  673. package/src/generators/Features.ts +3 -3
  674. package/src/generators/Generator.ts +42 -26
  675. package/src/generators/builders/CalldataGenerator.ts +26 -24
  676. package/src/generators/builders/CustomGenerator.ts +4 -4
  677. package/src/generators/builders/DeploymentGenerator.ts +25 -23
  678. package/src/generators/builders/HashCommitmentGenerator.ts +31 -31
  679. package/src/generators/builders/LegacyCalldataGenerator.ts +26 -24
  680. package/src/generators/builders/MultiSignGenerator.ts +12 -12
  681. package/src/generators/builders/P2WDAGenerator.ts +10 -10
  682. package/src/keypair/Address.ts +115 -72
  683. package/src/keypair/AddressVerificator.ts +16 -147
  684. package/src/keypair/EcKeyPair.ts +109 -118
  685. package/src/keypair/MessageSigner.ts +70 -150
  686. package/src/keypair/Wallet.ts +59 -240
  687. package/src/metadata/ContractBaseMetadata.ts +2 -2
  688. package/src/mnemonic/Mnemonic.ts +32 -221
  689. package/src/opnet.ts +12 -6
  690. package/src/p2wda/P2WDADetector.ts +23 -72
  691. package/src/polyfill/disposable.ts +29 -0
  692. package/src/signer/AddressRotation.ts +1 -1
  693. package/src/signer/IRotationSigner.ts +3 -3
  694. package/src/signer/ParallelSignerAdapter.ts +59 -0
  695. package/src/signer/SignerUtils.ts +4 -4
  696. package/src/signer/TweakedSigner.ts +28 -13
  697. package/src/transaction/ContractAddress.ts +3 -7
  698. package/src/transaction/TransactionFactory.ts +28 -50
  699. package/src/transaction/browser/BrowserSignerBase.ts +12 -6
  700. package/src/transaction/browser/Web3Provider.ts +3 -3
  701. package/src/transaction/browser/extensions/UnisatSigner.ts +52 -48
  702. package/src/transaction/browser/extensions/XverseSigner.ts +55 -38
  703. package/src/transaction/browser/types/OPWallet.ts +2 -2
  704. package/src/transaction/browser/types/Unisat.ts +1 -1
  705. package/src/transaction/builders/CancelTransaction.ts +59 -24
  706. package/src/transaction/builders/ChallengeSolutionTransaction.ts +3 -3
  707. package/src/transaction/builders/ConsolidatedInteractionTransaction.ts +39 -34
  708. package/src/transaction/builders/CustomScriptTransaction.ts +79 -56
  709. package/src/transaction/builders/DeploymentTransaction.ts +82 -63
  710. package/src/transaction/builders/FundingTransaction.ts +11 -11
  711. package/src/transaction/builders/InteractionTransaction.ts +10 -10
  712. package/src/transaction/builders/InteractionTransactionP2WDA.ts +38 -40
  713. package/src/transaction/builders/MultiSignTransaction.ts +68 -61
  714. package/src/transaction/builders/SharedInteractionTransaction.ts +81 -57
  715. package/src/transaction/builders/TransactionBuilder.ts +101 -79
  716. package/src/transaction/interfaces/ICancelTransactionParameters.ts +2 -2
  717. package/src/transaction/interfaces/IConsolidatedTransactionParameters.ts +5 -5
  718. package/src/transaction/interfaces/ICustomTransactionParameters.ts +5 -5
  719. package/src/transaction/interfaces/ITransactionParameters.ts +15 -15
  720. package/src/transaction/interfaces/ITransactionResponses.ts +2 -2
  721. package/src/transaction/interfaces/ITweakedTransactionData.ts +17 -8
  722. package/src/transaction/interfaces/IWeb3ProviderTypes.ts +3 -3
  723. package/src/transaction/interfaces/Tap.ts +3 -3
  724. package/src/transaction/mineable/IP2WSHAddress.ts +1 -1
  725. package/src/transaction/mineable/TimelockGenerator.ts +19 -12
  726. package/src/transaction/offline/OfflineTransactionManager.ts +22 -23
  727. package/src/transaction/offline/TransactionReconstructor.ts +83 -91
  728. package/src/transaction/offline/TransactionSerializer.ts +151 -101
  729. package/src/transaction/offline/TransactionStateCapture.ts +83 -79
  730. package/src/transaction/offline/interfaces/ISerializableState.ts +1 -1
  731. package/src/transaction/offline/interfaces/ITypeSpecificData.ts +1 -1
  732. package/src/transaction/shared/P2TR_MS.ts +4 -4
  733. package/src/transaction/shared/TweakedTransaction.ts +326 -124
  734. package/src/transaction/utils/WitnessUtils.ts +18 -9
  735. package/src/utils/BufferHelper.ts +39 -37
  736. package/src/utxo/OPNetLimitedProvider.ts +7 -7
  737. package/src/utxo/interfaces/IUTXO.ts +7 -7
  738. package/src/verification/TapscriptVerificator.ts +73 -86
  739. package/test/address-rotation.test.ts +24 -24
  740. package/test/address.test.ts +12 -12
  741. package/test/addressmap.test.ts +30 -30
  742. package/test/binary-reader-writer.test.ts +8 -8
  743. package/test/browser/offline-transaction.test.ts +2206 -0
  744. package/test/browser/parallel-signing.test.ts +316 -0
  745. package/test/browser/setup.ts +11 -0
  746. package/test/browser/transaction-signing.test.ts +416 -0
  747. package/test/buffer-helper.test.ts +287 -0
  748. package/test/derivePath.test.ts +4 -3
  749. package/test/disposable.test.ts +279 -0
  750. package/test/fastmap-setall.test.ts +1 -1
  751. package/test/fastmap.test.ts +3 -3
  752. package/test/messagesigner-mldsa.test.ts +3 -3
  753. package/test/messagesigner-schnorr.test.ts +9 -9
  754. package/test/offline-transaction.test.ts +461 -288
  755. package/test/old/FastBigIntMap.ts +3 -3
  756. package/test/oldfastmap.test.ts +6 -6
  757. package/test/transaction-builders.test.ts +321 -0
  758. package/tsconfig.base.json +34 -18
  759. package/tsconfig.browser.json +15 -0
  760. package/tsconfig.json +3 -8
  761. package/vite.config.browser.ts +4 -5
  762. package/vitest.config.browser.ts +68 -0
  763. package/vitest.config.ts +1 -1
  764. package/browser/valibot.js +0 -4948
  765. package/tsconfig.webpack.json +0 -18
@@ -1,187 +1,487 @@
1
- const ft = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0;
2
- function Ae(t) {
1
+ function t0(t) {
3
2
  return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
4
3
  }
5
- function Ht(t) {
6
- if (!Number.isSafeInteger(t) || t < 0)
7
- throw new Error("positive integer expected, got " + t);
8
- }
9
- function ht(t, ...e) {
10
- if (!Ae(t))
4
+ function Zt(t, ...e) {
5
+ if (!t0(t))
11
6
  throw new Error("Uint8Array expected");
12
7
  if (e.length > 0 && !e.includes(t.length))
13
8
  throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
14
9
  }
15
- function $t(t) {
10
+ function ee(t, e = !0) {
11
+ if (t.destroyed)
12
+ throw new Error("Hash instance has been destroyed");
13
+ if (e && t.finished)
14
+ throw new Error("Hash#digest() has already been called");
15
+ }
16
+ function e0(t, e) {
17
+ Zt(t);
18
+ const s = e.outputLen;
19
+ if (t.length < s)
20
+ throw new Error("digestInto() expects output buffer of length at least " + s);
21
+ }
22
+ function Yt(...t) {
23
+ for (let e = 0; e < t.length; e++)
24
+ t[e].fill(0);
25
+ }
26
+ function qt(t) {
27
+ return new DataView(t.buffer, t.byteOffset, t.byteLength);
28
+ }
29
+ function rt(t, e) {
30
+ return t << 32 - e | t >>> e;
31
+ }
32
+ function s0(t) {
33
+ if (typeof t != "string")
34
+ throw new Error("string expected");
35
+ return new Uint8Array(new TextEncoder().encode(t));
36
+ }
37
+ function Ie(t) {
38
+ return typeof t == "string" && (t = s0(t)), Zt(t), t;
39
+ }
40
+ class n0 {
41
+ }
42
+ function r0(t) {
43
+ const e = (o) => t().update(Ie(o)).digest(), s = t();
44
+ return e.outputLen = s.outputLen, e.blockLen = s.blockLen, e.create = () => t(), e;
45
+ }
46
+ function i0(t, e, s, o) {
47
+ if (typeof t.setBigUint64 == "function")
48
+ return t.setBigUint64(e, s, o);
49
+ const i = BigInt(32), c = BigInt(4294967295), r = Number(s >> i & c), a = Number(s & c), d = o ? 4 : 0, x = o ? 0 : 4;
50
+ t.setUint32(e + d, r, o), t.setUint32(e + x, a, o);
51
+ }
52
+ function c0(t, e, s) {
53
+ return t & e ^ ~t & s;
54
+ }
55
+ function o0(t, e, s) {
56
+ return t & e ^ t & s ^ e & s;
57
+ }
58
+ let a0 = class extends n0 {
59
+ constructor(e, s, o, i) {
60
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = s, this.padOffset = o, this.isLE = i, this.buffer = new Uint8Array(e), this.view = qt(this.buffer);
61
+ }
62
+ update(e) {
63
+ ee(this), e = Ie(e), Zt(e);
64
+ const { view: s, buffer: o, blockLen: i } = this, c = e.length;
65
+ for (let r = 0; r < c; ) {
66
+ const a = Math.min(i - this.pos, c - r);
67
+ if (a === i) {
68
+ const d = qt(e);
69
+ for (; i <= c - r; r += i)
70
+ this.process(d, r);
71
+ continue;
72
+ }
73
+ o.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === i && (this.process(s, 0), this.pos = 0);
74
+ }
75
+ return this.length += e.length, this.roundClean(), this;
76
+ }
77
+ digestInto(e) {
78
+ ee(this), e0(e, this), this.finished = !0;
79
+ const { buffer: s, view: o, blockLen: i, isLE: c } = this;
80
+ let { pos: r } = this;
81
+ s[r++] = 128, Yt(this.buffer.subarray(r)), this.padOffset > i - r && (this.process(o, 0), r = 0);
82
+ for (let f = r; f < i; f++)
83
+ s[f] = 0;
84
+ i0(o, i - 8, BigInt(this.length * 8), c), this.process(o, 0);
85
+ const a = qt(e), d = this.outputLen;
86
+ if (d % 4)
87
+ throw new Error("_sha2: outputLen should be aligned to 32bit");
88
+ const x = d / 4, H = this.get();
89
+ if (x > H.length)
90
+ throw new Error("_sha2: outputLen bigger than state");
91
+ for (let f = 0; f < x; f++)
92
+ a.setUint32(4 * f, H[f], c);
93
+ }
94
+ digest() {
95
+ const { buffer: e, outputLen: s } = this;
96
+ this.digestInto(e);
97
+ const o = e.slice(0, s);
98
+ return this.destroy(), o;
99
+ }
100
+ _cloneInto(e) {
101
+ e || (e = new this.constructor()), e.set(...this.get());
102
+ const { blockLen: s, buffer: o, length: i, finished: c, destroyed: r, pos: a } = this;
103
+ return e.destroyed = r, e.finished = c, e.length = i, e.pos = a, i % s && e.buffer.set(o), e;
104
+ }
105
+ clone() {
106
+ return this._cloneInto();
107
+ }
108
+ };
109
+ const dt = /* @__PURE__ */ Uint32Array.from([
110
+ 1779033703,
111
+ 3144134277,
112
+ 1013904242,
113
+ 2773480762,
114
+ 1359893119,
115
+ 2600822924,
116
+ 528734635,
117
+ 1541459225
118
+ ]), h0 = /* @__PURE__ */ Uint32Array.from([
119
+ 1116352408,
120
+ 1899447441,
121
+ 3049323471,
122
+ 3921009573,
123
+ 961987163,
124
+ 1508970993,
125
+ 2453635748,
126
+ 2870763221,
127
+ 3624381080,
128
+ 310598401,
129
+ 607225278,
130
+ 1426881987,
131
+ 1925078388,
132
+ 2162078206,
133
+ 2614888103,
134
+ 3248222580,
135
+ 3835390401,
136
+ 4022224774,
137
+ 264347078,
138
+ 604807628,
139
+ 770255983,
140
+ 1249150122,
141
+ 1555081692,
142
+ 1996064986,
143
+ 2554220882,
144
+ 2821834349,
145
+ 2952996808,
146
+ 3210313671,
147
+ 3336571891,
148
+ 3584528711,
149
+ 113926993,
150
+ 338241895,
151
+ 666307205,
152
+ 773529912,
153
+ 1294757372,
154
+ 1396182291,
155
+ 1695183700,
156
+ 1986661051,
157
+ 2177026350,
158
+ 2456956037,
159
+ 2730485921,
160
+ 2820302411,
161
+ 3259730800,
162
+ 3345764771,
163
+ 3516065817,
164
+ 3600352804,
165
+ 4094571909,
166
+ 275423344,
167
+ 430227734,
168
+ 506948616,
169
+ 659060556,
170
+ 883997877,
171
+ 958139571,
172
+ 1322822218,
173
+ 1537002063,
174
+ 1747873779,
175
+ 1955562222,
176
+ 2024104815,
177
+ 2227730452,
178
+ 2361852424,
179
+ 2428436474,
180
+ 2756734187,
181
+ 3204031479,
182
+ 3329325298
183
+ ]), ut = /* @__PURE__ */ new Uint32Array(64);
184
+ class f0 extends a0 {
185
+ constructor(e = 32) {
186
+ super(64, e, 8, !1), this.A = dt[0] | 0, this.B = dt[1] | 0, this.C = dt[2] | 0, this.D = dt[3] | 0, this.E = dt[4] | 0, this.F = dt[5] | 0, this.G = dt[6] | 0, this.H = dt[7] | 0;
187
+ }
188
+ get() {
189
+ const { A: e, B: s, C: o, D: i, E: c, F: r, G: a, H: d } = this;
190
+ return [e, s, o, i, c, r, a, d];
191
+ }
192
+ // prettier-ignore
193
+ set(e, s, o, i, c, r, a, d) {
194
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0, this.F = r | 0, this.G = a | 0, this.H = d | 0;
195
+ }
196
+ process(e, s) {
197
+ for (let f = 0; f < 16; f++, s += 4)
198
+ ut[f] = e.getUint32(s, !1);
199
+ for (let f = 16; f < 64; f++) {
200
+ const g = ut[f - 15], w = ut[f - 2], S = rt(g, 7) ^ rt(g, 18) ^ g >>> 3, I = rt(w, 17) ^ rt(w, 19) ^ w >>> 10;
201
+ ut[f] = I + ut[f - 7] + S + ut[f - 16] | 0;
202
+ }
203
+ let { A: o, B: i, C: c, D: r, E: a, F: d, G: x, H } = this;
204
+ for (let f = 0; f < 64; f++) {
205
+ const g = rt(a, 6) ^ rt(a, 11) ^ rt(a, 25), w = H + g + c0(a, d, x) + h0[f] + ut[f] | 0, I = (rt(o, 2) ^ rt(o, 13) ^ rt(o, 22)) + o0(o, i, c) | 0;
206
+ H = x, x = d, d = a, a = r + w | 0, r = c, c = i, i = o, o = w + I | 0;
207
+ }
208
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(o, i, c, r, a, d, x, H);
209
+ }
210
+ roundClean() {
211
+ Yt(ut);
212
+ }
213
+ destroy() {
214
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), Yt(this.buffer);
215
+ }
216
+ }
217
+ const d0 = /* @__PURE__ */ r0(() => new f0()), Hs = d0;
218
+ function As(t) {
219
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
220
+ }
221
+ function zt(t) {
222
+ if (Object.prototype.hasOwnProperty.call(t, "__esModule")) return t;
223
+ var e = t.default;
224
+ if (typeof e == "function") {
225
+ var s = function o() {
226
+ var i = !1;
227
+ try {
228
+ i = this instanceof o;
229
+ } catch {
230
+ }
231
+ return i ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
232
+ };
233
+ s.prototype = e.prototype;
234
+ } else s = {};
235
+ return Object.defineProperty(s, "__esModule", { value: !0 }), Object.keys(t).forEach(function(o) {
236
+ var i = Object.getOwnPropertyDescriptor(t, o);
237
+ Object.defineProperty(s, o, i.get ? i : {
238
+ enumerable: !0,
239
+ get: function() {
240
+ return t[o];
241
+ }
242
+ });
243
+ }), s;
244
+ }
245
+ function u0(t) {
246
+ return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
247
+ }
248
+ function Gt(t, e = "") {
249
+ if (!Number.isSafeInteger(t) || t < 0) {
250
+ const s = e && `"${e}" `;
251
+ throw new Error(`${s}expected integer >= 0, got ${t}`);
252
+ }
253
+ }
254
+ function _t(t, e, s = "") {
255
+ const o = u0(t), i = t?.length, c = e !== void 0;
256
+ if (!o || c && i !== e) {
257
+ const r = s && `"${s}" `, a = c ? ` of length ${e}` : "", d = o ? `length=${i}` : `type=${typeof t}`;
258
+ throw new Error(r + "expected Uint8Array" + a + ", got " + d);
259
+ }
260
+ return t;
261
+ }
262
+ function l0(t) {
16
263
  if (typeof t != "function" || typeof t.create != "function")
17
- throw new Error("Hash should be wrapped by utils.createHasher");
18
- Ht(t.outputLen), Ht(t.blockLen);
264
+ throw new Error("Hash must wrapped by utils.createHasher");
265
+ Gt(t.outputLen), Gt(t.blockLen);
19
266
  }
20
- function St(t, e = !0) {
267
+ function mt(t, e = !0) {
21
268
  if (t.destroyed)
22
269
  throw new Error("Hash instance has been destroyed");
23
270
  if (e && t.finished)
24
271
  throw new Error("Hash#digest() has already been called");
25
272
  }
26
- function ye(t, e) {
27
- ht(t);
273
+ function Le(t, e) {
274
+ _t(t, void 0, "digestInto() output");
28
275
  const s = e.outputLen;
29
276
  if (t.length < s)
30
- throw new Error("digestInto() expects output buffer of length at least " + s);
277
+ throw new Error('"digestInto() output" expected to be of length >=' + s);
278
+ }
279
+ function b0(t) {
280
+ return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
31
281
  }
32
- function ct(...t) {
282
+ function tt(...t) {
33
283
  for (let e = 0; e < t.length; e++)
34
284
  t[e].fill(0);
35
285
  }
36
- function wt(t) {
286
+ function Kt(t) {
37
287
  return new DataView(t.buffer, t.byteOffset, t.byteLength);
38
288
  }
39
- function Z(t, e) {
289
+ function it(t, e) {
40
290
  return t << 32 - e | t >>> e;
41
291
  }
42
- const te = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", ge = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
43
- function ls(t) {
44
- if (ht(t), te)
292
+ function yt(t, e) {
293
+ return t << e | t >>> 32 - e >>> 0;
294
+ }
295
+ const x0 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
296
+ function H0(t) {
297
+ return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
298
+ }
299
+ function A0(t) {
300
+ for (let e = 0; e < t.length; e++)
301
+ t[e] = H0(t[e]);
302
+ return t;
303
+ }
304
+ const se = x0 ? (t) => t : A0, me = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", p0 = /* @__PURE__ */ Array.from({ length: 256 }, (t, e) => e.toString(16).padStart(2, "0"));
305
+ function ps(t) {
306
+ if (_t(t), me)
45
307
  return t.toHex();
46
308
  let e = "";
47
309
  for (let s = 0; s < t.length; s++)
48
- e += ge[t[s]];
310
+ e += p0[t[s]];
49
311
  return e;
50
312
  }
51
- const z = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
52
- function Vt(t) {
53
- if (t >= z._0 && t <= z._9)
54
- return t - z._0;
55
- if (t >= z.A && t <= z.F)
56
- return t - (z.A - 10);
57
- if (t >= z.a && t <= z.f)
58
- return t - (z.a - 10);
313
+ const ht = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
314
+ function ne(t) {
315
+ if (t >= ht._0 && t <= ht._9)
316
+ return t - ht._0;
317
+ if (t >= ht.A && t <= ht.F)
318
+ return t - (ht.A - 10);
319
+ if (t >= ht.a && t <= ht.f)
320
+ return t - (ht.a - 10);
59
321
  }
60
- function bs(t) {
322
+ function ys(t) {
61
323
  if (typeof t != "string")
62
324
  throw new Error("hex string expected, got " + typeof t);
63
- if (te)
325
+ if (me)
64
326
  return Uint8Array.fromHex(t);
65
327
  const e = t.length, s = e / 2;
66
328
  if (e % 2)
67
329
  throw new Error("hex string expected, got unpadded hex of length " + e);
68
- const i = new Uint8Array(s);
69
- for (let o = 0, r = 0; o < s; o++, r += 2) {
70
- const n = Vt(t.charCodeAt(r)), h = Vt(t.charCodeAt(r + 1));
71
- if (n === void 0 || h === void 0) {
72
- const b = t[r] + t[r + 1];
73
- throw new Error('hex string expected, got non-hex character "' + b + '" at index ' + r);
330
+ const o = new Uint8Array(s);
331
+ for (let i = 0, c = 0; i < s; i++, c += 2) {
332
+ const r = ne(t.charCodeAt(c)), a = ne(t.charCodeAt(c + 1));
333
+ if (r === void 0 || a === void 0) {
334
+ const d = t[c] + t[c + 1];
335
+ throw new Error('hex string expected, got non-hex character "' + d + '" at index ' + c);
74
336
  }
75
- i[o] = n * 16 + h;
337
+ o[i] = r * 16 + a;
76
338
  }
77
- return i;
78
- }
79
- function ee(t) {
80
- if (typeof t != "string")
81
- throw new Error("string expected");
82
- return new Uint8Array(new TextEncoder().encode(t));
83
- }
84
- function Ut(t) {
85
- return typeof t == "string" && (t = ee(t)), ht(t), t;
339
+ return o;
86
340
  }
87
- function Ct(t) {
88
- return typeof t == "string" && (t = ee(t)), ht(t), t;
89
- }
90
- function xs(...t) {
341
+ function _s(...t) {
91
342
  let e = 0;
92
- for (let i = 0; i < t.length; i++) {
93
- const o = t[i];
94
- ht(o), e += o.length;
343
+ for (let o = 0; o < t.length; o++) {
344
+ const i = t[o];
345
+ _t(i), e += i.length;
95
346
  }
96
347
  const s = new Uint8Array(e);
97
- for (let i = 0, o = 0; i < t.length; i++) {
98
- const r = t[i];
99
- s.set(r, o), o += r.length;
348
+ for (let o = 0, i = 0; o < t.length; o++) {
349
+ const c = t[o];
350
+ s.set(c, i), i += c.length;
100
351
  }
101
352
  return s;
102
353
  }
103
- function _e(t, e) {
104
- if (e !== void 0 && {}.toString.call(e) !== "[object Object]")
105
- throw new Error("options should be object or undefined");
106
- return Object.assign(t, e);
107
- }
108
- class se {
109
- }
110
- function ne(t) {
111
- const e = (i) => t().update(Ut(i)).digest(), s = t();
112
- return e.outputLen = s.outputLen, e.blockLen = s.blockLen, e.create = () => t(), e;
354
+ function ct(t, e = {}) {
355
+ const s = (i, c) => t(c).update(i).digest(), o = t(void 0);
356
+ return s.outputLen = o.outputLen, s.blockLen = o.blockLen, s.create = (i) => t(i), Object.assign(s, e), Object.freeze(s);
113
357
  }
114
- function Hs(t = 32) {
115
- if (ft && typeof ft.getRandomValues == "function")
116
- return ft.getRandomValues(new Uint8Array(t));
117
- if (ft && typeof ft.randomBytes == "function")
118
- return Uint8Array.from(ft.randomBytes(t));
119
- throw new Error("crypto.getRandomValues must be defined");
358
+ function gs(t = 32) {
359
+ const e = typeof globalThis == "object" ? globalThis.crypto : null;
360
+ if (typeof e?.getRandomValues != "function")
361
+ throw new Error("crypto.getRandomValues must be defined");
362
+ return e.getRandomValues(new Uint8Array(t));
120
363
  }
121
- function we(t, e, s, i) {
122
- if (typeof t.setBigUint64 == "function")
123
- return t.setBigUint64(e, s, i);
124
- const o = BigInt(32), r = BigInt(4294967295), n = Number(s >> o & r), h = Number(s & r), b = i ? 4 : 0, x = i ? 0 : 4;
125
- t.setUint32(e + b, n, i), t.setUint32(e + x, h, i);
364
+ const gt = (t) => ({
365
+ oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
366
+ });
367
+ class $t {
368
+ oHash;
369
+ iHash;
370
+ blockLen;
371
+ outputLen;
372
+ finished = !1;
373
+ destroyed = !1;
374
+ constructor(e, s) {
375
+ if (l0(e), _t(s, void 0, "key"), this.iHash = e.create(), typeof this.iHash.update != "function")
376
+ throw new Error("Expected instance of class which extends utils.Hash");
377
+ this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
378
+ const o = this.blockLen, i = new Uint8Array(o);
379
+ i.set(s.length > o ? e.create().update(s).digest() : s);
380
+ for (let c = 0; c < i.length; c++)
381
+ i[c] ^= 54;
382
+ this.iHash.update(i), this.oHash = e.create();
383
+ for (let c = 0; c < i.length; c++)
384
+ i[c] ^= 106;
385
+ this.oHash.update(i), tt(i);
386
+ }
387
+ update(e) {
388
+ return mt(this), this.iHash.update(e), this;
389
+ }
390
+ digestInto(e) {
391
+ mt(this), _t(e, this.outputLen, "output"), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
392
+ }
393
+ digest() {
394
+ const e = new Uint8Array(this.oHash.outputLen);
395
+ return this.digestInto(e), e;
396
+ }
397
+ _cloneInto(e) {
398
+ e ||= Object.create(Object.getPrototypeOf(this), {});
399
+ const { oHash: s, iHash: o, finished: i, destroyed: c, blockLen: r, outputLen: a } = this;
400
+ return e = e, e.finished = i, e.destroyed = c, e.blockLen = r, e.outputLen = a, e.oHash = s._cloneInto(e.oHash), e.iHash = o._cloneInto(e.iHash), e;
401
+ }
402
+ clone() {
403
+ return this._cloneInto();
404
+ }
405
+ destroy() {
406
+ this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
407
+ }
126
408
  }
127
- function Se(t, e, s) {
409
+ const Ue = (t, e, s) => new $t(t, e).update(s).digest();
410
+ Ue.create = (t, e) => new $t(t, e);
411
+ const y0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
412
+ __proto__: null,
413
+ _HMAC: $t,
414
+ hmac: Ue
415
+ }, Symbol.toStringTag, { value: "Module" })), Ss = /* @__PURE__ */ zt(y0);
416
+ function jt(t, e, s) {
128
417
  return t & e ^ ~t & s;
129
418
  }
130
- function Ie(t, e, s) {
419
+ function Ee(t, e, s) {
131
420
  return t & e ^ t & s ^ e & s;
132
421
  }
133
- class re extends se {
134
- constructor(e, s, i, o) {
135
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen = s, this.padOffset = i, this.isLE = o, this.buffer = new Uint8Array(e), this.view = wt(this.buffer);
422
+ class kt {
423
+ blockLen;
424
+ outputLen;
425
+ padOffset;
426
+ isLE;
427
+ // For partial updates less than block size
428
+ buffer;
429
+ view;
430
+ finished = !1;
431
+ length = 0;
432
+ pos = 0;
433
+ destroyed = !1;
434
+ constructor(e, s, o, i) {
435
+ this.blockLen = e, this.outputLen = s, this.padOffset = o, this.isLE = i, this.buffer = new Uint8Array(e), this.view = Kt(this.buffer);
136
436
  }
137
437
  update(e) {
138
- St(this), e = Ut(e), ht(e);
139
- const { view: s, buffer: i, blockLen: o } = this, r = e.length;
140
- for (let n = 0; n < r; ) {
141
- const h = Math.min(o - this.pos, r - n);
142
- if (h === o) {
143
- const b = wt(e);
144
- for (; o <= r - n; n += o)
145
- this.process(b, n);
438
+ mt(this), _t(e);
439
+ const { view: s, buffer: o, blockLen: i } = this, c = e.length;
440
+ for (let r = 0; r < c; ) {
441
+ const a = Math.min(i - this.pos, c - r);
442
+ if (a === i) {
443
+ const d = Kt(e);
444
+ for (; i <= c - r; r += i)
445
+ this.process(d, r);
146
446
  continue;
147
447
  }
148
- i.set(e.subarray(n, n + h), this.pos), this.pos += h, n += h, this.pos === o && (this.process(s, 0), this.pos = 0);
448
+ o.set(e.subarray(r, r + a), this.pos), this.pos += a, r += a, this.pos === i && (this.process(s, 0), this.pos = 0);
149
449
  }
150
450
  return this.length += e.length, this.roundClean(), this;
151
451
  }
152
452
  digestInto(e) {
153
- St(this), ye(e, this), this.finished = !0;
154
- const { buffer: s, view: i, blockLen: o, isLE: r } = this;
155
- let { pos: n } = this;
156
- s[n++] = 128, ct(this.buffer.subarray(n)), this.padOffset > o - n && (this.process(i, 0), n = 0);
157
- for (let u = n; u < o; u++)
158
- s[u] = 0;
159
- we(i, o - 8, BigInt(this.length * 8), r), this.process(i, 0);
160
- const h = wt(e), b = this.outputLen;
161
- if (b % 4)
162
- throw new Error("_sha2: outputLen should be aligned to 32bit");
163
- const x = b / 4, H = this.get();
453
+ mt(this), Le(e, this), this.finished = !0;
454
+ const { buffer: s, view: o, blockLen: i, isLE: c } = this;
455
+ let { pos: r } = this;
456
+ s[r++] = 128, tt(this.buffer.subarray(r)), this.padOffset > i - r && (this.process(o, 0), r = 0);
457
+ for (let f = r; f < i; f++)
458
+ s[f] = 0;
459
+ o.setBigUint64(i - 8, BigInt(this.length * 8), c), this.process(o, 0);
460
+ const a = Kt(e), d = this.outputLen;
461
+ if (d % 4)
462
+ throw new Error("_sha2: outputLen must be aligned to 32bit");
463
+ const x = d / 4, H = this.get();
164
464
  if (x > H.length)
165
465
  throw new Error("_sha2: outputLen bigger than state");
166
- for (let u = 0; u < x; u++)
167
- h.setUint32(4 * u, H[u], r);
466
+ for (let f = 0; f < x; f++)
467
+ a.setUint32(4 * f, H[f], c);
168
468
  }
169
469
  digest() {
170
470
  const { buffer: e, outputLen: s } = this;
171
471
  this.digestInto(e);
172
- const i = e.slice(0, s);
173
- return this.destroy(), i;
472
+ const o = e.slice(0, s);
473
+ return this.destroy(), o;
174
474
  }
175
475
  _cloneInto(e) {
176
- e || (e = new this.constructor()), e.set(...this.get());
177
- const { blockLen: s, buffer: i, length: o, finished: r, destroyed: n, pos: h } = this;
178
- return e.destroyed = n, e.finished = r, e.length = o, e.pos = h, o % s && e.buffer.set(i), e;
476
+ e ||= new this.constructor(), e.set(...this.get());
477
+ const { blockLen: s, buffer: o, length: i, finished: c, destroyed: r, pos: a } = this;
478
+ return e.destroyed = r, e.finished = c, e.length = i, e.pos = a, i % s && e.buffer.set(o), e;
179
479
  }
180
480
  clone() {
181
481
  return this._cloneInto();
182
482
  }
183
483
  }
184
- const st = /* @__PURE__ */ Uint32Array.from([
484
+ const lt = /* @__PURE__ */ Uint32Array.from([
185
485
  1779033703,
186
486
  3144134277,
187
487
  1013904242,
@@ -190,7 +490,33 @@ const st = /* @__PURE__ */ Uint32Array.from([
190
490
  2600822924,
191
491
  528734635,
192
492
  1541459225
193
- ]), q = /* @__PURE__ */ Uint32Array.from([
493
+ ]), bt = /* @__PURE__ */ Uint32Array.from([
494
+ 3238371032,
495
+ 914150663,
496
+ 812702999,
497
+ 4144912697,
498
+ 4290775857,
499
+ 1750603025,
500
+ 1694076839,
501
+ 3204075428
502
+ ]), J = /* @__PURE__ */ Uint32Array.from([
503
+ 3418070365,
504
+ 3238371032,
505
+ 1654270250,
506
+ 914150663,
507
+ 2438529370,
508
+ 812702999,
509
+ 355462360,
510
+ 4144912697,
511
+ 1731405415,
512
+ 4290775857,
513
+ 2394180231,
514
+ 1750603025,
515
+ 3675008525,
516
+ 1694076839,
517
+ 1203062813,
518
+ 3204075428
519
+ ]), Q = /* @__PURE__ */ Uint32Array.from([
194
520
  1779033703,
195
521
  4089235720,
196
522
  3144134277,
@@ -207,25 +533,196 @@ const st = /* @__PURE__ */ Uint32Array.from([
207
533
  4215389547,
208
534
  1541459225,
209
535
  327033209
210
- ]), At = /* @__PURE__ */ BigInt(2 ** 32 - 1), Dt = /* @__PURE__ */ BigInt(32);
211
- function Le(t, e = !1) {
212
- return e ? { h: Number(t & At), l: Number(t >> Dt & At) } : { h: Number(t >> Dt & At) | 0, l: Number(t & At) | 0 };
536
+ ]), Lt = /* @__PURE__ */ Uint32Array.from([
537
+ 1732584193,
538
+ 4023233417,
539
+ 2562383102,
540
+ 271733878,
541
+ 3285377520
542
+ ]), xt = /* @__PURE__ */ new Uint32Array(80);
543
+ class Ve extends kt {
544
+ A = Lt[0] | 0;
545
+ B = Lt[1] | 0;
546
+ C = Lt[2] | 0;
547
+ D = Lt[3] | 0;
548
+ E = Lt[4] | 0;
549
+ constructor() {
550
+ super(64, 20, 8, !1);
551
+ }
552
+ get() {
553
+ const { A: e, B: s, C: o, D: i, E: c } = this;
554
+ return [e, s, o, i, c];
555
+ }
556
+ set(e, s, o, i, c) {
557
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0;
558
+ }
559
+ process(e, s) {
560
+ for (let d = 0; d < 16; d++, s += 4)
561
+ xt[d] = e.getUint32(s, !1);
562
+ for (let d = 16; d < 80; d++)
563
+ xt[d] = yt(xt[d - 3] ^ xt[d - 8] ^ xt[d - 14] ^ xt[d - 16], 1);
564
+ let { A: o, B: i, C: c, D: r, E: a } = this;
565
+ for (let d = 0; d < 80; d++) {
566
+ let x, H;
567
+ d < 20 ? (x = jt(i, c, r), H = 1518500249) : d < 40 ? (x = i ^ c ^ r, H = 1859775393) : d < 60 ? (x = Ee(i, c, r), H = 2400959708) : (x = i ^ c ^ r, H = 3395469782);
568
+ const f = yt(o, 5) + x + a + H + xt[d] | 0;
569
+ a = r, r = c, c = yt(i, 30), i = o, o = f;
570
+ }
571
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, this.set(o, i, c, r, a);
572
+ }
573
+ roundClean() {
574
+ tt(xt);
575
+ }
576
+ destroy() {
577
+ this.set(0, 0, 0, 0, 0), tt(this.buffer);
578
+ }
579
+ }
580
+ const _0 = /* @__PURE__ */ ct(() => new Ve()), g0 = /* @__PURE__ */ Math.pow(2, 32), S0 = /* @__PURE__ */ Array.from({ length: 64 }, (t, e) => Math.floor(g0 * Math.abs(Math.sin(e + 1)))), Ft = /* @__PURE__ */ Lt.slice(0, 4), Nt = /* @__PURE__ */ new Uint32Array(16);
581
+ class Ce extends kt {
582
+ A = Ft[0] | 0;
583
+ B = Ft[1] | 0;
584
+ C = Ft[2] | 0;
585
+ D = Ft[3] | 0;
586
+ constructor() {
587
+ super(64, 16, 8, !0);
588
+ }
589
+ get() {
590
+ const { A: e, B: s, C: o, D: i } = this;
591
+ return [e, s, o, i];
592
+ }
593
+ set(e, s, o, i) {
594
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0;
595
+ }
596
+ process(e, s) {
597
+ for (let a = 0; a < 16; a++, s += 4)
598
+ Nt[a] = e.getUint32(s, !0);
599
+ let { A: o, B: i, C: c, D: r } = this;
600
+ for (let a = 0; a < 64; a++) {
601
+ let d, x, H;
602
+ a < 16 ? (d = jt(i, c, r), x = a, H = [7, 12, 17, 22]) : a < 32 ? (d = jt(r, i, c), x = (5 * a + 1) % 16, H = [5, 9, 14, 20]) : a < 48 ? (d = i ^ c ^ r, x = (3 * a + 5) % 16, H = [4, 11, 16, 23]) : (d = c ^ (i | ~r), x = 7 * a % 16, H = [6, 10, 15, 21]), d = d + o + S0[a] + Nt[x], o = r, r = c, c = i, i = i + yt(d, H[a % 4]);
603
+ }
604
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, this.set(o, i, c, r);
605
+ }
606
+ roundClean() {
607
+ tt(Nt);
608
+ }
609
+ destroy() {
610
+ this.set(0, 0, 0, 0), tt(this.buffer);
611
+ }
612
+ }
613
+ const w0 = /* @__PURE__ */ ct(() => new Ce()), B0 = /* @__PURE__ */ Uint8Array.from([
614
+ 7,
615
+ 4,
616
+ 13,
617
+ 1,
618
+ 10,
619
+ 6,
620
+ 15,
621
+ 3,
622
+ 12,
623
+ 0,
624
+ 9,
625
+ 5,
626
+ 2,
627
+ 14,
628
+ 11,
629
+ 8
630
+ ]), De = Uint8Array.from(new Array(16).fill(0).map((t, e) => e)), I0 = De.map((t) => (9 * t + 5) % 16), ke = /* @__PURE__ */ (() => {
631
+ const s = [[De], [I0]];
632
+ for (let o = 0; o < 4; o++)
633
+ for (let i of s)
634
+ i.push(i[o].map((c) => B0[c]));
635
+ return s;
636
+ })(), Fe = ke[0], Oe = ke[1], Te = /* @__PURE__ */ [
637
+ [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
638
+ [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
639
+ [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
640
+ [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
641
+ [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
642
+ ].map((t) => Uint8Array.from(t)), L0 = /* @__PURE__ */ Fe.map((t, e) => t.map((s) => Te[e][s])), m0 = /* @__PURE__ */ Oe.map((t, e) => t.map((s) => Te[e][s])), U0 = /* @__PURE__ */ Uint32Array.from([
643
+ 0,
644
+ 1518500249,
645
+ 1859775393,
646
+ 2400959708,
647
+ 2840853838
648
+ ]), E0 = /* @__PURE__ */ Uint32Array.from([
649
+ 1352829926,
650
+ 1548603684,
651
+ 1836072691,
652
+ 2053994217,
653
+ 0
654
+ ]);
655
+ function re(t, e, s, o) {
656
+ return t === 0 ? e ^ s ^ o : t === 1 ? e & s | ~e & o : t === 2 ? (e | ~s) ^ o : t === 3 ? e & o | s & ~o : e ^ (s | ~o);
657
+ }
658
+ const Ot = /* @__PURE__ */ new Uint32Array(16);
659
+ class ve extends kt {
660
+ h0 = 1732584193;
661
+ h1 = -271733879;
662
+ h2 = -1732584194;
663
+ h3 = 271733878;
664
+ h4 = -1009589776;
665
+ constructor() {
666
+ super(64, 20, 8, !0);
667
+ }
668
+ get() {
669
+ const { h0: e, h1: s, h2: o, h3: i, h4: c } = this;
670
+ return [e, s, o, i, c];
671
+ }
672
+ set(e, s, o, i, c) {
673
+ this.h0 = e | 0, this.h1 = s | 0, this.h2 = o | 0, this.h3 = i | 0, this.h4 = c | 0;
674
+ }
675
+ process(e, s) {
676
+ for (let w = 0; w < 16; w++, s += 4)
677
+ Ot[w] = e.getUint32(s, !0);
678
+ let o = this.h0 | 0, i = o, c = this.h1 | 0, r = c, a = this.h2 | 0, d = a, x = this.h3 | 0, H = x, f = this.h4 | 0, g = f;
679
+ for (let w = 0; w < 5; w++) {
680
+ const S = 4 - w, I = U0[w], D = E0[w], W = Fe[w], v = Oe[w], _ = L0[w], C = m0[w];
681
+ for (let A = 0; A < 16; A++) {
682
+ const B = yt(o + re(w, c, a, x) + Ot[W[A]] + I, _[A]) + f | 0;
683
+ o = f, f = x, x = yt(a, 10) | 0, a = c, c = B;
684
+ }
685
+ for (let A = 0; A < 16; A++) {
686
+ const B = yt(i + re(S, r, d, H) + Ot[v[A]] + D, C[A]) + g | 0;
687
+ i = g, g = H, H = yt(d, 10) | 0, d = r, r = B;
688
+ }
689
+ }
690
+ this.set(this.h1 + a + H | 0, this.h2 + x + g | 0, this.h3 + f + i | 0, this.h4 + o + r | 0, this.h0 + c + d | 0);
691
+ }
692
+ roundClean() {
693
+ tt(Ot);
694
+ }
695
+ destroy() {
696
+ this.destroyed = !0, tt(this.buffer), this.set(0, 0, 0, 0, 0);
697
+ }
698
+ }
699
+ const V0 = /* @__PURE__ */ ct(() => new ve()), C0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
700
+ __proto__: null,
701
+ _MD5: Ce,
702
+ _RIPEMD160: ve,
703
+ _SHA1: Ve,
704
+ md5: w0,
705
+ ripemd160: V0,
706
+ sha1: _0
707
+ }, Symbol.toStringTag, { value: "Module" })), ws = /* @__PURE__ */ zt(C0), Tt = /* @__PURE__ */ BigInt(2 ** 32 - 1), ie = /* @__PURE__ */ BigInt(32);
708
+ function D0(t, e = !1) {
709
+ return e ? { h: Number(t & Tt), l: Number(t >> ie & Tt) } : { h: Number(t >> ie & Tt) | 0, l: Number(t & Tt) | 0 };
213
710
  }
214
- function Be(t, e = !1) {
711
+ function Me(t, e = !1) {
215
712
  const s = t.length;
216
- let i = new Uint32Array(s), o = new Uint32Array(s);
217
- for (let r = 0; r < s; r++) {
218
- const { h: n, l: h } = Le(t[r], e);
219
- [i[r], o[r]] = [n, h];
713
+ let o = new Uint32Array(s), i = new Uint32Array(s);
714
+ for (let c = 0; c < s; c++) {
715
+ const { h: r, l: a } = D0(t[c], e);
716
+ [o[c], i[c]] = [r, a];
220
717
  }
221
- return [i, o];
718
+ return [o, i];
222
719
  }
223
- const Ot = (t, e, s) => t >>> s, Ft = (t, e, s) => t << 32 - s | e >>> s, dt = (t, e, s) => t >>> s | e << 32 - s, ut = (t, e, s) => t << 32 - s | e >>> s, yt = (t, e, s) => t << 64 - s | e >>> s - 32, gt = (t, e, s) => t >>> s - 32 | e << 64 - s;
224
- function $(t, e, s, i) {
225
- const o = (e >>> 0) + (i >>> 0);
226
- return { h: t + s + (o / 2 ** 32 | 0) | 0, l: o | 0 };
720
+ const ce = (t, e, s) => t >>> s, oe = (t, e, s) => t << 32 - s | e >>> s, Bt = (t, e, s) => t >>> s | e << 32 - s, It = (t, e, s) => t << 32 - s | e >>> s, vt = (t, e, s) => t << 64 - s | e >>> s - 32, Mt = (t, e, s) => t >>> s - 32 | e << 64 - s, k0 = (t, e, s) => t << s | e >>> 32 - s, F0 = (t, e, s) => e << s | t >>> 32 - s, O0 = (t, e, s) => e << s - 32 | t >>> 64 - s, T0 = (t, e, s) => t << s - 32 | e >>> 64 - s;
721
+ function ft(t, e, s, o) {
722
+ const i = (e >>> 0) + (o >>> 0);
723
+ return { h: t + s + (i / 2 ** 32 | 0) | 0, l: i | 0 };
227
724
  }
228
- const me = (t, e, s) => (t >>> 0) + (e >>> 0) + (s >>> 0), Ue = (t, e, s, i) => e + s + i + (t / 2 ** 32 | 0) | 0, Ee = (t, e, s, i) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (i >>> 0), ke = (t, e, s, i, o) => e + s + i + o + (t / 2 ** 32 | 0) | 0, Ve = (t, e, s, i, o) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (i >>> 0) + (o >>> 0), Ce = (t, e, s, i, o, r) => e + s + i + o + r + (t / 2 ** 32 | 0) | 0, De = /* @__PURE__ */ Uint32Array.from([
725
+ const v0 = (t, e, s) => (t >>> 0) + (e >>> 0) + (s >>> 0), M0 = (t, e, s, o) => e + s + o + (t / 2 ** 32 | 0) | 0, G0 = (t, e, s, o) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (o >>> 0), j0 = (t, e, s, o, i) => e + s + o + i + (t / 2 ** 32 | 0) | 0, W0 = (t, e, s, o, i) => (t >>> 0) + (e >>> 0) + (s >>> 0) + (o >>> 0) + (i >>> 0), R0 = (t, e, s, o, i, c) => e + s + o + i + c + (t / 2 ** 32 | 0) | 0, P0 = /* @__PURE__ */ Uint32Array.from([
229
726
  1116352408,
230
727
  1899447441,
231
728
  3049323471,
@@ -290,42 +787,70 @@ const me = (t, e, s) => (t >>> 0) + (e >>> 0) + (s >>> 0), Ue = (t, e, s, i) =>
290
787
  2756734187,
291
788
  3204031479,
292
789
  3329325298
293
- ]), nt = /* @__PURE__ */ new Uint32Array(64);
294
- class Oe extends re {
295
- constructor(e = 32) {
296
- super(64, e, 8, !1), this.A = st[0] | 0, this.B = st[1] | 0, this.C = st[2] | 0, this.D = st[3] | 0, this.E = st[4] | 0, this.F = st[5] | 0, this.G = st[6] | 0, this.H = st[7] | 0;
790
+ ]), Ht = /* @__PURE__ */ new Uint32Array(64);
791
+ class Ge extends kt {
792
+ constructor(e) {
793
+ super(64, e, 8, !1);
297
794
  }
298
795
  get() {
299
- const { A: e, B: s, C: i, D: o, E: r, F: n, G: h, H: b } = this;
300
- return [e, s, i, o, r, n, h, b];
796
+ const { A: e, B: s, C: o, D: i, E: c, F: r, G: a, H: d } = this;
797
+ return [e, s, o, i, c, r, a, d];
301
798
  }
302
799
  // prettier-ignore
303
- set(e, s, i, o, r, n, h, b) {
304
- this.A = e | 0, this.B = s | 0, this.C = i | 0, this.D = o | 0, this.E = r | 0, this.F = n | 0, this.G = h | 0, this.H = b | 0;
800
+ set(e, s, o, i, c, r, a, d) {
801
+ this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0, this.E = c | 0, this.F = r | 0, this.G = a | 0, this.H = d | 0;
305
802
  }
306
803
  process(e, s) {
307
- for (let u = 0; u < 16; u++, s += 4)
308
- nt[u] = e.getUint32(s, !1);
309
- for (let u = 16; u < 64; u++) {
310
- const A = nt[u - 15], m = nt[u - 2], w = Z(A, 7) ^ Z(A, 18) ^ A >>> 3, I = Z(m, 17) ^ Z(m, 19) ^ m >>> 10;
311
- nt[u] = I + nt[u - 7] + w + nt[u - 16] | 0;
804
+ for (let f = 0; f < 16; f++, s += 4)
805
+ Ht[f] = e.getUint32(s, !1);
806
+ for (let f = 16; f < 64; f++) {
807
+ const g = Ht[f - 15], w = Ht[f - 2], S = it(g, 7) ^ it(g, 18) ^ g >>> 3, I = it(w, 17) ^ it(w, 19) ^ w >>> 10;
808
+ Ht[f] = I + Ht[f - 7] + S + Ht[f - 16] | 0;
312
809
  }
313
- let { A: i, B: o, C: r, D: n, E: h, F: b, G: x, H } = this;
314
- for (let u = 0; u < 64; u++) {
315
- const A = Z(h, 6) ^ Z(h, 11) ^ Z(h, 25), m = H + A + Se(h, b, x) + De[u] + nt[u] | 0, I = (Z(i, 2) ^ Z(i, 13) ^ Z(i, 22)) + Ie(i, o, r) | 0;
316
- H = x, x = b, b = h, h = n + m | 0, n = r, r = o, o = i, i = m + I | 0;
810
+ let { A: o, B: i, C: c, D: r, E: a, F: d, G: x, H } = this;
811
+ for (let f = 0; f < 64; f++) {
812
+ const g = it(a, 6) ^ it(a, 11) ^ it(a, 25), w = H + g + jt(a, d, x) + P0[f] + Ht[f] | 0, I = (it(o, 2) ^ it(o, 13) ^ it(o, 22)) + Ee(o, i, c) | 0;
813
+ H = x, x = d, d = a, a = r + w | 0, r = c, c = i, i = o, o = w + I | 0;
317
814
  }
318
- i = i + this.A | 0, o = o + this.B | 0, r = r + this.C | 0, n = n + this.D | 0, h = h + this.E | 0, b = b + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(i, o, r, n, h, b, x, H);
815
+ o = o + this.A | 0, i = i + this.B | 0, c = c + this.C | 0, r = r + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, x = x + this.G | 0, H = H + this.H | 0, this.set(o, i, c, r, a, d, x, H);
319
816
  }
320
817
  roundClean() {
321
- ct(nt);
818
+ tt(Ht);
322
819
  }
323
820
  destroy() {
324
- this.set(0, 0, 0, 0, 0, 0, 0, 0), ct(this.buffer);
821
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), tt(this.buffer);
325
822
  }
326
823
  }
327
- const ie = Be([
328
- "0x428a2f98d728ae22",
824
+ class je extends Ge {
825
+ // We cannot use array here since array allows indexing by variable
826
+ // which means optimizer/compiler cannot use registers.
827
+ A = lt[0] | 0;
828
+ B = lt[1] | 0;
829
+ C = lt[2] | 0;
830
+ D = lt[3] | 0;
831
+ E = lt[4] | 0;
832
+ F = lt[5] | 0;
833
+ G = lt[6] | 0;
834
+ H = lt[7] | 0;
835
+ constructor() {
836
+ super(32);
837
+ }
838
+ }
839
+ class We extends Ge {
840
+ A = bt[0] | 0;
841
+ B = bt[1] | 0;
842
+ C = bt[2] | 0;
843
+ D = bt[3] | 0;
844
+ E = bt[4] | 0;
845
+ F = bt[5] | 0;
846
+ G = bt[6] | 0;
847
+ H = bt[7] | 0;
848
+ constructor() {
849
+ super(28);
850
+ }
851
+ }
852
+ const Re = Me([
853
+ "0x428a2f98d728ae22",
329
854
  "0x7137449123ef65cd",
330
855
  "0xb5c0fbcfec4d3b2f",
331
856
  "0xe9b5dba58189dbbc",
@@ -405,287 +930,1220 @@ const ie = Be([
405
930
  "0x597f299cfc657e2a",
406
931
  "0x5fcb6fab3ad6faec",
407
932
  "0x6c44198c4a475817"
408
- ].map((t) => BigInt(t))), Fe = ie[0], Te = ie[1], rt = /* @__PURE__ */ new Uint32Array(80), it = /* @__PURE__ */ new Uint32Array(80);
409
- class Me extends re {
410
- constructor(e = 64) {
411
- super(128, e, 16, !1), this.Ah = q[0] | 0, this.Al = q[1] | 0, this.Bh = q[2] | 0, this.Bl = q[3] | 0, this.Ch = q[4] | 0, this.Cl = q[5] | 0, this.Dh = q[6] | 0, this.Dl = q[7] | 0, this.Eh = q[8] | 0, this.El = q[9] | 0, this.Fh = q[10] | 0, this.Fl = q[11] | 0, this.Gh = q[12] | 0, this.Gl = q[13] | 0, this.Hh = q[14] | 0, this.Hl = q[15] | 0;
933
+ ].map((t) => BigInt(t))), q0 = Re[0], K0 = Re[1], At = /* @__PURE__ */ new Uint32Array(80), pt = /* @__PURE__ */ new Uint32Array(80);
934
+ class Wt extends kt {
935
+ constructor(e) {
936
+ super(128, e, 16, !1);
937
+ }
938
+ // prettier-ignore
939
+ get() {
940
+ const { Ah: e, Al: s, Bh: o, Bl: i, Ch: c, Cl: r, Dh: a, Dl: d, Eh: x, El: H, Fh: f, Fl: g, Gh: w, Gl: S, Hh: I, Hl: D } = this;
941
+ return [e, s, o, i, c, r, a, d, x, H, f, g, w, S, I, D];
942
+ }
943
+ // prettier-ignore
944
+ set(e, s, o, i, c, r, a, d, x, H, f, g, w, S, I, D) {
945
+ this.Ah = e | 0, this.Al = s | 0, this.Bh = o | 0, this.Bl = i | 0, this.Ch = c | 0, this.Cl = r | 0, this.Dh = a | 0, this.Dl = d | 0, this.Eh = x | 0, this.El = H | 0, this.Fh = f | 0, this.Fl = g | 0, this.Gh = w | 0, this.Gl = S | 0, this.Hh = I | 0, this.Hl = D | 0;
946
+ }
947
+ process(e, s) {
948
+ for (let _ = 0; _ < 16; _++, s += 4)
949
+ At[_] = e.getUint32(s), pt[_] = e.getUint32(s += 4);
950
+ for (let _ = 16; _ < 80; _++) {
951
+ const C = At[_ - 15] | 0, A = pt[_ - 15] | 0, B = Bt(C, A, 1) ^ Bt(C, A, 8) ^ ce(C, A, 7), m = It(C, A, 1) ^ It(C, A, 8) ^ oe(C, A, 7), E = At[_ - 2] | 0, h = pt[_ - 2] | 0, u = Bt(E, h, 19) ^ vt(E, h, 61) ^ ce(E, h, 6), l = It(E, h, 19) ^ Mt(E, h, 61) ^ oe(E, h, 6), L = G0(m, l, pt[_ - 7], pt[_ - 16]), p = j0(L, B, u, At[_ - 7], At[_ - 16]);
952
+ At[_] = p | 0, pt[_] = L | 0;
953
+ }
954
+ let { Ah: o, Al: i, Bh: c, Bl: r, Ch: a, Cl: d, Dh: x, Dl: H, Eh: f, El: g, Fh: w, Fl: S, Gh: I, Gl: D, Hh: W, Hl: v } = this;
955
+ for (let _ = 0; _ < 80; _++) {
956
+ const C = Bt(f, g, 14) ^ Bt(f, g, 18) ^ vt(f, g, 41), A = It(f, g, 14) ^ It(f, g, 18) ^ Mt(f, g, 41), B = f & w ^ ~f & I, m = g & S ^ ~g & D, E = W0(v, A, m, K0[_], pt[_]), h = R0(E, W, C, B, q0[_], At[_]), u = E | 0, l = Bt(o, i, 28) ^ vt(o, i, 34) ^ vt(o, i, 39), L = It(o, i, 28) ^ Mt(o, i, 34) ^ Mt(o, i, 39), p = o & c ^ o & a ^ c & a, U = i & r ^ i & d ^ r & d;
957
+ W = I | 0, v = D | 0, I = w | 0, D = S | 0, w = f | 0, S = g | 0, { h: f, l: g } = ft(x | 0, H | 0, h | 0, u | 0), x = a | 0, H = d | 0, a = c | 0, d = r | 0, c = o | 0, r = i | 0;
958
+ const F = v0(u, L, U);
959
+ o = M0(F, h, l, p), i = F | 0;
960
+ }
961
+ ({ h: o, l: i } = ft(this.Ah | 0, this.Al | 0, o | 0, i | 0)), { h: c, l: r } = ft(this.Bh | 0, this.Bl | 0, c | 0, r | 0), { h: a, l: d } = ft(this.Ch | 0, this.Cl | 0, a | 0, d | 0), { h: x, l: H } = ft(this.Dh | 0, this.Dl | 0, x | 0, H | 0), { h: f, l: g } = ft(this.Eh | 0, this.El | 0, f | 0, g | 0), { h: w, l: S } = ft(this.Fh | 0, this.Fl | 0, w | 0, S | 0), { h: I, l: D } = ft(this.Gh | 0, this.Gl | 0, I | 0, D | 0), { h: W, l: v } = ft(this.Hh | 0, this.Hl | 0, W | 0, v | 0), this.set(o, i, c, r, a, d, x, H, f, g, w, S, I, D, W, v);
962
+ }
963
+ roundClean() {
964
+ tt(At, pt);
965
+ }
966
+ destroy() {
967
+ tt(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
968
+ }
969
+ }
970
+ class Pe extends Wt {
971
+ Ah = Q[0] | 0;
972
+ Al = Q[1] | 0;
973
+ Bh = Q[2] | 0;
974
+ Bl = Q[3] | 0;
975
+ Ch = Q[4] | 0;
976
+ Cl = Q[5] | 0;
977
+ Dh = Q[6] | 0;
978
+ Dl = Q[7] | 0;
979
+ Eh = Q[8] | 0;
980
+ El = Q[9] | 0;
981
+ Fh = Q[10] | 0;
982
+ Fl = Q[11] | 0;
983
+ Gh = Q[12] | 0;
984
+ Gl = Q[13] | 0;
985
+ Hh = Q[14] | 0;
986
+ Hl = Q[15] | 0;
987
+ constructor() {
988
+ super(64);
989
+ }
990
+ }
991
+ class qe extends Wt {
992
+ Ah = J[0] | 0;
993
+ Al = J[1] | 0;
994
+ Bh = J[2] | 0;
995
+ Bl = J[3] | 0;
996
+ Ch = J[4] | 0;
997
+ Cl = J[5] | 0;
998
+ Dh = J[6] | 0;
999
+ Dl = J[7] | 0;
1000
+ Eh = J[8] | 0;
1001
+ El = J[9] | 0;
1002
+ Fh = J[10] | 0;
1003
+ Fl = J[11] | 0;
1004
+ Gh = J[12] | 0;
1005
+ Gl = J[13] | 0;
1006
+ Hh = J[14] | 0;
1007
+ Hl = J[15] | 0;
1008
+ constructor() {
1009
+ super(48);
1010
+ }
1011
+ }
1012
+ const Y = /* @__PURE__ */ Uint32Array.from([
1013
+ 2352822216,
1014
+ 424955298,
1015
+ 1944164710,
1016
+ 2312950998,
1017
+ 502970286,
1018
+ 855612546,
1019
+ 1738396948,
1020
+ 1479516111,
1021
+ 258812777,
1022
+ 2077511080,
1023
+ 2011393907,
1024
+ 79989058,
1025
+ 1067287976,
1026
+ 1780299464,
1027
+ 286451373,
1028
+ 2446758561
1029
+ ]), Z = /* @__PURE__ */ Uint32Array.from([
1030
+ 573645204,
1031
+ 4230739756,
1032
+ 2673172387,
1033
+ 3360449730,
1034
+ 596883563,
1035
+ 1867755857,
1036
+ 2520282905,
1037
+ 1497426621,
1038
+ 2519219938,
1039
+ 2827943907,
1040
+ 3193839141,
1041
+ 1401305490,
1042
+ 721525244,
1043
+ 746961066,
1044
+ 246885852,
1045
+ 2177182882
1046
+ ]);
1047
+ class Ke extends Wt {
1048
+ Ah = Y[0] | 0;
1049
+ Al = Y[1] | 0;
1050
+ Bh = Y[2] | 0;
1051
+ Bl = Y[3] | 0;
1052
+ Ch = Y[4] | 0;
1053
+ Cl = Y[5] | 0;
1054
+ Dh = Y[6] | 0;
1055
+ Dl = Y[7] | 0;
1056
+ Eh = Y[8] | 0;
1057
+ El = Y[9] | 0;
1058
+ Fh = Y[10] | 0;
1059
+ Fl = Y[11] | 0;
1060
+ Gh = Y[12] | 0;
1061
+ Gl = Y[13] | 0;
1062
+ Hh = Y[14] | 0;
1063
+ Hl = Y[15] | 0;
1064
+ constructor() {
1065
+ super(28);
1066
+ }
1067
+ }
1068
+ class Ne extends Wt {
1069
+ Ah = Z[0] | 0;
1070
+ Al = Z[1] | 0;
1071
+ Bh = Z[2] | 0;
1072
+ Bl = Z[3] | 0;
1073
+ Ch = Z[4] | 0;
1074
+ Cl = Z[5] | 0;
1075
+ Dh = Z[6] | 0;
1076
+ Dl = Z[7] | 0;
1077
+ Eh = Z[8] | 0;
1078
+ El = Z[9] | 0;
1079
+ Fh = Z[10] | 0;
1080
+ Fl = Z[11] | 0;
1081
+ Gh = Z[12] | 0;
1082
+ Gl = Z[13] | 0;
1083
+ Hh = Z[14] | 0;
1084
+ Hl = Z[15] | 0;
1085
+ constructor() {
1086
+ super(32);
1087
+ }
1088
+ }
1089
+ const N0 = /* @__PURE__ */ ct(
1090
+ () => new je(),
1091
+ /* @__PURE__ */ gt(1)
1092
+ ), X0 = /* @__PURE__ */ ct(
1093
+ () => new We(),
1094
+ /* @__PURE__ */ gt(4)
1095
+ ), J0 = /* @__PURE__ */ ct(
1096
+ () => new Pe(),
1097
+ /* @__PURE__ */ gt(3)
1098
+ ), Q0 = /* @__PURE__ */ ct(
1099
+ () => new qe(),
1100
+ /* @__PURE__ */ gt(2)
1101
+ ), Y0 = /* @__PURE__ */ ct(
1102
+ () => new Ne(),
1103
+ /* @__PURE__ */ gt(6)
1104
+ ), Z0 = /* @__PURE__ */ ct(
1105
+ () => new Ke(),
1106
+ /* @__PURE__ */ gt(5)
1107
+ ), z0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1108
+ __proto__: null,
1109
+ _SHA224: We,
1110
+ _SHA256: je,
1111
+ _SHA384: qe,
1112
+ _SHA512: Pe,
1113
+ _SHA512_224: Ke,
1114
+ _SHA512_256: Ne,
1115
+ sha224: X0,
1116
+ sha256: N0,
1117
+ sha384: Q0,
1118
+ sha512: J0,
1119
+ sha512_224: Z0,
1120
+ sha512_256: Y0
1121
+ }, Symbol.toStringTag, { value: "Module" })), Bs = /* @__PURE__ */ zt(z0);
1122
+ var st = {}, R = {}, z = {}, Xt = {}, Et = {}, ae;
1123
+ function $0() {
1124
+ return ae || (ae = 1, Object.defineProperty(Et, "__esModule", { value: !0 }), Et.crypto = void 0, Et.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Et;
1125
+ }
1126
+ var he;
1127
+ function Xe() {
1128
+ return he || (he = 1, (function(t) {
1129
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = o, t.abytes = i, t.ahash = c, t.aexists = r, t.aoutput = a, t.u8 = d, t.u32 = x, t.clean = H, t.createView = f, t.rotr = g, t.rotl = w, t.byteSwap = S, t.byteSwap32 = I, t.bytesToHex = v, t.hexToBytes = A, t.asyncLoop = m, t.utf8ToBytes = E, t.bytesToUtf8 = h, t.toBytes = u, t.kdfInputToBytes = l, t.concatBytes = L, t.checkOpts = p, t.createHasher = F, t.createOptHasher = M, t.createXOFer = G, t.randomBytes = q;
1130
+ const e = /* @__PURE__ */ $0();
1131
+ function s(n) {
1132
+ return n instanceof Uint8Array || ArrayBuffer.isView(n) && n.constructor.name === "Uint8Array";
1133
+ }
1134
+ function o(n) {
1135
+ if (!Number.isSafeInteger(n) || n < 0)
1136
+ throw new Error("positive integer expected, got " + n);
1137
+ }
1138
+ function i(n, ...b) {
1139
+ if (!s(n))
1140
+ throw new Error("Uint8Array expected");
1141
+ if (b.length > 0 && !b.includes(n.length))
1142
+ throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
1143
+ }
1144
+ function c(n) {
1145
+ if (typeof n != "function" || typeof n.create != "function")
1146
+ throw new Error("Hash should be wrapped by utils.createHasher");
1147
+ o(n.outputLen), o(n.blockLen);
1148
+ }
1149
+ function r(n, b = !0) {
1150
+ if (n.destroyed)
1151
+ throw new Error("Hash instance has been destroyed");
1152
+ if (b && n.finished)
1153
+ throw new Error("Hash#digest() has already been called");
1154
+ }
1155
+ function a(n, b) {
1156
+ i(n);
1157
+ const y = b.outputLen;
1158
+ if (n.length < y)
1159
+ throw new Error("digestInto() expects output buffer of length at least " + y);
1160
+ }
1161
+ function d(n) {
1162
+ return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
1163
+ }
1164
+ function x(n) {
1165
+ return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
1166
+ }
1167
+ function H(...n) {
1168
+ for (let b = 0; b < n.length; b++)
1169
+ n[b].fill(0);
1170
+ }
1171
+ function f(n) {
1172
+ return new DataView(n.buffer, n.byteOffset, n.byteLength);
1173
+ }
1174
+ function g(n, b) {
1175
+ return n << 32 - b | n >>> b;
1176
+ }
1177
+ function w(n, b) {
1178
+ return n << b | n >>> 32 - b >>> 0;
1179
+ }
1180
+ t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1181
+ function S(n) {
1182
+ return n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255;
1183
+ }
1184
+ t.swap8IfBE = t.isLE ? (n) => n : (n) => S(n), t.byteSwapIfBE = t.swap8IfBE;
1185
+ function I(n) {
1186
+ for (let b = 0; b < n.length; b++)
1187
+ n[b] = S(n[b]);
1188
+ return n;
1189
+ }
1190
+ t.swap32IfBE = t.isLE ? (n) => n : I;
1191
+ const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", W = /* @__PURE__ */ Array.from({ length: 256 }, (n, b) => b.toString(16).padStart(2, "0"));
1192
+ function v(n) {
1193
+ if (i(n), D)
1194
+ return n.toHex();
1195
+ let b = "";
1196
+ for (let y = 0; y < n.length; y++)
1197
+ b += W[n[y]];
1198
+ return b;
1199
+ }
1200
+ const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
1201
+ function C(n) {
1202
+ if (n >= _._0 && n <= _._9)
1203
+ return n - _._0;
1204
+ if (n >= _.A && n <= _.F)
1205
+ return n - (_.A - 10);
1206
+ if (n >= _.a && n <= _.f)
1207
+ return n - (_.a - 10);
1208
+ }
1209
+ function A(n) {
1210
+ if (typeof n != "string")
1211
+ throw new Error("hex string expected, got " + typeof n);
1212
+ if (D)
1213
+ return Uint8Array.fromHex(n);
1214
+ const b = n.length, y = b / 2;
1215
+ if (b % 2)
1216
+ throw new Error("hex string expected, got unpadded hex of length " + b);
1217
+ const V = new Uint8Array(y);
1218
+ for (let k = 0, j = 0; k < y; k++, j += 2) {
1219
+ const et = C(n.charCodeAt(j)), K = C(n.charCodeAt(j + 1));
1220
+ if (et === void 0 || K === void 0) {
1221
+ const N = n[j] + n[j + 1];
1222
+ throw new Error('hex string expected, got non-hex character "' + N + '" at index ' + j);
1223
+ }
1224
+ V[k] = et * 16 + K;
1225
+ }
1226
+ return V;
1227
+ }
1228
+ const B = async () => {
1229
+ };
1230
+ t.nextTick = B;
1231
+ async function m(n, b, y) {
1232
+ let V = Date.now();
1233
+ for (let k = 0; k < n; k++) {
1234
+ y(k);
1235
+ const j = Date.now() - V;
1236
+ j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
1237
+ }
1238
+ }
1239
+ function E(n) {
1240
+ if (typeof n != "string")
1241
+ throw new Error("string expected");
1242
+ return new Uint8Array(new TextEncoder().encode(n));
1243
+ }
1244
+ function h(n) {
1245
+ return new TextDecoder().decode(n);
1246
+ }
1247
+ function u(n) {
1248
+ return typeof n == "string" && (n = E(n)), i(n), n;
1249
+ }
1250
+ function l(n) {
1251
+ return typeof n == "string" && (n = E(n)), i(n), n;
1252
+ }
1253
+ function L(...n) {
1254
+ let b = 0;
1255
+ for (let V = 0; V < n.length; V++) {
1256
+ const k = n[V];
1257
+ i(k), b += k.length;
1258
+ }
1259
+ const y = new Uint8Array(b);
1260
+ for (let V = 0, k = 0; V < n.length; V++) {
1261
+ const j = n[V];
1262
+ y.set(j, k), k += j.length;
1263
+ }
1264
+ return y;
1265
+ }
1266
+ function p(n, b) {
1267
+ if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
1268
+ throw new Error("options should be object or undefined");
1269
+ return Object.assign(n, b);
1270
+ }
1271
+ class U {
1272
+ }
1273
+ t.Hash = U;
1274
+ function F(n) {
1275
+ const b = (V) => n().update(u(V)).digest(), y = n();
1276
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = () => n(), b;
1277
+ }
1278
+ function M(n) {
1279
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
1280
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1281
+ }
1282
+ function G(n) {
1283
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
1284
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
1285
+ }
1286
+ t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
1287
+ function q(n = 32) {
1288
+ if (e.crypto && typeof e.crypto.getRandomValues == "function")
1289
+ return e.crypto.getRandomValues(new Uint8Array(n));
1290
+ if (e.crypto && typeof e.crypto.randomBytes == "function")
1291
+ return Uint8Array.from(e.crypto.randomBytes(n));
1292
+ throw new Error("crypto.getRandomValues must be defined");
1293
+ }
1294
+ })(Xt)), Xt;
1295
+ }
1296
+ var fe;
1297
+ function ts() {
1298
+ if (fe) return z;
1299
+ fe = 1, Object.defineProperty(z, "__esModule", { value: !0 }), z.SHA512_IV = z.SHA384_IV = z.SHA224_IV = z.SHA256_IV = z.HashMD = void 0, z.setBigUint64 = e, z.Chi = s, z.Maj = o;
1300
+ const t = /* @__PURE__ */ Xe();
1301
+ function e(c, r, a, d) {
1302
+ if (typeof c.setBigUint64 == "function")
1303
+ return c.setBigUint64(r, a, d);
1304
+ const x = BigInt(32), H = BigInt(4294967295), f = Number(a >> x & H), g = Number(a & H), w = d ? 4 : 0, S = d ? 0 : 4;
1305
+ c.setUint32(r + w, f, d), c.setUint32(r + S, g, d);
1306
+ }
1307
+ function s(c, r, a) {
1308
+ return c & r ^ ~c & a;
1309
+ }
1310
+ function o(c, r, a) {
1311
+ return c & r ^ c & a ^ r & a;
1312
+ }
1313
+ class i extends t.Hash {
1314
+ constructor(r, a, d, x) {
1315
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = d, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
1316
+ }
1317
+ update(r) {
1318
+ (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
1319
+ const { view: a, buffer: d, blockLen: x } = this, H = r.length;
1320
+ for (let f = 0; f < H; ) {
1321
+ const g = Math.min(x - this.pos, H - f);
1322
+ if (g === x) {
1323
+ const w = (0, t.createView)(r);
1324
+ for (; x <= H - f; f += x)
1325
+ this.process(w, f);
1326
+ continue;
1327
+ }
1328
+ d.set(r.subarray(f, f + g), this.pos), this.pos += g, f += g, this.pos === x && (this.process(a, 0), this.pos = 0);
1329
+ }
1330
+ return this.length += r.length, this.roundClean(), this;
1331
+ }
1332
+ digestInto(r) {
1333
+ (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
1334
+ const { buffer: a, view: d, blockLen: x, isLE: H } = this;
1335
+ let { pos: f } = this;
1336
+ a[f++] = 128, (0, t.clean)(this.buffer.subarray(f)), this.padOffset > x - f && (this.process(d, 0), f = 0);
1337
+ for (let D = f; D < x; D++)
1338
+ a[D] = 0;
1339
+ e(d, x - 8, BigInt(this.length * 8), H), this.process(d, 0);
1340
+ const g = (0, t.createView)(r), w = this.outputLen;
1341
+ if (w % 4)
1342
+ throw new Error("_sha2: outputLen should be aligned to 32bit");
1343
+ const S = w / 4, I = this.get();
1344
+ if (S > I.length)
1345
+ throw new Error("_sha2: outputLen bigger than state");
1346
+ for (let D = 0; D < S; D++)
1347
+ g.setUint32(4 * D, I[D], H);
1348
+ }
1349
+ digest() {
1350
+ const { buffer: r, outputLen: a } = this;
1351
+ this.digestInto(r);
1352
+ const d = r.slice(0, a);
1353
+ return this.destroy(), d;
1354
+ }
1355
+ _cloneInto(r) {
1356
+ r || (r = new this.constructor()), r.set(...this.get());
1357
+ const { blockLen: a, buffer: d, length: x, finished: H, destroyed: f, pos: g } = this;
1358
+ return r.destroyed = f, r.finished = H, r.length = x, r.pos = g, x % a && r.buffer.set(d), r;
1359
+ }
1360
+ clone() {
1361
+ return this._cloneInto();
1362
+ }
1363
+ }
1364
+ return z.HashMD = i, z.SHA256_IV = Uint32Array.from([
1365
+ 1779033703,
1366
+ 3144134277,
1367
+ 1013904242,
1368
+ 2773480762,
1369
+ 1359893119,
1370
+ 2600822924,
1371
+ 528734635,
1372
+ 1541459225
1373
+ ]), z.SHA224_IV = Uint32Array.from([
1374
+ 3238371032,
1375
+ 914150663,
1376
+ 812702999,
1377
+ 4144912697,
1378
+ 4290775857,
1379
+ 1750603025,
1380
+ 1694076839,
1381
+ 3204075428
1382
+ ]), z.SHA384_IV = Uint32Array.from([
1383
+ 3418070365,
1384
+ 3238371032,
1385
+ 1654270250,
1386
+ 914150663,
1387
+ 2438529370,
1388
+ 812702999,
1389
+ 355462360,
1390
+ 4144912697,
1391
+ 1731405415,
1392
+ 4290775857,
1393
+ 2394180231,
1394
+ 1750603025,
1395
+ 3675008525,
1396
+ 1694076839,
1397
+ 1203062813,
1398
+ 3204075428
1399
+ ]), z.SHA512_IV = Uint32Array.from([
1400
+ 1779033703,
1401
+ 4089235720,
1402
+ 3144134277,
1403
+ 2227873595,
1404
+ 1013904242,
1405
+ 4271175723,
1406
+ 2773480762,
1407
+ 1595750129,
1408
+ 1359893119,
1409
+ 2917565137,
1410
+ 2600822924,
1411
+ 725511199,
1412
+ 528734635,
1413
+ 4215389547,
1414
+ 1541459225,
1415
+ 327033209
1416
+ ]), z;
1417
+ }
1418
+ var O = {}, de;
1419
+ function es() {
1420
+ if (de) return O;
1421
+ de = 1, Object.defineProperty(O, "__esModule", { value: !0 }), O.toBig = O.shrSL = O.shrSH = O.rotrSL = O.rotrSH = O.rotrBL = O.rotrBH = O.rotr32L = O.rotr32H = O.rotlSL = O.rotlSH = O.rotlBL = O.rotlBH = O.add5L = O.add5H = O.add4L = O.add4H = O.add3L = O.add3H = void 0, O.add = W, O.fromBig = s, O.split = o;
1422
+ const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
1423
+ function s(h, u = !1) {
1424
+ return u ? { h: Number(h & t), l: Number(h >> e & t) } : { h: Number(h >> e & t) | 0, l: Number(h & t) | 0 };
1425
+ }
1426
+ function o(h, u = !1) {
1427
+ const l = h.length;
1428
+ let L = new Uint32Array(l), p = new Uint32Array(l);
1429
+ for (let U = 0; U < l; U++) {
1430
+ const { h: F, l: M } = s(h[U], u);
1431
+ [L[U], p[U]] = [F, M];
1432
+ }
1433
+ return [L, p];
1434
+ }
1435
+ const i = (h, u) => BigInt(h >>> 0) << e | BigInt(u >>> 0);
1436
+ O.toBig = i;
1437
+ const c = (h, u, l) => h >>> l;
1438
+ O.shrSH = c;
1439
+ const r = (h, u, l) => h << 32 - l | u >>> l;
1440
+ O.shrSL = r;
1441
+ const a = (h, u, l) => h >>> l | u << 32 - l;
1442
+ O.rotrSH = a;
1443
+ const d = (h, u, l) => h << 32 - l | u >>> l;
1444
+ O.rotrSL = d;
1445
+ const x = (h, u, l) => h << 64 - l | u >>> l - 32;
1446
+ O.rotrBH = x;
1447
+ const H = (h, u, l) => h >>> l - 32 | u << 64 - l;
1448
+ O.rotrBL = H;
1449
+ const f = (h, u) => u;
1450
+ O.rotr32H = f;
1451
+ const g = (h, u) => h;
1452
+ O.rotr32L = g;
1453
+ const w = (h, u, l) => h << l | u >>> 32 - l;
1454
+ O.rotlSH = w;
1455
+ const S = (h, u, l) => u << l | h >>> 32 - l;
1456
+ O.rotlSL = S;
1457
+ const I = (h, u, l) => u << l - 32 | h >>> 64 - l;
1458
+ O.rotlBH = I;
1459
+ const D = (h, u, l) => h << l - 32 | u >>> 64 - l;
1460
+ O.rotlBL = D;
1461
+ function W(h, u, l, L) {
1462
+ const p = (u >>> 0) + (L >>> 0);
1463
+ return { h: h + l + (p / 2 ** 32 | 0) | 0, l: p | 0 };
1464
+ }
1465
+ const v = (h, u, l) => (h >>> 0) + (u >>> 0) + (l >>> 0);
1466
+ O.add3L = v;
1467
+ const _ = (h, u, l, L) => u + l + L + (h / 2 ** 32 | 0) | 0;
1468
+ O.add3H = _;
1469
+ const C = (h, u, l, L) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0);
1470
+ O.add4L = C;
1471
+ const A = (h, u, l, L, p) => u + l + L + p + (h / 2 ** 32 | 0) | 0;
1472
+ O.add4H = A;
1473
+ const B = (h, u, l, L, p) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0) + (p >>> 0);
1474
+ O.add5L = B;
1475
+ const m = (h, u, l, L, p, U) => u + l + L + p + U + (h / 2 ** 32 | 0) | 0;
1476
+ O.add5H = m;
1477
+ const E = {
1478
+ fromBig: s,
1479
+ split: o,
1480
+ toBig: i,
1481
+ shrSH: c,
1482
+ shrSL: r,
1483
+ rotrSH: a,
1484
+ rotrSL: d,
1485
+ rotrBH: x,
1486
+ rotrBL: H,
1487
+ rotr32H: f,
1488
+ rotr32L: g,
1489
+ rotlSH: w,
1490
+ rotlSL: S,
1491
+ rotlBH: I,
1492
+ rotlBL: D,
1493
+ add: W,
1494
+ add3L: v,
1495
+ add3H: _,
1496
+ add4L: C,
1497
+ add4H: A,
1498
+ add5H: m,
1499
+ add5L: B
1500
+ };
1501
+ return O.default = E, O;
1502
+ }
1503
+ var ue;
1504
+ function ss() {
1505
+ if (ue) return R;
1506
+ ue = 1, Object.defineProperty(R, "__esModule", { value: !0 }), R.sha512_224 = R.sha512_256 = R.sha384 = R.sha512 = R.sha224 = R.sha256 = R.SHA512_256 = R.SHA512_224 = R.SHA384 = R.SHA512 = R.SHA224 = R.SHA256 = void 0;
1507
+ const t = /* @__PURE__ */ ts(), e = /* @__PURE__ */ es(), s = /* @__PURE__ */ Xe(), o = /* @__PURE__ */ Uint32Array.from([
1508
+ 1116352408,
1509
+ 1899447441,
1510
+ 3049323471,
1511
+ 3921009573,
1512
+ 961987163,
1513
+ 1508970993,
1514
+ 2453635748,
1515
+ 2870763221,
1516
+ 3624381080,
1517
+ 310598401,
1518
+ 607225278,
1519
+ 1426881987,
1520
+ 1925078388,
1521
+ 2162078206,
1522
+ 2614888103,
1523
+ 3248222580,
1524
+ 3835390401,
1525
+ 4022224774,
1526
+ 264347078,
1527
+ 604807628,
1528
+ 770255983,
1529
+ 1249150122,
1530
+ 1555081692,
1531
+ 1996064986,
1532
+ 2554220882,
1533
+ 2821834349,
1534
+ 2952996808,
1535
+ 3210313671,
1536
+ 3336571891,
1537
+ 3584528711,
1538
+ 113926993,
1539
+ 338241895,
1540
+ 666307205,
1541
+ 773529912,
1542
+ 1294757372,
1543
+ 1396182291,
1544
+ 1695183700,
1545
+ 1986661051,
1546
+ 2177026350,
1547
+ 2456956037,
1548
+ 2730485921,
1549
+ 2820302411,
1550
+ 3259730800,
1551
+ 3345764771,
1552
+ 3516065817,
1553
+ 3600352804,
1554
+ 4094571909,
1555
+ 275423344,
1556
+ 430227734,
1557
+ 506948616,
1558
+ 659060556,
1559
+ 883997877,
1560
+ 958139571,
1561
+ 1322822218,
1562
+ 1537002063,
1563
+ 1747873779,
1564
+ 1955562222,
1565
+ 2024104815,
1566
+ 2227730452,
1567
+ 2361852424,
1568
+ 2428436474,
1569
+ 2756734187,
1570
+ 3204031479,
1571
+ 3329325298
1572
+ ]), i = /* @__PURE__ */ new Uint32Array(64);
1573
+ class c extends t.HashMD {
1574
+ constructor(_ = 32) {
1575
+ super(64, _, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
1576
+ }
1577
+ get() {
1578
+ const { A: _, B: C, C: A, D: B, E: m, F: E, G: h, H: u } = this;
1579
+ return [_, C, A, B, m, E, h, u];
1580
+ }
1581
+ // prettier-ignore
1582
+ set(_, C, A, B, m, E, h, u) {
1583
+ this.A = _ | 0, this.B = C | 0, this.C = A | 0, this.D = B | 0, this.E = m | 0, this.F = E | 0, this.G = h | 0, this.H = u | 0;
1584
+ }
1585
+ process(_, C) {
1586
+ for (let p = 0; p < 16; p++, C += 4)
1587
+ i[p] = _.getUint32(C, !1);
1588
+ for (let p = 16; p < 64; p++) {
1589
+ const U = i[p - 15], F = i[p - 2], M = (0, s.rotr)(U, 7) ^ (0, s.rotr)(U, 18) ^ U >>> 3, G = (0, s.rotr)(F, 17) ^ (0, s.rotr)(F, 19) ^ F >>> 10;
1590
+ i[p] = G + i[p - 7] + M + i[p - 16] | 0;
1591
+ }
1592
+ let { A, B, C: m, D: E, E: h, F: u, G: l, H: L } = this;
1593
+ for (let p = 0; p < 64; p++) {
1594
+ const U = (0, s.rotr)(h, 6) ^ (0, s.rotr)(h, 11) ^ (0, s.rotr)(h, 25), F = L + U + (0, t.Chi)(h, u, l) + o[p] + i[p] | 0, G = ((0, s.rotr)(A, 2) ^ (0, s.rotr)(A, 13) ^ (0, s.rotr)(A, 22)) + (0, t.Maj)(A, B, m) | 0;
1595
+ L = l, l = u, u = h, h = E + F | 0, E = m, m = B, B = A, A = F + G | 0;
1596
+ }
1597
+ A = A + this.A | 0, B = B + this.B | 0, m = m + this.C | 0, E = E + this.D | 0, h = h + this.E | 0, u = u + this.F | 0, l = l + this.G | 0, L = L + this.H | 0, this.set(A, B, m, E, h, u, l, L);
1598
+ }
1599
+ roundClean() {
1600
+ (0, s.clean)(i);
1601
+ }
1602
+ destroy() {
1603
+ this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
1604
+ }
1605
+ }
1606
+ R.SHA256 = c;
1607
+ class r extends c {
1608
+ constructor() {
1609
+ super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
1610
+ }
1611
+ }
1612
+ R.SHA224 = r;
1613
+ const a = e.split([
1614
+ "0x428a2f98d728ae22",
1615
+ "0x7137449123ef65cd",
1616
+ "0xb5c0fbcfec4d3b2f",
1617
+ "0xe9b5dba58189dbbc",
1618
+ "0x3956c25bf348b538",
1619
+ "0x59f111f1b605d019",
1620
+ "0x923f82a4af194f9b",
1621
+ "0xab1c5ed5da6d8118",
1622
+ "0xd807aa98a3030242",
1623
+ "0x12835b0145706fbe",
1624
+ "0x243185be4ee4b28c",
1625
+ "0x550c7dc3d5ffb4e2",
1626
+ "0x72be5d74f27b896f",
1627
+ "0x80deb1fe3b1696b1",
1628
+ "0x9bdc06a725c71235",
1629
+ "0xc19bf174cf692694",
1630
+ "0xe49b69c19ef14ad2",
1631
+ "0xefbe4786384f25e3",
1632
+ "0x0fc19dc68b8cd5b5",
1633
+ "0x240ca1cc77ac9c65",
1634
+ "0x2de92c6f592b0275",
1635
+ "0x4a7484aa6ea6e483",
1636
+ "0x5cb0a9dcbd41fbd4",
1637
+ "0x76f988da831153b5",
1638
+ "0x983e5152ee66dfab",
1639
+ "0xa831c66d2db43210",
1640
+ "0xb00327c898fb213f",
1641
+ "0xbf597fc7beef0ee4",
1642
+ "0xc6e00bf33da88fc2",
1643
+ "0xd5a79147930aa725",
1644
+ "0x06ca6351e003826f",
1645
+ "0x142929670a0e6e70",
1646
+ "0x27b70a8546d22ffc",
1647
+ "0x2e1b21385c26c926",
1648
+ "0x4d2c6dfc5ac42aed",
1649
+ "0x53380d139d95b3df",
1650
+ "0x650a73548baf63de",
1651
+ "0x766a0abb3c77b2a8",
1652
+ "0x81c2c92e47edaee6",
1653
+ "0x92722c851482353b",
1654
+ "0xa2bfe8a14cf10364",
1655
+ "0xa81a664bbc423001",
1656
+ "0xc24b8b70d0f89791",
1657
+ "0xc76c51a30654be30",
1658
+ "0xd192e819d6ef5218",
1659
+ "0xd69906245565a910",
1660
+ "0xf40e35855771202a",
1661
+ "0x106aa07032bbd1b8",
1662
+ "0x19a4c116b8d2d0c8",
1663
+ "0x1e376c085141ab53",
1664
+ "0x2748774cdf8eeb99",
1665
+ "0x34b0bcb5e19b48a8",
1666
+ "0x391c0cb3c5c95a63",
1667
+ "0x4ed8aa4ae3418acb",
1668
+ "0x5b9cca4f7763e373",
1669
+ "0x682e6ff3d6b2b8a3",
1670
+ "0x748f82ee5defb2fc",
1671
+ "0x78a5636f43172f60",
1672
+ "0x84c87814a1f0ab72",
1673
+ "0x8cc702081a6439ec",
1674
+ "0x90befffa23631e28",
1675
+ "0xa4506cebde82bde9",
1676
+ "0xbef9a3f7b2c67915",
1677
+ "0xc67178f2e372532b",
1678
+ "0xca273eceea26619c",
1679
+ "0xd186b8c721c0c207",
1680
+ "0xeada7dd6cde0eb1e",
1681
+ "0xf57d4f7fee6ed178",
1682
+ "0x06f067aa72176fba",
1683
+ "0x0a637dc5a2c898a6",
1684
+ "0x113f9804bef90dae",
1685
+ "0x1b710b35131c471b",
1686
+ "0x28db77f523047d84",
1687
+ "0x32caab7b40c72493",
1688
+ "0x3c9ebe0a15c9bebc",
1689
+ "0x431d67c49c100d4c",
1690
+ "0x4cc5d4becb3e42b6",
1691
+ "0x597f299cfc657e2a",
1692
+ "0x5fcb6fab3ad6faec",
1693
+ "0x6c44198c4a475817"
1694
+ ].map((v) => BigInt(v))), d = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), f = /* @__PURE__ */ new Uint32Array(80);
1695
+ class g extends t.HashMD {
1696
+ constructor(_ = 64) {
1697
+ super(128, _, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
1698
+ }
1699
+ // prettier-ignore
1700
+ get() {
1701
+ const { Ah: _, Al: C, Bh: A, Bl: B, Ch: m, Cl: E, Dh: h, Dl: u, Eh: l, El: L, Fh: p, Fl: U, Gh: F, Gl: M, Hh: G, Hl: q } = this;
1702
+ return [_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q];
1703
+ }
1704
+ // prettier-ignore
1705
+ set(_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q) {
1706
+ this.Ah = _ | 0, this.Al = C | 0, this.Bh = A | 0, this.Bl = B | 0, this.Ch = m | 0, this.Cl = E | 0, this.Dh = h | 0, this.Dl = u | 0, this.Eh = l | 0, this.El = L | 0, this.Fh = p | 0, this.Fl = U | 0, this.Gh = F | 0, this.Gl = M | 0, this.Hh = G | 0, this.Hl = q | 0;
1707
+ }
1708
+ process(_, C) {
1709
+ for (let y = 0; y < 16; y++, C += 4)
1710
+ H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
1711
+ for (let y = 16; y < 80; y++) {
1712
+ const V = H[y - 15] | 0, k = f[y - 15] | 0, j = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), et = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), K = H[y - 2] | 0, N = f[y - 2] | 0, ot = e.rotrSH(K, N, 19) ^ e.rotrBH(K, N, 61) ^ e.shrSH(K, N, 6), St = e.rotrSL(K, N, 19) ^ e.rotrBL(K, N, 61) ^ e.shrSL(K, N, 6), at = e.add4L(et, St, f[y - 7], f[y - 16]), wt = e.add4H(at, j, ot, H[y - 7], H[y - 16]);
1713
+ H[y] = wt | 0, f[y] = at | 0;
1714
+ }
1715
+ let { Ah: A, Al: B, Bh: m, Bl: E, Ch: h, Cl: u, Dh: l, Dl: L, Eh: p, El: U, Fh: F, Fl: M, Gh: G, Gl: q, Hh: n, Hl: b } = this;
1716
+ for (let y = 0; y < 80; y++) {
1717
+ const V = e.rotrSH(p, U, 14) ^ e.rotrSH(p, U, 18) ^ e.rotrBH(p, U, 41), k = e.rotrSL(p, U, 14) ^ e.rotrSL(p, U, 18) ^ e.rotrBL(p, U, 41), j = p & F ^ ~p & G, et = U & M ^ ~U & q, K = e.add5L(b, k, et, x[y], f[y]), N = e.add5H(K, n, V, j, d[y], H[y]), ot = K | 0, St = e.rotrSH(A, B, 28) ^ e.rotrBH(A, B, 34) ^ e.rotrBH(A, B, 39), at = e.rotrSL(A, B, 28) ^ e.rotrBL(A, B, 34) ^ e.rotrBL(A, B, 39), wt = A & m ^ A & h ^ m & h, Pt = B & E ^ B & u ^ E & u;
1718
+ n = G | 0, b = q | 0, G = F | 0, q = M | 0, F = p | 0, M = U | 0, { h: p, l: U } = e.add(l | 0, L | 0, N | 0, ot | 0), l = h | 0, L = u | 0, h = m | 0, u = E | 0, m = A | 0, E = B | 0;
1719
+ const Ut = e.add3L(ot, at, Pt);
1720
+ A = e.add3H(Ut, N, St, wt), B = Ut | 0;
1721
+ }
1722
+ ({ h: A, l: B } = e.add(this.Ah | 0, this.Al | 0, A | 0, B | 0)), { h: m, l: E } = e.add(this.Bh | 0, this.Bl | 0, m | 0, E | 0), { h, l: u } = e.add(this.Ch | 0, this.Cl | 0, h | 0, u | 0), { h: l, l: L } = e.add(this.Dh | 0, this.Dl | 0, l | 0, L | 0), { h: p, l: U } = e.add(this.Eh | 0, this.El | 0, p | 0, U | 0), { h: F, l: M } = e.add(this.Fh | 0, this.Fl | 0, F | 0, M | 0), { h: G, l: q } = e.add(this.Gh | 0, this.Gl | 0, G | 0, q | 0), { h: n, l: b } = e.add(this.Hh | 0, this.Hl | 0, n | 0, b | 0), this.set(A, B, m, E, h, u, l, L, p, U, F, M, G, q, n, b);
1723
+ }
1724
+ roundClean() {
1725
+ (0, s.clean)(H, f);
1726
+ }
1727
+ destroy() {
1728
+ (0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1729
+ }
1730
+ }
1731
+ R.SHA512 = g;
1732
+ class w extends g {
1733
+ constructor() {
1734
+ super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
1735
+ }
412
1736
  }
413
- // prettier-ignore
414
- get() {
415
- const { Ah: e, Al: s, Bh: i, Bl: o, Ch: r, Cl: n, Dh: h, Dl: b, Eh: x, El: H, Fh: u, Fl: A, Gh: m, Gl: w, Hh: I, Hl: C } = this;
416
- return [e, s, i, o, r, n, h, b, x, H, u, A, m, w, I, C];
1737
+ R.SHA384 = w;
1738
+ const S = /* @__PURE__ */ Uint32Array.from([
1739
+ 2352822216,
1740
+ 424955298,
1741
+ 1944164710,
1742
+ 2312950998,
1743
+ 502970286,
1744
+ 855612546,
1745
+ 1738396948,
1746
+ 1479516111,
1747
+ 258812777,
1748
+ 2077511080,
1749
+ 2011393907,
1750
+ 79989058,
1751
+ 1067287976,
1752
+ 1780299464,
1753
+ 286451373,
1754
+ 2446758561
1755
+ ]), I = /* @__PURE__ */ Uint32Array.from([
1756
+ 573645204,
1757
+ 4230739756,
1758
+ 2673172387,
1759
+ 3360449730,
1760
+ 596883563,
1761
+ 1867755857,
1762
+ 2520282905,
1763
+ 1497426621,
1764
+ 2519219938,
1765
+ 2827943907,
1766
+ 3193839141,
1767
+ 1401305490,
1768
+ 721525244,
1769
+ 746961066,
1770
+ 246885852,
1771
+ 2177182882
1772
+ ]);
1773
+ class D extends g {
1774
+ constructor() {
1775
+ super(28), this.Ah = S[0] | 0, this.Al = S[1] | 0, this.Bh = S[2] | 0, this.Bl = S[3] | 0, this.Ch = S[4] | 0, this.Cl = S[5] | 0, this.Dh = S[6] | 0, this.Dl = S[7] | 0, this.Eh = S[8] | 0, this.El = S[9] | 0, this.Fh = S[10] | 0, this.Fl = S[11] | 0, this.Gh = S[12] | 0, this.Gl = S[13] | 0, this.Hh = S[14] | 0, this.Hl = S[15] | 0;
1776
+ }
417
1777
  }
418
- // prettier-ignore
419
- set(e, s, i, o, r, n, h, b, x, H, u, A, m, w, I, C) {
420
- this.Ah = e | 0, this.Al = s | 0, this.Bh = i | 0, this.Bl = o | 0, this.Ch = r | 0, this.Cl = n | 0, this.Dh = h | 0, this.Dl = b | 0, this.Eh = x | 0, this.El = H | 0, this.Fh = u | 0, this.Fl = A | 0, this.Gh = m | 0, this.Gl = w | 0, this.Hh = I | 0, this.Hl = C | 0;
1778
+ R.SHA512_224 = D;
1779
+ class W extends g {
1780
+ constructor() {
1781
+ super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
1782
+ }
421
1783
  }
422
- process(e, s) {
423
- for (let y = 0; y < 16; y++, s += 4)
424
- rt[y] = e.getUint32(s), it[y] = e.getUint32(s += 4);
425
- for (let y = 16; y < 80; y++) {
426
- const O = rt[y - 15] | 0, L = it[y - 15] | 0, E = dt(O, L, 1) ^ dt(O, L, 8) ^ Ot(O, L, 7), D = ut(O, L, 1) ^ ut(O, L, 8) ^ Ft(O, L, 7), B = rt[y - 2] | 0, a = it[y - 2] | 0, d = dt(B, a, 19) ^ yt(B, a, 61) ^ Ot(B, a, 6), f = ut(B, a, 19) ^ gt(B, a, 61) ^ Ft(B, a, 6), p = Ee(D, f, it[y - 7], it[y - 16]), l = ke(p, E, d, rt[y - 7], rt[y - 16]);
427
- rt[y] = l | 0, it[y] = p | 0;
1784
+ return R.SHA512_256 = W, R.sha256 = (0, s.createHasher)(() => new c()), R.sha224 = (0, s.createHasher)(() => new r()), R.sha512 = (0, s.createHasher)(() => new g()), R.sha384 = (0, s.createHasher)(() => new w()), R.sha512_256 = (0, s.createHasher)(() => new W()), R.sha512_224 = (0, s.createHasher)(() => new D()), R;
1785
+ }
1786
+ var le;
1787
+ function Is() {
1788
+ if (le) return st;
1789
+ le = 1, Object.defineProperty(st, "__esModule", { value: !0 }), st.sha224 = st.SHA224 = st.sha256 = st.SHA256 = void 0;
1790
+ const t = /* @__PURE__ */ ss();
1791
+ return st.SHA256 = t.SHA256, st.sha256 = t.sha256, st.SHA224 = t.SHA224, st.sha224 = t.sha224, st;
1792
+ }
1793
+ const ns = BigInt(0), Vt = BigInt(1), rs = BigInt(2), is = BigInt(7), cs = BigInt(256), os = BigInt(113), Je = [], Qe = [], Ye = [];
1794
+ for (let t = 0, e = Vt, s = 1, o = 0; t < 24; t++) {
1795
+ [s, o] = [o, (2 * s + 3 * o) % 5], Je.push(2 * (5 * o + s)), Qe.push((t + 1) * (t + 2) / 2 % 64);
1796
+ let i = ns;
1797
+ for (let c = 0; c < 7; c++)
1798
+ e = (e << Vt ^ (e >> is) * os) % cs, e & rs && (i ^= Vt << (Vt << BigInt(c)) - Vt);
1799
+ Ye.push(i);
1800
+ }
1801
+ const Ze = Me(Ye, !0), as = Ze[0], hs = Ze[1], be = (t, e, s) => s > 32 ? O0(t, e, s) : k0(t, e, s), xe = (t, e, s) => s > 32 ? T0(t, e, s) : F0(t, e, s);
1802
+ function fs(t, e = 24) {
1803
+ const s = new Uint32Array(10);
1804
+ for (let o = 24 - e; o < 24; o++) {
1805
+ for (let r = 0; r < 10; r++)
1806
+ s[r] = t[r] ^ t[r + 10] ^ t[r + 20] ^ t[r + 30] ^ t[r + 40];
1807
+ for (let r = 0; r < 10; r += 2) {
1808
+ const a = (r + 8) % 10, d = (r + 2) % 10, x = s[d], H = s[d + 1], f = be(x, H, 1) ^ s[a], g = xe(x, H, 1) ^ s[a + 1];
1809
+ for (let w = 0; w < 50; w += 10)
1810
+ t[r + w] ^= f, t[r + w + 1] ^= g;
1811
+ }
1812
+ let i = t[2], c = t[3];
1813
+ for (let r = 0; r < 24; r++) {
1814
+ const a = Qe[r], d = be(i, c, a), x = xe(i, c, a), H = Je[r];
1815
+ i = t[H], c = t[H + 1], t[H] = d, t[H + 1] = x;
1816
+ }
1817
+ for (let r = 0; r < 50; r += 10) {
1818
+ for (let a = 0; a < 10; a++)
1819
+ s[a] = t[r + a];
1820
+ for (let a = 0; a < 10; a++)
1821
+ t[r + a] ^= ~s[(a + 2) % 10] & s[(a + 4) % 10];
1822
+ }
1823
+ t[0] ^= as[o], t[1] ^= hs[o];
1824
+ }
1825
+ tt(s);
1826
+ }
1827
+ class te {
1828
+ state;
1829
+ pos = 0;
1830
+ posOut = 0;
1831
+ finished = !1;
1832
+ state32;
1833
+ destroyed = !1;
1834
+ blockLen;
1835
+ suffix;
1836
+ outputLen;
1837
+ enableXOF = !1;
1838
+ rounds;
1839
+ // NOTE: we accept arguments in bytes instead of bits here.
1840
+ constructor(e, s, o, i = !1, c = 24) {
1841
+ if (this.blockLen = e, this.suffix = s, this.outputLen = o, this.enableXOF = i, this.rounds = c, Gt(o, "outputLen"), !(0 < e && e < 200))
1842
+ throw new Error("only keccak-f1600 function is supported");
1843
+ this.state = new Uint8Array(200), this.state32 = b0(this.state);
1844
+ }
1845
+ clone() {
1846
+ return this._cloneInto();
1847
+ }
1848
+ keccak() {
1849
+ se(this.state32), fs(this.state32, this.rounds), se(this.state32), this.posOut = 0, this.pos = 0;
1850
+ }
1851
+ update(e) {
1852
+ mt(this), _t(e);
1853
+ const { blockLen: s, state: o } = this, i = e.length;
1854
+ for (let c = 0; c < i; ) {
1855
+ const r = Math.min(s - this.pos, i - c);
1856
+ for (let a = 0; a < r; a++)
1857
+ o[this.pos++] ^= e[c++];
1858
+ this.pos === s && this.keccak();
428
1859
  }
429
- let { Ah: i, Al: o, Bh: r, Bl: n, Ch: h, Cl: b, Dh: x, Dl: H, Eh: u, El: A, Fh: m, Fl: w, Gh: I, Gl: C, Hh: R, Hl: M } = this;
430
- for (let y = 0; y < 80; y++) {
431
- const O = dt(u, A, 14) ^ dt(u, A, 18) ^ yt(u, A, 41), L = ut(u, A, 14) ^ ut(u, A, 18) ^ gt(u, A, 41), E = u & m ^ ~u & I, D = A & w ^ ~A & C, B = Ve(M, L, D, Te[y], it[y]), a = Ce(B, R, O, E, Fe[y], rt[y]), d = B | 0, f = dt(i, o, 28) ^ yt(i, o, 34) ^ yt(i, o, 39), p = ut(i, o, 28) ^ gt(i, o, 34) ^ gt(i, o, 39), l = i & r ^ i & h ^ r & h, S = o & n ^ o & b ^ n & b;
432
- R = I | 0, M = C | 0, I = m | 0, C = w | 0, m = u | 0, w = A | 0, { h: u, l: A } = $(x | 0, H | 0, a | 0, d | 0), x = h | 0, H = b | 0, h = r | 0, b = n | 0, r = i | 0, n = o | 0;
433
- const U = me(d, p, S);
434
- i = Ue(U, a, f, l), o = U | 0;
1860
+ return this;
1861
+ }
1862
+ finish() {
1863
+ if (this.finished)
1864
+ return;
1865
+ this.finished = !0;
1866
+ const { state: e, suffix: s, pos: o, blockLen: i } = this;
1867
+ e[o] ^= s, (s & 128) !== 0 && o === i - 1 && this.keccak(), e[i - 1] ^= 128, this.keccak();
1868
+ }
1869
+ writeInto(e) {
1870
+ mt(this, !1), _t(e), this.finish();
1871
+ const s = this.state, { blockLen: o } = this;
1872
+ for (let i = 0, c = e.length; i < c; ) {
1873
+ this.posOut >= o && this.keccak();
1874
+ const r = Math.min(o - this.posOut, c - i);
1875
+ e.set(s.subarray(this.posOut, this.posOut + r), i), this.posOut += r, i += r;
435
1876
  }
436
- ({ h: i, l: o } = $(this.Ah | 0, this.Al | 0, i | 0, o | 0)), { h: r, l: n } = $(this.Bh | 0, this.Bl | 0, r | 0, n | 0), { h, l: b } = $(this.Ch | 0, this.Cl | 0, h | 0, b | 0), { h: x, l: H } = $(this.Dh | 0, this.Dl | 0, x | 0, H | 0), { h: u, l: A } = $(this.Eh | 0, this.El | 0, u | 0, A | 0), { h: m, l: w } = $(this.Fh | 0, this.Fl | 0, m | 0, w | 0), { h: I, l: C } = $(this.Gh | 0, this.Gl | 0, I | 0, C | 0), { h: R, l: M } = $(this.Hh | 0, this.Hl | 0, R | 0, M | 0), this.set(i, o, r, n, h, b, x, H, u, A, m, w, I, C, R, M);
1877
+ return e;
437
1878
  }
438
- roundClean() {
439
- ct(rt, it);
1879
+ xofInto(e) {
1880
+ if (!this.enableXOF)
1881
+ throw new Error("XOF is not possible for this instance");
1882
+ return this.writeInto(e);
1883
+ }
1884
+ xof(e) {
1885
+ return Gt(e), this.xofInto(new Uint8Array(e));
1886
+ }
1887
+ digestInto(e) {
1888
+ if (Le(e, this), this.finished)
1889
+ throw new Error("digest() was already called");
1890
+ return this.writeInto(e), this.destroy(), e;
1891
+ }
1892
+ digest() {
1893
+ return this.digestInto(new Uint8Array(this.outputLen));
440
1894
  }
441
1895
  destroy() {
442
- ct(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1896
+ this.destroyed = !0, tt(this.state);
1897
+ }
1898
+ _cloneInto(e) {
1899
+ const { blockLen: s, suffix: o, outputLen: i, rounds: c, enableXOF: r } = this;
1900
+ return e ||= new te(s, o, i, r, c), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = c, e.suffix = o, e.outputLen = i, e.enableXOF = r, e.destroyed = this.destroyed, e;
443
1901
  }
444
1902
  }
445
- const ve = /* @__PURE__ */ ne(() => new Oe()), Re = /* @__PURE__ */ ne(() => new Me()), ps = ve;
446
- var j = {}, K = {}, Bt = {}, lt = {}, Tt;
447
- function Ge() {
448
- return Tt || (Tt = 1, Object.defineProperty(lt, "__esModule", { value: !0 }), lt.crypto = void 0, lt.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), lt;
1903
+ const ze = (t, e, s, o = {}) => ct((i = {}) => new te(e, t, i.dkLen === void 0 ? s : i.dkLen, !0), o), Ls = /* @__PURE__ */ ze(31, 168, 16, /* @__PURE__ */ gt(11)), ms = /* @__PURE__ */ ze(31, 136, 32, /* @__PURE__ */ gt(12));
1904
+ var nt = {}, P = {}, $ = {}, Jt = {}, Ct = {}, He;
1905
+ function ds() {
1906
+ return He || (He = 1, Object.defineProperty(Ct, "__esModule", { value: !0 }), Ct.crypto = void 0, Ct.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), Ct;
449
1907
  }
450
- var Mt;
451
- function pt() {
452
- return Mt || (Mt = 1, (function(t) {
453
- Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = i, t.abytes = o, t.ahash = r, t.aexists = n, t.aoutput = h, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = A, t.rotl = m, t.byteSwap = w, t.byteSwap32 = I, t.bytesToHex = M, t.hexToBytes = L, t.asyncLoop = D, t.utf8ToBytes = B, t.bytesToUtf8 = a, t.toBytes = d, t.kdfInputToBytes = f, t.concatBytes = p, t.checkOpts = l, t.createHasher = U, t.createOptHasher = k, t.createXOFer = F, t.randomBytes = v;
454
- const e = /* @__PURE__ */ Ge();
455
- function s(c) {
456
- return c instanceof Uint8Array || ArrayBuffer.isView(c) && c.constructor.name === "Uint8Array";
457
- }
458
- function i(c) {
459
- if (!Number.isSafeInteger(c) || c < 0)
460
- throw new Error("positive integer expected, got " + c);
461
- }
462
- function o(c, ...g) {
463
- if (!s(c))
1908
+ var Ae;
1909
+ function Rt() {
1910
+ return Ae || (Ae = 1, (function(t) {
1911
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.wrapXOFConstructorWithOpts = t.wrapConstructorWithOpts = t.wrapConstructor = t.Hash = t.nextTick = t.swap32IfBE = t.byteSwapIfBE = t.swap8IfBE = t.isLE = void 0, t.isBytes = s, t.anumber = o, t.abytes = i, t.ahash = c, t.aexists = r, t.aoutput = a, t.u8 = d, t.u32 = x, t.clean = H, t.createView = f, t.rotr = g, t.rotl = w, t.byteSwap = S, t.byteSwap32 = I, t.bytesToHex = v, t.hexToBytes = A, t.asyncLoop = m, t.utf8ToBytes = E, t.bytesToUtf8 = h, t.toBytes = u, t.kdfInputToBytes = l, t.concatBytes = L, t.checkOpts = p, t.createHasher = F, t.createOptHasher = M, t.createXOFer = G, t.randomBytes = q;
1912
+ const e = /* @__PURE__ */ ds();
1913
+ function s(n) {
1914
+ return n instanceof Uint8Array || ArrayBuffer.isView(n) && n.constructor.name === "Uint8Array";
1915
+ }
1916
+ function o(n) {
1917
+ if (!Number.isSafeInteger(n) || n < 0)
1918
+ throw new Error("positive integer expected, got " + n);
1919
+ }
1920
+ function i(n, ...b) {
1921
+ if (!s(n))
464
1922
  throw new Error("Uint8Array expected");
465
- if (g.length > 0 && !g.includes(c.length))
466
- throw new Error("Uint8Array expected of length " + g + ", got length=" + c.length);
1923
+ if (b.length > 0 && !b.includes(n.length))
1924
+ throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
467
1925
  }
468
- function r(c) {
469
- if (typeof c != "function" || typeof c.create != "function")
1926
+ function c(n) {
1927
+ if (typeof n != "function" || typeof n.create != "function")
470
1928
  throw new Error("Hash should be wrapped by utils.createHasher");
471
- i(c.outputLen), i(c.blockLen);
1929
+ o(n.outputLen), o(n.blockLen);
472
1930
  }
473
- function n(c, g = !0) {
474
- if (c.destroyed)
1931
+ function r(n, b = !0) {
1932
+ if (n.destroyed)
475
1933
  throw new Error("Hash instance has been destroyed");
476
- if (g && c.finished)
1934
+ if (b && n.finished)
477
1935
  throw new Error("Hash#digest() has already been called");
478
1936
  }
479
- function h(c, g) {
480
- o(c);
481
- const _ = g.outputLen;
482
- if (c.length < _)
483
- throw new Error("digestInto() expects output buffer of length at least " + _);
1937
+ function a(n, b) {
1938
+ i(n);
1939
+ const y = b.outputLen;
1940
+ if (n.length < y)
1941
+ throw new Error("digestInto() expects output buffer of length at least " + y);
484
1942
  }
485
- function b(c) {
486
- return new Uint8Array(c.buffer, c.byteOffset, c.byteLength);
1943
+ function d(n) {
1944
+ return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
487
1945
  }
488
- function x(c) {
489
- return new Uint32Array(c.buffer, c.byteOffset, Math.floor(c.byteLength / 4));
1946
+ function x(n) {
1947
+ return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
490
1948
  }
491
- function H(...c) {
492
- for (let g = 0; g < c.length; g++)
493
- c[g].fill(0);
1949
+ function H(...n) {
1950
+ for (let b = 0; b < n.length; b++)
1951
+ n[b].fill(0);
494
1952
  }
495
- function u(c) {
496
- return new DataView(c.buffer, c.byteOffset, c.byteLength);
1953
+ function f(n) {
1954
+ return new DataView(n.buffer, n.byteOffset, n.byteLength);
497
1955
  }
498
- function A(c, g) {
499
- return c << 32 - g | c >>> g;
1956
+ function g(n, b) {
1957
+ return n << 32 - b | n >>> b;
500
1958
  }
501
- function m(c, g) {
502
- return c << g | c >>> 32 - g >>> 0;
1959
+ function w(n, b) {
1960
+ return n << b | n >>> 32 - b >>> 0;
503
1961
  }
504
1962
  t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
505
- function w(c) {
506
- return c << 24 & 4278190080 | c << 8 & 16711680 | c >>> 8 & 65280 | c >>> 24 & 255;
507
- }
508
- t.swap8IfBE = t.isLE ? (c) => c : (c) => w(c), t.byteSwapIfBE = t.swap8IfBE;
509
- function I(c) {
510
- for (let g = 0; g < c.length; g++)
511
- c[g] = w(c[g]);
512
- return c;
513
- }
514
- t.swap32IfBE = t.isLE ? (c) => c : I;
515
- const C = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (c, g) => g.toString(16).padStart(2, "0"));
516
- function M(c) {
517
- if (o(c), C)
518
- return c.toHex();
519
- let g = "";
520
- for (let _ = 0; _ < c.length; _++)
521
- g += R[c[_]];
522
- return g;
523
- }
524
- const y = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
525
- function O(c) {
526
- if (c >= y._0 && c <= y._9)
527
- return c - y._0;
528
- if (c >= y.A && c <= y.F)
529
- return c - (y.A - 10);
530
- if (c >= y.a && c <= y.f)
531
- return c - (y.a - 10);
532
- }
533
- function L(c) {
534
- if (typeof c != "string")
535
- throw new Error("hex string expected, got " + typeof c);
536
- if (C)
537
- return Uint8Array.fromHex(c);
538
- const g = c.length, _ = g / 2;
539
- if (g % 2)
540
- throw new Error("hex string expected, got unpadded hex of length " + g);
541
- const T = new Uint8Array(_);
542
- for (let G = 0, P = 0; G < _; G++, P += 2) {
543
- const tt = O(c.charCodeAt(P)), X = O(c.charCodeAt(P + 1));
544
- if (tt === void 0 || X === void 0) {
545
- const J = c[P] + c[P + 1];
546
- throw new Error('hex string expected, got non-hex character "' + J + '" at index ' + P);
1963
+ function S(n) {
1964
+ return n << 24 & 4278190080 | n << 8 & 16711680 | n >>> 8 & 65280 | n >>> 24 & 255;
1965
+ }
1966
+ t.swap8IfBE = t.isLE ? (n) => n : (n) => S(n), t.byteSwapIfBE = t.swap8IfBE;
1967
+ function I(n) {
1968
+ for (let b = 0; b < n.length; b++)
1969
+ n[b] = S(n[b]);
1970
+ return n;
1971
+ }
1972
+ t.swap32IfBE = t.isLE ? (n) => n : I;
1973
+ const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", W = /* @__PURE__ */ Array.from({ length: 256 }, (n, b) => b.toString(16).padStart(2, "0"));
1974
+ function v(n) {
1975
+ if (i(n), D)
1976
+ return n.toHex();
1977
+ let b = "";
1978
+ for (let y = 0; y < n.length; y++)
1979
+ b += W[n[y]];
1980
+ return b;
1981
+ }
1982
+ const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
1983
+ function C(n) {
1984
+ if (n >= _._0 && n <= _._9)
1985
+ return n - _._0;
1986
+ if (n >= _.A && n <= _.F)
1987
+ return n - (_.A - 10);
1988
+ if (n >= _.a && n <= _.f)
1989
+ return n - (_.a - 10);
1990
+ }
1991
+ function A(n) {
1992
+ if (typeof n != "string")
1993
+ throw new Error("hex string expected, got " + typeof n);
1994
+ if (D)
1995
+ return Uint8Array.fromHex(n);
1996
+ const b = n.length, y = b / 2;
1997
+ if (b % 2)
1998
+ throw new Error("hex string expected, got unpadded hex of length " + b);
1999
+ const V = new Uint8Array(y);
2000
+ for (let k = 0, j = 0; k < y; k++, j += 2) {
2001
+ const et = C(n.charCodeAt(j)), K = C(n.charCodeAt(j + 1));
2002
+ if (et === void 0 || K === void 0) {
2003
+ const N = n[j] + n[j + 1];
2004
+ throw new Error('hex string expected, got non-hex character "' + N + '" at index ' + j);
547
2005
  }
548
- T[G] = tt * 16 + X;
2006
+ V[k] = et * 16 + K;
549
2007
  }
550
- return T;
2008
+ return V;
551
2009
  }
552
- const E = async () => {
2010
+ const B = async () => {
553
2011
  };
554
- t.nextTick = E;
555
- async function D(c, g, _) {
556
- let T = Date.now();
557
- for (let G = 0; G < c; G++) {
558
- _(G);
559
- const P = Date.now() - T;
560
- P >= 0 && P < g || (await (0, t.nextTick)(), T += P);
2012
+ t.nextTick = B;
2013
+ async function m(n, b, y) {
2014
+ let V = Date.now();
2015
+ for (let k = 0; k < n; k++) {
2016
+ y(k);
2017
+ const j = Date.now() - V;
2018
+ j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
561
2019
  }
562
2020
  }
563
- function B(c) {
564
- if (typeof c != "string")
2021
+ function E(n) {
2022
+ if (typeof n != "string")
565
2023
  throw new Error("string expected");
566
- return new Uint8Array(new TextEncoder().encode(c));
2024
+ return new Uint8Array(new TextEncoder().encode(n));
567
2025
  }
568
- function a(c) {
569
- return new TextDecoder().decode(c);
2026
+ function h(n) {
2027
+ return new TextDecoder().decode(n);
570
2028
  }
571
- function d(c) {
572
- return typeof c == "string" && (c = B(c)), o(c), c;
2029
+ function u(n) {
2030
+ return typeof n == "string" && (n = E(n)), i(n), n;
573
2031
  }
574
- function f(c) {
575
- return typeof c == "string" && (c = B(c)), o(c), c;
2032
+ function l(n) {
2033
+ return typeof n == "string" && (n = E(n)), i(n), n;
576
2034
  }
577
- function p(...c) {
578
- let g = 0;
579
- for (let T = 0; T < c.length; T++) {
580
- const G = c[T];
581
- o(G), g += G.length;
2035
+ function L(...n) {
2036
+ let b = 0;
2037
+ for (let V = 0; V < n.length; V++) {
2038
+ const k = n[V];
2039
+ i(k), b += k.length;
582
2040
  }
583
- const _ = new Uint8Array(g);
584
- for (let T = 0, G = 0; T < c.length; T++) {
585
- const P = c[T];
586
- _.set(P, G), G += P.length;
2041
+ const y = new Uint8Array(b);
2042
+ for (let V = 0, k = 0; V < n.length; V++) {
2043
+ const j = n[V];
2044
+ y.set(j, k), k += j.length;
587
2045
  }
588
- return _;
2046
+ return y;
589
2047
  }
590
- function l(c, g) {
591
- if (g !== void 0 && {}.toString.call(g) !== "[object Object]")
2048
+ function p(n, b) {
2049
+ if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
592
2050
  throw new Error("options should be object or undefined");
593
- return Object.assign(c, g);
2051
+ return Object.assign(n, b);
594
2052
  }
595
- class S {
2053
+ class U {
596
2054
  }
597
- t.Hash = S;
598
- function U(c) {
599
- const g = (T) => c().update(d(T)).digest(), _ = c();
600
- return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = () => c(), g;
2055
+ t.Hash = U;
2056
+ function F(n) {
2057
+ const b = (V) => n().update(u(V)).digest(), y = n();
2058
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = () => n(), b;
601
2059
  }
602
- function k(c) {
603
- const g = (T, G) => c(G).update(d(T)).digest(), _ = c({});
604
- return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = (T) => c(T), g;
2060
+ function M(n) {
2061
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
2062
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
605
2063
  }
606
- function F(c) {
607
- const g = (T, G) => c(G).update(d(T)).digest(), _ = c({});
608
- return g.outputLen = _.outputLen, g.blockLen = _.blockLen, g.create = (T) => c(T), g;
2064
+ function G(n) {
2065
+ const b = (V, k) => n(k).update(u(V)).digest(), y = n({});
2066
+ return b.outputLen = y.outputLen, b.blockLen = y.blockLen, b.create = (V) => n(V), b;
609
2067
  }
610
- t.wrapConstructor = U, t.wrapConstructorWithOpts = k, t.wrapXOFConstructorWithOpts = F;
611
- function v(c = 32) {
2068
+ t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
2069
+ function q(n = 32) {
612
2070
  if (e.crypto && typeof e.crypto.getRandomValues == "function")
613
- return e.crypto.getRandomValues(new Uint8Array(c));
2071
+ return e.crypto.getRandomValues(new Uint8Array(n));
614
2072
  if (e.crypto && typeof e.crypto.randomBytes == "function")
615
- return Uint8Array.from(e.crypto.randomBytes(c));
2073
+ return Uint8Array.from(e.crypto.randomBytes(n));
616
2074
  throw new Error("crypto.getRandomValues must be defined");
617
2075
  }
618
- })(Bt)), Bt;
619
- }
620
- var vt;
621
- function oe() {
622
- if (vt) return K;
623
- vt = 1, Object.defineProperty(K, "__esModule", { value: !0 }), K.SHA512_IV = K.SHA384_IV = K.SHA224_IV = K.SHA256_IV = K.HashMD = void 0, K.setBigUint64 = e, K.Chi = s, K.Maj = i;
624
- const t = /* @__PURE__ */ pt();
625
- function e(r, n, h, b) {
626
- if (typeof r.setBigUint64 == "function")
627
- return r.setBigUint64(n, h, b);
628
- const x = BigInt(32), H = BigInt(4294967295), u = Number(h >> x & H), A = Number(h & H), m = b ? 4 : 0, w = b ? 0 : 4;
629
- r.setUint32(n + m, u, b), r.setUint32(n + w, A, b);
630
- }
631
- function s(r, n, h) {
632
- return r & n ^ ~r & h;
633
- }
634
- function i(r, n, h) {
635
- return r & n ^ r & h ^ n & h;
636
- }
637
- class o extends t.Hash {
638
- constructor(n, h, b, x) {
639
- super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = n, this.outputLen = h, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(n), this.view = (0, t.createView)(this.buffer);
640
- }
641
- update(n) {
642
- (0, t.aexists)(this), n = (0, t.toBytes)(n), (0, t.abytes)(n);
643
- const { view: h, buffer: b, blockLen: x } = this, H = n.length;
644
- for (let u = 0; u < H; ) {
645
- const A = Math.min(x - this.pos, H - u);
646
- if (A === x) {
647
- const m = (0, t.createView)(n);
648
- for (; x <= H - u; u += x)
649
- this.process(m, u);
2076
+ })(Jt)), Jt;
2077
+ }
2078
+ var pe;
2079
+ function us() {
2080
+ if (pe) return $;
2081
+ pe = 1, Object.defineProperty($, "__esModule", { value: !0 }), $.SHA512_IV = $.SHA384_IV = $.SHA224_IV = $.SHA256_IV = $.HashMD = void 0, $.setBigUint64 = e, $.Chi = s, $.Maj = o;
2082
+ const t = /* @__PURE__ */ Rt();
2083
+ function e(c, r, a, d) {
2084
+ if (typeof c.setBigUint64 == "function")
2085
+ return c.setBigUint64(r, a, d);
2086
+ const x = BigInt(32), H = BigInt(4294967295), f = Number(a >> x & H), g = Number(a & H), w = d ? 4 : 0, S = d ? 0 : 4;
2087
+ c.setUint32(r + w, f, d), c.setUint32(r + S, g, d);
2088
+ }
2089
+ function s(c, r, a) {
2090
+ return c & r ^ ~c & a;
2091
+ }
2092
+ function o(c, r, a) {
2093
+ return c & r ^ c & a ^ r & a;
2094
+ }
2095
+ class i extends t.Hash {
2096
+ constructor(r, a, d, x) {
2097
+ super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = d, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
2098
+ }
2099
+ update(r) {
2100
+ (0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
2101
+ const { view: a, buffer: d, blockLen: x } = this, H = r.length;
2102
+ for (let f = 0; f < H; ) {
2103
+ const g = Math.min(x - this.pos, H - f);
2104
+ if (g === x) {
2105
+ const w = (0, t.createView)(r);
2106
+ for (; x <= H - f; f += x)
2107
+ this.process(w, f);
650
2108
  continue;
651
2109
  }
652
- b.set(n.subarray(u, u + A), this.pos), this.pos += A, u += A, this.pos === x && (this.process(h, 0), this.pos = 0);
2110
+ d.set(r.subarray(f, f + g), this.pos), this.pos += g, f += g, this.pos === x && (this.process(a, 0), this.pos = 0);
653
2111
  }
654
- return this.length += n.length, this.roundClean(), this;
655
- }
656
- digestInto(n) {
657
- (0, t.aexists)(this), (0, t.aoutput)(n, this), this.finished = !0;
658
- const { buffer: h, view: b, blockLen: x, isLE: H } = this;
659
- let { pos: u } = this;
660
- h[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
661
- for (let C = u; C < x; C++)
662
- h[C] = 0;
663
- e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
664
- const A = (0, t.createView)(n), m = this.outputLen;
665
- if (m % 4)
2112
+ return this.length += r.length, this.roundClean(), this;
2113
+ }
2114
+ digestInto(r) {
2115
+ (0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
2116
+ const { buffer: a, view: d, blockLen: x, isLE: H } = this;
2117
+ let { pos: f } = this;
2118
+ a[f++] = 128, (0, t.clean)(this.buffer.subarray(f)), this.padOffset > x - f && (this.process(d, 0), f = 0);
2119
+ for (let D = f; D < x; D++)
2120
+ a[D] = 0;
2121
+ e(d, x - 8, BigInt(this.length * 8), H), this.process(d, 0);
2122
+ const g = (0, t.createView)(r), w = this.outputLen;
2123
+ if (w % 4)
666
2124
  throw new Error("_sha2: outputLen should be aligned to 32bit");
667
- const w = m / 4, I = this.get();
668
- if (w > I.length)
2125
+ const S = w / 4, I = this.get();
2126
+ if (S > I.length)
669
2127
  throw new Error("_sha2: outputLen bigger than state");
670
- for (let C = 0; C < w; C++)
671
- A.setUint32(4 * C, I[C], H);
2128
+ for (let D = 0; D < S; D++)
2129
+ g.setUint32(4 * D, I[D], H);
672
2130
  }
673
2131
  digest() {
674
- const { buffer: n, outputLen: h } = this;
675
- this.digestInto(n);
676
- const b = n.slice(0, h);
677
- return this.destroy(), b;
2132
+ const { buffer: r, outputLen: a } = this;
2133
+ this.digestInto(r);
2134
+ const d = r.slice(0, a);
2135
+ return this.destroy(), d;
678
2136
  }
679
- _cloneInto(n) {
680
- n || (n = new this.constructor()), n.set(...this.get());
681
- const { blockLen: h, buffer: b, length: x, finished: H, destroyed: u, pos: A } = this;
682
- return n.destroyed = u, n.finished = H, n.length = x, n.pos = A, x % h && n.buffer.set(b), n;
2137
+ _cloneInto(r) {
2138
+ r || (r = new this.constructor()), r.set(...this.get());
2139
+ const { blockLen: a, buffer: d, length: x, finished: H, destroyed: f, pos: g } = this;
2140
+ return r.destroyed = f, r.finished = H, r.length = x, r.pos = g, x % a && r.buffer.set(d), r;
683
2141
  }
684
2142
  clone() {
685
2143
  return this._cloneInto();
686
2144
  }
687
2145
  }
688
- return K.HashMD = o, K.SHA256_IV = Uint32Array.from([
2146
+ return $.HashMD = i, $.SHA256_IV = Uint32Array.from([
689
2147
  1779033703,
690
2148
  3144134277,
691
2149
  1013904242,
@@ -694,7 +2152,7 @@ function oe() {
694
2152
  2600822924,
695
2153
  528734635,
696
2154
  1541459225
697
- ]), K.SHA224_IV = Uint32Array.from([
2155
+ ]), $.SHA224_IV = Uint32Array.from([
698
2156
  3238371032,
699
2157
  914150663,
700
2158
  812702999,
@@ -703,7 +2161,7 @@ function oe() {
703
2161
  1750603025,
704
2162
  1694076839,
705
2163
  3204075428
706
- ]), K.SHA384_IV = Uint32Array.from([
2164
+ ]), $.SHA384_IV = Uint32Array.from([
707
2165
  3418070365,
708
2166
  3238371032,
709
2167
  1654270250,
@@ -720,7 +2178,7 @@ function oe() {
720
2178
  1694076839,
721
2179
  1203062813,
722
2180
  3204075428
723
- ]), K.SHA512_IV = Uint32Array.from([
2181
+ ]), $.SHA512_IV = Uint32Array.from([
724
2182
  1779033703,
725
2183
  4089235720,
726
2184
  3144134277,
@@ -737,98 +2195,98 @@ function oe() {
737
2195
  4215389547,
738
2196
  1541459225,
739
2197
  327033209
740
- ]), K;
2198
+ ]), $;
741
2199
  }
742
- var V = {}, Rt;
743
- function je() {
744
- if (Rt) return V;
745
- Rt = 1, Object.defineProperty(V, "__esModule", { value: !0 }), V.toBig = V.shrSL = V.shrSH = V.rotrSL = V.rotrSH = V.rotrBL = V.rotrBH = V.rotr32L = V.rotr32H = V.rotlSL = V.rotlSH = V.rotlBL = V.rotlBH = V.add5L = V.add5H = V.add4L = V.add4H = V.add3L = V.add3H = void 0, V.add = R, V.fromBig = s, V.split = i;
2200
+ var T = {}, ye;
2201
+ function ls() {
2202
+ if (ye) return T;
2203
+ ye = 1, Object.defineProperty(T, "__esModule", { value: !0 }), T.toBig = T.shrSL = T.shrSH = T.rotrSL = T.rotrSH = T.rotrBL = T.rotrBH = T.rotr32L = T.rotr32H = T.rotlSL = T.rotlSH = T.rotlBL = T.rotlBH = T.add5L = T.add5H = T.add4L = T.add4H = T.add3L = T.add3H = void 0, T.add = W, T.fromBig = s, T.split = o;
746
2204
  const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
747
- function s(a, d = !1) {
748
- return d ? { h: Number(a & t), l: Number(a >> e & t) } : { h: Number(a >> e & t) | 0, l: Number(a & t) | 0 };
749
- }
750
- function i(a, d = !1) {
751
- const f = a.length;
752
- let p = new Uint32Array(f), l = new Uint32Array(f);
753
- for (let S = 0; S < f; S++) {
754
- const { h: U, l: k } = s(a[S], d);
755
- [p[S], l[S]] = [U, k];
756
- }
757
- return [p, l];
758
- }
759
- const o = (a, d) => BigInt(a >>> 0) << e | BigInt(d >>> 0);
760
- V.toBig = o;
761
- const r = (a, d, f) => a >>> f;
762
- V.shrSH = r;
763
- const n = (a, d, f) => a << 32 - f | d >>> f;
764
- V.shrSL = n;
765
- const h = (a, d, f) => a >>> f | d << 32 - f;
766
- V.rotrSH = h;
767
- const b = (a, d, f) => a << 32 - f | d >>> f;
768
- V.rotrSL = b;
769
- const x = (a, d, f) => a << 64 - f | d >>> f - 32;
770
- V.rotrBH = x;
771
- const H = (a, d, f) => a >>> f - 32 | d << 64 - f;
772
- V.rotrBL = H;
773
- const u = (a, d) => d;
774
- V.rotr32H = u;
775
- const A = (a, d) => a;
776
- V.rotr32L = A;
777
- const m = (a, d, f) => a << f | d >>> 32 - f;
778
- V.rotlSH = m;
779
- const w = (a, d, f) => d << f | a >>> 32 - f;
780
- V.rotlSL = w;
781
- const I = (a, d, f) => d << f - 32 | a >>> 64 - f;
782
- V.rotlBH = I;
783
- const C = (a, d, f) => a << f - 32 | d >>> 64 - f;
784
- V.rotlBL = C;
785
- function R(a, d, f, p) {
786
- const l = (d >>> 0) + (p >>> 0);
787
- return { h: a + f + (l / 2 ** 32 | 0) | 0, l: l | 0 };
788
- }
789
- const M = (a, d, f) => (a >>> 0) + (d >>> 0) + (f >>> 0);
790
- V.add3L = M;
791
- const y = (a, d, f, p) => d + f + p + (a / 2 ** 32 | 0) | 0;
792
- V.add3H = y;
793
- const O = (a, d, f, p) => (a >>> 0) + (d >>> 0) + (f >>> 0) + (p >>> 0);
794
- V.add4L = O;
795
- const L = (a, d, f, p, l) => d + f + p + l + (a / 2 ** 32 | 0) | 0;
796
- V.add4H = L;
797
- const E = (a, d, f, p, l) => (a >>> 0) + (d >>> 0) + (f >>> 0) + (p >>> 0) + (l >>> 0);
798
- V.add5L = E;
799
- const D = (a, d, f, p, l, S) => d + f + p + l + S + (a / 2 ** 32 | 0) | 0;
800
- V.add5H = D;
801
- const B = {
2205
+ function s(h, u = !1) {
2206
+ return u ? { h: Number(h & t), l: Number(h >> e & t) } : { h: Number(h >> e & t) | 0, l: Number(h & t) | 0 };
2207
+ }
2208
+ function o(h, u = !1) {
2209
+ const l = h.length;
2210
+ let L = new Uint32Array(l), p = new Uint32Array(l);
2211
+ for (let U = 0; U < l; U++) {
2212
+ const { h: F, l: M } = s(h[U], u);
2213
+ [L[U], p[U]] = [F, M];
2214
+ }
2215
+ return [L, p];
2216
+ }
2217
+ const i = (h, u) => BigInt(h >>> 0) << e | BigInt(u >>> 0);
2218
+ T.toBig = i;
2219
+ const c = (h, u, l) => h >>> l;
2220
+ T.shrSH = c;
2221
+ const r = (h, u, l) => h << 32 - l | u >>> l;
2222
+ T.shrSL = r;
2223
+ const a = (h, u, l) => h >>> l | u << 32 - l;
2224
+ T.rotrSH = a;
2225
+ const d = (h, u, l) => h << 32 - l | u >>> l;
2226
+ T.rotrSL = d;
2227
+ const x = (h, u, l) => h << 64 - l | u >>> l - 32;
2228
+ T.rotrBH = x;
2229
+ const H = (h, u, l) => h >>> l - 32 | u << 64 - l;
2230
+ T.rotrBL = H;
2231
+ const f = (h, u) => u;
2232
+ T.rotr32H = f;
2233
+ const g = (h, u) => h;
2234
+ T.rotr32L = g;
2235
+ const w = (h, u, l) => h << l | u >>> 32 - l;
2236
+ T.rotlSH = w;
2237
+ const S = (h, u, l) => u << l | h >>> 32 - l;
2238
+ T.rotlSL = S;
2239
+ const I = (h, u, l) => u << l - 32 | h >>> 64 - l;
2240
+ T.rotlBH = I;
2241
+ const D = (h, u, l) => h << l - 32 | u >>> 64 - l;
2242
+ T.rotlBL = D;
2243
+ function W(h, u, l, L) {
2244
+ const p = (u >>> 0) + (L >>> 0);
2245
+ return { h: h + l + (p / 2 ** 32 | 0) | 0, l: p | 0 };
2246
+ }
2247
+ const v = (h, u, l) => (h >>> 0) + (u >>> 0) + (l >>> 0);
2248
+ T.add3L = v;
2249
+ const _ = (h, u, l, L) => u + l + L + (h / 2 ** 32 | 0) | 0;
2250
+ T.add3H = _;
2251
+ const C = (h, u, l, L) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0);
2252
+ T.add4L = C;
2253
+ const A = (h, u, l, L, p) => u + l + L + p + (h / 2 ** 32 | 0) | 0;
2254
+ T.add4H = A;
2255
+ const B = (h, u, l, L, p) => (h >>> 0) + (u >>> 0) + (l >>> 0) + (L >>> 0) + (p >>> 0);
2256
+ T.add5L = B;
2257
+ const m = (h, u, l, L, p, U) => u + l + L + p + U + (h / 2 ** 32 | 0) | 0;
2258
+ T.add5H = m;
2259
+ const E = {
802
2260
  fromBig: s,
803
- split: i,
804
- toBig: o,
805
- shrSH: r,
806
- shrSL: n,
807
- rotrSH: h,
808
- rotrSL: b,
2261
+ split: o,
2262
+ toBig: i,
2263
+ shrSH: c,
2264
+ shrSL: r,
2265
+ rotrSH: a,
2266
+ rotrSL: d,
809
2267
  rotrBH: x,
810
2268
  rotrBL: H,
811
- rotr32H: u,
812
- rotr32L: A,
813
- rotlSH: m,
814
- rotlSL: w,
2269
+ rotr32H: f,
2270
+ rotr32L: g,
2271
+ rotlSH: w,
2272
+ rotlSL: S,
815
2273
  rotlBH: I,
816
- rotlBL: C,
817
- add: R,
818
- add3L: M,
819
- add3H: y,
820
- add4L: O,
821
- add4H: L,
822
- add5H: D,
823
- add5L: E
2274
+ rotlBL: D,
2275
+ add: W,
2276
+ add3L: v,
2277
+ add3H: _,
2278
+ add4L: C,
2279
+ add4H: A,
2280
+ add5H: m,
2281
+ add5L: B
824
2282
  };
825
- return V.default = B, V;
2283
+ return T.default = E, T;
826
2284
  }
827
- var Gt;
828
- function ce() {
829
- if (Gt) return j;
830
- Gt = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.sha512_224 = j.sha512_256 = j.sha384 = j.sha512 = j.sha224 = j.sha256 = j.SHA512_256 = j.SHA512_224 = j.SHA384 = j.SHA512 = j.SHA224 = j.SHA256 = void 0;
831
- const t = /* @__PURE__ */ oe(), e = /* @__PURE__ */ je(), s = /* @__PURE__ */ pt(), i = /* @__PURE__ */ Uint32Array.from([
2285
+ var _e;
2286
+ function $e() {
2287
+ if (_e) return P;
2288
+ _e = 1, Object.defineProperty(P, "__esModule", { value: !0 }), P.sha512_224 = P.sha512_256 = P.sha384 = P.sha512 = P.sha224 = P.sha256 = P.SHA512_256 = P.SHA512_224 = P.SHA384 = P.SHA512 = P.SHA224 = P.SHA256 = void 0;
2289
+ const t = /* @__PURE__ */ us(), e = /* @__PURE__ */ ls(), s = /* @__PURE__ */ Rt(), o = /* @__PURE__ */ Uint32Array.from([
832
2290
  1116352408,
833
2291
  1899447441,
834
2292
  3049323471,
@@ -893,48 +2351,48 @@ function ce() {
893
2351
  2756734187,
894
2352
  3204031479,
895
2353
  3329325298
896
- ]), o = /* @__PURE__ */ new Uint32Array(64);
897
- class r extends t.HashMD {
898
- constructor(y = 32) {
899
- super(64, y, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
2354
+ ]), i = /* @__PURE__ */ new Uint32Array(64);
2355
+ class c extends t.HashMD {
2356
+ constructor(_ = 32) {
2357
+ super(64, _, 8, !1), this.A = t.SHA256_IV[0] | 0, this.B = t.SHA256_IV[1] | 0, this.C = t.SHA256_IV[2] | 0, this.D = t.SHA256_IV[3] | 0, this.E = t.SHA256_IV[4] | 0, this.F = t.SHA256_IV[5] | 0, this.G = t.SHA256_IV[6] | 0, this.H = t.SHA256_IV[7] | 0;
900
2358
  }
901
2359
  get() {
902
- const { A: y, B: O, C: L, D: E, E: D, F: B, G: a, H: d } = this;
903
- return [y, O, L, E, D, B, a, d];
2360
+ const { A: _, B: C, C: A, D: B, E: m, F: E, G: h, H: u } = this;
2361
+ return [_, C, A, B, m, E, h, u];
904
2362
  }
905
2363
  // prettier-ignore
906
- set(y, O, L, E, D, B, a, d) {
907
- this.A = y | 0, this.B = O | 0, this.C = L | 0, this.D = E | 0, this.E = D | 0, this.F = B | 0, this.G = a | 0, this.H = d | 0;
908
- }
909
- process(y, O) {
910
- for (let l = 0; l < 16; l++, O += 4)
911
- o[l] = y.getUint32(O, !1);
912
- for (let l = 16; l < 64; l++) {
913
- const S = o[l - 15], U = o[l - 2], k = (0, s.rotr)(S, 7) ^ (0, s.rotr)(S, 18) ^ S >>> 3, F = (0, s.rotr)(U, 17) ^ (0, s.rotr)(U, 19) ^ U >>> 10;
914
- o[l] = F + o[l - 7] + k + o[l - 16] | 0;
2364
+ set(_, C, A, B, m, E, h, u) {
2365
+ this.A = _ | 0, this.B = C | 0, this.C = A | 0, this.D = B | 0, this.E = m | 0, this.F = E | 0, this.G = h | 0, this.H = u | 0;
2366
+ }
2367
+ process(_, C) {
2368
+ for (let p = 0; p < 16; p++, C += 4)
2369
+ i[p] = _.getUint32(C, !1);
2370
+ for (let p = 16; p < 64; p++) {
2371
+ const U = i[p - 15], F = i[p - 2], M = (0, s.rotr)(U, 7) ^ (0, s.rotr)(U, 18) ^ U >>> 3, G = (0, s.rotr)(F, 17) ^ (0, s.rotr)(F, 19) ^ F >>> 10;
2372
+ i[p] = G + i[p - 7] + M + i[p - 16] | 0;
915
2373
  }
916
- let { A: L, B: E, C: D, D: B, E: a, F: d, G: f, H: p } = this;
917
- for (let l = 0; l < 64; l++) {
918
- const S = (0, s.rotr)(a, 6) ^ (0, s.rotr)(a, 11) ^ (0, s.rotr)(a, 25), U = p + S + (0, t.Chi)(a, d, f) + i[l] + o[l] | 0, F = ((0, s.rotr)(L, 2) ^ (0, s.rotr)(L, 13) ^ (0, s.rotr)(L, 22)) + (0, t.Maj)(L, E, D) | 0;
919
- p = f, f = d, d = a, a = B + U | 0, B = D, D = E, E = L, L = U + F | 0;
2374
+ let { A, B, C: m, D: E, E: h, F: u, G: l, H: L } = this;
2375
+ for (let p = 0; p < 64; p++) {
2376
+ const U = (0, s.rotr)(h, 6) ^ (0, s.rotr)(h, 11) ^ (0, s.rotr)(h, 25), F = L + U + (0, t.Chi)(h, u, l) + o[p] + i[p] | 0, G = ((0, s.rotr)(A, 2) ^ (0, s.rotr)(A, 13) ^ (0, s.rotr)(A, 22)) + (0, t.Maj)(A, B, m) | 0;
2377
+ L = l, l = u, u = h, h = E + F | 0, E = m, m = B, B = A, A = F + G | 0;
920
2378
  }
921
- L = L + this.A | 0, E = E + this.B | 0, D = D + this.C | 0, B = B + this.D | 0, a = a + this.E | 0, d = d + this.F | 0, f = f + this.G | 0, p = p + this.H | 0, this.set(L, E, D, B, a, d, f, p);
2379
+ A = A + this.A | 0, B = B + this.B | 0, m = m + this.C | 0, E = E + this.D | 0, h = h + this.E | 0, u = u + this.F | 0, l = l + this.G | 0, L = L + this.H | 0, this.set(A, B, m, E, h, u, l, L);
922
2380
  }
923
2381
  roundClean() {
924
- (0, s.clean)(o);
2382
+ (0, s.clean)(i);
925
2383
  }
926
2384
  destroy() {
927
2385
  this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
928
2386
  }
929
2387
  }
930
- j.SHA256 = r;
931
- class n extends r {
2388
+ P.SHA256 = c;
2389
+ class r extends c {
932
2390
  constructor() {
933
2391
  super(28), this.A = t.SHA224_IV[0] | 0, this.B = t.SHA224_IV[1] | 0, this.C = t.SHA224_IV[2] | 0, this.D = t.SHA224_IV[3] | 0, this.E = t.SHA224_IV[4] | 0, this.F = t.SHA224_IV[5] | 0, this.G = t.SHA224_IV[6] | 0, this.H = t.SHA224_IV[7] | 0;
934
2392
  }
935
2393
  }
936
- j.SHA224 = n;
937
- const h = e.split([
2394
+ P.SHA224 = r;
2395
+ const a = e.split([
938
2396
  "0x428a2f98d728ae22",
939
2397
  "0x7137449123ef65cd",
940
2398
  "0xb5c0fbcfec4d3b2f",
@@ -1015,51 +2473,51 @@ function ce() {
1015
2473
  "0x597f299cfc657e2a",
1016
2474
  "0x5fcb6fab3ad6faec",
1017
2475
  "0x6c44198c4a475817"
1018
- ].map((M) => BigInt(M))), b = h[0], x = h[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
1019
- class A extends t.HashMD {
1020
- constructor(y = 64) {
1021
- super(128, y, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
2476
+ ].map((v) => BigInt(v))), d = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), f = /* @__PURE__ */ new Uint32Array(80);
2477
+ class g extends t.HashMD {
2478
+ constructor(_ = 64) {
2479
+ super(128, _, 16, !1), this.Ah = t.SHA512_IV[0] | 0, this.Al = t.SHA512_IV[1] | 0, this.Bh = t.SHA512_IV[2] | 0, this.Bl = t.SHA512_IV[3] | 0, this.Ch = t.SHA512_IV[4] | 0, this.Cl = t.SHA512_IV[5] | 0, this.Dh = t.SHA512_IV[6] | 0, this.Dl = t.SHA512_IV[7] | 0, this.Eh = t.SHA512_IV[8] | 0, this.El = t.SHA512_IV[9] | 0, this.Fh = t.SHA512_IV[10] | 0, this.Fl = t.SHA512_IV[11] | 0, this.Gh = t.SHA512_IV[12] | 0, this.Gl = t.SHA512_IV[13] | 0, this.Hh = t.SHA512_IV[14] | 0, this.Hl = t.SHA512_IV[15] | 0;
1022
2480
  }
1023
2481
  // prettier-ignore
1024
2482
  get() {
1025
- const { Ah: y, Al: O, Bh: L, Bl: E, Ch: D, Cl: B, Dh: a, Dl: d, Eh: f, El: p, Fh: l, Fl: S, Gh: U, Gl: k, Hh: F, Hl: v } = this;
1026
- return [y, O, L, E, D, B, a, d, f, p, l, S, U, k, F, v];
2483
+ const { Ah: _, Al: C, Bh: A, Bl: B, Ch: m, Cl: E, Dh: h, Dl: u, Eh: l, El: L, Fh: p, Fl: U, Gh: F, Gl: M, Hh: G, Hl: q } = this;
2484
+ return [_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q];
1027
2485
  }
1028
2486
  // prettier-ignore
1029
- set(y, O, L, E, D, B, a, d, f, p, l, S, U, k, F, v) {
1030
- this.Ah = y | 0, this.Al = O | 0, this.Bh = L | 0, this.Bl = E | 0, this.Ch = D | 0, this.Cl = B | 0, this.Dh = a | 0, this.Dl = d | 0, this.Eh = f | 0, this.El = p | 0, this.Fh = l | 0, this.Fl = S | 0, this.Gh = U | 0, this.Gl = k | 0, this.Hh = F | 0, this.Hl = v | 0;
1031
- }
1032
- process(y, O) {
1033
- for (let _ = 0; _ < 16; _++, O += 4)
1034
- H[_] = y.getUint32(O), u[_] = y.getUint32(O += 4);
1035
- for (let _ = 16; _ < 80; _++) {
1036
- const T = H[_ - 15] | 0, G = u[_ - 15] | 0, P = e.rotrSH(T, G, 1) ^ e.rotrSH(T, G, 8) ^ e.shrSH(T, G, 7), tt = e.rotrSL(T, G, 1) ^ e.rotrSL(T, G, 8) ^ e.shrSL(T, G, 7), X = H[_ - 2] | 0, J = u[_ - 2] | 0, at = e.rotrSH(X, J, 19) ^ e.rotrBH(X, J, 61) ^ e.shrSH(X, J, 6), Q = e.rotrSL(X, J, 19) ^ e.rotrBL(X, J, 61) ^ e.shrSL(X, J, 6), et = e.add4L(tt, Q, u[_ - 7], u[_ - 16]), Lt = e.add4H(et, P, at, H[_ - 7], H[_ - 16]);
1037
- H[_] = Lt | 0, u[_] = et | 0;
2487
+ set(_, C, A, B, m, E, h, u, l, L, p, U, F, M, G, q) {
2488
+ this.Ah = _ | 0, this.Al = C | 0, this.Bh = A | 0, this.Bl = B | 0, this.Ch = m | 0, this.Cl = E | 0, this.Dh = h | 0, this.Dl = u | 0, this.Eh = l | 0, this.El = L | 0, this.Fh = p | 0, this.Fl = U | 0, this.Gh = F | 0, this.Gl = M | 0, this.Hh = G | 0, this.Hl = q | 0;
2489
+ }
2490
+ process(_, C) {
2491
+ for (let y = 0; y < 16; y++, C += 4)
2492
+ H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
2493
+ for (let y = 16; y < 80; y++) {
2494
+ const V = H[y - 15] | 0, k = f[y - 15] | 0, j = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), et = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), K = H[y - 2] | 0, N = f[y - 2] | 0, ot = e.rotrSH(K, N, 19) ^ e.rotrBH(K, N, 61) ^ e.shrSH(K, N, 6), St = e.rotrSL(K, N, 19) ^ e.rotrBL(K, N, 61) ^ e.shrSL(K, N, 6), at = e.add4L(et, St, f[y - 7], f[y - 16]), wt = e.add4H(at, j, ot, H[y - 7], H[y - 16]);
2495
+ H[y] = wt | 0, f[y] = at | 0;
1038
2496
  }
1039
- let { Ah: L, Al: E, Bh: D, Bl: B, Ch: a, Cl: d, Dh: f, Dl: p, Eh: l, El: S, Fh: U, Fl: k, Gh: F, Gl: v, Hh: c, Hl: g } = this;
1040
- for (let _ = 0; _ < 80; _++) {
1041
- const T = e.rotrSH(l, S, 14) ^ e.rotrSH(l, S, 18) ^ e.rotrBH(l, S, 41), G = e.rotrSL(l, S, 14) ^ e.rotrSL(l, S, 18) ^ e.rotrBL(l, S, 41), P = l & U ^ ~l & F, tt = S & k ^ ~S & v, X = e.add5L(g, G, tt, x[_], u[_]), J = e.add5H(X, c, T, P, b[_], H[_]), at = X | 0, Q = e.rotrSH(L, E, 28) ^ e.rotrBH(L, E, 34) ^ e.rotrBH(L, E, 39), et = e.rotrSL(L, E, 28) ^ e.rotrBL(L, E, 34) ^ e.rotrBL(L, E, 39), Lt = L & D ^ L & a ^ D & a, pe = E & B ^ E & d ^ B & d;
1042
- c = F | 0, g = v | 0, F = U | 0, v = k | 0, U = l | 0, k = S | 0, { h: l, l: S } = e.add(f | 0, p | 0, J | 0, at | 0), f = a | 0, p = d | 0, a = D | 0, d = B | 0, D = L | 0, B = E | 0;
1043
- const kt = e.add3L(at, et, pe);
1044
- L = e.add3H(kt, J, Q, Lt), E = kt | 0;
2497
+ let { Ah: A, Al: B, Bh: m, Bl: E, Ch: h, Cl: u, Dh: l, Dl: L, Eh: p, El: U, Fh: F, Fl: M, Gh: G, Gl: q, Hh: n, Hl: b } = this;
2498
+ for (let y = 0; y < 80; y++) {
2499
+ const V = e.rotrSH(p, U, 14) ^ e.rotrSH(p, U, 18) ^ e.rotrBH(p, U, 41), k = e.rotrSL(p, U, 14) ^ e.rotrSL(p, U, 18) ^ e.rotrBL(p, U, 41), j = p & F ^ ~p & G, et = U & M ^ ~U & q, K = e.add5L(b, k, et, x[y], f[y]), N = e.add5H(K, n, V, j, d[y], H[y]), ot = K | 0, St = e.rotrSH(A, B, 28) ^ e.rotrBH(A, B, 34) ^ e.rotrBH(A, B, 39), at = e.rotrSL(A, B, 28) ^ e.rotrBL(A, B, 34) ^ e.rotrBL(A, B, 39), wt = A & m ^ A & h ^ m & h, Pt = B & E ^ B & u ^ E & u;
2500
+ n = G | 0, b = q | 0, G = F | 0, q = M | 0, F = p | 0, M = U | 0, { h: p, l: U } = e.add(l | 0, L | 0, N | 0, ot | 0), l = h | 0, L = u | 0, h = m | 0, u = E | 0, m = A | 0, E = B | 0;
2501
+ const Ut = e.add3L(ot, at, Pt);
2502
+ A = e.add3H(Ut, N, St, wt), B = Ut | 0;
1045
2503
  }
1046
- ({ h: L, l: E } = e.add(this.Ah | 0, this.Al | 0, L | 0, E | 0)), { h: D, l: B } = e.add(this.Bh | 0, this.Bl | 0, D | 0, B | 0), { h: a, l: d } = e.add(this.Ch | 0, this.Cl | 0, a | 0, d | 0), { h: f, l: p } = e.add(this.Dh | 0, this.Dl | 0, f | 0, p | 0), { h: l, l: S } = e.add(this.Eh | 0, this.El | 0, l | 0, S | 0), { h: U, l: k } = e.add(this.Fh | 0, this.Fl | 0, U | 0, k | 0), { h: F, l: v } = e.add(this.Gh | 0, this.Gl | 0, F | 0, v | 0), { h: c, l: g } = e.add(this.Hh | 0, this.Hl | 0, c | 0, g | 0), this.set(L, E, D, B, a, d, f, p, l, S, U, k, F, v, c, g);
2504
+ ({ h: A, l: B } = e.add(this.Ah | 0, this.Al | 0, A | 0, B | 0)), { h: m, l: E } = e.add(this.Bh | 0, this.Bl | 0, m | 0, E | 0), { h, l: u } = e.add(this.Ch | 0, this.Cl | 0, h | 0, u | 0), { h: l, l: L } = e.add(this.Dh | 0, this.Dl | 0, l | 0, L | 0), { h: p, l: U } = e.add(this.Eh | 0, this.El | 0, p | 0, U | 0), { h: F, l: M } = e.add(this.Fh | 0, this.Fl | 0, F | 0, M | 0), { h: G, l: q } = e.add(this.Gh | 0, this.Gl | 0, G | 0, q | 0), { h: n, l: b } = e.add(this.Hh | 0, this.Hl | 0, n | 0, b | 0), this.set(A, B, m, E, h, u, l, L, p, U, F, M, G, q, n, b);
1047
2505
  }
1048
2506
  roundClean() {
1049
- (0, s.clean)(H, u);
2507
+ (0, s.clean)(H, f);
1050
2508
  }
1051
2509
  destroy() {
1052
2510
  (0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
1053
2511
  }
1054
2512
  }
1055
- j.SHA512 = A;
1056
- class m extends A {
2513
+ P.SHA512 = g;
2514
+ class w extends g {
1057
2515
  constructor() {
1058
2516
  super(48), this.Ah = t.SHA384_IV[0] | 0, this.Al = t.SHA384_IV[1] | 0, this.Bh = t.SHA384_IV[2] | 0, this.Bl = t.SHA384_IV[3] | 0, this.Ch = t.SHA384_IV[4] | 0, this.Cl = t.SHA384_IV[5] | 0, this.Dh = t.SHA384_IV[6] | 0, this.Dl = t.SHA384_IV[7] | 0, this.Eh = t.SHA384_IV[8] | 0, this.El = t.SHA384_IV[9] | 0, this.Fh = t.SHA384_IV[10] | 0, this.Fl = t.SHA384_IV[11] | 0, this.Gh = t.SHA384_IV[12] | 0, this.Gl = t.SHA384_IV[13] | 0, this.Hh = t.SHA384_IV[14] | 0, this.Hl = t.SHA384_IV[15] | 0;
1059
2517
  }
1060
2518
  }
1061
- j.SHA384 = m;
1062
- const w = /* @__PURE__ */ Uint32Array.from([
2519
+ P.SHA384 = w;
2520
+ const S = /* @__PURE__ */ Uint32Array.from([
1063
2521
  2352822216,
1064
2522
  424955298,
1065
2523
  1944164710,
@@ -1094,54 +2552,68 @@ function ce() {
1094
2552
  246885852,
1095
2553
  2177182882
1096
2554
  ]);
1097
- class C extends A {
2555
+ class D extends g {
1098
2556
  constructor() {
1099
- super(28), this.Ah = w[0] | 0, this.Al = w[1] | 0, this.Bh = w[2] | 0, this.Bl = w[3] | 0, this.Ch = w[4] | 0, this.Cl = w[5] | 0, this.Dh = w[6] | 0, this.Dl = w[7] | 0, this.Eh = w[8] | 0, this.El = w[9] | 0, this.Fh = w[10] | 0, this.Fl = w[11] | 0, this.Gh = w[12] | 0, this.Gl = w[13] | 0, this.Hh = w[14] | 0, this.Hl = w[15] | 0;
2557
+ super(28), this.Ah = S[0] | 0, this.Al = S[1] | 0, this.Bh = S[2] | 0, this.Bl = S[3] | 0, this.Ch = S[4] | 0, this.Cl = S[5] | 0, this.Dh = S[6] | 0, this.Dl = S[7] | 0, this.Eh = S[8] | 0, this.El = S[9] | 0, this.Fh = S[10] | 0, this.Fl = S[11] | 0, this.Gh = S[12] | 0, this.Gl = S[13] | 0, this.Hh = S[14] | 0, this.Hl = S[15] | 0;
1100
2558
  }
1101
2559
  }
1102
- j.SHA512_224 = C;
1103
- class R extends A {
2560
+ P.SHA512_224 = D;
2561
+ class W extends g {
1104
2562
  constructor() {
1105
2563
  super(32), this.Ah = I[0] | 0, this.Al = I[1] | 0, this.Bh = I[2] | 0, this.Bl = I[3] | 0, this.Ch = I[4] | 0, this.Cl = I[5] | 0, this.Dh = I[6] | 0, this.Dl = I[7] | 0, this.Eh = I[8] | 0, this.El = I[9] | 0, this.Fh = I[10] | 0, this.Fl = I[11] | 0, this.Gh = I[12] | 0, this.Gl = I[13] | 0, this.Hh = I[14] | 0, this.Hl = I[15] | 0;
1106
2564
  }
1107
2565
  }
1108
- return j.SHA512_256 = R, j.sha256 = (0, s.createHasher)(() => new r()), j.sha224 = (0, s.createHasher)(() => new n()), j.sha512 = (0, s.createHasher)(() => new A()), j.sha384 = (0, s.createHasher)(() => new m()), j.sha512_256 = (0, s.createHasher)(() => new R()), j.sha512_224 = (0, s.createHasher)(() => new C()), j;
2566
+ return P.SHA512_256 = W, P.sha256 = (0, s.createHasher)(() => new c()), P.sha224 = (0, s.createHasher)(() => new r()), P.sha512 = (0, s.createHasher)(() => new g()), P.sha384 = (0, s.createHasher)(() => new w()), P.sha512_256 = (0, s.createHasher)(() => new W()), P.sha512_224 = (0, s.createHasher)(() => new D()), P;
2567
+ }
2568
+ var ge;
2569
+ function Us() {
2570
+ if (ge) return nt;
2571
+ ge = 1, Object.defineProperty(nt, "__esModule", { value: !0 }), nt.sha224 = nt.SHA224 = nt.sha256 = nt.SHA256 = void 0;
2572
+ const t = /* @__PURE__ */ $e();
2573
+ return nt.SHA256 = t.SHA256, nt.sha256 = t.sha256, nt.SHA224 = t.SHA224, nt.sha224 = t.sha224, nt;
1109
2574
  }
1110
- var mt = {}, jt;
1111
- function Pe() {
1112
- return jt || (jt = 1, (function(t) {
2575
+ var X = {}, Se;
2576
+ function Es() {
2577
+ if (Se) return X;
2578
+ Se = 1, Object.defineProperty(X, "__esModule", { value: !0 }), X.sha512_256 = X.SHA512_256 = X.sha512_224 = X.SHA512_224 = X.sha384 = X.SHA384 = X.sha512 = X.SHA512 = void 0;
2579
+ const t = /* @__PURE__ */ $e();
2580
+ return X.SHA512 = t.SHA512, X.sha512 = t.sha512, X.SHA384 = t.SHA384, X.sha384 = t.sha384, X.SHA512_224 = t.SHA512_224, X.sha512_224 = t.sha512_224, X.SHA512_256 = t.SHA512_256, X.sha512_256 = t.sha512_256, X;
2581
+ }
2582
+ var Dt = {}, Qt = {}, we;
2583
+ function bs() {
2584
+ return we || (we = 1, (function(t) {
1113
2585
  Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
1114
- const e = /* @__PURE__ */ pt();
2586
+ const e = /* @__PURE__ */ Rt();
1115
2587
  class s extends e.Hash {
1116
- constructor(r, n) {
1117
- super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(r);
1118
- const h = (0, e.toBytes)(n);
1119
- if (this.iHash = r.create(), typeof this.iHash.update != "function")
2588
+ constructor(c, r) {
2589
+ super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(c);
2590
+ const a = (0, e.toBytes)(r);
2591
+ if (this.iHash = c.create(), typeof this.iHash.update != "function")
1120
2592
  throw new Error("Expected instance of class which extends utils.Hash");
1121
2593
  this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1122
- const b = this.blockLen, x = new Uint8Array(b);
1123
- x.set(h.length > b ? r.create().update(h).digest() : h);
2594
+ const d = this.blockLen, x = new Uint8Array(d);
2595
+ x.set(a.length > d ? c.create().update(a).digest() : a);
1124
2596
  for (let H = 0; H < x.length; H++)
1125
2597
  x[H] ^= 54;
1126
- this.iHash.update(x), this.oHash = r.create();
2598
+ this.iHash.update(x), this.oHash = c.create();
1127
2599
  for (let H = 0; H < x.length; H++)
1128
2600
  x[H] ^= 106;
1129
2601
  this.oHash.update(x), (0, e.clean)(x);
1130
2602
  }
1131
- update(r) {
1132
- return (0, e.aexists)(this), this.iHash.update(r), this;
2603
+ update(c) {
2604
+ return (0, e.aexists)(this), this.iHash.update(c), this;
1133
2605
  }
1134
- digestInto(r) {
1135
- (0, e.aexists)(this), (0, e.abytes)(r, this.outputLen), this.finished = !0, this.iHash.digestInto(r), this.oHash.update(r), this.oHash.digestInto(r), this.destroy();
2606
+ digestInto(c) {
2607
+ (0, e.aexists)(this), (0, e.abytes)(c, this.outputLen), this.finished = !0, this.iHash.digestInto(c), this.oHash.update(c), this.oHash.digestInto(c), this.destroy();
1136
2608
  }
1137
2609
  digest() {
1138
- const r = new Uint8Array(this.oHash.outputLen);
1139
- return this.digestInto(r), r;
2610
+ const c = new Uint8Array(this.oHash.outputLen);
2611
+ return this.digestInto(c), c;
1140
2612
  }
1141
- _cloneInto(r) {
1142
- r || (r = Object.create(Object.getPrototypeOf(this), {}));
1143
- const { oHash: n, iHash: h, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
1144
- return r = r, r.finished = b, r.destroyed = x, r.blockLen = H, r.outputLen = u, r.oHash = n._cloneInto(r.oHash), r.iHash = h._cloneInto(r.iHash), r;
2613
+ _cloneInto(c) {
2614
+ c || (c = Object.create(Object.getPrototypeOf(this), {}));
2615
+ const { oHash: r, iHash: a, finished: d, destroyed: x, blockLen: H, outputLen: f } = this;
2616
+ return c = c, c.finished = d, c.destroyed = x, c.blockLen = H, c.outputLen = f, c.oHash = r._cloneInto(c.oHash), c.iHash = a._cloneInto(c.iHash), c;
1145
2617
  }
1146
2618
  clone() {
1147
2619
  return this._cloneInto();
@@ -1151,523 +2623,80 @@ function Pe() {
1151
2623
  }
1152
2624
  }
1153
2625
  t.HMAC = s;
1154
- const i = (o, r, n) => new s(o, r).update(n).digest();
1155
- t.hmac = i, t.hmac.create = (o, r) => new s(o, r);
1156
- })(mt)), mt;
1157
- }
1158
- var ot = {}, N = {}, Pt;
1159
- function We() {
1160
- if (Pt) return N;
1161
- Pt = 1, Object.defineProperty(N, "__esModule", { value: !0 }), N.ripemd160 = N.RIPEMD160 = N.md5 = N.MD5 = N.sha1 = N.SHA1 = void 0;
1162
- const t = /* @__PURE__ */ oe(), e = /* @__PURE__ */ pt(), s = /* @__PURE__ */ Uint32Array.from([
1163
- 1732584193,
1164
- 4023233417,
1165
- 2562383102,
1166
- 271733878,
1167
- 3285377520
1168
- ]), i = /* @__PURE__ */ new Uint32Array(80);
1169
- class o extends t.HashMD {
1170
- constructor() {
1171
- super(64, 20, 8, !1), this.A = s[0] | 0, this.B = s[1] | 0, this.C = s[2] | 0, this.D = s[3] | 0, this.E = s[4] | 0;
1172
- }
1173
- get() {
1174
- const { A: a, B: d, C: f, D: p, E: l } = this;
1175
- return [a, d, f, p, l];
1176
- }
1177
- set(a, d, f, p, l) {
1178
- this.A = a | 0, this.B = d | 0, this.C = f | 0, this.D = p | 0, this.E = l | 0;
1179
- }
1180
- process(a, d) {
1181
- for (let k = 0; k < 16; k++, d += 4)
1182
- i[k] = a.getUint32(d, !1);
1183
- for (let k = 16; k < 80; k++)
1184
- i[k] = (0, e.rotl)(i[k - 3] ^ i[k - 8] ^ i[k - 14] ^ i[k - 16], 1);
1185
- let { A: f, B: p, C: l, D: S, E: U } = this;
1186
- for (let k = 0; k < 80; k++) {
1187
- let F, v;
1188
- k < 20 ? (F = (0, t.Chi)(p, l, S), v = 1518500249) : k < 40 ? (F = p ^ l ^ S, v = 1859775393) : k < 60 ? (F = (0, t.Maj)(p, l, S), v = 2400959708) : (F = p ^ l ^ S, v = 3395469782);
1189
- const c = (0, e.rotl)(f, 5) + F + U + v + i[k] | 0;
1190
- U = S, S = l, l = (0, e.rotl)(p, 30), p = f, f = c;
1191
- }
1192
- f = f + this.A | 0, p = p + this.B | 0, l = l + this.C | 0, S = S + this.D | 0, U = U + this.E | 0, this.set(f, p, l, S, U);
1193
- }
1194
- roundClean() {
1195
- (0, e.clean)(i);
1196
- }
1197
- destroy() {
1198
- this.set(0, 0, 0, 0, 0), (0, e.clean)(this.buffer);
1199
- }
1200
- }
1201
- N.SHA1 = o, N.sha1 = (0, e.createHasher)(() => new o());
1202
- const r = /* @__PURE__ */ Math.pow(2, 32), n = /* @__PURE__ */ Array.from({ length: 64 }, (B, a) => Math.floor(r * Math.abs(Math.sin(a + 1)))), h = /* @__PURE__ */ s.slice(0, 4), b = /* @__PURE__ */ new Uint32Array(16);
1203
- class x extends t.HashMD {
1204
- constructor() {
1205
- super(64, 16, 8, !0), this.A = h[0] | 0, this.B = h[1] | 0, this.C = h[2] | 0, this.D = h[3] | 0;
1206
- }
1207
- get() {
1208
- const { A: a, B: d, C: f, D: p } = this;
1209
- return [a, d, f, p];
1210
- }
1211
- set(a, d, f, p) {
1212
- this.A = a | 0, this.B = d | 0, this.C = f | 0, this.D = p | 0;
1213
- }
1214
- process(a, d) {
1215
- for (let U = 0; U < 16; U++, d += 4)
1216
- b[U] = a.getUint32(d, !0);
1217
- let { A: f, B: p, C: l, D: S } = this;
1218
- for (let U = 0; U < 64; U++) {
1219
- let k, F, v;
1220
- U < 16 ? (k = (0, t.Chi)(p, l, S), F = U, v = [7, 12, 17, 22]) : U < 32 ? (k = (0, t.Chi)(S, p, l), F = (5 * U + 1) % 16, v = [5, 9, 14, 20]) : U < 48 ? (k = p ^ l ^ S, F = (3 * U + 5) % 16, v = [4, 11, 16, 23]) : (k = l ^ (p | ~S), F = 7 * U % 16, v = [6, 10, 15, 21]), k = k + f + n[U] + b[F], f = S, S = l, l = p, p = p + (0, e.rotl)(k, v[U % 4]);
1221
- }
1222
- f = f + this.A | 0, p = p + this.B | 0, l = l + this.C | 0, S = S + this.D | 0, this.set(f, p, l, S);
1223
- }
1224
- roundClean() {
1225
- (0, e.clean)(b);
1226
- }
1227
- destroy() {
1228
- this.set(0, 0, 0, 0), (0, e.clean)(this.buffer);
1229
- }
1230
- }
1231
- N.MD5 = x, N.md5 = (0, e.createHasher)(() => new x());
1232
- const H = /* @__PURE__ */ Uint8Array.from([
1233
- 7,
1234
- 4,
1235
- 13,
1236
- 1,
1237
- 10,
1238
- 6,
1239
- 15,
1240
- 3,
1241
- 12,
1242
- 0,
1243
- 9,
1244
- 5,
1245
- 2,
1246
- 14,
1247
- 11,
1248
- 8
1249
- ]), u = Uint8Array.from(new Array(16).fill(0).map((B, a) => a)), A = u.map((B) => (9 * B + 5) % 16), m = /* @__PURE__ */ (() => {
1250
- const d = [[u], [A]];
1251
- for (let f = 0; f < 4; f++)
1252
- for (let p of d)
1253
- p.push(p[f].map((l) => H[l]));
1254
- return d;
1255
- })(), w = m[0], I = m[1], C = /* @__PURE__ */ [
1256
- [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
1257
- [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
1258
- [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
1259
- [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
1260
- [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
1261
- ].map((B) => Uint8Array.from(B)), R = /* @__PURE__ */ w.map((B, a) => B.map((d) => C[a][d])), M = /* @__PURE__ */ I.map((B, a) => B.map((d) => C[a][d])), y = /* @__PURE__ */ Uint32Array.from([
1262
- 0,
1263
- 1518500249,
1264
- 1859775393,
1265
- 2400959708,
1266
- 2840853838
1267
- ]), O = /* @__PURE__ */ Uint32Array.from([
1268
- 1352829926,
1269
- 1548603684,
1270
- 1836072691,
1271
- 2053994217,
1272
- 0
1273
- ]);
1274
- function L(B, a, d, f) {
1275
- return B === 0 ? a ^ d ^ f : B === 1 ? a & d | ~a & f : B === 2 ? (a | ~d) ^ f : B === 3 ? a & f | d & ~f : a ^ (d | ~f);
1276
- }
1277
- const E = /* @__PURE__ */ new Uint32Array(16);
1278
- class D extends t.HashMD {
1279
- constructor() {
1280
- super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
1281
- }
1282
- get() {
1283
- const { h0: a, h1: d, h2: f, h3: p, h4: l } = this;
1284
- return [a, d, f, p, l];
1285
- }
1286
- set(a, d, f, p, l) {
1287
- this.h0 = a | 0, this.h1 = d | 0, this.h2 = f | 0, this.h3 = p | 0, this.h4 = l | 0;
1288
- }
1289
- process(a, d) {
1290
- for (let _ = 0; _ < 16; _++, d += 4)
1291
- E[_] = a.getUint32(d, !0);
1292
- let f = this.h0 | 0, p = f, l = this.h1 | 0, S = l, U = this.h2 | 0, k = U, F = this.h3 | 0, v = F, c = this.h4 | 0, g = c;
1293
- for (let _ = 0; _ < 5; _++) {
1294
- const T = 4 - _, G = y[_], P = O[_], tt = w[_], X = I[_], J = R[_], at = M[_];
1295
- for (let Q = 0; Q < 16; Q++) {
1296
- const et = (0, e.rotl)(f + L(_, l, U, F) + E[tt[Q]] + G, J[Q]) + c | 0;
1297
- f = c, c = F, F = (0, e.rotl)(U, 10) | 0, U = l, l = et;
1298
- }
1299
- for (let Q = 0; Q < 16; Q++) {
1300
- const et = (0, e.rotl)(p + L(T, S, k, v) + E[X[Q]] + P, at[Q]) + g | 0;
1301
- p = g, g = v, v = (0, e.rotl)(k, 10) | 0, k = S, S = et;
1302
- }
1303
- }
1304
- this.set(this.h1 + U + v | 0, this.h2 + F + g | 0, this.h3 + c + p | 0, this.h4 + f + S | 0, this.h0 + l + k | 0);
1305
- }
1306
- roundClean() {
1307
- (0, e.clean)(E);
1308
- }
1309
- destroy() {
1310
- this.destroyed = !0, (0, e.clean)(this.buffer), this.set(0, 0, 0, 0, 0);
1311
- }
1312
- }
1313
- return N.RIPEMD160 = D, N.ripemd160 = (0, e.createHasher)(() => new D()), N;
1314
- }
1315
- var Wt;
1316
- function As() {
1317
- if (Wt) return ot;
1318
- Wt = 1, Object.defineProperty(ot, "__esModule", { value: !0 }), ot.ripemd160 = ot.RIPEMD160 = void 0;
1319
- const t = /* @__PURE__ */ We();
1320
- return ot.RIPEMD160 = t.RIPEMD160, ot.ripemd160 = t.ripemd160, ot;
1321
- }
1322
- var Y = {}, qt;
1323
- function ys() {
1324
- if (qt) return Y;
1325
- qt = 1, Object.defineProperty(Y, "__esModule", { value: !0 }), Y.sha224 = Y.SHA224 = Y.sha256 = Y.SHA256 = void 0;
1326
- const t = /* @__PURE__ */ ce();
1327
- return Y.SHA256 = t.SHA256, Y.sha256 = t.sha256, Y.SHA224 = t.SHA224, Y.sha224 = t.sha224, Y;
1328
- }
1329
- var W = {}, Kt;
1330
- function gs() {
1331
- if (Kt) return W;
1332
- Kt = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.sha512_256 = W.SHA512_256 = W.sha512_224 = W.SHA512_224 = W.sha384 = W.SHA384 = W.sha512 = W.SHA512 = void 0;
1333
- const t = /* @__PURE__ */ ce();
1334
- return W.SHA512 = t.SHA512, W.sha512 = t.sha512, W.SHA384 = t.SHA384, W.sha384 = t.sha384, W.SHA512_224 = t.SHA512_224, W.sha512_224 = t.sha512_224, W.SHA512_256 = t.SHA512_256, W.sha512_256 = t.sha512_256, W;
1335
- }
1336
- function qe(t) {
1337
- return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
1338
- }
1339
- function Nt(t, e = "") {
1340
- if (!Number.isSafeInteger(t) || t < 0) {
1341
- const s = e && `"${e}" `;
1342
- throw new Error(`${s}expected integer >= 0, got ${t}`);
1343
- }
1344
- }
1345
- function It(t, e, s = "") {
1346
- const i = qe(t), o = t?.length, r = e !== void 0;
1347
- if (!i || r && o !== e) {
1348
- const n = s && `"${s}" `, h = r ? ` of length ${e}` : "", b = i ? `length=${o}` : `type=${typeof t}`;
1349
- throw new Error(n + "expected Uint8Array" + h + ", got " + b);
1350
- }
1351
- return t;
1352
- }
1353
- function Xt(t, e = !0) {
1354
- if (t.destroyed)
1355
- throw new Error("Hash instance has been destroyed");
1356
- if (e && t.finished)
1357
- throw new Error("Hash#digest() has already been called");
1358
- }
1359
- function Ke(t, e) {
1360
- It(t, void 0, "digestInto() output");
1361
- const s = e.outputLen;
1362
- if (t.length < s)
1363
- throw new Error('"digestInto() output" expected to be of length >=' + s);
1364
- }
1365
- function Ne(t) {
1366
- return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
1367
- }
1368
- function he(...t) {
1369
- for (let e = 0; e < t.length; e++)
1370
- t[e].fill(0);
1371
- }
1372
- const Xe = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
1373
- function Je(t) {
1374
- return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
1375
- }
1376
- function Qe(t) {
1377
- for (let e = 0; e < t.length; e++)
1378
- t[e] = Je(t[e]);
1379
- return t;
1380
- }
1381
- const Jt = Xe ? (t) => t : Qe;
1382
- function _s(...t) {
1383
- let e = 0;
1384
- for (let i = 0; i < t.length; i++) {
1385
- const o = t[i];
1386
- It(o), e += o.length;
1387
- }
1388
- const s = new Uint8Array(e);
1389
- for (let i = 0, o = 0; i < t.length; i++) {
1390
- const r = t[i];
1391
- s.set(r, o), o += r.length;
1392
- }
1393
- return s;
1394
- }
1395
- function Ye(t, e = {}) {
1396
- const s = (o, r) => t(r).update(o).digest(), i = t(void 0);
1397
- return s.outputLen = i.outputLen, s.blockLen = i.blockLen, s.create = (o) => t(o), Object.assign(s, e), Object.freeze(s);
1398
- }
1399
- function ws(t = 32) {
1400
- const e = typeof globalThis == "object" ? globalThis.crypto : null;
1401
- if (typeof e?.getRandomValues != "function")
1402
- throw new Error("crypto.getRandomValues must be defined");
1403
- return e.getRandomValues(new Uint8Array(t));
1404
- }
1405
- const ae = (t) => ({
1406
- oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
1407
- }), _t = /* @__PURE__ */ BigInt(2 ** 32 - 1), Qt = /* @__PURE__ */ BigInt(32);
1408
- function Ze(t, e = !1) {
1409
- return e ? { h: Number(t & _t), l: Number(t >> Qt & _t) } : { h: Number(t >> Qt & _t) | 0, l: Number(t & _t) | 0 };
1410
- }
1411
- function ze(t, e = !1) {
1412
- const s = t.length;
1413
- let i = new Uint32Array(s), o = new Uint32Array(s);
1414
- for (let r = 0; r < s; r++) {
1415
- const { h: n, l: h } = Ze(t[r], e);
1416
- [i[r], o[r]] = [n, h];
1417
- }
1418
- return [i, o];
1419
- }
1420
- const $e = (t, e, s) => t << s | e >>> 32 - s, ts = (t, e, s) => e << s | t >>> 32 - s, es = (t, e, s) => e << s - 32 | t >>> 64 - s, ss = (t, e, s) => t << s - 32 | e >>> 64 - s, ns = BigInt(0), bt = BigInt(1), rs = BigInt(2), is = BigInt(7), os = BigInt(256), cs = BigInt(113), fe = [], de = [], ue = [];
1421
- for (let t = 0, e = bt, s = 1, i = 0; t < 24; t++) {
1422
- [s, i] = [i, (2 * s + 3 * i) % 5], fe.push(2 * (5 * i + s)), de.push((t + 1) * (t + 2) / 2 % 64);
1423
- let o = ns;
1424
- for (let r = 0; r < 7; r++)
1425
- e = (e << bt ^ (e >> is) * cs) % os, e & rs && (o ^= bt << (bt << BigInt(r)) - bt);
1426
- ue.push(o);
1427
- }
1428
- const le = ze(ue, !0), hs = le[0], as = le[1], Yt = (t, e, s) => s > 32 ? es(t, e, s) : $e(t, e, s), Zt = (t, e, s) => s > 32 ? ss(t, e, s) : ts(t, e, s);
1429
- function fs(t, e = 24) {
1430
- const s = new Uint32Array(10);
1431
- for (let i = 24 - e; i < 24; i++) {
1432
- for (let n = 0; n < 10; n++)
1433
- s[n] = t[n] ^ t[n + 10] ^ t[n + 20] ^ t[n + 30] ^ t[n + 40];
1434
- for (let n = 0; n < 10; n += 2) {
1435
- const h = (n + 8) % 10, b = (n + 2) % 10, x = s[b], H = s[b + 1], u = Yt(x, H, 1) ^ s[h], A = Zt(x, H, 1) ^ s[h + 1];
1436
- for (let m = 0; m < 50; m += 10)
1437
- t[n + m] ^= u, t[n + m + 1] ^= A;
1438
- }
1439
- let o = t[2], r = t[3];
1440
- for (let n = 0; n < 24; n++) {
1441
- const h = de[n], b = Yt(o, r, h), x = Zt(o, r, h), H = fe[n];
1442
- o = t[H], r = t[H + 1], t[H] = b, t[H + 1] = x;
1443
- }
1444
- for (let n = 0; n < 50; n += 10) {
1445
- for (let h = 0; h < 10; h++)
1446
- s[h] = t[n + h];
1447
- for (let h = 0; h < 10; h++)
1448
- t[n + h] ^= ~s[(h + 2) % 10] & s[(h + 4) % 10];
1449
- }
1450
- t[0] ^= hs[i], t[1] ^= as[i];
1451
- }
1452
- he(s);
1453
- }
1454
- class Et {
1455
- state;
1456
- pos = 0;
1457
- posOut = 0;
1458
- finished = !1;
1459
- state32;
1460
- destroyed = !1;
1461
- blockLen;
1462
- suffix;
1463
- outputLen;
1464
- enableXOF = !1;
1465
- rounds;
1466
- // NOTE: we accept arguments in bytes instead of bits here.
1467
- constructor(e, s, i, o = !1, r = 24) {
1468
- if (this.blockLen = e, this.suffix = s, this.outputLen = i, this.enableXOF = o, this.rounds = r, Nt(i, "outputLen"), !(0 < e && e < 200))
1469
- throw new Error("only keccak-f1600 function is supported");
1470
- this.state = new Uint8Array(200), this.state32 = Ne(this.state);
1471
- }
1472
- clone() {
1473
- return this._cloneInto();
1474
- }
1475
- keccak() {
1476
- Jt(this.state32), fs(this.state32, this.rounds), Jt(this.state32), this.posOut = 0, this.pos = 0;
1477
- }
1478
- update(e) {
1479
- Xt(this), It(e);
1480
- const { blockLen: s, state: i } = this, o = e.length;
1481
- for (let r = 0; r < o; ) {
1482
- const n = Math.min(s - this.pos, o - r);
1483
- for (let h = 0; h < n; h++)
1484
- i[this.pos++] ^= e[r++];
1485
- this.pos === s && this.keccak();
1486
- }
1487
- return this;
1488
- }
1489
- finish() {
1490
- if (this.finished)
1491
- return;
1492
- this.finished = !0;
1493
- const { state: e, suffix: s, pos: i, blockLen: o } = this;
1494
- e[i] ^= s, (s & 128) !== 0 && i === o - 1 && this.keccak(), e[o - 1] ^= 128, this.keccak();
1495
- }
1496
- writeInto(e) {
1497
- Xt(this, !1), It(e), this.finish();
1498
- const s = this.state, { blockLen: i } = this;
1499
- for (let o = 0, r = e.length; o < r; ) {
1500
- this.posOut >= i && this.keccak();
1501
- const n = Math.min(i - this.posOut, r - o);
1502
- e.set(s.subarray(this.posOut, this.posOut + n), o), this.posOut += n, o += n;
1503
- }
1504
- return e;
1505
- }
1506
- xofInto(e) {
1507
- if (!this.enableXOF)
1508
- throw new Error("XOF is not possible for this instance");
1509
- return this.writeInto(e);
1510
- }
1511
- xof(e) {
1512
- return Nt(e), this.xofInto(new Uint8Array(e));
1513
- }
1514
- digestInto(e) {
1515
- if (Ke(e, this), this.finished)
1516
- throw new Error("digest() was already called");
1517
- return this.writeInto(e), this.destroy(), e;
1518
- }
1519
- digest() {
1520
- return this.digestInto(new Uint8Array(this.outputLen));
1521
- }
1522
- destroy() {
1523
- this.destroyed = !0, he(this.state);
1524
- }
1525
- _cloneInto(e) {
1526
- const { blockLen: s, suffix: i, outputLen: o, rounds: r, enableXOF: n } = this;
1527
- return e ||= new Et(s, i, o, n, r), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = r, e.suffix = i, e.outputLen = o, e.enableXOF = n, e.destroyed = this.destroyed, e;
1528
- }
1529
- }
1530
- const be = (t, e, s, i = {}) => Ye((o = {}) => new Et(e, t, o.dkLen === void 0 ? s : o.dkLen, !0), i), Ss = /* @__PURE__ */ be(31, 168, 16, /* @__PURE__ */ ae(11)), Is = /* @__PURE__ */ be(31, 136, 32, /* @__PURE__ */ ae(12));
1531
- class xe extends se {
1532
- constructor(e, s) {
1533
- super(), this.finished = !1, this.destroyed = !1, $t(e);
1534
- const i = Ut(s);
1535
- if (this.iHash = e.create(), typeof this.iHash.update != "function")
1536
- throw new Error("Expected instance of class which extends utils.Hash");
1537
- this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
1538
- const o = this.blockLen, r = new Uint8Array(o);
1539
- r.set(i.length > o ? e.create().update(i).digest() : i);
1540
- for (let n = 0; n < r.length; n++)
1541
- r[n] ^= 54;
1542
- this.iHash.update(r), this.oHash = e.create();
1543
- for (let n = 0; n < r.length; n++)
1544
- r[n] ^= 106;
1545
- this.oHash.update(r), ct(r);
1546
- }
1547
- update(e) {
1548
- return St(this), this.iHash.update(e), this;
1549
- }
1550
- digestInto(e) {
1551
- St(this), ht(e, this.outputLen), this.finished = !0, this.iHash.digestInto(e), this.oHash.update(e), this.oHash.digestInto(e), this.destroy();
1552
- }
1553
- digest() {
1554
- const e = new Uint8Array(this.oHash.outputLen);
1555
- return this.digestInto(e), e;
1556
- }
1557
- _cloneInto(e) {
1558
- e || (e = Object.create(Object.getPrototypeOf(this), {}));
1559
- const { oHash: s, iHash: i, finished: o, destroyed: r, blockLen: n, outputLen: h } = this;
1560
- return e = e, e.finished = o, e.destroyed = r, e.blockLen = n, e.outputLen = h, e.oHash = s._cloneInto(e.oHash), e.iHash = i._cloneInto(e.iHash), e;
1561
- }
1562
- clone() {
1563
- return this._cloneInto();
1564
- }
1565
- destroy() {
1566
- this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
1567
- }
2626
+ const o = (i, c, r) => new s(i, c).update(r).digest();
2627
+ t.hmac = o, t.hmac.create = (i, c) => new s(i, c);
2628
+ })(Qt)), Qt;
1568
2629
  }
1569
- const He = (t, e, s) => new xe(t, e).update(s).digest();
1570
- He.create = (t, e) => new xe(t, e);
1571
- function ds(t, e, s, i) {
1572
- $t(t);
1573
- const o = _e({ dkLen: 32, asyncTick: 10 }, i), { c: r, dkLen: n, asyncTick: h } = o;
1574
- if (Ht(r), Ht(n), Ht(h), r < 1)
1575
- throw new Error("iterations (c) should be >= 1");
1576
- const b = Ct(e), x = Ct(s), H = new Uint8Array(n), u = He.create(t, b), A = u._cloneInto().update(x);
1577
- return { c: r, dkLen: n, asyncTick: h, DK: H, PRF: u, PRFSalt: A };
1578
- }
1579
- function us(t, e, s, i, o) {
1580
- return t.destroy(), e.destroy(), i && i.destroy(), ct(o), s;
1581
- }
1582
- function Ls(t, e, s, i) {
1583
- const { c: o, dkLen: r, DK: n, PRF: h, PRFSalt: b } = ds(t, e, s, i);
1584
- let x;
1585
- const H = new Uint8Array(4), u = wt(H), A = new Uint8Array(h.outputLen);
1586
- for (let m = 1, w = 0; w < r; m++, w += h.outputLen) {
1587
- const I = n.subarray(w, w + h.outputLen);
1588
- u.setInt32(0, m, !1), (x = b._cloneInto(x)).update(H).digestInto(A), I.set(A.subarray(0, I.length));
1589
- for (let C = 1; C < o; C++) {
1590
- h._cloneInto(x).update(A).digestInto(A);
1591
- for (let R = 0; R < I.length; R++)
1592
- I[R] ^= A[R];
1593
- }
1594
- }
1595
- return us(h, b, n, x, A);
1596
- }
1597
- const Bs = Re;
1598
- var xt = {}, zt;
1599
- function ms() {
1600
- if (zt) return xt;
1601
- zt = 1, Object.defineProperty(xt, "__esModule", { value: !0 }), xt.pbkdf2 = o, xt.pbkdf2Async = r;
1602
- const t = /* @__PURE__ */ Pe(), e = /* @__PURE__ */ pt();
1603
- function s(n, h, b, x) {
1604
- (0, e.ahash)(n);
1605
- const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: u, dkLen: A, asyncTick: m } = H;
1606
- if ((0, e.anumber)(u), (0, e.anumber)(A), (0, e.anumber)(m), u < 1)
2630
+ var Be;
2631
+ function Vs() {
2632
+ if (Be) return Dt;
2633
+ Be = 1, Object.defineProperty(Dt, "__esModule", { value: !0 }), Dt.pbkdf2 = i, Dt.pbkdf2Async = c;
2634
+ const t = /* @__PURE__ */ bs(), e = /* @__PURE__ */ Rt();
2635
+ function s(r, a, d, x) {
2636
+ (0, e.ahash)(r);
2637
+ const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c: f, dkLen: g, asyncTick: w } = H;
2638
+ if ((0, e.anumber)(f), (0, e.anumber)(g), (0, e.anumber)(w), f < 1)
1607
2639
  throw new Error("iterations (c) should be >= 1");
1608
- const w = (0, e.kdfInputToBytes)(h), I = (0, e.kdfInputToBytes)(b), C = new Uint8Array(A), R = t.hmac.create(n, w), M = R._cloneInto().update(I);
1609
- return { c: u, dkLen: A, asyncTick: m, DK: C, PRF: R, PRFSalt: M };
2640
+ const S = (0, e.kdfInputToBytes)(a), I = (0, e.kdfInputToBytes)(d), D = new Uint8Array(g), W = t.hmac.create(r, S), v = W._cloneInto().update(I);
2641
+ return { c: f, dkLen: g, asyncTick: w, DK: D, PRF: W, PRFSalt: v };
1610
2642
  }
1611
- function i(n, h, b, x, H) {
1612
- return n.destroy(), h.destroy(), x && x.destroy(), (0, e.clean)(H), b;
2643
+ function o(r, a, d, x, H) {
2644
+ return r.destroy(), a.destroy(), x && x.destroy(), (0, e.clean)(H), d;
1613
2645
  }
1614
- function o(n, h, b, x) {
1615
- const { c: H, dkLen: u, DK: A, PRF: m, PRFSalt: w } = s(n, h, b, x);
2646
+ function i(r, a, d, x) {
2647
+ const { c: H, dkLen: f, DK: g, PRF: w, PRFSalt: S } = s(r, a, d, x);
1616
2648
  let I;
1617
- const C = new Uint8Array(4), R = (0, e.createView)(C), M = new Uint8Array(m.outputLen);
1618
- for (let y = 1, O = 0; O < u; y++, O += m.outputLen) {
1619
- const L = A.subarray(O, O + m.outputLen);
1620
- R.setInt32(0, y, !1), (I = w._cloneInto(I)).update(C).digestInto(M), L.set(M.subarray(0, L.length));
1621
- for (let E = 1; E < H; E++) {
1622
- m._cloneInto(I).update(M).digestInto(M);
1623
- for (let D = 0; D < L.length; D++)
1624
- L[D] ^= M[D];
2649
+ const D = new Uint8Array(4), W = (0, e.createView)(D), v = new Uint8Array(w.outputLen);
2650
+ for (let _ = 1, C = 0; C < f; _++, C += w.outputLen) {
2651
+ const A = g.subarray(C, C + w.outputLen);
2652
+ W.setInt32(0, _, !1), (I = S._cloneInto(I)).update(D).digestInto(v), A.set(v.subarray(0, A.length));
2653
+ for (let B = 1; B < H; B++) {
2654
+ w._cloneInto(I).update(v).digestInto(v);
2655
+ for (let m = 0; m < A.length; m++)
2656
+ A[m] ^= v[m];
1625
2657
  }
1626
2658
  }
1627
- return i(m, w, A, I, M);
1628
- }
1629
- async function r(n, h, b, x) {
1630
- const { c: H, dkLen: u, asyncTick: A, DK: m, PRF: w, PRFSalt: I } = s(n, h, b, x);
1631
- let C;
1632
- const R = new Uint8Array(4), M = (0, e.createView)(R), y = new Uint8Array(w.outputLen);
1633
- for (let O = 1, L = 0; L < u; O++, L += w.outputLen) {
1634
- const E = m.subarray(L, L + w.outputLen);
1635
- M.setInt32(0, O, !1), (C = I._cloneInto(C)).update(R).digestInto(y), E.set(y.subarray(0, E.length)), await (0, e.asyncLoop)(H - 1, A, () => {
1636
- w._cloneInto(C).update(y).digestInto(y);
1637
- for (let D = 0; D < E.length; D++)
1638
- E[D] ^= y[D];
2659
+ return o(w, S, g, I, v);
2660
+ }
2661
+ async function c(r, a, d, x) {
2662
+ const { c: H, dkLen: f, asyncTick: g, DK: w, PRF: S, PRFSalt: I } = s(r, a, d, x);
2663
+ let D;
2664
+ const W = new Uint8Array(4), v = (0, e.createView)(W), _ = new Uint8Array(S.outputLen);
2665
+ for (let C = 1, A = 0; A < f; C++, A += S.outputLen) {
2666
+ const B = w.subarray(A, A + S.outputLen);
2667
+ v.setInt32(0, C, !1), (D = I._cloneInto(D)).update(W).digestInto(_), B.set(_.subarray(0, B.length)), await (0, e.asyncLoop)(H - 1, g, () => {
2668
+ S._cloneInto(D).update(_).digestInto(_);
2669
+ for (let m = 0; m < B.length; m++)
2670
+ B[m] ^= _[m];
1639
2671
  });
1640
2672
  }
1641
- return i(w, I, m, C, y);
2673
+ return o(S, I, w, D, _);
1642
2674
  }
1643
- return xt;
2675
+ return Dt;
1644
2676
  }
1645
2677
  export {
1646
- ee as A,
1647
- ys as a,
1648
- Pe as b,
1649
- gs as c,
1650
- ws as d,
1651
- It as e,
2678
+ Bs as a,
2679
+ Ss as b,
2680
+ Is as c,
2681
+ gs as d,
2682
+ _t as e,
1652
2683
  _s as f,
1653
- Ss as g,
1654
- Is as h,
1655
- qe as i,
1656
- Bs as j,
1657
- He as k,
1658
- ms as l,
1659
- pt as m,
1660
- ce as n,
1661
- ls as o,
1662
- Ls as p,
1663
- Ae as q,
1664
- As as r,
1665
- ps as s,
1666
- bs as t,
1667
- ht as u,
1668
- xs as v,
1669
- Ht as w,
1670
- $t as x,
1671
- Hs as y,
1672
- ve as z
2684
+ zt as g,
2685
+ Ls as h,
2686
+ u0 as i,
2687
+ ms as j,
2688
+ As as k,
2689
+ Vs as l,
2690
+ Es as m,
2691
+ Us as n,
2692
+ Rt as o,
2693
+ ps as p,
2694
+ Gt as q,
2695
+ ws as r,
2696
+ Hs as s,
2697
+ ys as t,
2698
+ l0 as u,
2699
+ Ue as v,
2700
+ N0 as w,
2701
+ J0 as x
1673
2702
  };