RPC - Update gobject deserialize (proposal)

This commit is contained in:
thephez 2019-06-13 17:15:37 -04:00
parent 9a7b6d9cf3
commit ddaafd99fc
No known key found for this signature in database
GPG key ID: BBC8A06DBE236099

View file

@ -309,7 +309,7 @@ The `gobject deserialize` RPC deserializes a governance object from a hex string
*Parameter #1---object data (hex)* *Parameter #1---object data (hex)*
{% itemplate ntpd1 %} {% itemplate ntpd1 %}
- n: "`data-hex`" - n: "`hex_data`"
t: "string (hex)" t: "string (hex)"
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
d: "The data (hex) of a governance object" d: "The data (hex) of a governance object"
@ -331,11 +331,6 @@ deserialized. Examples are shown below for both proposal and trigger object type
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
d: "Array of governance objects" d: "Array of governance objects"
- n: "→<br>`proposal`"
t: "string (hex)"
p: "Required<br>(exactly 1)"
d: "Proposal object"
- n: "→ →<br>`end_epoch`" - n: "→ →<br>`end_epoch`"
t: "string" t: "string"
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
@ -373,35 +368,27 @@ deserialized. Examples are shown below for both proposal and trigger object type
{% enditemplate %} {% enditemplate %}
*Example from Dash Core 0.12.2* *Example from Dash Core 0.14.0*
{% highlight bash %} {% highlight bash %}
dash-cli -testnet gobject deserialize 5b5b2270726f706f73616c222c7b22656e645f6\ dash-cli -testnet gobject deserialize 7b22656e645f65706f6368223a313536303435\
5706f6368223a2231353037343534383935222c226e616d65223a227465737470726f706f7361\ 373035352c226e616d65223a2274657374222c227061796d656e745f61646472657373223a22\
6c5f2d5f6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373\ 7964354b4d52457333474c4d65366d544a597233597248316a75774e777246436642222c2270\
83931353037323635383233222c227061796d656e745f61646472657373223a2279664e68484c\ 61796d656e745f616d6f756e74223a352c2273746172745f65706f6368223a31353630343533\
4c695936577a5a646a51766137324a64395134313468516578514c68222c227061796d656e745\ 3439302c2274797065223a312c2275726c223a22687474703a2f2f746573742e636f6d227d
f616d6f756e74223a2232222c2273746172745f65706f6368223a223135303732363538323322\
2c2274797065223a312c2275726c223a2268747470733a2f2f7777772e6461736863656e74726\
16c2e6f72672f702f746573745f70726f706f73616c5f31353037323635383233227d5d5d
{% endhighlight %} {% endhighlight %}
Result: Result:
{% highlight json %} {% highlight json %}
[ {
[ "end_epoch": 1560457055,
"proposal", "name": "test",
{ "payment_address": "yd5KMREs3GLMe6mTJYr3YrH1juwNwrFCfB",
"end_epoch":"1507454895", "payment_amount": 5,
"name":"testproposal_-_abcdefghijklmnopqrstuvwxyz01234567891507265823", "start_epoch": 1560453490,
"payment_address":"yfNhHLLiY6WzZdjQva72Jd9Q414hQexQLh", "type": 1,
"payment_amount":"2", "url": "http://test.com"
"start_epoch":"1507265823", }
"type":1,
"url":"https://www.dashcentral.org/p/test_proposal_1507265823"
}
]
]
{% endhighlight %} {% endhighlight %}
<!-- __ --> <!-- __ -->