diff --git a/Sources/TorusUtils/Interfaces/Common/UserType.swift b/Sources/TorusUtils/Interfaces/Common/UserType.swift index 2f107ea9..b78007f7 100644 --- a/Sources/TorusUtils/Interfaces/Common/UserType.swift +++ b/Sources/TorusUtils/Interfaces/Common/UserType.swift @@ -1,6 +1,6 @@ import Foundation -public enum UserType: String, Equatable, Hashable { +public enum UserType: String, Codable, Equatable, Hashable { case v1 case v2 } diff --git a/Sources/TorusUtils/Interfaces/TorusKey.swift b/Sources/TorusUtils/Interfaces/TorusKey.swift index 96b7a1b7..70176c1a 100644 --- a/Sources/TorusUtils/Interfaces/TorusKey.swift +++ b/Sources/TorusUtils/Interfaces/TorusKey.swift @@ -1,8 +1,8 @@ import BigInt import Foundation -public class TorusKey { - public class FinalKeyData { +public class TorusKey: Codable { + public class FinalKeyData: Codable { public let evmAddress: String public let X: String public let Y: String @@ -16,7 +16,7 @@ public class TorusKey { } } - public class OAuthKeyData { + public class OAuthKeyData: Codable { public let evmAddress: String public let X: String public let Y: String @@ -30,7 +30,7 @@ public class TorusKey { } } - public class SessionData { + public class SessionData: Codable { public let sessionTokenData: [SessionToken?] public let sessionAuthKey: String @@ -40,7 +40,7 @@ public class TorusKey { } } - public class NodesData { + public class NodesData: Codable { public let nodeIndexes: [Int] internal init(nodeIndexes: [Int]) { diff --git a/Sources/TorusUtils/Interfaces/TorusPublicKey.swift b/Sources/TorusUtils/Interfaces/TorusPublicKey.swift index 0096d262..189f0d08 100644 --- a/Sources/TorusUtils/Interfaces/TorusPublicKey.swift +++ b/Sources/TorusUtils/Interfaces/TorusPublicKey.swift @@ -1,8 +1,8 @@ import BigInt import Foundation -public class TorusPublicKey { - public class OAuthKeyData { +public class TorusPublicKey: Codable { + public class OAuthKeyData: Codable { public let evmAddress: String public let X: String public let Y: String @@ -14,7 +14,7 @@ public class TorusPublicKey { } } - public class FinalKeyData { + public class FinalKeyData: Codable { public let evmAddress: String public let X: String public let Y: String @@ -26,7 +26,7 @@ public class TorusPublicKey { } } - public class Metadata { + public class Metadata: Codable { public let pubNonce: PubNonce? public let nonce: BigUInt? public let typeOfUser: UserType @@ -42,7 +42,7 @@ public class TorusPublicKey { } } - public class NodesData { + public class NodesData: Codable { public let nodeIndexes: [Int] internal init(nodeIndexes: [Int]) {