mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-20 20:25:48 +00:00
Switch to new API
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
'use strict';
|
||||
const assert = require('assert');
|
||||
const fixtures = require('./fixtures/api.json');
|
||||
const api = require('../src/api');
|
||||
const api = require('../src');
|
||||
const decodeSeed = require('ripple-address-codec').decodeSeed;
|
||||
const entropy = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16];
|
||||
|
||||
@@ -82,4 +82,11 @@ describe('api', () => {
|
||||
const y = 'rU7bM9ENDkybaxNrefAVjdLTyNLuue1KaJ';
|
||||
assert.strictEqual(api.deriveNodeAddress(x), y);
|
||||
});
|
||||
|
||||
it('Random Address', () => {
|
||||
const seed = api.generateSeed();
|
||||
const keypair = api.deriveKeypair(seed);
|
||||
const address = api.deriveAddress(keypair.publicKey);
|
||||
assert(address[0] === 'r');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user