Skip to content

CoboGlobal/cobo-ucw-sdk-ios

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Cobo UCW SDK iOS

The Cobo UCW SDK provided by Cobo that allows your Client App to interact with the Cobo Server. A user-facing Client App you build that utilizes the UCW SDK is for Cobo MPC Wallets (User-Controlled Wallets). For a high-level overview of what User-Controlled Wallets are, see Introduction to User-Controlled Wallets.

Installation

The Swift Package Manager (SwiftPM) is a tool for managing the distribution of Swift code. It’s integrated with the Swift build system to automate the process of downloading, compiling, and linking dependencies.

You can create a Swift package or Xcode project and import UCW SDK as a dependency.

Swift package

Once you have your Swift package set up, adding UCW SDK to the dependencies value of your Package.swift.

dependencies: [
        .package(url: "https://github.com/CoboGlobal/cobo-ucw-sdk-ios")
    ]

And in the target:

targets: [
    .target(
        name: "<project_name>",
        dependencies: ["UCWSDK"])
]

Xcode project

Once you have your project set up in Xcode, select File > Add Package Dependency and enter its repository URL https://github.com/CoboGlobal/cobo-ucw-sdk-ios.

For more information, please refer here.

Usage

In source file where you want to use UCW SDK add:

import UCWSDK

Use the UCW SDK to initialize a secrets and return a new TSS Node ID.

let secrets = "secrets.db"
let passphrase = "uKm7@_NQ4xiQn7UbU-!JXaMdJa*BgNJj"

Task {
    do {
        let nodeID = try await initializeSecrets(secretsFile: secrets, passphrase: passphrase)
        print(" TSS Node ID: \(nodeID)")
    } catch {
        print("Error: \(error)")
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages