This is Sample App using TrustWallet SDK. You will understand how to create a new wallet or restore an existing one
This sample is using SPM but you can also use Cocoapods
Download latest Package.swift
from GitHub Releases and put it in a local WalletCore
folder.
Add this line to the dependencies
parameter in your Package.swift
:
.package(name: "WalletCore", path: "../WalletCore"),
Or add remote url + master
branch, it points to recent (not always latest) binary release.
.package(name: "WalletCore", url: "https://github.com/trustwallet/wallet-core", .branchItem("master")),
Then add libraries to target's dependencies
:
.product(name: "WalletCore", package: "WalletCore"),
.product(name: "SwiftProtobuf", package: "WalletCore"),
Add this line to your Podfile and run pod install
:
pod 'TrustWalletCore'
Android releases are hosted on GitHub packages, It needs authentication to download packages, please checkout this guide from GitHub for more details.
We recommend to create a non-expiring and readonly token for accessing GitHub packages, and add it to local.properties
of your Android Studio project locally.
gpr.user=khanh-vo-tiki
gpr.key=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
Generate a token here:
WalletManager is written by wrapping TrustWalletCore SDK to provide a few functions to make wallet management easier
- Create/Import existed wallet
- Export wallet informations
- Using
KeyStore
to storage key in local storage
For comprehensive documentation, see developer.trustwallet.com.