WrappedSignature.toHex
Serializes an ERC-6492 wrapped signature.
Imports
Named
import { WrappedSignature } from 'ox/erc6492'
Examples
import { Secp256k1 } from 'ox'
import { WrappedSignature } from 'ox/erc6492'
const signature = Secp256k1.sign({
payload: '0x...',
privateKey: '0x...',
})
const wrapped = WrappedSignature.toHex({
data: '0xdeadbeef',
signature,
to: '0x00000000219ab540356cBB839Cbe05303d7705Fa',
})
Definition
function toHex(
value: WrappedSignature.WrappedSignature,
): Hex.Hex
Source: src/erc6492/WrappedSignature.ts
Parameters
value
Wrapped signature to serialize.
value.data
- Type:
0x${string}
Calldata to pass to the target address for counterfactual verification.
value.signature
- Type:
{ r: bigint; s: bigint; yParity: number; }
The original signature.
value.to
- Type:
abitype_Address
The target address to use for counterfactual verification.
Return Type
Serialized wrapped signature.
Hex.Hex