Bytes.toBigInt
Decodes a Bytes.Bytes
into a bigint.
Imports
Named
import { Bytes } from 'ox'
Examples
import { Bytes } from 'ox'
Bytes.toBigInt(Bytes.from([1, 164]))
// @log: 420n
Definition
function toBigInt(
bytes: Bytes,
options?: toBigInt.Options,
): bigint
Source: src/Bytes.ts
Parameters
bytes
- Type:
Bytes
The Bytes.Bytes
to decode.
options
- Type:
toBigInt.Options
- Optional
Decoding options.
options.signed
- Type:
boolean
- Optional
Whether or not the number of a signed representation.
options.size
- Type:
number
- Optional
Size of the bytes.
Return Type
Decoded bigint.
bigint