@bcts/rand 1.0.0-alpha.8 → 1.0.0-beta.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.
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright © 2023-2026 Blockchain Commons, LLC
3
+ * Copyright © 2025-2026 Parity Technologies
4
+ *
5
+ */
6
+
1
7
  // Ported from bc-rand-rust/src/seeded_random.rs
2
8
 
3
9
  import type { RandomNumberGenerator } from "./random-number-generator.js";
@@ -82,16 +88,6 @@ export class SeededRandomNumberGenerator implements RandomNumberGenerator {
82
88
  };
83
89
  }
84
90
 
85
- /**
86
- * Creates a new seeded random number generator from a seed array.
87
- * Convenience method that accepts numbers and converts to bigints.
88
- *
89
- * @param seed - Array of 4 64-bit unsigned integers
90
- */
91
- static fromSeed(seed: [bigint, bigint, bigint, bigint]): SeededRandomNumberGenerator {
92
- return new SeededRandomNumberGenerator(seed);
93
- }
94
-
95
91
  /**
96
92
  * Returns the next random 64-bit unsigned integer as a bigint.
97
93
  */
@@ -142,9 +138,10 @@ export class SeededRandomNumberGenerator implements RandomNumberGenerator {
142
138
  }
143
139
 
144
140
  /**
145
- * The standard test seed used across all Blockchain Commons implementations.
141
+ * Standard test seed for `makeFakeRandomNumberGenerator`. Module-private to
142
+ * mirror Rust where the equivalent constant lives inside `mod tests`.
146
143
  */
147
- export const TEST_SEED: [bigint, bigint, bigint, bigint] = [
144
+ const TEST_SEED: [bigint, bigint, bigint, bigint] = [
148
145
  17295166580085024720n,
149
146
  422929670265678780n,
150
147
  5577237070365765850n,
package/src/widening.ts CHANGED
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Copyright © 2023-2026 Blockchain Commons, LLC
3
+ * Copyright © 2025-2026 Parity Technologies
4
+ *
5
+ */
6
+
1
7
  // The below is so we don't have to use #![feature(bigint_helper_methods)]
2
8
  // Ported from bc-rand-rust/src/widening.rs
3
9