Files
ark/pkg/client-sdk/example/covenantless/wasm
Pietralberto Mazza 7f937e8418 Vars and fields renaming (#387)
* Rename asp > server

* Rename pool > round

* Consolidate naming for pubkey/prvkey vars and types

* Fix

* Fix

* Fix wasm

* Rename congestionTree > vtxoTree

* Fix wasm

* Rename payment > request

* Rename congestionTree > vtxoTree after syncing with master

* Fix Send API in SDK

* Fix wasm

* Fix wasm

* Fixes

* Fixes after review

* Fix

* Fix naming

* Fix

* Fix e2e tests
2024-11-26 15:57:16 +01:00
..
2024-11-26 15:57:16 +01:00

USAGE

This example demonstrates how to compile ARK Go SDK to WebAssembly and use it in a web page.

  1. Copy wasm_exec.js to a new directory:

    cp $(go env GOROOT)/misc/wasm/wasm_exec.js .
    
  2. On the root directory of this repo, build the Go code to WebAssembly:

    make build-wasm
    
  3. Move the wasm file to your directory

    mv <repo>/pkg/client-sdk/build/ark-sdk.wasm .
    
    
  4. Load the WebAssembly module in a web page, check index.html.

  5. Serve the files:

    python3 -m http.server 8000