statechannels is a simple off-chain framework for building state channel applications on top of the Ethereum blockchain. It aims to make it simpler to build permissionless applications that have instant finality with zero-fee transactions.
You can learn more about what state channels are by reading one or other of the whitepapers underpinning the project, or a less technical written description.
This repository is a monorepo, and contains the following packages maintained with lerna and yarn workspaces:
- benchmarking : Small application that generates time-taken data for our libraries and applications
- channel-client : A JavaScript object interface for the state channels client API
- docs-websitel : Documentation website
- iframe-channel-provider : Thin wrapper around PostMessage communication between an App and a Wallet
- client-api-schema : JSON-RPC based schema definitions for the Client API with TypeScript typings
- devtools : Developer tooling
- jest-gas-reporter : Reports the gas used by various calls to ethereum contracts
- nitro-protocol : Smart contracts and typescript support
- wallet-core : Core wallet code that works in node-js and browser contexts
- wire-format : Format of messages that are sent over the wire between wallets
- xstate-wallet : A browser wallet implementation
- Create a new issue to report bugs
- Fix an issue. statechannels is an Open Source Project!
Make sure you have Yarn v1.17.3 installed. For easy management of specific Yarn versions, we recommend using Yarn Version Manager (YVM).
To install the dependencies:
yarnfrom the monorepo root.
To build all packages:
yarn buildTo clean all packages:
yarn cleanTo lint all packages:
yarn lint:checkTo also apply automatic fixes:
yarn lint:writeTo run all tests:
yarn testAll of the public packages in this repository are kept in lockstep. Use, e.g.
yarn lerna version minorto increase the version in all of them (this works for the docs website, too), as well as pushing the version update to github.
Use
yarn lerna publish from-gitto publish the packages to npm (you will need to be logged in with npm login, and have your HEAD at the tagged commit -- so it's best to not commit between version and publish).
You may need to manually bump the version of devtools installed at the monorepo root to avoid installation problems.
These should adhere to the TSDoc standard. You can try the TSDoc playground.
Doc comments will appear in our documentation at https://docs.statechannels.org.
State Channels Forums: https://research.statechannels.org/