diff --git a/bip-0040/service-discovery.mediawiki b/bip-0040/service-discovery.mediawiki index e875abf6..15114e1b 100644 --- a/bip-0040/service-discovery.mediawiki +++ b/bip-0040/service-discovery.mediawiki @@ -22,7 +22,7 @@ ! Description |- ! Result -| array +| array of strings | ["discovery","example","example.pubsub"] | The services that are implemented by the server. |} @@ -51,7 +51,7 @@ ! Description |- ! Result -| array +| array of strings | ["blockchain.info","firstbits.com"] | The vendors of the requested service. |} @@ -80,7 +80,7 @@ ! Description |- ! Result -| array +| array of strings | ["create","resolve"] | The methods of the requested service. |} @@ -111,5 +111,35 @@ ! Result | array | ["Some method help text",[ ["address","string","String containing full Bitcoin address."] ]] -| The parameters of the requested method. +| 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 of arrays +| ["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 +| 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 index 098cdc31..d4439e16 100644 --- a/bip-0040/service-example.mediawiki +++ b/bip-0040/service-example.mediawiki @@ -49,7 +49,7 @@ Ping the server and get a pong back with the same text. ! Params [0] (payload) | mixed | 12345678 -| The ping text. +| The ping payload. |- ! [Response] ! Type @@ -57,9 +57,9 @@ Ping the server and get a pong back with the same text. ! Description |- ! Result -| string -| Hello world! -| The "Hello world" text. +| mixed +| 12345678 +| The pong payload, same as the ping payload. |} ==Method: Synchronous== @@ -132,7 +132,7 @@ Ask the server to throw an exception in a signed JSON-RPC object. ! Description |- ! Method -| colspan="3" | example.throw_exception +| colspan="3" | example.throw_signed_exception |- ! [Response] ! Type diff --git a/bip-0040/service-example.pubsub.mediawiki b/bip-0040/service-example.pubsub.mediawiki index ca1fd21d..77af2bc0 100644 --- a/bip-0040/service-example.pubsub.mediawiki +++ b/bip-0040/service-example.pubsub.mediawiki @@ -31,9 +31,19 @@ Subscribe on an event. ! 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== @@ -43,7 +53,7 @@ The time event that gets emitted. * Method name: time_event {| -! [Request] +! [Notification] ! Type ! Example ! Description @@ -51,10 +61,10 @@ The time event that gets emitted. ! Method | colspan="3" | example.pubsub.time_event |- -! Params [0] -| ... -| ... -| ... +! Params [0] (t) +| int +| 1231006505 +| The time when the time event was emitted. |} ==Method: Unsubscribe== @@ -83,7 +93,7 @@ Unsubscribe from an event. ! Description |- ! Result -| string -| some-subscription-key -| The subscription key of the event subscription. +| boolean +| true +| True if subscription is removed from session, false if failed. |} \ No newline at end of file