MCPcopy Index your code
hub / github.com/cameri/nostream / pubkeyFromPrivkey

Function pubkeyFromPrivkey

test/unit/utils/nip44.spec.ts:10–12  ·  view source on GitHub ↗
(secHex: string)

Source from the content-addressed store, hash-verified

8// ---------------------------------------------------------------------------
9
10function pubkeyFromPrivkey(secHex: string): string {
11 return Buffer.from(secp256k1.getPublicKey(secHex, true)).subarray(1).toString('hex')
12}
13
14// ---------------------------------------------------------------------------
15// Published test vector from the NIP-44 spec

Callers 1

nip44.spec.tsFile · 0.85

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected