CardanoKit by Tokeo: Technical Design and Feedback

CardanoKit Technical Design

We’re pleased to announce a major milestone for CardanoKit – The completion of our comprehensive technical design for Milestone 2. This design lays the foundation for a modern, feature-rich, and secure Cardano library for Swift developers building on Apple platforms.

The new CardanoKit addresses key challenges faced by the original Cardano Swift library, such as outdated support for recent Cardano upgrades, missing advanced features like DRep voting and smart contract execution, and limited third-party provider options.

Our goal is to deliver a library that is up-to-date with the latest Cardano Serialization Library (CSL), supports new protocol features, and is built with modern Swift best practices for maintainability and ease of use.


Architecture Overview

At its core, CardanoKit is structured around a layered architecture:

  • A Rust wrapper interfaces directly with CSL, exposing all essential Cardano primitives and functions.
  • The Swift API layer offers a high-level, developer-friendly interface, leveraging async/await and protocols for clear, modern code.
  • Third-party integration is built in, allowing developers to choose between providers like Blockfrost and Maestro for blockchain queries and transaction submissions.


Features in the Technical Design

CardanoKit’s technical design covers a wide range of features:

  • Wallet management: Instantiating wallets from mnemonics or private keys, deriving multiple addresses, and selecting providers.
  • Transaction building: Sending ADA and native assets, attaching metadata, minting assets, signing transactions, and supporting Plutus smart contract execution.
  • Staking and governance: Registering and de-registering stake keys, delegating to pools, withdrawing rewards, registering DReps, and voting on proposals (CIP-1694).
  • Blockchain queries: Fetching UTxOs, rewards, locked and available balances, and various address types.
  • Error handling: Detailed, categorized errors for clear debugging and robust developer experience.


Security by Design

All transaction signing happens locally on the device, with private keys never exposed to third parties. API keys are securely stored, all network traffic is encrypted, and the library is designed to minimize sensitive data exposure. Developers are encouraged to use iOS Keychain or Secure Enclave for key storage and to follow best practices for privacy and security.

Our implementation plan includes upgrading to the latest CSL, building and testing the Rust wrapper and Swift API, integrating multiple providers, rolling out governance and smart contract features, and providing comprehensive documentation and testing.

This technical design is a significant step toward making Cardano development accessible and powerful for Swift developers. For those interested in the full details, you can review the complete technical design document on our GitHub:
https://github.com/TokeoPay/CardanoKit/blob/main/TechnicalDesign.md


Stay tuned for further updates as we continue to deliver on our roadmap and bring CardanoKit to the Apple developer community!