@@ -37,10 +37,8 @@ class ElectrumClient extends Client {
3737 onClose ( ) {
3838 super . onClose ( ) ;
3939 const list = [
40- 'server.peers.subscribe' ,
41- 'blockchain.numblocks.subscribe' ,
4240 'blockchain.headers.subscribe' ,
43- 'blockchain.address .subscribe' ,
41+ 'blockchain.scripthash .subscribe' ,
4442 ] ;
4543 list . forEach ( event => this . subscribe . removeAllListeners ( event ) ) ;
4644 setTimeout ( ( ) => {
@@ -136,17 +134,14 @@ class ElectrumClient extends Client {
136134 blockchainScripthash_subscribe ( scripthash ) {
137135 return this . request ( 'blockchain.scripthash.subscribe' , [ scripthash ] ) ;
138136 }
139- blockchainBlock_getHeader ( height ) {
140- return this . request ( 'blockchain.block.get_header' , [ height ] ) ;
141- }
142137 blockchainBlock_headers ( start_height , count ) {
143138 return this . request ( 'blockchain.block.headeres' , [ start_height , count ] ) ;
144139 }
145140 blockchainEstimatefee ( number ) {
146141 return this . request ( 'blockchain.estimatefee' , [ number ] ) ;
147142 }
148- blockchainHeaders_subscribe ( raw ) {
149- return this . request ( 'blockchain.headers.subscribe' , [ raw || false ] ) ;
143+ blockchainHeaders_subscribe ( ) {
144+ return this . request ( 'blockchain.headers.subscribe' , [ ] ) ;
150145 }
151146 blockchain_relayfee ( ) {
152147 return this . request ( 'blockchain.relayfee' , [ ] ) ;
@@ -166,36 +161,6 @@ class ElectrumClient extends Client {
166161 mempool_getFeeHistogram ( ) {
167162 return this . request ( 'mempool.get_fee_histogram' , [ ] ) ;
168163 }
169- // ---------------------------------
170- // protocol 1.1 deprecated method
171- // ---------------------------------
172- blockchainUtxo_getAddress ( tx_hash , index ) {
173- return this . request ( 'blockchain.utxo.get_address' , [ tx_hash , index ] ) ;
174- }
175- blockchainNumblocks_subscribe ( ) {
176- return this . request ( 'blockchain.numblocks.subscribe' , [ ] ) ;
177- }
178- // ---------------------------------
179- // protocol 1.2 deprecated method
180- // ---------------------------------
181- blockchainBlock_getChunk ( index ) {
182- return this . request ( 'blockchain.block.get_chunk' , [ index ] ) ;
183- }
184- blockchainAddress_getBalance ( address ) {
185- return this . request ( 'blockchain.address.get_balance' , [ address ] ) ;
186- }
187- blockchainAddress_getHistory ( address ) {
188- return this . request ( 'blockchain.address.get_history' , [ address ] ) ;
189- }
190- blockchainAddress_getMempool ( address ) {
191- return this . request ( 'blockchain.address.get_mempool' , [ address ] ) ;
192- }
193- blockchainAddress_listunspent ( address ) {
194- return this . request ( 'blockchain.address.listunspent' , [ address ] ) ;
195- }
196- blockchainAddress_subscribe ( address ) {
197- return this . request ( 'blockchain.address.subscribe' , [ address ] ) ;
198- }
199164}
200165
201166module . exports = ElectrumClient ;
0 commit comments