Terra wallet powered by two-party ECDSA.
WIP!! Use at your own risk
- Install Node.js
(tested on Node 10) - Install nightly Rust
(tested on rustc 1.38.0-nightly (0b680cfce 2019-07-09)) - Install the package:
git clone https://github.com/KZen-networks/terra-new-playground.git
cd terra-new-playground
yarn install
yarn build
Built files will be located in the dist
folder.
You can run a demo using the command line.
Server:
$ demo/server
Client:
Usage: client [options] [command]
- Start by generating a new address.
- Populate the address with coins from testnet faucet
address [options]
Example
./demo/lient address --index 1
balance [options] <address>
Example
./demo/lient balance terra1efhd0j476zznhq4c2czjyfnyufjxt8rc7fqxpj
- Add
--dry_run
to generate the trnasaction without executing - Add
--all
to send all currency in specified denom
transfer [options] <from> <to> <amount>
Example
./demo/client transfer terra1xpjtwmemdwz053q4jxjx0ht4dtp25rc799deyf terra1qrkvv8dwc946cltuuqkd09r6yh0z3a30x3umxx 1000 --denom uusd --all --dry_run
tx_info [options] <txhash>
Example
./demo/client tx_info A84D7AEFD5D3CC6906A80BA6D67E6DC1098345CF094B2A61648DD553117D03B6
transactions [options]
Example
./demo/client transactions --account terra1xpjtwmemdwz053q4jxjx0ht4dtp25rc799deyf
rates [options]
Example
./demo/client rates --denom uusd
swap [options] <from> <amount> <ask>
Example
./demo/client swap terra1xpjtwmemdwz053q4jxjx0ht4dtp25rc799deyf 1000 --denom uluna uusd
Note: The server must be online for tests to work
- Generate addresses 4 addresses for testing
- Populate 1 address with LUNA, UST, KRT from faucet (used as bank for testing sends)
- Populate 1 address with UST only (used for testing Terra without LUNA)
- Replace addresses according to comments in
test/test.js
- Run
yarn test
- You can generate a new address using the same share, but specifying the index
Exmpale:
./demo/client address --index 1
Documentation available here
-
Copy the genesis file for the correct network from testnet's repo to
~/.terrad/config
-
Create a new config file
terrad init --chain-id=soju-0014
- Replace line for persistent peers in
~/.terrad/config/config.toml
persistent_peers = "1e1677e4ed9acf4e28de40b67ac01554aed1a29e@52.78.69.160:26656"
Peer information is available in testnet' repo to ~/.terrad/config
Start a node
terrad start
Optionally, run a terra rest-server in another terminal
terracli rest-server --chain-id=soju-0014 --laddr=tcp://0.0.0.0:1317 --node tcp://localhost:26657 --trust-node=false
Feel free to reach out or join ZenGo X Telegram for discussions on code and research.