candidates - UCHAIN-WORLD/uchain-fullnode GitHub Wiki

title: candidates

Command list


  • registercandidate

    Register Candidate.
    • Parameters (named)
    1. -c or [--content] Content of candidate .
    2. -f or [--fee] Transaction fee. defaults to 100 UCN.
    • Parameters (positional)
    1. WALLET_NAME Wallet name.
    2. WALLET_AUTH Wallet password/authorization.
    3. TOUID The address will be bound to, can change to other addresses later.
    4. NODEADDRESS The target node address[x.x.x.x:port].
    • Example
    $ uc-cli registercandidate tony4 123456 [email protected] 192.168.16.168:5682
    {
    "hash" : "0cd0f54a3aa4c2677dfe88ac016903a387c76b606e8b79455548e00a6e0c8079",
    "inputs" : 
    [
    	{
    		"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    		"previous_output" : 
    		{
    			"hash" : "944c4c6189528775c3b0f67df3b4599334ea1dc4abcb015fe63316479cf50a93",
    			"index" : 0
    		},
    		"script" : "[ 304402205a880b9bdcb30c9677cdba1c144c2bfaa02440f4c1b70b63d5a4b7c04675d581022069297fbdb56a639346ca7ef7ce8ddf1ed37486445c6479f3336d1cd5ff8ac51901 ] [ 02328a6c43d56baa8ed09abbac7b5fdf59ea7b79ea3321c643db590b2984d797d3 ]",
    		"sequence" : 4294967295
    	}
    ],
    "lock_time" : "0",
    "outputs" : 
    [
    	{
    		"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    		"asset" : 
    		{
    			"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    			"content" : "",
    			"from_uid" : "[email protected]",
    			"status" : "registered",
    			"symbol" : "192.168.16.168:5682",
    			"type" : "candidate"
    		},
    		"index" : 0,
    		"locked_height_range" : 0,
    		"script" : "dup hash160 [ bd363e5463bd682d1ba7dfa174150db344865597 ] equalverify checksig",
    		"value" : 0
    	},
    	{
    		"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    		"asset" : 
    		{
    			"to_uid" : "[email protected]",
    			"type" : "ucn"
    		},
    		"index" : 1,
    		"locked_height_range" : 41472000,
    		"script" : "[ 00d07802 ] numequalverify dup hash160 [ bd363e5463bd682d1ba7dfa174150db344865597 ] equalverify checksig",
    		"value" : 50000000000000
    	}
    ],
    "version" : "4"
    }
    
    

  • transfercandidate

    Transfer candidate to other UID.

    • Parameters (named)
    1. -f or [--fee] Transaction fee. defaults to 200000 UCN bits.
    • Parameters (positional)
    1. WALLET_NAME Wallet name.
    2. WALLET_AUTH Wallet password/authorization.
    3. TOUID Target uid
    4. SYMBOL Token candidate symbol
    • Example
    $ uc-cli transfercandidate yang 123456 [email protected] 192.168.16.160:5682
    {
    "hash" : "23245c98ad0201ac9aafbdd2f97ad7c2b608efcc65d18c1a10d9eb0e0001bc48",
    "inputs" : 
    [
    	{
    		"address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1",
    		"previous_output" : 
    		{
    			"hash" : "39a1fb7e9c2c72b08038e9810ae655d1037f3992e2bd013c500a16669765ea94",
    			"index" : 2
    		},
    		"script" : "[ 3045022100dcf46e0ffadbe396034c5d6e80fd805901f20cf307940b4d0b943339940c16af0220346a1efa2a68cae102fd0bcce80839de8a2e658514de1038935265b59a0f0bd401 ] [ 026c05f0fe5306fc9c5282600f09305199da99664a6a90f430b59fae8b09cc7aeb ]",
    		"sequence" : 4294967295
    	},
    	{
    		"address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1",
    		"previous_output" : 
    		{
    			"hash" : "39a1fb7e9c2c72b08038e9810ae655d1037f3992e2bd013c500a16669765ea94",
    			"index" : 0
    		},
    		"script" : "[ 304402207bc6998e0239ebf1967e21ff5e70feaee94f6502d99cf6913b4c8e46905cbf2b02204976dedccfb84c9360918fbdbe67c7cdf9736a336b1150fd4cdd9e6fc2f3109801 ] [ 026c05f0fe5306fc9c5282600f09305199da99664a6a90f430b59fae8b09cc7aeb ]",
    		"sequence" : 4294967295
    	}
    ],
    "lock_time" : "0",
    "outputs" : 
    [
    	{
    		"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    		"asset" : 
    		{
    			"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    			"status" : "transfered",
    			"symbol" : "192.168.16.160:5682",
    			"to_uid" : "[email protected]",
    			"type" : "candidate"
    		},
    		"index" : 0,
    		"locked_height_range" : 0,
    		"script" : "dup hash160 [ bd363e5463bd682d1ba7dfa174150db344865597 ] equalverify checksig",
    		"value" : 0
    	},
    	{
    		"address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1",
    		"asset" : 
    		{
    			"type" : "ucn"
    		},
    		"index" : 1,
    		"locked_height_range" : 0,
    		"script" : "dup hash160 [ 65a28a57f631d6d6da1a0036e72942a60b95743d ] equalverify checksig",
    		"value" : 49873999600000
    	}
    ],
    "version" : "4"
    }
    
    
    

  • showcandidates

    List candidates.

    • Parameters (positional)
    1. WALLET_NAME Wallet name just for local.
    2. WALLET_AUTH Wallet password(authorization) just for local.
    • Example
    uc-cli showcandidates
    [
    {
    	"address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1",
    	"content" : "",
    	"height" : 89,
    	"status" : "registered",
    	"symbol" : "192.168.16.160:5682",
    	"timestamp" : 1545656955,
    	"to_uid" : ""
    },
    {
    	"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    	"content" : "",
    	"height" : 63,
    	"status" : "registered",
    	"symbol" : "192.168.16.167:5682",
    	"timestamp" : 1545656692,
    	"to_uid" : ""
    },
    {
    	"address" : "UfEUeYUPL8pNW7g8taDQKbHjuawSwFJXiX",
    	"content" : "",
    	"height" : 49,
    	"status" : "registered",
    	"symbol" : "192.168.16.168:5682",
    	"timestamp" : 1545656629,
    	"to_uid" : ""
    }
    ]
    
    
    

  • showcandidate

    Get information of candidate.
  • Parameters (named)
    1. -c or [--current] If specified then show the lastest information of specified candidate. Default is not specified.
    2. -i or [--index] Page index
    • Parameters (positional)
    1. SYMBOL Candidate symbol. If not specified then show whole network candidate symbols.
    • Example
    $ uc-cli showcandidate 192.168.16.160:5682
    {
    "address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1",
    "content" : "",
    "height" : 89,
    "status" : "registered",
    "symbol" : "192.168.16.160:5682",
    "timestamp" : 1545656955,
    "to_uid" : ""
    }