kUSD Testnet

A blockchain for testing the Kowala Protocol with the kUSD stablecoins and mUSD mining tokens
The kUSD Testnet Is Live! Go To Our Netstats Dashboard

What is the kUSD testnet?

The kUSD Testnet is a sandbox blockchain for testing and experimenting with our flagship stablecoin, kUSD. It’s an evolving technology demo which showcases some of things that will be possible with the Kowala Protocol. You can spin up your own node and connect to the network and see how the network is performing using the dashboard. It’s also possible to hold and transfer mining tokens.

kUSD is currently in a pre-release state, but we intend for the kUSD testnet to be a permanently stable release candidate for the network. In other words, it will always include the bleeding-edge features of the Kowala Protocol before they’re released.

Connecting to the kUSD Testnet via the console

While we’re working on our wallet app, you can connect to the kUSD testnet using node console provided by the kUSD mining client. We recommend that you use the official kUSD Docker image, but advanced users are of course free to download the latest stable binaries and use those. This guide assumes the use of the Docker image.

The first step is to install Docker if you don’t already have it installed. There are Linux, Mac and Windows versions available. Docker is a virtualization system that allows software compiled for Linux to run on any platform. We use it to automatically fetch and run pre-compiled, up-to-date versions (called ‘images’) of the kUSD mining client.

With docker installed, it’s time to fire up the terminal. To download the mining client, start it, generate a wallet and connect to the kUSD testnet via the console, run:

> docker run --rm -it kowalatech/kusd --testnet --new-account console

Docker should fetch the mining client and then start running it. The two flags near the start of the command - --rm and -it — are shorthand instructions to remove the image when we’re done, and run the container in interactive mode. This command will create a disposable version of the mining client — all accounts will be deleted when you exit the console. That’s the recommended approach for the testnet: since it may sometimes be unstable, you probably want to start again each time. If you want to make it persist, you can leave off the --rm flag.

The flags at the end tell the client to connect to the testnet, create a new account, and start the command-line console.

After a bit of automatic setup, you should be in the interactive kUSD JavaScript console. This is a command environment that’s very similar to the Ethereum version. Your node will want to synchronize with the network, which may take a few minutes.

Using a kUSD wallet

The official Docker image will create an account for you when it starts, and you can get its public address via the console:

> kcoin.coinbase

The console will output your public address. For example:

> kcoin.coinbase
"0xe2ac86cbae1bbbb47d157516d334e70859a1be45"

By default the account will be locked. You can unlock it using the personal.unlockAccount function, and entering am empty password when prompted:

> personal.unlockAccount(kcoin.coinbase)

(If you want to use a non-empty password, you can pass an extra --new-account-password=yourpassword argument to the Docker command).

Getting kUSD balance

You can get your current balance (or the balance of any address) using kcoin.getBalance:

> kcoin.getBalance(kcoin.coinbase)

You can get free coins for the testnet using the faucet.

Sending kUSD via the console

kUSD is sent using the kcoin.sendTransaction() function in the console. To send one of your kUSD to address 0xe2ac86cbae1bbbb47d157516d334e70859a1be45, you can use:

> kcoin.sendTransaction({from:kcoin.coinbase, to:"0xe2ac86cbae1bbbb47d157516d334e70859a1be45", value: web3.toWei(1, "ether")})

As noted above, we’re still using some Ethereum terminology. 1 kUSD is, in the console, 1 “ether”.

Using mUSD mining tokens

You can get the balance of any address’s mining tokens using mtoken.getBalance:

> mtoken.getBalance(kcoin.coinbase)

Transferring mining tokens can be achieved with mtoken.transfer, which is very similar to kcoin.sendTransaction:

> mtoken.transfer({from:kcoin.coinbase, to: "0xe2ac86cbae1bbbb47d157516d334e70859a1be45", value: 1})

Updating the Docker image

We frequently push updates to the mining client. Fortunately, Docker makes keeping everything up to date very easy. Just run:

> docker pull kowalatech/kusd