Skip to content

Commit d817858

Browse files
fix: did url string parsing correctly
1 parent 4fe5917 commit d817858

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

AtalaPrismSDK/Domain/Sources/Models/DIDUrl.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ public struct DIDUrl {
4141

4242
/// A string representation of the path component of this `DIDUrl`.
4343
private var pathString: String {
44-
"/" + path.joined(separator: "/")
44+
path.isEmpty ? "" : "/" + path.joined(separator: "/")
4545
}
4646

4747
/// A string representation of the parameters component of this `DIDUrl`.

AtalaPrismSDK/Mercury/Sources/DIDCommWrappers/DIDCommDIDResolverWrapper.swift

+9-9
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ extension DidDoc {
8484
id: $0.id.string,
8585
type: .jsonWebKey2020,
8686
controller: $0.controller.string,
87-
verificationMaterial: .jwk(publicKeyJwk: jsonKeys)
87+
verificationMaterial: .jwk(value: jsonKeys)
8888
)
8989
}
9090

@@ -93,9 +93,9 @@ extension DidDoc {
9393
return service.serviceEndpoint.first.map {
9494
Service(
9595
id: service.id,
96-
serviceEndpoint: .didCommMessaging(
96+
kind: .didCommMessaging(
9797
value: .init(
98-
uri: $0.uri,
98+
serviceEndpoint: $0.uri,
9999
accept: $0.accept,
100100
routingKeys: $0.routingKeys
101101
)
@@ -106,17 +106,17 @@ extension DidDoc {
106106
return service.serviceEndpoint.first.map {
107107
Service(
108108
id: service.id,
109-
serviceEndpoint: .other(value: $0.uri)
109+
kind: .other(value: $0.uri)
110110
)
111111
}
112112
}
113113
}
114114
self.init(
115-
id: did,
116-
keyAgreement: keyAgreements,
117-
authentication: authentications,
118-
verificationMethod: verificationMethods,
119-
service: services
115+
did: did,
116+
keyAgreements: keyAgreements,
117+
authentications: authentications,
118+
verificationMethods: verificationMethods,
119+
services: services
120120
)
121121
}
122122
}

AtalaPrismSDK/Mercury/Sources/DIDCommWrappers/DIDCommSecretsResolverWrapper.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ extension DIDCommxSwift.Secret {
172172

173173
switch from.secretMaterial {
174174
case let .jwk(value):
175-
material = .jwk(privateKeyJwk: value)
175+
material = .jwk(value: value)
176176
}
177177
self.init(
178178
id: from.id,

0 commit comments

Comments
 (0)