Signature.toTuple
Converts a Signature.Signature
to a serialized Signature.Tuple
to be used for signatures in Transaction Envelopes, EIP-7702 Authorization Lists, etc.
Imports
Named
import { Signature } from 'ox'
Examples
import { Signature } from 'ox'
const signatureTuple = Signature.toTuple({
r: 123n,
s: 456n,
yParity: 1,
})
[yParity: '0x01', r: '0x7b', s: '0x1c8']
Definition
function toTuple(
signature: Signature,
): Tuple
Source: src/core/Signature.ts
Parameters
signature
- Type:
Signature
The Signature.Signature
to convert.
signature.r
- Type:
bigintType
signature.s
- Type:
bigintType
signature.yParity
- Type:
numberType
- Optional
Return Type
The Signature.Tuple
.
Tuple