Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add remark on dependency providers
  • Loading branch information
bernardoaraujor committed Jun 15, 2022
commit 8c5c6919b768009c31284cb7bf164c9a957090a3
1 change: 1 addition & 0 deletions content/md/en/docs/tutorials/light-clients/parachains.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,4 @@ That should open a browser on `http://localhost:3001/`. Open the JavaScript cons

From here onwards, the usage is very similar to what would have been usually done via PolkadotJS. All you have to do is follow the [official documentation](https://polkadot.js.org/docs/) and interact with the chain.

One important detail is that we used `@polkadot/rpc-provider/substrate-connect` as our dependency, and that is fine for a fast and easy integration into a simple webapp. However, more advanced implementations (e.g.: library authors) should install and use `@substrate-connect` instead.
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ That should open a browser on `http://localhost:3001/`. Open the JavaScript cons
Tip: different browsers running on different Operating Systems will have different shortcuts to display the JavaScript console. [Here](https://webmasters.stackexchange.com/a/77337) is a convenient cheat sheet.

To recap what we achieved so far: we fetched block hashes without using any URL for a RPC node, which is arguably a centralised entry point to the network. And we could have done much more, not only block hashes! The point here is that after `WsProvider` is replaced with `ScProvider`, the code can be written as if it was any other app based on PolkadotJS. From here onwards, you can just follow [PolkadotJS docs](https://polkadot.js.org/docs/) and do much more.

One important detail is that we used `@polkadot/rpc-provider/substrate-connect` as our dependency, and that is fine for a fast and easy integration into a simple webapp. However, more advanced implementations (e.g.: library authors) should install and use `@substrate-connect` instead.