Skip to content

Commit

Permalink
Link to dotapps instead of polkadot.js (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaka authored Apr 26, 2023
1 parent 75ca0e6 commit 163e0a1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Where "crash" includes: Rust panics, JavaScript exceptions (except for the ones

In order to run the wasm light node, you must have installed [rustup](https://rustup.rs/).

The wasm light node can be tested with `cd wasm-node/javascript` and `npm install; npm start`. This will compile the smoldot wasm light node and start a WebSocket server capable of answering JSON-RPC requests. This demo will print a list of URLs that you can navigate to in order to connect to a certain chain. For example you can navigate to <https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944%2Fwestend2> in order to interact with the Westend chain.
The wasm light node can be tested with `cd wasm-node/javascript` and `npm install; npm start`. This will compile the smoldot wasm light node and start a WebSocket server capable of answering JSON-RPC requests. This demo will print a list of URLs that you can navigate to in order to connect to a certain chain. For example you can navigate to <https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=ws%3A%2F%2F127.0.0.1%3A9944%2Fwestend2> in order to interact with the Westend chain.

> Note: The `npm start` command starts a small JavaScript shim, on top of the wasm light node, that hard codes the chain to Westend and starts the WebSocket server. The wasm light node itself can connect to a variety of different chains (not only Westend) and doesn't start any server.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/json_rpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
//! applications are connected to the node using the JSON-RPC protocol.
//!
//! > **Note**: An example application that can be put on top of a node is
//! > [PolkadotJS](https://polkadot.js.org/).
//! > [PolkadotJS Apps](https://cloudflare-ipfs.com/ipns/dotapps.io/).
//!
//! Contrary to the traffic with the blockchain network, the communication between the JSON-RPC
//! client (i.e. the application) and the JSON-RPC server (i.e. the node) is not trustless. In
Expand Down
2 changes: 1 addition & 1 deletion wasm-node/javascript/demo/demo-deno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ client.addChain({ chainSpec, disableJsonRpc: true });

// Now spawn a WebSocket server in order to handle JSON-RPC clients.
console.log('JSON-RPC server now listening on port 9944');
console.log('Please visit: https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944');
console.log('Please visit: https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=ws%3A%2F%2F127.0.0.1%3A9944');

const conn = Deno.listen({ port: 9944 });
const httpConn = Deno.serveHttp(await conn.accept());
Expand Down
2 changes: 1 addition & 1 deletion wasm-node/javascript/demo/demo.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ let wsServer = new WebSocketServer({
console.log('JSON-RPC server now listening on port 9944');
console.log('Please visit one of:');
for (const chainId in chainSpecsById) {
console.log('- ' + chainId + ': https://polkadot.js.org/apps/?rpc=ws%3A%2F%2F127.0.0.1%3A9944%2F' + chainId);
console.log('- ' + chainId + ': https://cloudflare-ipfs.com/ipns/dotapps.io/?rpc=ws%3A%2F%2F127.0.0.1%3A9944%2F' + chainId);
}
console.log('');

Expand Down

0 comments on commit 163e0a1

Please sign in to comment.