Update readme for magic-wormhole

This commit is contained in:
Jay Graber 2017-08-02 17:18:35 -07:00
parent 3a61adb157
commit 4ee91cc0f5
1 changed files with 16 additions and 6 deletions

View File

@ -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 <hexstring> testtrade`
`xcat importttrade testtrade <hexstring>`
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.