mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-19 19:55:51 +00:00
Set VER_ACCOUNT_ID on address returned by keypair
Just a decent default, client code can still set_version before base58 encoding.
This commit is contained in:
14
test/keypair-test.js
Normal file
14
test/keypair-test.js
Normal file
@@ -0,0 +1,14 @@
|
||||
var assert = require('assert');
|
||||
var utils = require('./testutils');
|
||||
var Seed = utils.load_module('seed').Seed;
|
||||
var config = require('./testutils').get_config();
|
||||
|
||||
describe('KeyPair', function() {
|
||||
it('can generate an address', function () {
|
||||
var seed = Seed.from_json("masterpassphrase");
|
||||
var address = seed.get_key().get_address();
|
||||
assert.strictEqual(address.to_json(), 'rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh');
|
||||
});
|
||||
});
|
||||
|
||||
// vim:sw=2:sts=2:ts=8:et
|
||||
Reference in New Issue
Block a user