bootstrap.sh
).origin
.upstream
.upstream/master
.clang-format
if you are unsure.origin
.master
branch.upstream
to your local repo and deletedocs
folder contains documentation.src
folder contains the C++ implementation of the core functionality.include
folder contains the public C header files used to expose a cross-platform interface.codegen
folder contains the code and templates used to generate code for different platforms and languages.jni
folder contains the generated JNI interface and Java classes.android
folder contains the Android Studio project and integration tests.swift
folder contains the generated Swift code and Xcode project.trezor-crypto
folder contains a fork of https://github.com/trezor/trezor-crypto/ with modifications.tests
folder contains unit tests.tools
folder contains scripts to automate common tasks.samples
folder contains sample applications.bootstrap.sh
run make -C build tests && build/tests/tests tests
to run all the C++ unit tests. To run integration tests on each platform run the respective script in the tools folder:tools/android-test
or import android
folder to Android Studiotools/ios-test
or cd swift
folder and open TrustWalletCore.xcworkspace
tools/tests
script.include/TrustWalletCode
folder and start with the TW
prefix followed by the class or sturct name. Inside each header file there needs to be exactly one class or struct defition.TW_EXPORT_CLASS
macro followed by a forward-declared struct. For example:TW_EXPORT_STRUCT
macro followed by an inline-declared struct. For example:TW_EXPORT_ENUM()
macro:TW_EXPORT_STATIC_METHOD
, TW_EXPORT_STATIC_PROPERTY
, TW_EXPORT_METHOD
, and TW_EXPORT_PROPERTY
respectively. Each method or property name needs to start with the type name. For instance TWPublicKeyIsValid
gets translated to the isValid
property in the PublicKey
type.bool
, int
, size_t
, uint8_t
, uint16_t
, uint32_t
, uint64_t
, TWData
, TWString
, and any defined classses, structs or enums.registry.json
, the generated code will be located at src/Generated/Coins.cpp
. See the documentation of the fields here: https://github.com/trustwallet/wallet-core/blob/master/docs/registry-fields.md.src/proto
folder. These models can then be used in the C interface by using the proto model name with underscores. For instance TW_Binance_Proto_SigningInput
.tools/generate-files
script when you modify the src/TrustWalletCore.proto
file.clang-format
to ensure a consistent code sytle. Do not reformat files that you didn't modify, or the header files in the include
folder. You can install a clang-format extension for your IDE.