Server-Side

If your server application (most likely on Linux) language supports FFIarrow-up-right to C, it is possible to call wallet core.

Go

Here is a step by step example using cgoarrow-up-right, with the Wallet Core docker image.

  1. Run docker run -it trustwallet/wallet-core The library is already built in this image (Build instructions here). Note: may not be the most recent version.

  2. Install Go: apt-get update && apt-get install golang-go

  3. A complete Go sample application is available at samples/goarrow-up-right in the repository. It uses a tw/core wrapper package over the CGo bindings. Build and run it:

cd samples/go && go build -o main && ./main
  1. You might want to copy and run main outside of the docker container; make sure you have libstdc++6 and libc++abi1 installed on your host Ubuntu.

Node.js

  1. Install the package from NPM:

npm install @trustwallet/wallet-core
  1. A TypeScript sample application is available at samples/nodearrow-up-right in the repository. Check wasm/testsarrow-up-right for further API usage examples.

Last updated

Was this helpful?