Skip to content

About

No description or website provided.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DaaSdk (daa-ios-sdk)

Swift SDK for Circle Digital Asset Accounts (DAA). It runs Circle's passkey ceremony (strong customer authentication, SCA) in an iOS app. It also holds the end customer's Secure Enclave authorization key for the React Native SDK.

The SDK holds no API key and makes no calls to Circle's APIs. Your backend does that, for example with the Node SDK, and passes your app only the short-lived token for one ceremony.

Status: sandbox only. The Owner AuthKey and device-authorization signing are not yet approved for production use.

Documentation

Requirements

Requirement Minimum
Swift 5.9
Xcode 15.3
iOS, to install the SDK 15.0
iOS, for passkey enrollment and approval 17.4

Circle accepts only https callback URLs, and ASWebAuthenticationSession supports them from iOS 17.4. On earlier versions, DaaScaConfiguration throws httpsCallbackUnavailable.

Install

SwiftPM

.package(url: "https://github.com/circlefin/daa-ios-sdk.git", exact: "0.9.0")

CocoaPods (git spec source)

DaaSdk is not on the CocoaPods trunk. This repository is its spec source. Add it to your Podfile above the CDN:

source 'https://github.com/circlefin/daa-ios-sdk.git'
source 'https://cdn.cocoapods.org/'

pod 'DaaSdk', '0.9.0'

Each release is tagged v<version>. Before 1.0.0, a minor version can break the API, so pin an exact version. If you also use the React Native SDK, use the version it pins.

Quick start

Set up the callback first. The iOS SDK reference has the details:

  1. Choose an https callback URL on a domain you control, for example https://app.example.com/sca/callback. Circle registers only https callback URLs.
  2. Register the exact URL with Circle for each environment.
  3. Add a webcredentials: Associated Domain for the host (not applinks:), and serve the matching apple-app-site-association file.

Then create one DaaSca and run a ceremony with the frame token from your backend:

import DaaSdk

// iOS 17.4 or later. Earlier versions throw httpsCallbackUnavailable.
let sca = DaaSca(configuration: try DaaScaConfiguration(
    environment: .sandbox,
    redirectURI: "https://app.example.com/sca/callback"
))

let assertion = try await sca.approve(frameToken: frameToken)
// Send the assertion to your backend exactly as returned.

enroll(frameToken:) registers a passkey the same way. For errors, availability checks, and the backend steps, see the iOS SDK reference and the SCA how-to, which also has the security checklist.

What's in the package

  • DaaSca: presents Circle's hosted ceremony in an ephemeral ASWebAuthenticationSession and returns its result unchanged. It holds no key material and signs nothing.
  • DaaSecureKey: the installation-scoped Secure Enclave P-256 AuthKey, with signing only through validated device-authorization inputs. There is no general sign(bytes).
  • DaaRegistrationFlowKey, DaaSecureRandom: sign-in primitives that the React Native SDK uses.

Conformance/AuthKeyWireV1.json is the cross-SDK AuthKey wire fixture. The iOS and Android SDKs are tested against the same bytes.

Contributing

swift build
swift test
swiftlint lint --strict

See CONTRIBUTING.md. To report a security vulnerability, see SECURITY.md.

License

Apache License 2.0

About

No description or website provided.

Topics

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages