/* tslint:disable */ /* eslint-disable */ /** * The `ReadableStreamType` enum. * * *This API requires the following crate features to be activated: `ReadableStreamType`* */ export type ReadableStreamType = "bytes"; /** * A single per-worker interval override (nanoseconds). */ export interface WorkerIntervalOverride { kind: WorkerKind; intervalNs: number; } /** * A single per-worker jitter override (nanoseconds). */ export interface WorkerJitterOverride { kind: WorkerKind; jitterNs: number; } /** * An available archive in the sync group */ export interface AvailableArchiveInfo { pin: string; metadata: ArchiveMetadata; sentByInstallation: Uint8Array; } /** * Metadata about a backup archive */ export interface ArchiveMetadata { backupVersion: number; elements: BackupElementSelectionOption[]; exportedAtNs: bigint; startNs?: bigint; endNs?: bigint; } /** * Options for [`Conversation::enableProposals`]. Mirrors * [`xmtp_mls::groups::EnableProposalsOptions`]. */ export interface EnableProposalsOptions { /** * Skip the pre-flight key-package capability check. Post-d14n * every client supports proposals by version floor alone; set * `true` to bypass the per-member scan in that environment. */ force?: boolean; /** * Override the `MIN_SUPPORTED_PROTOCOL_VERSION` floor. `None` * defaults to `xmtp_configuration::PROPOSALS_MIN_PROTOCOL_VERSION`. */ minVersion?: string; } /** * Options for [`Conversation::updateAppData`]. An object (rather than * a bare string parameter) so future knobs can be added without * breaking callers — same pattern as [`EnableProposalsOptions`]. * New fields must be `Option` + `#[serde(default)]` to stay non-breaking. */ export interface UpdateAppDataOptions { /** * The new value for the group\'s opaque `APP_DATA` string slot. */ value: string; } /** * Options for `waitForRegistrationVisible`. * * Both `quorumPercentage` and `quorumAbsolute` are optional; if neither is * provided, the default of 50 % is used. When both are provided, * `quorumAbsolute` takes precedence. */ export interface WasmVisibilityConfirmationOptions { /** * Fraction of nodes that must confirm (e.g. 0.5 for 50 %). */ quorumPercentage?: number; /** * Exact number of nodes that must confirm. */ quorumAbsolute?: number; /** * Maximum wait time in milliseconds (default: 30 000). */ timeoutMs?: number; } /** * Options for creating or sending an archive */ export interface ArchiveOptions { startNs?: bigint; endNs?: bigint; elements: BackupElementSelectionOption[]; excludeDisappearingMessages: boolean; } /** * Options for the top-level `send*` convenience helpers. `shouldPush` is * derived from the content type\'s codec, so callers only control optimistic * delivery and the idempotency key. */ export interface SendOpts { optimistic?: boolean; /** * Optional idempotency key. Re-sending identical content with the same key * produces the same message id and is deduplicated. Defaults to a timestamp. */ idempotencyKey?: string; } /** * Result of encrypting an attachment for remote storage. */ export interface EncryptedAttachment { /** * The encrypted bytes to upload to the remote server */ payload: Uint8Array; /** * SHA-256 digest of the encrypted bytes (hex-encoded) */ contentDigest: string; /** * The 32-byte secret key needed for decryption */ secret: Uint8Array; /** * The 32-byte salt used in key derivation */ salt: Uint8Array; /** * The 12-byte nonce used in encryption */ nonce: Uint8Array; /** * The length of the encrypted content */ contentLength: number; /** * The filename of the attachment */ filename?: string; } /** * Specify options for the logger */ export interface LogOptions { /** * enable structured JSON logging to stdout. Useful for third-party log viewers */ structured?: boolean; /** * enable performance metrics for libxmtp in the `performance` tab */ performance?: boolean; /** * filter for logs */ level?: LogLevel; } /** * Tuning for the background worker scheduler. All fields optional. */ export interface WorkerConfigOptions { /** * Global default interval for all workers, in nanoseconds. */ defaultIntervalNs?: number; /** * Per-worker interval overrides (nanoseconds). */ workerIntervalsNs?: WorkerIntervalOverride[]; /** * Per-worker jitter overrides (nanoseconds). */ workerJittersNs?: WorkerJitterOverride[]; /** * Workers to disable. */ disabledWorkers?: WorkerKind[]; } export interface Action { id: string; label: string; imageUrl?: string; style?: ActionStyle; expiresAtNs?: bigint; } export interface Actions { id: string; description: string; actions: Action[]; expiresAtNs?: bigint; } export interface ApiStats { uploadKeyPackage: bigint; fetchKeyPackage: bigint; sendGroupMessages: bigint; sendWelcomeMessages: bigint; queryGroupMessages: bigint; queryWelcomeMessages: bigint; subscribeMessages: bigint; subscribeWelcomes: bigint; } export interface Attachment { filename?: string; mimeType: string; content: Uint8Array; } export interface Consent { entityType: ConsentEntityType; state: ConsentState; entity: string; } export interface ContentTypeId { authorityId: string; typeId: string; versionMajor: number; versionMinor: number; } export interface ConversationDebugInfo { epoch: bigint; maybeForked: boolean; forkDetails: string; isCommitLogForked?: boolean; localCommitLog: string; remoteCommitLog: string; cursor: Cursor[]; } export interface CreateDmOptions { messageDisappearingSettings?: MessageDisappearingSettings; } export interface CreateGroupOptions { permissions?: GroupPermissionsOptions; groupName?: string; groupImageUrlSquare?: string; groupDescription?: string; customPermissionPolicySet?: PermissionPolicySet; messageDisappearingSettings?: MessageDisappearingSettings; appData?: string; } export interface Credential { name?: string; value: string; expiresAtSeconds: bigint; } export interface Cursor { originatorId: number; sequenceId: bigint; } export interface DecodedMessage { id: string; sentAtNs: bigint; kind: GroupMessageKind; senderInstallationId: string; senderInboxId: string; contentType: ContentTypeId; conversationId: string; content: DecodedMessageContent; fallback?: string; reactions: DecodedMessage[]; deliveryStatus: DeliveryStatus; numReplies: bigint; expiresAtNs: bigint | undefined; } export interface DeletedMessage { deletedBy: DeletedBy; adminInboxId?: string; } export interface EncodedContent { type?: ContentTypeId; parameters: Record; fallback?: string; compression?: number; content: Uint8Array; } export interface EnrichedReply { referenceId: string; content: DecodedMessageContent; inReplyTo?: DecodedMessage; } export interface GroupMember { inboxId: string; accountIdentifiers: Identifier[]; installationIds: string[]; permissionLevel: PermissionLevel; consentState: ConsentState; } export interface GroupMetadata { creatorInboxId: string; conversationType: ConversationType; } export interface GroupPermissions { policyType: GroupPermissionsOptions; policySet: PermissionPolicySet; } export interface GroupSyncSummary { numEligible: number; numSynced: number; } export interface GroupUpdated { initiatedByInboxId: string; addedInboxes: Inbox[]; removedInboxes: Inbox[]; leftInboxes: Inbox[]; metadataFieldChanges: MetadataFieldChange[]; addedAdminInboxes: Inbox[]; removedAdminInboxes: Inbox[]; addedSuperAdminInboxes: Inbox[]; removedSuperAdminInboxes: Inbox[]; } export interface HmacKey { key: Uint8Array; epoch: bigint; } export interface Identifier { identifier: string; identifierKind: IdentifierKind; } export interface IdentityStats { publishIdentityUpdate: bigint; getIdentityUpdatesV2: bigint; getInboxIds: bigint; verifySmartContractWalletSignature: bigint; } export interface Inbox { inboxId: string; } export interface InboxState { inboxId: string; recoveryIdentifier: Identifier; installations: Installation[]; accountIdentifiers: Identifier[]; } export interface Installation { bytes: Uint8Array; id: string; clientTimestampNs?: bigint; } export interface Intent { id: string; actionId: string; metadata?: Record; } export interface KeyPackageStatus { lifetime?: Lifetime; validationError?: string; } export interface LeaveRequest { authenticatedNote?: Uint8Array; } export interface Lifetime { notBefore: bigint; notAfter: bigint; } export interface ListConversationsOptions { consentStates?: ConsentState[]; conversationType?: ConversationType; createdAfterNs?: bigint; createdBeforeNs?: bigint; includeDuplicateDms?: boolean; orderBy?: ListConversationsOrderBy; limit?: bigint; } export interface ListMessagesOptions { contentTypes?: ContentType[]; excludeContentTypes?: ContentType[]; sentBeforeNs?: bigint; sentAfterNs?: bigint; limit?: bigint; deliveryStatus?: DeliveryStatus; direction?: SortDirection; kind?: GroupMessageKind; excludeSenderInboxIds?: string[]; sortBy?: MessageSortBy; insertedAfterNs?: bigint; insertedBeforeNs?: bigint; } export interface Message { id: string; sentAtNs: bigint; convoId: string; senderInboxId: string; content: EncodedContent; kind: GroupMessageKind; deliveryStatus: DeliveryStatus; } export interface MessageDisappearingSettings { fromNs: bigint; inNs: bigint; } export interface MetadataFieldChange { fieldName: string; oldValue?: string; newValue?: string; } export interface MultiRemoteAttachment { attachments: RemoteAttachment[]; } export interface PasskeySignature { publicKey: Uint8Array; signature: Uint8Array; authenticatorData: Uint8Array; clientDataJson: Uint8Array; } export interface PermissionPolicySet { addMemberPolicy: PermissionPolicy; removeMemberPolicy: PermissionPolicy; addAdminPolicy: PermissionPolicy; removeAdminPolicy: PermissionPolicy; updateGroupNamePolicy: PermissionPolicy; updateGroupDescriptionPolicy: PermissionPolicy; updateGroupImageUrlSquarePolicy: PermissionPolicy; updateMessageDisappearingPolicy: PermissionPolicy; updateAppDataPolicy: PermissionPolicy; } export interface Reaction { reference: string; referenceInboxId: string; action: ReactionAction; content: string; schema: ReactionSchema; } export interface RemoteAttachment { url: string; contentDigest: string; secret: Uint8Array; salt: Uint8Array; nonce: Uint8Array; scheme: string; contentLength?: number; filename?: string; } export interface Reply { content: EncodedContent; reference: string; referenceInboxId?: string; } export interface SendMessageOpts { shouldPush: boolean; optimistic?: boolean; /** * Optional idempotency key. Re-sending identical content with the same key * produces the same message id and is deduplicated. Defaults to a timestamp. */ idempotencyKey?: string; } export interface TransactionMetadata { transactionType: string; currency: string; amount: number; decimals: number; fromAddress: string; toAddress: string; } export interface TransactionReference { namespace?: string; networkId: string; reference: string; metadata?: TransactionMetadata; } export interface WalletCall { to?: string; data?: string; value?: string; gas?: string; metadata?: Record; } export interface WalletSendCalls { version: string; chainId: string; from: string; calls: WalletCall[]; capabilities?: Record; } export type DecodedMessageContent = { type: "actions"; content: Actions | undefined } | { type: "attachment"; content: Attachment } | { type: "custom"; content: EncodedContent } | { type: "groupUpdated"; content: GroupUpdated } | { type: "intent"; content: Intent | undefined } | { type: "leaveRequest"; content: LeaveRequest } | { type: "markdown"; content: string } | { type: "multiRemoteAttachment"; content: MultiRemoteAttachment } | { type: "reaction"; content: Reaction } | { type: "readReceipt"; content: ReadReceipt } | { type: "remoteAttachment"; content: RemoteAttachment } | { type: "reply"; content: EnrichedReply } | { type: "text"; content: string } | { type: "transactionReference"; content: TransactionReference } | { type: "walletSendCalls"; content: WalletSendCalls } | { type: "deletedMessage"; content: DeletedMessage }; export type ReadReceipt = Record; export type UserPreferenceUpdate = { type: "ConsentUpdate"; consent: Consent } | { type: "HmacKeyUpdate"; key: number[] }; export enum ActionStyle { Primary = 0, Secondary = 1, Danger = 2, } export class AuthHandle { free(): void; [Symbol.dispose](): void; id(): number; constructor(); set(credential: Credential): Promise; } export class Backend { private constructor(); free(): void; [Symbol.dispose](): void; readonly appVersion: string; readonly env: XmtpEnv; readonly gatewayHost: string | undefined; readonly v3Host: string | undefined; } export class BackendBuilder { free(): void; [Symbol.dispose](): void; authCallback(callback: any): void; authHandle(handle: AuthHandle): void; build(): Backend; constructor(env: XmtpEnv); setApiUrl(api_url: string): BackendBuilder; setAppVersion(app_version: string): BackendBuilder; setGatewayHost(gateway_host: string): BackendBuilder; setReadonly(readonly: boolean): BackendBuilder; env: XmtpEnv; get readonly(): boolean | undefined; set readonly(value: boolean | null | undefined); } /** * Selection of what elements to include in a backup */ export enum BackupElementSelectionOption { Messages = 0, Consent = 1, } export class Client { private constructor(); free(): void; [Symbol.dispose](): void; addWalletSignatureRequest(newIdentifier: Identifier): Promise; apiAggregateStatistics(): string; apiIdentityStatistics(): IdentityStats; apiStatistics(): ApiStats; applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise; /** * Output booleans should be zipped with the index of input identifiers */ canMessage(accountIdentifiers: Identifier[]): Promise; changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise; clearAllStatistics(): void; conversations(): Conversations; createInboxSignatureRequest(): SignatureRequestHandle | undefined; device_sync(): DeviceSync; fetchLatestInboxUpdatesCount(refresh_from_network: boolean, inbox_ids: string[]): Promise; fetchOwnInboxUpdatesCount(refresh_from_network: boolean): Promise; findInboxIdByIdentity(identifier: Identifier): Promise; getConsentState(entityType: ConsentEntityType, entity: string): Promise; /** * * * Get key package statuses for a list of installation IDs. * * * * Returns a JavaScript object mapping installation ID strings to KeyPackageStatus objects. * */ getKeyPackageStatusesForInstallationIds(installationIds: string[]): Promise; getLatestInboxState(inboxId: string): Promise; /** * * * Get the client's inbox state. * * * * If `refresh_from_network` is true, the client will go to the network first to refresh the state. * * Otherwise, the state will be read from the local database. * */ inboxState(refreshFromNetwork: boolean): Promise; inboxStateFromInboxIds(inboxIds: string[], refreshFromNetwork: boolean): Promise; registerIdentity(signatureRequest: SignatureRequestHandle, visibilityConfirmationOptions?: WasmVisibilityConfirmationOptions | null): Promise; revokeAllOtherInstallationsSignatureRequest(): Promise; revokeInstallationsSignatureRequest(installationIds: Uint8Array[]): Promise; revokeWalletSignatureRequest(identifier: Identifier): Promise; setConsentStates(records: Consent[]): Promise; signWithInstallationKey(signatureText: string): Uint8Array; syncPreferences(): Promise; verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void; /** * Wait until this client's registration is visible on the network. * * For V3 clients (no cursor stored) this falls back to checking * `isRegistered`. For D14n clients it polls each node directly and * returns once a quorum confirms both the identity-update and * key-package envelopes are visible. */ waitForRegistrationVisible(options?: WasmVisibilityConfirmationOptions | null): Promise; readonly accountIdentifier: Identifier; readonly appVersion: string; readonly inboxId: string; readonly installationId: string; readonly installationIdBytes: Uint8Array; readonly isRegistered: boolean; readonly libxmtpVersion: string; } export enum ClientMode { Default = 0, Notification = 1, } export enum ConsentEntityType { GroupId = 0, InboxId = 1, } export enum ConsentState { Unknown = 0, Allowed = 1, Denied = 2, } export enum ContentType { Actions = 0, Attachment = 1, Custom = 2, GroupMembershipChange = 3, GroupUpdated = 4, Intent = 5, LeaveRequest = 6, Markdown = 7, MultiRemoteAttachment = 8, Reaction = 9, ReadReceipt = 10, RemoteAttachment = 11, Reply = 12, Text = 13, TransactionReference = 14, WalletSendCalls = 15, } export class Conversation { private constructor(); free(): void; [Symbol.dispose](): void; addAdmin(inboxId: string): Promise; addMembers(inboxIds: string[]): Promise; addMembersByIdentity(accountIdentifiers: Identifier[]): Promise; addSuperAdmin(inboxId: string): Promise; addedByInboxId(): string; adminList(): string[]; appData(): string; consentState(): ConsentState; countMessages(opts?: ListMessagesOptions | null): Promise; createdAtNs(): bigint; dmPeerInboxId(): string; findDuplicateDms(): Promise; findEnrichedMessages(opts?: ListMessagesOptions | null): Promise; findMessages(opts?: ListMessagesOptions | null): Promise; getDebugInfo(): Promise; getHmacKeys(): any; getLastReadTimes(): Promise; groupDescription(): string; groupImageUrlSquare(): string; groupMetadata(): Promise; groupName(): string; groupPermissions(): GroupPermissions; id(): string; isActive(): boolean; isAdmin(inboxId: string): boolean; isMessageDisappearingEnabled(): boolean; isSuperAdmin(inboxId: string): boolean; leaveGroup(): Promise; listMembers(): Promise; membershipState(): GroupMembershipState; messageDisappearingSettings(): MessageDisappearingSettings | undefined; pausedForVersion(): string | undefined; /** * Prepare a message for later publishing. * Stores the message locally without publishing. Returns the message ID. */ prepareMessage(encodedContent: EncodedContent, shouldPush: boolean, idempotencyKey?: string | null): string; processStreamedGroupMessage(envelopeBytes: Uint8Array): Promise; /** * Whether this group has migrated to AppData-proposal-based * metadata updates (the `AppDataDictionary` group-context * extension is present). `false` means the group is still on * the legacy GroupContextExtensions path. */ proposalsEnabled(): boolean; /** * Publish all unpublished messages */ publishMessages(): Promise; /** * Publish a previously prepared message by ID. */ publishStoredMessage(messageId: string): Promise; removeAdmin(inboxId: string): Promise; removeMembers(inboxIds: string[]): Promise; removeMembersByIdentity(accountIdentifiers: Identifier[]): Promise; removeMessageDisappearingSettings(): Promise; removeSuperAdmin(inboxId: string): Promise; send(encodedContent: EncodedContent, opts: SendMessageOpts): Promise; sendActions(actions: Actions, opts?: SendOpts | null): Promise; sendAttachment(attachment: Attachment, opts?: SendOpts | null): Promise; sendIntent(intent: Intent, opts?: SendOpts | null): Promise; sendMarkdown(markdown: string, opts?: SendOpts | null): Promise; sendMultiRemoteAttachment(multiRemoteAttachment: MultiRemoteAttachment, opts?: SendOpts | null): Promise; sendReaction(reaction: Reaction, opts?: SendOpts | null): Promise; sendReadReceipt(opts?: SendOpts | null): Promise; sendRemoteAttachment(remoteAttachment: RemoteAttachment, opts?: SendOpts | null): Promise; sendReply(reply: Reply, opts?: SendOpts | null): Promise; sendText(text: string, opts?: SendOpts | null): Promise; sendTransactionReference(transactionReference: TransactionReference, opts?: SendOpts | null): Promise; sendWalletSendCalls(walletSendCalls: WalletSendCalls, opts?: SendOpts | null): Promise; stream(callback: any): StreamCloser; superAdminList(): string[]; sync(): Promise; updateAppData(options: UpdateAppDataOptions): Promise; updateConsentState(state: ConsentState): void; updateGroupDescription(groupDescription: string): Promise; updateGroupImageUrlSquare(groupImageUrlSquare: string): Promise; updateGroupName(groupName: string): Promise; updateMessageDisappearingSettings(settings: MessageDisappearingSettings): Promise; updatePermissionPolicy(permissionUpdateType: PermissionUpdateType, permissionPolicyOption: PermissionPolicy, metadataField?: MetadataField | null): Promise; /** * Pre-release APIs, gated behind an explicit `.unstable` opt-in. * See [`UnstableConversation`]. */ readonly unstable: UnstableConversation; } export class ConversationListItem { free(): void; [Symbol.dispose](): void; constructor(conversation: Conversation, lastMessage?: Message | null, isCommitLogForked?: boolean | null); conversation: Conversation; get isCommitLogForked(): boolean | undefined; set isCommitLogForked(value: boolean | null | undefined); get lastMessage(): Message | undefined; set lastMessage(value: Message | null | undefined); } export enum ConversationType { Dm = 0, Group = 1, Sync = 2, Oneshot = 3, } export class Conversations { private constructor(); free(): void; [Symbol.dispose](): void; createDm(accountIdentifier: Identifier, options?: CreateDmOptions | null): Promise; createDmByInboxId(inboxId: string, options?: CreateDmOptions | null): Promise; createGroup(accountIdentifiers: Identifier[], options?: CreateGroupOptions | null): Promise; createGroupByInboxIds(inboxIds: string[], options?: CreateGroupOptions | null): Promise; createGroupOptimistic(options?: CreateGroupOptions | null): Conversation; deleteMessageById(messageId: string): number; findDmByTargetInboxId(targetInboxId: string): Conversation; findEnrichedMessageById(messageId: string): Promise; findGroupById(groupId: string): Conversation; findMessageById(messageId: string): Message; getHmacKeys(): any; list(opts?: ListConversationsOptions | null): Array; stream(callback: any, conversationType?: ConversationType | null): StreamCloser; streamAllMessages(callback: any, conversationType?: ConversationType | null, consentStates?: any[] | null): StreamCloser; streamConsent(callback: any): StreamCloser; /** * Returns a 'ReadableStream' of Conversations */ streamLocal(conversationType?: ConversationType | null): Promise; streamMessageDeletions(callback: any): StreamCloser; streamPreferences(callback: any): StreamCloser; sync(): Promise; syncAllConversations(consentStates?: any[] | null): Promise; } export enum DeletedBy { Sender = 0, Admin = 1, } export enum DeliveryStatus { Unpublished = 0, Published = 1, Failed = 2, } export class DeviceSync { private constructor(); free(): void; [Symbol.dispose](): void; /** * Load the metadata for an archive to see what it contains. */ archiveMetadata(data: Uint8Array, key: Uint8Array): Promise; /** * Export archive data to bytes for later restoration. */ createArchive(opts: ArchiveOptions, key: Uint8Array): Promise; /** * Import an archive from bytes. */ importArchive(data: Uint8Array, key: Uint8Array): Promise; /** * List the archives available for import in the sync group. * You may need to manually sync the sync group before calling * this function to see recently uploaded archives. */ listAvailableArchives(daysCutoff: bigint): AvailableArchiveInfo[]; /** * Manually process a sync archive that matches the pin given. * If no pin is given, then it will process the last archive sent. */ processSyncArchive(archive_pin?: string | null): Promise; /** * Manually send a sync archive to the sync group. * The pin will be later used for reference when importing. */ sendSyncArchive(options: ArchiveOptions, serverUrl: string, pin: string): Promise; /** * Manually trigger a device sync request to sync records from another active device on this account. */ sendSyncRequest(options: ArchiveOptions, serverUrl: string): Promise; /** * Manually sync all device sync groups. */ syncAllDeviceSyncGroups(): Promise; } export enum DeviceSyncMode { Enabled = 0, Disabled = 1, } export enum GroupMembershipState { Allowed = 0, Rejected = 1, Pending = 2, Restored = 3, PendingRemove = 4, } export enum GroupMessageKind { Application = 0, MembershipChange = 1, } export enum GroupPermissionsOptions { Default = 0, AdminOnly = 1, CustomPolicy = 2, } export enum IdentifierKind { Ethereum = 0, Passkey = 1, } export class IntoUnderlyingByteSource { private constructor(); free(): void; [Symbol.dispose](): void; cancel(): void; pull(controller: ReadableByteStreamController): Promise; start(controller: ReadableByteStreamController): void; readonly autoAllocateChunkSize: number; readonly type: ReadableStreamType; } export class IntoUnderlyingSink { private constructor(); free(): void; [Symbol.dispose](): void; abort(reason: any): Promise; close(): Promise; write(chunk: any): Promise; } export class IntoUnderlyingSource { private constructor(); free(): void; [Symbol.dispose](): void; cancel(): void; pull(controller: ReadableStreamDefaultController): Promise; } export enum ListConversationsOrderBy { CreatedAt = 0, LastActivity = 1, } export enum LogLevel { Off = 0, Error = 1, Warn = 2, Info = 3, Debug = 4, Trace = 5, } export enum MessageSortBy { SentAt = 0, InsertedAt = 1, } export enum MetadataField { AppData = 0, Description = 1, GroupName = 2, GroupImageUrlSquare = 3, MessageExpirationFromNs = 4, MessageExpirationInNs = 5, } export enum PermissionLevel { Member = 0, Admin = 1, SuperAdmin = 2, } export enum PermissionPolicy { Allow = 0, Deny = 1, Admin = 2, SuperAdmin = 3, DoesNotExist = 4, Other = 5, } export enum PermissionUpdateType { AddMember = 0, RemoveMember = 1, AddAdmin = 2, RemoveAdmin = 3, UpdateMetadata = 4, } export enum ReactionAction { Unknown = 0, Added = 1, Removed = 2, } export enum ReactionSchema { Unknown = 0, Unicode = 1, Shortcode = 2, Custom = 3, } export class SignatureRequestHandle { private constructor(); free(): void; [Symbol.dispose](): void; addEcdsaSignature(signatureBytes: Uint8Array): Promise; addPasskeySignature(signature: PasskeySignature): Promise; addScwSignature(accountIdentifier: Identifier, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | null): Promise; signatureText(): Promise; } export enum SortDirection { Ascending = 0, Descending = 1, } export class StreamCloser { private constructor(); free(): void; [Symbol.dispose](): void; /** * Signal the stream to end * Does not wait for the stream to end. */ end(): void; /** * End the stream and `await` for it to shutdown * Returns the `Result` of the task. * End the stream and asynchronously wait for it to shutdown */ endAndWait(): Promise; /** * Checks if this stream is closed */ isClosed(): boolean; waitForReady(): Promise; } /** * The pre-release surface of a [`Conversation`], reached through * `conversation.unstable`. * * Everything here is unstable: the API shape may still change and, in * some cases (see [`UnstableConversation::enable_proposals`]), the * effect is one-way and irreversible. Reaching into `.unstable` is the * deliberate opt-in. When an API graduates it moves onto * [`Conversation`] directly and is removed here, so callers of the * `unstable` form get a compile-time break to migrate against. */ export class UnstableConversation { private constructor(); free(): void; [Symbol.dispose](): void; /** * Enable AppData-proposal-based metadata updates on this group. * * Stages the bootstrap commit that migrates the group's metadata * from the legacy GroupContextExtensions shape into the OpenMLS * AppData dictionary. Hard-fails if any member's latest key package * doesn't advertise `ProposalType::AppDataUpdate`. One-way: * migrated groups cannot return to the legacy path. */ enableProposals(options: EnableProposalsOptions): Promise; } /** * Runtime test harness support instantiated in JS. * * The node.js entry script instantiates a `Context` here which is used to * drive test execution. */ export class WasmBindgenTestContext { free(): void; [Symbol.dispose](): void; /** * Handle filter argument. */ filtered_count(filtered: number): void; /** * Handle `--include-ignored` flag. */ include_ignored(include_ignored: boolean): void; /** * Creates a new context ready to run tests. * * A `Context` is the main structure through which test execution is * coordinated, and this will collect output and results for all executed * tests. */ constructor(is_bench: boolean); /** * Executes a list of tests, returning a promise representing their * eventual completion. * * This is the main entry point for executing tests. All the tests passed * in are the JS `Function` object that was plucked off the * `WebAssembly.Instance` exports list. * * The promise returned resolves to either `true` if all tests passed or * `false` if at least one test failed. */ run(tests: any[]): Promise; } export enum WorkerKind { DeviceSync = 0, DisappearingMessages = 1, KeyPackageCleaner = 2, CommitLog = 3, TaskRunner = 4, } export enum XmtpEnv { Local = 0, Dev = 1, Production = 2, TestnetStaging = 3, TestnetDev = 4, Testnet = 5, Mainnet = 6, } /** * Used to read benchmark data, and then the runner stores it on the local disk. */ export function __wbgbench_dump(): Uint8Array | undefined; /** * Used to write previous benchmark data before the benchmark, for later comparison. */ export function __wbgbench_import(baseline: Uint8Array): void; /** * Handler for `console.debug` invocations. See above. */ export function __wbgtest_console_debug(args: Array): void; /** * Handler for `console.error` invocations. See above. */ export function __wbgtest_console_error(args: Array): void; /** * Handler for `console.info` invocations. See above. */ export function __wbgtest_console_info(args: Array): void; /** * Handler for `console.log` invocations. * * If a test is currently running it takes the `args` array and stringifies * it and appends it to the current output of the test. Otherwise it passes * the arguments to the original `console.log` function, psased as * `original`. */ export function __wbgtest_console_log(args: Array): void; /** * Handler for `console.warn` invocations. See above. */ export function __wbgtest_console_warn(args: Array): void; export function __wbgtest_cov_dump(): Uint8Array | undefined; /** * Path to use for coverage data. */ export function __wbgtest_coverage_path(env: string | null | undefined, pid: number, temp_dir: string, module_signature: bigint): string; export function __wbgtest_module_signature(): bigint | undefined; export function applySignatureRequest(backend: Backend, signatureRequest: SignatureRequestHandle): Promise; export function contentTypeActions(): ContentTypeId; export function contentTypeAttachment(): ContentTypeId; export function contentTypeGroupUpdated(): ContentTypeId; export function contentTypeIntent(): ContentTypeId; export function contentTypeLeaveRequest(): ContentTypeId; export function contentTypeMarkdown(): ContentTypeId; export function contentTypeMultiRemoteAttachment(): ContentTypeId; export function contentTypeReaction(): ContentTypeId; export function contentTypeReadReceipt(): ContentTypeId; export function contentTypeRemoteAttachment(): ContentTypeId; export function contentTypeReply(): ContentTypeId; export function contentTypeText(): ContentTypeId; export function contentTypeTransactionReference(): ContentTypeId; export function contentTypeWalletSendCalls(): ContentTypeId; export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncMode?: DeviceSyncMode | null, workerConfig?: WorkerConfigOptions | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, appVersion?: string | null, gatewayHost?: string | null, nonce?: bigint | null, authCallback?: any | null, authHandle?: AuthHandle | null, clientMode?: ClientMode | null): Promise; /** * Create a client from a pre-built Backend. * * The Backend encapsulates all API configuration (env, hosts, auth, TLS). * This function only needs identity and database configuration. */ export function createClientWithBackend(backend: Backend, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncMode?: DeviceSyncMode | null, workerConfig?: WorkerConfigOptions | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, nonce?: bigint | null): Promise; /** * Decrypts an encrypted payload from a remote attachment. */ export function decryptAttachment(encryptedBytes: Uint8Array, remoteAttachment: RemoteAttachment): Attachment; export function encodeActions(actions: Actions): EncodedContent; export function encodeAttachment(attachment: Attachment): EncodedContent; export function encodeIntent(intent: Intent): EncodedContent; export function encodeMarkdown(text: string): EncodedContent; export function encodeMultiRemoteAttachment(multi_remote_attachment: MultiRemoteAttachment): EncodedContent; export function encodeReaction(reaction: Reaction): EncodedContent; export function encodeReadReceipt(read_receipt: ReadReceipt): EncodedContent; export function encodeRemoteAttachment(remote_attachment: RemoteAttachment): EncodedContent; export function encodeText(text: string): EncodedContent; export function encodeTransactionReference(transaction_reference: TransactionReference): EncodedContent; export function encodeWalletSendCalls(wallet_send_calls: WalletSendCalls): EncodedContent; /** * Encrypts an attachment for storage as a remote attachment. */ export function encryptAttachment(attachment: Attachment): EncryptedAttachment; export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string; export function getInboxIdForIdentifier(backend: Backend, accountIdentifier: Identifier): Promise; export function inboxStateFromInboxIds(backend: Backend, inboxIds: string[]): Promise; export function metadataFieldName(field: MetadataField): string; /** * Delete all database files from OPFS. * Note: All databases must be closed before calling this function. */ export function opfsClearAll(): Promise; /** * Delete a specific database file from OPFS. * Returns true if the file was deleted, false if it didn't exist. * Note: The database must be closed before calling this function. */ export function opfsDeleteFile(filename: string): Promise; /** * Export a database file from OPFS as a byte array. * This can be used to backup or transfer a database. * Note: The database should be closed before exporting for consistency. */ export function opfsExportDb(filename: string): Promise; /** * Get the number of database files stored in OPFS. */ export function opfsFileCount(): Promise; /** * Check if a database file exists in OPFS. */ export function opfsFileExists(filename: string): Promise; /** * Import a database from a byte array into OPFS. * This will overwrite any existing database with the same name. * The byte array must contain a valid SQLite database. * Note: Any existing database with the same name must be closed before importing. */ export function opfsImportDb(filename: string, data: Uint8Array): Promise; /** * Initialize the OPFS SQLite VFS if not already initialized. * This must be called before using other OPFS functions. */ export function opfsInit(): Promise; /** * List all database files stored in OPFS. * Returns an array of file names. */ export function opfsListFiles(): Promise; /** * Get the current capacity of the OPFS file pool. */ export function opfsPoolCapacity(): Promise; export function revokeInstallationsSignatureRequest(backend: Backend, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle; /** * Entry point invoked by JavaScript in a worker. */ export function task_worker_entry_point(ptr: number): void; export function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void; export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module; export interface InitOutput { readonly memory: WebAssembly.Memory; readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any; readonly client_setConsentStates: (a: number, b: number, c: number) => any; readonly conversation_consentState: (a: number) => [number, number, number]; readonly conversation_updateConsentState: (a: number, b: number) => [number, number]; readonly metadataFieldName: (a: number) => [number, number]; readonly __wbg_backend_free: (a: number, b: number) => void; readonly __wbg_backendbuilder_free: (a: number, b: number) => void; readonly __wbg_client_free: (a: number, b: number) => void; readonly __wbg_conversation_free: (a: number, b: number) => void; readonly __wbg_conversationlistitem_free: (a: number, b: number) => void; readonly __wbg_conversations_free: (a: number, b: number) => void; readonly __wbg_devicesync_free: (a: number, b: number) => void; readonly __wbg_get_backendbuilder_env: (a: number) => number; readonly __wbg_get_backendbuilder_readonly: (a: number) => number; readonly __wbg_get_conversationlistitem_conversation: (a: number) => number; readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number; readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any; readonly __wbg_set_backendbuilder_env: (a: number, b: number) => void; readonly __wbg_set_backendbuilder_readonly: (a: number, b: number) => void; readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void; readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void; readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void; readonly __wbg_streamcloser_free: (a: number, b: number) => void; readonly __wbg_unstableconversation_free: (a: number, b: number) => void; readonly backend_appVersion: (a: number) => [number, number]; readonly backend_env: (a: number) => number; readonly backend_gatewayHost: (a: number) => [number, number]; readonly backend_v3Host: (a: number) => [number, number]; readonly backendbuilder_authCallback: (a: number, b: any) => void; readonly backendbuilder_authHandle: (a: number, b: number) => void; readonly backendbuilder_build: (a: number) => [number, number, number]; readonly backendbuilder_new: (a: number) => number; readonly backendbuilder_setApiUrl: (a: number, b: number, c: number) => number; readonly backendbuilder_setAppVersion: (a: number, b: number, c: number) => number; readonly backendbuilder_setGatewayHost: (a: number, b: number, c: number) => number; readonly backendbuilder_setReadonly: (a: number, b: number) => number; readonly client_accountIdentifier: (a: number) => any; readonly client_apiAggregateStatistics: (a: number) => [number, number]; readonly client_apiIdentityStatistics: (a: number) => any; readonly client_apiStatistics: (a: number) => any; readonly client_appVersion: (a: number) => [number, number]; readonly client_canMessage: (a: number, b: number, c: number) => any; readonly client_clearAllStatistics: (a: number) => void; readonly client_conversations: (a: number) => number; readonly client_device_sync: (a: number) => number; readonly client_findInboxIdByIdentity: (a: number, b: any) => any; readonly client_inboxId: (a: number) => [number, number]; readonly client_inboxStateFromInboxIds: (a: number, b: number, c: number, d: number) => any; readonly client_installationId: (a: number) => [number, number]; readonly client_installationIdBytes: (a: number) => any; readonly client_isRegistered: (a: number) => number; readonly client_libxmtpVersion: (a: number) => [number, number]; readonly client_syncPreferences: (a: number) => any; readonly client_waitForRegistrationVisible: (a: number, b: number) => any; readonly contentTypeActions: () => any; readonly contentTypeAttachment: () => any; readonly contentTypeGroupUpdated: () => any; readonly contentTypeIntent: () => any; readonly contentTypeLeaveRequest: () => any; readonly contentTypeMultiRemoteAttachment: () => any; readonly contentTypeReaction: () => any; readonly contentTypeReadReceipt: () => any; readonly contentTypeRemoteAttachment: () => any; readonly contentTypeTransactionReference: () => any; readonly contentTypeWalletSendCalls: () => any; readonly conversation_addAdmin: (a: number, b: number, c: number) => any; readonly conversation_addMembers: (a: number, b: number, c: number) => any; readonly conversation_addMembersByIdentity: (a: number, b: number, c: number) => any; readonly conversation_addSuperAdmin: (a: number, b: number, c: number) => any; readonly conversation_addedByInboxId: (a: number) => [number, number, number, number]; readonly conversation_adminList: (a: number) => [number, number, number, number]; readonly conversation_appData: (a: number) => [number, number, number, number]; readonly conversation_countMessages: (a: number, b: number) => any; readonly conversation_createdAtNs: (a: number) => bigint; readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number]; readonly conversation_findDuplicateDms: (a: number) => any; readonly conversation_findEnrichedMessages: (a: number, b: number) => any; readonly conversation_findMessages: (a: number, b: number) => any; readonly conversation_getDebugInfo: (a: number) => any; readonly conversation_getHmacKeys: (a: number) => [number, number, number]; readonly conversation_getLastReadTimes: (a: number) => any; readonly conversation_groupDescription: (a: number) => [number, number, number, number]; readonly conversation_groupImageUrlSquare: (a: number) => [number, number, number, number]; readonly conversation_groupMetadata: (a: number) => any; readonly conversation_groupName: (a: number) => [number, number, number, number]; readonly conversation_groupPermissions: (a: number) => [number, number, number]; readonly conversation_id: (a: number) => [number, number]; readonly conversation_isActive: (a: number) => [number, number, number]; readonly conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number]; readonly conversation_isMessageDisappearingEnabled: (a: number) => [number, number, number]; readonly conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number]; readonly conversation_leaveGroup: (a: number) => any; readonly conversation_listMembers: (a: number) => any; readonly conversation_membershipState: (a: number) => [number, number, number]; readonly conversation_messageDisappearingSettings: (a: number) => [number, number, number]; readonly conversation_pausedForVersion: (a: number) => [number, number, number, number]; readonly conversation_prepareMessage: (a: number, b: any, c: number, d: number, e: number) => [number, number, number, number]; readonly conversation_processStreamedGroupMessage: (a: number, b: any) => any; readonly conversation_proposalsEnabled: (a: number) => [number, number, number]; readonly conversation_publishMessages: (a: number) => any; readonly conversation_publishStoredMessage: (a: number, b: number, c: number) => any; readonly conversation_removeAdmin: (a: number, b: number, c: number) => any; readonly conversation_removeMembers: (a: number, b: number, c: number) => any; readonly conversation_removeMembersByIdentity: (a: number, b: number, c: number) => any; readonly conversation_removeMessageDisappearingSettings: (a: number) => any; readonly conversation_removeSuperAdmin: (a: number, b: number, c: number) => any; readonly conversation_send: (a: number, b: any, c: any) => any; readonly conversation_sendActions: (a: number, b: any, c: number) => any; readonly conversation_sendAttachment: (a: number, b: any, c: number) => any; readonly conversation_sendIntent: (a: number, b: any, c: number) => any; readonly conversation_sendMarkdown: (a: number, b: number, c: number, d: number) => any; readonly conversation_sendMultiRemoteAttachment: (a: number, b: any, c: number) => any; readonly conversation_sendReaction: (a: number, b: any, c: number) => any; readonly conversation_sendReadReceipt: (a: number, b: number) => any; readonly conversation_sendRemoteAttachment: (a: number, b: any, c: number) => any; readonly conversation_sendReply: (a: number, b: any, c: number) => any; readonly conversation_sendText: (a: number, b: number, c: number, d: number) => any; readonly conversation_sendTransactionReference: (a: number, b: any, c: number) => any; readonly conversation_sendWalletSendCalls: (a: number, b: any, c: number) => any; readonly conversation_stream: (a: number, b: any) => [number, number, number]; readonly conversation_superAdminList: (a: number) => [number, number, number, number]; readonly conversation_sync: (a: number) => any; readonly conversation_unstable: (a: number) => number; readonly conversation_updateAppData: (a: number, b: any) => any; readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any; readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any; readonly conversation_updateGroupName: (a: number, b: number, c: number) => any; readonly conversation_updateMessageDisappearingSettings: (a: number, b: any) => any; readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any; readonly conversationlistitem_new: (a: number, b: number, c: number) => number; readonly conversations_createDm: (a: number, b: any, c: number) => any; readonly conversations_createDmByInboxId: (a: number, b: number, c: number, d: number) => any; readonly conversations_createGroup: (a: number, b: number, c: number, d: number) => any; readonly conversations_createGroupByInboxIds: (a: number, b: number, c: number, d: number) => any; readonly conversations_createGroupOptimistic: (a: number, b: number) => [number, number, number]; readonly conversations_deleteMessageById: (a: number, b: number, c: number) => [number, number, number]; readonly conversations_findDmByTargetInboxId: (a: number, b: number, c: number) => [number, number, number]; readonly conversations_findEnrichedMessageById: (a: number, b: number, c: number) => any; readonly conversations_findGroupById: (a: number, b: number, c: number) => [number, number, number]; readonly conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number]; readonly conversations_getHmacKeys: (a: number) => [number, number, number]; readonly conversations_list: (a: number, b: number) => [number, number, number]; readonly conversations_stream: (a: number, b: any, c: number) => [number, number, number]; readonly conversations_streamAllMessages: (a: number, b: any, c: number, d: number, e: number) => [number, number, number]; readonly conversations_streamConsent: (a: number, b: any) => [number, number, number]; readonly conversations_streamLocal: (a: number, b: number) => any; readonly conversations_streamMessageDeletions: (a: number, b: any) => [number, number, number]; readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number]; readonly conversations_sync: (a: number) => any; readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any; readonly createClient: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: number, n: number, o: number, p: number, q: number, r: bigint, s: number, t: number, u: number) => any; readonly createClientWithBackend: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number, m: bigint) => any; readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number]; readonly devicesync_archiveMetadata: (a: number, b: any, c: any) => any; readonly devicesync_createArchive: (a: number, b: any, c: any) => any; readonly devicesync_importArchive: (a: number, b: any, c: any) => any; readonly devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number]; readonly devicesync_processSyncArchive: (a: number, b: number, c: number) => any; readonly devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any; readonly devicesync_sendSyncRequest: (a: number, b: any, c: number, d: number) => any; readonly devicesync_syncAllDeviceSyncGroups: (a: number) => any; readonly encodeActions: (a: any) => [number, number, number]; readonly encodeAttachment: (a: any) => [number, number, number]; readonly encodeIntent: (a: any) => [number, number, number]; readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number]; readonly encodeReaction: (a: any) => [number, number, number]; readonly encodeReadReceipt: (a: any) => [number, number, number]; readonly encodeRemoteAttachment: (a: any) => [number, number, number]; readonly encodeTransactionReference: (a: any) => [number, number, number]; readonly encodeWalletSendCalls: (a: any) => [number, number, number]; readonly encryptAttachment: (a: any) => [number, number, number]; readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number]; readonly getInboxIdForIdentifier: (a: number, b: any) => any; readonly streamcloser_end: (a: number) => void; readonly streamcloser_endAndWait: (a: number) => any; readonly streamcloser_isClosed: (a: number) => number; readonly streamcloser_waitForReady: (a: number) => any; readonly unstableconversation_enableProposals: (a: number, b: any) => any; readonly __wbg_authhandle_free: (a: number, b: number) => void; readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void; readonly applySignatureRequest: (a: number, b: number) => any; readonly authhandle_id: (a: number) => number; readonly authhandle_new: () => number; readonly authhandle_set: (a: number, b: any) => any; readonly client_addWalletSignatureRequest: (a: number, b: any) => any; readonly client_applySignatureRequest: (a: number, b: number) => any; readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any; readonly client_createInboxSignatureRequest: (a: number) => [number, number, number]; readonly client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any; readonly client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any; readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any; readonly client_getLatestInboxState: (a: number, b: number, c: number) => any; readonly client_inboxState: (a: number, b: number) => any; readonly client_registerIdentity: (a: number, b: number, c: number) => any; readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any; readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any; readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any; readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number]; readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number]; readonly inboxStateFromInboxIds: (a: number, b: number, c: number) => any; readonly revokeInstallationsSignatureRequest: (a: number, b: any, c: number, d: number, e: number, f: number) => [number, number, number]; readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any; readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any; readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any; readonly signaturerequesthandle_signatureText: (a: number) => any; readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number]; readonly contentTypeMarkdown: () => any; readonly contentTypeReply: () => any; readonly contentTypeText: () => any; readonly encodeMarkdown: (a: number, b: number) => [number, number, number]; readonly encodeText: (a: number, b: number) => [number, number, number]; readonly opfsClearAll: () => any; readonly opfsDeleteFile: (a: number, b: number) => any; readonly opfsExportDb: (a: number, b: number) => any; readonly opfsFileCount: () => any; readonly opfsFileExists: (a: number, b: number) => any; readonly opfsImportDb: (a: number, b: number, c: any) => any; readonly opfsInit: () => any; readonly opfsListFiles: () => any; readonly opfsPoolCapacity: () => any; readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number; readonly rust_zstd_wasm_shim_free: (a: number) => void; readonly rust_zstd_wasm_shim_malloc: (a: number) => number; readonly rust_zstd_wasm_shim_memcmp: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memcpy: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memmove: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_memset: (a: number, b: number, c: number) => number; readonly rust_zstd_wasm_shim_qsort: (a: number, b: number, c: number, d: number) => void; readonly rust_sqlite_wasm_abort: () => void; readonly rust_sqlite_wasm_assert_fail: (a: number, b: number, c: number, d: number) => void; readonly rust_sqlite_wasm_calloc: (a: number, b: number) => number; readonly rust_sqlite_wasm_malloc: (a: number) => number; readonly rust_sqlite_wasm_free: (a: number) => void; readonly rust_sqlite_wasm_getentropy: (a: number, b: number) => number; readonly rust_sqlite_wasm_localtime: (a: number) => number; readonly rust_sqlite_wasm_realloc: (a: number, b: number) => number; readonly sqlite3_os_end: () => number; readonly sqlite3_os_init: () => number; readonly task_worker_entry_point: (a: number) => [number, number]; readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void; readonly intounderlyingbytesource_autoAllocateChunkSize: (a: number) => number; readonly intounderlyingbytesource_cancel: (a: number) => void; readonly intounderlyingbytesource_pull: (a: number, b: any) => any; readonly intounderlyingbytesource_start: (a: number, b: any) => void; readonly intounderlyingbytesource_type: (a: number) => number; readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void; readonly intounderlyingsink_abort: (a: number, b: any) => any; readonly intounderlyingsink_close: (a: number) => any; readonly intounderlyingsink_write: (a: number, b: any) => any; readonly __wbg_intounderlyingsource_free: (a: number, b: number) => void; readonly intounderlyingsource_cancel: (a: number) => void; readonly intounderlyingsource_pull: (a: number, b: any) => any; readonly __wbg_wasmbindgentestcontext_free: (a: number, b: number) => void; readonly __wbgtest_console_debug: (a: any) => void; readonly __wbgtest_console_error: (a: any) => void; readonly __wbgtest_console_info: (a: any) => void; readonly __wbgtest_console_log: (a: any) => void; readonly __wbgtest_console_warn: (a: any) => void; readonly wasmbindgentestcontext_filtered_count: (a: number, b: number) => void; readonly wasmbindgentestcontext_include_ignored: (a: number, b: number) => void; readonly wasmbindgentestcontext_new: (a: number) => number; readonly wasmbindgentestcontext_run: (a: number, b: number, c: number) => any; readonly __wbgtest_coverage_path: (a: number, b: number, c: number, d: number, e: number, f: bigint) => [number, number]; readonly __wbgbench_dump: () => [number, number]; readonly __wbgbench_import: (a: number, b: number) => void; readonly __wbgtest_cov_dump: () => [number, number]; readonly __wbgtest_module_signature: () => [number, bigint]; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke___wasm_bindgen_da73a4154c4d3ee6___JsValue__wasm_bindgen_da73a4154c4d3ee6___JsValue__js_sys_53ea33e011856d57___Set______true_: (a: number, b: number, c: any, d: number, e: any) => void; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke___wasm_bindgen_da73a4154c4d3ee6___JsValue__core_9b3796e30d99ddb7___result__Result_____wasm_bindgen_da73a4154c4d3ee6___JsError___true_: (a: number, b: number, c: any) => [number, number]; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke___js_sys_53ea33e011856d57___Function_fn_wasm_bindgen_da73a4154c4d3ee6___JsValue_____wasm_bindgen_da73a4154c4d3ee6___sys__Undefined___js_sys_53ea33e011856d57___Function_fn_wasm_bindgen_da73a4154c4d3ee6___JsValue_____wasm_bindgen_da73a4154c4d3ee6___sys__Undefined_______true_: (a: number, b: number, c: any, d: any) => void; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke___wasm_bindgen_da73a4154c4d3ee6___JsValue______true_: (a: number, b: number, c: any) => void; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke_______true_: (a: number, b: number) => void; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke_______true__1_: (a: number, b: number) => void; readonly wasm_bindgen_da73a4154c4d3ee6___convert__closures_____invoke_______true__2_: (a: number, b: number) => void; readonly __externref_table_alloc: () => number; readonly __wbindgen_externrefs: WebAssembly.Table; readonly __wbindgen_malloc: (a: number, b: number) => number; readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number; readonly __wbindgen_exn_store: (a: number) => void; readonly __wbindgen_free: (a: number, b: number, c: number) => void; readonly __externref_drop_slice: (a: number, b: number) => void; readonly __wbindgen_destroy_closure: (a: number, b: number) => void; readonly __externref_table_dealloc: (a: number) => void; readonly __wbindgen_start: () => void; } export type SyncInitInput = BufferSource | WebAssembly.Module; /** * Instantiates the given `module`, which can either be bytes or * a precompiled `WebAssembly.Module`. * * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated. * * @returns {InitOutput} */ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput; /** * If `module_or_path` is {RequestInfo} or {URL}, makes a request and * for everything else, calls `WebAssembly.instantiate` directly. * * @param {{ module_or_path: InitInput | Promise }} module_or_path - Passing `InitInput` directly is deprecated. * * @returns {Promise} */ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise } | InitInput | Promise): Promise;