{"id":13479017,"url":"https://github.com/paritytech/substrate-connect","last_synced_at":"2025-04-14T06:40:37.097Z","repository":{"id":37043162,"uuid":"279542962","full_name":"paritytech/substrate-connect","owner":"paritytech","description":"Run Wasm Light Clients of any Substrate based chain directly in your browser.","archived":false,"fork":false,"pushed_at":"2025-04-09T08:02:36.000Z","size":82044,"stargazers_count":253,"open_issues_count":31,"forks_count":78,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-09T10:49:03.965Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://paritytech.github.io/substrate-connect/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paritytech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-14T09:35:30.000Z","updated_at":"2025-04-09T10:16:26.000Z","dependencies_parsed_at":"2023-09-28T04:11:35.987Z","dependency_job_id":"b7a05af1-014b-40a4-938b-fd0b44690c67","html_url":"https://github.com/paritytech/substrate-connect","commit_stats":{"total_commits":2191,"total_committers":28,"mean_commits":78.25,"dds":0.7708808763121862,"last_synced_commit":"c1d4da78475f7d7477b4b6c316dfaa576de8cd36"},"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-connect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-connect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-connect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paritytech%2Fsubstrate-connect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paritytech","download_url":"https://codeload.github.com/paritytech/substrate-connect/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837061,"owners_count":21169373,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:02:07.770Z","updated_at":"2025-04-14T06:40:37.069Z","avatar_url":"https://github.com/paritytech.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Libraries","Smart Contract Platforms"],"sub_categories":["Multisig Wallets"],"readme":"\n\u003cbr /\u003e\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n   \u003cimg height=\"150\" style=\"object-fit: contain\" src=\"https://substrate.io/img/substrate_og.png\" alt=\"substrate connect\"\u003e\n  \u003ch4 align=\"center\"\u003e NPM packages that offers an innovative way to interact with \u003ca href=\"https://substrate.dev/\"\u003eSubstrate\u003c/a\u003e-based blockchains directly in your browser.\u003c/h4\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\u003cbr /\u003e\n\n## Table of contents\n\n- [Table of contents](#table-of-contents)\n- [Introduction](#introduction)\n  - [Write Secure and Effective dApps with the Polkadot Network](#write-secure-and-effective-dapps-with-the-polkadot-network)\n  - [Additional Resources](#additional-resources)\n  - [Why Embed a Light Client in Browser Extensions?](#why-embed-a-light-client-in-browser-extensions)\n- [Comprehensive API Documentation](#comprehensive-api-documentation)\n- [Repository Structure](#repository-structure)\n  - [Packages](#packages)\n  - [Showcase Projects](#showcase-projects)\n  - [Examples](#examples)\n- [Development](#development)\n  - [Getting Started](#getting-started)\n  - [Cleanup Commands](#cleanup-commands)\n- [Releasing](#releasing)\n- [Useful Links](#useful-links)\n\n## Introduction\n\nSubstrate Connect provides a groundbreaking method to engage with [Substrate](https://substrate.dev/)-based blockchains directly in your browser, eliminating the need for an RPC server. By utilizing the [smoldot](https://github.com/smol-dot/smoldot) WASM light client, it ensures a secure and efficient connection to the blockchain network without reliance on specific third parties.\n\n### Write Secure and Effective dApps with the Polkadot Network\n\nThe aim of this repository is to offer NPM packages that can be used to:\n\n- **Provide a secure and efficient connection to the Polkadot network** via [`@substrate/connect`](./packages/connect/), leveraging the excellent [Smoldot](https://github.com/smol-dot/smoldot) WASM light client.\n- **Discover browser extensions** that implement [the discovery protocol](./packages/discovery/), including those which expose a light client via [`@substrate/smoldot-discovery`](./packages/smoldot-discovery/). Substrate Connect will automatically leverage these where possible.\n- **Easily enhance a browser extension with a light client** via [`@substrate/light-client-extension-helpers`](./packages/light-client-extension-helpers).\n\nWe also provide example projects using the above packages, including:\n\n- **[Basic light client demo](./projects/demo)**: a demo using `@substrate/connect` to obtain information about chains on the Polkadot network.\n- **[Light client extension demo](./projects/extension/)**: an example of a browser extension that provides a light client.\n- **[Wallet extension demo](./projects/wallet-template/)**: an example of a browser extension that provides a full Polkadot wallet leveraging a light client.\n\n### Additional Resources\n\n- A [step-by-step guide](./projects/wallet-template/STEP-BY-STEP-GUIDE.md) on how to integrate a light client into a browser extension.\n- Details on [the discovery protocol](./packages/discovery/), including how to implement it on the browser or extension side.\n\n### Why Embed a Light Client in Browser Extensions?\n\nEmbedding a light client in browser extensions offers several advantages:\n\n- **Shared Light Client Across Multiple dApps:** By sharing a single light client among various decentralized applications (dApps), the time spent on startup and syncing is reduced. This avoids slowing down individual dApps and enhances overall efficiency.\n- **Overcoming Browser Limitations:** Browser limitations on WebSockets from HTTPS pages make it challenging to establish a robust number of peers, as many nodes must be available with TLS. Substrate Connect addresses this issue through a powerful browser extension, enabling chains to stay synced in the background and significantly improving the performance of your applications. This ensures a more robust connection to the Polkadot ecosystem.\n\n## Comprehensive API Documentation\n\nFor detailed API usage, refer to the [Substrate Connect API documentation](https://paritytech.github.io/substrate-connect).\n\n## Repository Structure\n\n### [Packages](./packages/README.md)\n   The core implementations of `@substrate/connect` and `@substrate/discovery`, and some auxiliary packages.\n   - **[@substrate/discovery](./packages/discovery/)**\n   - **[@substrate/connect](./packages/connect/)**\n   - **[@substrate/connect-known-chains](./packages/connect-known-chains/)**\n   - **[@substrate/connect-discovery](./packages/connect-discovery)** and **[@substrate/smoldot-discovery](./packages/smoldot-discovery/)**\n\n### [Showcase Projects](./projects/)\n\n   Showcase full implementations of `@substrate/connect` and `@substrate/discovery` for a Wallet, Extension or Generic usage.\n\n   - **[Wallet implementation](./projects/wallet-template/)**\n   - **[Extension implementation](./projects/extension/)**\n   - **[Parachain Demo](./projects/demo)**\n\n\n### [Examples](./examples/)\n   dApp and Extensions example implementations of `@substrate/connect` and `@substrate/discovery`.\n\n## Development\n\nThis repository utilizes [pnpm workspaces](https://pnpm.io/workspaces) and `corepack`, ensuring the correct version of `pnpm` is used. For contributions, please review our [contributing guidelines](./CONTRIBUTING.md) to understand our workflow and how to smoothly integrate your contributions to the project.\n\n### Getting Started\n\nFollow these steps to install everything and launch a demo if you're hacking on this repository:\n\n1. **Install Prerequisites** (tested with the following versions):\n   - Node.js (node) v20.9.0\n   - pnpm 9.0.6 (`npm install -g pnpm`)\n   - corepack 0.20.0 (bundled with recent Node.js versions)\n\n2. **Clone the Repository**:\n   - `git clone https://github.com/paritytech/substrate-connect.git`\n   - Navigate to the repository root: `cd substrate-connect`\n\n3. **Install Dependencies**:\n   - `corepack pnpm install`\n\n4. **Run the Extension in Development Mode**:\n   - In terminal A: `cd projects/extension \u0026\u0026 corepack pnpm dev`\n\n5. **Launch the Extension**:\n   - In terminal B: `cd projects/extension \u0026\u0026 corepack pnpm start`\n   - This opens a Chrome browser window with the extension pre-loaded. Ensure\n   the extension is running.\n\n6. **Run the Demo Application**:\n   - In terminal C: `cd projects/demo \u0026\u0026 corepack pnpm dev`\n   - Navigate to the URL logged in the Chrome browser opened in step 5. You should see the extension activate and the demo app log the latest blocks.\n\n### Cleanup Commands\n\nTo clean up all build artifacts in workspaces in the repository:\n```bash\ncorepack pnpm clean\n```\n\nTo clean up all build artifacts and dependencies in workspaces in the repository:\n```bash\ncorepack pnpm deep-clean\n```\n\n## Releasing\n\nFor releasing a new version of the extension, follow the steps outlined in\n[the release doc](./DEPLOY-RELEASE.md).\n\n## Useful Links\n\n- [Substrate Connect Documentation Page](https://substrate.io/developers/substrate-connect/)\n- Download from:\n  - [Chrome Store](https://chrome.google.com/webstore/detail/substrate-connect-extensi/khccbhhbocaaklceanjginbdheafklai)\n  - [Mozilla Addons](https://addons.mozilla.org/en-US/firefox/addon/substrate-connect/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-connect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fparitytech%2Fsubstrate-connect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fparitytech%2Fsubstrate-connect/lists"}