WrappedSignature.from
Parses an ERC-6492 wrapped signature into its constituent parts.
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...',
})
// Instantiate from serialized format.
const wrapped = WrappedSignature.from('0x...')
{ data: '0x...', signature: { ... }, to: '0x...', } // [!code focus] // Instantiate from constituent parts.
const wrapped = WrappedSignature.from({
data: '0x...',
signature,
to: '0x...',
})
{ data: '0x...', signature: { ... }, to: '0x...', }
Definition
function from(
wrapped: WrappedSignature | Hex.Hex,
): WrappedSignature
Source: src/erc6492/WrappedSignature.ts
Parameters
wrapped
- Type:
WrappedSignature | Hex.Hex
Wrapped signature to parse.
wrapped.data
- Type:
0x${string}
Calldata to pass to the target address for counterfactual verification.
wrapped.signature
- Type:
{ r: bigint; s: bigint; yParity: number; }
The original signature.
wrapped.to
- Type:
abitype_Address
The target address to use for counterfactual verification.
Return Type
Wrapped signature.