This is a TypeScript implementation of a Celer client capable of sending and receiving conditional payments via state channels. Compared to a full Celer node, the light client does NOT have the capability of relaying payments.
Auto-generated API docs are available here. The APIs on the client object are listed here.
- Make sure you have MetaMask installed on your browser and you are on the Ropsten testnet.
- Check out the repo.
- Run
yarn install
. - Run
yarn demo
. - A demo page will be available at
localhost:1234
. It is a bare-bone static page that implements a simple off-chain wallet. - Click "Connect Celer wallet" and sign one pop-up message.
- Click "Open channel", sign one pop-up message, sign one transaction, and sign two pop-up messages after the transaction is mined.
Now you are free to send payments to a recipient that has also opened a channel, or you can send to the Celer Community OSP :)
The code is pretty self-explanatory.