FfiXmtpClientProtocol
public protocol FfiXmtpClientProtocol : AnyObject, Sendable
Undocumented
-
addIdentity(newIdentity:Asynchronous) Adds a wallet address to the existing client
Declaration
Swift
func addIdentity(newIdentity: FfiIdentifier) async throws -> FfiSignatureRequest -
addressesFromInboxId(refreshFromNetwork:AsynchronousinboxIds: ) Get the inbox state for each
inbox_id. *- If
refresh_from_networkis true, the client will go to the network first to refresh the state. - Otherwise, the state will be read from the local database.
Declaration
Swift
func addressesFromInboxId(refreshFromNetwork: Bool, inboxIds: [String]) async throws -> [FfiInboxState] - If
-
Undocumented
Declaration
Swift
func apiAggregateStatistics() -> String -
Undocumented
Declaration
Swift
func apiIdentityStatistics() -> FfiIdentityStats -
Undocumented
Declaration
Swift
func apiStatistics() -> FfiApiStats -
applySignatureRequest(signatureRequest:Asynchronous) Undocumented
Declaration
Swift
func applySignatureRequest(signatureRequest: FfiSignatureRequest) async throws -
archiveMetadata(path:Asynchronouskey: ) Load the metadata for an archive to see what it contains. Reads only the metadata without loading the entire file, so this function is quick.
Declaration
Swift
func archiveMetadata(path: String, key: Data) async throws -> FfiBackupMetadata -
canMessage(accountIdentifiers:Asynchronous) Undocumented
Declaration
Swift
func canMessage(accountIdentifiers: [FfiIdentifier]) async throws -> [FfiIdentifier : Bool] -
changeRecoveryIdentifier(newRecoveryIdentifier:Asynchronous) Change the recovery identifier for your inboxId
Declaration
Swift
func changeRecoveryIdentifier(newRecoveryIdentifier: FfiIdentifier) async throws -> FfiSignatureRequest -
Undocumented
Declaration
Swift
func clearAllStatistics() -
Undocumented
Declaration
Swift
func conversation(conversationId: Data) throws -> FfiConversation -
Undocumented
Declaration
Swift
func conversations() -> FfiConversations -
createArchive(path:Asynchronousopts: key: ) Archive application elements to file for later restoration.
Declaration
Swift
func createArchive(path: String, opts: FfiArchiveOptions, key: Data) async throws -
dbReconnect()AsynchronousUndocumented
Declaration
Swift
func dbReconnect() async throws -
Undocumented
Declaration
Swift
func deleteMessage(messageId: Data) throws -> UInt32 -
Undocumented
Declaration
Swift
func dmConversation(targetInboxId: String) throws -> FfiConversation -
Undocumented
Declaration
Swift
func enrichedMessage(messageId: Data) throws -> FfiDecodedMessage -
findInboxId(identifier:Asynchronous) Undocumented
Declaration
Swift
func findInboxId(identifier: FfiIdentifier) async throws -> String? -
getConsentState(entityType:Asynchronousentity: ) Undocumented
Declaration
Swift
func getConsentState(entityType: FfiConsentEntityType, entity: String) async throws -> FfiConsentState -
Undocumented
Declaration
Swift
func getKeyPackageStatusesForInstallationIds(installationIds: [Data]) async throws -> [Data : FfiKeyPackageStatus] -
getLatestInboxState(inboxId:Asynchronous) Undocumented
Declaration
Swift
func getLatestInboxState(inboxId: String) async throws -> FfiInboxState -
importArchive(path:Asynchronouskey: ) Import a previous archive
Declaration
Swift
func importArchive(path: String, key: Data) async throws -
Undocumented
Declaration
Swift
func inboxId() -> String -
inboxState(refreshFromNetwork:Asynchronous) Get the client’s inbox state. *
- If
refresh_from_networkis true, the client will go to the network first to refresh the state. - Otherwise, the state will be read from the local database.
Declaration
Swift
func inboxState(refreshFromNetwork: Bool) async throws -> FfiInboxState - If
-
Undocumented
Declaration
Swift
func installationId() -> Data -
Undocumented
Declaration
Swift
func message(messageId: Data) throws -> FfiMessage -
registerIdentity(signatureRequest:Asynchronous) Undocumented
Declaration
Swift
func registerIdentity(signatureRequest: FfiSignatureRequest) async throws -
Undocumented
Declaration
Swift
func releaseDbConnection() throws -
revokeAllOtherInstallations()AsynchronousRevokes all installations except the one the client is currently using
Declaration
Swift
func revokeAllOtherInstallations() async throws -> FfiSignatureRequest -
revokeIdentity(identifier:Asynchronous) Revokes or removes an identity from the existing client
Declaration
Swift
func revokeIdentity(identifier: FfiIdentifier) async throws -> FfiSignatureRequest -
revokeInstallations(installationIds:Asynchronous) Revoke a list of installations
Declaration
Swift
func revokeInstallations(installationIds: [Data]) async throws -> FfiSignatureRequest -
sendSyncRequest()AsynchronousManually trigger a device sync request to sync records from another active device on this account.
Declaration
Swift
func sendSyncRequest() async throws -
setConsentStates(records:Asynchronous) Undocumented
Declaration
Swift
func setConsentStates(records: [FfiConsent]) async throws -
A utility function to sign a piece of text with this installation’s private key.
Declaration
Swift
func signWithInstallationKey(text: String) throws -> Data -
Undocumented
Declaration
Swift
func signatureRequest() -> FfiSignatureRequest? -
syncPreferences()AsynchronousUndocumented
Declaration
Swift
func syncPreferences() async throws -> UInt64 -
uploadDebugArchive(serverUrl:Asynchronous) Export an encrypted debug archive to a device sync server to inspect telemetry for debugging purposes.
Declaration
Swift
func uploadDebugArchive(serverUrl: String) async throws -> String -
A utility function to easily verify that a piece of text was signed by this installation.
Declaration
Swift
func verifySignedWithInstallationKey(signatureText: String, signatureBytes: Data) throws -
A utility function to easily verify that a string has been signed by another libXmtp installation. Only works for verifying libXmtp public context signatures.
Declaration
Swift
func verifySignedWithPublicKey(signatureText: String, signatureBytes: Data, publicKey: Data) throws
FfiXmtpClientProtocol Protocol Reference