diff --git a/bip-0040.mediawiki b/bip-0040.mediawiki index 2179d836..fdfee9fa 100644 --- a/bip-0040.mediawiki +++ b/bip-0040.mediawiki @@ -273,18 +273,83 @@ 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 throw 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 throw signed exception. +Ask the server throw exception in a signed JSON-RPC object. * Method name: throw_signed_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. +|} + ===Service: Example Publish-Subscribe=== This service is an example service. It doesn't have any other purpose than testing. @@ -298,18 +363,83 @@ 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 +| ... +| ... +| ... +|} + ====Method: Time Event==== The time event that gets emitted. * Method name: time_event +{| +! [Request] +! Type +! Example +! Description +|- +! Method +| colspan="3" | example.pubsub.time_event +|- +! Params [0] +| ... +| ... +| ... +|} + ====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 +| string +| some-subscription-key +| The subscription key of the event subscription. +|} + ===Service: Server=== * Service name: server