Skip to main content
The UCW class enables you to receive and approve TSS requests and transactions. Additionally, it allows you to export key shares for backing up or restoring the private keys.
The UCW class inherits from the UCWPublic class.
public init(config: SDKConfig, secretsFile: String, passphrase: String, connCallback: @escaping(ConnCode, String?) -> Void = { _, _ in }) throws
let secrets = "secrets.db"
let passphrase = "d3hxNyoiAP@Lm!D7Qpo_hghdpgyc_r39"
let sdkConfig = SDKConfig(env: Env.development, timeout: 30, debug: true)
var sdkInstance: UCW?
var connCode: ConnCode = .unknown
var connMessage: String? = ""

do {
    sdkInstance = try UCW(config: sdkConfig, secretsFile: secrets, passphrase: passphrase) { code, message in
        connCode = code
        connMessage = message
        print("Connection Code: \(connCode), Message: \(connMessage ?? "No message")")
    }
} catch {
    print("Error: \(error)")
}

Parameters

config
object
The configuration settings for the UCW SDK.
secretsFile
string
The complete file name, including its extension, for the Secrets file that needs decryption.
passphrase
string
The passphrase for decrypting the Secrets file.
connCallback
function
An optional callback function to monitor connection status.