Skip to content

Dart bindings for Trust Wallet Core, used in Flutter and Dart.

License

Notifications You must be signed in to change notification settings

xuelongqy/wallet_core_bindings

Repository files navigation

wallet_core_bindings

Dart bindings for Trust Wallet Core, used in Flutter and Dart.

Features

  • TrustWalletCore include files and Protobuf file bindings.
  • Provides Native and WebAssembly System Interface, supporting all platforms.
  • APIs are repackaged for easier use.
  • Combined with Dart GC, there is no need to control memory.
  • Update the TrustWalletCore version synchronously and keep the APIs consistent.

Generate

We need to extract the files from wallet-core and generate the corresponding Dart code so that Dart can communicate with TrustWalletCore.

C Bindings

Extract header files in include/TrustWalletCore and generate Dart bindings code.

cd wallet_core_bindings_native
dart run ffigen

Protobuf

Refer to the TrustWalletCore build documentation and complete the steps to generate files. Extract proto files in src/proto and use protoc_plugin to compile them into Dart code.

cd ./proto/TrustWalletCore/
protoc --dart_out=../../wallet_core_bindings/lib/proto/ ./*

License

Commercial license

If you want to use wallet_core_bindings in your commercial app, website or plugin, you need to obtain a commercial license from the author. Please contact [email protected] for more information.Once you obtain the license, your authorization information will appear in the AUTHORIZED.md.

Open-source license

GNU AGPLv3