Skip to main content
Module

x/alosaur/src/security/session/src/secp256k1/mod.ts>recoverPublicKey

Alosaur - Deno web framework with many decorators
Go to Latest
function recoverPublicKey
Re-export
import { recoverPublicKey } from "https://deno.land/x/alosaur@v0.38.0/src/security/session/src/secp256k1/mod.ts";

Recovers public key from signature and recovery bit. Throws on invalid sig/hash.

Parameters

msgHash: Hex

message hash

signature: Sig

DER or compact sig

recovery: number

0 or 1

optional
isCompressed = [UNSUPPORTED]

whether to return compact (33-byte), or full (65-byte) key

Returns

Uint8Array

Public key, full by default; short when isCompressed=true