Browse Source
Added net & tls to client constructor in client.js & electrum_client.js.
get-transaction-merkle
Corey Phillips
4 years ago
No known key found for this signature in database
GPG Key ID: 80C0975F55D3A07B
2 changed files with
6 additions and
4 deletions
-
lib/client.js
-
lib/electrum_client.js
|
|
@ -5,13 +5,15 @@ const initSocket = require('./init_socket'); |
|
|
|
const connectSocket = require('./connect_socket'); |
|
|
|
|
|
|
|
class Client { |
|
|
|
constructor(port, host, protocol = 'tcp', options = void 0) { |
|
|
|
constructor(port, host, protocol = 'tcp', net, tls) { |
|
|
|
this.net = net; |
|
|
|
this.tls = tls; |
|
|
|
this.id = 0; |
|
|
|
this.port = port; |
|
|
|
this.host = host; |
|
|
|
this.callback_message_queue = {}; |
|
|
|
this.subscribe = new EventEmitter(); |
|
|
|
this.conn = initSocket(this, protocol, options); |
|
|
|
this.conn = initSocket(this, protocol); |
|
|
|
this.mp = new util.MessageParser((body, n) => { |
|
|
|
this.onMessage(body, n); |
|
|
|
}); |
|
|
|
|
|
@ -1,8 +1,8 @@ |
|
|
|
const Client = require("./client") |
|
|
|
class ElectrumClient extends Client{ |
|
|
|
|
|
|
|
constructor(port, host, protocol, options){ |
|
|
|
super(port, host, protocol, options); |
|
|
|
constructor(port, host, protocol, net, tls){ |
|
|
|
super(port, host, protocol, net, tls); |
|
|
|
} |
|
|
|
onClose(){ |
|
|
|
super.onClose() |
|
|
|