Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shawntabrizi/polkadot-js-bundle
A standalone JS bundle that contains Polkadot{JS} libraries
https://github.com/shawntabrizi/polkadot-js-bundle
Last synced: about 1 month ago
JSON representation
A standalone JS bundle that contains Polkadot{JS} libraries
- Host: GitHub
- URL: https://github.com/shawntabrizi/polkadot-js-bundle
- Owner: shawntabrizi
- License: apache-2.0
- Created: 2020-05-26T20:12:06.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-10-25T17:34:18.000Z (about 2 years ago)
- Last Synced: 2024-10-29T22:25:03.583Z (about 1 month ago)
- Language: HTML
- Size: 6.99 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-substrate - `polkadot-js-bundle` - A standalone JS bundle that contains Polkadot{JS} libraries. (Tools)
- awesome-substrate - `polkadot-js-bundle` - A standalone JS bundle that contains Polkadot{JS} libraries. (Tools)
README
# polkadot-js-bundle
This project was used to create JS bundles for the [Polkadot JS APIs](https://github.com/polkadot-js/).
Polkadot{JS} [now supports official JS bundles](https://polkadot.js.org/docs/usage/FAQ/#i-would-like-to-use-browser-bundles-bypassing-the-compile-step), so this project is mostly deprecated.
This page just serves to show how you can use them.
Include the official Polkadot JS Bundles like so:
```js
```
Note that some bundles may require you to include other bundles. For example, to use `bundle-polkadot-api.js` you must include the other 3 bundles as well.
To access to the bundle within a JavaScript file, just do the following:
```js
// Just some random examples...
const { stringToHex, hexToString } = polkadotUtil;
const { blake2AsHex, xxhashAsHex } = polkadotUtilCrypto;
const { TypeRegistry, createType } = polkadotTypes;
const { WsProvider, ApiPromise } = polkadotApi;
const { Keyring } = polkadotKeyring;
```See the [test page](https://shawntabrizi.github.io/polkadot-js-bundle) as a sanity check that things are working.