Skip to content

Latest commit

 

History

History
66 lines (41 loc) · 1.69 KB

README.md

File metadata and controls

66 lines (41 loc) · 1.69 KB

TronKit.Swift

TronKit.Swift is a native(Swift) toolkit for TRON network. It's implemented and used by Unstoppable Wallet, a multi-currency crypto wallet.

Core Features

  • 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

Usage

Initialization

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
)

Starting and Stopping

TronKit.Kit instance requires to be started with start command. This start the process of synchronization with the blockchain state.

TronKit.start()
TronKit.stop()

Installation

Swift Package Manager

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"))
]

Prerequisites

  • Xcode 10.0+
  • Swift 5.5+
  • iOS 13+

Example Project

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.

License

The TronKit.Swift toolkit is open source and available under the terms of the MIT License.