MethodChannelXmtpPlugin class

An implementation of XmtpPluginPlatform that uses method channels.

Inheritance

Constructors

MethodChannelXmtpPlugin()

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
The method channel used to interact with the native platform.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acceptConversation(String topic) Future<bool>
override
addAccount(Uint8List newAccountPrivateKey, {bool allowReassignInboxId = false}) Future<void>
override
addGroupAdmin(String topic, String inboxId) Future<bool>
override
addGroupMembers(String topic, List<String> inboxIds) Future<bool>
override
addGroupSuperAdmin(String topic, String inboxId) Future<bool>
override
archiveMetadata(String path, Uint8List key) Future<Map<String, dynamic>>
override
canMessage(String address) Future<bool>
override
canMessageByInboxId(String inboxId) Future<bool>
override
changeRecoveryIdentifier(Uint8List signerPrivateKey, String newRecoveryIdentifier) Future<void>
override
conversationTopicFromAddress(String peerAddress) Future<String?>
override
createArchive(String path, Uint8List key, {List<String> elements = const [], int? startNs, int? endNs, bool excludeDisappearing = false}) Future<void>
override
denyConversation(String topic) Future<bool>
override
findOrCreateDMWithInboxId(String inboxId) Future<Map<String, dynamic>>
override
generatePrivateKey() Future<Uint8List>
override
getAllHmacKeys() Future<List<Map<String, dynamic>>>
Aggregate HMAC keys for every conversation the client knows about (including stitched duplicate DMs). Each entry: {topic: String, hmacKey: Uint8List, thirtyDayPeriodsSinceEpoch: int}. libxmtp returns 3 keys per conversation (prior / current / next epoch). Feed these to the notif server's subscribeWithMetadata so it can filter listener traffic without breaking E2E.
override
getClientAddress() Future<String?>
override
getClientInboxId() Future<String?>
override
getConversationConsentState(String topic) Future<String>
override
getGroupMemberRole(String topic, String inboxId) Future<Map<String, dynamic>>
override
getInboxConsentState(String inboxId) Future<String>
override
getInstallationId() Future<String>
override
getMessagesAfterDate(String peerAddress, DateTime fromDate) Future<List<Map<String, dynamic>>>
override
getMessagesAfterDateByTopic(String topic, DateTime fromDate) Future<List<Map<String, dynamic>>>
override
getPlatformVersion() Future<String?>
override
importArchive(String path, Uint8List key) Future<void>
override
inboxIdFromAddress(String address) Future<String>
override
inboxState({bool refreshFromNetwork = false}) Future<Map<String, dynamic>>
override
inboxStatesForInboxIds(List<String> inboxIds, {bool refreshFromNetwork = true}) Future<List<Map<String, dynamic>>>
override
initializeClient(Uint8List privateKey, Uint8List dbKey, {String environment = 'production', String? dbDirectory}) Future<String?>
override
listConversations() Future<List<Map<String, dynamic>>>
override
listDms({String? consentState}) Future<List<Map<String, dynamic>>>
override
listGroupAdmins(String topic) Future<List<Map>>
override
listGroupMembers(String topic) Future<List<Map>>
override
listGroups({String? consentState}) Future<List<Map<String, dynamic>>>
override
listGroupSuperAdmins(String topic) Future<List<Map>>
override
loadRemoteAttachment(Map<String, dynamic> params) Future<Map<String, dynamic>>
override
newGroup(List<String> inboxIds, Map<String, String> options) Future<Map<String, dynamic>>
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processPushMessage(String topic, Uint8List encryptedBytes) Future<List<Map<String, dynamic>>>
Decrypt an FCM/APNs push payload for an existing conversation (looked up by topic). Returns a list of decoded messages — usually 1, occasionally more if the envelope contained multiple. Each entry mirrors getMessagesAfterDate shape.
override
processWelcome(Uint8List encryptedBytes) Future<List<Map<String, dynamic>>>
Decrypt an FCM/APNs push payload that arrived on the welcome topic (/xmtp/mls/1/w-${installationId}/proto). Returns the newly-created conversation(s) — usually 1, occasionally more from DM stitching. Each entry mirrors listConversations shape.
override
removeAccount(Uint8List recoveryPrivateKey, String identifierToRemove) Future<void>
override
removeGroupAdmin(String topic, String inboxId) Future<bool>
override
removeGroupMembers(String topic, List<String> inboxIds) Future<bool>
override
removeGroupSuperAdmin(String topic, String inboxId) Future<bool>
override
revokeAllOtherInstallations(Uint8List signerPrivateKey) Future<void>
override
revokeInstallations(Uint8List signerPrivateKey, List<String> installationIds) Future<void>
override
sendGroupMessage(String topic, dynamic message, String authorityId, String typeId, int versionMajor) Future<String?>
override
sendMessage(String recipientAddress, dynamic message, String authorityId, String typeId, int versionMajor) Future<String?>
override
sendMessageByInboxId(String recipientInboxId, dynamic message, String authorityId, String typeId, int versionMajor) Future<Map<String, dynamic>?>
Returns a map with messageId and the live DM topic (the conversation that was actually sent to — send is find-or-create, so this is always the canonical DM topic). topic may be null on platforms that don't surface it.
override
sendSyncRequest() Future<bool>
override
setConversationConsentState(String topic, String state) Future<bool>
override
setInboxConsentState(String inboxId, String state) Future<bool>
override
staticDeleteLocalDatabase(String address, String inboxId, {String environment = 'production', String? dbDirectory}) Future<void>
override
staticGetInboxIdForAddress(String address, {String environment = 'production'}) Future<String?>
override
staticInboxStatesForInboxIds(List<String> inboxIds) Future<List<Map<String, dynamic>>>
override
staticRevokeInstallations(Uint8List signerPrivateKey, String inboxId, List<String> installationIds) Future<void>
override
subscribeToAllMessages() Stream<Map<String, dynamic>>
override
syncAll({List<String> consentStates = const ['allowed']}) Future<Map<String, int>>
override
syncConsentPreferences() Future<bool>
override
syncConversation(String topic) Future<void>
override
toString() String
A string representation of this object.
inherited
updateGroup(String topic, Map<String, String> updates) Future<bool>
override

Operators

operator ==(Object other) bool
The equality operator.
inherited