If your server application (most likely on Linux) language supports FFI to C, it is possible to call wallet core.
Here is a step by step example using cgo, with the Wallet Core docker image.
-
Run
docker run -it trustwallet/wallet-coreThe library is already built in this image (Build instructions here). Note: may not be the most recent version. -
Install Go:
apt-get update && apt-get install golang-go -
A complete Go sample application is available at
samples/goin the repository. It uses atw/corewrapper package over the CGo bindings. Build and run it:
cd samples/go && go build -o main && ./main- You might want to copy and run
mainoutside of the docker container; make sure you havelibstdc++6andlibc++abi1installed on your host Ubuntu.
- Install the package from NPM:
npm install @trustwallet/wallet-core- A TypeScript sample application is available at
samples/nodein the repository. Check wasm/tests for further API usage examples.