Skip to content

Commit

Permalink
feat(docs): add more documentation and fix others
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-frade-iohk committed Mar 6, 2023
1 parent 07efc8b commit c89b429
Show file tree
Hide file tree
Showing 30 changed files with 858 additions and 98 deletions.
6 changes: 0 additions & 6 deletions AtalaPrismSDK/Apollo/Sources/Apollo.docc/Apollo.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,3 @@ Message Authentication Codes are a type of symmetric equivalent of digital signa
Key exchange protocols enable two or more parties to securely negotiate a symmetric key, even if they only know each other’s public keys. Key exchange protocols are used to establish secure communication channels.

By using the Apollo suite of cryptographic primitives, developers can build secure and provably secure applications that protect sensitive data from unauthorized access, tampering, or theft.

## Topics

### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->

- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ Atala PRISM Swift SDK is a library and documentation that helps developers build

Atala PRISM is a self-sovereign identity (SSI) platform and service suite for verifiable data and digital identity. Built on Cardano, it offers core infrastructure for issuing DIDs and verifiable credentials, alongside tools and frameworks to help expand your ecosystem.

## Features / APIs
## Modules / APIs

Atala PRISM Swift SDK provides the following building blocks to create, manage and resolve decentralized identifiers, issue, manage and verify verifiable credentials, establish and manage trusted, peer-to-peer connections and interactions between DIDs, and store, manage, and recover verifiable data linked to DIDs.

- __Castor__: Building block that provides a suit of DID operations in a user-controlled manner.
- __Apollo__: Building block that provides a suite of criptographic operations.
- __Castor__: Building block that provides a suite of DID operations in a user-controlled manner.
- __Pollux__: Building block that provides a suite of credential operations in a privacy-preserving manner.
- __Mercury__: Building block that provides a set of secure, standards-based communications protocols in a transport-agnostic and interoperable manner.
- __Pluto__: Building block that provides an interface for storage operations in a portable, storage-agnostic manner.
- __Experience__: Set of commonly used operations or features that use one or multiple building blocks.
- __PrismAgent__: PrismAgent using all the building blocks provides a agent that can provide a set of high level DID functionalities.

## Getting Started

Expand All @@ -26,7 +27,7 @@ To get started with the Atala PRISM Swift SDK, you can set up the SDK and start

- Xcode 13.4 or later
- MacOS 12 or later
- iOS 13 or later
- iOS 15 or later

> ⚠️ **Currently you need to always open the XCode in ROSETTA mode**
Expand All @@ -35,7 +36,7 @@ To get started with the Atala PRISM Swift SDK, you can set up the SDK and start
To integrate the SDK into an existing project, you can use the Swift Package Manager, which is distributed with Xcode.

1. Open your project in Xcode and select **File > Swift Packages > Add Package Dependency**.
2. Enter the URL for the SDK for Swift Package Manager GitHub repo (`https://github.com/input-output-hk/atala-prism-swift-sdk`) into the search bar and click **Next**.
2. Enter the URL for the SDK for Swift Package Manager GitHub repo (`https://github.com/input-output-hk/atala-prism-wallet-sdk-swift`) into the search bar and click **Next**.
3. You'll see the repository rules for which version of the SDK you want Swift Package Manager to install. Choose the first rule, **Version**, and select **Up to Next Minor** as it will use the latest compatible version of the dependency that can be detected from the `main` branch, then click **Next**.

### Swift Package Manager
Expand All @@ -44,7 +45,15 @@ The Swift Package Manager is a tool for managing the distribution of Swift code.

## Documentation

### General information and articles

