Files
pubky-core/pubky/pkg/test/keys.js
2024-07-29 14:18:45 +03:00

14 lines
400 B
JavaScript

import test from 'tape'
import { Keypair } from '../index.js'
test('generate keys from a seed', async (t) => {
const secretkey = Buffer.from('5aa93b299a343aa2691739771f2b5b85e740ca14c685793d67870f88fa89dc51', 'hex')
const keypair = Keypair.from_secret_key(secretkey)
const publicKey = keypair.public_key()
t.is(publicKey.z32(), 'gcumbhd7sqit6nn457jxmrwqx9pyymqwamnarekgo3xppqo6a19o')
})