@waku/rln 0.0.2-ce9a6ae.0 → 0.0.2-ebd7523.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/bundle/_virtual/utils.js +2 -2
  2. package/bundle/_virtual/utils2.js +2 -2
  3. package/bundle/index.js +1 -1
  4. package/bundle/packages/interfaces/dist/protocols.js +40 -45
  5. package/bundle/packages/rln/dist/contract/abi.js +648 -0
  6. package/bundle/packages/rln/dist/contract/constants.js +8 -13
  7. package/bundle/packages/rln/dist/contract/rln_contract.js +14 -3
  8. package/bundle/packages/rln/dist/identity.js +0 -46
  9. package/bundle/packages/rln/dist/rln.js +31 -15
  10. package/bundle/packages/rln/dist/zerokit.js +22 -16
  11. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/lib/checksum.js +1 -1
  12. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/pbkdf2.js +1 -1
  13. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/random.js +1 -1
  14. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/sha256.js +2 -2
  15. package/bundle/packages/rln/node_modules/@chainsafe/bls-keystore/node_modules/ethereum-cryptography/utils.js +2 -2
  16. package/bundle/packages/rln/node_modules/@noble/hashes/_sha2.js +1 -1
  17. package/bundle/packages/rln/node_modules/@noble/hashes/hmac.js +1 -1
  18. package/bundle/packages/rln/node_modules/@noble/hashes/pbkdf2.js +1 -1
  19. package/bundle/packages/rln/node_modules/@noble/hashes/scrypt.js +2 -2
  20. package/bundle/packages/rln/node_modules/@noble/hashes/sha256.js +2 -2
  21. package/bundle/packages/rln/node_modules/@noble/hashes/sha512.js +1 -1
  22. package/bundle/packages/rln/node_modules/@noble/hashes/utils.js +1 -1
  23. package/dist/.tsbuildinfo +1 -1
  24. package/dist/contract/{abi/rlnv2.d.ts → abi.d.ts} +22 -18
  25. package/dist/contract/abi.js +647 -0
  26. package/dist/contract/abi.js.map +1 -0
  27. package/dist/contract/constants.d.ts +22 -23
  28. package/dist/contract/constants.js +7 -12
  29. package/dist/contract/constants.js.map +1 -1
  30. package/dist/contract/rln_contract.d.ts +8 -0
  31. package/dist/contract/rln_contract.js +14 -3
  32. package/dist/contract/rln_contract.js.map +1 -1
  33. package/dist/identity.d.ts +0 -7
  34. package/dist/identity.js +0 -46
  35. package/dist/identity.js.map +1 -1
  36. package/dist/index.d.ts +2 -2
  37. package/dist/index.js +2 -2
  38. package/dist/index.js.map +1 -1
  39. package/dist/rln.js +31 -14
  40. package/dist/rln.js.map +1 -1
  41. package/dist/zerokit.d.ts +5 -1
  42. package/dist/zerokit.js +22 -16
  43. package/dist/zerokit.js.map +1 -1
  44. package/package.json +1 -1
  45. package/src/contract/abi.ts +646 -0
  46. package/src/contract/constants.ts +8 -14
  47. package/src/contract/rln_contract.ts +16 -3
  48. package/src/identity.ts +0 -70
  49. package/src/index.ts +2 -2
  50. package/src/rln.ts +45 -14
  51. package/src/zerokit.ts +45 -16
  52. package/bundle/node_modules/@iden3/js-crypto/dist/browser/esm/index.js +0 -7
  53. package/bundle/node_modules/@stablelib/binary/lib/binary.js +0 -22
  54. package/bundle/node_modules/@stablelib/chacha/lib/chacha.js +0 -245
  55. package/bundle/node_modules/@stablelib/wipe/lib/wipe.js +0 -26
  56. package/bundle/packages/rln/dist/contract/abi/rlnv2.js +0 -394
  57. package/dist/__tests__/identity.test.d.ts +0 -1
  58. package/dist/__tests__/identity.test.js +0 -40
  59. package/dist/__tests__/identity.test.js.map +0 -1
  60. package/dist/contract/abi/rlnv2.js +0 -393
  61. package/dist/contract/abi/rlnv2.js.map +0 -1
  62. package/src/__tests__/identity.test.ts +0 -50
  63. package/src/contract/abi/rlnv2.ts +0 -392