- [Getting Started](https://staging-docs.atalaprism.io/docs/getting-started)
- [What is identity?](https://staging-docs.atalaprism.io/docs/concepts/what-is-identity)
- [Digital wallets](https://staging-docs.atalaprism.io/docs/concepts/digital-wallets)
- [Atala PRISM Overview](https://staging-docs.atalaprism.io/docs/atala-prism/overview)

### Architecture decision articles

- <doc:BuildingBlocks>
- <doc:TechnicalConsiderations>
- <doc:ModularApproach>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# BuildingBlocks

The building blocks are the core components of Atala PRISM and they are designed to work together seamlessly to provide a comprehensive identity management solution.

## Overview

Each building block serves a specific purpose, and together they provide a solid foundation for building decentralized identity applications.

Let's take a closer look at each building block:

- [Apollo](apollo.html): Apollo is a building block that provides a suite of cryptographic operations. This includes secure hash algorithms, digital signatures, and encryption, which are all essential for creating a secure and tamper-proof identity system. Apollo ensures that all data within the Atala PRISM system is securely encrypted and digitally signed, making it resistant to tampering and unauthorized access.
- [Castor](castor.html): Castor is a building block that provides a suite of decentralized identifier (DID) operations in a user-controlled manner. DIDs are a key component of decentralized identity, as they provide a way to uniquely identify individuals and entities in a decentralized manner. Castor allows users to create, manage, and control their DIDs and associated cryptographic keys.
- [Pollux](pollux.html): Pollux is a building block that provides a suite of credential operations in a privacy-preserving manner. Credentials are a way to prove claims about an individual or entity, and they are an important part of decentralized identity. Pollux allows users to create, manage, and share credentials in a privacy-preserving way, using zero-knowledge proofs to ensure that sensitive information is not revealed.
- [Mercury](mercury.html): Mercury is a building block that provides a set of secure, standards-based communications protocols in a transport-agnostic and interoperable manner. Mercury allows different components of Atala PRISM to communicate with each other securely, using standard protocols such as HTTP, WebSocket, and MQTT.
- [Pluto](pluto.html): Pluto is a building block that provides an interface for storage operations in a portable, storage-agnostic manner. Pluto allows data to be stored and retrieved in a way that is independent of the underlying storage technology, allowing Atala PRISM to work with a variety of storage solutions.

Together, these building blocks provide a solid foundation for building decentralized identity applications that are secure, privacy-preserving, and interoperable. By using Atala PRISM, developers can focus on building innovative identity solutions without having to worry about the underlying infrastructure.

## Prism Agent

Prism Agent is a comprehensive library that brings together all the building blocks of the Prism platform - Apollo, Castor, Pluto, Mercury, and Pollux - to provide a seamless experience for developers working with decentralized identifiers (DIDs) on the Prism platform.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Modular Approach

A modular approach is an essential part of the Atala PRISM architecture. It allows each building block to operate independently of each other, reducing indirect dependencies between components. To achieve this, Atala PRISM uses protocols-oriented programming, domain-oriented programming, and dependency injection.

## Overview

For example, Castor, which provides decentralized identifier (DID) operations, depends on the Apollo protocol for cryptographic operations. However, it doesn't depend on the Apollo implementation or module directly. Instead, it depends on the Domain module, which defines the Apollo protocol. This separation of concerns allows for better maintainability and flexibility of the Atala PRISM architecture.

The Atala PRISM SDK provides implementations for each of the building blocks, but the architecture decision was made to allow developers to create their own implementations of a building block. This means that developers can customize and extend the functionality of the building blocks to suit their specific needs.

For instance, Pluto is the storage module within the Atala PRISM SDK, and its implementation uses CoreData and Keychain to securely store data. However, if a developer wants to use their own implementation of Pluto, they can do so and still use the rest of the SDK. This approach allows developers to choose the storage solution that best suits their use case, without being tied to a specific implementation within the Atala PRISM SDK.

Overall, the modular approach of Atala PRISM architecture provides developers with flexibility, extensibility, and maintainability, allowing them to create innovative decentralized identity solutions with ease.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SDK Technical Considerations
# Technical Considerations

The architecture of the SDK is a result of a careful evaluation of different software development methodologies and patterns. We chose a modular, clean architecture that is based on protocol-oriented programming and domain-oriented programming principles, as well as dependency injection, for several reasons.

Expand All @@ -22,6 +22,5 @@ Dependency injection is a programming pattern that promotes loose coupling betwe

## Topics

### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->

- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->
- <doc:ModularApproach>
- <doc:BuildingBlocks>
6 changes: 0 additions & 6 deletions AtalaPrismSDK/Castor/Sources/Castor.docc/Castor.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,3 @@ Decentralized Identifiers (DIDs) are a new type of identifier that allows indivi
Castor supports the creation and resolution of two types of DIDs out of the box: prism and peer.

With Castor, developers can create and manage DIDs, generate and manage their associated public and private keys, and resolve DIDs to retrieve associated data. Castor also provides a range of advanced features, such as support for multiple key types and encryption methods, and a flexible API for customizing and extending its functionality.

## Topics

### <!--@START_MENU_TOKEN@-->Group<!--@END_MENU_TOKEN@-->

- <!--@START_MENU_TOKEN@-->``Symbol``<!--@END_MENU_TOKEN@-->
1 change: 1 addition & 0 deletions AtalaPrismSDK/Domain/Sources/BBs/Apollo.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation

/// The Apollo protocol defines the set of cryptographic operations that are used in the Atala PRISM architecture.
public protocol Apollo {
/// createRandomMnemonics creates a random set of mnemonic phrases that can be used as a seed for generating a private key.
///
Expand Down
1 change: 1 addition & 0 deletions AtalaPrismSDK/Domain/Sources/BBs/Castor.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation

/// The Castor protocol defines the set of decentralized identifier (DID) operations that are used in the Atala PRISM architecture. It provides a way for users to create, manage, and control their DIDs and associated cryptographic keys.
public protocol Castor {
/// parseDID parses a string representation of a Decentralized Identifier (DID) into a DID object. This function may throw an error if the string is not a valid DID.
///
Expand Down
1 change: 1 addition & 0 deletions AtalaPrismSDK/Domain/Sources/BBs/Mercury.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Foundation

/// The Mercury protocol defines the set of secure, standards-based communication protocols that are used in the Atala PRISM architecture.
public protocol Mercury {
/// packMessage asynchronously packs a given message object into a string representation. This function may throw an error if the message object is invalid.
///
Expand Down
Loading

0 comments on commit c89b429

Please sign in to comment.