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:
Ashley
2020-01-07 16:30:04 +01:00
committed by GitHub
parent d76a33033d
commit bb44f8fc24
13 changed files with 432 additions and 254 deletions
+1 -1
View File
@@ -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();