@@ -5,7 +5,7 @@ import { hexToBytes } from '../../../utils/dist/bytes/index.js';
5
5
  import { Logger } from '../../../utils/dist/logger/index.js';
6
6
  import { MerkleRootTracker } from '../root_tracker.js';
7
7
  import { zeroPadLE } from '../utils/bytes.js';
8
- import { RLN_V2_ABI } from './abi/rlnv2.js';
8
+ import { RLN_ABI } from './abi.js';
9
9
  import { RATE_LIMIT_PARAMS, DEFAULT_RATE_LIMIT } from './constants.js';
10
10
  import { Contract } from '../../../../node_modules/@ethersproject/contracts/lib.esm/index.js';
11
11
  import { BigNumber } from '../../../../node_modules/@ethersproject/bignumber/lib.esm/bignumber.js';
@@ -45,8 +45,7 @@ class RLNContract {
45
45
  this.rateLimit = rateLimit;
46
46
  const initialRoot = rlnInstance.zerokit.getMerkleRoot();
47
47
  // Use the injected contract if provided; otherwise, instantiate a new one.
48
- this.contract =
49
- contract || new Contract(address, RLN_V2_ABI, signer);
48
+ this.contract = contract || new Contract(address, RLN_ABI, signer);
50
49
  this.merkleRootTracker = new MerkleRootTracker(5, initialRoot);
51
50
  // Initialize event filters for MembershipRegistered and MembershipRemoved
52
51
  this._membersFilter = this.contract.filters.MembershipRegistered();
@@ -58,6 +57,18 @@ class RLNContract {
58
57
  getRateLimit() {
59
58
  return this.rateLimit;
60
59
  }
60
+ /**
61
+ * Gets the contract address
62
+ */
63
+ get address() {
64
+ return this.contract.address;
65
+ }
66
+ /**
67
+ * Gets the contract provider
68
+ */
69
+ get provider() {
70
+ return this.contract.provider;
71
+ }
61
72
  /**
62
73
  * Gets the minimum allowed rate limit from the contract
63
74
  * @returns Promise<number> The minimum rate limit in messages per epoch
@@ -1,12 +1,6 @@
1
- import { arrayify } from '../../../node_modules/@ethersproject/bytes/lib.esm/index.js';
2
- import { keccak256 } from '../../../node_modules/@ethersproject/keccak256/lib.esm/index.js';
3
- import { Poseidon as m } from '../../../node_modules/@iden3/js-crypto/dist/browser/esm/index.js';
4
- import { streamXOR } from '../../../node_modules/@stablelib/chacha/lib/chacha.js';
5
1
  import { buildBigIntFromUint8Array } from './utils/bytes.js';
6
2
  import './utils/epoch.js';
7
3
 
8
- // BN254 curve field size (Snark friendly curve)
9
- const BN254_FIELD_SIZE = BigInt("21888242871839275222246405745257275088548364400416034343698204186575808495617");
10
4
  class IdentityCredential {
11
5
  IDTrapdoor;
12
6
  IDNullifier;
@@ -31,46 +25,6 @@ class IdentityCredential {
31
25
  const idCommitmentBigInt = buildBigIntFromUint8Array(idCommitment, 32);
32
26
  return new IdentityCredential(idTrapdoor, idNullifier, idSecretHash, idCommitment, idCommitmentBigInt);
33
27
  }
34
- /**
35
- * Normalizes a bigint to be within the BN254 field size
36
- * @param value The bigint value to normalize
37
- * @returns A bigint value that is within the field size
38
- */
39
- static normalizeToFieldSize(value) {
40
- // Apply modulo operation to ensure the value is within the field
41
- return value % BN254_FIELD_SIZE;
42
- }
43
- static generateSeeded(signature) {
44
- try {
45
- // Generate deterministic seed from signature
46
- const seed = arrayify(keccak256(signature));
47
- // Use ChaCha for deterministic randomness (as in Rust code)
48
- const nonce = new Uint8Array(12);
49
- const idSecretHash = new Uint8Array(32);
50
- streamXOR(seed, nonce, idSecretHash, idSecretHash);
51
- // Convert to bigint for Poseidon
52
- const secretBigInt = BigInt("0x" + Buffer.from(idSecretHash).toString("hex"));
53
- // Normalize the value to be within the field size
54
- const normalizedSecretBigInt = this.normalizeToFieldSize(secretBigInt);
55
- // Generate commitment using Poseidon with normalized value
56
- const idCommitmentBigInt = m.hash([normalizedSecretBigInt]);
57
- // Convert commitment back to Uint8Array
58
- const idCommitment = arrayify("0x" + idCommitmentBigInt.toString(16).padStart(64, "0"));
59
- // Generate deterministic trapdoor and nullifier from the secret hash
60
- const idTrapdoor = new Uint8Array(32);
61
- const idNullifier = new Uint8Array(32);
62
- streamXOR(idSecretHash, nonce, idTrapdoor, idTrapdoor);
63
- streamXOR(idTrapdoor, nonce, idNullifier, idNullifier);
64
- return new IdentityCredential(idTrapdoor, idNullifier, idSecretHash, idCommitment, idCommitmentBigInt);
65
- }
66
- catch (error) {
67
- // Additional fallback for any other errors
68
- if (error instanceof Error) {
69
- throw new Error(`Failed to generate identity credential: ${error.message}`);
70
- }
71
- throw error;
72
- }
73
- }
74
28
  }
75
29
 
76
30
  export { IdentityCredential };
@@ -21,27 +21,43 @@ import { Logger } from '../../utils/dist/logger/index.js';
21
21
  import '../../core/dist/lib/metadata/metadata.js';
22
22
  import __wbg_init, { init_panic_hook, newRLN } from '../../../node_modules/@waku/zerokit-rln-wasm/rln_wasm.js';
23
23
  import { createRLNEncoder, createRLNDecoder } from './codec.js';
24
+ import { DEFAULT_RATE_LIMIT, SEPOLIA_CONTRACT } from './contract/constants.js';
24
25
  import { RLNContract } from './contract/rln_contract.js';
25
- import { SEPOLIA_CONTRACT } from './contract/constants.js';
26
- import { IdentityCredential } from './identity.js';
27
26
  import { Keystore } from './keystore/keystore.js';
28
27
  import verificationKey from './resources/verification_key.js';
29
28
  import { builder } from './resources/witness_calculator.js';
30
29
  import { extractMetaMaskSigner } from './utils/metamask.js';
31
30
  import './utils/epoch.js';
32
31
  import { Zerokit } from './zerokit.js';
33
- import { arrayify } from '../../../node_modules/@ethersproject/bytes/lib.esm/index.js';
34
32
 
35
33
  const log = new Logger("waku:rln");
36
34
  async function loadWitnessCalculator() {
37
- const url = new URL("./resources/rln.wasm", import.meta.url);
38
- const response = await fetch(url);
39
- return await builder(new Uint8Array(await response.arrayBuffer()), false);
35
+ try {
36
+ const url = new URL("./resources/rln.wasm", import.meta.url);
37
+ const response = await fetch(url);
38
+ if (!response.ok) {
39
+ throw new Error(`Failed to fetch witness calculator: ${response.status} ${response.statusText}`);
40
+ }
41
+ return await builder(new Uint8Array(await response.arrayBuffer()), false);
42
+ }
43
+ catch (error) {
44
+ log.error("Error loading witness calculator:", error);
45
+ throw new Error(`Failed to load witness calculator: ${error instanceof Error ? error.message : String(error)}`);
46
+ }
40
47
  }
41
48
  async function loadZkey() {
42
- const url = new URL("./resources/rln_final.zkey", import.meta.url);
43
- const response = await fetch(url);
44
- return new Uint8Array(await response.arrayBuffer());
49
+ try {
50
+ const url = new URL("./resources/rln_final.zkey", import.meta.url);
51
+ const response = await fetch(url);
52
+ if (!response.ok) {
53
+ throw new Error(`Failed to fetch zkey: ${response.status} ${response.statusText}`);
54
+ }
55
+ return new Uint8Array(await response.arrayBuffer());
56
+ }
57
+ catch (error) {
58
+ log.error("Error loading zkey:", error);
59
+ throw new Error(`Failed to load zkey: ${error instanceof Error ? error.message : String(error)}`);
60
+ }
45
61
  }
46
62
  /**
47
63
  * Create an instance of RLN
@@ -58,7 +74,7 @@ async function create() {
58
74
  const vkey = stringEncoder.encode(JSON.stringify(verificationKey));
59
75
  const DEPTH = 20;
60
76
  const zkRLN = newRLN(DEPTH, zkey, vkey);
61
- const zerokit = new Zerokit(zkRLN, witnessCalculator);
77
+ const zerokit = new Zerokit(zkRLN, witnessCalculator, DEFAULT_RATE_LIMIT);
62
78
  return new RLNInstance(zerokit);
63
79
  }
64
80
  catch (error) {
@@ -99,7 +115,7 @@ class RLNInstance {
99
115
  this._contract = await RLNContract.init(this, {
100
116
  address: address,
101
117
  signer: signer,
102
- rateLimit: options.rateLimit
118
+ rateLimit: options.rateLimit ?? this.zerokit.getRateLimit
103
119
  });
104
120
  this.started = true;
105
121
  }
@@ -146,9 +162,9 @@ class RLNInstance {
146
162
  if (!this.contract) {
147
163
  throw Error("RLN Contract is not initialized.");
148
164
  }
149
- let identity = "identity" in options ? options.identity : undefined;
165
+ let identity = "identity" in options && options.identity;
150
166
  if ("signature" in options) {
151
- identity = IdentityCredential.generateSeeded(arrayify(options.signature));
167
+ identity = this.zerokit.generateSeededIdentityCredential(options.signature);
152
168
  }
153
169
  if (!identity) {
154
170
  throw Error("Missing signature or identity to register membership.");
@@ -182,12 +198,12 @@ class RLNInstance {
182
198
  throw Error("Failed to verify chain coordinates: no contract initialized.");
183
199
  }
184
200
  const registryAddress = credentials.membership.address;
185
- const currentRegistryAddress = this._contract.contract.address;
201
+ const currentRegistryAddress = this._contract.address;
186
202
  if (registryAddress !== currentRegistryAddress) {
187
203
  throw Error(`Failed to verify chain coordinates: credentials contract address=${registryAddress} is not equal to registryContract address=${currentRegistryAddress}`);
188
204
  }
189
205
  const chainId = credentials.membership.chainId;
190
- const network = await this._contract.contract.provider.getNetwork();
206
+ const network = await this._contract.provider.getNetwork();
191
207
  const currentChainId = network.chainId;
192
208
  if (chainId !== currentChainId) {
193
209
  throw Error(`Failed to verify chain coordinates: credentials chainID=${chainId} is not equal to registryContract chainID=${currentChainId}`);
@@ -8,9 +8,20 @@ import { epochIntToBytes, dateToEpoch } from './utils/epoch.js';
8
8
  class Zerokit {
9
9
  zkRLN;
10
10
  witnessCalculator;
11
- constructor(zkRLN, witnessCalculator) {
11
+ rateLimit;
12
+ constructor(zkRLN, witnessCalculator, rateLimit = DEFAULT_RATE_LIMIT) {
12
13
  this.zkRLN = zkRLN;
13
14
  this.witnessCalculator = witnessCalculator;
15
+ this.rateLimit = rateLimit;
16
+ }
17
+ get getZkRLN() {
18
+ return this.zkRLN;
19
+ }
20
+ get getWitnessCalculator() {
21
+ return this.witnessCalculator;
22
+ }
23
+ get getRateLimit() {
24
+ return this.rateLimit;
14
25
  }
15
26
  generateIdentityCredentials() {
16
27
  const memKeys = generateExtendedMembershipKey(this.zkRLN); // TODO: rename this function in zerokit rln-wasm
@@ -39,32 +50,33 @@ class Zerokit {
39
50
  getMerkleRoot() {
40
51
  return getRoot(this.zkRLN);
41
52
  }
42
- serializeMessage(uint8Msg, memIndex, epoch, idKey, rateLimit = DEFAULT_RATE_LIMIT) {
53
+ serializeMessage(uint8Msg, memIndex, epoch, idKey, rateLimit) {
43
54
  // calculate message length
44
55
  const msgLen = writeUIntLE(new Uint8Array(8), uint8Msg.length, 0, 8);
45
56
  const memIndexBytes = writeUIntLE(new Uint8Array(8), memIndex, 0, 8);
46
- const rateLimitBytes = writeUIntLE(new Uint8Array(8), rateLimit, 0, 8);
57
+ const rateLimitBytes = writeUIntLE(new Uint8Array(8), rateLimit ?? this.rateLimit, 0, 8);
47
58
  // [ id_key<32> | id_index<8> | epoch<32> | signal_len<8> | signal<var> | rate_limit<8> ]
48
59
  return concatenate(idKey, memIndexBytes, epoch, msgLen, uint8Msg, rateLimitBytes);
49
60
  }
50
- async generateRLNProof(msg, index, epoch, idSecretHash, rateLimit = DEFAULT_RATE_LIMIT) {
61
+ async generateRLNProof(msg, index, epoch, idSecretHash, rateLimit) {
51
62
  if (epoch === undefined) {
52
63
  epoch = epochIntToBytes(dateToEpoch(new Date()));
53
64
  }
54
65
  else if (epoch instanceof Date) {
55
66
  epoch = epochIntToBytes(dateToEpoch(epoch));
56
67
  }
68
+ const effectiveRateLimit = rateLimit ?? this.rateLimit;
57
69
  if (epoch.length !== 32)
58
70
  throw new Error("invalid epoch");
59
71
  if (idSecretHash.length !== 32)
60
72
  throw new Error("invalid id secret hash");
61
73
  if (index < 0)
62
74
  throw new Error("index must be >= 0");
63
- if (rateLimit < RATE_LIMIT_PARAMS.MIN_RATE ||
64
- rateLimit > RATE_LIMIT_PARAMS.MAX_RATE) {
75
+ if (effectiveRateLimit < RATE_LIMIT_PARAMS.MIN_RATE ||
76
+ effectiveRateLimit > RATE_LIMIT_PARAMS.MAX_RATE) {
65
77
  throw new Error(`Rate limit must be between ${RATE_LIMIT_PARAMS.MIN_RATE} and ${RATE_LIMIT_PARAMS.MAX_RATE}`);
66
78
  }
67
- const serialized_msg = this.serializeMessage(msg, index, epoch, idSecretHash, rateLimit);
79
+ const serialized_msg = this.serializeMessage(msg, index, epoch, idSecretHash, effectiveRateLimit);
68
80
  const rlnWitness = getSerializedRLNWitness(this.zkRLN, serialized_msg);
69
81
  const inputs = RLNWitnessToJson(this.zkRLN, rlnWitness);
70
82
  const calculatedWitness = await this.witnessCalculator.calculateWitness(inputs, false);
@@ -81,9 +93,7 @@ class Zerokit {
81
93
  }
82
94
  // calculate message length
83
95
  const msgLen = writeUIntLE(new Uint8Array(8), msg.length, 0, 8);
84
- const rateLimitBytes = rateLimit
85
- ? writeUIntLE(new Uint8Array(8), rateLimit, 0, 8)
86
- : new Uint8Array(8); // Zero if not specified
96
+ const rateLimitBytes = writeUIntLE(new Uint8Array(8), rateLimit ?? this.rateLimit, 0, 8);
87
97
  return verifyRLNProof(this.zkRLN, concatenate(pBytes, msgLen, msg, rateLimitBytes));
88
98
  }
89
99
  verifyWithRoots(proof, msg, roots, rateLimit) {
@@ -96,9 +106,7 @@ class Zerokit {
96
106
  }
97
107
  // calculate message length
98
108
  const msgLen = writeUIntLE(new Uint8Array(8), msg.length, 0, 8);
99
- const rateLimitBytes = rateLimit
100
- ? writeUIntLE(new Uint8Array(8), rateLimit, 0, 8)
101
- : new Uint8Array(8); // Zero if not specified
109
+ const rateLimitBytes = writeUIntLE(new Uint8Array(8), rateLimit ?? this.rateLimit, 0, 8);
102
110
  const rootsBytes = concatenate(...roots);
103
111
  return verifyWithRoots(this.zkRLN, concatenate(pBytes, msgLen, msg, rateLimitBytes), rootsBytes);
104
112
  }
@@ -112,9 +120,7 @@ class Zerokit {
112
120
  }
113
121
  // calculate message length
114
122
  const msgLen = writeUIntLE(new Uint8Array(8), msg.length, 0, 8);
115
- const rateLimitBytes = rateLimit
116
- ? writeUIntLE(new Uint8Array(8), rateLimit, 0, 8)
117
- : new Uint8Array(8); // Zero if not specified
123
+ const rateLimitBytes = writeUIntLE(new Uint8Array(8), rateLimit ?? this.rateLimit, 0, 8);
118
124
  return verifyWithRoots(this.zkRLN, concatenate(pBytes, msgLen, msg, rateLimitBytes), new Uint8Array());
119
125
  }
120
126
  }
@@ -2,7 +2,7 @@ import { commonjsGlobal } from '../../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { __exports as checksum$1 } from '../../../../../../_virtual/checksum.js';
3
3
  import '../node_modules/ethereum-cryptography/sha256.js';
4
4
  import { u as utilsExports } from '../node_modules/ethereum-cryptography/utils.js';
5
- import { __exports as sha256 } from '../../../../../../_virtual/sha256.js';
5
+ import { __exports as sha256 } from '../../../../../../_virtual/sha2562.js';
6
6
 
7
7
  var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
8
8
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -4,7 +4,7 @@ import '../../../../@noble/hashes/sha256.js';
4
4
  import '../../../../@noble/hashes/sha512.js';
5
5
  import { u as utilsExports } from './utils.js';
6
6
  import { __exports as pbkdf2$2 } from '../../../../../../../_virtual/pbkdf22.js';
7
- import { __exports as sha256 } from '../../../../../../../_virtual/sha2562.js';
7
+ import { __exports as sha256 } from '../../../../../../../_virtual/sha256.js';
8
8
  import { __exports as sha512 } from '../../../../../../../_virtual/sha512.js';
9
9
 
10
10
  Object.defineProperty(pbkdf2$1, "__esModule", { value: true });
@@ -1,6 +1,6 @@
1
1
  import { __exports as random } from '../../../../../../../_virtual/random.js';
2
2
  import '../../../../@noble/hashes/utils.js';
3
- import { __exports as utils } from '../../../../../../../_virtual/utils2.js';
3
+ import { __exports as utils } from '../../../../../../../_virtual/utils.js';
4
4
 
5
5
  Object.defineProperty(random, "__esModule", { value: true });
6
6
  random.getRandomBytes = random.getRandomBytesSync = undefined;
@@ -1,7 +1,7 @@
1
- import { __exports as sha256 } from '../../../../../../../_virtual/sha256.js';
1
+ import { __exports as sha256 } from '../../../../../../../_virtual/sha2562.js';
2
2
  import '../../../../@noble/hashes/sha256.js';
3
3
  import { u as utilsExports } from './utils.js';
4
- import { __exports as sha256$1 } from '../../../../../../../_virtual/sha2562.js';
4
+ import { __exports as sha256$1 } from '../../../../../../../_virtual/sha256.js';
5
5
 
6
6
  Object.defineProperty(sha256, "__esModule", { value: true });
7
7
  sha256.sha256 = undefined;
@@ -1,10 +1,10 @@
1
1
  import { commonjsGlobal } from '../../../../../../../_virtual/_commonjsHelpers.js';
2
2
  import { commonjsRequire } from '../../../../../../../_virtual/_commonjs-dynamic-modules.js';
3
- import { __module as utils } from '../../../../../../../_virtual/utils.js';
3
+ import { __module as utils } from '../../../../../../../_virtual/utils2.js';
4
4
  import '../../../../@noble/hashes/_assert.js';
5
5
  import '../../../../@noble/hashes/utils.js';
6
6
  import { __exports as _assert } from '../../../../../../../_virtual/_assert.js';
7
- import { __exports as utils$1 } from '../../../../../../../_virtual/utils2.js';
7
+ import { __exports as utils$1 } from '../../../../../../../_virtual/utils.js';
8
8
 
9
9
  utils.exports;
10
10
 
@@ -2,7 +2,7 @@ import { __exports as _sha2 } from '../../../../../_virtual/_sha2.js';
2
2
  import './_assert.js';
3
3
  import './utils.js';
4
4
  import { __exports as _assert } from '../../../../../_virtual/_assert.js';
5
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
5
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
6
6
 
7
7
  Object.defineProperty(_sha2, "__esModule", { value: true });
8
8
  _sha2.SHA2 = undefined;
@@ -2,7 +2,7 @@ import { __exports as hmac } from '../../../../../_virtual/hmac.js';
2
2
  import './_assert.js';
3
3
  import './utils.js';
4
4
  import { __exports as _assert } from '../../../../../_virtual/_assert.js';
5
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
5
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
6
6
 
7
7
  (function (exports) {
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -2,7 +2,7 @@ import { __exports as pbkdf2$1 } from '../../../../../_virtual/pbkdf22.js';
2
2
  import './_assert.js';
3
3
  import './hmac.js';
4
4
  import './utils.js';
5
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
5
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
6
6
  import { __exports as _assert } from '../../../../../_virtual/_assert.js';
7
7
  import { __exports as hmac } from '../../../../../_virtual/hmac.js';
8
8
 
@@ -3,9 +3,9 @@ import './_assert.js';
3
3
  import './sha256.js';
4
4
  import './pbkdf2.js';
5
5
  import './utils.js';
6
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
6
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
7
7
  import { __exports as _assert } from '../../../../../_virtual/_assert.js';
8
- import { __exports as sha256 } from '../../../../../_virtual/sha2562.js';
8
+ import { __exports as sha256 } from '../../../../../_virtual/sha256.js';
9
9
  import { __exports as pbkdf2 } from '../../../../../_virtual/pbkdf22.js';
10
10
 
11
11
  Object.defineProperty(scrypt$1, "__esModule", { value: true });
@@ -1,8 +1,8 @@
1
- import { __exports as sha256 } from '../../../../../_virtual/sha2562.js';
1
+ import { __exports as sha256 } from '../../../../../_virtual/sha256.js';
2
2
  import './_sha2.js';
3
3
  import './utils.js';
4
4
  import { __exports as _sha2 } from '../../../../../_virtual/_sha2.js';
5
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
5
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
6
6
 
7
7
  Object.defineProperty(sha256, "__esModule", { value: true });
8
8
  sha256.sha224 = sha256.sha256 = undefined;
@@ -4,7 +4,7 @@ import './_u64.js';
4
4
  import './utils.js';
5
5
  import { __exports as _sha2 } from '../../../../../_virtual/_sha2.js';
6
6
  import { __exports as _u64 } from '../../../../../_virtual/_u64.js';
7
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
7
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
8
8
 
9
9
  Object.defineProperty(sha512, "__esModule", { value: true });
10
10
  sha512.sha384 = sha512.sha512_256 = sha512.sha512_224 = sha512.sha512 = sha512.SHA512 = undefined;
@@ -1,4 +1,4 @@
1
- import { __exports as utils } from '../../../../../_virtual/utils2.js';
1
+ import { __exports as utils } from '../../../../../_virtual/utils.js';
2
2
  import './cryptoBrowser.js';
3
3
  import { __exports as cryptoBrowser } from '../../../../../_virtual/cryptoBrowser.js';
4
4