Closed jrose-signal closed 2 years ago
What is the plan for node bigint support?
If we decide it's important I could spend some time doing the necessary work on the Neon side; if not, converting from Buffer to bigint on the TypeScript side isn't bad, and converting from bigint to Buffer…probably deserves a helper function. Here's what it looks like in the TS zkgroup port:
if (receiptExpirationTime < 0 || receiptExpirationTime > UINT64_MAX) {
throw new RangeError(`invalid receipt expiration time ${receiptExpirationTime}`);
}
const receiptExpirationAsBuffer = Buffer.alloc(8);
receiptExpirationAsBuffer.writeBigUInt64BE(receiptExpirationTime);
Follow-up to #404.