Skip to content

Commit

Permalink
docs: Add mixing cmds and ntfn JSON-RPC API.
Browse files Browse the repository at this point in the history
This adds documentation for the following new mix related commands and
notification:

- getmixpairrequests command
- sendrawmixmessage command
- notifymixmessages command
- stopnotifymixmessages command
- mixmessage notification
  • Loading branch information
davecgh committed May 16, 2024
1 parent 8ed8124 commit 9e76616
Showing 1 changed file with 127 additions and 0 deletions.
127 changes: 127 additions & 0 deletions docs/json_rpc_api.mediawiki
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,10 @@ the method name for further details such as parameter and return information.
|N
|Returns a JSON object containing mining-related information.
|-
|[[#getmixpairrequests|getmixpairrequests]]
|Y
|Returns the current set of mixing pair request messages from the mixpool. WARNING: This is experimental and will very likely be removed in the next version. Do not use!
|-
|[[#getnettotals|getnettotals]]
|Y
|Returns a JSON object containing network traffic statistics.
Expand Down Expand Up @@ -360,6 +364,10 @@ the method name for further details such as parameter and return information.
|Y
|Asks the daemon to regenerate the mining block template.
|-
|[[#sendrawmixmessage|sendrawmixmessage]]
|Y
|Submits a serialized, hex-encoded mix message to the mixpool and broadcasts it to the network.
|-
|[[#sendrawtransaction|sendrawtransaction]]
|Y
|Submits the serialized, hex-encoded transaction to the local peer and relays it to the network.
Expand Down Expand Up @@ -1496,6 +1504,28 @@ of the best block.

----

====getmixpairrequests====
{|
!Method
|getmixpairrequests
|-
!Parameters
|None
|-
!Description
|
: Returns the current set of mixing pair request messages from the mixpool.
: WARNING: This is experimental and will very likely be removed in the next version. Do not use!
|-
!Returns
|<code>(json array of string)</code> hex-encoded mixing pair request messages.
|-
!Example Return
|<code>["a1d1d8c6ffc20a51ad9a5aa093c31bdeb06a0f627af95...",...]</code>
|}

----

====getnettotals====
{|
!Method
Expand Down Expand Up @@ -2243,6 +2273,27 @@ of the best block.

----

====sendrawmixmessage====
{|
!Method
|sendrawmixmessage
|-
!Parameters
|
# <code>command</code>: <code>(string, required)</code> the wire command name of the message type.
# <code>message</code>: <code>(string, required)</code> mixing message serialized and encoded as hex.
|-
!Description
|
: Submits a serialized, hex-encoded mixing message to the mixpool and broadcasts it to the network.
: The valid wire command names are <code>mixpairreq</code>, <code>mixkeyxchg</code>, <code>mixcphrtxt</code>, <code>mixslotres</code>, <code>mixdcnet</code>, <code>mixconfirm</code>, <code>mixfactpoly</code>, and <code>mixsecrets</code>.
|-
!Returns
|<code>Nothing</code>
|}

----

====sendrawtransaction====
{|
!Method
Expand Down Expand Up @@ -2590,6 +2641,14 @@ user. Click the method name for further details such as parameter and return in
|Rescan blocks for transactions matching the loaded transaction filter.
|None
|-
|[[#notifymixmessages|notifymixmessages]]
|Send notifications for all mixing messages as they are accepted into the mixpool.
|[[#mixmessage|mixmessage]]
|-
|[[#stopnotifymixmessages|stopnotifymixmessages]]
|Stop sending a mixmessage notification for all mixing messages as they are accepted into the mixpool.
|None
|-
|[[#notifynewtransactions|notifynewtransactions]]
|Send notifications for all new transactions as they are accepted into the mempool.
|[[#txaccepted|txaccepted]] or [[#txacceptedverbose|txacceptedverbose]]
Expand Down Expand Up @@ -2827,6 +2886,46 @@ NOTE: This is only required if an HTTP Authorization header is not being used.

----

====notifymixmessages====
{|
!Method
|notifymixmessages
|-
!Notifications
|[[#mixmessage|mixmessage]]
|-
!Parameters
|None
|-
!Description
|Send a [[#mixmessage|mixmessage]] notification when a mixing message is accepted into the mixpool.
|-
!Returns
|Nothing
|}

----

====stopnotifymixmessages====
{|
!Method
|stopnotifymixmessages
|-
!Notifications
|None
|-
!Parameters
|None
|-
!Description
|Stop sending a [[#mixmessage|mixmessage]] notification when a mixing message is accepted into the mixpool.
|-
!Returns
|Nothing
|}

----

====notifynewtransactions====
{|
!Method
Expand Down Expand Up @@ -2954,6 +3053,10 @@ The following is an overview of the JSON-RPC notifications used for Websocket co
|Block disconnected from the main chain.
|[[#notifyblocks|notifyblocks]]
|-
|[[#mixmessage|mixmessage]]
|Received a mixing message after request notifications of all mixing messages accepted into the mixpool.
|[[#notifymixnotifymixmessages|notifymixmessages]]
|-
|[[#work|work]]
|New generated block template.
|[[#notifywork|notifywork]]
Expand Down Expand Up @@ -3032,6 +3135,30 @@ The following is an overview of the JSON-RPC notifications used for Websocket co

----

====mixmessage====
{|
!Method
|mixmessage
|-
!Request
|[[#notifymixmessages|notifymixmessages]]
|-
!Parameters
|
# <code>Command</code>: <code>(string)</code> the wire command name of the message type.
# <code>Payload</code>: <code>(string)</code> mixing message serialized and encoded as hex.
|-
!Description
|Notifies when a mixing message has been accepted and the client has requested mixing message details.
|-
!Example
|Example mixmessage notification:

: <code>{"jsonrpc": "1.0", "method": "mixmessage", "params": ["mixpairrequest", "a1d1d8c6ffc20a51ad9a5aa093c31bdeb06a0f627af95..."], "id": null}</code>
|}

----

====work====
{|
!Method
Expand Down

0 comments on commit 9e76616

Please sign in to comment.