Convert a big-endian buffer to BigInt.
Big-endian byte buffer
BigInt value
const buffer = new Uint8Array([0x01, 0x02, 0x03, 0x04]);const num = toBigIntBE(buffer); // 16909060n Copy
const buffer = new Uint8Array([0x01, 0x02, 0x03, 0x04]);const num = toBigIntBE(buffer); // 16909060n
Convert a big-endian buffer to BigInt.