XmtpPluginWeb class
Web implementation of the XMTP Flutter plugin.
This implementation uses the XMTP Browser SDK v6 through JavaScript interop.
- Inheritance
-
- Object
- PlatformInterface
- XmtpPluginPlatform
- XmtpPluginWeb
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- 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> -
Add a new account to the inbox
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
-
canMessage(
String address) → Future< bool> -
override
-
canMessageByInboxId(
String inboxId) → Future< bool> -
Check if can message by inbox ID
override
-
changeRecoveryIdentifier(
Uint8List signerPrivateKey, String newRecoveryIdentifier) → Future< void> -
Change recovery identifier
override
-
conversationTopicFromAddress(
String peerAddress) → Future< String?> -
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'ssubscribeWithMetadataso it can filter listener traffic without breaking E2E.override -
getClientAddress(
) → Future< String?> -
override
-
getClientInboxId(
) → Future< String?> -
override
-
getConversationConsentState(
String topic) → Future< String> -
Get consent state for a conversation by topic
override
-
getGroupMemberRole(
String topic, String inboxId) → Future< Map< String, dynamic> > -
override
-
getInboxConsentState(
String inboxId) → Future< String> -
Get consent state for an inbox by inbox ID
override
-
getInstallationId(
) → Future< String> -
Get current installation ID
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
-
inboxIdFromAddress(
String address) → Future< String> -
override
-
inboxState(
{bool refreshFromNetwork = false}) → Future< Map< String, dynamic> > -
Get inbox state for current client
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
getMessagesAfterDateshape.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 mirrorslistConversationsshape.override -
removeAccount(
Uint8List recoveryPrivateKey, String identifierToRemove) → Future< void> -
Remove an account from the inbox
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> -
Revoke all other installations
override
-
revokeInstallations(
Uint8List signerPrivateKey, List< String> installationIds) → Future<void> -
Revoke specific installations
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< String?> -
override
-
sendSyncRequest(
) → Future< bool> -
Send a sync request to trigger history transfer from other installations.
This is the manual trigger for XMTP history sync across devices.
override
-
setConversationConsentState(
String topic, String state) → Future< bool> -
Set consent state for a conversation by topic
override
-
setInboxConsentState(
String inboxId, String state) → Future< bool> -
Set consent state for an inbox by inbox ID
override
-
staticDeleteLocalDatabase(
String address, String inboxId, {String environment = 'production'}) → Future< void> -
override
-
staticGetInboxIdForAddress(
String address, {String environment = 'production'}) → Future< String?> -
override
-
staticInboxStatesForInboxIds(
List< String> inboxIds) → Future<List< Map< >String, dynamic> > -
inherited
-
staticRevokeInstallations(
Uint8List signerPrivateKey, String inboxId, List< String> installationIds) → Future<void> -
inherited
-
subscribeToAllMessages(
) → Stream< Map< String, dynamic> > -
override
-
syncAll(
{List< String> consentStates = const ['allowed']}) → Future<Map< String, int> > -
Sync all conversations from network
override
-
syncConsentPreferences(
) → Future< bool> -
Sync consent preferences from network
override
-
syncConversation(
String topic) → Future< void> -
Sync a single conversation by topic
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
Static Methods
-
registerWith(
Registrar registrar) → void - Factory constructor that returns the singleton instance.