proxy.golang.org : github.com/dncohen/rcl
RCL Helper Tools RCL is short for Ripple Consensus Ledger. (Now called "XRP Ledger".) Install Set up a temporary working directory. We'll use testnet for this example: Generate some test net XRP to play with: Note the output of above includes... Create a key file in format that rcl tools requires. Copy the SECRET from the above command into: Next, create a brand new Ripple address and master signing key with `rcl-key` tool: rcl-key generates a new keypair, and writes both address and secret to a file. The generated *address* (with nickname `hot`) does not become an *account* on the test net until it is funded with enough XRP to meet the reserve requirement. Before we use our wallets, its a good practice to make a paper backup of the secret keys. RCL tools provides a `backup` operation to support this. This step is required, even for testnet keys, because the `backup` operation writes the public address to a config file needed later. The `rcl-key backup` operation walks you through the secrets, giving you a chance to copy each one to paper. (For test accounts, you can skip writing the down the secret; just press [return] a few times.) As you make a paper backup of each key, the tool writes a configuration file with the address, but not the secret, of each key. At this point your working directory should have files "fund.cfg", "hot.cfg" and two .rcl-key files with secrets. In order to create our first transaction, the `rcl-tx` tool must communicate with a rippled server. We're going to use the testnet. To do so, create a configuration file: (RCL tools will inspect all the *.cfg files in a given configuration directory. So when we run `rcl-tx`, it will read from testnet.cfg as well as fund.cfg and hot.cfg.) Construct a transaction to send the required XRP to the new address with the `rcl-tx send` subcommand: The output is an unsigned transaction, encoded in JSON format. The unsigned transaction shows us what will be sent to the XRP ledger; however, it cannot be sent until it is signed and submitted. RCL tools uses a "pipeline" to first compose transactions, then sign, then submit. We just saw the first step, composing. Here's how to run the tools in a pipeline, to complete the transaction: The last command, `rcl-tx submit` could take several seconds to complete, as it awaits the final status from the XRP ledger network. With a little luck, you should see "tesSUCCESS" in the output. Finally, let's confirm the hot wallet has received some XRP: This should show the 100 XRP that we just sent. Most commands require configuration, which is loaded from all `*.cfg` files in a directory. The default directory is $HOME/.config/rcl/. Here's an example, save to i.e. "$HOME/.config/rcl/rcl.cfg":
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/dncohen/rcl
License: AGPL-3.0
Latest release: about 4 years ago
First release: about 4 years ago
Namespace: github.com/dncohen
Stars: 6 on GitHub
Forks: 2 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: about 2 months ago