This is a sample html for demonstration purpose only, do not use it with real addresses, real transactions, or real funds. Use it at your own risk.
- Everything you need to build the wallet core: https://developer.trustwallet.com/wallet-core/developing-the-library/building
- Install emsdk
-
- python3
-
- cmake
-
- run
tools/install-dependencies
if you just cloned this repo
- run
-
- run
tools/install-wasm-dependencies
- run
- node.js
- run
tools/generate-files
- run
tools/wasm-build
- cd
wasm
-
- run
npm install
- run
-
- run
npm run codegen:js-browser
- run
-
- run
npm run copy:wasm-sample
- run
- cd
samples/wasm
- run
python3 -m http.server 8000
- open web browser and navigate to
http://127.0.0.1:8000
This sample also demonstrates how to use protobuf.js models in html directly, core_proto.js
is built by command defined in wasm/package.json
npm run codegen:js-browser
For modern javaScript sample, please check out: