Skip to content

Commit f1d1d45

Browse files
committed
Add initializers to VerificationMethod and Service
1 parent b8151c2 commit f1d1d45

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

Sources/ATCommonWeb/TypeScript-bound/DIDDocument.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ public struct VerificationMethod: Codable {
2222
/// A multibase-encoded public key string.
2323
public let multibasePublicKey: String
2424

25+
public init(id: String, type: String, controller: String, multibasePublicKey: String) {
26+
self.id = id
27+
self.type = type
28+
self.controller = controller
29+
self.multibasePublicKey = multibasePublicKey
30+
}
31+
2532
enum CodingKeys: String, CodingKey {
2633
case id
2734
case type
@@ -41,6 +48,12 @@ public struct Service: Codable {
4148

4249
/// The URL or endpoint associated with the service.
4350
public let serviceEndpoint: String
51+
52+
public init(id: String, type: String, serviceEndpoint: String) {
53+
self.id = id
54+
self.type = type
55+
self.serviceEndpoint = serviceEndpoint
56+
}
4457
}
4558

4659
/// A DID document containing identity-related information.

0 commit comments

Comments
 (0)