12 lines
509 B
JavaScript
12 lines
509 B
JavaScript
'use strict'
|
|
/**
|
|
* CJS bridge for Pear/Bare + Node. `bare-crypto` does not export `./lib/key.js`; resolve it from
|
|
* the package root via `bare-crypto/package` (the only `exports` entry that points at package.json).
|
|
*/
|
|
const path = require('path')
|
|
const { verify } = require('bare-crypto')
|
|
const pkgJson = require.resolve('bare-crypto/package')
|
|
const keyModule = path.join(path.dirname(pkgJson), 'lib', 'key.js')
|
|
const { Ed25519PublicKey } = require(keyModule)
|
|
module.exports = { verify, Ed25519PublicKey }
|