2: How to Become a Block Producer (Run a TUSC Witness Node) : Account Handling
If you want to use your TUSC swap account as a Block Producer or you already have a TSUC account that you want to use, then you can skip the wallet section and jump to witness section (section 3). Make sure that account has 400K TUSC balance.
Running TUSC Wallet_Cli using Docker
Skip this if you are running compiled wallet (built from GitHub).
Saving a wallet and docker container is very important, since we are using Docker, we have to save the docker container (This is must).
Until you exit the wallet, every command that is executed will be the wallet command
Run the Docker Container
Once wallet image runs successfully, you will be inside the wallet interface.
sudo docker run -it -P bendubois/tusc-cli-wallet
Run compiled wallet
Skip this if you are running ducker.
If you have compiled your wallet from source code, then you need to find the wallet in tusc-core folder
No matter how you run the wallet, you will see this message.
Please use the set_password method to initialize a new wallet before continuing
Execute these commands, type after >>>
Set a password
new >>> set_password <use_any_password>
new >>> set_password testPassword
It will return null, but that’s ok
Unlock the wallet
locked >>> unlock <the_password_you_used_in_new>
locked >>> unlock testPassword
It will return null
You can either create an account or you can import the account that is already created
You can Create an account either using brain key or you can register an account using Public Key
Create an account
Get the brain key first
unlocked >>> suggest_brain_key
It will return 3 Keys, make sure your copy and save it somewhere
wif_priv_key (Private key, should be store securely)
pub_key (Public Key)
unlocked >>> create_account_with_brain_key "Brain ... key" <accountname> <registrar_account> <referrer_account> true
unlocked >>> create_account_with_brain_key "CODDER … SICULA" rabtaitest rabtai rabtai true
Register account and referrer account are for affiliation, in this example, I am using rabtai as referral
it will return something like this
Register an Account
register_account <account_name> <owner_pubkey> <active_pubkey> <registrar_account> <referrer_account> <referrer_percent> <broadcast>
register_account rabtaitest TUSC8BZh3LZmvRbQLyuNXVy2VRUKSEt2CoZZppkSLf7QhbWmwkUuZq TUSC8BZh3LZmvRbQLyuNXVy2VRUKSEt2CoZZppkSLf7QhbWmwkUuZq rabtai rabtai 75 true
Import an Account
unlocked >>> import_key <accountname> “<Owner_Private_Key>”
unlocked >>> import_key rabtaitest “5KQwrPbxdL6ahXujxW31FSSQZ1JiwsST4crQzDeyXtP79zkvFD3”
It will return true is succeed
Import a balance from that imported account
unlocked >>> import_balance <accountname> <Owner_Private_Key> <broadcast>
unlocked >>> import_balance rabtaitest ["5KQwrPbxdL6ahXujxW31FSSQZ1JiwsST4crQzDeyXtP79zkvFD3"] true
it will return 
You can verity the balance
unlocked >>> get_account rabtaitest
unlocked >>> list_account_balances rabtaitest
Transfer a balance from/to other accounts
unlocked >>> transfer <from> <to> <amount> <asset> <memo/message> <broadcast>
unlocked >>> transfer rabtai rabtaitest 9999999 TUSC “Enjoy” true
If the transfer is success, you will get success message
Let’s save the wallet and Docker container before we go to Block Producer commands. If you don’t save the wallet, and docker state, you will lose everything. When you commit the docker, it saves the image locally, that will be your personal wallet to run.
Save the wallet
unlocked >>> save_wallet_file my-wallet.json
It will return null
Save the Docker Container
If you are running Compiled Wallet, then you don't have to worry about Docker
Open a new terminal (if VPS then log in to the server), Do not close or exit the terminal where Docker (Wallet) is running.
Get the container ID, so we can save it locally. This will be on a new terminal, not on the wallet window
sudo docker container ls
CONTAINER ID IMAGE
Save the docker (where you execute sudo docker container ls)
sudo docker commit <container id> <repository>:<tag>
sudo docker commit f216a846da82 localtuscwallet:1
repository:tag is for you to renumber, it is like a file name
It will return sha256 key if success
sudo docker images
This command will show the local stored docker images
Exit the wallet
You can exit the wallet (always make sure to save wallet)
new >>> quit
Third part of the guide will be how to Run a witness node.