GithubHelp home page GithubHelp logo

ex1st0r / swap.react Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swaponline/multicurrencywallet

0.0 2.0 0.0 12.23 MB

In-browser atomic swap exchange based on swap.core library. It is an implementation of Swap DEP crosschain protocol. Hosted at https://swap.online

Home Page: https://swap.online

License: MIT License

JavaScript 86.97% HTML 0.31% CSS 12.72%

swap.react's Introduction

swap.online

Atomic swap cryptocurrency protocol. Live version here: https://swap.online. Atomic swap library at http://github.com/swaponline/swap.core.

Swap React

Install

link on install

  1. Clone swap.core to same directory where swap.react is
swap.core/...
swap.react/...
  1. Do npm i
cd swap.react
npm i
  1. For dev mode npm run start, for prod npm run build
npm run start

how it works?

BTC -> ETH

Alice wants to sell BTC and buy ETH, Bob instead wants to sell ETH and buy BTC.

  1. Alice creates order for 1 BTC -> 10 ETH
  2. Bob pushes a 'Buy' button in the orders list and is redirected to /swaps/eth-btc/:id page.
  3. Alice is notified about Bob and is redirected to /swaps/btc-eth/:id page.
  4. Alice is asked to create a 'Secret Key'.
  5. The system automatically generates the 'Secret Hash', shows it to Alice and sends to Bob.
  6. The system automatically calls the ETH Swap contract method to create a swap.
  7. The system asks Bob to sign the transaction (Bob fund the ETH Swap contract here).
  8. The system automatically creates a BTC Swap script.
  9. Alice is notified that Bob fund the ETH Swap contract. The system asks Alice to fund the script (Alice fund the script here).
  10. Bob is notified that Alice fund the script.
  11. The system automatically sends the ETH Swap contract address to Alice and the script to Bob.
  12. Alice signs a call to the ETH Swap contract to withdraw ETH.
  13. Bob is notified that Alice did withdraw. Bob signs a call to the ETH Swap contract to receive the secret.
  14. Bob signs the BTC script method to withdraw 1 BTC.

swap.react's People

Contributors

0xzick avatar pavelivanov avatar general-beck avatar caffeinum avatar indapublic avatar spoki4 avatar noxonsu avatar meati avatar 7flash avatar dimalitvinov avatar ivan-khludov avatar fsanano avatar qmir avatar nthgness avatar sibedgeswap avatar chromebookman avatar nevermind2121 avatar ex1st0r avatar lordofinterface avatar momonomonoto avatar trubnikovr avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.