@btc-vision/transaction 1.8.0-beta.3 → 1.8.0-beta.5
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.
- package/browser/_version.d.ts +1 -0
- package/browser/_version.d.ts.map +1 -0
- package/browser/abi/ABICoder.d.ts +1 -1
- package/browser/abi/ABICoder.d.ts.map +1 -0
- package/browser/branded/Branded.d.ts +4 -0
- package/browser/branded/Branded.d.ts.map +1 -0
- package/browser/btc-vision-bitcoin.js +11999 -2647
- package/browser/buffer/BinaryReader.d.ts +120 -1
- package/browser/buffer/BinaryReader.d.ts.map +1 -0
- package/browser/buffer/BinaryWriter.d.ts +51 -1
- package/browser/buffer/BinaryWriter.d.ts.map +1 -0
- package/browser/bytecode/Compressor.d.ts +12 -0
- package/browser/bytecode/Compressor.d.ts.map +1 -0
- package/browser/chain/ChainData.d.ts +2 -2
- package/browser/chain/ChainData.d.ts.map +1 -0
- package/browser/consensus/Consensus.d.ts +11 -3
- package/browser/consensus/Consensus.d.ts.map +1 -0
- package/browser/consensus/ConsensusConfig.d.ts +1 -0
- package/browser/consensus/ConsensusConfig.d.ts.map +1 -0
- package/browser/consensus/IConsensusConfig.d.ts +1 -0
- package/browser/consensus/IConsensusConfig.d.ts.map +1 -0
- package/browser/consensus/metadata/RoswellConsensus.d.ts +1 -0
- package/browser/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
- package/browser/crypto/crypto.d.ts +1 -0
- package/browser/crypto/crypto.d.ts.map +1 -0
- package/browser/deterministic/AddressMap.d.ts +6 -1
- package/browser/deterministic/AddressMap.d.ts.map +1 -0
- package/browser/deterministic/AddressSet.d.ts +3 -1
- package/browser/deterministic/AddressSet.d.ts.map +1 -0
- package/browser/deterministic/CustomMap.d.ts +3 -1
- package/browser/deterministic/CustomMap.d.ts.map +1 -0
- package/browser/deterministic/DeterministicMap.d.ts +3 -1
- package/browser/deterministic/DeterministicMap.d.ts.map +1 -0
- package/browser/deterministic/DeterministicSet.d.ts +3 -1
- package/browser/deterministic/DeterministicSet.d.ts.map +1 -0
- package/browser/deterministic/ExtendedAddressMap.d.ts +7 -1
- package/browser/deterministic/ExtendedAddressMap.d.ts.map +1 -0
- package/browser/deterministic/FastMap.d.ts +7 -1
- package/browser/deterministic/FastMap.d.ts.map +1 -0
- package/browser/ecc/backend.d.ts +13 -0
- package/browser/ecc/backend.d.ts.map +1 -0
- package/browser/epoch/ChallengeSolution.d.ts +33 -1
- package/browser/epoch/ChallengeSolution.d.ts.map +1 -0
- package/browser/epoch/interfaces/IChallengeSolution.d.ts +14 -13
- package/browser/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
- package/browser/epoch/validator/EpochValidator.d.ts +37 -7
- package/browser/epoch/validator/EpochValidator.d.ts.map +1 -0
- package/browser/event/NetEvent.d.ts +1 -0
- package/browser/event/NetEvent.d.ts.map +1 -0
- package/browser/generators/AddressGenerator.d.ts +4 -3
- package/browser/generators/AddressGenerator.d.ts.map +1 -0
- package/browser/generators/Features.d.ts +1 -0
- package/browser/generators/Features.d.ts.map +1 -0
- package/browser/generators/Generator.d.ts +46 -10
- package/browser/generators/Generator.d.ts.map +1 -0
- package/browser/generators/MLDSAData.d.ts +1 -0
- package/browser/generators/MLDSAData.d.ts.map +1 -0
- package/browser/generators/builders/CalldataGenerator.d.ts +25 -4
- package/browser/generators/builders/CalldataGenerator.d.ts.map +1 -0
- package/browser/generators/builders/CustomGenerator.d.ts +13 -3
- package/browser/generators/builders/CustomGenerator.d.ts.map +1 -0
- package/browser/generators/builders/DeploymentGenerator.d.ts +15 -4
- package/browser/generators/builders/DeploymentGenerator.d.ts.map +1 -0
- package/browser/generators/builders/HashCommitmentGenerator.d.ts +164 -12
- package/browser/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
- package/browser/generators/builders/LegacyCalldataGenerator.d.ts +26 -4
- package/browser/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
- package/browser/generators/builders/MultiSignGenerator.d.ts +6 -1
- package/browser/generators/builders/MultiSignGenerator.d.ts.map +1 -0
- package/browser/generators/builders/P2WDAGenerator.d.ts +42 -4
- package/browser/generators/builders/P2WDAGenerator.d.ts.map +1 -0
- package/browser/index.d.ts +1 -0
- package/browser/index.d.ts.map +1 -0
- package/browser/index.js +3558 -3167
- package/browser/keypair/Address.d.ts +283 -13
- package/browser/keypair/Address.d.ts.map +1 -0
- package/browser/keypair/AddressVerificator.d.ts +7 -6
- package/browser/keypair/AddressVerificator.d.ts.map +1 -0
- package/browser/keypair/EcKeyPair.d.ts +183 -21
- package/browser/keypair/EcKeyPair.d.ts.map +1 -0
- package/browser/keypair/MessageSigner.d.ts +17 -16
- package/browser/keypair/MessageSigner.d.ts.map +1 -0
- package/browser/keypair/Secp256k1PointDeriver.d.ts +55 -0
- package/browser/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
- package/browser/keypair/Wallet.d.ts +27 -13
- package/browser/keypair/Wallet.d.ts.map +1 -0
- package/browser/keypair/interfaces/IWallet.d.ts +19 -0
- package/browser/keypair/interfaces/IWallet.d.ts.map +1 -0
- package/browser/metadata/ContractBaseMetadata.d.ts +10 -2
- package/browser/metadata/ContractBaseMetadata.d.ts.map +1 -0
- package/browser/mnemonic/BIPStandard.d.ts +59 -0
- package/browser/mnemonic/BIPStandard.d.ts.map +1 -0
- package/browser/mnemonic/Mnemonic.d.ts +15 -3
- package/browser/mnemonic/Mnemonic.d.ts.map +1 -0
- package/browser/mnemonic/MnemonicStrength.d.ts +6 -0
- package/browser/mnemonic/MnemonicStrength.d.ts.map +1 -0
- package/browser/network/ChainId.d.ts +1 -0
- package/browser/network/ChainId.d.ts.map +1 -0
- package/browser/noble-curves.js +844 -2746
- package/browser/noble-hashes.js +1338 -2067
- package/browser/opnet.d.ts +22 -1
- package/browser/opnet.d.ts.map +1 -0
- package/browser/p2wda/P2WDADetector.d.ts +36 -9
- package/browser/p2wda/P2WDADetector.d.ts.map +1 -0
- package/browser/polyfill/disposable.d.ts +16 -0
- package/browser/polyfill/disposable.d.ts.map +1 -0
- package/browser/signer/AddressRotation.d.ts +36 -0
- package/browser/signer/AddressRotation.d.ts.map +1 -0
- package/browser/signer/IRotationSigner.d.ts +27 -3
- package/browser/signer/IRotationSigner.d.ts.map +1 -0
- package/browser/signer/ParallelSignerAdapter.d.ts +14 -0
- package/browser/signer/ParallelSignerAdapter.d.ts.map +1 -0
- package/browser/signer/SignerUtils.d.ts +11 -4
- package/browser/signer/SignerUtils.d.ts.map +1 -0
- package/browser/signer/TweakedSigner.d.ts +28 -4
- package/browser/signer/TweakedSigner.d.ts.map +1 -0
- package/browser/transaction/ContractAddress.d.ts +2 -2
- package/browser/transaction/ContractAddress.d.ts.map +1 -0
- package/browser/transaction/TransactionFactory.d.ts +140 -2
- package/browser/transaction/TransactionFactory.d.ts.map +1 -0
- package/browser/transaction/browser/BrowserSignerBase.d.ts +12 -6
- package/browser/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
- package/browser/transaction/browser/WalletNetworks.d.ts +1 -0
- package/browser/transaction/browser/WalletNetworks.d.ts.map +1 -0
- package/browser/transaction/browser/Web3Provider.d.ts +27 -0
- package/browser/transaction/browser/Web3Provider.d.ts.map +1 -0
- package/browser/transaction/browser/extensions/UnisatSigner.d.ts +9 -7
- package/browser/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
- package/browser/transaction/browser/extensions/XverseSigner.d.ts +9 -7
- package/browser/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
- package/browser/transaction/browser/types/OPWallet.d.ts +10 -0
- package/browser/transaction/browser/types/OPWallet.d.ts.map +1 -0
- package/browser/transaction/browser/types/Unisat.d.ts +1 -0
- package/browser/transaction/browser/types/Unisat.d.ts.map +1 -0
- package/browser/transaction/browser/types/Xverse.d.ts +1 -0
- package/browser/transaction/browser/types/Xverse.d.ts.map +1 -0
- package/browser/transaction/builders/CancelTransaction.d.ts +29 -4
- package/browser/transaction/builders/CancelTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
- package/browser/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts +137 -10
- package/browser/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/CustomScriptTransaction.d.ts +106 -6
- package/browser/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/DeploymentTransaction.d.ts +116 -5
- package/browser/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/FundingTransaction.d.ts +4 -3
- package/browser/transaction/builders/FundingTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/InteractionTransaction.d.ts +12 -3
- package/browser/transaction/builders/InteractionTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts +56 -5
- package/browser/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
- package/browser/transaction/builders/MultiSignTransaction.d.ts +125 -16
- package/browser/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/SharedInteractionTransaction.d.ts +103 -15
- package/browser/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
- package/browser/transaction/builders/TransactionBuilder.d.ts +243 -14
- package/browser/transaction/builders/TransactionBuilder.d.ts.map +1 -0
- package/browser/transaction/enums/TransactionType.d.ts +1 -0
- package/browser/transaction/enums/TransactionType.d.ts.map +1 -0
- package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts +2 -1
- package/browser/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
- package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +46 -3
- package/browser/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
- package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts +6 -4
- package/browser/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
- package/browser/transaction/interfaces/ITransactionParameters.d.ts +22 -10
- package/browser/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
- package/browser/transaction/interfaces/ITransactionResponses.d.ts +1 -0
- package/browser/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
- package/browser/transaction/interfaces/ITweakedTransactionData.d.ts +17 -5
- package/browser/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
- package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts +26 -0
- package/browser/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
- package/browser/transaction/interfaces/Tap.d.ts +4 -3
- package/browser/transaction/interfaces/Tap.d.ts.map +1 -0
- package/browser/transaction/mineable/IP2WSHAddress.d.ts +2 -1
- package/browser/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
- package/browser/transaction/mineable/TimelockGenerator.d.ts +12 -3
- package/browser/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
- package/browser/transaction/offline/OfflineTransactionManager.d.ts +190 -9
- package/browser/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
- package/browser/transaction/offline/TransactionReconstructor.d.ts +53 -3
- package/browser/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
- package/browser/transaction/offline/TransactionSerializer.d.ts +53 -2
- package/browser/transaction/offline/TransactionSerializer.d.ts.map +1 -0
- package/browser/transaction/offline/TransactionStateCapture.d.ts +64 -5
- package/browser/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
- package/browser/transaction/offline/interfaces/ISerializableState.d.ts +71 -0
- package/browser/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
- package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts +76 -0
- package/browser/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
- package/browser/transaction/psbt/PSBTTypes.d.ts +1 -0
- package/browser/transaction/psbt/PSBTTypes.d.ts.map +1 -0
- package/browser/transaction/shared/P2TR_MS.d.ts +11 -2
- package/browser/transaction/shared/P2TR_MS.d.ts.map +1 -0
- package/browser/transaction/shared/TweakedTransaction.d.ts +274 -33
- package/browser/transaction/shared/TweakedTransaction.d.ts.map +1 -0
- package/browser/transaction/utils/WitnessUtils.d.ts +7 -1
- package/browser/transaction/utils/WitnessUtils.d.ts.map +1 -0
- package/browser/utils/BitcoinUtils.d.ts +19 -0
- package/browser/utils/BitcoinUtils.d.ts.map +1 -0
- package/browser/utils/BufferHelper.d.ts +1 -0
- package/browser/utils/BufferHelper.d.ts.map +1 -0
- package/browser/utils/StringToBuffer.d.ts +1 -0
- package/browser/utils/StringToBuffer.d.ts.map +1 -0
- package/browser/utils/lengths.d.ts +1 -0
- package/browser/utils/lengths.d.ts.map +1 -0
- package/browser/utils/types.d.ts +1 -0
- package/browser/utils/types.d.ts.map +1 -0
- package/browser/utxo/OPNetLimitedProvider.d.ts +37 -1
- package/browser/utxo/OPNetLimitedProvider.d.ts.map +1 -0
- package/browser/utxo/interfaces/BroadcastResponse.d.ts +1 -0
- package/browser/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
- package/browser/utxo/interfaces/IUTXO.d.ts +11 -5
- package/browser/utxo/interfaces/IUTXO.d.ts.map +1 -0
- package/browser/vendors.js +14351 -10031
- package/browser/verification/TapscriptVerificator.d.ts +10 -8
- package/browser/verification/TapscriptVerificator.d.ts.map +1 -0
- package/build/_version.d.ts +1 -0
- package/build/_version.d.ts.map +1 -0
- package/build/_version.js +1 -0
- package/build/_version.js.map +1 -0
- package/build/abi/ABICoder.d.ts +1 -1
- package/build/abi/ABICoder.d.ts.map +1 -0
- package/build/abi/ABICoder.js +9 -10
- package/build/abi/ABICoder.js.map +1 -0
- package/build/branded/Branded.d.ts +4 -0
- package/build/branded/Branded.d.ts.map +1 -0
- package/build/branded/Branded.js +2 -0
- package/build/branded/Branded.js.map +1 -0
- package/build/buffer/BinaryReader.d.ts +121 -2
- package/build/buffer/BinaryReader.d.ts.map +1 -0
- package/build/buffer/BinaryReader.js +129 -5
- package/build/buffer/BinaryReader.js.map +1 -0
- package/build/buffer/BinaryWriter.d.ts +52 -2
- package/build/buffer/BinaryWriter.d.ts.map +1 -0
- package/build/buffer/BinaryWriter.js +62 -2
- package/build/buffer/BinaryWriter.js.map +1 -0
- package/build/bytecode/Compressor.d.ts +12 -0
- package/build/bytecode/Compressor.d.ts.map +1 -0
- package/build/bytecode/Compressor.js +17 -5
- package/build/bytecode/Compressor.js.map +1 -0
- package/build/chain/ChainData.d.ts +2 -2
- package/build/chain/ChainData.d.ts.map +1 -0
- package/build/chain/ChainData.js +35 -17
- package/build/chain/ChainData.js.map +1 -0
- package/build/consensus/Consensus.d.ts +11 -3
- package/build/consensus/Consensus.d.ts.map +1 -0
- package/build/consensus/Consensus.js +8 -0
- package/build/consensus/Consensus.js.map +1 -0
- package/build/consensus/ConsensusConfig.d.ts +2 -1
- package/build/consensus/ConsensusConfig.d.ts.map +1 -0
- package/build/consensus/ConsensusConfig.js +1 -0
- package/build/consensus/ConsensusConfig.js.map +1 -0
- package/build/consensus/IConsensusConfig.d.ts +1 -0
- package/build/consensus/IConsensusConfig.d.ts.map +1 -0
- package/build/consensus/IConsensusConfig.js +2 -1
- package/build/consensus/IConsensusConfig.js.map +1 -0
- package/build/consensus/metadata/RoswellConsensus.d.ts +2 -1
- package/build/consensus/metadata/RoswellConsensus.d.ts.map +1 -0
- package/build/consensus/metadata/RoswellConsensus.js +2 -0
- package/build/consensus/metadata/RoswellConsensus.js.map +1 -0
- package/build/crypto/crypto.d.ts +1 -0
- package/build/crypto/crypto.d.ts.map +1 -0
- package/build/crypto/crypto.js +1 -0
- package/build/crypto/crypto.js.map +1 -0
- package/build/deterministic/AddressMap.d.ts +6 -1
- package/build/deterministic/AddressMap.d.ts.map +1 -0
- package/build/deterministic/AddressMap.js +8 -0
- package/build/deterministic/AddressMap.js.map +1 -0
- package/build/deterministic/AddressSet.d.ts +3 -1
- package/build/deterministic/AddressSet.d.ts.map +1 -0
- package/build/deterministic/AddressSet.js +7 -0
- package/build/deterministic/AddressSet.js.map +1 -0
- package/build/deterministic/CustomMap.d.ts +3 -1
- package/build/deterministic/CustomMap.d.ts.map +1 -0
- package/build/deterministic/CustomMap.js +65 -47
- package/build/deterministic/CustomMap.js.map +1 -0
- package/build/deterministic/DeterministicMap.d.ts +4 -2
- package/build/deterministic/DeterministicMap.d.ts.map +1 -0
- package/build/deterministic/DeterministicMap.js +24 -27
- package/build/deterministic/DeterministicMap.js.map +1 -0
- package/build/deterministic/DeterministicSet.d.ts +3 -1
- package/build/deterministic/DeterministicSet.d.ts.map +1 -0
- package/build/deterministic/DeterministicSet.js +6 -0
- package/build/deterministic/DeterministicSet.js.map +1 -0
- package/build/deterministic/ExtendedAddressMap.d.ts +7 -1
- package/build/deterministic/ExtendedAddressMap.d.ts.map +1 -0
- package/build/deterministic/ExtendedAddressMap.js +18 -2
- package/build/deterministic/ExtendedAddressMap.js.map +1 -0
- package/build/deterministic/FastMap.d.ts +7 -1
- package/build/deterministic/FastMap.d.ts.map +1 -0
- package/build/deterministic/FastMap.js +7 -2
- package/build/deterministic/FastMap.js.map +1 -0
- package/build/ecc/backend.d.ts +13 -0
- package/build/ecc/backend.d.ts.map +1 -0
- package/build/ecc/backend.js +15 -0
- package/build/ecc/backend.js.map +1 -0
- package/build/epoch/ChallengeSolution.d.ts +34 -2
- package/build/epoch/ChallengeSolution.d.ts.map +1 -0
- package/build/epoch/ChallengeSolution.js +52 -0
- package/build/epoch/ChallengeSolution.js.map +1 -0
- package/build/epoch/interfaces/IChallengeSolution.d.ts +14 -13
- package/build/epoch/interfaces/IChallengeSolution.d.ts.map +1 -0
- package/build/epoch/interfaces/IChallengeSolution.js +2 -1
- package/build/epoch/interfaces/IChallengeSolution.js.map +1 -0
- package/build/epoch/validator/EpochValidator.d.ts +38 -8
- package/build/epoch/validator/EpochValidator.d.ts.map +1 -0
- package/build/epoch/validator/EpochValidator.js +45 -19
- package/build/epoch/validator/EpochValidator.js.map +1 -0
- package/build/event/NetEvent.d.ts +1 -0
- package/build/event/NetEvent.d.ts.map +1 -0
- package/build/event/NetEvent.js +3 -0
- package/build/event/NetEvent.js.map +1 -0
- package/build/generators/AddressGenerator.d.ts +4 -3
- package/build/generators/AddressGenerator.d.ts.map +1 -0
- package/build/generators/AddressGenerator.js +9 -4
- package/build/generators/AddressGenerator.js.map +1 -0
- package/build/generators/Features.d.ts +4 -3
- package/build/generators/Features.d.ts.map +1 -0
- package/build/generators/Features.js +1 -0
- package/build/generators/Features.js.map +1 -0
- package/build/generators/Generator.d.ts +47 -11
- package/build/generators/Generator.d.ts.map +1 -0
- package/build/generators/Generator.js +48 -12
- package/build/generators/Generator.js.map +1 -0
- package/build/generators/MLDSAData.d.ts +1 -0
- package/build/generators/MLDSAData.d.ts.map +1 -0
- package/build/generators/MLDSAData.js +1 -0
- package/build/generators/MLDSAData.js.map +1 -0
- package/build/generators/builders/CalldataGenerator.d.ts +27 -6
- package/build/generators/builders/CalldataGenerator.d.ts.map +1 -0
- package/build/generators/builders/CalldataGenerator.js +33 -4
- package/build/generators/builders/CalldataGenerator.js.map +1 -0
- package/build/generators/builders/CustomGenerator.d.ts +13 -3
- package/build/generators/builders/CustomGenerator.d.ts.map +1 -0
- package/build/generators/builders/CustomGenerator.js +11 -0
- package/build/generators/builders/CustomGenerator.js.map +1 -0
- package/build/generators/builders/DeploymentGenerator.d.ts +17 -6
- package/build/generators/builders/DeploymentGenerator.d.ts.map +1 -0
- package/build/generators/builders/DeploymentGenerator.js +18 -2
- package/build/generators/builders/DeploymentGenerator.js.map +1 -0
- package/build/generators/builders/HashCommitmentGenerator.d.ts +166 -14
- package/build/generators/builders/HashCommitmentGenerator.d.ts.map +1 -0
- package/build/generators/builders/HashCommitmentGenerator.js +193 -27
- package/build/generators/builders/HashCommitmentGenerator.js.map +1 -0
- package/build/generators/builders/LegacyCalldataGenerator.d.ts +27 -5
- package/build/generators/builders/LegacyCalldataGenerator.d.ts.map +1 -0
- package/build/generators/builders/LegacyCalldataGenerator.js +35 -5
- package/build/generators/builders/LegacyCalldataGenerator.js.map +1 -0
- package/build/generators/builders/MultiSignGenerator.d.ts +6 -1
- package/build/generators/builders/MultiSignGenerator.d.ts.map +1 -0
- package/build/generators/builders/MultiSignGenerator.js +20 -10
- package/build/generators/builders/MultiSignGenerator.js.map +1 -0
- package/build/generators/builders/P2WDAGenerator.d.ts +44 -6
- package/build/generators/builders/P2WDAGenerator.d.ts.map +1 -0
- package/build/generators/builders/P2WDAGenerator.js +41 -2
- package/build/generators/builders/P2WDAGenerator.js.map +1 -0
- package/build/index.d.ts +1 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +1 -0
- package/build/index.js.map +1 -0
- package/build/keypair/Address.d.ts +284 -14
- package/build/keypair/Address.d.ts.map +1 -0
- package/build/keypair/Address.js +446 -128
- package/build/keypair/Address.js.map +1 -0
- package/build/keypair/AddressVerificator.d.ts +7 -6
- package/build/keypair/AddressVerificator.d.ts.map +1 -0
- package/build/keypair/AddressVerificator.js +4 -5
- package/build/keypair/AddressVerificator.js.map +1 -0
- package/build/keypair/EcKeyPair.d.ts +185 -23
- package/build/keypair/EcKeyPair.d.ts.map +1 -0
- package/build/keypair/EcKeyPair.js +218 -50
- package/build/keypair/EcKeyPair.js.map +1 -0
- package/build/keypair/MessageSigner.d.ts +18 -17
- package/build/keypair/MessageSigner.d.ts.map +1 -0
- package/build/keypair/MessageSigner.js +34 -25
- package/build/keypair/MessageSigner.js.map +1 -0
- package/build/keypair/Secp256k1PointDeriver.d.ts +55 -0
- package/build/keypair/Secp256k1PointDeriver.d.ts.map +1 -0
- package/build/keypair/Secp256k1PointDeriver.js +66 -0
- package/build/keypair/Secp256k1PointDeriver.js.map +1 -0
- package/build/keypair/Wallet.d.ts +29 -15
- package/build/keypair/Wallet.d.ts.map +1 -0
- package/build/keypair/Wallet.js +46 -14
- package/build/keypair/Wallet.js.map +1 -0
- package/build/keypair/interfaces/IWallet.d.ts +19 -0
- package/build/keypair/interfaces/IWallet.d.ts.map +1 -0
- package/build/keypair/interfaces/IWallet.js +1 -0
- package/build/keypair/interfaces/IWallet.js.map +1 -0
- package/build/metadata/ContractBaseMetadata.d.ts +10 -2
- package/build/metadata/ContractBaseMetadata.d.ts.map +1 -0
- package/build/metadata/ContractBaseMetadata.js +10 -1
- package/build/metadata/ContractBaseMetadata.js.map +1 -0
- package/build/mnemonic/BIPStandard.d.ts +59 -0
- package/build/mnemonic/BIPStandard.d.ts.map +1 -0
- package/build/mnemonic/BIPStandard.js +59 -0
- package/build/mnemonic/BIPStandard.js.map +1 -0
- package/build/mnemonic/Mnemonic.d.ts +16 -4
- package/build/mnemonic/Mnemonic.d.ts.map +1 -0
- package/build/mnemonic/Mnemonic.js +35 -8
- package/build/mnemonic/Mnemonic.js.map +1 -0
- package/build/mnemonic/MnemonicStrength.d.ts +6 -0
- package/build/mnemonic/MnemonicStrength.d.ts.map +1 -0
- package/build/mnemonic/MnemonicStrength.js +6 -0
- package/build/mnemonic/MnemonicStrength.js.map +1 -0
- package/build/network/ChainId.d.ts +1 -0
- package/build/network/ChainId.d.ts.map +1 -0
- package/build/network/ChainId.js +1 -0
- package/build/network/ChainId.js.map +1 -0
- package/build/opnet.d.ts +26 -3
- package/build/opnet.d.ts.map +1 -0
- package/build/opnet.js +23 -0
- package/build/opnet.js.map +1 -0
- package/build/p2wda/P2WDADetector.d.ts +38 -11
- package/build/p2wda/P2WDADetector.d.ts.map +1 -0
- package/build/p2wda/P2WDADetector.js +43 -10
- package/build/p2wda/P2WDADetector.js.map +1 -0
- package/build/polyfill/disposable.d.ts +16 -0
- package/build/polyfill/disposable.d.ts.map +1 -0
- package/build/polyfill/disposable.js +23 -0
- package/build/polyfill/disposable.js.map +1 -0
- package/build/signer/AddressRotation.d.ts +37 -1
- package/build/signer/AddressRotation.d.ts.map +1 -0
- package/build/signer/AddressRotation.js +16 -0
- package/build/signer/AddressRotation.js.map +1 -0
- package/build/signer/IRotationSigner.d.ts +27 -3
- package/build/signer/IRotationSigner.d.ts.map +1 -0
- package/build/signer/IRotationSigner.js +2 -1
- package/build/signer/IRotationSigner.js.map +1 -0
- package/build/signer/ParallelSignerAdapter.d.ts +14 -0
- package/build/signer/ParallelSignerAdapter.d.ts.map +1 -0
- package/build/signer/ParallelSignerAdapter.js +51 -0
- package/build/signer/ParallelSignerAdapter.js.map +1 -0
- package/build/signer/SignerUtils.d.ts +11 -4
- package/build/signer/SignerUtils.d.ts.map +1 -0
- package/build/signer/SignerUtils.js +16 -0
- package/build/signer/SignerUtils.js.map +1 -0
- package/build/signer/TweakedSigner.d.ts +28 -4
- package/build/signer/TweakedSigner.d.ts.map +1 -0
- package/build/signer/TweakedSigner.js +23 -6
- package/build/signer/TweakedSigner.js.map +1 -0
- package/build/transaction/ContractAddress.d.ts +2 -2
- package/build/transaction/ContractAddress.d.ts.map +1 -0
- package/build/transaction/ContractAddress.js +4 -8
- package/build/transaction/ContractAddress.js.map +1 -0
- package/build/transaction/TransactionFactory.d.ts +147 -9
- package/build/transaction/TransactionFactory.d.ts.map +1 -0
- package/build/transaction/TransactionFactory.js +145 -26
- package/build/transaction/TransactionFactory.js.map +1 -0
- package/build/transaction/browser/BrowserSignerBase.d.ts +12 -6
- package/build/transaction/browser/BrowserSignerBase.d.ts.map +1 -0
- package/build/transaction/browser/BrowserSignerBase.js +7 -0
- package/build/transaction/browser/BrowserSignerBase.js.map +1 -0
- package/build/transaction/browser/WalletNetworks.d.ts +1 -0
- package/build/transaction/browser/WalletNetworks.d.ts.map +1 -0
- package/build/transaction/browser/WalletNetworks.js +1 -0
- package/build/transaction/browser/WalletNetworks.js.map +1 -0
- package/build/transaction/browser/Web3Provider.d.ts +30 -3
- package/build/transaction/browser/Web3Provider.d.ts.map +1 -0
- package/build/transaction/browser/Web3Provider.js +1 -0
- package/build/transaction/browser/Web3Provider.js.map +1 -0
- package/build/transaction/browser/extensions/UnisatSigner.d.ts +11 -9
- package/build/transaction/browser/extensions/UnisatSigner.d.ts.map +1 -0
- package/build/transaction/browser/extensions/UnisatSigner.js +27 -17
- package/build/transaction/browser/extensions/UnisatSigner.js.map +1 -0
- package/build/transaction/browser/extensions/XverseSigner.d.ts +10 -8
- package/build/transaction/browser/extensions/XverseSigner.d.ts.map +1 -0
- package/build/transaction/browser/extensions/XverseSigner.js +25 -15
- package/build/transaction/browser/extensions/XverseSigner.js.map +1 -0
- package/build/transaction/browser/types/OPWallet.d.ts +12 -2
- package/build/transaction/browser/types/OPWallet.d.ts.map +1 -0
- package/build/transaction/browser/types/OPWallet.js +4 -0
- package/build/transaction/browser/types/OPWallet.js.map +1 -0
- package/build/transaction/browser/types/Unisat.d.ts +2 -1
- package/build/transaction/browser/types/Unisat.d.ts.map +1 -0
- package/build/transaction/browser/types/Unisat.js +2 -0
- package/build/transaction/browser/types/Unisat.js.map +1 -0
- package/build/transaction/browser/types/Xverse.d.ts +1 -0
- package/build/transaction/browser/types/Xverse.d.ts.map +1 -0
- package/build/transaction/browser/types/Xverse.js +1 -0
- package/build/transaction/browser/types/Xverse.js.map +1 -0
- package/build/transaction/builders/CancelTransaction.d.ts +31 -6
- package/build/transaction/builders/CancelTransaction.d.ts.map +1 -0
- package/build/transaction/builders/CancelTransaction.js +116 -33
- package/build/transaction/builders/CancelTransaction.js.map +1 -0
- package/build/transaction/builders/ChallengeSolutionTransaction.d.ts +1 -0
- package/build/transaction/builders/ChallengeSolutionTransaction.d.ts.map +1 -0
- package/build/transaction/builders/ChallengeSolutionTransaction.js +88 -0
- package/build/transaction/builders/ChallengeSolutionTransaction.js.map +1 -0
- package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts +140 -13
- package/build/transaction/builders/ConsolidatedInteractionTransaction.d.ts.map +1 -0
- package/build/transaction/builders/ConsolidatedInteractionTransaction.js +197 -20
- package/build/transaction/builders/ConsolidatedInteractionTransaction.js.map +1 -0
- package/build/transaction/builders/CustomScriptTransaction.d.ts +108 -8
- package/build/transaction/builders/CustomScriptTransaction.d.ts.map +1 -0
- package/build/transaction/builders/CustomScriptTransaction.js +176 -39
- package/build/transaction/builders/CustomScriptTransaction.js.map +1 -0
- package/build/transaction/builders/DeploymentTransaction.d.ts +120 -9
- package/build/transaction/builders/DeploymentTransaction.d.ts.map +1 -0
- package/build/transaction/builders/DeploymentTransaction.js +194 -51
- package/build/transaction/builders/DeploymentTransaction.js.map +1 -0
- package/build/transaction/builders/FundingTransaction.d.ts +5 -4
- package/build/transaction/builders/FundingTransaction.d.ts.map +1 -0
- package/build/transaction/builders/FundingTransaction.js +15 -8
- package/build/transaction/builders/FundingTransaction.js.map +1 -0
- package/build/transaction/builders/InteractionTransaction.d.ts +14 -5
- package/build/transaction/builders/InteractionTransaction.d.ts.map +1 -0
- package/build/transaction/builders/InteractionTransaction.js +18 -5
- package/build/transaction/builders/InteractionTransaction.js.map +1 -0
- package/build/transaction/builders/InteractionTransactionP2WDA.d.ts +58 -7
- package/build/transaction/builders/InteractionTransactionP2WDA.d.ts.map +1 -0
- package/build/transaction/builders/InteractionTransactionP2WDA.js +95 -18
- package/build/transaction/builders/InteractionTransactionP2WDA.js.map +1 -0
- package/build/transaction/builders/MultiSignTransaction.d.ts +126 -17
- package/build/transaction/builders/MultiSignTransaction.d.ts.map +1 -0
- package/build/transaction/builders/MultiSignTransaction.js +201 -76
- package/build/transaction/builders/MultiSignTransaction.js.map +1 -0
- package/build/transaction/builders/SharedInteractionTransaction.d.ts +106 -18
- package/build/transaction/builders/SharedInteractionTransaction.d.ts.map +1 -0
- package/build/transaction/builders/SharedInteractionTransaction.js +158 -40
- package/build/transaction/builders/SharedInteractionTransaction.js.map +1 -0
- package/build/transaction/builders/TransactionBuilder.d.ts +249 -19
- package/build/transaction/builders/TransactionBuilder.d.ts.map +1 -0
- package/build/transaction/builders/TransactionBuilder.js +375 -60
- package/build/transaction/builders/TransactionBuilder.js.map +1 -0
- package/build/transaction/enums/TransactionType.d.ts +1 -0
- package/build/transaction/enums/TransactionType.d.ts.map +1 -0
- package/build/transaction/enums/TransactionType.js +1 -0
- package/build/transaction/enums/TransactionType.js.map +1 -0
- package/build/transaction/interfaces/ICancelTransactionParameters.d.ts +3 -2
- package/build/transaction/interfaces/ICancelTransactionParameters.d.ts.map +1 -0
- package/build/transaction/interfaces/ICancelTransactionParameters.js +1 -0
- package/build/transaction/interfaces/ICancelTransactionParameters.js.map +1 -0
- package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts +48 -5
- package/build/transaction/interfaces/IConsolidatedTransactionParameters.d.ts.map +1 -0
- package/build/transaction/interfaces/IConsolidatedTransactionParameters.js +1 -0
- package/build/transaction/interfaces/IConsolidatedTransactionParameters.js.map +1 -0
- package/build/transaction/interfaces/ICustomTransactionParameters.d.ts +7 -5
- package/build/transaction/interfaces/ICustomTransactionParameters.d.ts.map +1 -0
- package/build/transaction/interfaces/ICustomTransactionParameters.js +1 -0
- package/build/transaction/interfaces/ICustomTransactionParameters.js.map +1 -0
- package/build/transaction/interfaces/ITransactionParameters.d.ts +27 -15
- package/build/transaction/interfaces/ITransactionParameters.d.ts.map +1 -0
- package/build/transaction/interfaces/ITransactionParameters.js +1 -0
- package/build/transaction/interfaces/ITransactionParameters.js.map +1 -0
- package/build/transaction/interfaces/ITransactionResponses.d.ts +3 -2
- package/build/transaction/interfaces/ITransactionResponses.d.ts.map +1 -0
- package/build/transaction/interfaces/ITransactionResponses.js +1 -0
- package/build/transaction/interfaces/ITransactionResponses.js.map +1 -0
- package/build/transaction/interfaces/ITweakedTransactionData.d.ts +21 -8
- package/build/transaction/interfaces/ITweakedTransactionData.d.ts.map +1 -0
- package/build/transaction/interfaces/ITweakedTransactionData.js +1 -0
- package/build/transaction/interfaces/ITweakedTransactionData.js.map +1 -0
- package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts +29 -3
- package/build/transaction/interfaces/IWeb3ProviderTypes.d.ts.map +1 -0
- package/build/transaction/interfaces/IWeb3ProviderTypes.js +2 -1
- package/build/transaction/interfaces/IWeb3ProviderTypes.js.map +1 -0
- package/build/transaction/interfaces/Tap.d.ts +4 -3
- package/build/transaction/interfaces/Tap.d.ts.map +1 -0
- package/build/transaction/interfaces/Tap.js +1 -0
- package/build/transaction/interfaces/Tap.js.map +1 -0
- package/build/transaction/mineable/IP2WSHAddress.d.ts +2 -1
- package/build/transaction/mineable/IP2WSHAddress.d.ts.map +1 -0
- package/build/transaction/mineable/IP2WSHAddress.js +1 -0
- package/build/transaction/mineable/IP2WSHAddress.js.map +1 -0
- package/build/transaction/mineable/TimelockGenerator.d.ts +13 -4
- package/build/transaction/mineable/TimelockGenerator.d.ts.map +1 -0
- package/build/transaction/mineable/TimelockGenerator.js +12 -3
- package/build/transaction/mineable/TimelockGenerator.js.map +1 -0
- package/build/transaction/offline/OfflineTransactionManager.d.ts +193 -12
- package/build/transaction/offline/OfflineTransactionManager.d.ts.map +1 -0
- package/build/transaction/offline/OfflineTransactionManager.js +192 -8
- package/build/transaction/offline/OfflineTransactionManager.js.map +1 -0
- package/build/transaction/offline/TransactionReconstructor.d.ts +56 -6
- package/build/transaction/offline/TransactionReconstructor.d.ts.map +1 -0
- package/build/transaction/offline/TransactionReconstructor.js +111 -75
- package/build/transaction/offline/TransactionReconstructor.js.map +1 -0
- package/build/transaction/offline/TransactionSerializer.d.ts +54 -3
- package/build/transaction/offline/TransactionSerializer.d.ts.map +1 -0
- package/build/transaction/offline/TransactionSerializer.js +206 -95
- package/build/transaction/offline/TransactionSerializer.js.map +1 -0
- package/build/transaction/offline/TransactionStateCapture.d.ts +66 -7
- package/build/transaction/offline/TransactionStateCapture.d.ts.map +1 -0
- package/build/transaction/offline/TransactionStateCapture.js +124 -60
- package/build/transaction/offline/TransactionStateCapture.js.map +1 -0
- package/build/transaction/offline/interfaces/ISerializableState.d.ts +72 -1
- package/build/transaction/offline/interfaces/ISerializableState.d.ts.map +1 -0
- package/build/transaction/offline/interfaces/ISerializableState.js +10 -1
- package/build/transaction/offline/interfaces/ISerializableState.js.map +1 -0
- package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts +77 -1
- package/build/transaction/offline/interfaces/ITypeSpecificData.d.ts.map +1 -0
- package/build/transaction/offline/interfaces/ITypeSpecificData.js +19 -0
- package/build/transaction/offline/interfaces/ITypeSpecificData.js.map +1 -0
- package/build/transaction/psbt/PSBTTypes.d.ts +1 -0
- package/build/transaction/psbt/PSBTTypes.d.ts.map +1 -0
- package/build/transaction/psbt/PSBTTypes.js +1 -0
- package/build/transaction/psbt/PSBTTypes.js.map +1 -0
- package/build/transaction/shared/P2TR_MS.d.ts +11 -2
- package/build/transaction/shared/P2TR_MS.d.ts.map +1 -0
- package/build/transaction/shared/P2TR_MS.js +10 -0
- package/build/transaction/shared/P2TR_MS.js.map +1 -0
- package/build/transaction/shared/TweakedTransaction.d.ts +281 -38
- package/build/transaction/shared/TweakedTransaction.d.ts.map +1 -0
- package/build/transaction/shared/TweakedTransaction.js +576 -114
- package/build/transaction/shared/TweakedTransaction.js.map +1 -0
- package/build/transaction/utils/WitnessUtils.d.ts +7 -1
- package/build/transaction/utils/WitnessUtils.d.ts.map +1 -0
- package/build/transaction/utils/WitnessUtils.js +17 -3
- package/build/transaction/utils/WitnessUtils.js.map +1 -0
- package/build/tsconfig.build.tsbuildinfo +1 -1
- package/build/utils/BitcoinUtils.d.ts +19 -0
- package/build/utils/BitcoinUtils.d.ts.map +1 -0
- package/build/utils/BitcoinUtils.js +19 -0
- package/build/utils/BitcoinUtils.js.map +1 -0
- package/build/utils/BufferHelper.d.ts +2 -1
- package/build/utils/BufferHelper.d.ts.map +1 -0
- package/build/utils/BufferHelper.js +38 -32
- package/build/utils/BufferHelper.js.map +1 -0
- package/build/utils/StringToBuffer.d.ts +1 -0
- package/build/utils/StringToBuffer.d.ts.map +1 -0
- package/build/utils/StringToBuffer.js +1 -0
- package/build/utils/StringToBuffer.js.map +1 -0
- package/build/utils/lengths.d.ts +1 -0
- package/build/utils/lengths.d.ts.map +1 -0
- package/build/utils/lengths.js +1 -0
- package/build/utils/lengths.js.map +1 -0
- package/build/utils/types.d.ts +1 -0
- package/build/utils/types.d.ts.map +1 -0
- package/build/utils/types.js +2 -1
- package/build/utils/types.js.map +1 -0
- package/build/utxo/OPNetLimitedProvider.d.ts +39 -3
- package/build/utxo/OPNetLimitedProvider.d.ts.map +1 -0
- package/build/utxo/OPNetLimitedProvider.js +43 -5
- package/build/utxo/OPNetLimitedProvider.js.map +1 -0
- package/build/utxo/interfaces/BroadcastResponse.d.ts +1 -0
- package/build/utxo/interfaces/BroadcastResponse.d.ts.map +1 -0
- package/build/utxo/interfaces/BroadcastResponse.js +1 -0
- package/build/utxo/interfaces/BroadcastResponse.js.map +1 -0
- package/build/utxo/interfaces/IUTXO.d.ts +13 -7
- package/build/utxo/interfaces/IUTXO.d.ts.map +1 -0
- package/build/utxo/interfaces/IUTXO.js +1 -0
- package/build/utxo/interfaces/IUTXO.js.map +1 -0
- package/build/verification/TapscriptVerificator.d.ts +12 -10
- package/build/verification/TapscriptVerificator.d.ts.map +1 -0
- package/build/verification/TapscriptVerificator.js +28 -38
- package/build/verification/TapscriptVerificator.js.map +1 -0
- package/eslint.config.js +0 -1
- package/package.json +12 -35
- package/src/abi/ABICoder.ts +0 -13
- package/src/branded/Branded.ts +5 -0
- package/src/buffer/BinaryReader.ts +7 -7
- package/src/buffer/BinaryWriter.ts +29 -24
- package/src/bytecode/Compressor.ts +1 -1
- package/src/chain/ChainData.ts +34 -27
- package/src/consensus/ConsensusConfig.ts +1 -1
- package/src/consensus/IConsensusConfig.ts +0 -17
- package/src/consensus/metadata/RoswellConsensus.ts +1 -17
- package/src/deterministic/AddressMap.ts +5 -1
- package/src/deterministic/AddressSet.ts +5 -1
- package/src/deterministic/CustomMap.ts +6 -2
- package/src/deterministic/DeterministicMap.ts +8 -4
- package/src/deterministic/DeterministicSet.ts +6 -2
- package/src/deterministic/ExtendedAddressMap.ts +9 -4
- package/src/deterministic/FastMap.ts +9 -5
- package/src/ecc/backend.ts +17 -0
- package/src/epoch/ChallengeSolution.ts +3 -3
- package/src/epoch/interfaces/IChallengeSolution.ts +13 -13
- package/src/epoch/validator/EpochValidator.ts +24 -43
- package/src/generators/AddressGenerator.ts +4 -7
- package/src/generators/Features.ts +3 -3
- package/src/generators/Generator.ts +42 -26
- package/src/generators/builders/CalldataGenerator.ts +26 -24
- package/src/generators/builders/CustomGenerator.ts +4 -4
- package/src/generators/builders/DeploymentGenerator.ts +25 -23
- package/src/generators/builders/HashCommitmentGenerator.ts +31 -31
- package/src/generators/builders/LegacyCalldataGenerator.ts +26 -24
- package/src/generators/builders/MultiSignGenerator.ts +12 -12
- package/src/generators/builders/P2WDAGenerator.ts +10 -10
- package/src/keypair/Address.ts +114 -71
- package/src/keypair/AddressVerificator.ts +14 -148
- package/src/keypair/EcKeyPair.ts +104 -116
- package/src/keypair/MessageSigner.ts +70 -150
- package/src/keypair/Wallet.ts +56 -241
- package/src/metadata/ContractBaseMetadata.ts +2 -2
- package/src/mnemonic/Mnemonic.ts +31 -222
- package/src/opnet.ts +12 -6
- package/src/p2wda/P2WDADetector.ts +23 -72
- package/src/polyfill/disposable.ts +29 -0
- package/src/signer/AddressRotation.ts +1 -1
- package/src/signer/IRotationSigner.ts +3 -3
- package/src/signer/ParallelSignerAdapter.ts +59 -0
- package/src/signer/SignerUtils.ts +4 -4
- package/src/signer/TweakedSigner.ts +26 -14
- package/src/transaction/ContractAddress.ts +3 -7
- package/src/transaction/TransactionFactory.ts +28 -50
- package/src/transaction/browser/BrowserSignerBase.ts +12 -6
- package/src/transaction/browser/Web3Provider.ts +3 -3
- package/src/transaction/browser/extensions/UnisatSigner.ts +52 -48
- package/src/transaction/browser/extensions/XverseSigner.ts +55 -38
- package/src/transaction/browser/types/OPWallet.ts +2 -2
- package/src/transaction/browser/types/Unisat.ts +1 -1
- package/src/transaction/builders/CancelTransaction.ts +59 -24
- package/src/transaction/builders/ChallengeSolutionTransaction.ts +3 -3
- package/src/transaction/builders/ConsolidatedInteractionTransaction.ts +39 -34
- package/src/transaction/builders/CustomScriptTransaction.ts +79 -56
- package/src/transaction/builders/DeploymentTransaction.ts +82 -63
- package/src/transaction/builders/FundingTransaction.ts +11 -11
- package/src/transaction/builders/InteractionTransaction.ts +10 -10
- package/src/transaction/builders/InteractionTransactionP2WDA.ts +38 -40
- package/src/transaction/builders/MultiSignTransaction.ts +68 -61
- package/src/transaction/builders/SharedInteractionTransaction.ts +81 -57
- package/src/transaction/builders/TransactionBuilder.ts +99 -81
- package/src/transaction/interfaces/ICancelTransactionParameters.ts +2 -2
- package/src/transaction/interfaces/IConsolidatedTransactionParameters.ts +5 -5
- package/src/transaction/interfaces/ICustomTransactionParameters.ts +5 -5
- package/src/transaction/interfaces/ITransactionParameters.ts +15 -15
- package/src/transaction/interfaces/ITransactionResponses.ts +2 -2
- package/src/transaction/interfaces/ITweakedTransactionData.ts +17 -8
- package/src/transaction/interfaces/IWeb3ProviderTypes.ts +3 -3
- package/src/transaction/interfaces/Tap.ts +3 -3
- package/src/transaction/mineable/IP2WSHAddress.ts +1 -1
- package/src/transaction/mineable/TimelockGenerator.ts +19 -12
- package/src/transaction/offline/OfflineTransactionManager.ts +22 -23
- package/src/transaction/offline/TransactionReconstructor.ts +83 -91
- package/src/transaction/offline/TransactionSerializer.ts +151 -101
- package/src/transaction/offline/TransactionStateCapture.ts +83 -79
- package/src/transaction/offline/interfaces/ISerializableState.ts +1 -1
- package/src/transaction/offline/interfaces/ITypeSpecificData.ts +1 -1
- package/src/transaction/shared/P2TR_MS.ts +4 -4
- package/src/transaction/shared/TweakedTransaction.ts +326 -124
- package/src/transaction/utils/WitnessUtils.ts +18 -9
- package/src/utils/BufferHelper.ts +39 -37
- package/src/utxo/OPNetLimitedProvider.ts +9 -9
- package/src/utxo/interfaces/IUTXO.ts +7 -7
- package/src/verification/TapscriptVerificator.ts +73 -86
- package/test/address-rotation.test.ts +24 -24
- package/test/address.test.ts +12 -12
- package/test/addressmap.test.ts +30 -30
- package/test/binary-reader-writer.test.ts +8 -8
- package/test/browser/offline-transaction.test.ts +2206 -0
- package/test/browser/parallel-signing.test.ts +316 -0
- package/test/browser/setup.ts +11 -0
- package/test/browser/transaction-signing.test.ts +416 -0
- package/test/buffer-helper.test.ts +287 -0
- package/test/derivePath.test.ts +4 -3
- package/test/disposable.test.ts +279 -0
- package/test/fastmap-setall.test.ts +1 -1
- package/test/fastmap.test.ts +3 -3
- package/test/messagesigner-mldsa.test.ts +3 -3
- package/test/messagesigner-schnorr.test.ts +9 -9
- package/test/offline-transaction.test.ts +461 -288
- package/test/old/FastBigIntMap.ts +3 -3
- package/test/oldfastmap.test.ts +6 -6
- package/test/transaction-builders.test.ts +321 -0
- package/tsconfig.base.json +34 -18
- package/tsconfig.browser.json +15 -0
- package/tsconfig.json +3 -8
- package/vite.config.browser.ts +4 -5
- package/vitest.config.browser.ts +68 -0
- package/vitest.config.ts +1 -1
- package/browser/valibot.js +0 -4948
- package/tsconfig.webpack.json +0 -18
package/browser/noble-hashes.js
CHANGED
|
@@ -1,113 +1,112 @@
|
|
|
1
|
-
|
|
2
|
-
function x0(t) {
|
|
1
|
+
function t0(t) {
|
|
3
2
|
return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
|
|
4
3
|
}
|
|
5
|
-
function
|
|
6
|
-
if (!
|
|
4
|
+
function Zt(t, ...e) {
|
|
5
|
+
if (!t0(t))
|
|
7
6
|
throw new Error("Uint8Array expected");
|
|
8
7
|
if (e.length > 0 && !e.includes(t.length))
|
|
9
8
|
throw new Error("Uint8Array expected of length " + e + ", got length=" + t.length);
|
|
10
9
|
}
|
|
11
|
-
function
|
|
10
|
+
function ee(t, e = !0) {
|
|
12
11
|
if (t.destroyed)
|
|
13
12
|
throw new Error("Hash instance has been destroyed");
|
|
14
13
|
if (e && t.finished)
|
|
15
14
|
throw new Error("Hash#digest() has already been called");
|
|
16
15
|
}
|
|
17
|
-
function
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
if (t.length <
|
|
21
|
-
throw new Error("digestInto() expects output buffer of length at least " +
|
|
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);
|
|
22
21
|
}
|
|
23
|
-
function
|
|
22
|
+
function Yt(...t) {
|
|
24
23
|
for (let e = 0; e < t.length; e++)
|
|
25
24
|
t[e].fill(0);
|
|
26
25
|
}
|
|
27
|
-
function
|
|
26
|
+
function qt(t) {
|
|
28
27
|
return new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
29
28
|
}
|
|
30
|
-
function
|
|
29
|
+
function rt(t, e) {
|
|
31
30
|
return t << 32 - e | t >>> e;
|
|
32
31
|
}
|
|
33
|
-
function
|
|
32
|
+
function s0(t) {
|
|
34
33
|
if (typeof t != "string")
|
|
35
34
|
throw new Error("string expected");
|
|
36
35
|
return new Uint8Array(new TextEncoder().encode(t));
|
|
37
36
|
}
|
|
38
|
-
function
|
|
39
|
-
return typeof t == "string" && (t =
|
|
37
|
+
function Ie(t) {
|
|
38
|
+
return typeof t == "string" && (t = s0(t)), Zt(t), t;
|
|
40
39
|
}
|
|
41
|
-
class
|
|
40
|
+
class n0 {
|
|
42
41
|
}
|
|
43
|
-
function
|
|
44
|
-
const e = (
|
|
45
|
-
return e.outputLen =
|
|
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;
|
|
46
45
|
}
|
|
47
|
-
function
|
|
46
|
+
function i0(t, e, s, o) {
|
|
48
47
|
if (typeof t.setBigUint64 == "function")
|
|
49
|
-
return t.setBigUint64(e,
|
|
50
|
-
const
|
|
51
|
-
t.setUint32(e +
|
|
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);
|
|
52
51
|
}
|
|
53
|
-
function
|
|
54
|
-
return t & e ^ ~t &
|
|
52
|
+
function c0(t, e, s) {
|
|
53
|
+
return t & e ^ ~t & s;
|
|
55
54
|
}
|
|
56
|
-
function
|
|
57
|
-
return t & e ^ t &
|
|
55
|
+
function o0(t, e, s) {
|
|
56
|
+
return t & e ^ t & s ^ e & s;
|
|
58
57
|
}
|
|
59
|
-
let
|
|
60
|
-
constructor(e,
|
|
61
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = e, this.outputLen =
|
|
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);
|
|
62
61
|
}
|
|
63
62
|
update(e) {
|
|
64
|
-
|
|
65
|
-
const { view:
|
|
66
|
-
for (let r = 0; r <
|
|
67
|
-
const a = Math.min(
|
|
68
|
-
if (a ===
|
|
69
|
-
const
|
|
70
|
-
for (;
|
|
71
|
-
this.process(
|
|
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);
|
|
72
71
|
continue;
|
|
73
72
|
}
|
|
74
|
-
|
|
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);
|
|
75
74
|
}
|
|
76
75
|
return this.length += e.length, this.roundClean(), this;
|
|
77
76
|
}
|
|
78
77
|
digestInto(e) {
|
|
79
|
-
|
|
80
|
-
const { buffer:
|
|
78
|
+
ee(this), e0(e, this), this.finished = !0;
|
|
79
|
+
const { buffer: s, view: o, blockLen: i, isLE: c } = this;
|
|
81
80
|
let { pos: r } = this;
|
|
82
|
-
|
|
83
|
-
for (let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
const a =
|
|
87
|
-
if (
|
|
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)
|
|
88
87
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
89
|
-
const x =
|
|
88
|
+
const x = d / 4, H = this.get();
|
|
90
89
|
if (x > H.length)
|
|
91
90
|
throw new Error("_sha2: outputLen bigger than state");
|
|
92
|
-
for (let
|
|
93
|
-
a.setUint32(4 *
|
|
91
|
+
for (let f = 0; f < x; f++)
|
|
92
|
+
a.setUint32(4 * f, H[f], c);
|
|
94
93
|
}
|
|
95
94
|
digest() {
|
|
96
|
-
const { buffer: e, outputLen:
|
|
95
|
+
const { buffer: e, outputLen: s } = this;
|
|
97
96
|
this.digestInto(e);
|
|
98
|
-
const
|
|
99
|
-
return this.destroy(),
|
|
97
|
+
const o = e.slice(0, s);
|
|
98
|
+
return this.destroy(), o;
|
|
100
99
|
}
|
|
101
100
|
_cloneInto(e) {
|
|
102
101
|
e || (e = new this.constructor()), e.set(...this.get());
|
|
103
|
-
const { blockLen:
|
|
104
|
-
return e.destroyed = r, e.finished =
|
|
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;
|
|
105
104
|
}
|
|
106
105
|
clone() {
|
|
107
106
|
return this._cloneInto();
|
|
108
107
|
}
|
|
109
108
|
};
|
|
110
|
-
const
|
|
109
|
+
const dt = /* @__PURE__ */ Uint32Array.from([
|
|
111
110
|
1779033703,
|
|
112
111
|
3144134277,
|
|
113
112
|
1013904242,
|
|
@@ -116,7 +115,7 @@ const yt = /* @__PURE__ */ Uint32Array.from([
|
|
|
116
115
|
2600822924,
|
|
117
116
|
528734635,
|
|
118
117
|
1541459225
|
|
119
|
-
]),
|
|
118
|
+
]), h0 = /* @__PURE__ */ Uint32Array.from([
|
|
120
119
|
1116352408,
|
|
121
120
|
1899447441,
|
|
122
121
|
3049323471,
|
|
@@ -181,183 +180,246 @@ const yt = /* @__PURE__ */ Uint32Array.from([
|
|
|
181
180
|
2756734187,
|
|
182
181
|
3204031479,
|
|
183
182
|
3329325298
|
|
184
|
-
]),
|
|
185
|
-
class
|
|
183
|
+
]), ut = /* @__PURE__ */ new Uint32Array(64);
|
|
184
|
+
class f0 extends a0 {
|
|
186
185
|
constructor(e = 32) {
|
|
187
|
-
super(64, e, 8, !1), this.A =
|
|
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;
|
|
188
187
|
}
|
|
189
188
|
get() {
|
|
190
|
-
const { A: e, B:
|
|
191
|
-
return [e,
|
|
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];
|
|
192
191
|
}
|
|
193
192
|
// prettier-ignore
|
|
194
|
-
set(e,
|
|
195
|
-
this.A = e | 0, this.B =
|
|
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;
|
|
196
195
|
}
|
|
197
|
-
process(e,
|
|
198
|
-
for (let
|
|
199
|
-
|
|
200
|
-
for (let
|
|
201
|
-
const
|
|
202
|
-
|
|
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;
|
|
203
202
|
}
|
|
204
|
-
let { A:
|
|
205
|
-
for (let
|
|
206
|
-
const
|
|
207
|
-
H = x, x =
|
|
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;
|
|
208
207
|
}
|
|
209
|
-
|
|
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);
|
|
210
209
|
}
|
|
211
210
|
roundClean() {
|
|
212
|
-
|
|
211
|
+
Yt(ut);
|
|
213
212
|
}
|
|
214
213
|
destroy() {
|
|
215
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0),
|
|
214
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), Yt(this.buffer);
|
|
216
215
|
}
|
|
217
216
|
}
|
|
218
|
-
const
|
|
219
|
-
function
|
|
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) {
|
|
220
246
|
return t instanceof Uint8Array || ArrayBuffer.isView(t) && t.constructor.name === "Uint8Array";
|
|
221
247
|
}
|
|
222
|
-
function
|
|
248
|
+
function Gt(t, e = "") {
|
|
223
249
|
if (!Number.isSafeInteger(t) || t < 0) {
|
|
224
|
-
const
|
|
225
|
-
throw new Error(`${
|
|
250
|
+
const s = e && `"${e}" `;
|
|
251
|
+
throw new Error(`${s}expected integer >= 0, got ${t}`);
|
|
226
252
|
}
|
|
227
253
|
}
|
|
228
|
-
function
|
|
229
|
-
const
|
|
230
|
-
if (!
|
|
231
|
-
const r =
|
|
232
|
-
throw new Error(r + "expected Uint8Array" + a + ", got " +
|
|
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);
|
|
233
259
|
}
|
|
234
260
|
return t;
|
|
235
261
|
}
|
|
236
|
-
function
|
|
262
|
+
function l0(t) {
|
|
237
263
|
if (typeof t != "function" || typeof t.create != "function")
|
|
238
264
|
throw new Error("Hash must wrapped by utils.createHasher");
|
|
239
|
-
|
|
265
|
+
Gt(t.outputLen), Gt(t.blockLen);
|
|
240
266
|
}
|
|
241
|
-
function
|
|
267
|
+
function mt(t, e = !0) {
|
|
242
268
|
if (t.destroyed)
|
|
243
269
|
throw new Error("Hash instance has been destroyed");
|
|
244
270
|
if (e && t.finished)
|
|
245
271
|
throw new Error("Hash#digest() has already been called");
|
|
246
272
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
const
|
|
250
|
-
if (t.length <
|
|
251
|
-
throw new Error('"digestInto() output" expected to be of length >=' +
|
|
273
|
+
function Le(t, e) {
|
|
274
|
+
_t(t, void 0, "digestInto() output");
|
|
275
|
+
const s = e.outputLen;
|
|
276
|
+
if (t.length < s)
|
|
277
|
+
throw new Error('"digestInto() output" expected to be of length >=' + s);
|
|
252
278
|
}
|
|
253
|
-
function
|
|
279
|
+
function b0(t) {
|
|
254
280
|
return new Uint32Array(t.buffer, t.byteOffset, Math.floor(t.byteLength / 4));
|
|
255
281
|
}
|
|
256
|
-
function
|
|
282
|
+
function tt(...t) {
|
|
257
283
|
for (let e = 0; e < t.length; e++)
|
|
258
284
|
t[e].fill(0);
|
|
259
285
|
}
|
|
260
286
|
function Kt(t) {
|
|
261
287
|
return new DataView(t.buffer, t.byteOffset, t.byteLength);
|
|
262
288
|
}
|
|
263
|
-
function
|
|
289
|
+
function it(t, e) {
|
|
264
290
|
return t << 32 - e | t >>> e;
|
|
265
291
|
}
|
|
266
|
-
function
|
|
292
|
+
function yt(t, e) {
|
|
267
293
|
return t << e | t >>> 32 - e >>> 0;
|
|
268
294
|
}
|
|
269
|
-
const
|
|
270
|
-
function
|
|
295
|
+
const x0 = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
296
|
+
function H0(t) {
|
|
271
297
|
return t << 24 & 4278190080 | t << 8 & 16711680 | t >>> 8 & 65280 | t >>> 24 & 255;
|
|
272
298
|
}
|
|
273
|
-
function
|
|
299
|
+
function A0(t) {
|
|
274
300
|
for (let e = 0; e < t.length; e++)
|
|
275
|
-
t[e] =
|
|
301
|
+
t[e] = H0(t[e]);
|
|
276
302
|
return t;
|
|
277
303
|
}
|
|
278
|
-
const
|
|
279
|
-
function
|
|
280
|
-
if (
|
|
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)
|
|
281
307
|
return t.toHex();
|
|
282
308
|
let e = "";
|
|
283
|
-
for (let
|
|
284
|
-
e +=
|
|
309
|
+
for (let s = 0; s < t.length; s++)
|
|
310
|
+
e += p0[t[s]];
|
|
285
311
|
return e;
|
|
286
312
|
}
|
|
287
|
-
const
|
|
288
|
-
function
|
|
289
|
-
if (t >=
|
|
290
|
-
return t -
|
|
291
|
-
if (t >=
|
|
292
|
-
return t - (
|
|
293
|
-
if (t >=
|
|
294
|
-
return t - (
|
|
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);
|
|
295
321
|
}
|
|
296
|
-
function
|
|
322
|
+
function ys(t) {
|
|
297
323
|
if (typeof t != "string")
|
|
298
324
|
throw new Error("hex string expected, got " + typeof t);
|
|
299
|
-
if (
|
|
325
|
+
if (me)
|
|
300
326
|
return Uint8Array.fromHex(t);
|
|
301
|
-
const e = t.length,
|
|
327
|
+
const e = t.length, s = e / 2;
|
|
302
328
|
if (e % 2)
|
|
303
329
|
throw new Error("hex string expected, got unpadded hex of length " + e);
|
|
304
|
-
const
|
|
305
|
-
for (let
|
|
306
|
-
const 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));
|
|
307
333
|
if (r === void 0 || a === void 0) {
|
|
308
|
-
const
|
|
309
|
-
throw new Error('hex string expected, got non-hex character "' +
|
|
334
|
+
const d = t[c] + t[c + 1];
|
|
335
|
+
throw new Error('hex string expected, got non-hex character "' + d + '" at index ' + c);
|
|
310
336
|
}
|
|
311
|
-
|
|
337
|
+
o[i] = r * 16 + a;
|
|
312
338
|
}
|
|
313
|
-
return
|
|
314
|
-
}
|
|
315
|
-
function D0(t) {
|
|
316
|
-
if (typeof t != "string")
|
|
317
|
-
throw new Error("string expected");
|
|
318
|
-
return new Uint8Array(new TextEncoder().encode(t));
|
|
319
|
-
}
|
|
320
|
-
function ue(t, e = "") {
|
|
321
|
-
return typeof t == "string" ? D0(t) : Ht(t, void 0, e);
|
|
339
|
+
return o;
|
|
322
340
|
}
|
|
323
|
-
function
|
|
341
|
+
function _s(...t) {
|
|
324
342
|
let e = 0;
|
|
325
|
-
for (let
|
|
326
|
-
const
|
|
327
|
-
|
|
343
|
+
for (let o = 0; o < t.length; o++) {
|
|
344
|
+
const i = t[o];
|
|
345
|
+
_t(i), e += i.length;
|
|
328
346
|
}
|
|
329
|
-
const
|
|
330
|
-
for (let
|
|
331
|
-
const
|
|
332
|
-
|
|
347
|
+
const s = new Uint8Array(e);
|
|
348
|
+
for (let o = 0, i = 0; o < t.length; o++) {
|
|
349
|
+
const c = t[o];
|
|
350
|
+
s.set(c, i), i += c.length;
|
|
333
351
|
}
|
|
334
|
-
return
|
|
352
|
+
return s;
|
|
335
353
|
}
|
|
336
|
-
function
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
return Object.assign(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);
|
|
340
357
|
}
|
|
341
|
-
function
|
|
342
|
-
const n = (c, i) => t(i).update(c).digest(), h = t(void 0);
|
|
343
|
-
return n.outputLen = h.outputLen, n.blockLen = h.blockLen, n.create = (c) => t(c), Object.assign(n, e), Object.freeze(n);
|
|
344
|
-
}
|
|
345
|
-
function Rs(t = 32) {
|
|
358
|
+
function gs(t = 32) {
|
|
346
359
|
const e = typeof globalThis == "object" ? globalThis.crypto : null;
|
|
347
360
|
if (typeof e?.getRandomValues != "function")
|
|
348
361
|
throw new Error("crypto.getRandomValues must be defined");
|
|
349
362
|
return e.getRandomValues(new Uint8Array(t));
|
|
350
363
|
}
|
|
351
|
-
const
|
|
364
|
+
const gt = (t) => ({
|
|
352
365
|
oid: Uint8Array.from([6, 9, 96, 134, 72, 1, 101, 3, 4, 2, t])
|
|
353
366
|
});
|
|
354
|
-
|
|
355
|
-
|
|
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
|
+
}
|
|
408
|
+
}
|
|
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) {
|
|
417
|
+
return t & e ^ ~t & s;
|
|
356
418
|
}
|
|
357
|
-
function
|
|
358
|
-
return t & e ^ t &
|
|
419
|
+
function Ee(t, e, s) {
|
|
420
|
+
return t & e ^ t & s ^ e & s;
|
|
359
421
|
}
|
|
360
|
-
class
|
|
422
|
+
class kt {
|
|
361
423
|
blockLen;
|
|
362
424
|
outputLen;
|
|
363
425
|
padOffset;
|
|
@@ -369,57 +431,57 @@ class Gt {
|
|
|
369
431
|
length = 0;
|
|
370
432
|
pos = 0;
|
|
371
433
|
destroyed = !1;
|
|
372
|
-
constructor(e,
|
|
373
|
-
this.blockLen = e, this.outputLen =
|
|
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);
|
|
374
436
|
}
|
|
375
437
|
update(e) {
|
|
376
|
-
|
|
377
|
-
const { view:
|
|
378
|
-
for (let r = 0; r <
|
|
379
|
-
const a = Math.min(
|
|
380
|
-
if (a ===
|
|
381
|
-
const
|
|
382
|
-
for (;
|
|
383
|
-
this.process(
|
|
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);
|
|
384
446
|
continue;
|
|
385
447
|
}
|
|
386
|
-
|
|
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);
|
|
387
449
|
}
|
|
388
450
|
return this.length += e.length, this.roundClean(), this;
|
|
389
451
|
}
|
|
390
452
|
digestInto(e) {
|
|
391
|
-
|
|
392
|
-
const { buffer:
|
|
453
|
+
mt(this), Le(e, this), this.finished = !0;
|
|
454
|
+
const { buffer: s, view: o, blockLen: i, isLE: c } = this;
|
|
393
455
|
let { pos: r } = this;
|
|
394
|
-
|
|
395
|
-
for (let
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const a = Kt(e),
|
|
399
|
-
if (
|
|
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)
|
|
400
462
|
throw new Error("_sha2: outputLen must be aligned to 32bit");
|
|
401
|
-
const x =
|
|
463
|
+
const x = d / 4, H = this.get();
|
|
402
464
|
if (x > H.length)
|
|
403
465
|
throw new Error("_sha2: outputLen bigger than state");
|
|
404
|
-
for (let
|
|
405
|
-
a.setUint32(4 *
|
|
466
|
+
for (let f = 0; f < x; f++)
|
|
467
|
+
a.setUint32(4 * f, H[f], c);
|
|
406
468
|
}
|
|
407
469
|
digest() {
|
|
408
|
-
const { buffer: e, outputLen:
|
|
470
|
+
const { buffer: e, outputLen: s } = this;
|
|
409
471
|
this.digestInto(e);
|
|
410
|
-
const
|
|
411
|
-
return this.destroy(),
|
|
472
|
+
const o = e.slice(0, s);
|
|
473
|
+
return this.destroy(), o;
|
|
412
474
|
}
|
|
413
475
|
_cloneInto(e) {
|
|
414
476
|
e ||= new this.constructor(), e.set(...this.get());
|
|
415
|
-
const { blockLen:
|
|
416
|
-
return e.destroyed = r, e.finished =
|
|
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;
|
|
417
479
|
}
|
|
418
480
|
clone() {
|
|
419
481
|
return this._cloneInto();
|
|
420
482
|
}
|
|
421
483
|
}
|
|
422
|
-
const
|
|
484
|
+
const lt = /* @__PURE__ */ Uint32Array.from([
|
|
423
485
|
1779033703,
|
|
424
486
|
3144134277,
|
|
425
487
|
1013904242,
|
|
@@ -428,7 +490,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
|
|
|
428
490
|
2600822924,
|
|
429
491
|
528734635,
|
|
430
492
|
1541459225
|
|
431
|
-
]),
|
|
493
|
+
]), bt = /* @__PURE__ */ Uint32Array.from([
|
|
432
494
|
3238371032,
|
|
433
495
|
914150663,
|
|
434
496
|
812702999,
|
|
@@ -437,7 +499,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
|
|
|
437
499
|
1750603025,
|
|
438
500
|
1694076839,
|
|
439
501
|
3204075428
|
|
440
|
-
]),
|
|
502
|
+
]), J = /* @__PURE__ */ Uint32Array.from([
|
|
441
503
|
3418070365,
|
|
442
504
|
3238371032,
|
|
443
505
|
1654270250,
|
|
@@ -454,7 +516,7 @@ const _t = /* @__PURE__ */ Uint32Array.from([
|
|
|
454
516
|
1694076839,
|
|
455
517
|
1203062813,
|
|
456
518
|
3204075428
|
|
457
|
-
]),
|
|
519
|
+
]), Q = /* @__PURE__ */ Uint32Array.from([
|
|
458
520
|
1779033703,
|
|
459
521
|
4089235720,
|
|
460
522
|
3144134277,
|
|
@@ -471,84 +533,84 @@ const _t = /* @__PURE__ */ Uint32Array.from([
|
|
|
471
533
|
4215389547,
|
|
472
534
|
1541459225,
|
|
473
535
|
327033209
|
|
474
|
-
]),
|
|
536
|
+
]), Lt = /* @__PURE__ */ Uint32Array.from([
|
|
475
537
|
1732584193,
|
|
476
538
|
4023233417,
|
|
477
539
|
2562383102,
|
|
478
540
|
271733878,
|
|
479
541
|
3285377520
|
|
480
|
-
]),
|
|
481
|
-
class
|
|
482
|
-
A =
|
|
483
|
-
B =
|
|
484
|
-
C =
|
|
485
|
-
D =
|
|
486
|
-
E =
|
|
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;
|
|
487
549
|
constructor() {
|
|
488
550
|
super(64, 20, 8, !1);
|
|
489
551
|
}
|
|
490
552
|
get() {
|
|
491
|
-
const { A: e, B:
|
|
492
|
-
return [e,
|
|
493
|
-
}
|
|
494
|
-
set(e,
|
|
495
|
-
this.A = e | 0, this.B =
|
|
496
|
-
}
|
|
497
|
-
process(e,
|
|
498
|
-
for (let
|
|
499
|
-
|
|
500
|
-
for (let
|
|
501
|
-
|
|
502
|
-
let { A:
|
|
503
|
-
for (let
|
|
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++) {
|
|
504
566
|
let x, H;
|
|
505
|
-
|
|
506
|
-
const
|
|
507
|
-
a = r, r =
|
|
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;
|
|
508
570
|
}
|
|
509
|
-
|
|
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);
|
|
510
572
|
}
|
|
511
573
|
roundClean() {
|
|
512
|
-
|
|
574
|
+
tt(xt);
|
|
513
575
|
}
|
|
514
576
|
destroy() {
|
|
515
|
-
this.set(0, 0, 0, 0, 0),
|
|
577
|
+
this.set(0, 0, 0, 0, 0), tt(this.buffer);
|
|
516
578
|
}
|
|
517
579
|
}
|
|
518
|
-
const
|
|
519
|
-
class
|
|
520
|
-
A =
|
|
521
|
-
B =
|
|
522
|
-
C =
|
|
523
|
-
D =
|
|
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;
|
|
524
586
|
constructor() {
|
|
525
587
|
super(64, 16, 8, !0);
|
|
526
588
|
}
|
|
527
589
|
get() {
|
|
528
|
-
const { A: e, B:
|
|
529
|
-
return [e,
|
|
590
|
+
const { A: e, B: s, C: o, D: i } = this;
|
|
591
|
+
return [e, s, o, i];
|
|
530
592
|
}
|
|
531
|
-
set(e,
|
|
532
|
-
this.A = e | 0, this.B =
|
|
593
|
+
set(e, s, o, i) {
|
|
594
|
+
this.A = e | 0, this.B = s | 0, this.C = o | 0, this.D = i | 0;
|
|
533
595
|
}
|
|
534
|
-
process(e,
|
|
535
|
-
for (let a = 0; a < 16; a++,
|
|
536
|
-
|
|
537
|
-
let { A:
|
|
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;
|
|
538
600
|
for (let a = 0; a < 64; a++) {
|
|
539
|
-
let
|
|
540
|
-
a < 16 ? (
|
|
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]);
|
|
541
603
|
}
|
|
542
|
-
|
|
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);
|
|
543
605
|
}
|
|
544
606
|
roundClean() {
|
|
545
|
-
|
|
607
|
+
tt(Nt);
|
|
546
608
|
}
|
|
547
609
|
destroy() {
|
|
548
|
-
this.set(0, 0, 0, 0),
|
|
610
|
+
this.set(0, 0, 0, 0), tt(this.buffer);
|
|
549
611
|
}
|
|
550
612
|
}
|
|
551
|
-
const
|
|
613
|
+
const w0 = /* @__PURE__ */ ct(() => new Ce()), B0 = /* @__PURE__ */ Uint8Array.from([
|
|
552
614
|
7,
|
|
553
615
|
4,
|
|
554
616
|
13,
|
|
@@ -565,36 +627,36 @@ const M0 = /* @__PURE__ */ lt(() => new Ne()), G0 = /* @__PURE__ */ Uint8Array.f
|
|
|
565
627
|
14,
|
|
566
628
|
11,
|
|
567
629
|
8
|
|
568
|
-
]),
|
|
569
|
-
const
|
|
570
|
-
for (let
|
|
571
|
-
for (let
|
|
572
|
-
|
|
573
|
-
return
|
|
574
|
-
})(),
|
|
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__ */ [
|
|
575
637
|
[11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
|
|
576
638
|
[12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
|
|
577
639
|
[13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
|
|
578
640
|
[14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
|
|
579
641
|
[15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
|
|
580
|
-
].map((t) => Uint8Array.from(t)),
|
|
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([
|
|
581
643
|
0,
|
|
582
644
|
1518500249,
|
|
583
645
|
1859775393,
|
|
584
646
|
2400959708,
|
|
585
647
|
2840853838
|
|
586
|
-
]),
|
|
648
|
+
]), E0 = /* @__PURE__ */ Uint32Array.from([
|
|
587
649
|
1352829926,
|
|
588
650
|
1548603684,
|
|
589
651
|
1836072691,
|
|
590
652
|
2053994217,
|
|
591
653
|
0
|
|
592
654
|
]);
|
|
593
|
-
function
|
|
594
|
-
return t === 0 ? e ^
|
|
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);
|
|
595
657
|
}
|
|
596
|
-
const
|
|
597
|
-
class
|
|
658
|
+
const Ot = /* @__PURE__ */ new Uint32Array(16);
|
|
659
|
+
class ve extends kt {
|
|
598
660
|
h0 = 1732584193;
|
|
599
661
|
h1 = -271733879;
|
|
600
662
|
h2 = -1732584194;
|
|
@@ -604,63 +666,63 @@ class Ze extends Gt {
|
|
|
604
666
|
super(64, 20, 8, !0);
|
|
605
667
|
}
|
|
606
668
|
get() {
|
|
607
|
-
const { h0: e, h1:
|
|
608
|
-
return [e,
|
|
609
|
-
}
|
|
610
|
-
set(e,
|
|
611
|
-
this.h0 = e | 0, this.h1 =
|
|
612
|
-
}
|
|
613
|
-
process(e,
|
|
614
|
-
for (let
|
|
615
|
-
|
|
616
|
-
let
|
|
617
|
-
for (let
|
|
618
|
-
const
|
|
619
|
-
for (let
|
|
620
|
-
const
|
|
621
|
-
|
|
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;
|
|
622
684
|
}
|
|
623
|
-
for (let
|
|
624
|
-
const
|
|
625
|
-
|
|
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;
|
|
626
688
|
}
|
|
627
689
|
}
|
|
628
|
-
this.set(this.h1 + a + H | 0, this.h2 + x +
|
|
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);
|
|
629
691
|
}
|
|
630
692
|
roundClean() {
|
|
631
|
-
|
|
693
|
+
tt(Ot);
|
|
632
694
|
}
|
|
633
695
|
destroy() {
|
|
634
|
-
this.destroyed = !0,
|
|
696
|
+
this.destroyed = !0, tt(this.buffer), this.set(0, 0, 0, 0, 0);
|
|
635
697
|
}
|
|
636
698
|
}
|
|
637
|
-
const
|
|
699
|
+
const V0 = /* @__PURE__ */ ct(() => new ve()), C0 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
638
700
|
__proto__: null,
|
|
639
|
-
_MD5:
|
|
640
|
-
_RIPEMD160:
|
|
641
|
-
_SHA1:
|
|
642
|
-
md5:
|
|
643
|
-
ripemd160:
|
|
644
|
-
sha1:
|
|
645
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
646
|
-
function
|
|
647
|
-
return e ? { h: Number(t &
|
|
648
|
-
}
|
|
649
|
-
function
|
|
650
|
-
const
|
|
651
|
-
let
|
|
652
|
-
for (let
|
|
653
|
-
const { h: r, l: a } =
|
|
654
|
-
[
|
|
655
|
-
}
|
|
656
|
-
return [
|
|
657
|
-
}
|
|
658
|
-
const
|
|
659
|
-
function
|
|
660
|
-
const
|
|
661
|
-
return { h: t +
|
|
662
|
-
}
|
|
663
|
-
const
|
|
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 };
|
|
710
|
+
}
|
|
711
|
+
function Me(t, e = !1) {
|
|
712
|
+
const s = t.length;
|
|
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];
|
|
717
|
+
}
|
|
718
|
+
return [o, i];
|
|
719
|
+
}
|
|
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 };
|
|
724
|
+
}
|
|
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([
|
|
664
726
|
1116352408,
|
|
665
727
|
1899447441,
|
|
666
728
|
3049323471,
|
|
@@ -725,69 +787,69 @@ const Z0 = (t, e, n) => (t >>> 0) + (e >>> 0) + (n >>> 0), $0 = (t, e, n, h) =>
|
|
|
725
787
|
2756734187,
|
|
726
788
|
3204031479,
|
|
727
789
|
3329325298
|
|
728
|
-
]),
|
|
729
|
-
class
|
|
790
|
+
]), Ht = /* @__PURE__ */ new Uint32Array(64);
|
|
791
|
+
class Ge extends kt {
|
|
730
792
|
constructor(e) {
|
|
731
793
|
super(64, e, 8, !1);
|
|
732
794
|
}
|
|
733
795
|
get() {
|
|
734
|
-
const { A: e, B:
|
|
735
|
-
return [e,
|
|
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];
|
|
736
798
|
}
|
|
737
799
|
// prettier-ignore
|
|
738
|
-
set(e,
|
|
739
|
-
this.A = e | 0, this.B =
|
|
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;
|
|
740
802
|
}
|
|
741
|
-
process(e,
|
|
742
|
-
for (let
|
|
743
|
-
|
|
744
|
-
for (let
|
|
745
|
-
const
|
|
746
|
-
|
|
803
|
+
process(e, s) {
|
|
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;
|
|
747
809
|
}
|
|
748
|
-
let { A:
|
|
749
|
-
for (let
|
|
750
|
-
const
|
|
751
|
-
H = x, x =
|
|
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;
|
|
752
814
|
}
|
|
753
|
-
|
|
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);
|
|
754
816
|
}
|
|
755
817
|
roundClean() {
|
|
756
|
-
|
|
818
|
+
tt(Ht);
|
|
757
819
|
}
|
|
758
820
|
destroy() {
|
|
759
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0),
|
|
821
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), tt(this.buffer);
|
|
760
822
|
}
|
|
761
823
|
}
|
|
762
|
-
class
|
|
824
|
+
class je extends Ge {
|
|
763
825
|
// We cannot use array here since array allows indexing by variable
|
|
764
826
|
// which means optimizer/compiler cannot use registers.
|
|
765
|
-
A =
|
|
766
|
-
B =
|
|
767
|
-
C =
|
|
768
|
-
D =
|
|
769
|
-
E =
|
|
770
|
-
F =
|
|
771
|
-
G =
|
|
772
|
-
H =
|
|
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;
|
|
773
835
|
constructor() {
|
|
774
836
|
super(32);
|
|
775
837
|
}
|
|
776
838
|
}
|
|
777
|
-
class
|
|
778
|
-
A =
|
|
779
|
-
B =
|
|
780
|
-
C =
|
|
781
|
-
D =
|
|
782
|
-
E =
|
|
783
|
-
F =
|
|
784
|
-
G =
|
|
785
|
-
H =
|
|
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;
|
|
786
848
|
constructor() {
|
|
787
849
|
super(28);
|
|
788
850
|
}
|
|
789
851
|
}
|
|
790
|
-
const
|
|
852
|
+
const Re = Me([
|
|
791
853
|
"0x428a2f98d728ae22",
|
|
792
854
|
"0x7137449123ef65cd",
|
|
793
855
|
"0xb5c0fbcfec4d3b2f",
|
|
@@ -868,86 +930,86 @@ const n0 = $e([
|
|
|
868
930
|
"0x597f299cfc657e2a",
|
|
869
931
|
"0x5fcb6fab3ad6faec",
|
|
870
932
|
"0x6c44198c4a475817"
|
|
871
|
-
].map((t) => BigInt(t))),
|
|
872
|
-
class
|
|
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 {
|
|
873
935
|
constructor(e) {
|
|
874
936
|
super(128, e, 16, !1);
|
|
875
937
|
}
|
|
876
938
|
// prettier-ignore
|
|
877
939
|
get() {
|
|
878
|
-
const { Ah: e, Al:
|
|
879
|
-
return [e,
|
|
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];
|
|
880
942
|
}
|
|
881
943
|
// prettier-ignore
|
|
882
|
-
set(e,
|
|
883
|
-
this.Ah = e | 0, this.Al =
|
|
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;
|
|
884
946
|
}
|
|
885
|
-
process(e,
|
|
886
|
-
for (let _ = 0; _ < 16; _++,
|
|
887
|
-
|
|
947
|
+
process(e, s) {
|
|
948
|
+
for (let _ = 0; _ < 16; _++, s += 4)
|
|
949
|
+
At[_] = e.getUint32(s), pt[_] = e.getUint32(s += 4);
|
|
888
950
|
for (let _ = 16; _ < 80; _++) {
|
|
889
|
-
const C =
|
|
890
|
-
|
|
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;
|
|
891
953
|
}
|
|
892
|
-
let { Ah:
|
|
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;
|
|
893
955
|
for (let _ = 0; _ < 80; _++) {
|
|
894
|
-
const C =
|
|
895
|
-
|
|
896
|
-
const F =
|
|
897
|
-
|
|
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;
|
|
898
960
|
}
|
|
899
|
-
({ h, l:
|
|
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);
|
|
900
962
|
}
|
|
901
963
|
roundClean() {
|
|
902
|
-
|
|
964
|
+
tt(At, pt);
|
|
903
965
|
}
|
|
904
966
|
destroy() {
|
|
905
|
-
|
|
906
|
-
}
|
|
907
|
-
}
|
|
908
|
-
class
|
|
909
|
-
Ah =
|
|
910
|
-
Al =
|
|
911
|
-
Bh =
|
|
912
|
-
Bl =
|
|
913
|
-
Ch =
|
|
914
|
-
Cl =
|
|
915
|
-
Dh =
|
|
916
|
-
Dl =
|
|
917
|
-
Eh =
|
|
918
|
-
El =
|
|
919
|
-
Fh =
|
|
920
|
-
Fl =
|
|
921
|
-
Gh =
|
|
922
|
-
Gl =
|
|
923
|
-
Hh =
|
|
924
|
-
Hl =
|
|
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;
|
|
925
987
|
constructor() {
|
|
926
988
|
super(64);
|
|
927
989
|
}
|
|
928
990
|
}
|
|
929
|
-
class
|
|
930
|
-
Ah =
|
|
931
|
-
Al =
|
|
932
|
-
Bh =
|
|
933
|
-
Bl =
|
|
934
|
-
Ch =
|
|
935
|
-
Cl =
|
|
936
|
-
Dh =
|
|
937
|
-
Dl =
|
|
938
|
-
Eh =
|
|
939
|
-
El =
|
|
940
|
-
Fh =
|
|
941
|
-
Fl =
|
|
942
|
-
Gh =
|
|
943
|
-
Gl =
|
|
944
|
-
Hh =
|
|
945
|
-
Hl =
|
|
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;
|
|
946
1008
|
constructor() {
|
|
947
1009
|
super(48);
|
|
948
1010
|
}
|
|
949
1011
|
}
|
|
950
|
-
const
|
|
1012
|
+
const Y = /* @__PURE__ */ Uint32Array.from([
|
|
951
1013
|
2352822216,
|
|
952
1014
|
424955298,
|
|
953
1015
|
1944164710,
|
|
@@ -964,7 +1026,7 @@ const $ = /* @__PURE__ */ Uint32Array.from([
|
|
|
964
1026
|
1780299464,
|
|
965
1027
|
286451373,
|
|
966
1028
|
2446758561
|
|
967
|
-
]),
|
|
1029
|
+
]), Z = /* @__PURE__ */ Uint32Array.from([
|
|
968
1030
|
573645204,
|
|
969
1031
|
4230739756,
|
|
970
1032
|
2673172387,
|
|
@@ -982,324 +1044,324 @@ const $ = /* @__PURE__ */ Uint32Array.from([
|
|
|
982
1044
|
246885852,
|
|
983
1045
|
2177182882
|
|
984
1046
|
]);
|
|
985
|
-
class
|
|
986
|
-
Ah =
|
|
987
|
-
Al =
|
|
988
|
-
Bh =
|
|
989
|
-
Bl =
|
|
990
|
-
Ch =
|
|
991
|
-
Cl =
|
|
992
|
-
Dh =
|
|
993
|
-
Dl =
|
|
994
|
-
Eh =
|
|
995
|
-
El =
|
|
996
|
-
Fh =
|
|
997
|
-
Fl =
|
|
998
|
-
Gh =
|
|
999
|
-
Gl =
|
|
1000
|
-
Hh =
|
|
1001
|
-
Hl =
|
|
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;
|
|
1002
1064
|
constructor() {
|
|
1003
1065
|
super(28);
|
|
1004
1066
|
}
|
|
1005
1067
|
}
|
|
1006
|
-
class
|
|
1007
|
-
Ah =
|
|
1008
|
-
Al =
|
|
1009
|
-
Bh =
|
|
1010
|
-
Bl =
|
|
1011
|
-
Ch =
|
|
1012
|
-
Cl =
|
|
1013
|
-
Dh =
|
|
1014
|
-
Dl =
|
|
1015
|
-
Eh =
|
|
1016
|
-
El =
|
|
1017
|
-
Fh =
|
|
1018
|
-
Fl =
|
|
1019
|
-
Gh =
|
|
1020
|
-
Gl =
|
|
1021
|
-
Hh =
|
|
1022
|
-
Hl =
|
|
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;
|
|
1023
1085
|
constructor() {
|
|
1024
1086
|
super(32);
|
|
1025
1087
|
}
|
|
1026
1088
|
}
|
|
1027
|
-
const
|
|
1028
|
-
() => new
|
|
1029
|
-
/* @__PURE__ */
|
|
1030
|
-
),
|
|
1031
|
-
() => new
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
),
|
|
1034
|
-
() => new
|
|
1035
|
-
/* @__PURE__ */
|
|
1036
|
-
),
|
|
1037
|
-
() => new
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
),
|
|
1040
|
-
() => new
|
|
1041
|
-
/* @__PURE__ */
|
|
1042
|
-
),
|
|
1043
|
-
() => new
|
|
1044
|
-
/* @__PURE__ */
|
|
1045
|
-
),
|
|
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({
|
|
1046
1108
|
__proto__: null,
|
|
1047
|
-
_SHA224:
|
|
1048
|
-
_SHA256:
|
|
1049
|
-
_SHA384:
|
|
1050
|
-
_SHA512:
|
|
1051
|
-
_SHA512_224:
|
|
1052
|
-
_SHA512_256:
|
|
1053
|
-
sha224:
|
|
1054
|
-
sha256:
|
|
1055
|
-
sha384:
|
|
1056
|
-
sha512:
|
|
1057
|
-
sha512_224:
|
|
1058
|
-
sha512_256:
|
|
1059
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
1060
|
-
var
|
|
1061
|
-
function
|
|
1062
|
-
return
|
|
1063
|
-
}
|
|
1064
|
-
var
|
|
1065
|
-
function
|
|
1066
|
-
return
|
|
1067
|
-
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 =
|
|
1068
|
-
const e = /* @__PURE__ */
|
|
1069
|
-
function n
|
|
1070
|
-
return
|
|
1071
|
-
}
|
|
1072
|
-
function
|
|
1073
|
-
if (!Number.isSafeInteger(
|
|
1074
|
-
throw new Error("positive integer expected, got " +
|
|
1075
|
-
}
|
|
1076
|
-
function
|
|
1077
|
-
if (!n
|
|
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))
|
|
1078
1140
|
throw new Error("Uint8Array expected");
|
|
1079
|
-
if (
|
|
1080
|
-
throw new Error("Uint8Array expected of length " +
|
|
1141
|
+
if (b.length > 0 && !b.includes(n.length))
|
|
1142
|
+
throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
|
|
1081
1143
|
}
|
|
1082
|
-
function
|
|
1083
|
-
if (typeof
|
|
1144
|
+
function c(n) {
|
|
1145
|
+
if (typeof n != "function" || typeof n.create != "function")
|
|
1084
1146
|
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
1085
|
-
|
|
1147
|
+
o(n.outputLen), o(n.blockLen);
|
|
1086
1148
|
}
|
|
1087
|
-
function r(
|
|
1088
|
-
if (
|
|
1149
|
+
function r(n, b = !0) {
|
|
1150
|
+
if (n.destroyed)
|
|
1089
1151
|
throw new Error("Hash instance has been destroyed");
|
|
1090
|
-
if (
|
|
1152
|
+
if (b && n.finished)
|
|
1091
1153
|
throw new Error("Hash#digest() has already been called");
|
|
1092
1154
|
}
|
|
1093
|
-
function a(
|
|
1094
|
-
|
|
1095
|
-
const y =
|
|
1096
|
-
if (
|
|
1155
|
+
function a(n, b) {
|
|
1156
|
+
i(n);
|
|
1157
|
+
const y = b.outputLen;
|
|
1158
|
+
if (n.length < y)
|
|
1097
1159
|
throw new Error("digestInto() expects output buffer of length at least " + y);
|
|
1098
1160
|
}
|
|
1099
|
-
function
|
|
1100
|
-
return new Uint8Array(
|
|
1161
|
+
function d(n) {
|
|
1162
|
+
return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
|
|
1101
1163
|
}
|
|
1102
|
-
function x(
|
|
1103
|
-
return new Uint32Array(
|
|
1164
|
+
function x(n) {
|
|
1165
|
+
return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
|
|
1104
1166
|
}
|
|
1105
|
-
function H(...
|
|
1106
|
-
for (let
|
|
1107
|
-
|
|
1167
|
+
function H(...n) {
|
|
1168
|
+
for (let b = 0; b < n.length; b++)
|
|
1169
|
+
n[b].fill(0);
|
|
1108
1170
|
}
|
|
1109
|
-
function
|
|
1110
|
-
return new DataView(
|
|
1171
|
+
function f(n) {
|
|
1172
|
+
return new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
1111
1173
|
}
|
|
1112
|
-
function
|
|
1113
|
-
return
|
|
1174
|
+
function g(n, b) {
|
|
1175
|
+
return n << 32 - b | n >>> b;
|
|
1114
1176
|
}
|
|
1115
|
-
function
|
|
1116
|
-
return
|
|
1177
|
+
function w(n, b) {
|
|
1178
|
+
return n << b | n >>> 32 - b >>> 0;
|
|
1117
1179
|
}
|
|
1118
1180
|
t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
1119
|
-
function
|
|
1120
|
-
return
|
|
1121
|
-
}
|
|
1122
|
-
t.swap8IfBE = t.isLE ? (
|
|
1123
|
-
function I(
|
|
1124
|
-
for (let
|
|
1125
|
-
|
|
1126
|
-
return
|
|
1127
|
-
}
|
|
1128
|
-
t.swap32IfBE = t.isLE ? (
|
|
1129
|
-
const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function",
|
|
1130
|
-
function
|
|
1131
|
-
if (
|
|
1132
|
-
return
|
|
1133
|
-
let
|
|
1134
|
-
for (let y = 0; y <
|
|
1135
|
-
|
|
1136
|
-
return
|
|
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;
|
|
1137
1199
|
}
|
|
1138
1200
|
const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
1139
|
-
function C(
|
|
1140
|
-
if (
|
|
1141
|
-
return
|
|
1142
|
-
if (
|
|
1143
|
-
return
|
|
1144
|
-
if (
|
|
1145
|
-
return
|
|
1146
|
-
}
|
|
1147
|
-
function
|
|
1148
|
-
if (typeof
|
|
1149
|
-
throw new Error("hex string expected, got " + typeof
|
|
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);
|
|
1150
1212
|
if (D)
|
|
1151
|
-
return Uint8Array.fromHex(
|
|
1152
|
-
const
|
|
1153
|
-
if (
|
|
1154
|
-
throw new Error("hex string expected, got unpadded hex of length " +
|
|
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);
|
|
1155
1217
|
const V = new Uint8Array(y);
|
|
1156
|
-
for (let k = 0,
|
|
1157
|
-
const
|
|
1158
|
-
if (
|
|
1159
|
-
const
|
|
1160
|
-
throw new Error('hex string expected, got non-hex character "' +
|
|
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);
|
|
1161
1223
|
}
|
|
1162
|
-
V[k] =
|
|
1224
|
+
V[k] = et * 16 + K;
|
|
1163
1225
|
}
|
|
1164
1226
|
return V;
|
|
1165
1227
|
}
|
|
1166
|
-
const
|
|
1228
|
+
const B = async () => {
|
|
1167
1229
|
};
|
|
1168
|
-
t.nextTick =
|
|
1169
|
-
async function
|
|
1230
|
+
t.nextTick = B;
|
|
1231
|
+
async function m(n, b, y) {
|
|
1170
1232
|
let V = Date.now();
|
|
1171
|
-
for (let k = 0; k <
|
|
1233
|
+
for (let k = 0; k < n; k++) {
|
|
1172
1234
|
y(k);
|
|
1173
|
-
const
|
|
1174
|
-
|
|
1235
|
+
const j = Date.now() - V;
|
|
1236
|
+
j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
|
|
1175
1237
|
}
|
|
1176
1238
|
}
|
|
1177
|
-
function E(
|
|
1178
|
-
if (typeof
|
|
1239
|
+
function E(n) {
|
|
1240
|
+
if (typeof n != "string")
|
|
1179
1241
|
throw new Error("string expected");
|
|
1180
|
-
return new Uint8Array(new TextEncoder().encode(
|
|
1242
|
+
return new Uint8Array(new TextEncoder().encode(n));
|
|
1181
1243
|
}
|
|
1182
|
-
function
|
|
1183
|
-
return new TextDecoder().decode(
|
|
1244
|
+
function h(n) {
|
|
1245
|
+
return new TextDecoder().decode(n);
|
|
1184
1246
|
}
|
|
1185
|
-
function
|
|
1186
|
-
return typeof
|
|
1247
|
+
function u(n) {
|
|
1248
|
+
return typeof n == "string" && (n = E(n)), i(n), n;
|
|
1187
1249
|
}
|
|
1188
|
-
function
|
|
1189
|
-
return typeof
|
|
1250
|
+
function l(n) {
|
|
1251
|
+
return typeof n == "string" && (n = E(n)), i(n), n;
|
|
1190
1252
|
}
|
|
1191
|
-
function L(...
|
|
1192
|
-
let
|
|
1193
|
-
for (let V = 0; V <
|
|
1194
|
-
const k =
|
|
1195
|
-
|
|
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;
|
|
1196
1258
|
}
|
|
1197
|
-
const y = new Uint8Array(
|
|
1198
|
-
for (let V = 0, k = 0; V <
|
|
1199
|
-
const
|
|
1200
|
-
y.set(
|
|
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;
|
|
1201
1263
|
}
|
|
1202
1264
|
return y;
|
|
1203
1265
|
}
|
|
1204
|
-
function
|
|
1205
|
-
if (
|
|
1266
|
+
function p(n, b) {
|
|
1267
|
+
if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
|
|
1206
1268
|
throw new Error("options should be object or undefined");
|
|
1207
|
-
return Object.assign(
|
|
1269
|
+
return Object.assign(n, b);
|
|
1208
1270
|
}
|
|
1209
|
-
class
|
|
1271
|
+
class U {
|
|
1210
1272
|
}
|
|
1211
|
-
t.Hash =
|
|
1212
|
-
function F(
|
|
1213
|
-
const
|
|
1214
|
-
return
|
|
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;
|
|
1215
1277
|
}
|
|
1216
|
-
function
|
|
1217
|
-
const
|
|
1218
|
-
return
|
|
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;
|
|
1219
1281
|
}
|
|
1220
|
-
function
|
|
1221
|
-
const
|
|
1222
|
-
return
|
|
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;
|
|
1223
1285
|
}
|
|
1224
|
-
t.wrapConstructor = F, t.wrapConstructorWithOpts =
|
|
1225
|
-
function q(
|
|
1286
|
+
t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
|
|
1287
|
+
function q(n = 32) {
|
|
1226
1288
|
if (e.crypto && typeof e.crypto.getRandomValues == "function")
|
|
1227
|
-
return e.crypto.getRandomValues(new Uint8Array(
|
|
1289
|
+
return e.crypto.getRandomValues(new Uint8Array(n));
|
|
1228
1290
|
if (e.crypto && typeof e.crypto.randomBytes == "function")
|
|
1229
|
-
return Uint8Array.from(e.crypto.randomBytes(
|
|
1291
|
+
return Uint8Array.from(e.crypto.randomBytes(n));
|
|
1230
1292
|
throw new Error("crypto.getRandomValues must be defined");
|
|
1231
1293
|
}
|
|
1232
|
-
})(
|
|
1294
|
+
})(Xt)), Xt;
|
|
1233
1295
|
}
|
|
1234
|
-
var
|
|
1235
|
-
function
|
|
1236
|
-
if (
|
|
1237
|
-
|
|
1238
|
-
const t = /* @__PURE__ */
|
|
1239
|
-
function e(
|
|
1240
|
-
if (typeof
|
|
1241
|
-
return
|
|
1242
|
-
const x = BigInt(32), H = BigInt(4294967295),
|
|
1243
|
-
|
|
1244
|
-
}
|
|
1245
|
-
function
|
|
1246
|
-
return
|
|
1247
|
-
}
|
|
1248
|
-
function
|
|
1249
|
-
return
|
|
1250
|
-
}
|
|
1251
|
-
class
|
|
1252
|
-
constructor(r, a,
|
|
1253
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset =
|
|
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);
|
|
1254
1316
|
}
|
|
1255
1317
|
update(r) {
|
|
1256
1318
|
(0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
|
|
1257
|
-
const { view: a, buffer:
|
|
1258
|
-
for (let
|
|
1259
|
-
const
|
|
1260
|
-
if (
|
|
1261
|
-
const
|
|
1262
|
-
for (; x <= H -
|
|
1263
|
-
this.process(
|
|
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);
|
|
1264
1326
|
continue;
|
|
1265
1327
|
}
|
|
1266
|
-
|
|
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);
|
|
1267
1329
|
}
|
|
1268
1330
|
return this.length += r.length, this.roundClean(), this;
|
|
1269
1331
|
}
|
|
1270
1332
|
digestInto(r) {
|
|
1271
1333
|
(0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
|
|
1272
|
-
const { buffer: a, view:
|
|
1273
|
-
let { pos:
|
|
1274
|
-
a[
|
|
1275
|
-
for (let D =
|
|
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++)
|
|
1276
1338
|
a[D] = 0;
|
|
1277
|
-
e(
|
|
1278
|
-
const
|
|
1279
|
-
if (
|
|
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)
|
|
1280
1342
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
1281
|
-
const
|
|
1282
|
-
if (
|
|
1343
|
+
const S = w / 4, I = this.get();
|
|
1344
|
+
if (S > I.length)
|
|
1283
1345
|
throw new Error("_sha2: outputLen bigger than state");
|
|
1284
|
-
for (let D = 0; D <
|
|
1285
|
-
|
|
1346
|
+
for (let D = 0; D < S; D++)
|
|
1347
|
+
g.setUint32(4 * D, I[D], H);
|
|
1286
1348
|
}
|
|
1287
1349
|
digest() {
|
|
1288
1350
|
const { buffer: r, outputLen: a } = this;
|
|
1289
1351
|
this.digestInto(r);
|
|
1290
|
-
const
|
|
1291
|
-
return this.destroy(),
|
|
1352
|
+
const d = r.slice(0, a);
|
|
1353
|
+
return this.destroy(), d;
|
|
1292
1354
|
}
|
|
1293
1355
|
_cloneInto(r) {
|
|
1294
1356
|
r || (r = new this.constructor()), r.set(...this.get());
|
|
1295
|
-
const { blockLen: a, buffer:
|
|
1296
|
-
return r.destroyed =
|
|
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;
|
|
1297
1359
|
}
|
|
1298
1360
|
clone() {
|
|
1299
1361
|
return this._cloneInto();
|
|
1300
1362
|
}
|
|
1301
1363
|
}
|
|
1302
|
-
return
|
|
1364
|
+
return z.HashMD = i, z.SHA256_IV = Uint32Array.from([
|
|
1303
1365
|
1779033703,
|
|
1304
1366
|
3144134277,
|
|
1305
1367
|
1013904242,
|
|
@@ -1308,7 +1370,7 @@ function xs() {
|
|
|
1308
1370
|
2600822924,
|
|
1309
1371
|
528734635,
|
|
1310
1372
|
1541459225
|
|
1311
|
-
]),
|
|
1373
|
+
]), z.SHA224_IV = Uint32Array.from([
|
|
1312
1374
|
3238371032,
|
|
1313
1375
|
914150663,
|
|
1314
1376
|
812702999,
|
|
@@ -1317,7 +1379,7 @@ function xs() {
|
|
|
1317
1379
|
1750603025,
|
|
1318
1380
|
1694076839,
|
|
1319
1381
|
3204075428
|
|
1320
|
-
]),
|
|
1382
|
+
]), z.SHA384_IV = Uint32Array.from([
|
|
1321
1383
|
3418070365,
|
|
1322
1384
|
3238371032,
|
|
1323
1385
|
1654270250,
|
|
@@ -1334,7 +1396,7 @@ function xs() {
|
|
|
1334
1396
|
1694076839,
|
|
1335
1397
|
1203062813,
|
|
1336
1398
|
3204075428
|
|
1337
|
-
]),
|
|
1399
|
+
]), z.SHA512_IV = Uint32Array.from([
|
|
1338
1400
|
1779033703,
|
|
1339
1401
|
4089235720,
|
|
1340
1402
|
3144134277,
|
|
@@ -1351,98 +1413,98 @@ function xs() {
|
|
|
1351
1413
|
4215389547,
|
|
1352
1414
|
1541459225,
|
|
1353
1415
|
327033209
|
|
1354
|
-
]),
|
|
1416
|
+
]), z;
|
|
1355
1417
|
}
|
|
1356
|
-
var
|
|
1357
|
-
function
|
|
1358
|
-
if (
|
|
1359
|
-
|
|
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;
|
|
1360
1422
|
const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
|
|
1361
|
-
function
|
|
1362
|
-
return
|
|
1363
|
-
}
|
|
1364
|
-
function h
|
|
1365
|
-
const
|
|
1366
|
-
let L = new Uint32Array(
|
|
1367
|
-
for (let
|
|
1368
|
-
const { h: F, l:
|
|
1369
|
-
[L[
|
|
1370
|
-
}
|
|
1371
|
-
return [L,
|
|
1372
|
-
}
|
|
1373
|
-
const
|
|
1374
|
-
|
|
1375
|
-
const
|
|
1376
|
-
|
|
1377
|
-
const r = (
|
|
1378
|
-
|
|
1379
|
-
const a = (
|
|
1380
|
-
|
|
1381
|
-
const
|
|
1382
|
-
|
|
1383
|
-
const x = (
|
|
1384
|
-
|
|
1385
|
-
const H = (
|
|
1386
|
-
|
|
1387
|
-
const
|
|
1388
|
-
|
|
1389
|
-
const
|
|
1390
|
-
|
|
1391
|
-
const
|
|
1392
|
-
|
|
1393
|
-
const
|
|
1394
|
-
|
|
1395
|
-
const I = (
|
|
1396
|
-
|
|
1397
|
-
const D = (
|
|
1398
|
-
|
|
1399
|
-
function
|
|
1400
|
-
const
|
|
1401
|
-
return { h:
|
|
1402
|
-
}
|
|
1403
|
-
const
|
|
1404
|
-
|
|
1405
|
-
const _ = (
|
|
1406
|
-
|
|
1407
|
-
const C = (
|
|
1408
|
-
|
|
1409
|
-
const
|
|
1410
|
-
|
|
1411
|
-
const
|
|
1412
|
-
|
|
1413
|
-
const
|
|
1414
|
-
|
|
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;
|
|
1415
1477
|
const E = {
|
|
1416
|
-
fromBig:
|
|
1417
|
-
split:
|
|
1418
|
-
toBig:
|
|
1419
|
-
shrSH:
|
|
1478
|
+
fromBig: s,
|
|
1479
|
+
split: o,
|
|
1480
|
+
toBig: i,
|
|
1481
|
+
shrSH: c,
|
|
1420
1482
|
shrSL: r,
|
|
1421
1483
|
rotrSH: a,
|
|
1422
|
-
rotrSL:
|
|
1484
|
+
rotrSL: d,
|
|
1423
1485
|
rotrBH: x,
|
|
1424
1486
|
rotrBL: H,
|
|
1425
|
-
rotr32H:
|
|
1426
|
-
rotr32L:
|
|
1427
|
-
rotlSH:
|
|
1428
|
-
rotlSL:
|
|
1487
|
+
rotr32H: f,
|
|
1488
|
+
rotr32L: g,
|
|
1489
|
+
rotlSH: w,
|
|
1490
|
+
rotlSL: S,
|
|
1429
1491
|
rotlBH: I,
|
|
1430
1492
|
rotlBL: D,
|
|
1431
|
-
add:
|
|
1432
|
-
add3L:
|
|
1493
|
+
add: W,
|
|
1494
|
+
add3L: v,
|
|
1433
1495
|
add3H: _,
|
|
1434
1496
|
add4L: C,
|
|
1435
|
-
add4H:
|
|
1436
|
-
add5H:
|
|
1437
|
-
add5L:
|
|
1497
|
+
add4H: A,
|
|
1498
|
+
add5H: m,
|
|
1499
|
+
add5L: B
|
|
1438
1500
|
};
|
|
1439
|
-
return
|
|
1501
|
+
return O.default = E, O;
|
|
1440
1502
|
}
|
|
1441
|
-
var
|
|
1442
|
-
function
|
|
1443
|
-
if (
|
|
1444
|
-
|
|
1445
|
-
const t = /* @__PURE__ */
|
|
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([
|
|
1446
1508
|
1116352408,
|
|
1447
1509
|
1899447441,
|
|
1448
1510
|
3049323471,
|
|
@@ -1507,47 +1569,47 @@ function qs() {
|
|
|
1507
1569
|
2756734187,
|
|
1508
1570
|
3204031479,
|
|
1509
1571
|
3329325298
|
|
1510
|
-
]),
|
|
1511
|
-
class
|
|
1572
|
+
]), i = /* @__PURE__ */ new Uint32Array(64);
|
|
1573
|
+
class c extends t.HashMD {
|
|
1512
1574
|
constructor(_ = 32) {
|
|
1513
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;
|
|
1514
1576
|
}
|
|
1515
1577
|
get() {
|
|
1516
|
-
const { A: _, B: C, C:
|
|
1517
|
-
return [_, C,
|
|
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];
|
|
1518
1580
|
}
|
|
1519
1581
|
// prettier-ignore
|
|
1520
|
-
set(_, C,
|
|
1521
|
-
this.A = _ | 0, this.B = C | 0, this.C =
|
|
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;
|
|
1522
1584
|
}
|
|
1523
1585
|
process(_, C) {
|
|
1524
|
-
for (let
|
|
1525
|
-
|
|
1526
|
-
for (let
|
|
1527
|
-
const
|
|
1528
|
-
|
|
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;
|
|
1529
1591
|
}
|
|
1530
|
-
let { A
|
|
1531
|
-
for (let
|
|
1532
|
-
const
|
|
1533
|
-
L =
|
|
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;
|
|
1534
1596
|
}
|
|
1535
|
-
|
|
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);
|
|
1536
1598
|
}
|
|
1537
1599
|
roundClean() {
|
|
1538
|
-
(0,
|
|
1600
|
+
(0, s.clean)(i);
|
|
1539
1601
|
}
|
|
1540
1602
|
destroy() {
|
|
1541
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0), (0,
|
|
1603
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
|
|
1542
1604
|
}
|
|
1543
1605
|
}
|
|
1544
|
-
|
|
1545
|
-
class r extends
|
|
1606
|
+
R.SHA256 = c;
|
|
1607
|
+
class r extends c {
|
|
1546
1608
|
constructor() {
|
|
1547
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;
|
|
1548
1610
|
}
|
|
1549
1611
|
}
|
|
1550
|
-
|
|
1612
|
+
R.SHA224 = r;
|
|
1551
1613
|
const a = e.split([
|
|
1552
1614
|
"0x428a2f98d728ae22",
|
|
1553
1615
|
"0x7137449123ef65cd",
|
|
@@ -1629,51 +1691,51 @@ function qs() {
|
|
|
1629
1691
|
"0x597f299cfc657e2a",
|
|
1630
1692
|
"0x5fcb6fab3ad6faec",
|
|
1631
1693
|
"0x6c44198c4a475817"
|
|
1632
|
-
].map((
|
|
1633
|
-
class
|
|
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 {
|
|
1634
1696
|
constructor(_ = 64) {
|
|
1635
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;
|
|
1636
1698
|
}
|
|
1637
1699
|
// prettier-ignore
|
|
1638
1700
|
get() {
|
|
1639
|
-
const { Ah: _, Al: C, Bh:
|
|
1640
|
-
return [_, C,
|
|
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];
|
|
1641
1703
|
}
|
|
1642
1704
|
// prettier-ignore
|
|
1643
|
-
set(_, C,
|
|
1644
|
-
this.Ah = _ | 0, this.Al = C | 0, this.Bh =
|
|
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;
|
|
1645
1707
|
}
|
|
1646
1708
|
process(_, C) {
|
|
1647
1709
|
for (let y = 0; y < 16; y++, C += 4)
|
|
1648
|
-
H[y] = _.getUint32(C),
|
|
1710
|
+
H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
|
|
1649
1711
|
for (let y = 16; y < 80; y++) {
|
|
1650
|
-
const V = H[y - 15] | 0, k =
|
|
1651
|
-
H[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;
|
|
1652
1714
|
}
|
|
1653
|
-
let { Ah:
|
|
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;
|
|
1654
1716
|
for (let y = 0; y < 80; y++) {
|
|
1655
|
-
const V = e.rotrSH(
|
|
1656
|
-
|
|
1657
|
-
const
|
|
1658
|
-
|
|
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;
|
|
1659
1721
|
}
|
|
1660
|
-
({ h:
|
|
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);
|
|
1661
1723
|
}
|
|
1662
1724
|
roundClean() {
|
|
1663
|
-
(0,
|
|
1725
|
+
(0, s.clean)(H, f);
|
|
1664
1726
|
}
|
|
1665
1727
|
destroy() {
|
|
1666
|
-
(0,
|
|
1728
|
+
(0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
1667
1729
|
}
|
|
1668
1730
|
}
|
|
1669
|
-
|
|
1670
|
-
class
|
|
1731
|
+
R.SHA512 = g;
|
|
1732
|
+
class w extends g {
|
|
1671
1733
|
constructor() {
|
|
1672
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;
|
|
1673
1735
|
}
|
|
1674
1736
|
}
|
|
1675
|
-
|
|
1676
|
-
const
|
|
1737
|
+
R.SHA384 = w;
|
|
1738
|
+
const S = /* @__PURE__ */ Uint32Array.from([
|
|
1677
1739
|
2352822216,
|
|
1678
1740
|
424955298,
|
|
1679
1741
|
1944164710,
|
|
@@ -1708,359 +1770,380 @@ function qs() {
|
|
|
1708
1770
|
246885852,
|
|
1709
1771
|
2177182882
|
|
1710
1772
|
]);
|
|
1711
|
-
class D extends
|
|
1773
|
+
class D extends g {
|
|
1712
1774
|
constructor() {
|
|
1713
|
-
super(28), this.Ah =
|
|
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;
|
|
1714
1776
|
}
|
|
1715
1777
|
}
|
|
1716
|
-
|
|
1717
|
-
class
|
|
1778
|
+
R.SHA512_224 = D;
|
|
1779
|
+
class W extends g {
|
|
1718
1780
|
constructor() {
|
|
1719
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;
|
|
1720
1782
|
}
|
|
1721
1783
|
}
|
|
1722
|
-
return
|
|
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;
|
|
1723
1785
|
}
|
|
1724
|
-
var
|
|
1725
|
-
function
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
}
|
|
1755
|
-
_cloneInto(i) {
|
|
1756
|
-
i || (i = Object.create(Object.getPrototypeOf(this), {}));
|
|
1757
|
-
const { oHash: r, iHash: a, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
|
|
1758
|
-
return i = i, i.finished = b, i.destroyed = x, i.blockLen = H, i.outputLen = u, i.oHash = r._cloneInto(i.oHash), i.iHash = a._cloneInto(i.iHash), i;
|
|
1759
|
-
}
|
|
1760
|
-
clone() {
|
|
1761
|
-
return this._cloneInto();
|
|
1762
|
-
}
|
|
1763
|
-
destroy() {
|
|
1764
|
-
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
1765
|
-
}
|
|
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;
|
|
1766
1816
|
}
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
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);
|
|
1771
1826
|
}
|
|
1772
|
-
class
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
outputLen;
|
|
1827
|
+
class te {
|
|
1828
|
+
state;
|
|
1829
|
+
pos = 0;
|
|
1830
|
+
posOut = 0;
|
|
1777
1831
|
finished = !1;
|
|
1832
|
+
state32;
|
|
1778
1833
|
destroyed = !1;
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
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;
|
|
1791
1850
|
}
|
|
1792
1851
|
update(e) {
|
|
1793
|
-
|
|
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();
|
|
1859
|
+
}
|
|
1860
|
+
return this;
|
|
1794
1861
|
}
|
|
1795
|
-
|
|
1796
|
-
|
|
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();
|
|
1797
1868
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
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;
|
|
1876
|
+
}
|
|
1877
|
+
return e;
|
|
1801
1878
|
}
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
return
|
|
1879
|
+
xofInto(e) {
|
|
1880
|
+
if (!this.enableXOF)
|
|
1881
|
+
throw new Error("XOF is not possible for this instance");
|
|
1882
|
+
return this.writeInto(e);
|
|
1806
1883
|
}
|
|
1807
|
-
|
|
1808
|
-
return this.
|
|
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));
|
|
1809
1894
|
}
|
|
1810
1895
|
destroy() {
|
|
1811
|
-
this.destroyed = !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;
|
|
1812
1901
|
}
|
|
1813
1902
|
}
|
|
1814
|
-
const
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
function h(s) {
|
|
1834
|
-
if (!Number.isSafeInteger(s) || s < 0)
|
|
1835
|
-
throw new Error("positive integer expected, got " + s);
|
|
1836
|
-
}
|
|
1837
|
-
function c(s, ...l) {
|
|
1838
|
-
if (!n(s))
|
|
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;
|
|
1907
|
+
}
|
|
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))
|
|
1839
1922
|
throw new Error("Uint8Array expected");
|
|
1840
|
-
if (
|
|
1841
|
-
throw new Error("Uint8Array expected of length " +
|
|
1923
|
+
if (b.length > 0 && !b.includes(n.length))
|
|
1924
|
+
throw new Error("Uint8Array expected of length " + b + ", got length=" + n.length);
|
|
1842
1925
|
}
|
|
1843
|
-
function
|
|
1844
|
-
if (typeof
|
|
1926
|
+
function c(n) {
|
|
1927
|
+
if (typeof n != "function" || typeof n.create != "function")
|
|
1845
1928
|
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
1846
|
-
|
|
1929
|
+
o(n.outputLen), o(n.blockLen);
|
|
1847
1930
|
}
|
|
1848
|
-
function r(
|
|
1849
|
-
if (
|
|
1931
|
+
function r(n, b = !0) {
|
|
1932
|
+
if (n.destroyed)
|
|
1850
1933
|
throw new Error("Hash instance has been destroyed");
|
|
1851
|
-
if (
|
|
1934
|
+
if (b && n.finished)
|
|
1852
1935
|
throw new Error("Hash#digest() has already been called");
|
|
1853
1936
|
}
|
|
1854
|
-
function a(
|
|
1855
|
-
|
|
1856
|
-
const y =
|
|
1857
|
-
if (
|
|
1937
|
+
function a(n, b) {
|
|
1938
|
+
i(n);
|
|
1939
|
+
const y = b.outputLen;
|
|
1940
|
+
if (n.length < y)
|
|
1858
1941
|
throw new Error("digestInto() expects output buffer of length at least " + y);
|
|
1859
1942
|
}
|
|
1860
|
-
function
|
|
1861
|
-
return new Uint8Array(
|
|
1943
|
+
function d(n) {
|
|
1944
|
+
return new Uint8Array(n.buffer, n.byteOffset, n.byteLength);
|
|
1862
1945
|
}
|
|
1863
|
-
function x(
|
|
1864
|
-
return new Uint32Array(
|
|
1946
|
+
function x(n) {
|
|
1947
|
+
return new Uint32Array(n.buffer, n.byteOffset, Math.floor(n.byteLength / 4));
|
|
1865
1948
|
}
|
|
1866
|
-
function H(...
|
|
1867
|
-
for (let
|
|
1868
|
-
|
|
1949
|
+
function H(...n) {
|
|
1950
|
+
for (let b = 0; b < n.length; b++)
|
|
1951
|
+
n[b].fill(0);
|
|
1869
1952
|
}
|
|
1870
|
-
function
|
|
1871
|
-
return new DataView(
|
|
1953
|
+
function f(n) {
|
|
1954
|
+
return new DataView(n.buffer, n.byteOffset, n.byteLength);
|
|
1872
1955
|
}
|
|
1873
|
-
function
|
|
1874
|
-
return
|
|
1956
|
+
function g(n, b) {
|
|
1957
|
+
return n << 32 - b | n >>> b;
|
|
1875
1958
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return
|
|
1959
|
+
function w(n, b) {
|
|
1960
|
+
return n << b | n >>> 32 - b >>> 0;
|
|
1878
1961
|
}
|
|
1879
1962
|
t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
1880
|
-
function
|
|
1881
|
-
return
|
|
1882
|
-
}
|
|
1883
|
-
t.swap8IfBE = t.isLE ? (
|
|
1884
|
-
function I(
|
|
1885
|
-
for (let
|
|
1886
|
-
|
|
1887
|
-
return
|
|
1888
|
-
}
|
|
1889
|
-
t.swap32IfBE = t.isLE ? (
|
|
1890
|
-
const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function",
|
|
1891
|
-
function
|
|
1892
|
-
if (
|
|
1893
|
-
return
|
|
1894
|
-
let
|
|
1895
|
-
for (let y = 0; y <
|
|
1896
|
-
|
|
1897
|
-
return
|
|
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;
|
|
1898
1981
|
}
|
|
1899
1982
|
const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
1900
|
-
function C(
|
|
1901
|
-
if (
|
|
1902
|
-
return
|
|
1903
|
-
if (
|
|
1904
|
-
return
|
|
1905
|
-
if (
|
|
1906
|
-
return
|
|
1907
|
-
}
|
|
1908
|
-
function
|
|
1909
|
-
if (typeof
|
|
1910
|
-
throw new Error("hex string expected, got " + typeof
|
|
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);
|
|
1911
1994
|
if (D)
|
|
1912
|
-
return Uint8Array.fromHex(
|
|
1913
|
-
const
|
|
1914
|
-
if (
|
|
1915
|
-
throw new Error("hex string expected, got unpadded hex of length " +
|
|
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);
|
|
1916
1999
|
const V = new Uint8Array(y);
|
|
1917
|
-
for (let k = 0,
|
|
1918
|
-
const
|
|
1919
|
-
if (
|
|
1920
|
-
const
|
|
1921
|
-
throw new Error('hex string expected, got non-hex character "' +
|
|
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);
|
|
1922
2005
|
}
|
|
1923
|
-
V[k] =
|
|
2006
|
+
V[k] = et * 16 + K;
|
|
1924
2007
|
}
|
|
1925
2008
|
return V;
|
|
1926
2009
|
}
|
|
1927
|
-
const
|
|
2010
|
+
const B = async () => {
|
|
1928
2011
|
};
|
|
1929
|
-
t.nextTick =
|
|
1930
|
-
async function
|
|
2012
|
+
t.nextTick = B;
|
|
2013
|
+
async function m(n, b, y) {
|
|
1931
2014
|
let V = Date.now();
|
|
1932
|
-
for (let k = 0; k <
|
|
2015
|
+
for (let k = 0; k < n; k++) {
|
|
1933
2016
|
y(k);
|
|
1934
|
-
const
|
|
1935
|
-
|
|
2017
|
+
const j = Date.now() - V;
|
|
2018
|
+
j >= 0 && j < b || (await (0, t.nextTick)(), V += j);
|
|
1936
2019
|
}
|
|
1937
2020
|
}
|
|
1938
|
-
function E(
|
|
1939
|
-
if (typeof
|
|
2021
|
+
function E(n) {
|
|
2022
|
+
if (typeof n != "string")
|
|
1940
2023
|
throw new Error("string expected");
|
|
1941
|
-
return new Uint8Array(new TextEncoder().encode(
|
|
2024
|
+
return new Uint8Array(new TextEncoder().encode(n));
|
|
1942
2025
|
}
|
|
1943
|
-
function
|
|
1944
|
-
return new TextDecoder().decode(
|
|
2026
|
+
function h(n) {
|
|
2027
|
+
return new TextDecoder().decode(n);
|
|
1945
2028
|
}
|
|
1946
|
-
function
|
|
1947
|
-
return typeof
|
|
2029
|
+
function u(n) {
|
|
2030
|
+
return typeof n == "string" && (n = E(n)), i(n), n;
|
|
1948
2031
|
}
|
|
1949
|
-
function
|
|
1950
|
-
return typeof
|
|
2032
|
+
function l(n) {
|
|
2033
|
+
return typeof n == "string" && (n = E(n)), i(n), n;
|
|
1951
2034
|
}
|
|
1952
|
-
function L(...
|
|
1953
|
-
let
|
|
1954
|
-
for (let V = 0; V <
|
|
1955
|
-
const k =
|
|
1956
|
-
|
|
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;
|
|
1957
2040
|
}
|
|
1958
|
-
const y = new Uint8Array(
|
|
1959
|
-
for (let V = 0, k = 0; V <
|
|
1960
|
-
const
|
|
1961
|
-
y.set(
|
|
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;
|
|
1962
2045
|
}
|
|
1963
2046
|
return y;
|
|
1964
2047
|
}
|
|
1965
|
-
function
|
|
1966
|
-
if (
|
|
2048
|
+
function p(n, b) {
|
|
2049
|
+
if (b !== void 0 && {}.toString.call(b) !== "[object Object]")
|
|
1967
2050
|
throw new Error("options should be object or undefined");
|
|
1968
|
-
return Object.assign(
|
|
2051
|
+
return Object.assign(n, b);
|
|
1969
2052
|
}
|
|
1970
|
-
class
|
|
2053
|
+
class U {
|
|
1971
2054
|
}
|
|
1972
|
-
t.Hash =
|
|
1973
|
-
function F(
|
|
1974
|
-
const
|
|
1975
|
-
return
|
|
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;
|
|
1976
2059
|
}
|
|
1977
|
-
function
|
|
1978
|
-
const
|
|
1979
|
-
return
|
|
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;
|
|
1980
2063
|
}
|
|
1981
|
-
function
|
|
1982
|
-
const
|
|
1983
|
-
return
|
|
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;
|
|
1984
2067
|
}
|
|
1985
|
-
t.wrapConstructor = F, t.wrapConstructorWithOpts =
|
|
1986
|
-
function q(
|
|
2068
|
+
t.wrapConstructor = F, t.wrapConstructorWithOpts = M, t.wrapXOFConstructorWithOpts = G;
|
|
2069
|
+
function q(n = 32) {
|
|
1987
2070
|
if (e.crypto && typeof e.crypto.getRandomValues == "function")
|
|
1988
|
-
return e.crypto.getRandomValues(new Uint8Array(
|
|
2071
|
+
return e.crypto.getRandomValues(new Uint8Array(n));
|
|
1989
2072
|
if (e.crypto && typeof e.crypto.randomBytes == "function")
|
|
1990
|
-
return Uint8Array.from(e.crypto.randomBytes(
|
|
2073
|
+
return Uint8Array.from(e.crypto.randomBytes(n));
|
|
1991
2074
|
throw new Error("crypto.getRandomValues must be defined");
|
|
1992
2075
|
}
|
|
1993
|
-
})(
|
|
2076
|
+
})(Jt)), Jt;
|
|
1994
2077
|
}
|
|
1995
|
-
var
|
|
1996
|
-
function
|
|
1997
|
-
if (
|
|
1998
|
-
|
|
1999
|
-
const t = /* @__PURE__ */
|
|
2000
|
-
function e(
|
|
2001
|
-
if (typeof
|
|
2002
|
-
return
|
|
2003
|
-
const x = BigInt(32), H = BigInt(4294967295),
|
|
2004
|
-
|
|
2005
|
-
}
|
|
2006
|
-
function
|
|
2007
|
-
return
|
|
2008
|
-
}
|
|
2009
|
-
function
|
|
2010
|
-
return
|
|
2011
|
-
}
|
|
2012
|
-
class
|
|
2013
|
-
constructor(r, a,
|
|
2014
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset =
|
|
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);
|
|
2015
2098
|
}
|
|
2016
2099
|
update(r) {
|
|
2017
2100
|
(0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
|
|
2018
|
-
const { view: a, buffer:
|
|
2019
|
-
for (let
|
|
2020
|
-
const
|
|
2021
|
-
if (
|
|
2022
|
-
const
|
|
2023
|
-
for (; x <= H -
|
|
2024
|
-
this.process(
|
|
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);
|
|
2025
2108
|
continue;
|
|
2026
2109
|
}
|
|
2027
|
-
|
|
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);
|
|
2028
2111
|
}
|
|
2029
2112
|
return this.length += r.length, this.roundClean(), this;
|
|
2030
2113
|
}
|
|
2031
2114
|
digestInto(r) {
|
|
2032
2115
|
(0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
|
|
2033
|
-
const { buffer: a, view:
|
|
2034
|
-
let { pos:
|
|
2035
|
-
a[
|
|
2036
|
-
for (let D =
|
|
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++)
|
|
2037
2120
|
a[D] = 0;
|
|
2038
|
-
e(
|
|
2039
|
-
const
|
|
2040
|
-
if (
|
|
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)
|
|
2041
2124
|
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
2042
|
-
const
|
|
2043
|
-
if (
|
|
2125
|
+
const S = w / 4, I = this.get();
|
|
2126
|
+
if (S > I.length)
|
|
2044
2127
|
throw new Error("_sha2: outputLen bigger than state");
|
|
2045
|
-
for (let D = 0; D <
|
|
2046
|
-
|
|
2128
|
+
for (let D = 0; D < S; D++)
|
|
2129
|
+
g.setUint32(4 * D, I[D], H);
|
|
2047
2130
|
}
|
|
2048
2131
|
digest() {
|
|
2049
2132
|
const { buffer: r, outputLen: a } = this;
|
|
2050
2133
|
this.digestInto(r);
|
|
2051
|
-
const
|
|
2052
|
-
return this.destroy(),
|
|
2134
|
+
const d = r.slice(0, a);
|
|
2135
|
+
return this.destroy(), d;
|
|
2053
2136
|
}
|
|
2054
2137
|
_cloneInto(r) {
|
|
2055
2138
|
r || (r = new this.constructor()), r.set(...this.get());
|
|
2056
|
-
const { blockLen: a, buffer:
|
|
2057
|
-
return r.destroyed =
|
|
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;
|
|
2058
2141
|
}
|
|
2059
2142
|
clone() {
|
|
2060
2143
|
return this._cloneInto();
|
|
2061
2144
|
}
|
|
2062
2145
|
}
|
|
2063
|
-
return
|
|
2146
|
+
return $.HashMD = i, $.SHA256_IV = Uint32Array.from([
|
|
2064
2147
|
1779033703,
|
|
2065
2148
|
3144134277,
|
|
2066
2149
|
1013904242,
|
|
@@ -2069,7 +2152,7 @@ function ps() {
|
|
|
2069
2152
|
2600822924,
|
|
2070
2153
|
528734635,
|
|
2071
2154
|
1541459225
|
|
2072
|
-
]),
|
|
2155
|
+
]), $.SHA224_IV = Uint32Array.from([
|
|
2073
2156
|
3238371032,
|
|
2074
2157
|
914150663,
|
|
2075
2158
|
812702999,
|
|
@@ -2078,7 +2161,7 @@ function ps() {
|
|
|
2078
2161
|
1750603025,
|
|
2079
2162
|
1694076839,
|
|
2080
2163
|
3204075428
|
|
2081
|
-
]),
|
|
2164
|
+
]), $.SHA384_IV = Uint32Array.from([
|
|
2082
2165
|
3418070365,
|
|
2083
2166
|
3238371032,
|
|
2084
2167
|
1654270250,
|
|
@@ -2095,7 +2178,7 @@ function ps() {
|
|
|
2095
2178
|
1694076839,
|
|
2096
2179
|
1203062813,
|
|
2097
2180
|
3204075428
|
|
2098
|
-
]),
|
|
2181
|
+
]), $.SHA512_IV = Uint32Array.from([
|
|
2099
2182
|
1779033703,
|
|
2100
2183
|
4089235720,
|
|
2101
2184
|
3144134277,
|
|
@@ -2112,98 +2195,98 @@ function ps() {
|
|
|
2112
2195
|
4215389547,
|
|
2113
2196
|
1541459225,
|
|
2114
2197
|
327033209
|
|
2115
|
-
]),
|
|
2198
|
+
]), $;
|
|
2116
2199
|
}
|
|
2117
|
-
var
|
|
2118
|
-
function
|
|
2119
|
-
if (
|
|
2120
|
-
|
|
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;
|
|
2121
2204
|
const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
|
|
2122
|
-
function
|
|
2123
|
-
return
|
|
2124
|
-
}
|
|
2125
|
-
function h
|
|
2126
|
-
const
|
|
2127
|
-
let L = new Uint32Array(
|
|
2128
|
-
for (let
|
|
2129
|
-
const { h: F, l:
|
|
2130
|
-
[L[
|
|
2131
|
-
}
|
|
2132
|
-
return [L,
|
|
2133
|
-
}
|
|
2134
|
-
const
|
|
2135
|
-
|
|
2136
|
-
const
|
|
2137
|
-
|
|
2138
|
-
const r = (
|
|
2139
|
-
|
|
2140
|
-
const a = (
|
|
2141
|
-
|
|
2142
|
-
const
|
|
2143
|
-
|
|
2144
|
-
const x = (
|
|
2145
|
-
|
|
2146
|
-
const H = (
|
|
2147
|
-
|
|
2148
|
-
const
|
|
2149
|
-
|
|
2150
|
-
const
|
|
2151
|
-
|
|
2152
|
-
const
|
|
2153
|
-
|
|
2154
|
-
const
|
|
2155
|
-
|
|
2156
|
-
const I = (
|
|
2157
|
-
|
|
2158
|
-
const D = (
|
|
2159
|
-
|
|
2160
|
-
function
|
|
2161
|
-
const
|
|
2162
|
-
return { h:
|
|
2163
|
-
}
|
|
2164
|
-
const
|
|
2165
|
-
|
|
2166
|
-
const _ = (
|
|
2167
|
-
|
|
2168
|
-
const C = (
|
|
2169
|
-
|
|
2170
|
-
const
|
|
2171
|
-
|
|
2172
|
-
const
|
|
2173
|
-
|
|
2174
|
-
const
|
|
2175
|
-
|
|
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;
|
|
2176
2259
|
const E = {
|
|
2177
|
-
fromBig:
|
|
2178
|
-
split:
|
|
2179
|
-
toBig:
|
|
2180
|
-
shrSH:
|
|
2260
|
+
fromBig: s,
|
|
2261
|
+
split: o,
|
|
2262
|
+
toBig: i,
|
|
2263
|
+
shrSH: c,
|
|
2181
2264
|
shrSL: r,
|
|
2182
2265
|
rotrSH: a,
|
|
2183
|
-
rotrSL:
|
|
2266
|
+
rotrSL: d,
|
|
2184
2267
|
rotrBH: x,
|
|
2185
2268
|
rotrBL: H,
|
|
2186
|
-
rotr32H:
|
|
2187
|
-
rotr32L:
|
|
2188
|
-
rotlSH:
|
|
2189
|
-
rotlSL:
|
|
2269
|
+
rotr32H: f,
|
|
2270
|
+
rotr32L: g,
|
|
2271
|
+
rotlSH: w,
|
|
2272
|
+
rotlSL: S,
|
|
2190
2273
|
rotlBH: I,
|
|
2191
2274
|
rotlBL: D,
|
|
2192
|
-
add:
|
|
2193
|
-
add3L:
|
|
2275
|
+
add: W,
|
|
2276
|
+
add3L: v,
|
|
2194
2277
|
add3H: _,
|
|
2195
2278
|
add4L: C,
|
|
2196
|
-
add4H:
|
|
2197
|
-
add5H:
|
|
2198
|
-
add5L:
|
|
2279
|
+
add4H: A,
|
|
2280
|
+
add5H: m,
|
|
2281
|
+
add5L: B
|
|
2199
2282
|
};
|
|
2200
|
-
return
|
|
2283
|
+
return T.default = E, T;
|
|
2201
2284
|
}
|
|
2202
|
-
var
|
|
2203
|
-
function
|
|
2204
|
-
if (
|
|
2205
|
-
|
|
2206
|
-
const t = /* @__PURE__ */
|
|
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([
|
|
2207
2290
|
1116352408,
|
|
2208
2291
|
1899447441,
|
|
2209
2292
|
3049323471,
|
|
@@ -2268,47 +2351,47 @@ function gs() {
|
|
|
2268
2351
|
2756734187,
|
|
2269
2352
|
3204031479,
|
|
2270
2353
|
3329325298
|
|
2271
|
-
]),
|
|
2272
|
-
class
|
|
2354
|
+
]), i = /* @__PURE__ */ new Uint32Array(64);
|
|
2355
|
+
class c extends t.HashMD {
|
|
2273
2356
|
constructor(_ = 32) {
|
|
2274
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;
|
|
2275
2358
|
}
|
|
2276
2359
|
get() {
|
|
2277
|
-
const { A: _, B: C, C:
|
|
2278
|
-
return [_, C,
|
|
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];
|
|
2279
2362
|
}
|
|
2280
2363
|
// prettier-ignore
|
|
2281
|
-
set(_, C,
|
|
2282
|
-
this.A = _ | 0, this.B = C | 0, this.C =
|
|
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;
|
|
2283
2366
|
}
|
|
2284
2367
|
process(_, C) {
|
|
2285
|
-
for (let
|
|
2286
|
-
|
|
2287
|
-
for (let
|
|
2288
|
-
const
|
|
2289
|
-
|
|
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;
|
|
2290
2373
|
}
|
|
2291
|
-
let { A
|
|
2292
|
-
for (let
|
|
2293
|
-
const
|
|
2294
|
-
L =
|
|
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;
|
|
2295
2378
|
}
|
|
2296
|
-
|
|
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);
|
|
2297
2380
|
}
|
|
2298
2381
|
roundClean() {
|
|
2299
|
-
(0,
|
|
2382
|
+
(0, s.clean)(i);
|
|
2300
2383
|
}
|
|
2301
2384
|
destroy() {
|
|
2302
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0), (0,
|
|
2385
|
+
this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, s.clean)(this.buffer);
|
|
2303
2386
|
}
|
|
2304
2387
|
}
|
|
2305
|
-
|
|
2306
|
-
class r extends
|
|
2388
|
+
P.SHA256 = c;
|
|
2389
|
+
class r extends c {
|
|
2307
2390
|
constructor() {
|
|
2308
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;
|
|
2309
2392
|
}
|
|
2310
2393
|
}
|
|
2311
|
-
|
|
2394
|
+
P.SHA224 = r;
|
|
2312
2395
|
const a = e.split([
|
|
2313
2396
|
"0x428a2f98d728ae22",
|
|
2314
2397
|
"0x7137449123ef65cd",
|
|
@@ -2390,51 +2473,51 @@ function gs() {
|
|
|
2390
2473
|
"0x597f299cfc657e2a",
|
|
2391
2474
|
"0x5fcb6fab3ad6faec",
|
|
2392
2475
|
"0x6c44198c4a475817"
|
|
2393
|
-
].map((
|
|
2394
|
-
class
|
|
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 {
|
|
2395
2478
|
constructor(_ = 64) {
|
|
2396
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;
|
|
2397
2480
|
}
|
|
2398
2481
|
// prettier-ignore
|
|
2399
2482
|
get() {
|
|
2400
|
-
const { Ah: _, Al: C, Bh:
|
|
2401
|
-
return [_, C,
|
|
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];
|
|
2402
2485
|
}
|
|
2403
2486
|
// prettier-ignore
|
|
2404
|
-
set(_, C,
|
|
2405
|
-
this.Ah = _ | 0, this.Al = C | 0, this.Bh =
|
|
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;
|
|
2406
2489
|
}
|
|
2407
2490
|
process(_, C) {
|
|
2408
2491
|
for (let y = 0; y < 16; y++, C += 4)
|
|
2409
|
-
H[y] = _.getUint32(C),
|
|
2492
|
+
H[y] = _.getUint32(C), f[y] = _.getUint32(C += 4);
|
|
2410
2493
|
for (let y = 16; y < 80; y++) {
|
|
2411
|
-
const V = H[y - 15] | 0, k =
|
|
2412
|
-
H[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;
|
|
2413
2496
|
}
|
|
2414
|
-
let { Ah:
|
|
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;
|
|
2415
2498
|
for (let y = 0; y < 80; y++) {
|
|
2416
|
-
const V = e.rotrSH(
|
|
2417
|
-
|
|
2418
|
-
const
|
|
2419
|
-
|
|
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;
|
|
2420
2503
|
}
|
|
2421
|
-
({ h:
|
|
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);
|
|
2422
2505
|
}
|
|
2423
2506
|
roundClean() {
|
|
2424
|
-
(0,
|
|
2507
|
+
(0, s.clean)(H, f);
|
|
2425
2508
|
}
|
|
2426
2509
|
destroy() {
|
|
2427
|
-
(0,
|
|
2510
|
+
(0, s.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
2428
2511
|
}
|
|
2429
2512
|
}
|
|
2430
|
-
|
|
2431
|
-
class
|
|
2513
|
+
P.SHA512 = g;
|
|
2514
|
+
class w extends g {
|
|
2432
2515
|
constructor() {
|
|
2433
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;
|
|
2434
2517
|
}
|
|
2435
2518
|
}
|
|
2436
|
-
|
|
2437
|
-
const
|
|
2519
|
+
P.SHA384 = w;
|
|
2520
|
+
const S = /* @__PURE__ */ Uint32Array.from([
|
|
2438
2521
|
2352822216,
|
|
2439
2522
|
424955298,
|
|
2440
2523
|
1944164710,
|
|
@@ -2469,963 +2552,151 @@ function gs() {
|
|
|
2469
2552
|
246885852,
|
|
2470
2553
|
2177182882
|
|
2471
2554
|
]);
|
|
2472
|
-
class D extends
|
|
2555
|
+
class D extends g {
|
|
2473
2556
|
constructor() {
|
|
2474
|
-
super(28), this.Ah =
|
|
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;
|
|
2475
2558
|
}
|
|
2476
2559
|
}
|
|
2477
|
-
|
|
2478
|
-
class
|
|
2560
|
+
P.SHA512_224 = D;
|
|
2561
|
+
class W extends g {
|
|
2479
2562
|
constructor() {
|
|
2480
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;
|
|
2481
2564
|
}
|
|
2482
2565
|
}
|
|
2483
|
-
return
|
|
2484
|
-
}
|
|
2485
|
-
var Ve;
|
|
2486
|
-
function Js() {
|
|
2487
|
-
if (Ve) return ht;
|
|
2488
|
-
Ve = 1, Object.defineProperty(ht, "__esModule", { value: !0 }), ht.sha224 = ht.SHA224 = ht.sha256 = ht.SHA256 = void 0;
|
|
2489
|
-
const t = /* @__PURE__ */ gs();
|
|
2490
|
-
return ht.SHA256 = t.SHA256, ht.sha256 = t.sha256, ht.SHA224 = t.SHA224, ht.sha224 = t.sha224, ht;
|
|
2491
|
-
}
|
|
2492
|
-
const Ss = BigInt(0), Ot = BigInt(1), ws = BigInt(2), Is = BigInt(7), Bs = BigInt(256), Ls = BigInt(113), h0 = [], f0 = [], d0 = [];
|
|
2493
|
-
for (let t = 0, e = Ot, n = 1, h = 0; t < 24; t++) {
|
|
2494
|
-
[n, h] = [h, (2 * n + 3 * h) % 5], h0.push(2 * (5 * h + n)), f0.push((t + 1) * (t + 2) / 2 % 64);
|
|
2495
|
-
let c = Ss;
|
|
2496
|
-
for (let i = 0; i < 7; i++)
|
|
2497
|
-
e = (e << Ot ^ (e >> Is) * Ls) % Bs, e & ws && (c ^= Ot << (Ot << BigInt(i)) - Ot);
|
|
2498
|
-
d0.push(c);
|
|
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;
|
|
2499
2567
|
}
|
|
2500
|
-
|
|
2501
|
-
function Us(
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
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;
|
|
2574
|
+
}
|
|
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) {
|
|
2585
|
+
Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
|
|
2586
|
+
const e = /* @__PURE__ */ Rt();
|
|
2587
|
+
class s extends e.Hash {
|
|
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")
|
|
2592
|
+
throw new Error("Expected instance of class which extends utils.Hash");
|
|
2593
|
+
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
2594
|
+
const d = this.blockLen, x = new Uint8Array(d);
|
|
2595
|
+
x.set(a.length > d ? c.create().update(a).digest() : a);
|
|
2596
|
+
for (let H = 0; H < x.length; H++)
|
|
2597
|
+
x[H] ^= 54;
|
|
2598
|
+
this.iHash.update(x), this.oHash = c.create();
|
|
2599
|
+
for (let H = 0; H < x.length; H++)
|
|
2600
|
+
x[H] ^= 106;
|
|
2601
|
+
this.oHash.update(x), (0, e.clean)(x);
|
|
2602
|
+
}
|
|
2603
|
+
update(c) {
|
|
2604
|
+
return (0, e.aexists)(this), this.iHash.update(c), this;
|
|
2605
|
+
}
|
|
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();
|
|
2608
|
+
}
|
|
2609
|
+
digest() {
|
|
2610
|
+
const c = new Uint8Array(this.oHash.outputLen);
|
|
2611
|
+
return this.digestInto(c), c;
|
|
2612
|
+
}
|
|
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;
|
|
2617
|
+
}
|
|
2618
|
+
clone() {
|
|
2619
|
+
return this._cloneInto();
|
|
2620
|
+
}
|
|
2621
|
+
destroy() {
|
|
2622
|
+
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
2623
|
+
}
|
|
2521
2624
|
}
|
|
2522
|
-
t
|
|
2523
|
-
|
|
2524
|
-
|
|
2625
|
+
t.HMAC = s;
|
|
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;
|
|
2525
2629
|
}
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
destroyed = !1;
|
|
2533
|
-
blockLen;
|
|
2534
|
-
suffix;
|
|
2535
|
-
outputLen;
|
|
2536
|
-
enableXOF = !1;
|
|
2537
|
-
rounds;
|
|
2538
|
-
// NOTE: we accept arguments in bytes instead of bits here.
|
|
2539
|
-
constructor(e, n, h, c = !1, i = 24) {
|
|
2540
|
-
if (this.blockLen = e, this.suffix = n, this.outputLen = h, this.enableXOF = c, this.rounds = i, Vt(h, "outputLen"), !(0 < e && e < 200))
|
|
2541
|
-
throw new Error("only keccak-f1600 function is supported");
|
|
2542
|
-
this.state = new Uint8Array(200), this.state32 = V0(this.state);
|
|
2543
|
-
}
|
|
2544
|
-
clone() {
|
|
2545
|
-
return this._cloneInto();
|
|
2546
|
-
}
|
|
2547
|
-
keccak() {
|
|
2548
|
-
fe(this.state32), Us(this.state32, this.rounds), fe(this.state32), this.posOut = 0, this.pos = 0;
|
|
2549
|
-
}
|
|
2550
|
-
update(e) {
|
|
2551
|
-
kt(this), Ht(e);
|
|
2552
|
-
const { blockLen: n, state: h } = this, c = e.length;
|
|
2553
|
-
for (let i = 0; i < c; ) {
|
|
2554
|
-
const r = Math.min(n - this.pos, c - i);
|
|
2555
|
-
for (let a = 0; a < r; a++)
|
|
2556
|
-
h[this.pos++] ^= e[i++];
|
|
2557
|
-
this.pos === n && this.keccak();
|
|
2558
|
-
}
|
|
2559
|
-
return this;
|
|
2560
|
-
}
|
|
2561
|
-
finish() {
|
|
2562
|
-
if (this.finished)
|
|
2563
|
-
return;
|
|
2564
|
-
this.finished = !0;
|
|
2565
|
-
const { state: e, suffix: n, pos: h, blockLen: c } = this;
|
|
2566
|
-
e[h] ^= n, (n & 128) !== 0 && h === c - 1 && this.keccak(), e[c - 1] ^= 128, this.keccak();
|
|
2567
|
-
}
|
|
2568
|
-
writeInto(e) {
|
|
2569
|
-
kt(this, !1), Ht(e), this.finish();
|
|
2570
|
-
const n = this.state, { blockLen: h } = this;
|
|
2571
|
-
for (let c = 0, i = e.length; c < i; ) {
|
|
2572
|
-
this.posOut >= h && this.keccak();
|
|
2573
|
-
const r = Math.min(h - this.posOut, i - c);
|
|
2574
|
-
e.set(n.subarray(this.posOut, this.posOut + r), c), this.posOut += r, c += r;
|
|
2575
|
-
}
|
|
2576
|
-
return e;
|
|
2577
|
-
}
|
|
2578
|
-
xofInto(e) {
|
|
2579
|
-
if (!this.enableXOF)
|
|
2580
|
-
throw new Error("XOF is not possible for this instance");
|
|
2581
|
-
return this.writeInto(e);
|
|
2582
|
-
}
|
|
2583
|
-
xof(e) {
|
|
2584
|
-
return Vt(e), this.xofInto(new Uint8Array(e));
|
|
2585
|
-
}
|
|
2586
|
-
digestInto(e) {
|
|
2587
|
-
if (Re(e, this), this.finished)
|
|
2588
|
-
throw new Error("digest() was already called");
|
|
2589
|
-
return this.writeInto(e), this.destroy(), e;
|
|
2590
|
-
}
|
|
2591
|
-
digest() {
|
|
2592
|
-
return this.digestInto(new Uint8Array(this.outputLen));
|
|
2593
|
-
}
|
|
2594
|
-
destroy() {
|
|
2595
|
-
this.destroyed = !0, rt(this.state);
|
|
2596
|
-
}
|
|
2597
|
-
_cloneInto(e) {
|
|
2598
|
-
const { blockLen: n, suffix: h, outputLen: c, rounds: i, enableXOF: r } = this;
|
|
2599
|
-
return e ||= new ae(n, h, c, r, i), e.state32.set(this.state32), e.pos = this.pos, e.posOut = this.posOut, e.finished = this.finished, e.rounds = i, e.suffix = h, e.outputLen = c, e.enableXOF = r, e.destroyed = this.destroyed, e;
|
|
2600
|
-
}
|
|
2601
|
-
}
|
|
2602
|
-
const l0 = (t, e, n, h = {}) => lt((c = {}) => new ae(e, t, c.dkLen === void 0 ? n : c.dkLen, !0), h), zs = /* @__PURE__ */ l0(31, 168, 16, /* @__PURE__ */ mt(11)), Qs = /* @__PURE__ */ l0(31, 136, 32, /* @__PURE__ */ mt(12));
|
|
2603
|
-
function Es(t, e, n, h) {
|
|
2604
|
-
We(t);
|
|
2605
|
-
const c = F0({ dkLen: 32, asyncTick: 10 }, h), { c: i, dkLen: r, asyncTick: a } = c;
|
|
2606
|
-
if (Vt(i, "c"), Vt(r, "dkLen"), Vt(a, "asyncTick"), i < 1)
|
|
2607
|
-
throw new Error("iterations (c) must be >= 1");
|
|
2608
|
-
const b = ue(e, "password"), x = ue(n, "salt"), H = new Uint8Array(r), u = oe.create(t, b), S = u._cloneInto().update(x);
|
|
2609
|
-
return { c: i, dkLen: r, asyncTick: a, DK: H, PRF: u, PRFSalt: S };
|
|
2610
|
-
}
|
|
2611
|
-
function Cs(t, e, n, h, c) {
|
|
2612
|
-
return t.destroy(), e.destroy(), h && h.destroy(), rt(c), n;
|
|
2613
|
-
}
|
|
2614
|
-
function Ys(t, e, n, h) {
|
|
2615
|
-
const { c, dkLen: i, DK: r, PRF: a, PRFSalt: b } = Es(t, e, n, h);
|
|
2616
|
-
let x;
|
|
2617
|
-
const H = new Uint8Array(4), u = Kt(H), S = new Uint8Array(a.outputLen);
|
|
2618
|
-
for (let B = 1, g = 0; g < i; B++, g += a.outputLen) {
|
|
2619
|
-
const I = r.subarray(g, g + a.outputLen);
|
|
2620
|
-
u.setInt32(0, B, !1), (x = b._cloneInto(x)).update(H).digestInto(S), I.set(S.subarray(0, I.length));
|
|
2621
|
-
for (let D = 1; D < c; D++) {
|
|
2622
|
-
a._cloneInto(x).update(S).digestInto(S);
|
|
2623
|
-
for (let R = 0; R < I.length; R++)
|
|
2624
|
-
I[R] ^= S[R];
|
|
2625
|
-
}
|
|
2626
|
-
}
|
|
2627
|
-
return Cs(a, b, r, x, S);
|
|
2628
|
-
}
|
|
2629
|
-
var ft = {}, J = {}, nt = {}, te = {}, vt = {}, Ce;
|
|
2630
|
-
function ks() {
|
|
2631
|
-
return Ce || (Ce = 1, Object.defineProperty(vt, "__esModule", { value: !0 }), vt.crypto = void 0, vt.crypto = typeof globalThis == "object" && "crypto" in globalThis ? globalThis.crypto : void 0), vt;
|
|
2632
|
-
}
|
|
2633
|
-
var ke;
|
|
2634
|
-
function Jt() {
|
|
2635
|
-
return ke || (ke = 1, (function(t) {
|
|
2636
|
-
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 = n, t.anumber = h, t.abytes = c, t.ahash = i, t.aexists = r, t.aoutput = a, t.u8 = b, t.u32 = x, t.clean = H, t.createView = u, t.rotr = S, t.rotl = B, t.byteSwap = g, t.byteSwap32 = I, t.bytesToHex = T, t.hexToBytes = p, t.asyncLoop = U, t.utf8ToBytes = E, t.bytesToUtf8 = o, t.toBytes = f, t.kdfInputToBytes = d, t.concatBytes = L, t.checkOpts = A, t.createHasher = F, t.createOptHasher = O, t.createXOFer = v, t.randomBytes = q;
|
|
2637
|
-
const e = /* @__PURE__ */ ks();
|
|
2638
|
-
function n(s) {
|
|
2639
|
-
return s instanceof Uint8Array || ArrayBuffer.isView(s) && s.constructor.name === "Uint8Array";
|
|
2640
|
-
}
|
|
2641
|
-
function h(s) {
|
|
2642
|
-
if (!Number.isSafeInteger(s) || s < 0)
|
|
2643
|
-
throw new Error("positive integer expected, got " + s);
|
|
2644
|
-
}
|
|
2645
|
-
function c(s, ...l) {
|
|
2646
|
-
if (!n(s))
|
|
2647
|
-
throw new Error("Uint8Array expected");
|
|
2648
|
-
if (l.length > 0 && !l.includes(s.length))
|
|
2649
|
-
throw new Error("Uint8Array expected of length " + l + ", got length=" + s.length);
|
|
2650
|
-
}
|
|
2651
|
-
function i(s) {
|
|
2652
|
-
if (typeof s != "function" || typeof s.create != "function")
|
|
2653
|
-
throw new Error("Hash should be wrapped by utils.createHasher");
|
|
2654
|
-
h(s.outputLen), h(s.blockLen);
|
|
2655
|
-
}
|
|
2656
|
-
function r(s, l = !0) {
|
|
2657
|
-
if (s.destroyed)
|
|
2658
|
-
throw new Error("Hash instance has been destroyed");
|
|
2659
|
-
if (l && s.finished)
|
|
2660
|
-
throw new Error("Hash#digest() has already been called");
|
|
2661
|
-
}
|
|
2662
|
-
function a(s, l) {
|
|
2663
|
-
c(s);
|
|
2664
|
-
const y = l.outputLen;
|
|
2665
|
-
if (s.length < y)
|
|
2666
|
-
throw new Error("digestInto() expects output buffer of length at least " + y);
|
|
2667
|
-
}
|
|
2668
|
-
function b(s) {
|
|
2669
|
-
return new Uint8Array(s.buffer, s.byteOffset, s.byteLength);
|
|
2670
|
-
}
|
|
2671
|
-
function x(s) {
|
|
2672
|
-
return new Uint32Array(s.buffer, s.byteOffset, Math.floor(s.byteLength / 4));
|
|
2673
|
-
}
|
|
2674
|
-
function H(...s) {
|
|
2675
|
-
for (let l = 0; l < s.length; l++)
|
|
2676
|
-
s[l].fill(0);
|
|
2677
|
-
}
|
|
2678
|
-
function u(s) {
|
|
2679
|
-
return new DataView(s.buffer, s.byteOffset, s.byteLength);
|
|
2680
|
-
}
|
|
2681
|
-
function S(s, l) {
|
|
2682
|
-
return s << 32 - l | s >>> l;
|
|
2683
|
-
}
|
|
2684
|
-
function B(s, l) {
|
|
2685
|
-
return s << l | s >>> 32 - l >>> 0;
|
|
2686
|
-
}
|
|
2687
|
-
t.isLE = new Uint8Array(new Uint32Array([287454020]).buffer)[0] === 68;
|
|
2688
|
-
function g(s) {
|
|
2689
|
-
return s << 24 & 4278190080 | s << 8 & 16711680 | s >>> 8 & 65280 | s >>> 24 & 255;
|
|
2690
|
-
}
|
|
2691
|
-
t.swap8IfBE = t.isLE ? (s) => s : (s) => g(s), t.byteSwapIfBE = t.swap8IfBE;
|
|
2692
|
-
function I(s) {
|
|
2693
|
-
for (let l = 0; l < s.length; l++)
|
|
2694
|
-
s[l] = g(s[l]);
|
|
2695
|
-
return s;
|
|
2696
|
-
}
|
|
2697
|
-
t.swap32IfBE = t.isLE ? (s) => s : I;
|
|
2698
|
-
const D = /* @ts-ignore */ typeof Uint8Array.from([]).toHex == "function" && typeof Uint8Array.fromHex == "function", R = /* @__PURE__ */ Array.from({ length: 256 }, (s, l) => l.toString(16).padStart(2, "0"));
|
|
2699
|
-
function T(s) {
|
|
2700
|
-
if (c(s), D)
|
|
2701
|
-
return s.toHex();
|
|
2702
|
-
let l = "";
|
|
2703
|
-
for (let y = 0; y < s.length; y++)
|
|
2704
|
-
l += R[s[y]];
|
|
2705
|
-
return l;
|
|
2706
|
-
}
|
|
2707
|
-
const _ = { _0: 48, _9: 57, A: 65, F: 70, a: 97, f: 102 };
|
|
2708
|
-
function C(s) {
|
|
2709
|
-
if (s >= _._0 && s <= _._9)
|
|
2710
|
-
return s - _._0;
|
|
2711
|
-
if (s >= _.A && s <= _.F)
|
|
2712
|
-
return s - (_.A - 10);
|
|
2713
|
-
if (s >= _.a && s <= _.f)
|
|
2714
|
-
return s - (_.a - 10);
|
|
2715
|
-
}
|
|
2716
|
-
function p(s) {
|
|
2717
|
-
if (typeof s != "string")
|
|
2718
|
-
throw new Error("hex string expected, got " + typeof s);
|
|
2719
|
-
if (D)
|
|
2720
|
-
return Uint8Array.fromHex(s);
|
|
2721
|
-
const l = s.length, y = l / 2;
|
|
2722
|
-
if (l % 2)
|
|
2723
|
-
throw new Error("hex string expected, got unpadded hex of length " + l);
|
|
2724
|
-
const V = new Uint8Array(y);
|
|
2725
|
-
for (let k = 0, M = 0; k < y; k++, M += 2) {
|
|
2726
|
-
const z = C(s.charCodeAt(M)), P = C(s.charCodeAt(M + 1));
|
|
2727
|
-
if (z === void 0 || P === void 0) {
|
|
2728
|
-
const K = s[M] + s[M + 1];
|
|
2729
|
-
throw new Error('hex string expected, got non-hex character "' + K + '" at index ' + M);
|
|
2730
|
-
}
|
|
2731
|
-
V[k] = z * 16 + P;
|
|
2732
|
-
}
|
|
2733
|
-
return V;
|
|
2734
|
-
}
|
|
2735
|
-
const w = async () => {
|
|
2736
|
-
};
|
|
2737
|
-
t.nextTick = w;
|
|
2738
|
-
async function U(s, l, y) {
|
|
2739
|
-
let V = Date.now();
|
|
2740
|
-
for (let k = 0; k < s; k++) {
|
|
2741
|
-
y(k);
|
|
2742
|
-
const M = Date.now() - V;
|
|
2743
|
-
M >= 0 && M < l || (await (0, t.nextTick)(), V += M);
|
|
2744
|
-
}
|
|
2745
|
-
}
|
|
2746
|
-
function E(s) {
|
|
2747
|
-
if (typeof s != "string")
|
|
2748
|
-
throw new Error("string expected");
|
|
2749
|
-
return new Uint8Array(new TextEncoder().encode(s));
|
|
2750
|
-
}
|
|
2751
|
-
function o(s) {
|
|
2752
|
-
return new TextDecoder().decode(s);
|
|
2753
|
-
}
|
|
2754
|
-
function f(s) {
|
|
2755
|
-
return typeof s == "string" && (s = E(s)), c(s), s;
|
|
2756
|
-
}
|
|
2757
|
-
function d(s) {
|
|
2758
|
-
return typeof s == "string" && (s = E(s)), c(s), s;
|
|
2759
|
-
}
|
|
2760
|
-
function L(...s) {
|
|
2761
|
-
let l = 0;
|
|
2762
|
-
for (let V = 0; V < s.length; V++) {
|
|
2763
|
-
const k = s[V];
|
|
2764
|
-
c(k), l += k.length;
|
|
2765
|
-
}
|
|
2766
|
-
const y = new Uint8Array(l);
|
|
2767
|
-
for (let V = 0, k = 0; V < s.length; V++) {
|
|
2768
|
-
const M = s[V];
|
|
2769
|
-
y.set(M, k), k += M.length;
|
|
2770
|
-
}
|
|
2771
|
-
return y;
|
|
2772
|
-
}
|
|
2773
|
-
function A(s, l) {
|
|
2774
|
-
if (l !== void 0 && {}.toString.call(l) !== "[object Object]")
|
|
2775
|
-
throw new Error("options should be object or undefined");
|
|
2776
|
-
return Object.assign(s, l);
|
|
2777
|
-
}
|
|
2778
|
-
class m {
|
|
2779
|
-
}
|
|
2780
|
-
t.Hash = m;
|
|
2781
|
-
function F(s) {
|
|
2782
|
-
const l = (V) => s().update(f(V)).digest(), y = s();
|
|
2783
|
-
return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = () => s(), l;
|
|
2784
|
-
}
|
|
2785
|
-
function O(s) {
|
|
2786
|
-
const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
|
|
2787
|
-
return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
|
|
2788
|
-
}
|
|
2789
|
-
function v(s) {
|
|
2790
|
-
const l = (V, k) => s(k).update(f(V)).digest(), y = s({});
|
|
2791
|
-
return l.outputLen = y.outputLen, l.blockLen = y.blockLen, l.create = (V) => s(V), l;
|
|
2792
|
-
}
|
|
2793
|
-
t.wrapConstructor = F, t.wrapConstructorWithOpts = O, t.wrapXOFConstructorWithOpts = v;
|
|
2794
|
-
function q(s = 32) {
|
|
2795
|
-
if (e.crypto && typeof e.crypto.getRandomValues == "function")
|
|
2796
|
-
return e.crypto.getRandomValues(new Uint8Array(s));
|
|
2797
|
-
if (e.crypto && typeof e.crypto.randomBytes == "function")
|
|
2798
|
-
return Uint8Array.from(e.crypto.randomBytes(s));
|
|
2799
|
-
throw new Error("crypto.getRandomValues must be defined");
|
|
2800
|
-
}
|
|
2801
|
-
})(te)), te;
|
|
2802
|
-
}
|
|
2803
|
-
var De;
|
|
2804
|
-
function Ds() {
|
|
2805
|
-
if (De) return nt;
|
|
2806
|
-
De = 1, Object.defineProperty(nt, "__esModule", { value: !0 }), nt.SHA512_IV = nt.SHA384_IV = nt.SHA224_IV = nt.SHA256_IV = nt.HashMD = void 0, nt.setBigUint64 = e, nt.Chi = n, nt.Maj = h;
|
|
2807
|
-
const t = /* @__PURE__ */ Jt();
|
|
2808
|
-
function e(i, r, a, b) {
|
|
2809
|
-
if (typeof i.setBigUint64 == "function")
|
|
2810
|
-
return i.setBigUint64(r, a, b);
|
|
2811
|
-
const x = BigInt(32), H = BigInt(4294967295), u = Number(a >> x & H), S = Number(a & H), B = b ? 4 : 0, g = b ? 0 : 4;
|
|
2812
|
-
i.setUint32(r + B, u, b), i.setUint32(r + g, S, b);
|
|
2813
|
-
}
|
|
2814
|
-
function n(i, r, a) {
|
|
2815
|
-
return i & r ^ ~i & a;
|
|
2816
|
-
}
|
|
2817
|
-
function h(i, r, a) {
|
|
2818
|
-
return i & r ^ i & a ^ r & a;
|
|
2819
|
-
}
|
|
2820
|
-
class c extends t.Hash {
|
|
2821
|
-
constructor(r, a, b, x) {
|
|
2822
|
-
super(), this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.blockLen = r, this.outputLen = a, this.padOffset = b, this.isLE = x, this.buffer = new Uint8Array(r), this.view = (0, t.createView)(this.buffer);
|
|
2823
|
-
}
|
|
2824
|
-
update(r) {
|
|
2825
|
-
(0, t.aexists)(this), r = (0, t.toBytes)(r), (0, t.abytes)(r);
|
|
2826
|
-
const { view: a, buffer: b, blockLen: x } = this, H = r.length;
|
|
2827
|
-
for (let u = 0; u < H; ) {
|
|
2828
|
-
const S = Math.min(x - this.pos, H - u);
|
|
2829
|
-
if (S === x) {
|
|
2830
|
-
const B = (0, t.createView)(r);
|
|
2831
|
-
for (; x <= H - u; u += x)
|
|
2832
|
-
this.process(B, u);
|
|
2833
|
-
continue;
|
|
2834
|
-
}
|
|
2835
|
-
b.set(r.subarray(u, u + S), this.pos), this.pos += S, u += S, this.pos === x && (this.process(a, 0), this.pos = 0);
|
|
2836
|
-
}
|
|
2837
|
-
return this.length += r.length, this.roundClean(), this;
|
|
2838
|
-
}
|
|
2839
|
-
digestInto(r) {
|
|
2840
|
-
(0, t.aexists)(this), (0, t.aoutput)(r, this), this.finished = !0;
|
|
2841
|
-
const { buffer: a, view: b, blockLen: x, isLE: H } = this;
|
|
2842
|
-
let { pos: u } = this;
|
|
2843
|
-
a[u++] = 128, (0, t.clean)(this.buffer.subarray(u)), this.padOffset > x - u && (this.process(b, 0), u = 0);
|
|
2844
|
-
for (let D = u; D < x; D++)
|
|
2845
|
-
a[D] = 0;
|
|
2846
|
-
e(b, x - 8, BigInt(this.length * 8), H), this.process(b, 0);
|
|
2847
|
-
const S = (0, t.createView)(r), B = this.outputLen;
|
|
2848
|
-
if (B % 4)
|
|
2849
|
-
throw new Error("_sha2: outputLen should be aligned to 32bit");
|
|
2850
|
-
const g = B / 4, I = this.get();
|
|
2851
|
-
if (g > I.length)
|
|
2852
|
-
throw new Error("_sha2: outputLen bigger than state");
|
|
2853
|
-
for (let D = 0; D < g; D++)
|
|
2854
|
-
S.setUint32(4 * D, I[D], H);
|
|
2855
|
-
}
|
|
2856
|
-
digest() {
|
|
2857
|
-
const { buffer: r, outputLen: a } = this;
|
|
2858
|
-
this.digestInto(r);
|
|
2859
|
-
const b = r.slice(0, a);
|
|
2860
|
-
return this.destroy(), b;
|
|
2861
|
-
}
|
|
2862
|
-
_cloneInto(r) {
|
|
2863
|
-
r || (r = new this.constructor()), r.set(...this.get());
|
|
2864
|
-
const { blockLen: a, buffer: b, length: x, finished: H, destroyed: u, pos: S } = this;
|
|
2865
|
-
return r.destroyed = u, r.finished = H, r.length = x, r.pos = S, x % a && r.buffer.set(b), r;
|
|
2866
|
-
}
|
|
2867
|
-
clone() {
|
|
2868
|
-
return this._cloneInto();
|
|
2869
|
-
}
|
|
2870
|
-
}
|
|
2871
|
-
return nt.HashMD = c, nt.SHA256_IV = Uint32Array.from([
|
|
2872
|
-
1779033703,
|
|
2873
|
-
3144134277,
|
|
2874
|
-
1013904242,
|
|
2875
|
-
2773480762,
|
|
2876
|
-
1359893119,
|
|
2877
|
-
2600822924,
|
|
2878
|
-
528734635,
|
|
2879
|
-
1541459225
|
|
2880
|
-
]), nt.SHA224_IV = Uint32Array.from([
|
|
2881
|
-
3238371032,
|
|
2882
|
-
914150663,
|
|
2883
|
-
812702999,
|
|
2884
|
-
4144912697,
|
|
2885
|
-
4290775857,
|
|
2886
|
-
1750603025,
|
|
2887
|
-
1694076839,
|
|
2888
|
-
3204075428
|
|
2889
|
-
]), nt.SHA384_IV = Uint32Array.from([
|
|
2890
|
-
3418070365,
|
|
2891
|
-
3238371032,
|
|
2892
|
-
1654270250,
|
|
2893
|
-
914150663,
|
|
2894
|
-
2438529370,
|
|
2895
|
-
812702999,
|
|
2896
|
-
355462360,
|
|
2897
|
-
4144912697,
|
|
2898
|
-
1731405415,
|
|
2899
|
-
4290775857,
|
|
2900
|
-
2394180231,
|
|
2901
|
-
1750603025,
|
|
2902
|
-
3675008525,
|
|
2903
|
-
1694076839,
|
|
2904
|
-
1203062813,
|
|
2905
|
-
3204075428
|
|
2906
|
-
]), nt.SHA512_IV = Uint32Array.from([
|
|
2907
|
-
1779033703,
|
|
2908
|
-
4089235720,
|
|
2909
|
-
3144134277,
|
|
2910
|
-
2227873595,
|
|
2911
|
-
1013904242,
|
|
2912
|
-
4271175723,
|
|
2913
|
-
2773480762,
|
|
2914
|
-
1595750129,
|
|
2915
|
-
1359893119,
|
|
2916
|
-
2917565137,
|
|
2917
|
-
2600822924,
|
|
2918
|
-
725511199,
|
|
2919
|
-
528734635,
|
|
2920
|
-
4215389547,
|
|
2921
|
-
1541459225,
|
|
2922
|
-
327033209
|
|
2923
|
-
]), nt;
|
|
2924
|
-
}
|
|
2925
|
-
var W = {}, Fe;
|
|
2926
|
-
function Fs() {
|
|
2927
|
-
if (Fe) return W;
|
|
2928
|
-
Fe = 1, Object.defineProperty(W, "__esModule", { value: !0 }), W.toBig = W.shrSL = W.shrSH = W.rotrSL = W.rotrSH = W.rotrBL = W.rotrBH = W.rotr32L = W.rotr32H = W.rotlSL = W.rotlSH = W.rotlBL = W.rotlBH = W.add5L = W.add5H = W.add4L = W.add4H = W.add3L = W.add3H = void 0, W.add = R, W.fromBig = n, W.split = h;
|
|
2929
|
-
const t = /* @__PURE__ */ BigInt(2 ** 32 - 1), e = /* @__PURE__ */ BigInt(32);
|
|
2930
|
-
function n(o, f = !1) {
|
|
2931
|
-
return f ? { h: Number(o & t), l: Number(o >> e & t) } : { h: Number(o >> e & t) | 0, l: Number(o & t) | 0 };
|
|
2932
|
-
}
|
|
2933
|
-
function h(o, f = !1) {
|
|
2934
|
-
const d = o.length;
|
|
2935
|
-
let L = new Uint32Array(d), A = new Uint32Array(d);
|
|
2936
|
-
for (let m = 0; m < d; m++) {
|
|
2937
|
-
const { h: F, l: O } = n(o[m], f);
|
|
2938
|
-
[L[m], A[m]] = [F, O];
|
|
2939
|
-
}
|
|
2940
|
-
return [L, A];
|
|
2941
|
-
}
|
|
2942
|
-
const c = (o, f) => BigInt(o >>> 0) << e | BigInt(f >>> 0);
|
|
2943
|
-
W.toBig = c;
|
|
2944
|
-
const i = (o, f, d) => o >>> d;
|
|
2945
|
-
W.shrSH = i;
|
|
2946
|
-
const r = (o, f, d) => o << 32 - d | f >>> d;
|
|
2947
|
-
W.shrSL = r;
|
|
2948
|
-
const a = (o, f, d) => o >>> d | f << 32 - d;
|
|
2949
|
-
W.rotrSH = a;
|
|
2950
|
-
const b = (o, f, d) => o << 32 - d | f >>> d;
|
|
2951
|
-
W.rotrSL = b;
|
|
2952
|
-
const x = (o, f, d) => o << 64 - d | f >>> d - 32;
|
|
2953
|
-
W.rotrBH = x;
|
|
2954
|
-
const H = (o, f, d) => o >>> d - 32 | f << 64 - d;
|
|
2955
|
-
W.rotrBL = H;
|
|
2956
|
-
const u = (o, f) => f;
|
|
2957
|
-
W.rotr32H = u;
|
|
2958
|
-
const S = (o, f) => o;
|
|
2959
|
-
W.rotr32L = S;
|
|
2960
|
-
const B = (o, f, d) => o << d | f >>> 32 - d;
|
|
2961
|
-
W.rotlSH = B;
|
|
2962
|
-
const g = (o, f, d) => f << d | o >>> 32 - d;
|
|
2963
|
-
W.rotlSL = g;
|
|
2964
|
-
const I = (o, f, d) => f << d - 32 | o >>> 64 - d;
|
|
2965
|
-
W.rotlBH = I;
|
|
2966
|
-
const D = (o, f, d) => o << d - 32 | f >>> 64 - d;
|
|
2967
|
-
W.rotlBL = D;
|
|
2968
|
-
function R(o, f, d, L) {
|
|
2969
|
-
const A = (f >>> 0) + (L >>> 0);
|
|
2970
|
-
return { h: o + d + (A / 2 ** 32 | 0) | 0, l: A | 0 };
|
|
2971
|
-
}
|
|
2972
|
-
const T = (o, f, d) => (o >>> 0) + (f >>> 0) + (d >>> 0);
|
|
2973
|
-
W.add3L = T;
|
|
2974
|
-
const _ = (o, f, d, L) => f + d + L + (o / 2 ** 32 | 0) | 0;
|
|
2975
|
-
W.add3H = _;
|
|
2976
|
-
const C = (o, f, d, L) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0);
|
|
2977
|
-
W.add4L = C;
|
|
2978
|
-
const p = (o, f, d, L, A) => f + d + L + A + (o / 2 ** 32 | 0) | 0;
|
|
2979
|
-
W.add4H = p;
|
|
2980
|
-
const w = (o, f, d, L, A) => (o >>> 0) + (f >>> 0) + (d >>> 0) + (L >>> 0) + (A >>> 0);
|
|
2981
|
-
W.add5L = w;
|
|
2982
|
-
const U = (o, f, d, L, A, m) => f + d + L + A + m + (o / 2 ** 32 | 0) | 0;
|
|
2983
|
-
W.add5H = U;
|
|
2984
|
-
const E = {
|
|
2985
|
-
fromBig: n,
|
|
2986
|
-
split: h,
|
|
2987
|
-
toBig: c,
|
|
2988
|
-
shrSH: i,
|
|
2989
|
-
shrSL: r,
|
|
2990
|
-
rotrSH: a,
|
|
2991
|
-
rotrSL: b,
|
|
2992
|
-
rotrBH: x,
|
|
2993
|
-
rotrBL: H,
|
|
2994
|
-
rotr32H: u,
|
|
2995
|
-
rotr32L: S,
|
|
2996
|
-
rotlSH: B,
|
|
2997
|
-
rotlSL: g,
|
|
2998
|
-
rotlBH: I,
|
|
2999
|
-
rotlBL: D,
|
|
3000
|
-
add: R,
|
|
3001
|
-
add3L: T,
|
|
3002
|
-
add3H: _,
|
|
3003
|
-
add4L: C,
|
|
3004
|
-
add4H: p,
|
|
3005
|
-
add5H: U,
|
|
3006
|
-
add5L: w
|
|
3007
|
-
};
|
|
3008
|
-
return W.default = E, W;
|
|
3009
|
-
}
|
|
3010
|
-
var Te;
|
|
3011
|
-
function b0() {
|
|
3012
|
-
if (Te) return J;
|
|
3013
|
-
Te = 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;
|
|
3014
|
-
const t = /* @__PURE__ */ Ds(), e = /* @__PURE__ */ Fs(), n = /* @__PURE__ */ Jt(), h = /* @__PURE__ */ Uint32Array.from([
|
|
3015
|
-
1116352408,
|
|
3016
|
-
1899447441,
|
|
3017
|
-
3049323471,
|
|
3018
|
-
3921009573,
|
|
3019
|
-
961987163,
|
|
3020
|
-
1508970993,
|
|
3021
|
-
2453635748,
|
|
3022
|
-
2870763221,
|
|
3023
|
-
3624381080,
|
|
3024
|
-
310598401,
|
|
3025
|
-
607225278,
|
|
3026
|
-
1426881987,
|
|
3027
|
-
1925078388,
|
|
3028
|
-
2162078206,
|
|
3029
|
-
2614888103,
|
|
3030
|
-
3248222580,
|
|
3031
|
-
3835390401,
|
|
3032
|
-
4022224774,
|
|
3033
|
-
264347078,
|
|
3034
|
-
604807628,
|
|
3035
|
-
770255983,
|
|
3036
|
-
1249150122,
|
|
3037
|
-
1555081692,
|
|
3038
|
-
1996064986,
|
|
3039
|
-
2554220882,
|
|
3040
|
-
2821834349,
|
|
3041
|
-
2952996808,
|
|
3042
|
-
3210313671,
|
|
3043
|
-
3336571891,
|
|
3044
|
-
3584528711,
|
|
3045
|
-
113926993,
|
|
3046
|
-
338241895,
|
|
3047
|
-
666307205,
|
|
3048
|
-
773529912,
|
|
3049
|
-
1294757372,
|
|
3050
|
-
1396182291,
|
|
3051
|
-
1695183700,
|
|
3052
|
-
1986661051,
|
|
3053
|
-
2177026350,
|
|
3054
|
-
2456956037,
|
|
3055
|
-
2730485921,
|
|
3056
|
-
2820302411,
|
|
3057
|
-
3259730800,
|
|
3058
|
-
3345764771,
|
|
3059
|
-
3516065817,
|
|
3060
|
-
3600352804,
|
|
3061
|
-
4094571909,
|
|
3062
|
-
275423344,
|
|
3063
|
-
430227734,
|
|
3064
|
-
506948616,
|
|
3065
|
-
659060556,
|
|
3066
|
-
883997877,
|
|
3067
|
-
958139571,
|
|
3068
|
-
1322822218,
|
|
3069
|
-
1537002063,
|
|
3070
|
-
1747873779,
|
|
3071
|
-
1955562222,
|
|
3072
|
-
2024104815,
|
|
3073
|
-
2227730452,
|
|
3074
|
-
2361852424,
|
|
3075
|
-
2428436474,
|
|
3076
|
-
2756734187,
|
|
3077
|
-
3204031479,
|
|
3078
|
-
3329325298
|
|
3079
|
-
]), c = /* @__PURE__ */ new Uint32Array(64);
|
|
3080
|
-
class i extends t.HashMD {
|
|
3081
|
-
constructor(_ = 32) {
|
|
3082
|
-
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;
|
|
3083
|
-
}
|
|
3084
|
-
get() {
|
|
3085
|
-
const { A: _, B: C, C: p, D: w, E: U, F: E, G: o, H: f } = this;
|
|
3086
|
-
return [_, C, p, w, U, E, o, f];
|
|
3087
|
-
}
|
|
3088
|
-
// prettier-ignore
|
|
3089
|
-
set(_, C, p, w, U, E, o, f) {
|
|
3090
|
-
this.A = _ | 0, this.B = C | 0, this.C = p | 0, this.D = w | 0, this.E = U | 0, this.F = E | 0, this.G = o | 0, this.H = f | 0;
|
|
3091
|
-
}
|
|
3092
|
-
process(_, C) {
|
|
3093
|
-
for (let A = 0; A < 16; A++, C += 4)
|
|
3094
|
-
c[A] = _.getUint32(C, !1);
|
|
3095
|
-
for (let A = 16; A < 64; A++) {
|
|
3096
|
-
const m = c[A - 15], F = c[A - 2], O = (0, n.rotr)(m, 7) ^ (0, n.rotr)(m, 18) ^ m >>> 3, v = (0, n.rotr)(F, 17) ^ (0, n.rotr)(F, 19) ^ F >>> 10;
|
|
3097
|
-
c[A] = v + c[A - 7] + O + c[A - 16] | 0;
|
|
3098
|
-
}
|
|
3099
|
-
let { A: p, B: w, C: U, D: E, E: o, F: f, G: d, H: L } = this;
|
|
3100
|
-
for (let A = 0; A < 64; A++) {
|
|
3101
|
-
const m = (0, n.rotr)(o, 6) ^ (0, n.rotr)(o, 11) ^ (0, n.rotr)(o, 25), F = L + m + (0, t.Chi)(o, f, d) + h[A] + c[A] | 0, v = ((0, n.rotr)(p, 2) ^ (0, n.rotr)(p, 13) ^ (0, n.rotr)(p, 22)) + (0, t.Maj)(p, w, U) | 0;
|
|
3102
|
-
L = d, d = f, f = o, o = E + F | 0, E = U, U = w, w = p, p = F + v | 0;
|
|
3103
|
-
}
|
|
3104
|
-
p = p + this.A | 0, w = w + this.B | 0, U = U + this.C | 0, E = E + this.D | 0, o = o + this.E | 0, f = f + this.F | 0, d = d + this.G | 0, L = L + this.H | 0, this.set(p, w, U, E, o, f, d, L);
|
|
3105
|
-
}
|
|
3106
|
-
roundClean() {
|
|
3107
|
-
(0, n.clean)(c);
|
|
3108
|
-
}
|
|
3109
|
-
destroy() {
|
|
3110
|
-
this.set(0, 0, 0, 0, 0, 0, 0, 0), (0, n.clean)(this.buffer);
|
|
3111
|
-
}
|
|
3112
|
-
}
|
|
3113
|
-
J.SHA256 = i;
|
|
3114
|
-
class r extends i {
|
|
3115
|
-
constructor() {
|
|
3116
|
-
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;
|
|
3117
|
-
}
|
|
3118
|
-
}
|
|
3119
|
-
J.SHA224 = r;
|
|
3120
|
-
const a = e.split([
|
|
3121
|
-
"0x428a2f98d728ae22",
|
|
3122
|
-
"0x7137449123ef65cd",
|
|
3123
|
-
"0xb5c0fbcfec4d3b2f",
|
|
3124
|
-
"0xe9b5dba58189dbbc",
|
|
3125
|
-
"0x3956c25bf348b538",
|
|
3126
|
-
"0x59f111f1b605d019",
|
|
3127
|
-
"0x923f82a4af194f9b",
|
|
3128
|
-
"0xab1c5ed5da6d8118",
|
|
3129
|
-
"0xd807aa98a3030242",
|
|
3130
|
-
"0x12835b0145706fbe",
|
|
3131
|
-
"0x243185be4ee4b28c",
|
|
3132
|
-
"0x550c7dc3d5ffb4e2",
|
|
3133
|
-
"0x72be5d74f27b896f",
|
|
3134
|
-
"0x80deb1fe3b1696b1",
|
|
3135
|
-
"0x9bdc06a725c71235",
|
|
3136
|
-
"0xc19bf174cf692694",
|
|
3137
|
-
"0xe49b69c19ef14ad2",
|
|
3138
|
-
"0xefbe4786384f25e3",
|
|
3139
|
-
"0x0fc19dc68b8cd5b5",
|
|
3140
|
-
"0x240ca1cc77ac9c65",
|
|
3141
|
-
"0x2de92c6f592b0275",
|
|
3142
|
-
"0x4a7484aa6ea6e483",
|
|
3143
|
-
"0x5cb0a9dcbd41fbd4",
|
|
3144
|
-
"0x76f988da831153b5",
|
|
3145
|
-
"0x983e5152ee66dfab",
|
|
3146
|
-
"0xa831c66d2db43210",
|
|
3147
|
-
"0xb00327c898fb213f",
|
|
3148
|
-
"0xbf597fc7beef0ee4",
|
|
3149
|
-
"0xc6e00bf33da88fc2",
|
|
3150
|
-
"0xd5a79147930aa725",
|
|
3151
|
-
"0x06ca6351e003826f",
|
|
3152
|
-
"0x142929670a0e6e70",
|
|
3153
|
-
"0x27b70a8546d22ffc",
|
|
3154
|
-
"0x2e1b21385c26c926",
|
|
3155
|
-
"0x4d2c6dfc5ac42aed",
|
|
3156
|
-
"0x53380d139d95b3df",
|
|
3157
|
-
"0x650a73548baf63de",
|
|
3158
|
-
"0x766a0abb3c77b2a8",
|
|
3159
|
-
"0x81c2c92e47edaee6",
|
|
3160
|
-
"0x92722c851482353b",
|
|
3161
|
-
"0xa2bfe8a14cf10364",
|
|
3162
|
-
"0xa81a664bbc423001",
|
|
3163
|
-
"0xc24b8b70d0f89791",
|
|
3164
|
-
"0xc76c51a30654be30",
|
|
3165
|
-
"0xd192e819d6ef5218",
|
|
3166
|
-
"0xd69906245565a910",
|
|
3167
|
-
"0xf40e35855771202a",
|
|
3168
|
-
"0x106aa07032bbd1b8",
|
|
3169
|
-
"0x19a4c116b8d2d0c8",
|
|
3170
|
-
"0x1e376c085141ab53",
|
|
3171
|
-
"0x2748774cdf8eeb99",
|
|
3172
|
-
"0x34b0bcb5e19b48a8",
|
|
3173
|
-
"0x391c0cb3c5c95a63",
|
|
3174
|
-
"0x4ed8aa4ae3418acb",
|
|
3175
|
-
"0x5b9cca4f7763e373",
|
|
3176
|
-
"0x682e6ff3d6b2b8a3",
|
|
3177
|
-
"0x748f82ee5defb2fc",
|
|
3178
|
-
"0x78a5636f43172f60",
|
|
3179
|
-
"0x84c87814a1f0ab72",
|
|
3180
|
-
"0x8cc702081a6439ec",
|
|
3181
|
-
"0x90befffa23631e28",
|
|
3182
|
-
"0xa4506cebde82bde9",
|
|
3183
|
-
"0xbef9a3f7b2c67915",
|
|
3184
|
-
"0xc67178f2e372532b",
|
|
3185
|
-
"0xca273eceea26619c",
|
|
3186
|
-
"0xd186b8c721c0c207",
|
|
3187
|
-
"0xeada7dd6cde0eb1e",
|
|
3188
|
-
"0xf57d4f7fee6ed178",
|
|
3189
|
-
"0x06f067aa72176fba",
|
|
3190
|
-
"0x0a637dc5a2c898a6",
|
|
3191
|
-
"0x113f9804bef90dae",
|
|
3192
|
-
"0x1b710b35131c471b",
|
|
3193
|
-
"0x28db77f523047d84",
|
|
3194
|
-
"0x32caab7b40c72493",
|
|
3195
|
-
"0x3c9ebe0a15c9bebc",
|
|
3196
|
-
"0x431d67c49c100d4c",
|
|
3197
|
-
"0x4cc5d4becb3e42b6",
|
|
3198
|
-
"0x597f299cfc657e2a",
|
|
3199
|
-
"0x5fcb6fab3ad6faec",
|
|
3200
|
-
"0x6c44198c4a475817"
|
|
3201
|
-
].map((T) => BigInt(T))), b = a[0], x = a[1], H = /* @__PURE__ */ new Uint32Array(80), u = /* @__PURE__ */ new Uint32Array(80);
|
|
3202
|
-
class S extends t.HashMD {
|
|
3203
|
-
constructor(_ = 64) {
|
|
3204
|
-
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;
|
|
3205
|
-
}
|
|
3206
|
-
// prettier-ignore
|
|
3207
|
-
get() {
|
|
3208
|
-
const { Ah: _, Al: C, Bh: p, Bl: w, Ch: U, Cl: E, Dh: o, Dl: f, Eh: d, El: L, Fh: A, Fl: m, Gh: F, Gl: O, Hh: v, Hl: q } = this;
|
|
3209
|
-
return [_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q];
|
|
3210
|
-
}
|
|
3211
|
-
// prettier-ignore
|
|
3212
|
-
set(_, C, p, w, U, E, o, f, d, L, A, m, F, O, v, q) {
|
|
3213
|
-
this.Ah = _ | 0, this.Al = C | 0, this.Bh = p | 0, this.Bl = w | 0, this.Ch = U | 0, this.Cl = E | 0, this.Dh = o | 0, this.Dl = f | 0, this.Eh = d | 0, this.El = L | 0, this.Fh = A | 0, this.Fl = m | 0, this.Gh = F | 0, this.Gl = O | 0, this.Hh = v | 0, this.Hl = q | 0;
|
|
3214
|
-
}
|
|
3215
|
-
process(_, C) {
|
|
3216
|
-
for (let y = 0; y < 16; y++, C += 4)
|
|
3217
|
-
H[y] = _.getUint32(C), u[y] = _.getUint32(C += 4);
|
|
3218
|
-
for (let y = 16; y < 80; y++) {
|
|
3219
|
-
const V = H[y - 15] | 0, k = u[y - 15] | 0, M = e.rotrSH(V, k, 1) ^ e.rotrSH(V, k, 8) ^ e.shrSH(V, k, 7), z = e.rotrSL(V, k, 1) ^ e.rotrSL(V, k, 8) ^ e.shrSL(V, k, 7), P = H[y - 2] | 0, K = u[y - 2] | 0, it = e.rotrSH(P, K, 19) ^ e.rotrBH(P, K, 61) ^ e.shrSH(P, K, 6), ot = e.rotrSL(P, K, 19) ^ e.rotrBL(P, K, 61) ^ e.shrSL(P, K, 6), ct = e.add4L(z, ot, u[y - 7], u[y - 16]), at = e.add4H(ct, M, it, H[y - 7], H[y - 16]);
|
|
3220
|
-
H[y] = at | 0, u[y] = ct | 0;
|
|
3221
|
-
}
|
|
3222
|
-
let { Ah: p, Al: w, Bh: U, Bl: E, Ch: o, Cl: f, Dh: d, Dl: L, Eh: A, El: m, Fh: F, Fl: O, Gh: v, Gl: q, Hh: s, Hl: l } = this;
|
|
3223
|
-
for (let y = 0; y < 80; y++) {
|
|
3224
|
-
const V = e.rotrSH(A, m, 14) ^ e.rotrSH(A, m, 18) ^ e.rotrBH(A, m, 41), k = e.rotrSL(A, m, 14) ^ e.rotrSL(A, m, 18) ^ e.rotrBL(A, m, 41), M = A & F ^ ~A & v, z = m & O ^ ~m & q, P = e.add5L(l, k, z, x[y], u[y]), K = e.add5H(P, s, V, M, b[y], H[y]), it = P | 0, ot = e.rotrSH(p, w, 28) ^ e.rotrBH(p, w, 34) ^ e.rotrBH(p, w, 39), ct = e.rotrSL(p, w, 28) ^ e.rotrBL(p, w, 34) ^ e.rotrBL(p, w, 39), at = p & U ^ p & o ^ U & o, Dt = w & E ^ w & f ^ E & f;
|
|
3225
|
-
s = v | 0, l = q | 0, v = F | 0, q = O | 0, F = A | 0, O = m | 0, { h: A, l: m } = e.add(d | 0, L | 0, K | 0, it | 0), d = o | 0, L = f | 0, o = U | 0, f = E | 0, U = p | 0, E = w | 0;
|
|
3226
|
-
const At = e.add3L(it, ct, Dt);
|
|
3227
|
-
p = e.add3H(At, K, ot, at), w = At | 0;
|
|
3228
|
-
}
|
|
3229
|
-
({ h: p, l: w } = e.add(this.Ah | 0, this.Al | 0, p | 0, w | 0)), { h: U, l: E } = e.add(this.Bh | 0, this.Bl | 0, U | 0, E | 0), { h: o, l: f } = e.add(this.Ch | 0, this.Cl | 0, o | 0, f | 0), { h: d, l: L } = e.add(this.Dh | 0, this.Dl | 0, d | 0, L | 0), { h: A, l: m } = e.add(this.Eh | 0, this.El | 0, A | 0, m | 0), { h: F, l: O } = e.add(this.Fh | 0, this.Fl | 0, F | 0, O | 0), { h: v, l: q } = e.add(this.Gh | 0, this.Gl | 0, v | 0, q | 0), { h: s, l } = e.add(this.Hh | 0, this.Hl | 0, s | 0, l | 0), this.set(p, w, U, E, o, f, d, L, A, m, F, O, v, q, s, l);
|
|
3230
|
-
}
|
|
3231
|
-
roundClean() {
|
|
3232
|
-
(0, n.clean)(H, u);
|
|
3233
|
-
}
|
|
3234
|
-
destroy() {
|
|
3235
|
-
(0, n.clean)(this.buffer), this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
3236
|
-
}
|
|
3237
|
-
}
|
|
3238
|
-
J.SHA512 = S;
|
|
3239
|
-
class B extends S {
|
|
3240
|
-
constructor() {
|
|
3241
|
-
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;
|
|
3242
|
-
}
|
|
3243
|
-
}
|
|
3244
|
-
J.SHA384 = B;
|
|
3245
|
-
const g = /* @__PURE__ */ Uint32Array.from([
|
|
3246
|
-
2352822216,
|
|
3247
|
-
424955298,
|
|
3248
|
-
1944164710,
|
|
3249
|
-
2312950998,
|
|
3250
|
-
502970286,
|
|
3251
|
-
855612546,
|
|
3252
|
-
1738396948,
|
|
3253
|
-
1479516111,
|
|
3254
|
-
258812777,
|
|
3255
|
-
2077511080,
|
|
3256
|
-
2011393907,
|
|
3257
|
-
79989058,
|
|
3258
|
-
1067287976,
|
|
3259
|
-
1780299464,
|
|
3260
|
-
286451373,
|
|
3261
|
-
2446758561
|
|
3262
|
-
]), I = /* @__PURE__ */ Uint32Array.from([
|
|
3263
|
-
573645204,
|
|
3264
|
-
4230739756,
|
|
3265
|
-
2673172387,
|
|
3266
|
-
3360449730,
|
|
3267
|
-
596883563,
|
|
3268
|
-
1867755857,
|
|
3269
|
-
2520282905,
|
|
3270
|
-
1497426621,
|
|
3271
|
-
2519219938,
|
|
3272
|
-
2827943907,
|
|
3273
|
-
3193839141,
|
|
3274
|
-
1401305490,
|
|
3275
|
-
721525244,
|
|
3276
|
-
746961066,
|
|
3277
|
-
246885852,
|
|
3278
|
-
2177182882
|
|
3279
|
-
]);
|
|
3280
|
-
class D extends S {
|
|
3281
|
-
constructor() {
|
|
3282
|
-
super(28), this.Ah = g[0] | 0, this.Al = g[1] | 0, this.Bh = g[2] | 0, this.Bl = g[3] | 0, this.Ch = g[4] | 0, this.Cl = g[5] | 0, this.Dh = g[6] | 0, this.Dl = g[7] | 0, this.Eh = g[8] | 0, this.El = g[9] | 0, this.Fh = g[10] | 0, this.Fl = g[11] | 0, this.Gh = g[12] | 0, this.Gl = g[13] | 0, this.Hh = g[14] | 0, this.Hl = g[15] | 0;
|
|
3283
|
-
}
|
|
3284
|
-
}
|
|
3285
|
-
J.SHA512_224 = D;
|
|
3286
|
-
class R extends S {
|
|
3287
|
-
constructor() {
|
|
3288
|
-
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;
|
|
3289
|
-
}
|
|
3290
|
-
}
|
|
3291
|
-
return J.SHA512_256 = R, J.sha256 = (0, n.createHasher)(() => new i()), J.sha224 = (0, n.createHasher)(() => new r()), J.sha512 = (0, n.createHasher)(() => new S()), J.sha384 = (0, n.createHasher)(() => new B()), J.sha512_256 = (0, n.createHasher)(() => new R()), J.sha512_224 = (0, n.createHasher)(() => new D()), J;
|
|
3292
|
-
}
|
|
3293
|
-
var Oe;
|
|
3294
|
-
function Zs() {
|
|
3295
|
-
if (Oe) return ft;
|
|
3296
|
-
Oe = 1, Object.defineProperty(ft, "__esModule", { value: !0 }), ft.sha224 = ft.SHA224 = ft.sha256 = ft.SHA256 = void 0;
|
|
3297
|
-
const t = /* @__PURE__ */ b0();
|
|
3298
|
-
return ft.SHA256 = t.SHA256, ft.sha256 = t.sha256, ft.SHA224 = t.SHA224, ft.sha224 = t.sha224, ft;
|
|
3299
|
-
}
|
|
3300
|
-
var Q = {}, ve;
|
|
3301
|
-
function $s() {
|
|
3302
|
-
if (ve) return Q;
|
|
3303
|
-
ve = 1, Object.defineProperty(Q, "__esModule", { value: !0 }), Q.sha512_256 = Q.SHA512_256 = Q.sha512_224 = Q.SHA512_224 = Q.sha384 = Q.SHA384 = Q.sha512 = Q.SHA512 = void 0;
|
|
3304
|
-
const t = /* @__PURE__ */ b0();
|
|
3305
|
-
return Q.SHA512 = t.SHA512, Q.sha512 = t.sha512, Q.SHA384 = t.SHA384, Q.sha384 = t.sha384, Q.SHA512_224 = t.SHA512_224, Q.sha512_224 = t.sha512_224, Q.SHA512_256 = t.SHA512_256, Q.sha512_256 = t.sha512_256, Q;
|
|
3306
|
-
}
|
|
3307
|
-
var Mt = {}, ee = {}, Me;
|
|
3308
|
-
function Ts() {
|
|
3309
|
-
return Me || (Me = 1, (function(t) {
|
|
3310
|
-
Object.defineProperty(t, "__esModule", { value: !0 }), t.hmac = t.HMAC = void 0;
|
|
3311
|
-
const e = /* @__PURE__ */ Jt();
|
|
3312
|
-
class n extends e.Hash {
|
|
3313
|
-
constructor(i, r) {
|
|
3314
|
-
super(), this.finished = !1, this.destroyed = !1, (0, e.ahash)(i);
|
|
3315
|
-
const a = (0, e.toBytes)(r);
|
|
3316
|
-
if (this.iHash = i.create(), typeof this.iHash.update != "function")
|
|
3317
|
-
throw new Error("Expected instance of class which extends utils.Hash");
|
|
3318
|
-
this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
|
|
3319
|
-
const b = this.blockLen, x = new Uint8Array(b);
|
|
3320
|
-
x.set(a.length > b ? i.create().update(a).digest() : a);
|
|
3321
|
-
for (let H = 0; H < x.length; H++)
|
|
3322
|
-
x[H] ^= 54;
|
|
3323
|
-
this.iHash.update(x), this.oHash = i.create();
|
|
3324
|
-
for (let H = 0; H < x.length; H++)
|
|
3325
|
-
x[H] ^= 106;
|
|
3326
|
-
this.oHash.update(x), (0, e.clean)(x);
|
|
3327
|
-
}
|
|
3328
|
-
update(i) {
|
|
3329
|
-
return (0, e.aexists)(this), this.iHash.update(i), this;
|
|
3330
|
-
}
|
|
3331
|
-
digestInto(i) {
|
|
3332
|
-
(0, e.aexists)(this), (0, e.abytes)(i, this.outputLen), this.finished = !0, this.iHash.digestInto(i), this.oHash.update(i), this.oHash.digestInto(i), this.destroy();
|
|
3333
|
-
}
|
|
3334
|
-
digest() {
|
|
3335
|
-
const i = new Uint8Array(this.oHash.outputLen);
|
|
3336
|
-
return this.digestInto(i), i;
|
|
3337
|
-
}
|
|
3338
|
-
_cloneInto(i) {
|
|
3339
|
-
i || (i = Object.create(Object.getPrototypeOf(this), {}));
|
|
3340
|
-
const { oHash: r, iHash: a, finished: b, destroyed: x, blockLen: H, outputLen: u } = this;
|
|
3341
|
-
return i = i, i.finished = b, i.destroyed = x, i.blockLen = H, i.outputLen = u, i.oHash = r._cloneInto(i.oHash), i.iHash = a._cloneInto(i.iHash), i;
|
|
3342
|
-
}
|
|
3343
|
-
clone() {
|
|
3344
|
-
return this._cloneInto();
|
|
3345
|
-
}
|
|
3346
|
-
destroy() {
|
|
3347
|
-
this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
|
|
3348
|
-
}
|
|
3349
|
-
}
|
|
3350
|
-
t.HMAC = n;
|
|
3351
|
-
const h = (c, i, r) => new n(c, i).update(r).digest();
|
|
3352
|
-
t.hmac = h, t.hmac.create = (c, i) => new n(c, i);
|
|
3353
|
-
})(ee)), ee;
|
|
3354
|
-
}
|
|
3355
|
-
var Ge;
|
|
3356
|
-
function tn() {
|
|
3357
|
-
if (Ge) return Mt;
|
|
3358
|
-
Ge = 1, Object.defineProperty(Mt, "__esModule", { value: !0 }), Mt.pbkdf2 = c, Mt.pbkdf2Async = i;
|
|
3359
|
-
const t = /* @__PURE__ */ Ts(), e = /* @__PURE__ */ Jt();
|
|
3360
|
-
function n(r, a, b, x) {
|
|
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) {
|
|
3361
2636
|
(0, e.ahash)(r);
|
|
3362
|
-
const H = (0, e.checkOpts)({ dkLen: 32, asyncTick: 10 }, x), { c:
|
|
3363
|
-
if ((0, e.anumber)(
|
|
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)
|
|
3364
2639
|
throw new Error("iterations (c) should be >= 1");
|
|
3365
|
-
const
|
|
3366
|
-
return { c:
|
|
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 };
|
|
3367
2642
|
}
|
|
3368
|
-
function
|
|
3369
|
-
return r.destroy(), a.destroy(), x && x.destroy(), (0, e.clean)(H),
|
|
2643
|
+
function o(r, a, d, x, H) {
|
|
2644
|
+
return r.destroy(), a.destroy(), x && x.destroy(), (0, e.clean)(H), d;
|
|
3370
2645
|
}
|
|
3371
|
-
function
|
|
3372
|
-
const { c: H, dkLen:
|
|
2646
|
+
function i(r, a, d, x) {
|
|
2647
|
+
const { c: H, dkLen: f, DK: g, PRF: w, PRFSalt: S } = s(r, a, d, x);
|
|
3373
2648
|
let I;
|
|
3374
|
-
const D = new Uint8Array(4),
|
|
3375
|
-
for (let _ = 1, C = 0; C <
|
|
3376
|
-
const
|
|
3377
|
-
|
|
3378
|
-
for (let
|
|
3379
|
-
|
|
3380
|
-
for (let
|
|
3381
|
-
|
|
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];
|
|
3382
2657
|
}
|
|
3383
2658
|
}
|
|
3384
|
-
return
|
|
2659
|
+
return o(w, S, g, I, v);
|
|
3385
2660
|
}
|
|
3386
|
-
async function
|
|
3387
|
-
const { c: H, dkLen:
|
|
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);
|
|
3388
2663
|
let D;
|
|
3389
|
-
const
|
|
3390
|
-
for (let C = 1,
|
|
3391
|
-
const
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
for (let
|
|
3395
|
-
|
|
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];
|
|
3396
2671
|
});
|
|
3397
2672
|
}
|
|
3398
|
-
return
|
|
2673
|
+
return o(S, I, w, D, _);
|
|
3399
2674
|
}
|
|
3400
|
-
return
|
|
2675
|
+
return Dt;
|
|
3401
2676
|
}
|
|
3402
2677
|
export {
|
|
3403
|
-
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
Ps as w,
|
|
3428
|
-
qs as x,
|
|
3429
|
-
Gs as y,
|
|
3430
|
-
Vt as z
|
|
2678
|
+
Bs as a,
|
|
2679
|
+
Ss as b,
|
|
2680
|
+
Is as c,
|
|
2681
|
+
gs as d,
|
|
2682
|
+
_t as e,
|
|
2683
|
+
_s as f,
|
|
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
|
|
3431
2702
|
};
|