Tx3SDK is the Swift package for loading Tx3 protocol interfaces and building,
resolving, signing, and submitting transactions. The package currently provides
the shared public contract types on which those capabilities will be built.
The initial release line is 0.15.x. It supports macOS 14 or newer and iOS 18
or newer with Swift 6.1 and Swift Package Manager.
Add the package in Package.swift and depend on the Tx3SDK product:
.package(url: "https://github.com/tx3-lang/swift-sdk.git", from: "0.15.0").target(name: "MyApp", dependencies: [.product(name: "Tx3SDK", package: "swift-sdk")])Then import the public module:
import Tx3SDKLoad a canonical .tii document from a file URL, JSON bytes, a string, or an
already parsed JSONValue:
let protocolValue = try Protocol.fromFile(tiiURL)
let transfer = protocolValue.transactions["transfer"]
for (name, type) in transfer?.parameters ?? [:] {
print("\(name): \(type)")
}Protocol retains the raw TIR envelopes and JSON schemas while exposing the
interpreted recursive ParamType model. Unsupported schema nodes remain
available through ParamType.unknown instead of being guessed or rejected.
Protocol.client() is the single bridge into the dynamic client-builder flow;
facade configuration and transaction lifecycle APIs arrive in later revisions.
Use Xcode 16.4 / Swift 6.1. From the repository root, run:
swift package resolve
swift build --configuration debug
swift format lint --strict --recursive Sources Tests
swift test --filter Tx3SDKTests --parallelThe separately selectable Tx3SDKE2ETests target is reserved for tests that use
a live TRP endpoint; unit tests never require credentials.
Licensed under the Apache License, Version 2.0. See LICENSE.