DIDCore is a Swift package that provides the main components to work with Decentralized Identifiers (DIDs), DID URLs, and DID Documents.
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"))
]
- 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.
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.
Contributions are more than welcome! Please fork the repository and create a pull request with your improvements.
This project is licensed under the Apache 2.0 License.