ucn - UCHAIN-WORLD/uchain-fullnode GitHub Wiki
title: ucn
-
send ucn to a targert uid/address.sendto
- Parameters (named)
-c
or[--change]
Change to this uid/address,should be yours.-f
or[--fee]
The fee of tx. default_value 10000 ucn bits-m
or[--memo]
The memo to descript transaction
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.TO_
Send to this addressAMOUNT
How many you will spend
- Example
uc-cli sendto test1 passwd1 tTmxWoQ3PohHaPdndAGD89o9AhLcJ7L9TJ 10000 { "hash" : "a40ab699fbb769f571c27995208f8a2e1c6e26095e119d6c59dc43dd7cefd3a8", "inputs" : [ { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "previous_output" : { "hash" : "e6a464f8b505c57d67e0079138618241a80fe7f633a83b628f20e197d4fb3183", "index" : 1 }, "script" : "[ 3045022100fdbd7c785d665516fc7066a845b7fcc9bae2a25545982b414036da148d28dc210220186ebcc78fdab96d579896ef8e990ebc0bae93241b42e6b1226cb4f904778ea401 ] [ 03b122b19d00981a2181ebabe58f1aae7d9ee245bf87a551e56ca5aea7f9b0ddfd ]", "sequence" : 4294967295 } ], "lock_time" : "0", "outputs" : [ { "address" : "tTmxWoQ3PohHaPdndAGD89o9AhLcJ7L9TJ", "asset" : { "type" : "ucn" }, "index" : 0, "locked_height_range" : 0, "script" : "dup hash160 [ e4b7fb501e2a43b670b3854b042ea24934942b2f ] equalverify checksig", "value" : 10000 }, { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "asset" : { "type" : "ucn" }, "index" : 1, "locked_height_range" : 0, "script" : "dup hash160 [ c9e5a7523f9f51858ad923995de69be769a2ed7d ] equalverify checksig", "value" : 356695 } ], "version" : "2" }
-
sendtomulti
send ucn to multi target addresses, must specify mychange address.
- Parameters (named)
-f
or[--fee]
The fee of tx. default_value 10000 ucn bits-c
or[--change]
Change to this address/uid, should be yours.-r
or[--receivers]
Send to [address:amount]
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.
- Example
$ uc-cli sendtomulti test 123456 -r tTmxWoQ3PohHaPdndAGD89o9AhLcJ7L9TJ:10000 -r tEjJGzM6LB5zsK6aX8urD9RF5pAAJyrodC:10000 -c tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y { "hash" : "8294ae20bbcc00f07ff20d5e2e01653b55592528705b4a40d3f88f856590cf62", "inputs" : [ { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "previous_output" : { "hash" : "0f37cbe6f0c31548655d7ebda6d576ffd9f3facddfaf4a3be0126ef613f25155", "index" : 1 }, "script" : "[ 304402200a6540d1f9eea2682e326a8da6a733f0d49dda718a126e28edc6e1283a1d172d02207c7b31a8e317756920647b0ab5fc8fe3723ecefd11b70bec533f3a03ee67635801 ] [ 03b122b19d00981a2181ebabe58f1aae7d9ee245bf87a551e56ca5aea7f9b0ddfd ]", "sequence" : 4294967295 } ], "lock_time" : "0", "outputs" : [ { "address" : "tTmxWoQ3PohHaPdndAGD89o9AhLcJ7L9TJ", "asset" : { "type" : "ucn" }, "index" : 0, "locked_height_range" : 0, "script" : "dup hash160 [ e4b7fb501e2a43b670b3854b042ea24934942b2f ] equalverify checksig", "value" : 10000 }, { "address" : "tEjJGzM6LB5zsK6aX8urD9RF5pAAJyrodC", "asset" : { "type" : "ucn" }, "index" : 1, "locked_height_range" : 0, "script" : "dup hash160 [ 559d9851e62cfe1c05174958ca493aab96523fae ] equalverify checksig", "value" : 10000 }, { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "asset" : { "type" : "ucn" }, "index" : 2, "locked_height_range" : 0, "script" : "dup hash160 [ c9e5a7523f9f51858ad923995de69be769a2ed7d ] equalverify checksig", "value" : 306695 } ], "version" : "2" }
-
sendfrom
send ucn from a specified uid/address of this wallet to target uid/address, mychange goes to from_uid/address. * Parameters (named)
-f
or[--fee]
The fee of tx. default_value 10000 ucn bits-m
or[--memo]
The memo to descript transaction-c
or[--change]
Change to this uid/address,should be yours.
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.FROMADDRESS
Send from this addressTO_
Send to this addressAMOUNT
How many you will spend
- Example
$ uc-cli sendfrom test 123456 tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y tTko1LmJMM4Y492xYWiacJ9pokxoG8FFjZ 10000 { "hash" : "e6a464f8b505c57d67e0079138618241a80fe7f633a83b628f20e197d4fb3183", "inputs" : [ { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "previous_output" : { "hash" : "30bff29ce81dac72ca8e91a4e278bcab6a713889f1c6593e37daf21736da4fa8", "index" : 1 }, "script" : "[ 3045022100999a1b328128732c763e449f4fa167807c8c7b8607504c4f572246fab2debbf902203d76137cc87a9a688b266ec0b05912eabe4f089471ab22dfef0e247633e4d44501 ] [ 03b122b19d00981a2181ebabe58f1aae7d9ee245bf87a551e56ca5aea7f9b0ddfd ]", "sequence" : 4294967295 } ], "lock_time" : "0", "outputs" : [ { "address" : "tTko1LmJMM4Y492xYWiacJ9pokxoG8FFjZ", "asset" : { "type" : "ucn" }, "index" : 0, "locked_height_range" : 0, "script" : "dup hash160 [ e47fa100e48b4080dbe122ff402d5350cabe06fd ] equalverify checksig", "value" : 10000 }, { "address" : "tRL8yxhSd3AAxpRcbxmEasv89VZ7ZJgh3y", "asset" : { "type" : "ucn" }, "index" : 1, "locked_height_range" : 0, "script" : "dup hash160 [ c9e5a7523f9f51858ad923995de69be769a2ed7d ] equalverify checksig", "value" : 376695 } ], "version" : "4" }
-
deposit
Deposit some ucn, then get reward for frozen some ucn.
- Parameters (named)
-a
or[--address]
The deposit target address.-d
or[--deposit]
Deposits support [10, 45, 120, 240, 540] days. defaluts to 10 days-f
or[--fee]
The fee of tx. default_value 10000 UCN bits
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.AMOUNT
How many you will deposit.
- Example
$ uc-cli deposit -a USa9SKiMHZ3TRcodvJi6oGVgS65iy47Hh4 -d 540 yang 123456 1000000 { "hash" : "1d51c51c4b0ef79855b7aa0d79a8dfad2996b00c927a8ccc41d59e43c443c21f", "inputs" : [ { "address" : "UiyoSgUnCbfSFVKcufwMZALVMURmiEfswq", "previous_output" : { "hash" : "72446eed852076da373a9d8df2e2e8398a241591bbd590d5d56e8557944ecdeb", "index" : 1 }, "script" : "[ 3045022100e26c455f6c99447621295e66fe4f2b22a9975df706c5a8b8a53238cf920841d702207c7ec939027f64afe8249660ea71ca6510d0b4ccf41e2c3189e161365dc0438101 ] [ 03bec77692da62f861065c04d09de5b217c14be033453a9235a1c67853cccf3ea9 ]", "sequence" : 4294967295 } ], "lock_time" : "0", "outputs" : [ { "address" : "USa9SKiMHZ3TRcodvJi6oGVgS65iy47Hh4", "asset" : { "type" : "ucn" }, "index" : 0, "locked_height_range" : 93312000, "script" : "[ 00d48f05 ] numequalverify dup hash160 [ 3254e428b11bf9c23a227c3148148fa868ff3e9d ] equalverify checksig", "value" : 1000000 }, { "address" : "UiyoSgUnCbfSFVKcufwMZALVMURmiEfswq", "asset" : { "type" : "ucn" }, "index" : 1, "locked_height_range" : 0, "script" : "dup hash160 [ e65032659d90b0c770f649a385949001f6a4ddfd ] equalverify checksig", "value" : 81999979998939990 } ], "version" : "4" }
-
showbalances
List all balance details of each address of this wallet. defaults show non-zero unspent address.
- Parameters (named)
-n
or[--nozero]
List non-zero upsent records.-d
or[--deposited]
list deposited UCNs, default is false.-g
or[--greater_equal]
Greater than UCN bits.-h
or[--help]
Get a description and instructions for this command.-l
or[--lesser_equal]
Lesser than UCN bits.
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.
- Example
$ uc-cli showbalances yang 123456 [ { "address" : "UNfrtAxhJRi83PjTPjV3yNPKnjLYR22Bhx", "available" : 0, "confirmed" : 0, "frozen" : 0, "received" : 245999959999969990, "unspent" : 0 }, { "address" : "UkRYvsnfJkwSTAUCcZnqCK8sE1ZYJP6so7", "available" : 0, "confirmed" : 0, "frozen" : 0, "received" : 0, "unspent" : 0 }, { "address" : "UTg5BtZmFAvV8FaDQUw6BxRVphvyw6QhqF", "available" : 0, "confirmed" : 0, "frozen" : 0, "received" : 0, "unspent" : 0 }, { "address" : "UiyoSgUnCbfSFVKcufwMZALVMURmiEfswq", "available" : 98869990, "confirmed" : 98869990, "frozen" : 0, "received" : 164000079998779980, "unspent" : 98869990 }, { "address" : "UXFQvGKWh8GzEtV1RNw2Vo1abnynPy58u1", "available" : 0, "confirmed" : 0, "frozen" : 0, "received" : 50000, "unspent" : 0 } ]
-
Show total balance details of this wallet.showbalance
- Parameters (positional)
WALLET_NAME
Wallet name.WALLET_AUTH
Wallet password/authorization.
- Example
$ uc-cli showbalance tony0 123456 { "total_available" : 0, "total_confirmed" : 1240000, "total_frozen" : 1240000, "total_received" : 1240000, "total_unspent" : 1240000 }
-
Get any valid target address UCN balance.showaddressucn
- Parameters (positional)
PAYMENT_ADDRESS
PAYMENT_ADDRESS The payment address. If not specified the address is read from STDIN.
- Example
$ uc-cli showaddressucn USa9SKiMHZ3TRcodvJi6oGVgS65iy47Hh4 { "address" : "USa9SKiMHZ3TRcodvJi6oGVgS65iy47Hh4", "confirmed" : 1240000, "frozen" : 1240000, "received" : 1240000, "unspent" : 1240000 }