Substrate connect provides a way to interact with substrate based blockchains in the browser without using an RPC server. Substrate connect uses a smoldot WASM light client to securely connect to the blockchain network without relying on specific 3rd parties.
Due to browser limitations on websockets from https pages, establishing a good number of peers is difficult as many nodes need to be available with TLS. Substrate connect provides a browser extension to overcome this limitation and to keep the chains synced in the background, which makes your apps faster.
When building an app with substrate connect, it will detect whether the user has the extension and use it, or create the WASM light client in-page for them.
Substrate connect builds on Polkadot JS so building an app is the same experience as with using a traditional RPC server node.
The substrate connect API documentation is published here.
The most up-to-date usage instructions for app builders can be found here
This repository is using yarn classic workspaces.
We are tracking our work and milestones in a github project.
Please see our contributing guidelines for details on how we like to work and how to smoothly contribute to the project.
- Clone the whole
substrate-connect
repository.
git clone https://github.com/paritytech/substrate-connect.git
- Install all dependencies
yarn install
- Compile all packages and projects
yarn build
To clean up all build artefacts in workspaces in the repository, run:
yarn clean
To clean up all build artefacts and dependencies in workspaces in the repository, run:
yarn deep-clean
Running the following command will build all necessary dependencies and run the Smoldot Extension in development mode with hot reloading enabled. Once run a new (Chrome) browser will appear with the extension added.
yarn dev:extension
(Make sure to run $ yarn install
before.)
Running the following command will build all necessary dependencies and run the Substrate Burnr Wallet in development mode with hot reloading enabled. It will be served on http://localhost:1234/
yarn dev:burnr
(Make sure to run $ yarn install
before.)