SigningKey
public protocol SigningKey
A standardized signing interface for XMTP clients supporting EOA, SCW, and Passkeys.
-
The identity associated with the signing key (e.g., Ethereum address or Passkey identifier).
Declaration
Swift
var identity: PublicIdentity { get }
-
type
Default implementationThe signer type (default: EOA).
Default Implementation
Declaration
Swift
var type: SignerType { get }
-
chainId
Default implementationThe blockchain chain ID (used for SCW, nil for others).
Default Implementation
Declaration
Swift
var chainId: Int64? { get }
-
blockNumber
Default implementationThe block number for verification (optional).
Default Implementation
Declaration
Swift
var blockNumber: Int64? { get }
-
sign(_:
Asynchronous) Sign a message and return a
SignedData
structure containing the signature and metadata.Declaration
Swift
func sign(_ message: String) async throws -> SignedData