Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions test/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import BIP32Creator from '../src/esm/index.js'
import tape from 'tape'
import fixtures from './fixtures/index.json' assert { type: "json" }
const { valid, invalid } = fixtures
import { readFile } from 'fs/promises'
import { fileURLToPath } from 'url'
import { dirname, join } from 'path'

const __dirname = dirname(fileURLToPath(import.meta.url))
const fixtures = JSON.parse(
await readFile(join(__dirname, './fixtures/index.json'), 'utf8')
)
const { valid, invalid } = fixtures
import * as ecc from "tiny-secp256k1";
import * as tools from "uint8array-tools";
const BIP32 = BIP32Creator(ecc)
Expand Down Expand Up @@ -323,4 +330,4 @@ tape('tweak - neutered', (t) => {
t.equal(signer.verify(seed, signatureLowR), false)
t.equal(signer.verifySchnorr(hash, schnorrsig), true)
t.equal(signer.verifySchnorr(seed, schnorrsig), false)
})
})