@tokel/bitgo-komodo-cc-lib
Advanced tools
Comparing version 0.1.42 to 0.1.43
@@ -167,3 +167,3 @@ 'use strict'; | ||
*/ | ||
async function tokenInfoV2Tokel(mynetwork, peers, wif, tokenidhex) { | ||
async function tokensInfoV2Tokel(peers, mynetwork, wif, tokenidhex) { | ||
let mypair = ecpair.fromWIF(wif, mynetwork); | ||
@@ -760,3 +760,3 @@ let mypk = mypair.getPublicKeyBuffer(); | ||
module.exports = { | ||
tokenInfoV2Tokel, tokensv2Create, tokensv2CreateTokel, tokensv2Transfer, tokenV2Address, | ||
tokensInfoV2Tokel, tokensv2Create, tokensv2CreateTokel, tokensv2Transfer, tokenV2Address, | ||
isTokenV2Output, validateTokensV2Many, getTokensForPubkey, | ||
@@ -763,0 +763,0 @@ tokensv2GlobalPk, tokensv2GlobalPrivkey, tokensv2GlobalAddress, EVAL_TOKENSV2, |
@@ -33,4 +33,5 @@ 'use strict' | ||
this.connect(() => { | ||
cb(); | ||
// after verack received we must send NSPV_INFO (sort of secondary nspv connect) to check versions | ||
this.nspvGetInfo(0, {}, (err, nspvInfo, peer) => { | ||
/*this.nspvGetInfo(0, {}, (err, nspvInfo, peer) => { | ||
if (nspvInfo && nspvInfo.version === nspvVersion) | ||
@@ -46,3 +47,3 @@ cb(nspvInfo); | ||
} | ||
}); | ||
}); */ | ||
}); | ||
@@ -49,0 +50,0 @@ } |
@@ -190,3 +190,4 @@ 'use strict' | ||
this.verack = true | ||
this._maybeReady() | ||
// Note: _maybeReady called from nspvPeer | ||
//this._maybeReady() | ||
}) | ||
@@ -193,0 +194,0 @@ |
@@ -183,8 +183,11 @@ 'use strict' | ||
// setup getaddr or getwsaddr loop | ||
if (this.fConnectPlainWeb) { | ||
this.getWsAddr({}, ()=>{}) // empty opts and cb to pass through _request() | ||
this.getAddrTimer = setInterval(this.getWsAddr.bind(this, {}, ()=>{}), this.getAddrInterval) // set getwsaddr interval 120 sec | ||
} else { | ||
this.getAddr({}, ()=>{}) // empty opts and cb to pass through _request() | ||
this.getAddrTimer = setInterval(this.getAddr.bind(this, {}, ()=>{}), this.getAddrInterval) // set getaddr interval 120 sec | ||
if (!this.getAddrTimer) | ||
{ | ||
if (this.fConnectPlainWeb) { | ||
this.getWsAddr({}, ()=>{}) // empty opts and cb to pass through _request() | ||
this.getAddrTimer = setInterval(this.getWsAddr.bind(this, {}, ()=>{}), this.getAddrInterval) // set getwsaddr interval 120 sec | ||
} else { | ||
this.getAddr({}, ()=>{}) // empty opts and cb to pass through _request() | ||
this.getAddrTimer = setInterval(this.getAddr.bind(this, {}, ()=>{}), this.getAddrInterval) // set getaddr interval 120 sec | ||
} | ||
} | ||
@@ -252,3 +255,4 @@ | ||
} | ||
this._onConnection(Error(`No methods available to get new peers for required ${this._numPeers} peers, current number ${this.peers.length}`)) | ||
//this._onConnection(Error(`No more methods available to get new peers for required ${this._numPeers} peers, current number ${this.peers.length}`)) | ||
logdebug(`No more methods available to get new peers for required ${this._numPeers} peers`); | ||
return false | ||
@@ -541,2 +545,3 @@ } | ||
} | ||
logdebug('finished:', this.peers.length) | ||
//if (this.getAddrTimer) clearInterval(this.getAddrTimer) | ||
@@ -543,0 +548,0 @@ } |
{ | ||
"name": "@tokel/bitgo-komodo-cc-lib", | ||
"version": "0.1.42", | ||
"version": "0.1.43", | ||
"description": "Client-side Bitcoin JavaScript library with Komodo cryptocondions support", | ||
@@ -5,0 +5,0 @@ "main": "./src/index.js", |
338653
9226