mirror of
https://github.com/bitcoin/bips.git
synced 2025-03-04 03:03:53 +01:00
Add example commands
This commit is contained in:
parent
b5a9b10216
commit
19cf447939
1 changed files with 108 additions and 1 deletions
|
@ -203,6 +203,113 @@ Send the version of the client to the server. This command doesn't expect a resp
|
|||
| The client version.
|
||||
|}
|
||||
|
||||
===Service: Example===
|
||||
|
||||
This service is an example service. It doesn't have any other purpose than testing.
|
||||
|
||||
* Service name: <code>example</code>
|
||||
* Service vendor: <code>Stratum</code>
|
||||
|
||||
====Method: Hello World====
|
||||
|
||||
Ask the server to send a "Hello world!" back.
|
||||
|
||||
* Method name: <code>hello_world</code>
|
||||
|
||||
{|
|
||||
! <ins>[Request]</ins>
|
||||
! Type
|
||||
! Example
|
||||
! Description
|
||||
|-
|
||||
! Method
|
||||
| colspan="3" | <code>example.hello_world</code>
|
||||
|-
|
||||
! <ins>[Response]</ins>
|
||||
! Type
|
||||
! Example
|
||||
! Description
|
||||
|-
|
||||
! Result
|
||||
| <code>string</code>
|
||||
| <code>Hello world!</code>
|
||||
| The "Hello world" text.
|
||||
|}
|
||||
|
||||
====Method: Ping====
|
||||
|
||||
Ping the server and get a pong back with the same text.
|
||||
|
||||
* Method name: <code>ping</code>
|
||||
|
||||
{|
|
||||
! <ins>[Request]</ins>
|
||||
! Type
|
||||
! Example
|
||||
! Description
|
||||
|-
|
||||
! Method
|
||||
| colspan="3" | <code>example.ping</code>
|
||||
|-
|
||||
! Params [0] (<code>payload</code>)
|
||||
| <code>mixed</code>
|
||||
| <code>12345678</code>
|
||||
| The ping text.
|
||||
|-
|
||||
! <ins>[Response]</ins>
|
||||
! Type
|
||||
! Example
|
||||
! Description
|
||||
|-
|
||||
! Result
|
||||
| <code>string</code>
|
||||
| <code>Hello world!</code>
|
||||
| The "Hello world" text.
|
||||
|}
|
||||
|
||||
====Method: Synchronous====
|
||||
|
||||
Ask the server to run a synchronous command for a specific amount of seconds.
|
||||
|
||||
* Method name: <code>synchronous</code>
|
||||
|
||||
====Method: Throw Exception====
|
||||
|
||||
Ask the server throw exception.
|
||||
|
||||
* Method name: <code>throw_exception</code>
|
||||
|
||||
====Method: Throw Signed Exception====
|
||||
|
||||
Ask the server throw signed exception.
|
||||
|
||||
* Method name: <code>throw_signed_exception</code>
|
||||
|
||||
===Service: Example Publish-Subscribe===
|
||||
|
||||
This service is an example service. It doesn't have any other purpose than testing.
|
||||
|
||||
* Service name: <code>example.pubsub</code>
|
||||
* Service vendor: <code>Stratum</code>
|
||||
|
||||
====Method: Subscribe====
|
||||
|
||||
Subscribe on an event.
|
||||
|
||||
* Method name: <code>subscribe</code>
|
||||
|
||||
====Method: Time Event====
|
||||
|
||||
The time event that gets emitted.
|
||||
|
||||
* Method name: <code>time_event</code>
|
||||
|
||||
====Method: Unsubscribe====
|
||||
|
||||
Unsubscribe from an event.
|
||||
|
||||
* Method name: <code>unsubscribe</code>
|
||||
|
||||
===Service: Server===
|
||||
|
||||
* Service name: <code>server</code>
|
||||
|
@ -251,7 +358,7 @@ This document serves as the specification for the media type "application/stratu
|
|||
|
||||
IANA maintains the registry of WebSocket Subprotocol Names at https://www.iana.org/assignments/websocket.
|
||||
|
||||
This document serves as the specification for the subprotocol name "stratum". It has been registered with IANA.
|
||||
This document serves as the specification for the WebSocket subprotocol name "stratum". It has been registered with IANA.
|
||||
|
||||
==References==
|
||||
<references/>
|
Loading…
Add table
Reference in a new issue