└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # Wavelet Releases 2 | 3 | Official releases of the [Perlin][perlin] Wavelet ledger. For more info, read our [blog post][wavelet-ledger] and refer to our [wiki page][wiki]. 4 | 5 | [![Discord][discord-shield]][discord] 6 | 7 | Binary archives are published as [GitHub releases][github-releases]. 8 | 9 | # Table of Contents 10 | - [Wavelet Releases](#wavelet-releases) 11 | - [Table of Contents](#table-of-contents) 12 | - [Executables](#executables) 13 | - [Getting Started](#getting-started) 14 | - [Quickstart](#quickstart) 15 | - [Running Wavelet](#running-wavelet) 16 | - [Configuration file](#configuration-file) 17 | - [Interacting with Wavelet](#interacting-with-wavelet) 18 | - [Directly through the client](#directly-through-the-client) 19 | - [Programatically using wctl](#programatically-using-wctl) 20 | - [Web UI](#web-ui) 21 | 22 | # Executables 23 | 24 | The Perlin Wavelet project comes with several wrappers/executables. 25 | 26 | | Command | Description | 27 | |:----------:|-------------| 28 | | **`wavelet`** | The main Wavelet CLI client. It runs a testnet node (private network) and also allows for remote API access. Refer to the [Wavelet CLI][wiki-wavelet-cli] wiki page for command line options. | 29 | | `wctl` | Utility tool to interact with a Wavelet client. Please see our [wctl][wiki-wctl] wiki page for details. | 30 | 31 | # Getting Started 32 | 33 | To get started running Wavelet, download one of the pre-built release binaries from our [GitHub releases][github-releases] page. We currently support Linux and OSX (x64 only). Binaries for Windows are included but not fully supported. 34 | 35 | ## Quickstart 36 | 37 | To test Wavelet on a local cluster, run the following commands in 2 terminals. Wavelet requires a minimum of 2 nodes to be connected with each other at all times. 38 | 39 | ```shell 40 | [terminal 1] > ./wavelet --port 3000 --db.path testdb_1 --api.port 9000 41 | [terminal 2] > ./wavelet --port 3001 --db.path testdb_2 \ 42 | --private_key_file random \ 43 | --peers tcp://localhost:3000 44 | ``` 45 | 46 | To send a transaction, type the following command into terminal 1: `p [public_key] 5` replacing `[public_key]` with the second client's generated public key. This sends 5 PERLs (Perlin tokens) to the second client. 47 | 48 | ```shell 49 | > Enter a message: p bfba6b298c9ff9beb1848d8dbd0fa4ceb2967dce3913eeaa91376fb1db27c284 5 50 | 2018-11-07T14:00:48-05:00 |INFO| Success! Your payment transaction ID: 478ad5e199db74ebcde14c90b24fe74cbdc9521c9625f5b2ac4f6f304cd8cb88 51 | ``` 52 | 53 | In terminal 2, you can check the balance with the following command. 54 | 55 | ```shell 56 | > Enter a message: w 57 | 2018-11-07T14:01:41-05:00 |INFO| Here is your wallet information. balance: 5 id: bfba6b298c9ff9beb1848d8dbd0fa4ceb2967dce3913eeaa91376fb1db27c284 nonce: 9 stake: 0 58 | ``` 59 | 60 | 61 | ## Running Wavelet 62 | 63 | Starting Wavelet with no arguments will launch the client with the default settings listening for connections on port 3000. It saves ledger state data to directory `testdb`. 64 | 65 | ```shell 66 | ❯ ./wavelet 67 | 2018-11-07T14:03:09-05:00 |INFO| Database has been loaded. db_path: testdb 68 | 2018-11-07T14:03:09-05:00 |INFO| Successfully seeded the genesis of this node. file: genesis.json num_accounts: 1 69 | 2018-11-07T14:03:09-05:00 |INFO| Registered transaction processor service. module: cloud.wasm 70 | 2018-11-07T14:03:09-05:00 |INFO| Registered transaction processor service. module: contract.wasm 71 | 2018-11-07T14:03:09-05:00 |INFO| Registered transaction processor service. module: money.wasm 72 | 2018-11-07T14:03:09-05:00 |INFO| Registered transaction processor service. module: stake.wasm 73 | 2018-11-07T14:03:09-05:00 |INFO| Keypair loaded. private_key: 6d6fe0c2bc913c0e3e497a0328841cf4979f932e01d2030ad21e649fca8d47fe71e6c9b83a7ef02bae6764991eefe53360a0a09be53887b2d3900d02c00a3858 public_key: 71e6c9b83a7ef02bae6764991eefe53360a0a09be53887b2d3900d02c00a3858 74 | 2018-11-07T14:03:09-05:00 |INFO| Listening for peers. address=tcp://127.0.0.1:3000 75 | Enter a message: 76 | ``` 77 | 78 | 79 | ## Configuration file 80 | 81 | As an alternative to passing the flags to the `wavelet` binary, you can also pass a configuration file. For all configuration options, refer to the [Configuration file][wiki-wavelet-configuration-file] section of the wiki. 82 | 83 | ```shell 84 | > ./wavelet --config /path/to/your_config.toml 85 | ``` 86 | 87 | ## Interacting with Wavelet 88 | 89 | You can interact with Wavelet in several ways. 90 | 91 | ### Directly through the client 92 | 93 | In the Wavelet command line mode, you can directly enter commands through the console. The following is a list of supported commands. 94 | 95 | * `w [public_key]`: View details about a wallet. If public_key is not specified, it retrieves the client's wallet information. 96 | * `p [public_key] [amount]`: Pay amount to a wallet given its public key. 97 | * `tx [tx_id]`: Returns details about transaction with tx_id. 98 | * `c [smart_contract_path]`: Deploy a smart contract at specified path. 99 | * `ps [stake_amount]`: Register as a validator with a placed stake amount. 100 | * `ws [stake_amount]`: Withdraw stake amount from your stake as a validator. 101 | 102 | ### Programatically using wctl 103 | 104 | With the `wctl` application, you can send remote API commands to a Wavelet client if the API option is enabled. Refer to the [wctl wiki page][wiki-wctl] for usage instructions. 105 | 106 | ```shell 107 | > ./wctl send_transaction \ 108 | --api.host ${API_HOST} --api.port ${API_PORT} \ 109 | --api.private_key_file ${PRIVATE_KEY_FILE} \ 110 | transfer '{"recipient": "${PUBLIC_KEY}", "amount": ${AMOUNT}}" 111 | ``` 112 | 113 | ### Web UI 114 | 115 | To interact with your wavelet node through the browser, see the [Lens](https://github.com/perlin-network/lens) project. 116 | 117 | [perlin]: https://www.perlin.net 118 | [wavelet-ledger]: https://medium.com/perlin-network/wavelet-a-metastable-sybil-resistant-ledger-517ea7ee9031 119 | [discord-shield]: https://img.shields.io/discord/458332417909063682.svg 120 | [discord]: https://discord.gg/dMYfDPM 121 | [github-releases]: https://github.com/perlin-network/wavelet-bin/releases 122 | [wiki]: https://github.com/perlin-network/wavelet-bin/wiki 123 | [wiki-wavelet-cli]: https://github.com/perlin-network/wavelet-bin/wiki/Command-Line-Options 124 | [wiki-wctl]: https://github.com/perlin-network/wavelet-bin/wiki/wctl 125 | [wiki-wavelet-configuration-file]: https://github.com/perlin-network/wavelet-bin/wiki/Configuration-File 126 | --------------------------------------------------------------------------------