diff --git a/Sources/XMTPiOS/SigningKey.swift b/Sources/XMTPiOS/SigningKey.swift index 7eb93eab..4acd7011 100644 --- a/Sources/XMTPiOS/SigningKey.swift +++ b/Sources/XMTPiOS/SigningKey.swift @@ -19,6 +19,12 @@ import LibXMTP public protocol SigningKey { /// A wallet address for this key var address: String { get } + + /// If this signing key is a smart contract wallet + var isSmartContractWallet: Bool { get } + + /// The name of the chainId for example "eip155:1" + var chainId: String { get } /// Sign the data and return a secp256k1 compact recoverable signature. func sign(_ data: Data) async throws -> Signature @@ -29,6 +35,14 @@ public protocol SigningKey { } extension SigningKey { + public var isSmartContractWallet: Bool { + return false + } + + public var chainId: String { + return "eip155:1" + } + func createIdentity(_ identity: PrivateKey, preCreateIdentityCallback: PreEventCallback? = nil) async throws -> AuthorizedIdentity { var slimKey = PublicKey() slimKey.timestamp = UInt64(Date().millisecondsSinceEpoch)