SignatureErc6492.from
Parses an ERC-6492 wrapped signature into its constituent parts.
Imports
Named
import { SignatureErc6492 } from 'ox/erc6492'
Examples
import { Secp256k1 } from 'ox'
import { SignatureErc6492 } from 'ox/erc6492'
const signature = Secp256k1.sign({
payload: '0x...',
privateKey: '0x...',
})
// Instantiate from serialized format.
const wrapped = SignatureErc6492.from('0x...')
{ data: '0x...', signature: { ... }, to: '0x...', } // [!code focus] // Instantiate from constituent parts.
const wrapped = SignatureErc6492.from({
data: '0x...',
signature,
to: '0x...',
})
{ data: '0x...', signature: { ... }, to: '0x...', }
Definition
function from(
wrapped: Unwrapped | Wrapped,
): Unwrapped
Source: src/erc6492/SignatureErc6492.ts
Parameters
wrapped
- Type:
Unwrapped | Wrapped
Wrapped signature to parse.
wrapped.data
- Type:
0x${string}
Calldata to pass to the target address for counterfactual verification.
wrapped.signature
- Type:
0x${string}
The original signature.
wrapped.to
- Type:
abitype_Address
The target address to use for counterfactual verification.
Return Type
Wrapped signature.