Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Polkadot JS API support with latest @substrate/connect version #2386

Open
rossbulat opened this issue Jul 30, 2024 · 2 comments
Open
Assignees
Labels
documentation Improvements or additions to documentation @substrate/connect

Comments

@rossbulat
Copy link

rossbulat commented Jul 30, 2024

Is your feature request related to a problem? Please describe.

Using Polkadot JS API is no longer documented in the NPM docs or readme of the @substrate/connect package. This is throwing devs off & consuming time to find fixes. Substate.io is also hosting stale documentation with incorrect examples.

Describe the solution you'd like

Request 1: Add an example to @substrate/connect on connecting to a well known chain.

import { ScProvider } from '@polkadot/rpc-provider/substrate-connect';
import * as Sc from '@substrate/connect';

const provider = new ScProvider(Sc, Sc.WellKnownChain.polkadot);
await provider.connect();

Request 2: Add an addChain example for ScProvider - how do we connect to a system or parachain - just instantiate more ScProviders?

Request 3: Update https://docs.substrate.io/learn/light-clients-in-substrate-connect/ to the latest API - the imports and code examples are currently inconsistent with the latest versions of @substrate/connect and @polkadot/rpc-provider. This doc was last updated in October 2023 - needs to be updated.

Describe alternatives you've considered

Outdated docs and lack of examples.

Additional context

No response

@rossbulat rossbulat added documentation Improvements or additions to documentation @substrate/connect labels Jul 30, 2024
@ryanleecode ryanleecode self-assigned this Aug 1, 2024
@ryanleecode
Copy link
Collaborator

Makes sense. Will get this done

@ryanleecode
Copy link
Collaborator

request 1 & 2 are merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation @substrate/connect
Projects
None yet
Development

No branches or pull requests

2 participants