Users
Users in Cocolab act as actors that can be part of invocation of endpoints on logics. They have their identifiers and can act as default senders so we can select which user is the sender and which are just additional actors.
Usernames can also serve as arguments in the endpoint invocations, so e.g. instead of doing
invoke Ledger.Balance(user: 0xc95f12528ec2d360e334c98d674c9199940646f0d269c0004844bc2ea32485c8)
we can write username, if it's registered as in the example below
invoke Ledger.Balance(user: robert)
users
List all usernames and their addresses
manish [0x79d587de4a2c72b55771d291b8ad6c9ffdcaa5cba12c958090da1799eb906f5d]
harsh [0x96883e7be3b2a494075e6d863193f934408bc8183db268a509ef69f90e4f1836]
robert [0xc95f12528ec2d360e334c98d674c9199940646f0d269c0004844bc2ea32485c8]
akash [0xdf959926836d1f853ae411ad2101e7f18e5ebe026cbf266fd5dcfdef91615148]
get username
List the specified user address
akash [0xdf959926836d1f853ae411ad2101e7f18e5ebe026cbf266fd5dcfdef91615148]
register username as 0xaddress
Registers the username with specified address if as address
not specified address will be generated from engine.
user test_user registered with address: 0x7bebc7547cea490e2e1381e426ed9c4d346362bfee43c2ba01da1c779c0814fe
get default.sender
List the default sender
default sender is set to manish
set default.sender username
Sets the default sender
default sender is set to akash
If sender is already configured wipe the existing sender then set again.
wipe default.sender username
Wipes the default sender
default sender is unset
wipe users
Wipe all users
All Users Wiped !!!
wipe username
Wipes only specified username
test_user user Wiped!