mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-21 04:35:49 +00:00
Update x-address-codec dependency and add eslint
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
'use strict';
|
||||
|
||||
var hashjs = require('hash.js');
|
||||
var apiFactory = require('x-address-codec');
|
||||
|
||||
@@ -8,12 +10,12 @@ var FAMILY_SEED = 33;
|
||||
var ED25519_SEED = [0x01, 0xE1, 0x4B];
|
||||
|
||||
module.exports = apiFactory({
|
||||
sha256: function (bytes) {
|
||||
sha256: function(bytes) {
|
||||
return hashjs.sha256().update(bytes).digest();
|
||||
},
|
||||
defaultAlphabet: 'ripple',
|
||||
codecMethods: {
|
||||
EdSeed : {
|
||||
EdSeed: {
|
||||
expectedLength: 16,
|
||||
version: ED25519_SEED
|
||||
},
|
||||
@@ -23,9 +25,9 @@ module.exports = apiFactory({
|
||||
versions: [ED25519_SEED, FAMILY_SEED],
|
||||
expectedLength: 16
|
||||
},
|
||||
AccountID: {version: ACCOUNT_ID },
|
||||
NodePublic: {version: NODE_PUBLIC },
|
||||
AccountID: {version: ACCOUNT_ID},
|
||||
NodePublic: {version: NODE_PUBLIC},
|
||||
NodePrivate: {version: NODE_PRIVATE},
|
||||
K256Seed : {version: FAMILY_SEED }
|
||||
K256Seed: {version: FAMILY_SEED}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user