@xmtp/wasm-bindings 1.10.0-dev.11bbf9f → 1.10.0-dev.37fd9aa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bindings_wasm.d.ts +155 -92
- package/dist/bindings_wasm.js +282 -63
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +104 -85
- package/package.json +2 -2
package/dist/bindings_wasm.d.ts
CHANGED
|
@@ -445,6 +445,32 @@ export class AuthHandle {
|
|
|
445
445
|
set(credential: Credential): Promise<void>;
|
|
446
446
|
}
|
|
447
447
|
|
|
448
|
+
export class Backend {
|
|
449
|
+
private constructor();
|
|
450
|
+
free(): void;
|
|
451
|
+
[Symbol.dispose](): void;
|
|
452
|
+
readonly appVersion: string;
|
|
453
|
+
readonly env: XmtpEnv;
|
|
454
|
+
readonly gatewayHost: string | undefined;
|
|
455
|
+
readonly v3Host: string | undefined;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
export class BackendBuilder {
|
|
459
|
+
free(): void;
|
|
460
|
+
[Symbol.dispose](): void;
|
|
461
|
+
authCallback(callback: any): void;
|
|
462
|
+
authHandle(handle: AuthHandle): void;
|
|
463
|
+
build(): Backend;
|
|
464
|
+
constructor(env: XmtpEnv);
|
|
465
|
+
setApiUrl(api_url: string): BackendBuilder;
|
|
466
|
+
setAppVersion(app_version: string): BackendBuilder;
|
|
467
|
+
setGatewayHost(gateway_host: string): BackendBuilder;
|
|
468
|
+
setReadonly(readonly: boolean): BackendBuilder;
|
|
469
|
+
env: XmtpEnv;
|
|
470
|
+
get readonly(): boolean | undefined;
|
|
471
|
+
set readonly(value: boolean | null | undefined);
|
|
472
|
+
}
|
|
473
|
+
|
|
448
474
|
/**
|
|
449
475
|
* Selection of what elements to include in a backup
|
|
450
476
|
*/
|
|
@@ -719,14 +745,14 @@ export class DeviceSync {
|
|
|
719
745
|
/**
|
|
720
746
|
* Manually trigger a device sync request to sync records from another active device on this account.
|
|
721
747
|
*/
|
|
722
|
-
sendSyncRequest(): Promise<void>;
|
|
748
|
+
sendSyncRequest(options: ArchiveOptions, serverUrl: string): Promise<void>;
|
|
723
749
|
/**
|
|
724
750
|
* Manually sync all device sync groups.
|
|
725
751
|
*/
|
|
726
752
|
syncAllDeviceSyncGroups(): Promise<GroupSyncSummary>;
|
|
727
753
|
}
|
|
728
754
|
|
|
729
|
-
export enum
|
|
755
|
+
export enum DeviceSyncMode {
|
|
730
756
|
Enabled = 0,
|
|
731
757
|
Disabled = 1,
|
|
732
758
|
}
|
|
@@ -923,6 +949,16 @@ export class WasmBindgenTestContext {
|
|
|
923
949
|
run(tests: any[]): Promise<any>;
|
|
924
950
|
}
|
|
925
951
|
|
|
952
|
+
export enum XmtpEnv {
|
|
953
|
+
Local = 0,
|
|
954
|
+
Dev = 1,
|
|
955
|
+
Production = 2,
|
|
956
|
+
TestnetStaging = 3,
|
|
957
|
+
TestnetDev = 4,
|
|
958
|
+
Testnet = 5,
|
|
959
|
+
Mainnet = 6,
|
|
960
|
+
}
|
|
961
|
+
|
|
926
962
|
/**
|
|
927
963
|
* Used to read benchmark data, and then the runner stores it on the local disk.
|
|
928
964
|
*/
|
|
@@ -972,7 +1008,7 @@ export function __wbgtest_coverage_path(env: string | null | undefined, pid: num
|
|
|
972
1008
|
|
|
973
1009
|
export function __wbgtest_module_signature(): bigint | undefined;
|
|
974
1010
|
|
|
975
|
-
export function applySignatureRequest(
|
|
1011
|
+
export function applySignatureRequest(backend: Backend, signatureRequest: SignatureRequestHandle): Promise<void>;
|
|
976
1012
|
|
|
977
1013
|
export function contentTypeActions(): ContentTypeId;
|
|
978
1014
|
|
|
@@ -1002,7 +1038,15 @@ export function contentTypeTransactionReference(): ContentTypeId;
|
|
|
1002
1038
|
|
|
1003
1039
|
export function contentTypeWalletSendCalls(): ContentTypeId;
|
|
1004
1040
|
|
|
1005
|
-
export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null,
|
|
1041
|
+
export function createClient(host: string, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncMode?: DeviceSyncMode | 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<Client>;
|
|
1042
|
+
|
|
1043
|
+
/**
|
|
1044
|
+
* Create a client from a pre-built Backend.
|
|
1045
|
+
*
|
|
1046
|
+
* The Backend encapsulates all API configuration (env, hosts, auth, TLS).
|
|
1047
|
+
* This function only needs identity and database configuration.
|
|
1048
|
+
*/
|
|
1049
|
+
export function createClientWithBackend(backend: Backend, inboxId: string, accountIdentifier: Identifier, dbPath?: string | null, encryptionKey?: Uint8Array | null, deviceSyncMode?: DeviceSyncMode | null, logOptions?: LogOptions | null, allowOffline?: boolean | null, nonce?: bigint | null): Promise<Client>;
|
|
1006
1050
|
|
|
1007
1051
|
/**
|
|
1008
1052
|
* Decrypts an encrypted payload from a remote attachment.
|
|
@@ -1038,9 +1082,9 @@ export function encryptAttachment(attachment: Attachment): EncryptedAttachment;
|
|
|
1038
1082
|
|
|
1039
1083
|
export function generateInboxId(accountIdentifier: Identifier, nonce?: bigint | null): string;
|
|
1040
1084
|
|
|
1041
|
-
export function getInboxIdForIdentifier(
|
|
1085
|
+
export function getInboxIdForIdentifier(backend: Backend, accountIdentifier: Identifier): Promise<string | undefined>;
|
|
1042
1086
|
|
|
1043
|
-
export function inboxStateFromInboxIds(
|
|
1087
|
+
export function inboxStateFromInboxIds(backend: Backend, inboxIds: string[]): Promise<InboxState[]>;
|
|
1044
1088
|
|
|
1045
1089
|
export function metadataFieldName(field: MetadataField): string;
|
|
1046
1090
|
|
|
@@ -1099,7 +1143,7 @@ export function opfsListFiles(): Promise<string[]>;
|
|
|
1099
1143
|
*/
|
|
1100
1144
|
export function opfsPoolCapacity(): Promise<number>;
|
|
1101
1145
|
|
|
1102
|
-
export function revokeInstallationsSignatureRequest(
|
|
1146
|
+
export function revokeInstallationsSignatureRequest(backend: Backend, recoveryIdentifier: Identifier, inboxId: string, installationIds: Uint8Array[]): SignatureRequestHandle;
|
|
1103
1147
|
|
|
1104
1148
|
/**
|
|
1105
1149
|
* Entry point invoked by JavaScript in a worker.
|
|
@@ -1116,49 +1160,60 @@ export interface InitOutput {
|
|
|
1116
1160
|
readonly authhandle_id: (a: number) => number;
|
|
1117
1161
|
readonly authhandle_new: () => number;
|
|
1118
1162
|
readonly authhandle_set: (a: number, b: any) => any;
|
|
1119
|
-
readonly
|
|
1120
|
-
readonly
|
|
1121
|
-
readonly
|
|
1122
|
-
readonly
|
|
1123
|
-
readonly
|
|
1124
|
-
readonly
|
|
1125
|
-
readonly
|
|
1163
|
+
readonly client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any;
|
|
1164
|
+
readonly client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any;
|
|
1165
|
+
readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
|
|
1166
|
+
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
1167
|
+
readonly client_inboxState: (a: number, b: number) => any;
|
|
1168
|
+
readonly inboxStateFromInboxIds: (a: number, b: number, c: number) => any;
|
|
1169
|
+
readonly __wbg_backend_free: (a: number, b: number) => void;
|
|
1170
|
+
readonly __wbg_backendbuilder_free: (a: number, b: number) => void;
|
|
1171
|
+
readonly __wbg_get_backendbuilder_env: (a: number) => number;
|
|
1172
|
+
readonly __wbg_get_backendbuilder_readonly: (a: number) => number;
|
|
1173
|
+
readonly __wbg_set_backendbuilder_env: (a: number, b: number) => void;
|
|
1174
|
+
readonly __wbg_set_backendbuilder_readonly: (a: number, b: number) => void;
|
|
1175
|
+
readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
|
|
1176
|
+
readonly applySignatureRequest: (a: number, b: number) => any;
|
|
1177
|
+
readonly backend_appVersion: (a: number) => [number, number];
|
|
1178
|
+
readonly backend_env: (a: number) => number;
|
|
1179
|
+
readonly backend_gatewayHost: (a: number) => [number, number];
|
|
1180
|
+
readonly backend_v3Host: (a: number) => [number, number];
|
|
1181
|
+
readonly backendbuilder_authCallback: (a: number, b: any) => void;
|
|
1182
|
+
readonly backendbuilder_authHandle: (a: number, b: number) => void;
|
|
1183
|
+
readonly backendbuilder_build: (a: number) => [number, number, number];
|
|
1184
|
+
readonly backendbuilder_new: (a: number) => number;
|
|
1185
|
+
readonly backendbuilder_setApiUrl: (a: number, b: number, c: number) => number;
|
|
1186
|
+
readonly backendbuilder_setAppVersion: (a: number, b: number, c: number) => number;
|
|
1187
|
+
readonly backendbuilder_setGatewayHost: (a: number, b: number, c: number) => number;
|
|
1188
|
+
readonly backendbuilder_setReadonly: (a: number, b: number) => number;
|
|
1189
|
+
readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
|
|
1190
|
+
readonly client_applySignatureRequest: (a: number, b: number) => any;
|
|
1191
|
+
readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
|
|
1192
|
+
readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
|
|
1193
|
+
readonly client_registerIdentity: (a: number, b: number) => any;
|
|
1194
|
+
readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
|
|
1195
|
+
readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
|
|
1196
|
+
readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
|
|
1197
|
+
readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
1198
|
+
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
1199
|
+
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: bigint) => any;
|
|
1200
|
+
readonly revokeInstallationsSignatureRequest: (a: number, b: any, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
1201
|
+
readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
|
|
1202
|
+
readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
|
|
1203
|
+
readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
|
|
1204
|
+
readonly signaturerequesthandle_signatureText: (a: number) => any;
|
|
1205
|
+
readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
|
|
1126
1206
|
readonly contentTypeReply: () => any;
|
|
1127
|
-
readonly opfsClearAll: () => any;
|
|
1128
|
-
readonly opfsDeleteFile: (a: number, b: number) => any;
|
|
1129
|
-
readonly opfsExportDb: (a: number, b: number) => any;
|
|
1130
|
-
readonly opfsFileCount: () => any;
|
|
1131
|
-
readonly opfsFileExists: (a: number, b: number) => any;
|
|
1132
|
-
readonly opfsImportDb: (a: number, b: number, c: any) => any;
|
|
1133
|
-
readonly opfsInit: () => any;
|
|
1134
|
-
readonly opfsListFiles: () => any;
|
|
1135
|
-
readonly opfsPoolCapacity: () => any;
|
|
1136
1207
|
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
1137
|
-
readonly __wbg_conversation_free: (a: number, b: number) => void;
|
|
1138
|
-
readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
|
|
1139
|
-
readonly __wbg_conversations_free: (a: number, b: number) => void;
|
|
1140
1208
|
readonly __wbg_devicesync_free: (a: number, b: number) => void;
|
|
1141
|
-
readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
|
|
1142
|
-
readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
|
|
1143
|
-
readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
|
|
1144
|
-
readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
|
|
1145
|
-
readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
|
|
1146
|
-
readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
|
|
1147
|
-
readonly __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
|
|
1148
|
-
readonly __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
1149
|
-
readonly applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
1150
1209
|
readonly client_accountIdentifier: (a: number) => any;
|
|
1151
|
-
readonly client_addWalletSignatureRequest: (a: number, b: any) => any;
|
|
1152
1210
|
readonly client_apiAggregateStatistics: (a: number) => [number, number];
|
|
1153
1211
|
readonly client_apiIdentityStatistics: (a: number) => any;
|
|
1154
1212
|
readonly client_apiStatistics: (a: number) => any;
|
|
1155
1213
|
readonly client_appVersion: (a: number) => [number, number];
|
|
1156
|
-
readonly client_applySignatureRequest: (a: number, b: number) => any;
|
|
1157
1214
|
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
1158
|
-
readonly client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
|
|
1159
1215
|
readonly client_clearAllStatistics: (a: number) => void;
|
|
1160
1216
|
readonly client_conversations: (a: number) => number;
|
|
1161
|
-
readonly client_createInboxSignatureRequest: (a: number) => [number, number, number];
|
|
1162
1217
|
readonly client_device_sync: (a: number) => number;
|
|
1163
1218
|
readonly client_findInboxIdByIdentity: (a: number, b: any) => any;
|
|
1164
1219
|
readonly client_inboxId: (a: number) => [number, number];
|
|
@@ -1167,20 +1222,57 @@ export interface InitOutput {
|
|
|
1167
1222
|
readonly client_installationIdBytes: (a: number) => any;
|
|
1168
1223
|
readonly client_isRegistered: (a: number) => number;
|
|
1169
1224
|
readonly client_libxmtpVersion: (a: number) => [number, number];
|
|
1170
|
-
readonly client_registerIdentity: (a: number, b: number) => any;
|
|
1171
|
-
readonly client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
|
|
1172
|
-
readonly client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
|
|
1173
|
-
readonly client_revokeWalletSignatureRequest: (a: number, b: any) => any;
|
|
1174
|
-
readonly client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
1175
1225
|
readonly client_syncPreferences: (a: number) => any;
|
|
1176
|
-
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
1177
|
-
readonly contentTypeActions: () => any;
|
|
1178
1226
|
readonly contentTypeAttachment: () => any;
|
|
1179
1227
|
readonly contentTypeIntent: () => any;
|
|
1180
|
-
readonly
|
|
1228
|
+
readonly contentTypeLeaveRequest: () => any;
|
|
1229
|
+
readonly contentTypeMarkdown: () => any;
|
|
1181
1230
|
readonly contentTypeReadReceipt: () => any;
|
|
1182
|
-
readonly
|
|
1231
|
+
readonly contentTypeText: () => any;
|
|
1232
|
+
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: bigint, r: number, s: number, t: number) => any;
|
|
1233
|
+
readonly devicesync_archiveMetadata: (a: number, b: any, c: any) => any;
|
|
1234
|
+
readonly devicesync_createArchive: (a: number, b: any, c: any) => any;
|
|
1235
|
+
readonly devicesync_importArchive: (a: number, b: any, c: any) => any;
|
|
1236
|
+
readonly devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number];
|
|
1237
|
+
readonly devicesync_processSyncArchive: (a: number, b: number, c: number) => any;
|
|
1238
|
+
readonly devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
1239
|
+
readonly devicesync_sendSyncRequest: (a: number, b: any, c: number, d: number) => any;
|
|
1240
|
+
readonly devicesync_syncAllDeviceSyncGroups: (a: number) => any;
|
|
1241
|
+
readonly encodeAttachment: (a: any) => [number, number, number];
|
|
1242
|
+
readonly encodeIntent: (a: any) => [number, number, number];
|
|
1243
|
+
readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
|
|
1244
|
+
readonly encodeReadReceipt: (a: any) => [number, number, number];
|
|
1245
|
+
readonly encodeText: (a: number, b: number) => [number, number, number];
|
|
1246
|
+
readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
|
|
1247
|
+
readonly getInboxIdForIdentifier: (a: number, b: any) => any;
|
|
1248
|
+
readonly __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
1249
|
+
readonly contentTypeActions: () => any;
|
|
1250
|
+
readonly contentTypeGroupUpdated: () => any;
|
|
1251
|
+
readonly contentTypeMultiRemoteAttachment: () => any;
|
|
1252
|
+
readonly contentTypeReaction: () => any;
|
|
1253
|
+
readonly contentTypeTransactionReference: () => any;
|
|
1183
1254
|
readonly contentTypeWalletSendCalls: () => any;
|
|
1255
|
+
readonly encodeActions: (a: any) => [number, number, number];
|
|
1256
|
+
readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
|
|
1257
|
+
readonly encodeReaction: (a: any) => [number, number, number];
|
|
1258
|
+
readonly encodeTransactionReference: (a: any) => [number, number, number];
|
|
1259
|
+
readonly encodeWalletSendCalls: (a: any) => [number, number, number];
|
|
1260
|
+
readonly streamcloser_end: (a: number) => void;
|
|
1261
|
+
readonly streamcloser_endAndWait: (a: number) => any;
|
|
1262
|
+
readonly streamcloser_isClosed: (a: number) => number;
|
|
1263
|
+
readonly streamcloser_waitForReady: (a: number) => any;
|
|
1264
|
+
readonly __wbg_conversation_free: (a: number, b: number) => void;
|
|
1265
|
+
readonly __wbg_conversationlistitem_free: (a: number, b: number) => void;
|
|
1266
|
+
readonly __wbg_conversations_free: (a: number, b: number) => void;
|
|
1267
|
+
readonly __wbg_get_conversationlistitem_conversation: (a: number) => number;
|
|
1268
|
+
readonly __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
|
|
1269
|
+
readonly __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
|
|
1270
|
+
readonly __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
|
|
1271
|
+
readonly __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
|
|
1272
|
+
readonly __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
|
|
1273
|
+
readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
|
|
1274
|
+
readonly client_setConsentStates: (a: number, b: number, c: number) => any;
|
|
1275
|
+
readonly contentTypeRemoteAttachment: () => any;
|
|
1184
1276
|
readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
1185
1277
|
readonly conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
1186
1278
|
readonly conversation_addMembersByIdentity: (a: number, b: number, c: number) => any;
|
|
@@ -1188,6 +1280,7 @@ export interface InitOutput {
|
|
|
1188
1280
|
readonly conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
1189
1281
|
readonly conversation_adminList: (a: number) => [number, number, number, number];
|
|
1190
1282
|
readonly conversation_appData: (a: number) => [number, number, number, number];
|
|
1283
|
+
readonly conversation_consentState: (a: number) => [number, number, number];
|
|
1191
1284
|
readonly conversation_countMessages: (a: number, b: number) => any;
|
|
1192
1285
|
readonly conversation_createdAtNs: (a: number) => bigint;
|
|
1193
1286
|
readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
@@ -1238,6 +1331,7 @@ export interface InitOutput {
|
|
|
1238
1331
|
readonly conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
1239
1332
|
readonly conversation_sync: (a: number) => any;
|
|
1240
1333
|
readonly conversation_updateAppData: (a: number, b: number, c: number) => any;
|
|
1334
|
+
readonly conversation_updateConsentState: (a: number, b: number) => [number, number];
|
|
1241
1335
|
readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
1242
1336
|
readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
1243
1337
|
readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
@@ -1264,50 +1358,19 @@ export interface InitOutput {
|
|
|
1264
1358
|
readonly conversations_streamPreferences: (a: number, b: any) => [number, number, number];
|
|
1265
1359
|
readonly conversations_sync: (a: number) => any;
|
|
1266
1360
|
readonly conversations_syncAllConversations: (a: number, b: number, c: number) => any;
|
|
1267
|
-
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: number, s: bigint, t: number, u: number, v: number) => any;
|
|
1268
1361
|
readonly decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
|
|
1269
|
-
readonly devicesync_archiveMetadata: (a: number, b: any, c: any) => any;
|
|
1270
|
-
readonly devicesync_createArchive: (a: number, b: any, c: any) => any;
|
|
1271
|
-
readonly devicesync_importArchive: (a: number, b: any, c: any) => any;
|
|
1272
|
-
readonly devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number];
|
|
1273
|
-
readonly devicesync_processSyncArchive: (a: number, b: number, c: number) => any;
|
|
1274
|
-
readonly devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
1275
|
-
readonly devicesync_sendSyncRequest: (a: number) => any;
|
|
1276
|
-
readonly devicesync_syncAllDeviceSyncGroups: (a: number) => any;
|
|
1277
|
-
readonly encodeActions: (a: any) => [number, number, number];
|
|
1278
|
-
readonly encodeAttachment: (a: any) => [number, number, number];
|
|
1279
|
-
readonly encodeIntent: (a: any) => [number, number, number];
|
|
1280
|
-
readonly encodeReaction: (a: any) => [number, number, number];
|
|
1281
|
-
readonly encodeReadReceipt: (a: any) => [number, number, number];
|
|
1282
1362
|
readonly encodeRemoteAttachment: (a: any) => [number, number, number];
|
|
1283
|
-
readonly encodeWalletSendCalls: (a: any) => [number, number, number];
|
|
1284
1363
|
readonly encryptAttachment: (a: any) => [number, number, number];
|
|
1285
|
-
readonly revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
1286
|
-
readonly signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
|
|
1287
|
-
readonly signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
|
|
1288
|
-
readonly signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
|
|
1289
|
-
readonly signaturerequesthandle_signatureText: (a: number) => any;
|
|
1290
|
-
readonly streamcloser_end: (a: number) => void;
|
|
1291
|
-
readonly streamcloser_endAndWait: (a: number) => any;
|
|
1292
|
-
readonly streamcloser_isClosed: (a: number) => number;
|
|
1293
|
-
readonly streamcloser_waitForReady: (a: number) => any;
|
|
1294
|
-
readonly verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
|
|
1295
|
-
readonly client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any;
|
|
1296
|
-
readonly client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any;
|
|
1297
|
-
readonly client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
|
|
1298
|
-
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
1299
|
-
readonly client_inboxState: (a: number, b: number) => any;
|
|
1300
|
-
readonly contentTypeLeaveRequest: () => any;
|
|
1301
|
-
readonly contentTypeMarkdown: () => any;
|
|
1302
|
-
readonly contentTypeMultiRemoteAttachment: () => any;
|
|
1303
|
-
readonly contentTypeText: () => any;
|
|
1304
|
-
readonly encodeMarkdown: (a: number, b: number) => [number, number, number];
|
|
1305
|
-
readonly encodeMultiRemoteAttachment: (a: any) => [number, number, number];
|
|
1306
|
-
readonly encodeText: (a: number, b: number) => [number, number, number];
|
|
1307
|
-
readonly generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
|
|
1308
|
-
readonly getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
1309
|
-
readonly inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
1310
1364
|
readonly metadataFieldName: (a: number) => [number, number];
|
|
1365
|
+
readonly opfsClearAll: () => any;
|
|
1366
|
+
readonly opfsDeleteFile: (a: number, b: number) => any;
|
|
1367
|
+
readonly opfsExportDb: (a: number, b: number) => any;
|
|
1368
|
+
readonly opfsFileCount: () => any;
|
|
1369
|
+
readonly opfsFileExists: (a: number, b: number) => any;
|
|
1370
|
+
readonly opfsImportDb: (a: number, b: number, c: any) => any;
|
|
1371
|
+
readonly opfsInit: () => any;
|
|
1372
|
+
readonly opfsListFiles: () => any;
|
|
1373
|
+
readonly opfsPoolCapacity: () => any;
|
|
1311
1374
|
readonly rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
1312
1375
|
readonly rust_zstd_wasm_shim_free: (a: number) => void;
|
|
1313
1376
|
readonly rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
@@ -1355,16 +1418,16 @@ export interface InitOutput {
|
|
|
1355
1418
|
readonly __wbgbench_dump: () => [number, number];
|
|
1356
1419
|
readonly __wbgbench_import: (a: number, b: number) => void;
|
|
1357
1420
|
readonly __wbgtest_coverage_path: (a: number, b: number, c: number, d: number, e: number, f: bigint) => [number, number];
|
|
1358
|
-
readonly
|
|
1421
|
+
readonly wasm_bindgen__closure__destroy__he86c9d9bb368f43f: (a: number, b: number) => void;
|
|
1359
1422
|
readonly wasm_bindgen__closure__destroy__h213ec6c0cfaa8daa: (a: number, b: number) => void;
|
|
1360
|
-
readonly
|
|
1423
|
+
readonly wasm_bindgen__closure__destroy__h006fa4718e4400fc: (a: number, b: number) => void;
|
|
1361
1424
|
readonly wasm_bindgen__closure__destroy__hd56fbfc240f3eed8: (a: number, b: number) => void;
|
|
1362
1425
|
readonly wasm_bindgen__convert__closures_____invoke__h4761911dc2bcd4ab: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
1363
1426
|
readonly wasm_bindgen__convert__closures_____invoke__h93371d492ea6dccf: (a: number, b: number, c: any, d: any) => void;
|
|
1364
1427
|
readonly wasm_bindgen__convert__closures_____invoke__h01ab1ec45c07a95b: (a: number, b: number, c: any) => void;
|
|
1365
|
-
readonly
|
|
1428
|
+
readonly wasm_bindgen__convert__closures_____invoke__h7478175f8808d1fa: (a: number, b: number) => void;
|
|
1366
1429
|
readonly wasm_bindgen__convert__closures_____invoke__h7d2ee1dee7ec118b: (a: number, b: number) => void;
|
|
1367
|
-
readonly
|
|
1430
|
+
readonly wasm_bindgen__convert__closures_____invoke__h48de3f26adb3eb8d: (a: number, b: number) => void;
|
|
1368
1431
|
readonly __externref_table_alloc: () => number;
|
|
1369
1432
|
readonly __wbindgen_externrefs: WebAssembly.Table;
|
|
1370
1433
|
readonly __wbindgen_malloc: (a: number, b: number) => number;
|
package/dist/bindings_wasm.js
CHANGED
|
@@ -44,6 +44,196 @@ export class AuthHandle {
|
|
|
44
44
|
}
|
|
45
45
|
if (Symbol.dispose) AuthHandle.prototype[Symbol.dispose] = AuthHandle.prototype.free;
|
|
46
46
|
|
|
47
|
+
export class Backend {
|
|
48
|
+
static __wrap(ptr) {
|
|
49
|
+
ptr = ptr >>> 0;
|
|
50
|
+
const obj = Object.create(Backend.prototype);
|
|
51
|
+
obj.__wbg_ptr = ptr;
|
|
52
|
+
BackendFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
53
|
+
return obj;
|
|
54
|
+
}
|
|
55
|
+
__destroy_into_raw() {
|
|
56
|
+
const ptr = this.__wbg_ptr;
|
|
57
|
+
this.__wbg_ptr = 0;
|
|
58
|
+
BackendFinalization.unregister(this);
|
|
59
|
+
return ptr;
|
|
60
|
+
}
|
|
61
|
+
free() {
|
|
62
|
+
const ptr = this.__destroy_into_raw();
|
|
63
|
+
wasm.__wbg_backend_free(ptr, 0);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* @returns {string}
|
|
67
|
+
*/
|
|
68
|
+
get appVersion() {
|
|
69
|
+
let deferred1_0;
|
|
70
|
+
let deferred1_1;
|
|
71
|
+
try {
|
|
72
|
+
const ret = wasm.backend_appVersion(this.__wbg_ptr);
|
|
73
|
+
deferred1_0 = ret[0];
|
|
74
|
+
deferred1_1 = ret[1];
|
|
75
|
+
return getStringFromWasm0(ret[0], ret[1]);
|
|
76
|
+
} finally {
|
|
77
|
+
wasm.__wbindgen_free(deferred1_0, deferred1_1, 1);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* @returns {XmtpEnv}
|
|
82
|
+
*/
|
|
83
|
+
get env() {
|
|
84
|
+
const ret = wasm.backend_env(this.__wbg_ptr);
|
|
85
|
+
return ret;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* @returns {string | undefined}
|
|
89
|
+
*/
|
|
90
|
+
get gatewayHost() {
|
|
91
|
+
const ret = wasm.backend_gatewayHost(this.__wbg_ptr);
|
|
92
|
+
let v1;
|
|
93
|
+
if (ret[0] !== 0) {
|
|
94
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
95
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
96
|
+
}
|
|
97
|
+
return v1;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* @returns {string | undefined}
|
|
101
|
+
*/
|
|
102
|
+
get v3Host() {
|
|
103
|
+
const ret = wasm.backend_v3Host(this.__wbg_ptr);
|
|
104
|
+
let v1;
|
|
105
|
+
if (ret[0] !== 0) {
|
|
106
|
+
v1 = getStringFromWasm0(ret[0], ret[1]).slice();
|
|
107
|
+
wasm.__wbindgen_free(ret[0], ret[1] * 1, 1);
|
|
108
|
+
}
|
|
109
|
+
return v1;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (Symbol.dispose) Backend.prototype[Symbol.dispose] = Backend.prototype.free;
|
|
113
|
+
|
|
114
|
+
export class BackendBuilder {
|
|
115
|
+
static __wrap(ptr) {
|
|
116
|
+
ptr = ptr >>> 0;
|
|
117
|
+
const obj = Object.create(BackendBuilder.prototype);
|
|
118
|
+
obj.__wbg_ptr = ptr;
|
|
119
|
+
BackendBuilderFinalization.register(obj, obj.__wbg_ptr, obj);
|
|
120
|
+
return obj;
|
|
121
|
+
}
|
|
122
|
+
__destroy_into_raw() {
|
|
123
|
+
const ptr = this.__wbg_ptr;
|
|
124
|
+
this.__wbg_ptr = 0;
|
|
125
|
+
BackendBuilderFinalization.unregister(this);
|
|
126
|
+
return ptr;
|
|
127
|
+
}
|
|
128
|
+
free() {
|
|
129
|
+
const ptr = this.__destroy_into_raw();
|
|
130
|
+
wasm.__wbg_backendbuilder_free(ptr, 0);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* @param {any} callback
|
|
134
|
+
*/
|
|
135
|
+
authCallback(callback) {
|
|
136
|
+
wasm.backendbuilder_authCallback(this.__wbg_ptr, callback);
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* @param {AuthHandle} handle
|
|
140
|
+
*/
|
|
141
|
+
authHandle(handle) {
|
|
142
|
+
_assertClass(handle, AuthHandle);
|
|
143
|
+
var ptr0 = handle.__destroy_into_raw();
|
|
144
|
+
wasm.backendbuilder_authHandle(this.__wbg_ptr, ptr0);
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* @returns {Backend}
|
|
148
|
+
*/
|
|
149
|
+
build() {
|
|
150
|
+
const ptr = this.__destroy_into_raw();
|
|
151
|
+
const ret = wasm.backendbuilder_build(ptr);
|
|
152
|
+
if (ret[2]) {
|
|
153
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
154
|
+
}
|
|
155
|
+
return Backend.__wrap(ret[0]);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* @param {XmtpEnv} env
|
|
159
|
+
*/
|
|
160
|
+
constructor(env) {
|
|
161
|
+
const ret = wasm.backendbuilder_new(env);
|
|
162
|
+
this.__wbg_ptr = ret >>> 0;
|
|
163
|
+
BackendBuilderFinalization.register(this, this.__wbg_ptr, this);
|
|
164
|
+
return this;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* @param {string} api_url
|
|
168
|
+
* @returns {BackendBuilder}
|
|
169
|
+
*/
|
|
170
|
+
setApiUrl(api_url) {
|
|
171
|
+
const ptr = this.__destroy_into_raw();
|
|
172
|
+
const ptr0 = passStringToWasm0(api_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
173
|
+
const len0 = WASM_VECTOR_LEN;
|
|
174
|
+
const ret = wasm.backendbuilder_setApiUrl(ptr, ptr0, len0);
|
|
175
|
+
return BackendBuilder.__wrap(ret);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* @param {string} app_version
|
|
179
|
+
* @returns {BackendBuilder}
|
|
180
|
+
*/
|
|
181
|
+
setAppVersion(app_version) {
|
|
182
|
+
const ptr = this.__destroy_into_raw();
|
|
183
|
+
const ptr0 = passStringToWasm0(app_version, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
184
|
+
const len0 = WASM_VECTOR_LEN;
|
|
185
|
+
const ret = wasm.backendbuilder_setAppVersion(ptr, ptr0, len0);
|
|
186
|
+
return BackendBuilder.__wrap(ret);
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* @param {string} gateway_host
|
|
190
|
+
* @returns {BackendBuilder}
|
|
191
|
+
*/
|
|
192
|
+
setGatewayHost(gateway_host) {
|
|
193
|
+
const ptr = this.__destroy_into_raw();
|
|
194
|
+
const ptr0 = passStringToWasm0(gateway_host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
195
|
+
const len0 = WASM_VECTOR_LEN;
|
|
196
|
+
const ret = wasm.backendbuilder_setGatewayHost(ptr, ptr0, len0);
|
|
197
|
+
return BackendBuilder.__wrap(ret);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* @param {boolean} readonly
|
|
201
|
+
* @returns {BackendBuilder}
|
|
202
|
+
*/
|
|
203
|
+
setReadonly(readonly) {
|
|
204
|
+
const ptr = this.__destroy_into_raw();
|
|
205
|
+
const ret = wasm.backendbuilder_setReadonly(ptr, readonly);
|
|
206
|
+
return BackendBuilder.__wrap(ret);
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* @returns {XmtpEnv}
|
|
210
|
+
*/
|
|
211
|
+
get env() {
|
|
212
|
+
const ret = wasm.__wbg_get_backendbuilder_env(this.__wbg_ptr);
|
|
213
|
+
return ret;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* @returns {boolean | undefined}
|
|
217
|
+
*/
|
|
218
|
+
get readonly() {
|
|
219
|
+
const ret = wasm.__wbg_get_backendbuilder_readonly(this.__wbg_ptr);
|
|
220
|
+
return ret === 0xFFFFFF ? undefined : ret !== 0;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* @param {XmtpEnv} arg0
|
|
224
|
+
*/
|
|
225
|
+
set env(arg0) {
|
|
226
|
+
wasm.__wbg_set_backendbuilder_env(this.__wbg_ptr, arg0);
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* @param {boolean | null} [arg0]
|
|
230
|
+
*/
|
|
231
|
+
set readonly(arg0) {
|
|
232
|
+
wasm.__wbg_set_backendbuilder_readonly(this.__wbg_ptr, isLikeNone(arg0) ? 0xFFFFFF : arg0 ? 1 : 0);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
if (Symbol.dispose) BackendBuilder.prototype[Symbol.dispose] = BackendBuilder.prototype.free;
|
|
236
|
+
|
|
47
237
|
/**
|
|
48
238
|
* Selection of what elements to include in a backup
|
|
49
239
|
* @enum {0 | 1}
|
|
@@ -1612,10 +1802,14 @@ export class DeviceSync {
|
|
|
1612
1802
|
}
|
|
1613
1803
|
/**
|
|
1614
1804
|
* Manually trigger a device sync request to sync records from another active device on this account.
|
|
1805
|
+
* @param {ArchiveOptions} options
|
|
1806
|
+
* @param {string} serverUrl
|
|
1615
1807
|
* @returns {Promise<void>}
|
|
1616
1808
|
*/
|
|
1617
|
-
sendSyncRequest() {
|
|
1618
|
-
const
|
|
1809
|
+
sendSyncRequest(options, serverUrl) {
|
|
1810
|
+
const ptr0 = passStringToWasm0(serverUrl, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1811
|
+
const len0 = WASM_VECTOR_LEN;
|
|
1812
|
+
const ret = wasm.devicesync_sendSyncRequest(this.__wbg_ptr, options, ptr0, len0);
|
|
1619
1813
|
return ret;
|
|
1620
1814
|
}
|
|
1621
1815
|
/**
|
|
@@ -1632,7 +1826,7 @@ if (Symbol.dispose) DeviceSync.prototype[Symbol.dispose] = DeviceSync.prototype.
|
|
|
1632
1826
|
/**
|
|
1633
1827
|
* @enum {0 | 1}
|
|
1634
1828
|
*/
|
|
1635
|
-
export const
|
|
1829
|
+
export const DeviceSyncMode = Object.freeze({
|
|
1636
1830
|
Enabled: 0, "0": "Enabled",
|
|
1637
1831
|
Disabled: 1, "1": "Disabled",
|
|
1638
1832
|
});
|
|
@@ -2065,6 +2259,19 @@ export class WasmBindgenTestContext {
|
|
|
2065
2259
|
}
|
|
2066
2260
|
if (Symbol.dispose) WasmBindgenTestContext.prototype[Symbol.dispose] = WasmBindgenTestContext.prototype.free;
|
|
2067
2261
|
|
|
2262
|
+
/**
|
|
2263
|
+
* @enum {0 | 1 | 2 | 3 | 4 | 5 | 6}
|
|
2264
|
+
*/
|
|
2265
|
+
export const XmtpEnv = Object.freeze({
|
|
2266
|
+
Local: 0, "0": "Local",
|
|
2267
|
+
Dev: 1, "1": "Dev",
|
|
2268
|
+
Production: 2, "2": "Production",
|
|
2269
|
+
TestnetStaging: 3, "3": "TestnetStaging",
|
|
2270
|
+
TestnetDev: 4, "4": "TestnetDev",
|
|
2271
|
+
Testnet: 5, "5": "Testnet",
|
|
2272
|
+
Mainnet: 6, "6": "Mainnet",
|
|
2273
|
+
});
|
|
2274
|
+
|
|
2068
2275
|
/**
|
|
2069
2276
|
* Used to read benchmark data, and then the runner stores it on the local disk.
|
|
2070
2277
|
* @returns {Uint8Array | undefined}
|
|
@@ -2181,18 +2388,14 @@ export function __wbgtest_module_signature() {
|
|
|
2181
2388
|
}
|
|
2182
2389
|
|
|
2183
2390
|
/**
|
|
2184
|
-
* @param {
|
|
2185
|
-
* @param {string | null | undefined} gatewayHost
|
|
2391
|
+
* @param {Backend} backend
|
|
2186
2392
|
* @param {SignatureRequestHandle} signatureRequest
|
|
2187
2393
|
* @returns {Promise<void>}
|
|
2188
2394
|
*/
|
|
2189
|
-
export function applySignatureRequest(
|
|
2190
|
-
|
|
2191
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2192
|
-
var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2193
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2395
|
+
export function applySignatureRequest(backend, signatureRequest) {
|
|
2396
|
+
_assertClass(backend, Backend);
|
|
2194
2397
|
_assertClass(signatureRequest, SignatureRequestHandle);
|
|
2195
|
-
const ret = wasm.applySignatureRequest(
|
|
2398
|
+
const ret = wasm.applySignatureRequest(backend.__wbg_ptr, signatureRequest.__wbg_ptr);
|
|
2196
2399
|
return ret;
|
|
2197
2400
|
}
|
|
2198
2401
|
|
|
@@ -2314,8 +2517,7 @@ export function contentTypeWalletSendCalls() {
|
|
|
2314
2517
|
* @param {Identifier} accountIdentifier
|
|
2315
2518
|
* @param {string | null} [dbPath]
|
|
2316
2519
|
* @param {Uint8Array | null} [encryptionKey]
|
|
2317
|
-
* @param {
|
|
2318
|
-
* @param {DeviceSyncWorkerMode | null} [deviceSyncWorkerMode]
|
|
2520
|
+
* @param {DeviceSyncMode | null} [deviceSyncMode]
|
|
2319
2521
|
* @param {LogOptions | null} [logOptions]
|
|
2320
2522
|
* @param {boolean | null} [allowOffline]
|
|
2321
2523
|
* @param {string | null} [appVersion]
|
|
@@ -2326,25 +2528,49 @@ export function contentTypeWalletSendCalls() {
|
|
|
2326
2528
|
* @param {ClientMode | null} [clientMode]
|
|
2327
2529
|
* @returns {Promise<Client>}
|
|
2328
2530
|
*/
|
|
2329
|
-
export function createClient(host, inboxId, accountIdentifier, dbPath, encryptionKey,
|
|
2531
|
+
export function createClient(host, inboxId, accountIdentifier, dbPath, encryptionKey, deviceSyncMode, logOptions, allowOffline, appVersion, gatewayHost, nonce, authCallback, authHandle, clientMode) {
|
|
2330
2532
|
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2331
2533
|
const len0 = WASM_VECTOR_LEN;
|
|
2332
2534
|
const ptr1 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2333
2535
|
const len1 = WASM_VECTOR_LEN;
|
|
2334
2536
|
var ptr2 = isLikeNone(dbPath) ? 0 : passStringToWasm0(dbPath, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2335
2537
|
var len2 = WASM_VECTOR_LEN;
|
|
2336
|
-
var ptr3 = isLikeNone(
|
|
2538
|
+
var ptr3 = isLikeNone(appVersion) ? 0 : passStringToWasm0(appVersion, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2337
2539
|
var len3 = WASM_VECTOR_LEN;
|
|
2338
|
-
var ptr4 = isLikeNone(
|
|
2540
|
+
var ptr4 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2339
2541
|
var len4 = WASM_VECTOR_LEN;
|
|
2340
|
-
|
|
2341
|
-
var len5 = WASM_VECTOR_LEN;
|
|
2342
|
-
let ptr6 = 0;
|
|
2542
|
+
let ptr5 = 0;
|
|
2343
2543
|
if (!isLikeNone(authHandle)) {
|
|
2344
2544
|
_assertClass(authHandle, AuthHandle);
|
|
2345
|
-
|
|
2545
|
+
ptr5 = authHandle.__destroy_into_raw();
|
|
2346
2546
|
}
|
|
2347
|
-
const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey),
|
|
2547
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, accountIdentifier, ptr2, len2, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), isLikeNone(deviceSyncMode) ? 2 : deviceSyncMode, isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, ptr3, len3, ptr4, len4, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce, isLikeNone(authCallback) ? 0 : addToExternrefTable0(authCallback), ptr5, isLikeNone(clientMode) ? 2 : clientMode);
|
|
2548
|
+
return ret;
|
|
2549
|
+
}
|
|
2550
|
+
|
|
2551
|
+
/**
|
|
2552
|
+
* Create a client from a pre-built Backend.
|
|
2553
|
+
*
|
|
2554
|
+
* The Backend encapsulates all API configuration (env, hosts, auth, TLS).
|
|
2555
|
+
* This function only needs identity and database configuration.
|
|
2556
|
+
* @param {Backend} backend
|
|
2557
|
+
* @param {string} inboxId
|
|
2558
|
+
* @param {Identifier} accountIdentifier
|
|
2559
|
+
* @param {string | null} [dbPath]
|
|
2560
|
+
* @param {Uint8Array | null} [encryptionKey]
|
|
2561
|
+
* @param {DeviceSyncMode | null} [deviceSyncMode]
|
|
2562
|
+
* @param {LogOptions | null} [logOptions]
|
|
2563
|
+
* @param {boolean | null} [allowOffline]
|
|
2564
|
+
* @param {bigint | null} [nonce]
|
|
2565
|
+
* @returns {Promise<Client>}
|
|
2566
|
+
*/
|
|
2567
|
+
export function createClientWithBackend(backend, inboxId, accountIdentifier, dbPath, encryptionKey, deviceSyncMode, logOptions, allowOffline, nonce) {
|
|
2568
|
+
_assertClass(backend, Backend);
|
|
2569
|
+
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2570
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2571
|
+
var ptr1 = isLikeNone(dbPath) ? 0 : passStringToWasm0(dbPath, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2572
|
+
var len1 = WASM_VECTOR_LEN;
|
|
2573
|
+
const ret = wasm.createClientWithBackend(backend.__wbg_ptr, ptr0, len0, accountIdentifier, ptr1, len1, isLikeNone(encryptionKey) ? 0 : addToExternrefTable0(encryptionKey), isLikeNone(deviceSyncMode) ? 2 : deviceSyncMode, isLikeNone(logOptions) ? 0 : addToExternrefTable0(logOptions), isLikeNone(allowOffline) ? 0xFFFFFF : allowOffline ? 1 : 0, !isLikeNone(nonce), isLikeNone(nonce) ? BigInt(0) : nonce);
|
|
2348
2574
|
return ret;
|
|
2349
2575
|
}
|
|
2350
2576
|
|
|
@@ -2538,35 +2764,26 @@ export function generateInboxId(accountIdentifier, nonce) {
|
|
|
2538
2764
|
}
|
|
2539
2765
|
|
|
2540
2766
|
/**
|
|
2541
|
-
* @param {
|
|
2542
|
-
* @param {string | null | undefined} gatewayHost
|
|
2543
|
-
* @param {boolean} isSecure
|
|
2767
|
+
* @param {Backend} backend
|
|
2544
2768
|
* @param {Identifier} accountIdentifier
|
|
2545
2769
|
* @returns {Promise<string | undefined>}
|
|
2546
2770
|
*/
|
|
2547
|
-
export function getInboxIdForIdentifier(
|
|
2548
|
-
|
|
2549
|
-
const
|
|
2550
|
-
var ptr1 = isLikeNone(gatewayHost) ? 0 : passStringToWasm0(gatewayHost, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2551
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2552
|
-
const ret = wasm.getInboxIdForIdentifier(ptr0, len0, ptr1, len1, isSecure, accountIdentifier);
|
|
2771
|
+
export function getInboxIdForIdentifier(backend, accountIdentifier) {
|
|
2772
|
+
_assertClass(backend, Backend);
|
|
2773
|
+
const ret = wasm.getInboxIdForIdentifier(backend.__wbg_ptr, accountIdentifier);
|
|
2553
2774
|
return ret;
|
|
2554
2775
|
}
|
|
2555
2776
|
|
|
2556
2777
|
/**
|
|
2557
|
-
* @param {
|
|
2558
|
-
* @param {string | null | undefined} gatewayHost
|
|
2778
|
+
* @param {Backend} backend
|
|
2559
2779
|
* @param {string[]} inboxIds
|
|
2560
2780
|
* @returns {Promise<InboxState[]>}
|
|
2561
2781
|
*/
|
|
2562
|
-
export function inboxStateFromInboxIds(
|
|
2563
|
-
|
|
2782
|
+
export function inboxStateFromInboxIds(backend, inboxIds) {
|
|
2783
|
+
_assertClass(backend, Backend);
|
|
2784
|
+
const ptr0 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
|
|
2564
2785
|
const len0 = WASM_VECTOR_LEN;
|
|
2565
|
-
|
|
2566
|
-
var len1 = WASM_VECTOR_LEN;
|
|
2567
|
-
const ptr2 = passArrayJsValueToWasm0(inboxIds, wasm.__wbindgen_malloc);
|
|
2568
|
-
const len2 = WASM_VECTOR_LEN;
|
|
2569
|
-
const ret = wasm.inboxStateFromInboxIds(ptr0, len0, ptr1, len1, ptr2, len2);
|
|
2786
|
+
const ret = wasm.inboxStateFromInboxIds(backend.__wbg_ptr, ptr0, len0);
|
|
2570
2787
|
return ret;
|
|
2571
2788
|
}
|
|
2572
2789
|
|
|
@@ -2692,23 +2909,19 @@ export function opfsPoolCapacity() {
|
|
|
2692
2909
|
}
|
|
2693
2910
|
|
|
2694
2911
|
/**
|
|
2695
|
-
* @param {
|
|
2696
|
-
* @param {string | null | undefined} gatewayHost
|
|
2912
|
+
* @param {Backend} backend
|
|
2697
2913
|
* @param {Identifier} recoveryIdentifier
|
|
2698
2914
|
* @param {string} inboxId
|
|
2699
2915
|
* @param {Uint8Array[]} installationIds
|
|
2700
2916
|
* @returns {SignatureRequestHandle}
|
|
2701
2917
|
*/
|
|
2702
|
-
export function revokeInstallationsSignatureRequest(
|
|
2703
|
-
|
|
2918
|
+
export function revokeInstallationsSignatureRequest(backend, recoveryIdentifier, inboxId, installationIds) {
|
|
2919
|
+
_assertClass(backend, Backend);
|
|
2920
|
+
const ptr0 = passStringToWasm0(inboxId, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2704
2921
|
const len0 = WASM_VECTOR_LEN;
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
const
|
|
2708
|
-
const len2 = WASM_VECTOR_LEN;
|
|
2709
|
-
const ptr3 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
2710
|
-
const len3 = WASM_VECTOR_LEN;
|
|
2711
|
-
const ret = wasm.revokeInstallationsSignatureRequest(ptr0, len0, ptr1, len1, recoveryIdentifier, ptr2, len2, ptr3, len3);
|
|
2922
|
+
const ptr1 = passArrayJsValueToWasm0(installationIds, wasm.__wbindgen_malloc);
|
|
2923
|
+
const len1 = WASM_VECTOR_LEN;
|
|
2924
|
+
const ret = wasm.revokeInstallationsSignatureRequest(backend.__wbg_ptr, recoveryIdentifier, ptr0, len0, ptr1, len1);
|
|
2712
2925
|
if (ret[2]) {
|
|
2713
2926
|
throw takeFromExternrefTable0(ret[1]);
|
|
2714
2927
|
}
|
|
@@ -3089,6 +3302,9 @@ function __wbg_get_imports() {
|
|
|
3089
3302
|
__wbg_getRandomValues_1c61fac11405ffdc: function() { return handleError(function (arg0, arg1) {
|
|
3090
3303
|
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
3091
3304
|
}, arguments); },
|
|
3305
|
+
__wbg_getRandomValues_2a91986308c74a93: function() { return handleError(function (arg0, arg1) {
|
|
3306
|
+
globalThis.crypto.getRandomValues(getArrayU8FromWasm0(arg0, arg1));
|
|
3307
|
+
}, arguments); },
|
|
3092
3308
|
__wbg_getRandomValues_b8f5dbd5f3995a9e: function() { return handleError(function (arg0, arg1) {
|
|
3093
3309
|
arg0.getRandomValues(arg1);
|
|
3094
3310
|
}, arguments); },
|
|
@@ -3520,9 +3736,6 @@ function __wbg_get_imports() {
|
|
|
3520
3736
|
const ret = setTimeout(arg0, arg1);
|
|
3521
3737
|
return ret;
|
|
3522
3738
|
},
|
|
3523
|
-
__wbg_setTimeout_8f06012fba12034e: function(arg0, arg1) {
|
|
3524
|
-
globalThis.setTimeout(arg0, arg1);
|
|
3525
|
-
},
|
|
3526
3739
|
__wbg_setTimeout_929c97a7c0f23d36: function(arg0, arg1) {
|
|
3527
3740
|
const ret = setTimeout(arg0, arg1);
|
|
3528
3741
|
return ret;
|
|
@@ -3753,22 +3966,22 @@ function __wbg_get_imports() {
|
|
|
3753
3966
|
return ret;
|
|
3754
3967
|
}, arguments); },
|
|
3755
3968
|
__wbindgen_cast_0000000000000001: function(arg0, arg1) {
|
|
3756
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3757
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3969
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7146, function: Function { arguments: [], shim_idx: 7147, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3970
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__he86c9d9bb368f43f, wasm_bindgen__convert__closures_____invoke__h7478175f8808d1fa);
|
|
3758
3971
|
return ret;
|
|
3759
3972
|
},
|
|
3760
3973
|
__wbindgen_cast_0000000000000002: function(arg0, arg1) {
|
|
3761
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3974
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7339, function: Function { arguments: [], shim_idx: 7340, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3762
3975
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h213ec6c0cfaa8daa, wasm_bindgen__convert__closures_____invoke__h7d2ee1dee7ec118b);
|
|
3763
3976
|
return ret;
|
|
3764
3977
|
},
|
|
3765
3978
|
__wbindgen_cast_0000000000000003: function(arg0, arg1) {
|
|
3766
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3767
|
-
const ret = makeMutClosure(arg0, arg1, wasm.
|
|
3979
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7509, function: Function { arguments: [], shim_idx: 7510, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3980
|
+
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__h006fa4718e4400fc, wasm_bindgen__convert__closures_____invoke__h48de3f26adb3eb8d);
|
|
3768
3981
|
return ret;
|
|
3769
3982
|
},
|
|
3770
3983
|
__wbindgen_cast_0000000000000004: function(arg0, arg1) {
|
|
3771
|
-
// Cast intrinsic for `Closure(Closure { dtor_idx:
|
|
3984
|
+
// Cast intrinsic for `Closure(Closure { dtor_idx: 7901, function: Function { arguments: [Externref], shim_idx: 7902, ret: Unit, inner_ret: Some(Unit) }, mutable: true }) -> Externref`.
|
|
3772
3985
|
const ret = makeMutClosure(arg0, arg1, wasm.wasm_bindgen__closure__destroy__hd56fbfc240f3eed8, wasm_bindgen__convert__closures_____invoke__h01ab1ec45c07a95b);
|
|
3773
3986
|
return ret;
|
|
3774
3987
|
},
|
|
@@ -3848,16 +4061,16 @@ function __wbg_get_imports() {
|
|
|
3848
4061
|
};
|
|
3849
4062
|
}
|
|
3850
4063
|
|
|
3851
|
-
function
|
|
3852
|
-
wasm.
|
|
4064
|
+
function wasm_bindgen__convert__closures_____invoke__h7478175f8808d1fa(arg0, arg1) {
|
|
4065
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h7478175f8808d1fa(arg0, arg1);
|
|
3853
4066
|
}
|
|
3854
4067
|
|
|
3855
4068
|
function wasm_bindgen__convert__closures_____invoke__h7d2ee1dee7ec118b(arg0, arg1) {
|
|
3856
4069
|
wasm.wasm_bindgen__convert__closures_____invoke__h7d2ee1dee7ec118b(arg0, arg1);
|
|
3857
4070
|
}
|
|
3858
4071
|
|
|
3859
|
-
function
|
|
3860
|
-
wasm.
|
|
4072
|
+
function wasm_bindgen__convert__closures_____invoke__h48de3f26adb3eb8d(arg0, arg1) {
|
|
4073
|
+
wasm.wasm_bindgen__convert__closures_____invoke__h48de3f26adb3eb8d(arg0, arg1);
|
|
3861
4074
|
}
|
|
3862
4075
|
|
|
3863
4076
|
function wasm_bindgen__convert__closures_____invoke__h01ab1ec45c07a95b(arg0, arg1, arg2) {
|
|
@@ -3892,6 +4105,12 @@ const __wbindgen_enum_RequestRedirect = ["follow", "error", "manual"];
|
|
|
3892
4105
|
const AuthHandleFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3893
4106
|
? { register: () => {}, unregister: () => {} }
|
|
3894
4107
|
: new FinalizationRegistry(ptr => wasm.__wbg_authhandle_free(ptr >>> 0, 1));
|
|
4108
|
+
const BackendFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4109
|
+
? { register: () => {}, unregister: () => {} }
|
|
4110
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_backend_free(ptr >>> 0, 1));
|
|
4111
|
+
const BackendBuilderFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
4112
|
+
? { register: () => {}, unregister: () => {} }
|
|
4113
|
+
: new FinalizationRegistry(ptr => wasm.__wbg_backendbuilder_free(ptr >>> 0, 1));
|
|
3895
4114
|
const ClientFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
3896
4115
|
? { register: () => {}, unregister: () => {} }
|
|
3897
4116
|
: new FinalizationRegistry(ptr => wasm.__wbg_client_free(ptr >>> 0, 1));
|
|
Binary file
|
|
@@ -5,49 +5,60 @@ export const __wbg_authhandle_free: (a: number, b: number) => void;
|
|
|
5
5
|
export const authhandle_id: (a: number) => number;
|
|
6
6
|
export const authhandle_new: () => number;
|
|
7
7
|
export const authhandle_set: (a: number, b: any) => any;
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
8
|
+
export const client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any;
|
|
9
|
+
export const client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any;
|
|
10
|
+
export const client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
|
|
11
|
+
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
12
|
+
export const client_inboxState: (a: number, b: number) => any;
|
|
13
|
+
export const inboxStateFromInboxIds: (a: number, b: number, c: number) => any;
|
|
14
|
+
export const __wbg_backend_free: (a: number, b: number) => void;
|
|
15
|
+
export const __wbg_backendbuilder_free: (a: number, b: number) => void;
|
|
16
|
+
export const __wbg_get_backendbuilder_env: (a: number) => number;
|
|
17
|
+
export const __wbg_get_backendbuilder_readonly: (a: number) => number;
|
|
18
|
+
export const __wbg_set_backendbuilder_env: (a: number, b: number) => void;
|
|
19
|
+
export const __wbg_set_backendbuilder_readonly: (a: number, b: number) => void;
|
|
20
|
+
export const __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
|
|
21
|
+
export const applySignatureRequest: (a: number, b: number) => any;
|
|
22
|
+
export const backend_appVersion: (a: number) => [number, number];
|
|
23
|
+
export const backend_env: (a: number) => number;
|
|
24
|
+
export const backend_gatewayHost: (a: number) => [number, number];
|
|
25
|
+
export const backend_v3Host: (a: number) => [number, number];
|
|
26
|
+
export const backendbuilder_authCallback: (a: number, b: any) => void;
|
|
27
|
+
export const backendbuilder_authHandle: (a: number, b: number) => void;
|
|
28
|
+
export const backendbuilder_build: (a: number) => [number, number, number];
|
|
29
|
+
export const backendbuilder_new: (a: number) => number;
|
|
30
|
+
export const backendbuilder_setApiUrl: (a: number, b: number, c: number) => number;
|
|
31
|
+
export const backendbuilder_setAppVersion: (a: number, b: number, c: number) => number;
|
|
32
|
+
export const backendbuilder_setGatewayHost: (a: number, b: number, c: number) => number;
|
|
33
|
+
export const backendbuilder_setReadonly: (a: number, b: number) => number;
|
|
34
|
+
export const client_addWalletSignatureRequest: (a: number, b: any) => any;
|
|
35
|
+
export const client_applySignatureRequest: (a: number, b: number) => any;
|
|
36
|
+
export const client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
|
|
37
|
+
export const client_createInboxSignatureRequest: (a: number) => [number, number, number];
|
|
38
|
+
export const client_registerIdentity: (a: number, b: number) => any;
|
|
39
|
+
export const client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
|
|
40
|
+
export const client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
|
|
41
|
+
export const client_revokeWalletSignatureRequest: (a: number, b: any) => any;
|
|
42
|
+
export const client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
43
|
+
export const client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
44
|
+
export const createClientWithBackend: (a: number, b: number, c: number, d: any, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: bigint) => any;
|
|
45
|
+
export const revokeInstallationsSignatureRequest: (a: number, b: any, c: number, d: number, e: number, f: number) => [number, number, number];
|
|
46
|
+
export const signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
|
|
47
|
+
export const signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
|
|
48
|
+
export const signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
|
|
49
|
+
export const signaturerequesthandle_signatureText: (a: number) => any;
|
|
50
|
+
export const verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
|
|
15
51
|
export const contentTypeReply: () => any;
|
|
16
|
-
export const opfsClearAll: () => any;
|
|
17
|
-
export const opfsDeleteFile: (a: number, b: number) => any;
|
|
18
|
-
export const opfsExportDb: (a: number, b: number) => any;
|
|
19
|
-
export const opfsFileCount: () => any;
|
|
20
|
-
export const opfsFileExists: (a: number, b: number) => any;
|
|
21
|
-
export const opfsImportDb: (a: number, b: number, c: any) => any;
|
|
22
|
-
export const opfsInit: () => any;
|
|
23
|
-
export const opfsListFiles: () => any;
|
|
24
|
-
export const opfsPoolCapacity: () => any;
|
|
25
52
|
export const __wbg_client_free: (a: number, b: number) => void;
|
|
26
|
-
export const __wbg_conversation_free: (a: number, b: number) => void;
|
|
27
|
-
export const __wbg_conversationlistitem_free: (a: number, b: number) => void;
|
|
28
|
-
export const __wbg_conversations_free: (a: number, b: number) => void;
|
|
29
53
|
export const __wbg_devicesync_free: (a: number, b: number) => void;
|
|
30
|
-
export const __wbg_get_conversationlistitem_conversation: (a: number) => number;
|
|
31
|
-
export const __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
|
|
32
|
-
export const __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
|
|
33
|
-
export const __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
|
|
34
|
-
export const __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
|
|
35
|
-
export const __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
|
|
36
|
-
export const __wbg_signaturerequesthandle_free: (a: number, b: number) => void;
|
|
37
|
-
export const __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
38
|
-
export const applySignatureRequest: (a: number, b: number, c: number, d: number, e: number) => any;
|
|
39
54
|
export const client_accountIdentifier: (a: number) => any;
|
|
40
|
-
export const client_addWalletSignatureRequest: (a: number, b: any) => any;
|
|
41
55
|
export const client_apiAggregateStatistics: (a: number) => [number, number];
|
|
42
56
|
export const client_apiIdentityStatistics: (a: number) => any;
|
|
43
57
|
export const client_apiStatistics: (a: number) => any;
|
|
44
58
|
export const client_appVersion: (a: number) => [number, number];
|
|
45
|
-
export const client_applySignatureRequest: (a: number, b: number) => any;
|
|
46
59
|
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
47
|
-
export const client_changeRecoveryIdentifierSignatureRequest: (a: number, b: any) => any;
|
|
48
60
|
export const client_clearAllStatistics: (a: number) => void;
|
|
49
61
|
export const client_conversations: (a: number) => number;
|
|
50
|
-
export const client_createInboxSignatureRequest: (a: number) => [number, number, number];
|
|
51
62
|
export const client_device_sync: (a: number) => number;
|
|
52
63
|
export const client_findInboxIdByIdentity: (a: number, b: any) => any;
|
|
53
64
|
export const client_inboxId: (a: number) => [number, number];
|
|
@@ -56,20 +67,57 @@ export const client_installationId: (a: number) => [number, number];
|
|
|
56
67
|
export const client_installationIdBytes: (a: number) => any;
|
|
57
68
|
export const client_isRegistered: (a: number) => number;
|
|
58
69
|
export const client_libxmtpVersion: (a: number) => [number, number];
|
|
59
|
-
export const client_registerIdentity: (a: number, b: number) => any;
|
|
60
|
-
export const client_revokeAllOtherInstallationsSignatureRequest: (a: number) => any;
|
|
61
|
-
export const client_revokeInstallationsSignatureRequest: (a: number, b: number, c: number) => any;
|
|
62
|
-
export const client_revokeWalletSignatureRequest: (a: number, b: any) => any;
|
|
63
|
-
export const client_signWithInstallationKey: (a: number, b: number, c: number) => [number, number, number];
|
|
64
70
|
export const client_syncPreferences: (a: number) => any;
|
|
65
|
-
export const client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
66
|
-
export const contentTypeActions: () => any;
|
|
67
71
|
export const contentTypeAttachment: () => any;
|
|
68
72
|
export const contentTypeIntent: () => any;
|
|
69
|
-
export const
|
|
73
|
+
export const contentTypeLeaveRequest: () => any;
|
|
74
|
+
export const contentTypeMarkdown: () => any;
|
|
70
75
|
export const contentTypeReadReceipt: () => any;
|
|
71
|
-
export const
|
|
76
|
+
export const contentTypeText: () => any;
|
|
77
|
+
export const 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: bigint, r: number, s: number, t: number) => any;
|
|
78
|
+
export const devicesync_archiveMetadata: (a: number, b: any, c: any) => any;
|
|
79
|
+
export const devicesync_createArchive: (a: number, b: any, c: any) => any;
|
|
80
|
+
export const devicesync_importArchive: (a: number, b: any, c: any) => any;
|
|
81
|
+
export const devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number];
|
|
82
|
+
export const devicesync_processSyncArchive: (a: number, b: number, c: number) => any;
|
|
83
|
+
export const devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
84
|
+
export const devicesync_sendSyncRequest: (a: number, b: any, c: number, d: number) => any;
|
|
85
|
+
export const devicesync_syncAllDeviceSyncGroups: (a: number) => any;
|
|
86
|
+
export const encodeAttachment: (a: any) => [number, number, number];
|
|
87
|
+
export const encodeIntent: (a: any) => [number, number, number];
|
|
88
|
+
export const encodeMarkdown: (a: number, b: number) => [number, number, number];
|
|
89
|
+
export const encodeReadReceipt: (a: any) => [number, number, number];
|
|
90
|
+
export const encodeText: (a: number, b: number) => [number, number, number];
|
|
91
|
+
export const generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
|
|
92
|
+
export const getInboxIdForIdentifier: (a: number, b: any) => any;
|
|
93
|
+
export const __wbg_streamcloser_free: (a: number, b: number) => void;
|
|
94
|
+
export const contentTypeActions: () => any;
|
|
95
|
+
export const contentTypeGroupUpdated: () => any;
|
|
96
|
+
export const contentTypeMultiRemoteAttachment: () => any;
|
|
97
|
+
export const contentTypeReaction: () => any;
|
|
98
|
+
export const contentTypeTransactionReference: () => any;
|
|
72
99
|
export const contentTypeWalletSendCalls: () => any;
|
|
100
|
+
export const encodeActions: (a: any) => [number, number, number];
|
|
101
|
+
export const encodeMultiRemoteAttachment: (a: any) => [number, number, number];
|
|
102
|
+
export const encodeReaction: (a: any) => [number, number, number];
|
|
103
|
+
export const encodeTransactionReference: (a: any) => [number, number, number];
|
|
104
|
+
export const encodeWalletSendCalls: (a: any) => [number, number, number];
|
|
105
|
+
export const streamcloser_end: (a: number) => void;
|
|
106
|
+
export const streamcloser_endAndWait: (a: number) => any;
|
|
107
|
+
export const streamcloser_isClosed: (a: number) => number;
|
|
108
|
+
export const streamcloser_waitForReady: (a: number) => any;
|
|
109
|
+
export const __wbg_conversation_free: (a: number, b: number) => void;
|
|
110
|
+
export const __wbg_conversationlistitem_free: (a: number, b: number) => void;
|
|
111
|
+
export const __wbg_conversations_free: (a: number, b: number) => void;
|
|
112
|
+
export const __wbg_get_conversationlistitem_conversation: (a: number) => number;
|
|
113
|
+
export const __wbg_get_conversationlistitem_isCommitLogForked: (a: number) => number;
|
|
114
|
+
export const __wbg_get_conversationlistitem_lastMessage: (a: number) => any;
|
|
115
|
+
export const __wbg_set_conversationlistitem_conversation: (a: number, b: number) => void;
|
|
116
|
+
export const __wbg_set_conversationlistitem_isCommitLogForked: (a: number, b: number) => void;
|
|
117
|
+
export const __wbg_set_conversationlistitem_lastMessage: (a: number, b: number) => void;
|
|
118
|
+
export const client_getConsentState: (a: number, b: number, c: number, d: number) => any;
|
|
119
|
+
export const client_setConsentStates: (a: number, b: number, c: number) => any;
|
|
120
|
+
export const contentTypeRemoteAttachment: () => any;
|
|
73
121
|
export const conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
74
122
|
export const conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
75
123
|
export const conversation_addMembersByIdentity: (a: number, b: number, c: number) => any;
|
|
@@ -77,6 +125,7 @@ export const conversation_addSuperAdmin: (a: number, b: number, c: number) => an
|
|
|
77
125
|
export const conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
78
126
|
export const conversation_adminList: (a: number) => [number, number, number, number];
|
|
79
127
|
export const conversation_appData: (a: number) => [number, number, number, number];
|
|
128
|
+
export const conversation_consentState: (a: number) => [number, number, number];
|
|
80
129
|
export const conversation_countMessages: (a: number, b: number) => any;
|
|
81
130
|
export const conversation_createdAtNs: (a: number) => bigint;
|
|
82
131
|
export const conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
@@ -127,6 +176,7 @@ export const conversation_stream: (a: number, b: any) => [number, number, number
|
|
|
127
176
|
export const conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
128
177
|
export const conversation_sync: (a: number) => any;
|
|
129
178
|
export const conversation_updateAppData: (a: number, b: number, c: number) => any;
|
|
179
|
+
export const conversation_updateConsentState: (a: number, b: number) => [number, number];
|
|
130
180
|
export const conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
131
181
|
export const conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
132
182
|
export const conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
@@ -153,50 +203,19 @@ export const conversations_streamMessageDeletions: (a: number, b: any) => [numbe
|
|
|
153
203
|
export const conversations_streamPreferences: (a: number, b: any) => [number, number, number];
|
|
154
204
|
export const conversations_sync: (a: number) => any;
|
|
155
205
|
export const conversations_syncAllConversations: (a: number, b: number, c: number) => any;
|
|
156
|
-
export const 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: number, s: bigint, t: number, u: number, v: number) => any;
|
|
157
206
|
export const decryptAttachment: (a: number, b: number, c: any) => [number, number, number];
|
|
158
|
-
export const devicesync_archiveMetadata: (a: number, b: any, c: any) => any;
|
|
159
|
-
export const devicesync_createArchive: (a: number, b: any, c: any) => any;
|
|
160
|
-
export const devicesync_importArchive: (a: number, b: any, c: any) => any;
|
|
161
|
-
export const devicesync_listAvailableArchives: (a: number, b: bigint) => [number, number, number, number];
|
|
162
|
-
export const devicesync_processSyncArchive: (a: number, b: number, c: number) => any;
|
|
163
|
-
export const devicesync_sendSyncArchive: (a: number, b: any, c: number, d: number, e: number, f: number) => any;
|
|
164
|
-
export const devicesync_sendSyncRequest: (a: number) => any;
|
|
165
|
-
export const devicesync_syncAllDeviceSyncGroups: (a: number) => any;
|
|
166
|
-
export const encodeActions: (a: any) => [number, number, number];
|
|
167
|
-
export const encodeAttachment: (a: any) => [number, number, number];
|
|
168
|
-
export const encodeIntent: (a: any) => [number, number, number];
|
|
169
|
-
export const encodeReaction: (a: any) => [number, number, number];
|
|
170
|
-
export const encodeReadReceipt: (a: any) => [number, number, number];
|
|
171
207
|
export const encodeRemoteAttachment: (a: any) => [number, number, number];
|
|
172
|
-
export const encodeWalletSendCalls: (a: any) => [number, number, number];
|
|
173
208
|
export const encryptAttachment: (a: any) => [number, number, number];
|
|
174
|
-
export const revokeInstallationsSignatureRequest: (a: number, b: number, c: number, d: number, e: any, f: number, g: number, h: number, i: number) => [number, number, number];
|
|
175
|
-
export const signaturerequesthandle_addEcdsaSignature: (a: number, b: any) => any;
|
|
176
|
-
export const signaturerequesthandle_addPasskeySignature: (a: number, b: any) => any;
|
|
177
|
-
export const signaturerequesthandle_addScwSignature: (a: number, b: any, c: any, d: bigint, e: number, f: bigint) => any;
|
|
178
|
-
export const signaturerequesthandle_signatureText: (a: number) => any;
|
|
179
|
-
export const streamcloser_end: (a: number) => void;
|
|
180
|
-
export const streamcloser_endAndWait: (a: number) => any;
|
|
181
|
-
export const streamcloser_isClosed: (a: number) => number;
|
|
182
|
-
export const streamcloser_waitForReady: (a: number) => any;
|
|
183
|
-
export const verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) => [number, number];
|
|
184
|
-
export const client_fetchLatestInboxUpdatesCount: (a: number, b: number, c: number, d: number) => any;
|
|
185
|
-
export const client_fetchOwnInboxUpdatesCount: (a: number, b: number) => any;
|
|
186
|
-
export const client_getKeyPackageStatusesForInstallationIds: (a: number, b: number, c: number) => any;
|
|
187
|
-
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
188
|
-
export const client_inboxState: (a: number, b: number) => any;
|
|
189
|
-
export const contentTypeLeaveRequest: () => any;
|
|
190
|
-
export const contentTypeMarkdown: () => any;
|
|
191
|
-
export const contentTypeMultiRemoteAttachment: () => any;
|
|
192
|
-
export const contentTypeText: () => any;
|
|
193
|
-
export const encodeMarkdown: (a: number, b: number) => [number, number, number];
|
|
194
|
-
export const encodeMultiRemoteAttachment: (a: any) => [number, number, number];
|
|
195
|
-
export const encodeText: (a: number, b: number) => [number, number, number];
|
|
196
|
-
export const generateInboxId: (a: any, b: number, c: bigint) => [number, number, number, number];
|
|
197
|
-
export const getInboxIdForIdentifier: (a: number, b: number, c: number, d: number, e: number, f: any) => any;
|
|
198
|
-
export const inboxStateFromInboxIds: (a: number, b: number, c: number, d: number, e: number, f: number) => any;
|
|
199
209
|
export const metadataFieldName: (a: number) => [number, number];
|
|
210
|
+
export const opfsClearAll: () => any;
|
|
211
|
+
export const opfsDeleteFile: (a: number, b: number) => any;
|
|
212
|
+
export const opfsExportDb: (a: number, b: number) => any;
|
|
213
|
+
export const opfsFileCount: () => any;
|
|
214
|
+
export const opfsFileExists: (a: number, b: number) => any;
|
|
215
|
+
export const opfsImportDb: (a: number, b: number, c: any) => any;
|
|
216
|
+
export const opfsInit: () => any;
|
|
217
|
+
export const opfsListFiles: () => any;
|
|
218
|
+
export const opfsPoolCapacity: () => any;
|
|
200
219
|
export const rust_zstd_wasm_shim_calloc: (a: number, b: number) => number;
|
|
201
220
|
export const rust_zstd_wasm_shim_free: (a: number) => void;
|
|
202
221
|
export const rust_zstd_wasm_shim_malloc: (a: number) => number;
|
|
@@ -244,16 +263,16 @@ export const __wbgtest_module_signature: () => [number, bigint];
|
|
|
244
263
|
export const __wbgbench_dump: () => [number, number];
|
|
245
264
|
export const __wbgbench_import: (a: number, b: number) => void;
|
|
246
265
|
export const __wbgtest_coverage_path: (a: number, b: number, c: number, d: number, e: number, f: bigint) => [number, number];
|
|
247
|
-
export const
|
|
266
|
+
export const wasm_bindgen__closure__destroy__he86c9d9bb368f43f: (a: number, b: number) => void;
|
|
248
267
|
export const wasm_bindgen__closure__destroy__h213ec6c0cfaa8daa: (a: number, b: number) => void;
|
|
249
|
-
export const
|
|
268
|
+
export const wasm_bindgen__closure__destroy__h006fa4718e4400fc: (a: number, b: number) => void;
|
|
250
269
|
export const wasm_bindgen__closure__destroy__hd56fbfc240f3eed8: (a: number, b: number) => void;
|
|
251
270
|
export const wasm_bindgen__convert__closures_____invoke__h4761911dc2bcd4ab: (a: number, b: number, c: any, d: number, e: any) => void;
|
|
252
271
|
export const wasm_bindgen__convert__closures_____invoke__h93371d492ea6dccf: (a: number, b: number, c: any, d: any) => void;
|
|
253
272
|
export const wasm_bindgen__convert__closures_____invoke__h01ab1ec45c07a95b: (a: number, b: number, c: any) => void;
|
|
254
|
-
export const
|
|
273
|
+
export const wasm_bindgen__convert__closures_____invoke__h7478175f8808d1fa: (a: number, b: number) => void;
|
|
255
274
|
export const wasm_bindgen__convert__closures_____invoke__h7d2ee1dee7ec118b: (a: number, b: number) => void;
|
|
256
|
-
export const
|
|
275
|
+
export const wasm_bindgen__convert__closures_____invoke__h48de3f26adb3eb8d: (a: number, b: number) => void;
|
|
257
276
|
export const __externref_table_alloc: () => number;
|
|
258
277
|
export const __wbindgen_externrefs: WebAssembly.Table;
|
|
259
278
|
export const __wbindgen_malloc: (a: number, b: number) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmtp/wasm-bindings",
|
|
3
|
-
"version": "1.10.0-dev.
|
|
3
|
+
"version": "1.10.0-dev.37fd9aa",
|
|
4
4
|
"description": "WASM bindings for the libXMTP rust library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"xmtp",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"@vitest/browser-playwright": "^4.0.8",
|
|
67
67
|
"@xmtp/content-type-remote-attachment": "^2.0.3",
|
|
68
68
|
"binaryen": "^125.0.0",
|
|
69
|
-
"playwright": "
|
|
69
|
+
"playwright": "=1.57",
|
|
70
70
|
"prettier": "^3.7.4",
|
|
71
71
|
"prettier-plugin-packagejson": "^3.0.0",
|
|
72
72
|
"tsx": "^4.20.6",
|