import { context } from '../context';

let next = 0n;

export const uuid = () => {
  const id = (BigInt(`0x${context.thisId}`) * 3n + BigInt(`0x${context.parentTxId}`) + next).toString(16).slice(-32);

  next += 1n;

  return id;
};
