diff --git a/README.mediawiki b/README.mediawiki index fdd27ac499..25cf8ab8e2 100644 --- a/README.mediawiki +++ b/README.mediawiki @@ -210,12 +210,12 @@ Those proposing changes should consider that ultimately consent may rest with th | Standard | Proposed |- -| 40 +| [[bip-0040.mediawiki|40]] | API/RPC | Stratum wire protocol -| Marek Palatinus +| Marek Palatinus, Ben van Hartingsveldt | Standard -| BIP number allocated +| Draft |- | 41 | API/RPC diff --git a/bip-0040.mediawiki b/bip-0040.mediawiki new file mode 100644 index 0000000000..78166cd61b --- /dev/null +++ b/bip-0040.mediawiki @@ -0,0 +1,182 @@ +
+  BIP: 40
+  Layer: API/RPC
+  Title: Stratum wire protocol
+  Author: Marek Palatinus 
+          Ben van Hartingsveldt 
+  Comments-Summary: No comments yet.
+  Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0040
+  Status: Draft
+  Type: Standards Track
+  Created: 2024-03-07
+  License: PD
+
+ +==Abstract== + +This document describes the Stratum wire protocol used in clients such as Electrum, and which also laid the foundation for the Stratum mining protocol, used in many Bitcoin pools. + +The specification is intended to set a standard for connections between clients and servers in which the client is able to request data without having to download the full blockchain. + +The specification consists of three parts. In the first part, the data format is defined. In the second part, the possible transport protocols (including encapsulation) are described. In the third part, the available methods are documented. + +==Motivation== + +Many clients want to give users access to the Bitcoin ecosystem. However, for specific reasons not every user is able to download the full blockchain to their machine. + +The Stratum wire protocol defines a way to access the blockchain without having it downloaded. For example, a client can request both the genesis block and the latest block with the same latency, because the server synchronizes and indexes all the blocks for us. + +==History== + +The Stratum wire protocol was introduced by Marek Palatinus in late 2011 and early 2012. It was a language-independent alternative to the Python-based protocol in early versions of Electrum, created by Thomas Voegtlin. The Stratum wire protocol made it possible to create compatible servers that Electrum could connect to, but it also made it possible to write alternative clients. + +Later in 2012, Marek Palatinus introduced Stratum for mining pools as well: The Stratum mining protocol, as defined in [[bip-0041.mediawiki|BIP 41]]. + +==ExtensionThis is extended specification information of the Stratum wire protocol to make it more complete. This information will not be found in any code or specification before this BIP.== + +This BIP has some extended specification information that isn't found in the older, legacy specifications. For backwards compatibility, it is recommended to implement the legacy specification information too, which is also described in this specification. + +==Specification: Data Format== + +Stratum leverages [https://www.jsonrpc.org/ JSON-RPC]. Both versions 1.0 and 2.0 are allowed, according to their respective rules. + +Additionally, it is a convention to give all Stratum methods in the method property a name that meets the following EBNF notation: method ::= serviceType ("[" serviceVendor "]")? "." methodName, where serviceType and serviceVendor are allowed to have dots and methodName isn't. For example, the values blockchain.block.subscribe and blockchain.block[Electrum].subscribe. + +The service vendor is optional. However, multiple vendors can define the same service type, so the service vendor is introduced to distinguish them. If the service vendor is absent, the default service type is executed. It is up to the server implementer which service vendor is the default. + +''Note: In JSON-RPC 1.0, the param property is an array, so everything should be passed in the right order. In JSON-RPC 2.0, named parameters are also allowed. In that case, only the parameter names that are documented should be used; otherwise, the method can fail. It is maybe also possible that a specific method (or server) only supports params as an array, because it doesn't know how to handle named params, even if it supports JSON-RPC 2.0.'' + +==Specification: Transport Protocols== + +It is possible to send JSON-RPC messages over different transport protocols, like TCP and HTTP. It is also possible to protect these protocols with SSL/TLS. + +''Note: Implementers may write servers that support multiple coins, assuming that those coins all use the same port (e.g. 50001). Because HTTP and WebSockets support virtual hosting (Host header or :authority pseudo-header), it is possible to create a server on a single IP address that supports multiple coins by checking the domain name. The same is the case for the transport protocols with SSL/TLS when SNI is used. On plain TCP, virtual hosting is not possible. A similar experience can be reached by using multiple IP addresses. For IPv6, a network of /96 would be enough to hypothetically support all coins ever listed in SLIP-44. For IPv4, you would need all IPv4 addresses that exist to do the same, even the invalid ones, so a suggestion is to only use the server for coins you really need. Also, other ports could possibly be used, and in that case, a /16 IP block with all 65536 TCP ports in use will be enough to support all coins. However, because using non-standard and non-default ports is not user-friendly, this is also not recommended.'' + +===TCP=== + +Stratum over a TCP connection. Every JSON-RPC message (including batch messages) is sent on a single line, ending with a line-feed (\n), so \r\n is also allowed. Line-feeds inside the JSON should be encoded as usual. Both client and server can initiate a request on which the other side could respond with a result or an error. Below, the default ports of Stratum for Bitcoin are defined. Other coins can define other default ports. + +* Default port: 50001 +* Letter: t + +===TCP over SSL/TLS=== + +Stratum over a TCP connection with SSL/TLS: the same as normal TCP, but with SSL/TLS enabled. + +* Default port: 50002 +* Letter: s + +===HTTP=== + +Stratum over an HTTP connection. When communicating over HTTP, there 2 possible options: polling and pushing. In both cases, the request and response have a Content-Type header with the value application/stratum. Like in the TCP transport, the messages have to end with a line-feed (\n). It is possible to send multiple messages in one HTTP request or response. + +A request or response may contain a Content-MD5 header to allow the receiver to detect any modification to the content. It is up to clients and servers how to handle a mismatch. A suggestion for a client would be to retry the command. A suggestion for a server would be to return a 400 error (or return a 200 error with a JSON-RPC error message). + +* Default port: 8081 +* Letter: h + +====Session==== + +Because it is not sure if an HTTP connection will stay open, it is highly possible that messages will be sent over multiple connections. To keep track of the same "session", a cookie with the name STRATUM_SESSION is used. If a client sends a request with a cookie, the servers knows exactly which session is used and which notifications to send. + +Servers could send the Stratum-Session-Timeout header to tell the client when a session with the same session id will be seen as a new session by the server. The header contains a number that indicates how many seconds are left. This is different from Expires or Max-Age parameters of the Set-Cookie header that indicate when a cookie (not necessarily a session) should have been expired by the client. For backwards compatibility, a X-Session-Timeout header with the same value should be sent in those requests, too. + +====HTTP Poll==== + +When polling, an HTTP POST request is sent with application/stratum in the Content-Type header. In the body, there could be one or more messages. If the body is empty, the client only wants to check for notifications. + +If no error occurred, the server will respond with a 200 status code and with application/stratum in the Content-Type header. If there are one or more notifications or other messages, the body will contain those messages. Otherwise, the body will be empty. + +====HTTP Push==== + +HTTP Poll is the default mode when connecting with a server over HTTP. To get the session in HTTP Push mode, a client should send a regular HTTP Poll request with an additional Stratum-Callback-URL header. This will let the server send notifications using the callback URL without the client needing to send HTTP poll requests with a very small interval. To disable HTTP Push mode, a regular HTTP poll request should be sent with an additional empty Stratum-Callback-URL header. For backwards compatibility, a X-Callback-URL header with the same value should be sent in those requests too. + +The callback URL will be called when there are notifications. This request is an HTTP POST request with a Content-Type header and a Stratum-Session-ID header. The Stratum-Session-ID contains the same id as the STRATUM_SESSION cookie. This makes it possible to use the callback URL for multiple sessions. The response of the callback URL is expected to be empty, so any response body will likely be ignored. For backwards compatibility, a X-Session-ID header with the same value should be sent in those requests too. + +===HTTP over SSL/TLS=== + +Stratum over an HTTP connection with SSL/TLS: the same as normal HTTP, but with SSL/TLS enabled. + +* Default port: 8082 +* Letter: g + +===WebSocket=== + +Stratum over a WebSocket connection. When using WebSockets, the JSON-RPC messages (including batch messages) are encapsulated in a WebSocket message. It is also possible to send multiple JSON-RPC messages in one WebSocket message. Every JSON-RPC message should end with a line-feed (\n). Both client and server can initiate a message request on which the other side could respond with a result or an error, like Stratum over TCP. + +* Default port: 8083 +* Letter: w + +====Subprotocol==== + +In a WebSocket upgrade request, it is possible to use the Sec-WebSocket-Protocol header to let the WebSocket server know which subprotocol is desired to send over the connection. For Stratum, the value stratum is registered. The use of this header is optional. If the server supports the use of this subprotocol too, it will let the client know by sending a Sec-WebSocket-Protocol header back. If the server doesn't send a subprotocol back, the connection will continue without using one. Use of this feature is fully backwards compatible. + +====Example==== + +
+  // Open WebSocket with using a subprotocol
+  new WebSocket('ws://stratum.example.com:8083',['stratum']);
+
+  // Open WebSocket without using a subprotocol
+  new WebSocket('ws://stratum.example.com:8083');
+
+ +===WebSocket over SSL/TLS=== + +Stratum over a WebSocket connection with SSL/TLS: the same as normal WebSocket, but with SSL/TLS enabled. + +* Default port: 8084 +* Letter: u + +==Specification: Services== + +On top of Stratum, some services are defined. They are listed below, grouped by vendor. + +===Vendor: Stratum=== + +* [[bip-0040/service-discovery.mediawiki|Discovery]] +* [[bip-0040/service-example.mediawiki|Example]] +* [[bip-0040/service-example.pubsub.mediawiki|Example Publish-Subscribe]] +* [[bip-0040/service-server.mediawiki|Server]] +* [[bip-0040/service-server.peers.mediawiki|Server Peers]] + +===Vendor: Electrum=== + +* [[bip-0040/service-blockchain.mediawiki|Blockchain]] +* [[bip-0040/service-blockchain.address.mediawiki|Blockchain Address]] +* [[bip-0040/service-blockchain.block.mediawiki|Blockchain Block]] +* [[bip-0040/service-blockchain.headers.mediawiki|Blockchain Headers]] +* [[bip-0040/service-blockchain.numblocks.mediawiki|Blockchain Number of Blocks]] +* [[bip-0040/service-blockchain.transaction.mediawiki|Blockchain Transaction]] +* [[bip-0040/service-blockchain.utxo.mediawiki|Blockchain Unspent Transaction Output]] + +===Vendor: blockchain.info=== + +* [[bip-0040/service-firstbits.mediawiki|Firstbits]] + +===Vendor: firstbits.com=== + +* [[bip-0040/service-firstbits.mediawiki|Firstbits]] + +==IANA Considerations== + +===HTTP Field=== + +IANA maintains the registry of HTTP Fields at https://www.iana.org/assignments/http-fields. + +This document serves as the specification for the HTTP fields "Stratum-Session-ID", "Stratum-Session-Timeout" and "Stratum-Callback-URL". + +===Media Type=== + +IANA maintains the registry of Media Types [https://www.rfc-editor.org/info/bcp13 BCP13] at http://www.iana.org/assignments/media-types. + +This document serves as the specification for the media type "application/stratum". It has been registered with IANA. + +===WebSocket Subprotocol Name=== + +IANA maintains the registry of WebSocket Subprotocol Names at https://www.iana.org/assignments/websocket. + +This document serves as the specification for the WebSocket subprotocol name "stratum". It has been registered with IANA. + +==References== + \ No newline at end of file diff --git a/bip-0040/service-blockchain.address.mediawiki b/bip-0040/service-blockchain.address.mediawiki new file mode 100644 index 0000000000..2f61af5769 --- /dev/null +++ b/bip-0040/service-blockchain.address.mediawiki @@ -0,0 +1,72 @@ +=Service: Blockchain Address= + +* Service type: blockchain.address +* Service vendor: Electrum + +==Method: Get History== + +* Method name: get_history + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | blockchain.address.get_history +|- +! Params [0] +| string +| 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L +| The address to get the history of. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array +| +| The history of the blockchain address. +|} + +==Method: Get Balance== + +* Method name: get_balance + +==Method: Subscribe== + +* Method name: subscribe + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | blockchain.address.subscribe +|- +! Params [0] +| string +| 1NS17iag9jJgTHD1VXjvLCEnZuQ3rJDE9L +| The address to subscribe to. +|} + +==Method: Unsubscribe== + +* Method name: unsubscribe + +==Method: Get Memory Pool== + +* Method name: get_mempool + +==Method: Get Proof== + +* Method name: get_proof + +==Method: List Unspent== + +* Method name: listunspent \ No newline at end of file diff --git a/bip-0040/service-blockchain.block.mediawiki b/bip-0040/service-blockchain.block.mediawiki new file mode 100644 index 0000000000..4b0e1330b8 --- /dev/null +++ b/bip-0040/service-blockchain.block.mediawiki @@ -0,0 +1,28 @@ +=Service: Blockchain Block= + +* Service type: blockchain.block +* Service vendor: Electrum + +==Method: Subscribe== + +* Method name: subscribe + +==Method: Unsubscribe== + +* Method name: unsubscribe + +==Method: Get Block Number== + +* Method name: get_blocknum + +==Method: Get Chunk== + +* Method name: get_chunk + +==Method: Get Header== + +* Method name: get_header + +==Method: Ping== + +* Method name: ping \ No newline at end of file diff --git a/bip-0040/service-blockchain.headers.mediawiki b/bip-0040/service-blockchain.headers.mediawiki new file mode 100644 index 0000000000..891836e389 --- /dev/null +++ b/bip-0040/service-blockchain.headers.mediawiki @@ -0,0 +1,8 @@ +=Service: Blockchain Headers= + +* Service type: blockchain.headers +* Service vendor: Electrum + +==Method: Subscribe== + +* Method name: subscribe \ No newline at end of file diff --git a/bip-0040/service-blockchain.mediawiki b/bip-0040/service-blockchain.mediawiki new file mode 100644 index 0000000000..480739772b --- /dev/null +++ b/bip-0040/service-blockchain.mediawiki @@ -0,0 +1,12 @@ +=Service: Blockchain= + +* Service type: blockchain +* Service vendor: Electrum + +==Method: Estimate Fee== + +* Method name: estimatefee + +==Method: Relay Fee== + +* Method name: relayfee \ No newline at end of file diff --git a/bip-0040/service-blockchain.numblocks.mediawiki b/bip-0040/service-blockchain.numblocks.mediawiki new file mode 100644 index 0000000000..8a4f8604c7 --- /dev/null +++ b/bip-0040/service-blockchain.numblocks.mediawiki @@ -0,0 +1,8 @@ +=Service: Blockchain Number of Blocks= + +* Service type: blockchain.numblocks +* Service vendor: Electrum + +==Method: Subscribe== + +* Method name: subscribe \ No newline at end of file diff --git a/bip-0040/service-blockchain.transaction.mediawiki b/bip-0040/service-blockchain.transaction.mediawiki new file mode 100644 index 0000000000..094dcb1e64 --- /dev/null +++ b/bip-0040/service-blockchain.transaction.mediawiki @@ -0,0 +1,28 @@ +=Service: Blockchain Transaction= + +* Service type: blockchain.transaction +* Service vendor: Electrum + +==Method: Subscribe== + +* Method name: subscribe + +==Method: Unsubscribe== + +* Method name: unsubscribe + +==Method: Guess Fee== + +* Method name: guess_fee + +==Method: Broadcast== + +* Method name: broadcast + +==Method: Get== + +* Method name: get + +==Method: Get Merkle== + +* Method name: get_merkle \ No newline at end of file diff --git a/bip-0040/service-blockchain.utxo.mediawiki b/bip-0040/service-blockchain.utxo.mediawiki new file mode 100644 index 0000000000..bcc3166fb8 --- /dev/null +++ b/bip-0040/service-blockchain.utxo.mediawiki @@ -0,0 +1,8 @@ +=Service: Blockchain Unspent Transaction Output= + +* Service type: blockchain.utxo +* Service vendor: Electrum + +==Method: Get Address== + +* Method name: get_address \ No newline at end of file diff --git a/bip-0040/service-discovery.mediawiki b/bip-0040/service-discovery.mediawiki new file mode 100644 index 0000000000..9ad91eb12b --- /dev/null +++ b/bip-0040/service-discovery.mediawiki @@ -0,0 +1,145 @@ +=Service: Discovery= + +* Service type: discovery +* Service vendor: Stratum + +==Method: List Services== + +* Method name: list_services + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | discovery.list_services +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array of strings +| ["discovery","example","example.pubsub"] +| The services that are implemented by the server. +|} + +==Method: List Vendors== + +* Method name: list_vendors + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | discovery.list_vendors +|- +! Params [0] (service_type) +| string +| firstbits +| The service you want all the vendors of. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array of strings +| ["blockchain.info","firstbits.com"] +| The vendors of the requested service. +|} + +==Method: List Methods== + +* Method name: list_methods + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | discovery.list_methods +|- +! Params [0] (service_name) +| string +| firstbits[firstbits.com] +| The service name (eventually including a service vendor in square brackets). +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array of strings +| ["create","resolve"] +| The methods of the requested service. +|} + +==Method: List Params== + +* Method name: list_params + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | discovery.list_params +|- +! Params [0] (method) +| string +| firstbits[firstbits.com].create +| The full method name, including the service name (and possibly the service vendor in square brackets). +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array +| ["Some method help text",[ ["address","string","String containing full Bitcoin address."] ]] +| The help text and parameters of the requested method. +|- +! Result [0] (help_text) +| string +| Some method help text +| The help text of requested method. +|- +! Result [1] (params) +| array of arrays +| [ ["address","string","String containing full Bitcoin address."] ] +| The parameters of requested method. +|- +! Result [1][index] (params[index]) +| array +| ["address","string","String containing full Bitcoin address."] +| The parameter at position index of requested method. +|- +! Result [1][index][0] +| string +| address +| The name of the parameter at position index of requested method. +|- +! Result [1][index][1] +| string +| string +| The type of the parameter at position index of requested method. +|- +! Result [1][index][2] +| string +| String containing full Bitcoin address. +| The description of the parameter at position index of requested method. +|} \ No newline at end of file diff --git a/bip-0040/service-example.mediawiki b/bip-0040/service-example.mediawiki new file mode 100644 index 0000000000..d4439e16b5 --- /dev/null +++ b/bip-0040/service-example.mediawiki @@ -0,0 +1,146 @@ +=Service: Example= + +This service is an example service. It doesn't have any other purpose than testing. + +* Service type: example +* Service vendor: Stratum + +==Method: Hello World== + +Ask the server to send a "Hello world!" back. + +* Method name: hello_world + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.hello_world +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string +| Hello world! +| The "Hello world" text. +|} + +==Method: Ping== + +Ping the server and get a pong back with the same text. + +* Method name: ping + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.ping +|- +! Params [0] (payload) +| mixed +| 12345678 +| The ping payload. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| mixed +| 12345678 +| The pong payload, same as the ping payload. +|} + +==Method: Synchronous== + +Ask the server to run a synchronous command for a specific amount of seconds. + +* Method name: synchronous + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.synchronous +|- +! Params [0] (how_long) +| int (or a string or a float that can be casted to an int) +| 123 +| The time to run. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string +| Request finished in 123 seconds +| A string that tells that the command has finished running. +|} + +==Method: Throw Exception== + +Ask the server to throw an exception. + +* Method name: throw_exception + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.throw_exception +|- +! [Response] +! Type +! Example +! Description +|- +! Error +| object +| {"code":-1,"data":"Some traceback","message":"Some error"} +| The error object. +|} + +==Method: Throw Signed Exception== + +Ask the server to throw an exception in a signed JSON-RPC object. + +* Method name: throw_signed_exception + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.throw_signed_exception +|- +! [Response] +! Type +! Example +! Description +|- +! Error +| object +| {"code":-1,"data":"Some traceback","message":"Some error"} +| The error object. +|} \ No newline at end of file diff --git a/bip-0040/service-example.pubsub.mediawiki b/bip-0040/service-example.pubsub.mediawiki new file mode 100644 index 0000000000..77af2bc027 --- /dev/null +++ b/bip-0040/service-example.pubsub.mediawiki @@ -0,0 +1,99 @@ +=Service: Example Publish-Subscribe= + +This service is an example service. It doesn't have any other purpose than testing. + +* Service type: example.pubsub +* Service vendor: Stratum + +==Method: Subscribe== + +Subscribe on an event. + +* Method name: subscribe + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.pubsub.subscribe +|- +! Params [0] (period) +| int +| 12 +| Period to wait for next emission. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| array +| ["example.pubsub.time_event", "some-subscription-key"] +| The subscription information. +|- +! Result [0] (event) +| string +| example.pubsub.time_event +| The subscription event name. In this case, it is example.pubsub.time_event. +|- +! Result [1] (subscription_key) +| string +| some-subscription-key +| The subscription key of the event subscription. +|} + +==Method: Time Event== + +The time event that gets emitted. + +* Method name: time_event + +{| +! [Notification] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.pubsub.time_event +|- +! Params [0] (t) +| int +| 1231006505 +| The time when the time event was emitted. +|} + +==Method: Unsubscribe== + +Unsubscribe from an event. + +* Method name: unsubscribe + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.pubsub.unsubscribe +|- +! Params [0] (subscription_key) +| string +| some-subscription-key +| The subscription key of the event subscription. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| boolean +| true +| True if subscription is removed from session, false if failed. +|} \ No newline at end of file diff --git a/bip-0040/service-firstbits.mediawiki b/bip-0040/service-firstbits.mediawiki new file mode 100644 index 0000000000..c440597116 --- /dev/null +++ b/bip-0040/service-firstbits.mediawiki @@ -0,0 +1,62 @@ +=Service: Firstbits= + +* Service type: firstbits +* Service vendor: blockchain.info and firstbits.com + +==Method: Create== + +* Method name: create + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | firstbits.create +|- +! Params [0] (address) +| string +| 1MarekMKDKRb6PEeHeVuiCGayk9avyBGBB +| The address. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string +| 1marekm +| The firstbits string. +|} + +==Method: Resolve== + +* Method name: resolve + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | firstbits.resolve +|- +! Params [0] (firstbits) +| string +| 1marekm +| The address. +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string +| 1MarekMKDKRb6PEeHeVuiCGayk9avyBGBB +| The address. +|} \ No newline at end of file diff --git a/bip-0040/service-server.mediawiki b/bip-0040/service-server.mediawiki new file mode 100644 index 0000000000..b616488de2 --- /dev/null +++ b/bip-0040/service-server.mediawiki @@ -0,0 +1,115 @@ +=Service: Server= + +* Service type: server +* Service vendor: Electrum + +==Method: Add Peer== + +A command to add the node to the peer list. + +* Method name: add_peer + +==Method: Banner== + +A command to get the server banner. + +* Method name: banner + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | server.banner +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string +| Welcome to Electrum! +| The server banner. +|} + +==Method: Cache== + +A command to get the server cache size. + +* Method name: cache + +==Method: Debug== + +* Method name: debug + +==Method: Donation Address== + +A command to get the server donation address. + +* Method name: donation_address + +==Method: Features== + +A command to get the server features. + +* Method name: features + +==Method: Info== + +A command to get information about the active sessions. + +* Method name: info + +==Method: Load== + +A command to get the server load. + +* Method name: load + +==Method: Peers== + +A event to announce peers. + +* Method name: peers + +==Method: Ping== + +A command to ping the server. + +* Method name: ping + +==Method: Stop== + +A command to stop the server. + +* Method name: stop + +==Method: Version== + +A command to set the client version, get the server version and negotiate the protocol version. + +* Method name: version +* Introduced in: 0.1 + +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | server.version +|- +! [Response] +! Type +! Example +! Description +|- +! Result +| string or array +| Welcome to Electrum! +| The server banner. +|} \ No newline at end of file diff --git a/bip-0040/service-server.peers.mediawiki b/bip-0040/service-server.peers.mediawiki new file mode 100644 index 0000000000..1d93a48003 --- /dev/null +++ b/bip-0040/service-server.peers.mediawiki @@ -0,0 +1,10 @@ +=Service: Server Peers= + +* Service type: server.peers +* Service vendor: Electrum + +==Method: Subscribe== + +A command to get current peers. + +* Method name: subscribe \ No newline at end of file diff --git a/scripts/buildtable.pl b/scripts/buildtable.pl index 4923a9ed4f..fde26ef2dc 100755 --- a/scripts/buildtable.pl +++ b/scripts/buildtable.pl @@ -87,7 +87,7 @@ 'OPL' => undef, 'PD' => undef, ); -my %GrandfatheredPD = map { $_ => undef } qw(9 36 37 38 42 49 50 60 65 67 69 74 80 81 83 90 99 105 107 109 111 112 113 114 122 124 125 126 130 131 132 133 140 141 142 143 144 146 147 150 151 152); +my %GrandfatheredPD = map { $_ => undef } qw(9 36 37 38 40 42 49 50 60 65 67 69 74 80 81 83 90 99 105 107 109 111 112 113 114 122 124 125 126 130 131 132 133 140 141 142 143 144 146 147 150 151 152); my %TolerateMissingLicense = map { $_ => undef } qw(1 10 11 12 13 14 15 16 21 31 33 34 35 39 43 44 45 47 61 64 68 70 71 72 73 101 102 106 120 121); my %TolerateTitleTooLong = map { $_ => undef } qw(39 44 45 47 49 60 67 68 69 73 74 75 80 81 99 105 106 109 113 122 126 131 143 145 147 173 327);