Ryan X. Charles
11 years ago
16 changed files with 714 additions and 714 deletions
@ -1,116 +1,116 @@ |
|||||
require('classtool'); |
require('classtool'); |
||||
|
|
||||
function ClassSpec(b) { |
function ClassSpec(b) { |
||||
var MAX_BLOOM_FILTER_SIZE = 36000; // bytes
|
var MAX_BLOOM_FILTER_SIZE = 36000; // bytes
|
||||
var MAX_HASH_FUNCS = 50; |
var MAX_HASH_FUNCS = 50; |
||||
var LN2SQUARED = 0.4804530139182014246671025263266649717305529515945455; |
var LN2SQUARED = 0.4804530139182014246671025263266649717305529515945455; |
||||
var LN2 = 0.6931471805599453094172321214581765680755001343602552; |
var LN2 = 0.6931471805599453094172321214581765680755001343602552; |
||||
var bit_mask = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80]; |
var bit_mask = [0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80]; |
||||
|
|
||||
function Bloom() { |
function Bloom() { |
||||
this.data = ''; |
this.data = ''; |
||||
this.hashFuncs = 0; |
this.hashFuncs = 0; |
||||
}; |
}; |
||||
|
|
||||
function ROTL32(x, r) { |
function ROTL32(x, r) { |
||||
return (x << r) | (x >> (32 - r)); |
return (x << r) | (x >> (32 - r)); |
||||
}; |
}; |
||||
|
|
||||
function getBlockU32(blockIdx, data) { |
function getBlockU32(blockIdx, data) { |
||||
var idx = blockIdx * 4; |
var idx = blockIdx * 4; |
||||
var v = (data[idx + 0] << (0 * 8)) | |
var v = (data[idx + 0] << (0 * 8)) | |
||||
(data[idx + 1] << (1 * 8)) | |
(data[idx + 1] << (1 * 8)) | |
||||
(data[idx + 2] << (2 * 8)) | |
(data[idx + 2] << (2 * 8)) | |
||||
(data[idx + 3] << (3 * 8)); |
(data[idx + 3] << (3 * 8)); |
||||
return v; |
return v; |
||||
}; |
}; |
||||
|
|
||||
Bloom.prototype.hash = function(hashNum, data) { |
Bloom.prototype.hash = function(hashNum, data) { |
||||
var h1 = hashNum * (0xffffffff / (this.hashFuncs - 1)); |
var h1 = hashNum * (0xffffffff / (this.hashFuncs - 1)); |
||||
var c1 = 0xcc9e2d51; |
var c1 = 0xcc9e2d51; |
||||
var c2 = 0x1b873593; |
var c2 = 0x1b873593; |
||||
var nBlocks = data.length / 4; |
var nBlocks = data.length / 4; |
||||
|
|
||||
// data body
|
// data body
|
||||
for (var i = -nBlocks; i; i++) { |
for (var i = -nBlocks; i; i++) { |
||||
var k1 = getBlockU32(i); |
var k1 = getBlockU32(i); |
||||
|
|
||||
k1 *= c1; |
k1 *= c1; |
||||
k1 = ROTLF32(k1, 15); |
k1 = ROTLF32(k1, 15); |
||||
k1 *= c2; |
k1 *= c2; |
||||
|
|
||||
h1 ^= k1; |
h1 ^= k1; |
||||
h1 = ROTFL(h1, 13); |
h1 = ROTFL(h1, 13); |
||||
h1 = h1 * 5 + 0xe6546b64; |
h1 = h1 * 5 + 0xe6546b64; |
||||
} |
} |
||||
|
|
||||
// tail (trailing 1-3 bytes)
|
// tail (trailing 1-3 bytes)
|
||||
var tail = data.slice(nBlocks * 4); |
var tail = data.slice(nBlocks * 4); |
||||
|
|
||||
var k1 = 0; |
var k1 = 0; |
||||
|
|
||||
switch (data.length & 3) { |
switch (data.length & 3) { |
||||
case 3: k1 ^= tail[2] << 16; |
case 3: k1 ^= tail[2] << 16; |
||||
case 2: k1 ^= tail[1] << 8; |
case 2: k1 ^= tail[1] << 8; |
||||
case 1: k1 ^= tail[0]; |
case 1: k1 ^= tail[0]; |
||||
k1 *= c1; |
k1 *= c1; |
||||
k1 = ROTL32(k1, 15); |
k1 = ROTL32(k1, 15); |
||||
k1 *= c2; |
k1 *= c2; |
||||
h1 ^= k1; |
h1 ^= k1; |
||||
} |
} |
||||
|
|
||||
// finalize
|
// finalize
|
||||
h1 ^= data.length; |
h1 ^= data.length; |
||||
h1 ^= h1 >> 16; |
h1 ^= h1 >> 16; |
||||
h1 *= 0x85ebca6b; |
h1 *= 0x85ebca6b; |
||||
h1 ^= h1 >> 13; |
h1 ^= h1 >> 13; |
||||
h1 *= 0xc2b2ae35; |
h1 *= 0xc2b2ae35; |
||||
h1 ^= h1 >> 16; |
h1 ^= h1 >> 16; |
||||
|
|
||||
return h1 % (this.data.length * 8); |
return h1 % (this.data.length * 8); |
||||
}; |
}; |
||||
|
|
||||
Bloom.prototype.insert = function(data) { |
Bloom.prototype.insert = function(data) { |
||||
for (var i = 0; i < this.hashFuncs; i++) { |
for (var i = 0; i < this.hashFuncs; i++) { |
||||
var index = this.hash(i, data); |
var index = this.hash(i, data); |
||||
this.data[index >> 3] |= bit_mask[7 & index]; |
this.data[index >> 3] |= bit_mask[7 & index]; |
||||
} |
} |
||||
}; |
}; |
||||
|
|
||||
Bloom.prototype.contains = function(data) { |
Bloom.prototype.contains = function(data) { |
||||
for (var i = 0; i < this.hashFuncs; i++) { |
for (var i = 0; i < this.hashFuncs; i++) { |
||||
var index = this.hash(i, data); |
var index = this.hash(i, data); |
||||
if (!(this.data[index >> 3] & bit_mask[7 & index])) |
if (!(this.data[index >> 3] & bit_mask[7 & index])) |
||||
return false; |
return false; |
||||
} |
} |
||||
|
|
||||
return true; |
return true; |
||||
}; |
}; |
||||
|
|
||||
Bloom.prototype.sizeOk = function() { |
Bloom.prototype.sizeOk = function() { |
||||
return this.data.length <= MAX_BLOOM_FILTER_SIZE && |
return this.data.length <= MAX_BLOOM_FILTER_SIZE && |
||||
this.hashFuncs <= MAX_HASH_FUNCS; |
this.hashFuncs <= MAX_HASH_FUNCS; |
||||
}; |
}; |
||||
|
|
||||
function toInt(v) { |
function toInt(v) { |
||||
return ~~v; |
return ~~v; |
||||
} |
} |
||||
|
|
||||
function min(a, b) { |
function min(a, b) { |
||||
if (a < b) |
if (a < b) |
||||
return a; |
return a; |
||||
return b; |
return b; |
||||
} |
} |
||||
|
|
||||
Bloom.prototype.init = function(elements, FPRate) { |
Bloom.prototype.init = function(elements, FPRate) { |
||||
var filterSize = min(toInt(-1.0 / LN2SQUARED * elements * Math.log(FPRate)), |
var filterSize = min(toInt(-1.0 / LN2SQUARED * elements * Math.log(FPRate)), |
||||
MAX_BLOOM_FILTER_SIZE * 8) / 8; |
MAX_BLOOM_FILTER_SIZE * 8) / 8; |
||||
this.data[filterSize] = 0; |
this.data[filterSize] = 0; |
||||
this.hashFuncs = min(toInt(this.data.length * 8 / elements * LN2), |
this.hashFuncs = min(toInt(this.data.length * 8 / elements * LN2), |
||||
MAX_HASH_FUNCS); |
MAX_HASH_FUNCS); |
||||
}; |
}; |
||||
|
|
||||
return Bloom; |
return Bloom; |
||||
}; |
}; |
||||
module.defineClass(ClassSpec); |
module.defineClass(ClassSpec); |
||||
|
|
||||
|
@ -1,8 +1,8 @@ |
|||||
|
|
||||
exports.intFromCompact = function(c) |
exports.intFromCompact = function(c) |
||||
{ |
{ |
||||
var bytes = ((c >>> 24) & 0xff) >>> 0; |
var bytes = ((c >>> 24) & 0xff) >>> 0; |
||||
var v = ((c & 0xffffff) << (8 * (bytes - 3))) >>> 0; |
var v = ((c & 0xffffff) << (8 * (bytes - 3))) >>> 0; |
||||
return v; |
return v; |
||||
} |
} |
||||
|
|
||||
|
@ -1,43 +1,43 @@ |
|||||
require('classtool'); |
require('classtool'); |
||||
|
|
||||
function ClassSpec(b) { |
function ClassSpec(b) { |
||||
var coinUtil = require('./util/util'); |
var coinUtil = require('./util/util'); |
||||
var timeUtil = require('./util/time'); |
var timeUtil = require('./util/time'); |
||||
var KeyModule = require('./Key'); |
var KeyModule = require('./Key'); |
||||
var SIN = require('./SIN').class(); |
var SIN = require('./SIN').class(); |
||||
|
|
||||
function SINKey(cfg) { |
function SINKey(cfg) { |
||||
if (typeof cfg != 'object') |
if (typeof cfg != 'object') |
||||
cfg = {}; |
cfg = {}; |
||||
|
|
||||
this.created = cfg.created; |
this.created = cfg.created; |
||||
this.privKey = cfg.privKey; |
this.privKey = cfg.privKey; |
||||
}; |
}; |
||||
|
|
||||
SINKey.prototype.generate = function() { |
SINKey.prototype.generate = function() { |
||||
this.privKey = KeyModule.Key.generateSync(); |
this.privKey = KeyModule.Key.generateSync(); |
||||
this.created = timeUtil.curtime(); |
this.created = timeUtil.curtime(); |
||||
}; |
}; |
||||
|
|
||||
SINKey.prototype.pubkeyHash = function() { |
SINKey.prototype.pubkeyHash = function() { |
||||
return coinUtil.sha256ripe160(this.privKey.public); |
return coinUtil.sha256ripe160(this.privKey.public); |
||||
}; |
}; |
||||
|
|
||||
SINKey.prototype.storeObj = function() { |
SINKey.prototype.storeObj = function() { |
||||
var pubKey = this.privKey.public.toString('hex'); |
var pubKey = this.privKey.public.toString('hex'); |
||||
var pubKeyHash = this.pubkeyHash(); |
var pubKeyHash = this.pubkeyHash(); |
||||
var sin = new SIN(SIN.SIN_EPHEM, pubKeyHash); |
var sin = new SIN(SIN.SIN_EPHEM, pubKeyHash); |
||||
var obj = { |
var obj = { |
||||
created: this.created, |
created: this.created, |
||||
priv: this.privKey.private.toString('hex'), |
priv: this.privKey.private.toString('hex'), |
||||
pub: pubKey, |
pub: pubKey, |
||||
sin: sin.toString(), |
sin: sin.toString(), |
||||
}; |
}; |
||||
|
|
||||
return obj; |
return obj; |
||||
}; |
}; |
||||
|
|
||||
return SINKey; |
return SINKey; |
||||
}; |
}; |
||||
module.defineClass(ClassSpec); |
module.defineClass(ClassSpec); |
||||
|
|
||||
|
@ -1,133 +1,133 @@ |
|||||
|
|
||||
function signOne(hash, addrStr, keys) |
function signOne(hash, addrStr, keys) |
||||
{ |
{ |
||||
var keyObj = keys[addrStr]; |
var keyObj = keys[addrStr]; |
||||
var rawPrivKey = new Buffer(keyObj.priv, 'hex'); |
var rawPrivKey = new Buffer(keyObj.priv, 'hex'); |
||||
var key = new KeyModule.Key(); |
var key = new KeyModule.Key(); |
||||
key.private = rawPrivKey; |
key.private = rawPrivKey; |
||||
var signature = key.signSync(hash); |
var signature = key.signSync(hash); |
||||
|
|
||||
return signature; |
return signature; |
||||
} |
} |
||||
|
|
||||
function signTxIn(nIn, tx, txInputs, network, keys, scripts) |
function signTxIn(nIn, tx, txInputs, network, keys, scripts) |
||||
{ |
{ |
||||
// locate TX input needing a signature
|
// locate TX input needing a signature
|
||||
var txin = tx.ins[nIn]; |
var txin = tx.ins[nIn]; |
||||
var scriptSig = txin.getScript(); |
var scriptSig = txin.getScript(); |
||||
|
|
||||
// locate TX output, within txInputs
|
// locate TX output, within txInputs
|
||||
var txoutHash = txin.getOutpointHash(); |
var txoutHash = txin.getOutpointHash(); |
||||
if (!(txoutHash in txInputs)) |
if (!(txoutHash in txInputs)) |
||||
throw new Error("signTxIn missing input hash"); |
throw new Error("signTxIn missing input hash"); |
||||
var txFrom = txInputs[txoutHash]; |
var txFrom = txInputs[txoutHash]; |
||||
var txoutIndex = txin.getOutpointIndex(); |
var txoutIndex = txin.getOutpointIndex(); |
||||
if (txFrom.outs.length >= txoutIndex) |
if (txFrom.outs.length >= txoutIndex) |
||||
throw new Error("signTxIn missing input index"); |
throw new Error("signTxIn missing input index"); |
||||
var txout = txFrom.outs[txoutIndex]; |
var txout = txFrom.outs[txoutIndex]; |
||||
var scriptPubKey = txout.getScript(); |
var scriptPubKey = txout.getScript(); |
||||
|
|
||||
// detect type of transaction, and extract useful elements
|
// detect type of transaction, and extract useful elements
|
||||
var txType = scriptPubKey.classify(); |
var txType = scriptPubKey.classify(); |
||||
if (txType == TX_UNKNOWN) |
if (txType == TX_UNKNOWN) |
||||
throw new Error("unknown TX type"); |
throw new Error("unknown TX type"); |
||||
var scriptData = scriptPubKey.capture(); |
var scriptData = scriptPubKey.capture(); |
||||
|
|
||||
// if P2SH, lookup the script
|
// if P2SH, lookup the script
|
||||
var subscriptRaw = undefined; |
var subscriptRaw = undefined; |
||||
var subscript = undefined; |
var subscript = undefined; |
||||
var subType = undefined; |
var subType = undefined; |
||||
var subData = undefined; |
var subData = undefined; |
||||
if (txType == TX_SCRIPTHASH) { |
if (txType == TX_SCRIPTHASH) { |
||||
var addr = new Address(network.addressScript, scriptData[0]); |
var addr = new Address(network.addressScript, scriptData[0]); |
||||
var addrStr = addr.toString(); |
var addrStr = addr.toString(); |
||||
if (!(addrStr in scripts)) |
if (!(addrStr in scripts)) |
||||
throw new Error("unknown script hash address"); |
throw new Error("unknown script hash address"); |
||||
|
|
||||
subscriptRaw = new Buffer(scripts[addrStr], 'hex'); |
subscriptRaw = new Buffer(scripts[addrStr], 'hex'); |
||||
subscript = new Script(subscriptRaw); |
subscript = new Script(subscriptRaw); |
||||
subType = subscript.classify(); |
subType = subscript.classify(); |
||||
if (subType == TX_UNKNOWN) |
if (subType == TX_UNKNOWN) |
||||
throw new Error("unknown subscript TX type"); |
throw new Error("unknown subscript TX type"); |
||||
subData = subscript.capture(); |
subData = subscript.capture(); |
||||
} |
} |
||||
|
|
||||
var hash = tx.hashForSignature(scriptPubKey, i, 0); |
var hash = tx.hashForSignature(scriptPubKey, i, 0); |
||||
|
|
||||
switch (txType) { |
switch (txType) { |
||||
case TX_PUBKEY: |
case TX_PUBKEY: |
||||
// already signed
|
// already signed
|
||||
if (scriptSig.chunks.length > 0) |
if (scriptSig.chunks.length > 0) |
||||
return; |
return; |
||||
|
|
||||
var pubkeyhash = util.sha256ripe160(scriptData[0]); |
var pubkeyhash = util.sha256ripe160(scriptData[0]); |
||||
var addr = new Address(network.addressPubkey, pubkeyhash); |
var addr = new Address(network.addressPubkey, pubkeyhash); |
||||
var addrStr = addr.toString(); |
var addrStr = addr.toString(); |
||||
if (!(addrStr in keys)) |
if (!(addrStr in keys)) |
||||
throw new Error("unknown pubkey"); |
throw new Error("unknown pubkey"); |
||||
|
|
||||
var signature = signOne(hash, addrStr, keys); |
var signature = signOne(hash, addrStr, keys); |
||||
scriptSig.writeBytes(signature); |
scriptSig.writeBytes(signature); |
||||
break; |
break; |
||||
|
|
||||
case TX_PUBKEYHASH: |
case TX_PUBKEYHASH: |
||||
// already signed
|
// already signed
|
||||
if (scriptSig.chunks.length > 0) |
if (scriptSig.chunks.length > 0) |
||||
return; |
return; |
||||
|
|
||||
var addr = new Address(network.addressPubkey, scriptData[0]); |
var addr = new Address(network.addressPubkey, scriptData[0]); |
||||
var addrStr = addr.toString(); |
var addrStr = addr.toString(); |
||||
if (!(addrStr in keys)) |
if (!(addrStr in keys)) |
||||
throw new Error("unknown pubkey hash address"); |
throw new Error("unknown pubkey hash address"); |
||||
|
|
||||
var signature = signOne(hash, addrStr, keys); |
var signature = signOne(hash, addrStr, keys); |
||||
scriptSig.writeBytes(signature); |
scriptSig.writeBytes(signature); |
||||
scriptSig.writeBytes(key.public); |
scriptSig.writeBytes(key.public); |
||||
break; |
break; |
||||
|
|
||||
case TX_SCRIPTHASH: |
case TX_SCRIPTHASH: |
||||
// already signed
|
// already signed
|
||||
if (scriptSig.chunks.length > 0) |
if (scriptSig.chunks.length > 0) |
||||
return; |
return; |
||||
|
|
||||
var addr = new Address(network.addressPubkey, subData[0]); |
var addr = new Address(network.addressPubkey, subData[0]); |
||||
var addrStr = addr.toString(); |
var addrStr = addr.toString(); |
||||
if (!(addrStr in keys)) |
if (!(addrStr in keys)) |
||||
throw new Error("unknown script(pubkey hash) address"); |
throw new Error("unknown script(pubkey hash) address"); |
||||
|
|
||||
var signature = signOne(hash, addrStr, keys); |
var signature = signOne(hash, addrStr, keys); |
||||
scriptSig.writeBytes(signature); |
scriptSig.writeBytes(signature); |
||||
scriptSig.writeBytes(key.public); |
scriptSig.writeBytes(key.public); |
||||
break; |
break; |
||||
|
|
||||
case TX_MULTISIG: |
case TX_MULTISIG: |
||||
while (scriptSig.chunks.length < scriptData.length) { |
while (scriptSig.chunks.length < scriptData.length) { |
||||
scriptSig.writeBytes(util.EMPTY_BUFFER); |
scriptSig.writeBytes(util.EMPTY_BUFFER); |
||||
} |
} |
||||
for (var i = 0; i < scriptData.length; i++) { |
for (var i = 0; i < scriptData.length; i++) { |
||||
// skip already signed
|
// skip already signed
|
||||
if (scriptSig.chunks[i].length > 0) |
if (scriptSig.chunks[i].length > 0) |
||||
continue; |
continue; |
||||
|
|
||||
var pubkeyhash = util.sha256ripe160(scriptSig.chunks[i]); |
var pubkeyhash = util.sha256ripe160(scriptSig.chunks[i]); |
||||
var addr = new Address(network.addressPubkey, pubkeyhash); |
var addr = new Address(network.addressPubkey, pubkeyhash); |
||||
var addrStr = addr.toString(); |
var addrStr = addr.toString(); |
||||
if (!(addrStr in keys)) |
if (!(addrStr in keys)) |
||||
continue; |
continue; |
||||
|
|
||||
var signature = signOne(hash, addrStr, keys); |
var signature = signOne(hash, addrStr, keys); |
||||
scriptSig.chunks[i] = signature; |
scriptSig.chunks[i] = signature; |
||||
} |
} |
||||
break; |
break; |
||||
} |
} |
||||
|
|
||||
if (txtype == TX_SCRIPTHASH) |
if (txtype == TX_SCRIPTHASH) |
||||
scriptSig.writeBytes(subscriptRaw); |
scriptSig.writeBytes(subscriptRaw); |
||||
} |
} |
||||
|
|
||||
exports.Transaction = function Transaction(tx, txInputs, network, keys, scripts) |
exports.Transaction = function Transaction(tx, txInputs, network, keys, scripts) |
||||
{ |
{ |
||||
for (var i = 0; i < tx.ins.length; i++) |
for (var i = 0; i < tx.ins.length; i++) |
||||
signTxIn(i, tx, txInputs, network, keys, scripts); |
signTxIn(i, tx, txInputs, network, keys, scripts); |
||||
}; |
}; |
||||
|
|
||||
|
@ -1,53 +1,53 @@ |
|||||
require('classtool'); |
require('classtool'); |
||||
|
|
||||
function ClassSpec(b) { |
function ClassSpec(b) { |
||||
var coinUtil = require('./util/util'); |
var coinUtil = require('./util/util'); |
||||
var timeUtil = require('./util/time'); |
var timeUtil = require('./util/time'); |
||||
var KeyModule = require('./Key'); |
var KeyModule = require('./Key'); |
||||
var PrivateKey = require('./PrivateKey').class(); |
var PrivateKey = require('./PrivateKey').class(); |
||||
var Address = require('./Address').class(); |
var Address = require('./Address').class(); |
||||
|
|
||||
function WalletKey(cfg) { |
function WalletKey(cfg) { |
||||
this.network = cfg.network; // required
|
this.network = cfg.network; // required
|
||||
this.created = cfg.created; |
this.created = cfg.created; |
||||
this.privKey = cfg.privKey; |
this.privKey = cfg.privKey; |
||||
}; |
}; |
||||
|
|
||||
WalletKey.prototype.generate = function() { |
WalletKey.prototype.generate = function() { |
||||
this.privKey = KeyModule.Key.generateSync(); |
this.privKey = KeyModule.Key.generateSync(); |
||||
this.created = timeUtil.curtime(); |
this.created = timeUtil.curtime(); |
||||
}; |
}; |
||||
|
|
||||
WalletKey.prototype.storeObj = function() { |
WalletKey.prototype.storeObj = function() { |
||||
var pubKey = this.privKey.public.toString('hex'); |
var pubKey = this.privKey.public.toString('hex'); |
||||
var pubKeyHash = coinUtil.sha256ripe160(this.privKey.public); |
var pubKeyHash = coinUtil.sha256ripe160(this.privKey.public); |
||||
var addr = new Address(this.network.addressPubkey, pubKeyHash); |
var addr = new Address(this.network.addressPubkey, pubKeyHash); |
||||
var priv = new PrivateKey(this.network.keySecret, this.privKey.private, this.privKey.compressed); |
var priv = new PrivateKey(this.network.keySecret, this.privKey.private, this.privKey.compressed); |
||||
var obj = { |
var obj = { |
||||
created: this.created, |
created: this.created, |
||||
priv: priv.toString(), |
priv: priv.toString(), |
||||
pub: pubKey, |
pub: pubKey, |
||||
addr: addr.toString(), |
addr: addr.toString(), |
||||
}; |
}; |
||||
|
|
||||
return obj; |
return obj; |
||||
}; |
}; |
||||
|
|
||||
WalletKey.prototype.fromObj = function(obj) { |
WalletKey.prototype.fromObj = function(obj) { |
||||
this.created = obj.created; |
this.created = obj.created; |
||||
this.privKey = new KeyModule.Key(); |
this.privKey = new KeyModule.Key(); |
||||
if (obj.priv.length==64) { |
if (obj.priv.length==64) { |
||||
this.privKey.private = new Buffer(obj.priv,'hex'); |
this.privKey.private = new Buffer(obj.priv,'hex'); |
||||
this.privKey.compressed = true; |
this.privKey.compressed = true; |
||||
} |
} |
||||
else { |
else { |
||||
var priv = new PrivateKey(obj.priv); |
var priv = new PrivateKey(obj.priv); |
||||
this.privKey.private = new Buffer(priv.payload()); |
this.privKey.private = new Buffer(priv.payload()); |
||||
this.privKey.compressed = priv.compressed(); |
this.privKey.compressed = priv.compressed(); |
||||
} |
} |
||||
this.privKey.regenerateSync(); |
this.privKey.regenerateSync(); |
||||
}; |
}; |
||||
|
|
||||
return WalletKey; |
return WalletKey; |
||||
}; |
}; |
||||
module.defineClass(ClassSpec); |
module.defineClass(ClassSpec); |
||||
|
Loading…
Reference in new issue