Ed25519.verify
Verifies a payload was signed by the provided public key.
Imports
Named
import { Ed25519 } from 'ox'
Examples
import { Ed25519 } from 'ox'
const { privateKey, publicKey } = Ed25519.createKeyPair()
const signature = Ed25519.sign({ payload: '0xdeadbeef', privateKey })
const verified = Ed25519.verify({
publicKey,
payload: '0xdeadbeef',
signature,
})
Definition
function verify(
options: verify.Options,
): boolean
Source: src/core/Ed25519.ts
Parameters
options
- Type:
verify.Options
The verification options.
options.payload
- Type:
0x${string} | Uint8Array
Payload that was signed.
options.publicKey
- Type:
0x${string} | Uint8Array
Public key that signed the payload.
options.signature
- Type:
0x${string} | Uint8Array
Signature of the payload.
Return Type
Whether the payload was signed by the provided public key.
boolean