- Notifications
You must be signed in to change notification settings - Fork 4
Privatizer RPC Commands
- listprivatizers
- getprivatizer
- addprivatizer
- removeprivatizer
listprivatizers ( details )
Return all privatizer information.
Arguments:
-
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/##
getprivatizer "publicAddress" ( "privateAddress" details )
Return privatizer information.
Arguments:
-
publicAddress(string, required) the public t address -
privateAddress(string, optional, default="") the private t address -
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/
addprivatizer "publicAddress" "privateAddress" ( overwrite )
Add privatizer.
Arguments:
-
publicAddress(string, required) the public t address -
privateAddress(string, required) the private t address -
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/
removeprivatizer "publicAddress" ( "privateAddress" )
Remove privatizer.
Arguments:
-
publicAddress(string, required) the public t address -
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/