Skip to content

connext/statechannels

 
 


State Channels

Simple off-chain applications framework for Ethereum.

circleci license


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.

Packages

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

Contributing

Installing dependencies

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:

yarn

from the monorepo root.

Building packages

To build all packages:

yarn build

Clean

To clean all packages:

yarn clean

Lint

To lint all packages:

yarn lint:check

To also apply automatic fixes:

yarn lint:write

Tests

To run all tests:

yarn test

Publishing packages

All of the public packages in this repository are kept in lockstep. Use, e.g.

yarn lerna version minor

to 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-git

to 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.

Typescript doc comments

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.

Community

State Channels Forums: https://research.statechannels.org/

About

Development monorepo for the State Channels project.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • TypeScript 82.8%
  • Solidity 8.5%
  • JavaScript 7.5%
  • Python 0.4%
  • Shell 0.3%
  • HTML 0.2%
  • Other 0.3%