Grounds
    Preparing search index...

    Function RI128

    • Creates a schema for signed 128-bit integers using JavaScript BigInt.

      Use for extremely large signed integers not representable in 64 bits.

      Returns TRI128

      A Relish schema for i128 values

      import { RI128, createCodec } from '@grounds/schema';

      const codec = createCodec(RI128());
      codec.encode(BigInt('-170141183460469231731687303715884105728')).match(
      (bytes) => console.log('I128 encoded:', bytes),
      (error) => console.error(error)
      );

      RI64 for 64-bit signed