Signature.toBytes
Serializes a Signature.Signature
to Bytes.Bytes
.
Imports
Named
import { Signature } from 'ox'
Examples
import { Signature } from 'ox'
const signature = Signature.toBytes({
r: 49782753348462494199823712700004552394425719014458918871452329774910450607807n,
s: 33726695977844476214676913201140481102225469284307016937915595756355928419768n,
yParity: 1
})
Uint8Array [102, 16, 10, ...]
Definition
function toBytes(
signature: Signature<boolean>,
): Bytes.Bytes
Source: src/core/Signature.ts
Parameters
signature
- Type:
Signature<boolean>
The signature to serialize.
signature.r
- Type:
bigintType
signature.s
- Type:
bigintType
signature.yParity
- Type:
numberType
- Optional
Return Type
The serialized signature.
Bytes.Bytes