@@ -37,10 +37,8 @@ class ElectrumClient extends Client {
37
37
onClose ( ) {
38
38
super . onClose ( ) ;
39
39
const list = [
40
- 'server.peers.subscribe' ,
41
- 'blockchain.numblocks.subscribe' ,
42
40
'blockchain.headers.subscribe' ,
43
- 'blockchain.address .subscribe' ,
41
+ 'blockchain.scripthash .subscribe' ,
44
42
] ;
45
43
list . forEach ( event => this . subscribe . removeAllListeners ( event ) ) ;
46
44
setTimeout ( ( ) => {
@@ -136,17 +134,14 @@ class ElectrumClient extends Client {
136
134
blockchainScripthash_subscribe ( scripthash ) {
137
135
return this . request ( 'blockchain.scripthash.subscribe' , [ scripthash ] ) ;
138
136
}
139
- blockchainBlock_getHeader ( height ) {
140
- return this . request ( 'blockchain.block.get_header' , [ height ] ) ;
141
- }
142
137
blockchainBlock_headers ( start_height , count ) {
143
138
return this . request ( 'blockchain.block.headeres' , [ start_height , count ] ) ;
144
139
}
145
140
blockchainEstimatefee ( number ) {
146
141
return this . request ( 'blockchain.estimatefee' , [ number ] ) ;
147
142
}
148
- blockchainHeaders_subscribe ( raw ) {
149
- return this . request ( 'blockchain.headers.subscribe' , [ raw || false ] ) ;
143
+ blockchainHeaders_subscribe ( ) {
144
+ return this . request ( 'blockchain.headers.subscribe' , [ ] ) ;
150
145
}
151
146
blockchain_relayfee ( ) {
152
147
return this . request ( 'blockchain.relayfee' , [ ] ) ;
@@ -166,36 +161,6 @@ class ElectrumClient extends Client {
166
161
mempool_getFeeHistogram ( ) {
167
162
return this . request ( 'mempool.get_fee_histogram' , [ ] ) ;
168
163
}
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
- }
199
164
}
200
165
201
166
module . exports = ElectrumClient ;
0 commit comments