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