Files
ark/pkg/client-sdk/example/covenantless/wasm/README.md
Pietralberto Mazza 26bcbc8163 [SDK] Fix rest client and wasm (#341)
* Fixes

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>

* Fixes to rest client

* Fixes to wasm

---------

Co-authored-by: João Bordalo <bordalix@users.noreply.github.com>
2024-10-01 19:00:25 +02:00

588 B

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