SwiftCardanoCore

main

Swift implementation of Cardano Data Types
Kingpin-Apps/swift-cardano-core

GitHub Workflow Status

SwiftCardanoCore - Swift implementation of Cardano Data Types

SwiftCardanoCore is a Swift implementation of Cardano Data Types with CBOR (and JSON) serialization.

Usage

To add SwiftCardanoCore as dependency to your Xcode project, select File > Swift Packages > Add Package Dependency, enter its repository URL: https://github.com/Kingpin-Apps/swift-cardano-core.git and import SwiftCardanoCore.

Then, to use it in your source code, add:

import SwiftCardanoCore

let paymentSKey = try PaymentSigningKey.generate()
paymentSKey.save(to: "payment.skey")

let paymentVKey: PaymentVerificationKey = try PaymentVerificationKey.fromSigningKey(sk)
paymentVKey.save(to: "payment.vkey")

let stakeSKey = try StakeSigningKey.generate()
stakeSKey.save(to: "stake.skey")

let stakeVKey: StakeVerificationKey = try StakeVerificationKey.fromSigningKey(sk)
stakeVKey.save(to: "stake.vkey")

let address = try Address(paymentPart: .verificationKeyHash(try paymentVKey.hash()), stakePart: .verificationKeyHash(try stakeVKey.hash()), network: .testnet)
address.save(to: "address.addr")

Data Types

  • Addresses
  • Certificate
  • Config Files
  • Governance
  • Keys
  • Metadata
  • Native Scripts
  • Parameters
  • Plutus
  • Stake Pools
  • Transactions
  • Credentials
  • Hashing
  • Network
  • Signatures
  • And more...

Description

  • Swift Tools 6.0.0
View More Packages from this Author

Dependencies

Last updated: Thu May 15 2025 17:31:15 GMT-0900 (Hawaii-Aleutian Daylight Time)