iOS SDK for SUI
- iOS 13
- Swift
You can use The Swift Package Manager to install SuiSwift
by adding the proper description to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/cosmostation/suiswift.git", .branch("main"))
]
You can use CocoaPods to install SuiSwift
by adding it to your Podfile
:
platform :ios, '13.0'
use_frameworks!
target 'MyApp' do
pod 'SuiSwift'
end
Using api like below.
SuiCLient.shared.{API}
public func generateMnemonic() -> String?
public func getAddress(_ mnemonic: String) -> String
public func sign(_ mnemonic: String, _ txBytes: Data) -> (pubKey: Data, signedData: Data)
public func getObjectsByOwner(_ address: String, _ listener: @escaping (JSON?) -> Void)
public func getTransactions(
_ transactionQuery: [String: String],
_ nextOffset: String? = nil,
_ limit: Int? = nil,
_ descending: Bool = false,
_ listener: @escaping (JSON?) -> Void
)
public func getTransactionDetails(_ digests: [String], _ listener: @escaping (JSON?) -> Void)
public func faucet(_ address: String)
public func transferObject(
_ objectId: String,
_ receiver: String,
_ gasBudget: Int = 100,
_ amount: Int? = nil,
_ listener: @escaping (JSON?) -> Void
)
public func executeTransaction(
_ txBytes: Data,
_ signedBytes: Data,
_ pubKey: Data,
_ listener: @escaping (JSON?) -> Void
)