(id: Uint8Array)
| 44 | } |
| 45 | |
| 46 | export function idToEpoch(id: Uint8Array): number { |
| 47 | let epoch = 0 |
| 48 | for (let i = 0; i < epochLength; i++) { |
| 49 | epoch = epoch * 256 + id[i]! |
| 50 | } |
| 51 | return epoch |
| 52 | } |
| 53 | |
| 54 | export function incrementRandom(arr: Uint8Array): void { |
| 55 | for (let i = idLength - 1; i >= epochLength; i--) { |
no outgoing calls
no test coverage detected