P256.recoverPublicKey
Recovers the signing public key from the signed payload and signature.
Imports
Named
import { P256 } from 'ox'
Examples
import { P256 } from 'ox'
const signature = P256.sign({ payload: '0xdeadbeef', privateKey: '0x...' })
const publicKey = P256.recoverPublicKey({
payload: '0xdeadbeef',
signature,
})
Definition
function recoverPublicKey(
options: recoverPublicKey.Options,
): PublicKey.PublicKey
Source: src/P256.ts
Parameters
options
- Type:
recoverPublicKey.Options
The recovery options.
options.payload
- Type:
0x${string} | Uint8Array
Payload that was signed.
options.signature
- Type:
{ r: bigint; s: bigint; yParity: number; }
Signature of the payload.
Return Type
The recovered public key.
PublicKey.PublicKey