> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dfns.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Development

> Architecture and usage patterns for the Dfns Swift SDK on iOS, including authentication, request signing, and delegated wallet flows.

## Concepts

### `PasskeySigner`

All state-changing requests made to the Dfns API need to be cryptographically signed by credentials registered with the User.

> **Note:** To be more precise, it's not the request itself that needs to be signed, but rather a "User Action Challenge" issued by Dfns. For simplicity, we refer to this process as "request signing".

This request signature serves as cryptographic proof that only authorized entities are making the request. Without it, the request would result in an Unauthorized error.
While implementing an iOS application your backend server will have to communicate with the DFNS API to retrieve this challenge and pass it to your application, `PasskeySigner` will be used to register and authenticate a user.

```
let passkeysSigner = PasskeysSigner()
```

#### Register

```
let fido2Attestation = try! await passkeysSigner.register(challenge: challenge)
```

#### Sign

```
let fido2Assertion = try! await passkeysSigner.sign(challenge: challenge)
```
