mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Add a browser-utils crate (#4394)
* Squash * Fix keystore on wasm * Update utils/browser/Cargo.toml Co-Authored-By: Benjamin Kampmann <ben@gnunicorn.org> * export console functions * Use an Option<PathBuf> in keystore instead of cfg flags * Add a KeystoreConfig * Update libp2p * Bump kvdb-web version * Fix cli * Upgrade versions * Update wasm-bindgen stuff Co-authored-by: Benjamin Kampmann <ben.kampmann@googlemail.com>
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env sh
|
||||
wasm-pack build --target web --out-dir ./browser-demo/pkg --no-typescript --release ./.. -- --no-default-features --features "browser"
|
||||
python -m SimpleHTTPServer 8000
|
||||
python -m http.server 8000
|
||||
|
||||
@@ -19,7 +19,7 @@ async function start() {
|
||||
|
||||
// Build our client.
|
||||
log('Starting client');
|
||||
let client = start_client(ws());
|
||||
let client = await start_client(ws());
|
||||
log('Client started');
|
||||
|
||||
client.rpcSubscribe('{"method":"chain_subscribeNewHead","params":[],"id":1,"jsonrpc":"2.0"}',
|
||||
@@ -29,7 +29,7 @@ async function start() {
|
||||
client
|
||||
.rpcSend('{"method":"system_networkState","params":[],"id":1,"jsonrpc":"2.0"}')
|
||||
.then((r) => log("Network state: " + r));
|
||||
}, 1000);
|
||||
}, 20000);
|
||||
}
|
||||
|
||||
start();
|
||||
|
||||
Reference in New Issue
Block a user