-
Notifications
You must be signed in to change notification settings - Fork 78
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
chore: update substrate connect readme #1715
Conversation
c4bf4de
to
c499c18
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does, removing all previous documentation without adding new one, helps explaining how to use Substrate connect with either PAPI or polkadotJS?
b26fae2
to
1831e1c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks for your concern @wirednkod |
1831e1c
to
fe66c67
Compare
It's the responsibility of those libraries to explain to their users how to build light-client dApps. In the case of PJS, it probably would make sense to improve this section of their docs.
|
This is what I try to explain offline as well for long. No need to remove docs and alter demos. |
@wirednkod PolkadotAPI or PolkadotJS or any other, may chose to support the latest (or an specific) version for Also, once polkadot-js/api#5776 is merged, a new PolkadotJS example with parachains could be added, for example import { ApiPromise } from "@polkadot/api"
import { ScProvider } from "@polkadot/rpc-provider"
import * as Sc from "@substrate/connect"
import jsonParachainSpec from "./src/assets/asset-hub-westend.json" assert { type: "json" }
const parachainSpec = JSON.stringify(jsonParachainSpec)
const relayProvider = new ScProvider(Sc, Sc.WellKnownChain.westend2)
const provider = new ScProvider(Sc, parachainSpec, relayProvider)
await provider.connect()
const polkadotApi = await ApiPromise.create({ provider })
await polkadotApi.rpc.chain.subscribeNewHeads((lastHeader) => {
console.log(lastHeader.number.toString())
}) |
We are of the opinion that it's not a good idea to document in the README of
Also, it's worth pointing out that in an ideal world the average dApp developer wouldn't know about the existence of this library, since this library should just be an internal implementation detail of a more developer-friend API that abstracts all this complexity away. So, I'm afraid that we see things quite differently. All that being said, we will try our best to explain and document all these things as soon as we have the bandwidth to do so 🙂. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to proceed as you wish. This is not my project nor have any saying on the roadmap.
No description provided.