Skip to content
Snippets Groups Projects
Commit 094dd2c5 authored by Richard T. Carback III's avatar Richard T. Carback III
Browse files

Add integration instructions for users to get it working in their web app

parent 26a8dc70
No related branches found
No related tags found
1 merge request!142RPC Module
......@@ -11,6 +11,50 @@ Examples for how to use this package can be found at:
https://git.xx.network/xx_network/xxdk-examples
## How to use xxDK in your Web Application
To install with npm, run the following:
```
npm i --save xxdk-wasm
```
By default, xxdk uses a CDN hosted by the [xx
foundation](http://xxfoundation.org). If you would like to self-host
the wasm binaries, you can include the following postinstall script in
your package.json file:
```
{
...
"scripts": {
...
"postinstall": "mkdir -p public && cp -r node_modules/xxdk-wasm public/xxdk-wasm"
},
...
}
```
You may also run this command manually after installation to
accomplish the same result.
Then you will need to override the base path with `setXXDKBasePath`
inside your useEffect statement to load the wasm file from your local
public assets:
```
xxdk.setXXDKBasePath(window!.location.href + "xxdk-wasm");
```
See the
[xxdk-examples](https://git.xx.network/xx_network/xxdk-examples) repository for
examples in react and plain html/javascript.
For support, please reach out on [Discord](https://disxord.xx.network) or
[Telegram](https://t.me/xxnetwork). We also monitor
[xx general chat](http://alpha.speakeasy.tech/join?0Name=xxGeneralChat&1Description=Talking+about+the+xx+network&2Level=Public&3Created=1674152234202224215&e=%2FqE8BEgQQkXC6n0yxeXGQjvyklaRH6Z%2BWu8qvbFxiuw%3D&k=RMfN%2B9pD%2FJCzPTIzPk%2Bpf0ThKPvI425hye4JqUxi3iA%3D&l=368&m=0&p=1&s=rb%2BrK0HsOYcPpTF6KkpuDWxh7scZbj74kVMHuwhgUR0%3D&v=1)
on xx network.
## Updates
The current semantic version of this repository is stored in `SEMVER` in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment