Browse Source

More doc updates

patch-2
Neil Booth 7 years ago
parent
commit
30680bfb37
  1. 25
      docs/protocol-changes.rst
  2. 35
      docs/protocol-methods.rst

25
docs/protocol-changes.rst

@ -24,7 +24,7 @@ Changes
* :func:`blockchain.transaction.get` no longer takes the *height* * :func:`blockchain.transaction.get` no longer takes the *height*
argument that was ignored anyway. argument that was ignored anyway.
* :func:`blockchain.transaction.broadcast` returns errors like any * :func:`blockchain.transaction.broadcast` returns errors like any
other JS RPC call. A transaction hash result is only returned on other JSON RPC call. A transaction hash result is only returned on
success. success.
New methods New methods
@ -83,6 +83,8 @@ Deprecated methods
:func:`blockchain.scripthash.subscribe`. :func:`blockchain.scripthash.subscribe`.
* :func:`blockchain.headers.subscribe` with *raw* other than :const:`True`. * :func:`blockchain.headers.subscribe` with *raw* other than :const:`True`.
.. _version 1.3:
Version 1.3 Version 1.3
=========== ===========
@ -111,3 +113,24 @@ Deprecated methods
* :func:`blockchain.block.get_header`. Switch to * :func:`blockchain.block.get_header`. Switch to
:func:`blockchain.block.header`. :func:`blockchain.block.header`.
.. _version 1.4:
Version 1.4
===========
This documents the current intent for protocol version 1.4 which is
not yet implemented. It removes all support for :ref:`deserialized
headers <deserialized header>`.
Changes
-------
* The only valid value for :func:`blockchain.headers.subscribe`
argument *raw* is :const:`True`
Removed methods
---------------
* :func:`blockchain.block.get_header`
* :func:`blockchain.block.get_chunk`

35
docs/protocol-methods.rst

@ -938,12 +938,19 @@ Identify the client to the server and negotiate the protocol version.
["ElectrumX 1.2.1", "1.2"] ["ElectrumX 1.2.1", "1.2"]
"ElectrumX 1.2.1" "ElectrumX 1.2.1"
Masternode methods (Dash and compatible coins)
==============================================
masternode.announce.broadcast masternode.announce.broadcast
============================= =============================
Pass through the masternode announce message to be broadcast by the daemon. Pass through the masternode announce message to be broadcast by the daemon.
Whenever a masternode comes online or a client is syncing, they will send this message which describes the masternode entry and how to validate messages from it. Whenever a masternode comes online or a client is syncing, they will
send this message which describes the masternode entry and how to
validate messages from it.
**Signature** **Signature**
@ -955,13 +962,14 @@ Whenever a masternode comes online or a client is syncing, they will send this m
**Result** **Result**
True if the message was broadcasted succesfully otherwise False. :const:`True` if the message was broadcasted succesfully otherwise
:const:`False`.
**Examples**:: **Example**::
masternode.announce.broadcast("012b825a65a24e2eb8edadbe27c4716dab993bf1046a66da77268ec87dbdd9dfc80100000000ffffffff00000000000000000000ffff22db1fec42d82103bfc9e296bcf4d63eced97b204df8f7b2b90131d452abd2b50909fa2ce6f66d752103bfc9e296bcf4d63eced97b204df8f7b2b90131d452abd2b50909fa2ce6f66d754120e95f74e9c242776df88a586bd52d2bd1838b600e5f3ce9d45d04865ff39a994632d617e810a4480ce24c882980746bc517a92be027d2ea70e4baece33a763608b1f91e5b00000000451201002b825a65a24e2eb8edadbe27c4716dab993bf1046a66da77268ec87dbdd9dfc80100000000ffffffff57280bc007121a0db854998f72e9a9fd2a690f38abffbd9aa94256330c020000b0f91e5b00000000412027c03b1531ee14db6160a62a0cc8b1a7e93ae122bbc6f2dffec721e0ae308b0e19e68523dd429450612bda3a616b56411b4e35d098e25b7c83f19fd2d8537e970000000000000000") masternode.announce.broadcast("012b825a65a24e2eb8edadbe27c4716dab993bf1046a66da77268ec87dbdd9dfc80100000000ffffffff00000000000000000000ffff22db1fec42d82103bfc9e296bcf4d63eced97b204df8f7b2b90131d452abd2b50909fa2ce6f66d752103bfc9e296bcf4d63eced97b204df8f7b2b90131d452abd2b50909fa2ce6f66d754120e95f74e9c242776df88a586bd52d2bd1838b600e5f3ce9d45d04865ff39a994632d617e810a4480ce24c882980746bc517a92be027d2ea70e4baece33a763608b1f91e5b00000000451201002b825a65a24e2eb8edadbe27c4716dab993bf1046a66da77268ec87dbdd9dfc80100000000ffffffff57280bc007121a0db854998f72e9a9fd2a690f38abffbd9aa94256330c020000b0f91e5b00000000412027c03b1531ee14db6160a62a0cc8b1a7e93ae122bbc6f2dffec721e0ae308b0e19e68523dd429450612bda3a616b56411b4e35d098e25b7c83f19fd2d8537e970000000000000000")
**Example Results**:: **Example Result**::
True True
@ -978,21 +986,26 @@ Returns the status of masternode.
The txId and the index of the collateral. The txId and the index of the collateral.
A masternode collateral is a transaction with a specific amount of coins, it's also known as a masternode identifier. A masternode collateral is a transaction with a specific amount of
coins, it's also known as a masternode identifier.
i.e. for DASH the required amount is 1,000 DASH or for $PAC is 500,000 $PAC. i.e. for DASH the required amount is 1,000 DASH or for $PAC is
500,000 $PAC.
**Result** **Result**
As this is a subcription, the client will receive a notification when the masternode status changes. As this is a subcription, the client will receive a notification
when the masternode status changes.
The status depends on the server the masternode is hosted, the internet connection, the offline time and even the collateral amount, so this subscription notice these changes to the user. The status depends on the server the masternode is hosted, the
internet connection, the offline time and even the collateral
amount, so this subscription notice these changes to the user.
**Example**:: **Example**::
masternode.subscribe("8c59133e714797650cf69043d05e409bbf45670eed7c4e4a386e52c46f1b5e24-0") masternode.subscribe("8c59133e714797650cf69043d05e409bbf45670eed7c4e4a386e52c46f1b5e24-0")
**Example Results**:: **Example Result**::
{'method': 'masternode.subscribe', u'jsonrpc': u'2.0', u'result': u'ENABLED', 'params': ['8c59133e714797650cf69043d05e409bbf45670eed7c4e4a386e52c46f1b5e24-0'], u'id': 19} {'method': 'masternode.subscribe', u'jsonrpc': u'2.0', u'result': u'ENABLED', 'params': ['8c59133e714797650cf69043d05e409bbf45670eed7c4e4a386e52c46f1b5e24-0'], u'id': 19}
@ -1013,12 +1026,12 @@ Returns the list of masternodes.
An array with the masternodes information. An array with the masternodes information.
**Examples**:: **Example**::
masternode.list("['PDFHmjKLvSGdnWgDJSJX49Rrh0SJtRANcE', masternode.list("['PDFHmjKLvSGdnWgDJSJX49Rrh0SJtRANcE',
'PDFHmjKLvSGdnWgDJSJX49Rrh0SJtRANcF']") 'PDFHmjKLvSGdnWgDJSJX49Rrh0SJtRANcF']")
**Example Results**:: **Example Result**::
[ [
{ {

Loading…
Cancel
Save