From 4ee91cc0f59e3d3db39a09198518ae51140c62bd Mon Sep 17 00:00:00 2001 From: Jay Graber Date: Wed, 2 Aug 2017 17:18:35 -0700 Subject: [PATCH] Update readme for magic-wormhole --- README.md | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9609f65..018ce43 100644 --- a/README.md +++ b/README.md @@ -42,29 +42,39 @@ rpcuser=user rpcpassword=password ``` -## Walking through a new trade +## Example trade You can try this on regtest on one computer, or on testnet across two computers. Since this is beta software that is still under active development, we recommend that you do not trade more than you can afford to lose on mainnet. +We use the term "seller" for whoever initiates the trade, and "buyer" for whoever fulfills the other end. + ### Seller: -To initiate a new trade, seller creates a trade and names it. +To initiate a new trade, the seller enters all the necessary trade data and saves it under a tradeid. We will use the tradeid "testtrade" for this example. The amounts being traded will have to be agreed upon in advance, and the seller will need the buyer's destination addresses on both chains. `xcat newtrade testtrade` -After creating, they are prompted to export it as hex, to transfer info to the buyer. +After creating, the seller exports the trade data encoded as a hex string to transfer the terms of the trade to the buyer. They can send this hex string to the buyer through email or any other channel, but there is also built-in support to transfer the data directly between two computers through [magic-wormhole](https://github.com/warner/magic-wormhole). + +A standard export. Returns a long hex string which the seller sends to the buyer. `xcat exporttrade testtrade` -Copy the resulting hex string and send it to the buyer. +An export using magic-wormhole, which uses a short passphrase the seller must communicate to the buyer. + +`xcat -w exporttrade testtrade` ### Buyer: -To examine trade, buyer imports it. +To examine trade, buyer imports it. A standard import requires the full hex string. -`xcat importttrade testtrade` +`xcat importttrade testtrade ` + +An import using magic-wormhole, which prompts the user for the short passphrase generated by the seller. + +`xcat -w importtrade` If it looks ok, inform seller to proceed.