constecl=newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls
constecl=newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls
ecl.connect();
ecl.connect();
@ -58,7 +60,7 @@ module.exports = (shepherd) => {
});
});
shepherd.electrumGetCurrentBlock=(network)=>{
shepherd.electrumGetCurrentBlock=(network)=>{
returnnewshepherd.Promise((resolve,reject)=>{
returnnewPromise((resolve,reject)=>{
constecl=newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls
constecl=newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls
constecl=shepherd.electrumServers[network].proto==='insight'?shepherd.insightJSCore(shepherd.electrumServers[network]):newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls
constecl=shepherd.electrumServers[network].proto==='insight'?shepherd.insightJSCore(shepherd.electrumServers[network]):newshepherd.electrumJSCore(shepherd.electrumServers[network].port,shepherd.electrumServers[network].address,shepherd.electrumServers[network].proto);// tcp or tls