Skip to content

Releases: eu-digital-identity-wallet/eudi-lib-ios-wallet-kit

v0.12.4

20 Jun 23:06
8b79f41
Compare
Choose a tag to compare

EudiWallet property addition

  • Added verifierRedirectUri: String? property to EudiWallet.
    • This property stores the OpenID4VP verifier redirect URI, used for redirectUri clients in OpenID4VP flows.

Fix to delete one-time credentials for presented documents only

  • Updated the logic to ensure that only one-time credentials for documents that have been presented are deleted.

Fix to issueDocumentsByOfferUrl crash

  • When multiple documents were issued many times the 'Fatal error: Unexpectedly found nil while unwrapping an Optional value' occurred.

v0.12.3

19 Jun 10:16
649be5c
Compare
Choose a tag to compare

What's Changed

  • Update README and documentation for compatibility and key options by @phisakel in #189
  • Update Package.swift to use exact version for sdjwt library by @phisakel in #191

Full Changelog: v0.12.2...v0.12.3

v0.12.2

11 Jun 07:05
20f0a0d
Compare
Choose a tag to compare

v0.12.2

Modified issueDocumentsByOfferUrl method

   /// Issue documents by offer URI.
   /// - Parameters:
   ///   - offerUri: url with offer
   ///   - docTypes: offered doc models available to be issued. Contains key options (secure are name and other options)
   ///   - txCodeValue: Transaction code given to user (if available)
   ///   - promptMessage: prompt message for biometric authentication (optional)
   /// - Returns: Array of issued and stored documents
   public func issueDocumentsByOfferUrl(offerUri: String, docTypes: [OfferedDocModel], txCodeValue: String? = nil, promptMessage: String? = nil) async throws -> [WalletStorage.Document] {

Example usage:

// When resolving an offer, key options are now included
let offer = try await wallet.resolveOfferUrlDocTypes(uriOffer: offerUrl)
for docModel in offer.docModels {
  // use recommended key options or modify them
   let docTypes = offer.docModels.map { $0.copy(keyOptions: KeyOptions(credentialPolicy: .oneTimeUse, batchSize: 2))
   // Issue with optimal settings
   let newDocs = try await wallet.issueDocumentsByOfferUrl(offerUri: offerUrl, docTypes: docTypes, txCodeValue: txCode)
}

OfferedDocModel struct enhancements

Added properties:

  • identifier: String? - Issuer configuration identifier for the credential
  • keyOptions: KeyOptions - Default key options (batch size and credential policy) recommended by the issuer

Updated computed property:

  • docTypeOrVctOrScope renamed to docTypeOrVctOrScope - Now returns docType, vct, or scope in priority order

v0.12.1

04 Jun 14:07
4541f45
Compare
Choose a tag to compare

v0.12.1

EudiWallet added method:

public func getCredentialsUsageCount(id: String) async throws -> CredentialsUsageCounts?
Gets a document's remaining credentials, available for presentation count
This method retrieves usage count information for a specific document based on its credential policy.
For documents issued with a one-time use policy, it returns the number of remaining presentations
available. For documents with a rotate-use policy, it returns nil as there's no usage limit.

if let usageCounts = try await wallet.getCredentialsUsageCount(id: documentId) {
    print("Remaining presentations: \(usageCounts.remaining) out of \(usageCounts.total)")
} else {
    print("Document has unlimited presentations (rotate-use policy)")
}

EudiWallet added method:

public func getDefaultKeyOptions(_ docType: String?, scope: String?, identifier: String?) async throws -> KeyOptions
Get default key options (batch-size and credential policy) for a document type from the issuer.
This method queries the issuer to retrieve the recommended key configuration for a specific document type,
scope, or identifier. The returned KeyOptions can be used when issuing documents.

let keyOptions = try await wallet.getDefaultKeyOptions(docType, scope: scope, identifier: identifier)
let document = try await wallet.issueDocument(docType: docType, scope: scope, identifier: identifier, keyOptions: keyOptions)

OfferedDocModel struct enhancement

Added defaultKeyOptions property to the OfferedDocModel struct. This property contains the default key options (batch size and credential policy) recommended by the issuer for the specific credential configuration. When processing credential offers, this property provides the key settings without requiring a separate call to getDefaultKeyOptions.

// When resolving an offer, defaultKeyOptions are now included
let offer = try await wallet.resolveOfferUrlDocTypes(uriOffer: offerUrl)
for docModel in offer.docModels {
    // Use the issuer's recommended key options
    let keyOptions = docModel.defaultKeyOptions
}

EudiWallet removed method:

getRemainingCredentialsCount

v0.12.0

30 May 14:05
0bdaa5b
Compare
Choose a tag to compare

v0.12.0

Batch issuance support

To issue multiple credentials for a document, specify the keyOptions parameter in the issueDocument method. This allows to set the credentialPolicy and batchSize options.

Example usage:

try await wallet.issueDocument(docType: nil, scope: nil, identifier: identifier, keyOptions: KeyOptions(credentialPolicy: .oneTimeUse, batchSize: 10))

Additional method

/// Get the remaining presentations count for a document.	
/// Returns: Remaining presentations count (if one-time use policy was used to issue the document, otherwise nil)
public func getRemainingCredentialsCount(id: String) async throws -> Int?

SecureArea Protocol: Batch-Oriented API Changes

The SecureArea protocol was refactored to support batch-oriented key management and cryptographic operations. This change introduces methods for handling multiple keys at once. This affects implementors of the SecureArea protocol.

1. Batch Operations Added

  • Key Creation:

    • createKeyBatch(id: String, keyOptions: KeyOptions?) async throws -> [CoseKey]
      • Creates a batch of keys and returns their public keys.
  • Key Deletion:

    • deleteKeyBatch(id: String, startIndex: Int, batchSize: Int) async throws
      • Deletes a batch of keys starting from a specific index.
    • deleteKeyInfo(id: String) async throws
      • Deletes key metadata for a given batch.
  • Signature and Key Agreement:

    • signature(id: String, index: Int, algorithm: SigningAlgorithm, dataToSign: Data, unlockData: Data?) async throws -> Data
      • Computes a signature using a specific key in the batch.
    • keyAgreement(id: String, index: Int, publicKey: CoseKey, unlockData: Data?) async throws -> SharedSecret
      • Performs key agreement with a specific key in the batch.
  • Key Info:

    • getKeyBatchInfo(id: String) async throws -> KeyBatchInfo
      • Returns information about a batch of keys.
  • Default Algorithm:

    • defaultSigningAlgorithm(ecCurve: CoseEcCurve) -> SigningAlgorithm
      • Returns the default signing algorithm for a given curve.

2. Single-Key Methods Removed

  • Single-key methods createKey, deleteKey, and getKeyInfo were removed.

0.11.7

28 May 22:11
baf0df5
Compare
Choose a tag to compare
  • Bug fix for sdjwt presentation

0.11.6

28 May 11:13
bc6c344
Compare
Choose a tag to compare
  • Add 'vct' property to OfferedDocModel

v0.11.5

22 May 09:51
Compare
Choose a tag to compare
  • Fixed Bug #181
  • Public initializer for OfferedIssuanceModel and OfferedDocModel structs

v0.11.4

13 May 21:56
88bd05a
Compare
Choose a tag to compare
  • Update eudi-lib-ios-siop-openid4vp-swift package dependency to version 0.12.0
  • Supports openid4vp draft 24

v0.11.3

08 May 08:15
8f0db41
Compare
Choose a tag to compare
  • Display "Unidentified Relying Party" when reader authentication is disabled.
  • Fix transactions log for verifications with DCQL queries