@@ -14,6 +14,8 @@ Return the block header at the given height.
14
14
.. versionchanged :: 1.4
15
15
*cp_height * parameter added
16
16
.. versionchanged :: 1.4.1
17
+ .. versionchanged :: 1.6
18
+ *cp_height * support made optional
17
19
18
20
*height *
19
21
@@ -26,6 +28,10 @@ Return the block header at the given height.
26
28
27
29
*height * <= *cp_height *
28
30
31
+ The server CAN decide not to support a non-zero cp_height value, but if so,
32
+ it MUST indicate that in its :func: `server.features ` response by setting
33
+ `method_flavours["blockchain.block.header"]["supports_cp_height"]=false `.
34
+
29
35
**Result **
30
36
31
37
If *cp_height * is zero, the raw block header as a hexadecimal
@@ -87,6 +93,7 @@ Return a chunk of block headers from the main chain.
87
93
.. versionchanged :: 1.4.1
88
94
.. versionchanged :: 1.6
89
95
response contains *headers * field instead of *hex *
96
+ *cp_height * support made optional
90
97
91
98
*start_height *
92
99
@@ -103,6 +110,11 @@ Return a chunk of block headers from the main chain.
103
110
104
111
*start_height * + (*count * - 1) <= *cp_height *
105
112
113
+ The server CAN decide not to support a non-zero cp_height value, but if so,
114
+ it MUST indicate that in its :func: `server.features ` response by setting
115
+ `method_flavours["blockchain.block.header"]["supports_cp_height"]=false `.
116
+ (the flavour key `"blockchain.block.header" ` is reused with the other header method).
117
+
106
118
**Result **
107
119
108
120
A dictionary with the following members:
@@ -562,8 +574,8 @@ as an input (spends it).
562
574
the outpoint. The behaviour is undefined if an incorrect value is provided.
563
575
The server (especially lighter ones such as EPS/BWT) might require this parameter
564
576
to be able to serve the request, in which case the server must indicate so in its
565
- :func: `server.features ` response, by including an ` requires_spk_hint_for_outpoint ` key
566
- with value ` 1 `.
577
+ :func: `server.features ` response, by setting
578
+ ` method_flavours["blockchain.outpoint.subscribe"]["requires_spk_hint"]=true `.
567
579
568
580
.. note :: The server MAY automatically clean up subscriptions (unsubscribe the client)
569
581
where the spending transaction is already deeply mined at a reorg-safe height (typically
@@ -773,6 +785,10 @@ with the child being the last element in the array.
773
785
*verbose *
774
786
775
787
Whether a verbose coin-specific response is required.
788
+ The server MUST support the verbose=false option (which is the default).
789
+ The server CAN decide not to support the verbose=true option, but if so,
790
+ it MUST indicate that in its :func: `server.features ` response by setting
791
+ `method_flavours["blockchain.transaction.broadcast_package"]["supports_verbose_true"]=false `.
776
792
777
793
**Result **
778
794
@@ -855,6 +871,8 @@ Return a raw transaction.
855
871
ignored argument *height * removed
856
872
.. versionchanged :: 1.2
857
873
*verbose * argument added
874
+ .. versionchanged :: 1.6
875
+ support of *verbose=true * made optional
858
876
859
877
*tx_hash *
860
878
@@ -863,6 +881,10 @@ Return a raw transaction.
863
881
*verbose *
864
882
865
883
Whether a verbose coin-specific response is required.
884
+ The server MUST support the verbose=false option (which is the default).
885
+ The server CAN decide not to support the verbose=true option, but if so,
886
+ it MUST indicate that in its :func: `server.features ` response by setting
887
+ `method_flavours["blockchain.transaction.get"]["supports_verbose_true"]=false `.
866
888
867
889
**Result **
868
890
@@ -1162,6 +1184,8 @@ Return a list of features and services supported by the server.
1162
1184
**Signature **
1163
1185
1164
1186
.. function :: server.features()
1187
+ .. versionchanged :: 1.6
1188
+ added *method_flavours * field to result
1165
1189
1166
1190
**Result **
1167
1191
@@ -1223,6 +1247,18 @@ Return a list of features and services supported by the server.
1223
1247
there is no pruning limit. Should be the same as what would
1224
1248
suffix the letter ``p `` in the IRC real name.
1225
1249
1250
+ * *method_flavours *
1251
+
1252
+ A dictionary that describes whether optional features of certain protocol methods
1253
+ are supported by the server. The server might also require an otherwise optional
1254
+ argument to be set by the client, that too should be clearly advertised here.
1255
+ The keys are protocol method name strings, and the values are dictionaries
1256
+ that are specific to the given protocol method.
1257
+
1258
+ If a server supports all functionality defined for the negotiated protocol version,
1259
+ it can just set this to the empty dict (but the `method_flavours ` key itself
1260
+ must always be present).
1261
+
1226
1262
**Example Result **
1227
1263
1228
1264
::
@@ -1234,7 +1270,11 @@ Return a list of features and services supported by the server.
1234
1270
"protocol_min": "1.0",
1235
1271
"pruning": null,
1236
1272
"server_version": "ElectrumX 1.0.17",
1237
- "hash_function": "sha256"
1273
+ "hash_function": "sha256",
1274
+ "method_flavours": {
1275
+ "blockchain.outpoint.subscribe": {"requires_spk_hint": true},
1276
+ "blockchain.transaction.get": {"supports_verbose_true": false}
1277
+ }
1238
1278
}
1239
1279
1240
1280
0 commit comments