1.6.2 • Published 17 days ago

@nimiq/core-web v1.6.2

Weekly downloads
513
License
Apache-2.0
Repository
github
Last release
17 days ago

Nimiq web client

This client is a very light client that only includes the necessary dependencies and constructs to compile a client to WebAssembly and to run it in a web browser. This is a web-client intended to be used in web browsers only (no WASI support). Although it can be built for other targets, it will panic if it is executed outside a web browser.

Building the example

To build the client, the recommended way is to use wasm-pack. This tool can be obtained using:

cargo install wasm-pack

or via their website. Once installed, the client can be built from this directory:

wasm-pack build --target web --weak-refs

Note The --weak-refs flag is available since wasm-pack v0.11.0. For older versions prefix the command with WASM_BINDGEN_WEAKREF=1 instead. Check your installed version with wasm-pack --version.

The above command will compile the Rust code to WebAssembly and generate the corresponding JS bindings required to run the client in a web browser.

After the client has been built, this directory can be served with a web server (e.g. python3 -m http.server) and then the index.html file can be loaded from e.g. http://localhost:8000.

Publishing to NPM

Warning You must be using wasm-pack version >= 0.11.0.

To publish this package to NPM, run this command:

wasm-pack build --release --weak-refs --scope nimiq --out-dir dist && \
sed -i 's/@nimiq\/nimiq-web-client/@nimiq\/core-web/g' dist/package.json && \
cd dist && \
npm publish --tag next && \
cd ..
2.0.0-alpha.20.5

17 days ago

2.0.0-alpha.21.0

17 days ago

2.0.0-alpha.20.4

19 days ago

2.0.0-alpha.20.3

2 months ago

2.0.0-alpha.20.1

2 months ago

2.0.0-alpha.20.2

2 months ago

2.0.0-alpha.20

3 months ago

2.0.0-alpha.19

3 months ago

2.0.0-alpha.18

5 months ago

1.6.2

8 months ago

2.0.0-alpha.11

10 months ago

2.0.0-alpha.17

6 months ago

2.0.0-alpha.16

6 months ago

2.0.0-alpha.15

8 months ago

2.0.0-alpha.14

8 months ago

2.0.0-alpha.13

9 months ago

2.0.0-alpha.12

10 months ago

2.0.0-alpha.14.1

8 months ago

2.0.0-alpha.10

1 year ago

1.6.1

1 year ago

2.0.0-alpha.7

1 year ago

2.0.0-alpha.8

1 year ago

2.0.0-alpha.9

1 year ago

2.0.0-alpha.3

1 year ago

2.0.0-alpha.4

1 year ago

2.0.0-alpha.5

1 year ago

2.0.0-alpha.6

1 year ago

2.0.0-alpha.0

1 year ago

2.0.0-alpha.1

1 year ago

2.0.0-alpha.2

1 year ago

2.0.0-beta.1

1 year ago

2.0.0-beta.0

1 year ago

2.0.0-alpha.1.1

1 year ago

1.6.0

2 years ago

1.5.8

3 years ago

1.5.7

4 years ago

1.5.6

4 years ago

1.5.5

4 years ago

1.5.4

4 years ago

1.5.3

5 years ago

1.5.1

5 years ago

1.5.0

5 years ago

1.4.3

5 years ago

1.4.2

5 years ago

1.4.1

5 years ago

1.4.0

5 years ago