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 implementation

    The signer type (default: EOA).

    Default Implementation

    Declaration

    Swift

    var type: SignerType { get }
  • chainId Default implementation

    The blockchain chain ID (used for SCW, nil for others).

    Default Implementation

    Declaration

    Swift

    var chainId: Int64? { get }
  • blockNumber Default implementation

    The 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