1
- Protocol Methods
2
- ================
1
+ ==================
2
+ Protocol Methods
3
+ ==================
3
4
4
5
blockchain.address.get_balance
5
- ------------------------------
6
+ ==============================
6
7
7
8
Return the confirmed and unconfirmed balances of a bitcoin address.
8
9
@@ -20,7 +21,7 @@ Return the confirmed and unconfirmed balances of a bitcoin address.
20
21
See :func: `blockchain.scripthash.get_balance `.
21
22
22
23
blockchain.address.get_history
23
- ------------------------------
24
+ ==============================
24
25
25
26
Return the confirmed and unconfirmed history of a bitcoin address.
26
27
@@ -38,7 +39,7 @@ Return the confirmed and unconfirmed history of a bitcoin address.
38
39
As for :func: `blockchain.scripthash.get_history `.
39
40
40
41
blockchain.address.get_mempool
41
- ------------------------------
42
+ ==============================
42
43
43
44
Return the unconfirmed transactions of a bitcoin address.
44
45
@@ -56,7 +57,7 @@ Return the unconfirmed transactions of a bitcoin address.
56
57
As for :func: `blockchain.scripthash.get_mempool `.
57
58
58
59
blockchain.address.listunspent
59
- ------------------------------
60
+ ==============================
60
61
61
62
Return an ordered list of UTXOs sent to a bitcoin address.
62
63
@@ -74,7 +75,7 @@ Return an ordered list of UTXOs sent to a bitcoin address.
74
75
As for :func: `blockchain.scripthash.listunspent `.
75
76
76
77
blockchain.address.subscribe
77
- ----------------------------
78
+ ============================
78
79
79
80
Subscribe to a bitcoin address.
80
81
@@ -100,14 +101,15 @@ Subscribe to a bitcoin address.
100
101
.. function :: blockchain.address.subscribe(address, status)
101
102
102
103
blockchain.block.get_header
103
- ---------------------------
104
+ ===========================
104
105
105
106
Return the :ref: `deserialized header <deserialized header >` of the
106
107
block at the given height.
107
108
108
109
**Signature **
109
110
110
111
.. function :: blockchain.block.get_header(height)
112
+ .. deprecated :: 1.3
111
113
112
114
*height *
113
115
@@ -132,7 +134,7 @@ block at the given height.
132
134
}
133
135
134
136
blockchain.block.get_chunk
135
- --------------------------
137
+ ==========================
136
138
137
139
Return a concatenated chunk of block headers from the main chain.
138
140
Typically, a chunk consists of a fixed number of block headers over
@@ -161,8 +163,31 @@ bandwidth-intensive request.
161
163
implied starting height will be returned; this may range from zero
162
164
to the coin-specific chunk size.
163
165
166
+ blockchain.block.header
167
+ =======================
168
+
169
+ Return the block header at the given height.
170
+
171
+ **Signature **
172
+
173
+ .. function :: blockchain.block.header(height)
174
+
175
+ *height *
176
+
177
+ The height of the block, an integer.
178
+
179
+ **Result **
180
+
181
+ The raw block header as a hexadecimal string.
182
+
183
+ **Example Result **
184
+
185
+ ::
186
+
187
+ "0100000085144a84488ea88d221c8bd6c059da090e88f8a2c99690ee55dbba4e00000000e11c48fecdd9e72510ca84f023370c9a38bf91ac5cae88019bee94d24528526344c36649ffff001d1d03e477"
188
+
164
189
blockchain.block.headers
165
- ------------------------
190
+ ========================
166
191
167
192
Return a concatenated chunk of block headers from the main chain.
168
193
@@ -211,7 +236,7 @@ Return a concatenated chunk of block headers from the main chain.
211
236
}
212
237
213
238
blockchain.estimatefee
214
- ----------------------
239
+ ======================
215
240
216
241
Return the estimated transaction fee per kilobyte for a transaction to
217
242
be confirmed within a certain number of blocks.
@@ -237,7 +262,7 @@ be confirmed within a certain number of blocks.
237
262
0.00101079
238
263
239
264
blockchain.headers.subscribe
240
- ----------------------------
265
+ ============================
241
266
242
267
Subscribe to receive block headers when a new block is found.
243
268
@@ -313,7 +338,7 @@ Subscribe to receive block headers when a new block is found.
313
338
314
339
315
340
blockchain.numblocks.subscribe
316
- ------------------------------
341
+ ==============================
317
342
318
343
Subscribe to receive the block height when a new block is found.
319
344
@@ -335,7 +360,7 @@ Subscribe to receive the block height when a new block is found.
335
360
.. function :: blockchain.numblocks.subscribe(height)
336
361
337
362
blockchain.relayfee
338
- -------------------
363
+ ===================
339
364
340
365
Return the minimum fee a low-priority transaction must pay in order to
341
366
be accepted to the daemon's memory pool.
@@ -360,7 +385,7 @@ be accepted to the daemon's memory pool.
360
385
0.0
361
386
362
387
blockchain.scripthash.get_balance
363
- ---------------------------------
388
+ =================================
364
389
365
390
Return the confirmed and unconfirmed balances of a :ref: `script hash
366
391
<script hashes>`.
@@ -389,7 +414,7 @@ Return the confirmed and unconfirmed balances of a :ref:`script hash
389
414
}
390
415
391
416
blockchain.scripthash.get_history
392
- ---------------------------------
417
+ =================================
393
418
394
419
Return the confirmed and unconfirmed history of a :ref: `script hash
395
420
<script hashes>`.
@@ -447,7 +472,7 @@ Return the confirmed and unconfirmed history of a :ref:`script hash
447
472
]
448
473
449
474
blockchain.scripthash.get_mempool
450
- ---------------------------------
475
+ =================================
451
476
452
477
Return the unconfirmed transactions of a :ref: `script hash <script
453
478
hashes>`.
@@ -491,7 +516,7 @@ hashes>`.
491
516
]
492
517
493
518
blockchain.scripthash.listunspent
494
- ---------------------------------
519
+ =================================
495
520
496
521
Return an ordered list of UTXOs sent to a script hash.
497
522
@@ -550,7 +575,7 @@ Return an ordered list of UTXOs sent to a script hash.
550
575
]
551
576
552
577
blockchain.scripthash.subscribe
553
- -------------------------------
578
+ ===============================
554
579
555
580
Subscribe to a script hash.
556
581
@@ -576,7 +601,7 @@ Subscribe to a script hash.
576
601
.. function :: blockchain.scripthash.subscribe(scripthash, status)
577
602
578
603
blockchain.transaction.broadcast
579
- --------------------------------
604
+ ================================
580
605
581
606
Broadcast a transaction to the network.
582
607
@@ -614,7 +639,7 @@ Protocol version 1.0 returning an error as the result:
614
639
"258: txn-mempool-conflict"
615
640
616
641
blockchain.transaction.get
617
- --------------------------
642
+ ==========================
618
643
619
644
Return a raw transaction.
620
645
@@ -690,7 +715,7 @@ When *verbose* is :const:`True`::
690
715
"value": 0.1360904}]}
691
716
692
717
blockchain.transaction.get_merkle
693
- ---------------------------------
718
+ =================================
694
719
695
720
Return the markle branch to a confirmed transaction given its hash
696
721
and height.
@@ -750,7 +775,7 @@ and height.
750
775
}
751
776
752
777
blockchain.utxo.get_address
753
- ---------------------------
778
+ ===========================
754
779
755
780
Return the address paid to by a UTXO.
756
781
@@ -776,7 +801,7 @@ Return the address paid to by a UTXO.
776
801
spent :const: `null ` *may * be returned.
777
802
778
803
mempool.get_fee_histogram
779
- -------------------------
804
+ =========================
780
805
781
806
Return a histogram of the fee rates paid by transactions in the memory
782
807
pool, weighted by transaction size.
@@ -807,7 +832,7 @@ pool, weighted by transaction size.
807
832
808
833
809
834
server.add_peer
810
- ---------------
835
+ ===============
811
836
812
837
A newly-started server uses this call to get itself into other servers'
813
838
peers lists. It sould not be used by wallet clients.
@@ -831,7 +856,7 @@ peers lists. It sould not be used by wallet clients.
831
856
832
857
833
858
server.banner
834
- -------------
859
+ =============
835
860
836
861
Return a banner to be shown in the Electrum console.
837
862
@@ -851,7 +876,7 @@ Return a banner to be shown in the Electrum console.
851
876
852
877
853
878
server.donation_address
854
- -----------------------
879
+ =======================
855
880
856
881
Return a server donation address.
857
882
@@ -871,7 +896,7 @@ Return a server donation address.
871
896
872
897
873
898
server.features
874
- ---------------
899
+ ===============
875
900
876
901
Return a list of features and services supported by the server.
877
902
@@ -955,7 +980,7 @@ Return a list of features and services supported by the server.
955
980
956
981
957
982
server.peers.subscribe
958
- ----------------------
983
+ ======================
959
984
960
985
Return a list of peer servers. Despite the name this is not a
961
986
subscription and the server must send no notifications.
@@ -983,7 +1008,7 @@ subscription and the server must send no notifications.
983
1008
missing then the server does not support that transport.
984
1009
985
1010
server.ping
986
- -----------
1011
+ ===========
987
1012
988
1013
Ping the server to ensure it is responding, and to keep the session
989
1014
alive. The server may disconnect clients that have sent no requests
@@ -999,7 +1024,7 @@ for roughly 10 minutes.
999
1024
Returns :const: `null `.
1000
1025
1001
1026
server.version
1002
- --------------
1027
+ ==============
1003
1028
1004
1029
Identify the client to the server and negotiate the protocol version.
1005
1030
@@ -1057,7 +1082,7 @@ Identify the client to the server and negotiate the protocol version.
1057
1082
"ElectrumX 1.2.1"
1058
1083
1059
1084
masternode.announce.broadcast
1060
- -----------------------------
1085
+ =============================
1061
1086
1062
1087
Pass through the masternode announce message to be broadcast by the daemon.
1063
1088
@@ -1084,7 +1109,7 @@ Whenever a masternode comes online or a client is syncing, they will send this m
1084
1109
True
1085
1110
1086
1111
masternode.subscribe
1087
- --------------------
1112
+ ====================
1088
1113
1089
1114
Returns the status of masternode.
1090
1115
@@ -1115,7 +1140,7 @@ Returns the status of masternode.
1115
1140
{'method': 'masternode.subscribe', u'jsonrpc': u'2.0', u'result': u'ENABLED', 'params': ['8c59133e714797650cf69043d05e409bbf45670eed7c4e4a386e52c46f1b5e24-0'], u'id': 19}
1116
1141
1117
1142
masternode.list
1118
- ---------------
1143
+ ===============
1119
1144
1120
1145
Returns the list of masternodes.
1121
1146
0 commit comments