Skip to content

Privatizer RPC Commands

growlot edited this page Feb 21, 2019 · 2 revisions

RPC Commands for Privatizer

  • listprivatizers
  • getprivatizer
  • addprivatizer
  • removeprivatizer

List Privatizers

listprivatizers ( details )

Return all privatizer information.


Arguments:

  1. details (boolean, optional, default=false) whether to list detailed information or simple

Result:

[ { "publicAddress" : "address", (string) the public address "privateAddress" : "address", (string) the private address "workflows" : [ (array of json object, detauls=true) the list of pending works { "startHeight" : n, (numeric) the public address "srcAddress" : "address", (string) the t or z address "destAddress" : "address", (string) the t or z address "amount" : x.xxx, (numeric) the amount in RES "opid" : "opid" (string) the operation id } ] } ] 

Examples:

resistance-cli listprivatizers

resistance-cli listprivatizers true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "listprivatizers", "params": [true] }' -H 'content-type: text/plain;' http://127.0.0.1:8132/##

Get Privatizer

getprivatizer "publicAddress" ( "privateAddress" details )

Return privatizer information.


Arguments:

  1. publicAddress (string, required) the public t address
  2. privateAddress (string, optional, default="") the private t address
  3. details (boolean, optional, default=false) whether to get detailed information or simple

Result:

{ "publicAddress" : "address", (string) the public address "privateAddress" : "address", (string) the private address "workflows" : [ (array of json object, detauls=true) the list of pending works { "startHeight" : n, (numeric) the public address "srcAddress" : "address", (string) the t or z address "destAddress" : "address", (string) the t or z address "amount" : x.xxx, (numeric) the amount in RES "opid" : "opid" (string) the operation id } ] } 

Examples:

resistance-cli getprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg"

resistance-cli getprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg" "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP"

resistance-cli getprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg" "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "getprivatizer", "params": ["t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg", "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP", true] }' -H 'content-type: text/plain;' http://127.0.0.1:8132/

Add Privatizer

addprivatizer "publicAddress" "privateAddress" ( overwrite )

Add privatizer.


Arguments:

  1. publicAddress (string, required) the public t address
  2. privateAddress (string, required) the private t address
  3. overwrite (boolean, optional, default=false) flag to overwrite if the public address does already exist

Result:

true|false (boolean) true if successful. 

Examples:

resistance-cli addprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg" "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP"

resistance-cli addprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg" "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP" true

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "addprivatizer", "params": ["t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg", "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP", true] }' -H 'content-type: text/plain;' http://127.0.0.1:8132/

Remove Privatizer

removeprivatizer "publicAddress" ( "privateAddress" )

Remove privatizer.


Arguments:

  1. publicAddress (string, required) the public t address
  2. privateAddress (string, optional, default="") the private t address

Result:

true|false (boolean) true if successful. 

Examples:

resistance-cli removeprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg"

resistance-cli removeprivatizer "t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg" "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP"

curl --user myusername --data-binary '{"jsonrpc": "1.0", "id":"curltest", "method": "removeprivatizer", "params": ["t1PGFqEzfmQch1gKD3ra4k18PNj3tTUUSqg", "t1LtvqCaApEdUGFkpKMM4MstjcaL4dKg8SP"] }' -H 'content-type: text/plain;' http://127.0.0.1:8132/

Clone this wiki locally