1 #!/bin/sh
2 # Build the wallet for the browser with TinyGo.
3 #
4 # This is the deployment build: the page loads this wasm, so it must compile with TinyGo and not
5 # merely with Go. The channel worker is built from the nostrino repo.
6 #
7 # GO=/path/to/go1.24.6 ./scripts/build-wasm.sh
8 #
9 set -eu
10 11 export GOROOT=${GOROOT:-/home/mleku/sdk/go1.24.6}
12 export PATH=$GOROOT/bin:$PATH
13 14 tinygo build -target wasm -o bin/web/tinywallet.wasm ./cmd/tinywallet-wasm
15 16 echo "tinygo test: transaction and script packages"
17 tinygo test -target wasm ./pkg/tx ./pkg/script
18