mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-29 00:25:48 +00:00
Add tests for validator keypairs (#82)
This commit is contained in:
@@ -42,6 +42,16 @@ describe('api', () => {
|
||||
assert.deepEqual(keypair, fixtures.ed25519.keypair)
|
||||
})
|
||||
|
||||
it('deriveKeypair - secp256k1 - validator', () => {
|
||||
const keypair = api.deriveKeypair(fixtures.secp256k1.seed, {validator: true})
|
||||
assert.deepEqual(keypair, fixtures.secp256k1.validatorKeypair)
|
||||
})
|
||||
|
||||
it('deriveKeypair - ed25519 - validator', () => {
|
||||
const keypair = api.deriveKeypair(fixtures.ed25519.seed, {validator: true})
|
||||
assert.deepEqual(keypair, fixtures.ed25519.validatorKeypair)
|
||||
})
|
||||
|
||||
it('deriveAddress - secp256k1 public key', () => {
|
||||
const address = api.deriveAddress(fixtures.secp256k1.keypair.publicKey)
|
||||
assert.strictEqual(address, fixtures.secp256k1.address)
|
||||
|
||||
Reference in New Issue
Block a user