Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 1.68 KB

README.md

File metadata and controls

50 lines (31 loc) · 1.68 KB

DIDCore Swift Package

DIDCore is a Swift package that provides the main components to work with Decentralized Identifiers (DIDs), DID URLs, and DID Documents.

Swift iOS MacOS WatchOS TvOS

Installation

Swift Package Manager (SPM)

To integrate DIDCore into your Xcode project using SPM, specify it in your Package.swift:

dependencies: [
    .package(url: "git@github.com:beatt83/didcore-swift.git", .upToNextMajor(from: "1.0.0"))
]

Features

  • Decentralized Identifiers (DIDs): Create and manage DIDs in accordance with the DID specification.
  • DID URLs: Easily generate and parse DID URLs.
  • DID Documents: Interact with the foundational component of the DID specification.

Usage

import DIDCore

// Creating a DID instance
let did = DID(from: "did:example:123456789abcdefghi")

// Parsing a DIDUrl
let didUrl = DIDUrl(from: "did:example:123456789abcdefghi?versionId=1#/path")

// The DIDDocument includes structures for VerificationMethod, Service, ServiceEndpoint, and so on.

References

Contributing

Contributions are more than welcome! Please fork the repository and create a pull request with your improvements.

License

This project is licensed under the Apache 2.0 License.