TronKit.Swift
is a native(Swift) toolkit for TRON network. It's implemented and used by Unstoppable Wallet, a multi-currency crypto wallet.
- Local storage of account data (TRX, TRC-10, TRC-20 balances and transactions)
- Synchronization over HTTP/WebSocket
- Watch accounts. Restore with any address
- Can be extended to natively support any smart contract
First you need to initialize an TronKit.Kit
instance
import TronKit
let address = try Address(hex: "0x...")
let TronKit = try Kit.instance(
address: address,
walletId: "unique_wallet_id",
minLogLevel: .error
)
TronKit.Kit
instance requires to be started with start
command. This start the process of synchronization with the blockchain state.
TronKit.start()
TronKit.stop()
Swift Package Manager is a dependency manager for Swift projects. You can install it with the following command:
dependencies: [
.package(url: "https://github.com/horizontalsystems/TronKit.Swift.git", .upToNextMajor(from: "1.0.0"))
]
- Xcode 10.0+
- Swift 5.5+
- iOS 13+
All features of the library are used in example project located in iOS Example
folder. It can be referred as a starting point for usage of the library.
The TronKit.Swift
toolkit is open source and available under the terms of the MIT License.