refactor: migrate RNG and utility functions to common package

- Removed RNG interface and related utility classes from logic package.
- Added RNG interface and utility classes in common package.
- Implemented various RNG classes (ConstantRNG, MidpointRNG, SineRNG, SequenceRNG) in common package.
- Updated conversion utilities for BytesLike to ArrayBuffer and Uint8Array in common package.
- Adjusted tests to import RNG utilities from the new common package.
- Updated vitest configuration to resolve common package imports.
This commit is contained in:
2025-12-28 12:27:47 +00:00
parent 27b243b121
commit fa22562bb1
17 changed files with 30 additions and 18 deletions
+1 -8
View File
@@ -1,11 +1,4 @@
export * from './domain/entities.js';
export * from './ports/rng.js';
export type { RandomGenerator } from '@sammo-ts/common';
export * from './ports/world.js';
export * from './triggers/index.js';
export * from './util/BytesLike.js';
export * from './util/convertBytesLikeToArrayBuffer.js';
export * from './util/convertBytesLikeToUint8Array.js';
export * from './util/LiteHashDRBG.js';
export * from './util/RNG.js';
export * from './util/RandUtil.js';
export * from './util/TestRNG.js';