Skip to content

Commit

Permalink
feat(agent): add didcomm connection protocol and invitation protocol
Browse files Browse the repository at this point in the history
  • Loading branch information
goncalo-frade-iohk committed Dec 1, 2022
1 parent fb4587a commit 2b69e0e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions PrismAgent/Sources/Protocols/Invitation/V2/InvitationRunner.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import Domain
import Foundation

class InvitationRunner {
private let mercury: Mercury
private let url: URL

init(mercury: Mercury, url: URL) {
self.mercury = mercury
self.url = url
}

func run() async throws -> Message {
let messageString = try OutOfBandParser().parseMessage(url: url)
return try await mercury.unpackMessage(msg: messageString, options: .expectDecryptByAllKeys).result
}
}

0 comments on commit 2b69e0e

Please sign in to comment.