@xmtp/wasm-bindings 0.0.8 → 0.0.10
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 +160 -158
- package/dist/bindings_wasm.js +211 -198
- package/dist/bindings_wasm_bg.wasm +0 -0
- package/dist/bindings_wasm_bg.wasm.d.ts +137 -136
- package/package.json +2 -2
package/dist/bindings_wasm.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
-
export function createClient(host: string, inbox_id: string, account_address: string, db_path?: string, encryption_key?: Uint8Array, history_sync_url?: string, log_options?: LogOptions): Promise<Client>;
|
|
4
3
|
export function getInboxIdForAddress(host: string, account_address: string): Promise<string | undefined>;
|
|
5
4
|
export function generateInboxId(account_address: string): string;
|
|
6
5
|
export function verifySignedWithPublicKey(signature_text: string, signature_bytes: Uint8Array, public_key: Uint8Array): void;
|
|
6
|
+
export function createClient(host: string, inbox_id: string, account_address: string, db_path?: string, encryption_key?: Uint8Array, history_sync_url?: string, log_options?: LogOptions): Promise<Client>;
|
|
7
7
|
export enum ConsentEntityType {
|
|
8
8
|
GroupId = 0,
|
|
9
9
|
InboxId = 1,
|
|
@@ -84,33 +84,34 @@ type ReadableStreamType = "bytes";
|
|
|
84
84
|
export class Client {
|
|
85
85
|
private constructor();
|
|
86
86
|
free(): void;
|
|
87
|
-
/**
|
|
88
|
-
*
|
|
89
|
-
* * Get the client's inbox state.
|
|
90
|
-
* *
|
|
91
|
-
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
92
|
-
* * Otherwise, the state will be read from the local database.
|
|
93
|
-
*
|
|
94
|
-
*/
|
|
95
|
-
inboxState(refresh_from_network: boolean): Promise<InboxState>;
|
|
96
|
-
getLatestInboxState(inbox_id: string): Promise<InboxState>;
|
|
97
|
-
canMessage(account_addresses: (string)[]): Promise<any>;
|
|
98
|
-
registerIdentity(): Promise<void>;
|
|
99
|
-
sendHistorySyncRequest(): Promise<void>;
|
|
100
|
-
sendConsentSyncRequest(): Promise<void>;
|
|
101
|
-
findInboxIdByAddress(address: string): Promise<string | undefined>;
|
|
102
|
-
conversations(): Conversations;
|
|
103
87
|
setConsentStates(records: (Consent)[]): Promise<void>;
|
|
104
88
|
getConsentState(entity_type: ConsentEntityType, entity: string): Promise<ConsentState>;
|
|
105
89
|
createInboxSignatureText(): Promise<string | undefined>;
|
|
106
90
|
addWalletSignatureText(new_wallet_address: string): Promise<string>;
|
|
107
91
|
revokeWalletSignatureText(wallet_address: string): Promise<string>;
|
|
108
|
-
|
|
92
|
+
revokeAllOtherInstallationsSignatureText(): Promise<string>;
|
|
93
|
+
revokeInstallationsSignatureText(installation_ids: (Uint8Array)[]): Promise<string>;
|
|
109
94
|
addSignature(signature_type: SignatureRequestType, signature_bytes: Uint8Array): Promise<void>;
|
|
110
95
|
addScwSignature(signature_type: SignatureRequestType, signature_bytes: Uint8Array, chain_id: bigint, block_number?: bigint): Promise<void>;
|
|
111
96
|
applySignatureRequests(): Promise<void>;
|
|
112
97
|
signWithInstallationKey(signature_text: string): Uint8Array;
|
|
113
98
|
verifySignedWithInstallationKey(signature_text: string, signature_bytes: Uint8Array): void;
|
|
99
|
+
canMessage(account_addresses: (string)[]): Promise<any>;
|
|
100
|
+
registerIdentity(): Promise<void>;
|
|
101
|
+
sendHistorySyncRequest(): Promise<void>;
|
|
102
|
+
sendConsentSyncRequest(): Promise<void>;
|
|
103
|
+
findInboxIdByAddress(address: string): Promise<string | undefined>;
|
|
104
|
+
conversations(): Conversations;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* * Get the client's inbox state.
|
|
108
|
+
* *
|
|
109
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
110
|
+
* * Otherwise, the state will be read from the local database.
|
|
111
|
+
*
|
|
112
|
+
*/
|
|
113
|
+
inboxState(refresh_from_network: boolean): Promise<InboxState>;
|
|
114
|
+
getLatestInboxState(inbox_id: string): Promise<InboxState>;
|
|
114
115
|
readonly accountAddress: string;
|
|
115
116
|
readonly inboxId: string;
|
|
116
117
|
readonly isRegistered: boolean;
|
|
@@ -135,6 +136,8 @@ export class ContentTypeId {
|
|
|
135
136
|
export class Conversation {
|
|
136
137
|
private constructor();
|
|
137
138
|
free(): void;
|
|
139
|
+
consentState(): ConsentState;
|
|
140
|
+
updateConsentState(state: ConsentState): void;
|
|
138
141
|
id(): string;
|
|
139
142
|
send(encoded_content: EncodedContent): Promise<string>;
|
|
140
143
|
/**
|
|
@@ -146,7 +149,7 @@ export class Conversation {
|
|
|
146
149
|
*/
|
|
147
150
|
publishMessages(): Promise<void>;
|
|
148
151
|
sync(): Promise<void>;
|
|
149
|
-
findMessages(opts?: ListMessagesOptions): (Message)[]
|
|
152
|
+
findMessages(opts?: ListMessagesOptions): Promise<(Message)[]>;
|
|
150
153
|
listMembers(): Promise<any>;
|
|
151
154
|
adminList(): (string)[];
|
|
152
155
|
superAdminList(): (string)[];
|
|
@@ -172,11 +175,9 @@ export class Conversation {
|
|
|
172
175
|
createdAtNs(): bigint;
|
|
173
176
|
isActive(): boolean;
|
|
174
177
|
addedByInboxId(): string;
|
|
175
|
-
groupMetadata(): GroupMetadata
|
|
178
|
+
groupMetadata(): Promise<GroupMetadata>;
|
|
176
179
|
dmPeerInboxId(): string;
|
|
177
180
|
updatePermissionPolicy(permission_update_type: PermissionUpdateType, permission_policy_option: PermissionPolicy, metadata_field?: MetadataField): Promise<void>;
|
|
178
|
-
consentState(): ConsentState;
|
|
179
|
-
updateConsentState(state: ConsentState): void;
|
|
180
181
|
}
|
|
181
182
|
export class Conversations {
|
|
182
183
|
private constructor();
|
|
@@ -337,95 +338,6 @@ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembl
|
|
|
337
338
|
|
|
338
339
|
export interface InitOutput {
|
|
339
340
|
readonly memory: WebAssembly.Memory;
|
|
340
|
-
readonly __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
341
|
-
readonly groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
342
|
-
readonly groupmetadata_conversationType: (a: number) => [number, number];
|
|
343
|
-
readonly __wbg_groupmember_free: (a: number, b: number) => void;
|
|
344
|
-
readonly __wbg_get_groupmember_inboxId: (a: number) => [number, number];
|
|
345
|
-
readonly __wbg_set_groupmember_inboxId: (a: number, b: number, c: number) => void;
|
|
346
|
-
readonly __wbg_get_groupmember_accountAddresses: (a: number) => [number, number];
|
|
347
|
-
readonly __wbg_set_groupmember_accountAddresses: (a: number, b: number, c: number) => void;
|
|
348
|
-
readonly __wbg_get_groupmember_installationIds: (a: number) => [number, number];
|
|
349
|
-
readonly __wbg_set_groupmember_installationIds: (a: number, b: number, c: number) => void;
|
|
350
|
-
readonly __wbg_get_groupmember_permissionLevel: (a: number) => number;
|
|
351
|
-
readonly __wbg_set_groupmember_permissionLevel: (a: number, b: number) => void;
|
|
352
|
-
readonly __wbg_get_groupmember_consentState: (a: number) => number;
|
|
353
|
-
readonly __wbg_set_groupmember_consentState: (a: number, b: number) => void;
|
|
354
|
-
readonly groupmember_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
355
|
-
readonly __wbg_conversation_free: (a: number, b: number) => void;
|
|
356
|
-
readonly conversation_id: (a: number) => [number, number];
|
|
357
|
-
readonly conversation_send: (a: number, b: number) => any;
|
|
358
|
-
readonly conversation_sendOptimistic: (a: number, b: number) => [number, number, number, number];
|
|
359
|
-
readonly conversation_publishMessages: (a: number) => any;
|
|
360
|
-
readonly conversation_sync: (a: number) => any;
|
|
361
|
-
readonly conversation_findMessages: (a: number, b: number) => [number, number, number, number];
|
|
362
|
-
readonly conversation_listMembers: (a: number) => any;
|
|
363
|
-
readonly conversation_adminList: (a: number) => [number, number, number, number];
|
|
364
|
-
readonly conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
365
|
-
readonly conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
366
|
-
readonly conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
367
|
-
readonly conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
368
|
-
readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
369
|
-
readonly conversation_removeAdmin: (a: number, b: number, c: number) => any;
|
|
370
|
-
readonly conversation_addSuperAdmin: (a: number, b: number, c: number) => any;
|
|
371
|
-
readonly conversation_removeSuperAdmin: (a: number, b: number, c: number) => any;
|
|
372
|
-
readonly conversation_groupPermissions: (a: number) => [number, number, number];
|
|
373
|
-
readonly conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
374
|
-
readonly conversation_removeMembers: (a: number, b: number, c: number) => any;
|
|
375
|
-
readonly conversation_removeMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
376
|
-
readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
377
|
-
readonly conversation_groupName: (a: number) => [number, number, number, number];
|
|
378
|
-
readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
379
|
-
readonly conversation_groupImageUrlSquare: (a: number) => [number, number, number, number];
|
|
380
|
-
readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
381
|
-
readonly conversation_groupDescription: (a: number) => [number, number, number, number];
|
|
382
|
-
readonly conversation_updateGroupPinnedFrameUrl: (a: number, b: number, c: number) => any;
|
|
383
|
-
readonly conversation_groupPinnedFrameUrl: (a: number) => [number, number, number, number];
|
|
384
|
-
readonly conversation_createdAtNs: (a: number) => bigint;
|
|
385
|
-
readonly conversation_isActive: (a: number) => [number, number, number];
|
|
386
|
-
readonly conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
387
|
-
readonly conversation_groupMetadata: (a: number) => [number, number, number];
|
|
388
|
-
readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
389
|
-
readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
390
|
-
readonly __wbg_installation_free: (a: number, b: number) => void;
|
|
391
|
-
readonly __wbg_get_installation_id: (a: number) => [number, number];
|
|
392
|
-
readonly __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
393
|
-
readonly __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
394
|
-
readonly __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
395
|
-
readonly installation_new: (a: number, b: number, c: number, d: bigint) => number;
|
|
396
|
-
readonly __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
397
|
-
readonly __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
398
|
-
readonly __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
399
|
-
readonly __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
400
|
-
readonly __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
401
|
-
readonly __wbg_get_inboxstate_accountAddresses: (a: number) => [number, number];
|
|
402
|
-
readonly __wbg_set_inboxstate_accountAddresses: (a: number, b: number, c: number) => void;
|
|
403
|
-
readonly inboxstate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
404
|
-
readonly client_inboxState: (a: number, b: number) => any;
|
|
405
|
-
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
406
|
-
readonly __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
407
|
-
readonly __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
408
|
-
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
409
|
-
readonly __wbg_logoptions_free: (a: number, b: number) => void;
|
|
410
|
-
readonly __wbg_get_logoptions_structured: (a: number) => number;
|
|
411
|
-
readonly __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
412
|
-
readonly __wbg_get_logoptions_performance: (a: number) => number;
|
|
413
|
-
readonly __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
414
|
-
readonly __wbg_get_logoptions_level: (a: number) => number;
|
|
415
|
-
readonly __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
416
|
-
readonly logoptions_new: (a: number, b: number, c: number) => number;
|
|
417
|
-
readonly createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
418
|
-
readonly client_accountAddress: (a: number) => [number, number];
|
|
419
|
-
readonly client_inboxId: (a: number) => [number, number];
|
|
420
|
-
readonly client_isRegistered: (a: number) => number;
|
|
421
|
-
readonly client_installationId: (a: number) => [number, number];
|
|
422
|
-
readonly client_installationIdBytes: (a: number) => any;
|
|
423
|
-
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
424
|
-
readonly client_registerIdentity: (a: number) => any;
|
|
425
|
-
readonly client_sendHistorySyncRequest: (a: number) => any;
|
|
426
|
-
readonly client_sendConsentSyncRequest: (a: number) => any;
|
|
427
|
-
readonly client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
428
|
-
readonly client_conversations: (a: number) => number;
|
|
429
341
|
readonly __wbg_consent_free: (a: number, b: number) => void;
|
|
430
342
|
readonly __wbg_get_consent_entityType: (a: number) => number;
|
|
431
343
|
readonly __wbg_set_consent_entityType: (a: number, b: number) => void;
|
|
@@ -438,6 +350,43 @@ export interface InitOutput {
|
|
|
438
350
|
readonly client_getConsentState: (a: number, b: number, c: number, d: number) => any;
|
|
439
351
|
readonly conversation_consentState: (a: number) => [number, number, number];
|
|
440
352
|
readonly conversation_updateConsentState: (a: number, b: number) => [number, number];
|
|
353
|
+
readonly __wbg_listconversationsoptions_free: (a: number, b: number) => void;
|
|
354
|
+
readonly __wbg_get_listconversationsoptions_allowedStates: (a: number) => [number, number];
|
|
355
|
+
readonly __wbg_set_listconversationsoptions_allowedStates: (a: number, b: number, c: number) => void;
|
|
356
|
+
readonly __wbg_get_listconversationsoptions_conversationType: (a: number) => number;
|
|
357
|
+
readonly __wbg_set_listconversationsoptions_conversationType: (a: number, b: number) => void;
|
|
358
|
+
readonly __wbg_get_listconversationsoptions_createdAfterNs: (a: number) => [number, bigint];
|
|
359
|
+
readonly __wbg_set_listconversationsoptions_createdAfterNs: (a: number, b: number, c: bigint) => void;
|
|
360
|
+
readonly __wbg_get_listconversationsoptions_createdBeforeNs: (a: number) => [number, bigint];
|
|
361
|
+
readonly __wbg_set_listconversationsoptions_createdBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
362
|
+
readonly __wbg_get_listconversationsoptions_limit: (a: number) => [number, bigint];
|
|
363
|
+
readonly __wbg_set_listconversationsoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
364
|
+
readonly listconversationsoptions_new: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: bigint, h: number, i: bigint) => number;
|
|
365
|
+
readonly __wbg_creategroupoptions_free: (a: number, b: number) => void;
|
|
366
|
+
readonly __wbg_get_creategroupoptions_permissions: (a: number) => number;
|
|
367
|
+
readonly __wbg_set_creategroupoptions_permissions: (a: number, b: number) => void;
|
|
368
|
+
readonly __wbg_get_creategroupoptions_groupName: (a: number) => [number, number];
|
|
369
|
+
readonly __wbg_set_creategroupoptions_groupName: (a: number, b: number, c: number) => void;
|
|
370
|
+
readonly __wbg_get_creategroupoptions_groupImageUrlSquare: (a: number) => [number, number];
|
|
371
|
+
readonly __wbg_set_creategroupoptions_groupImageUrlSquare: (a: number, b: number, c: number) => void;
|
|
372
|
+
readonly __wbg_get_creategroupoptions_groupDescription: (a: number) => [number, number];
|
|
373
|
+
readonly __wbg_set_creategroupoptions_groupDescription: (a: number, b: number, c: number) => void;
|
|
374
|
+
readonly __wbg_get_creategroupoptions_groupPinnedFrameUrl: (a: number) => [number, number];
|
|
375
|
+
readonly __wbg_set_creategroupoptions_groupPinnedFrameUrl: (a: number, b: number, c: number) => void;
|
|
376
|
+
readonly __wbg_get_creategroupoptions_customPermissionPolicySet: (a: number) => number;
|
|
377
|
+
readonly __wbg_set_creategroupoptions_customPermissionPolicySet: (a: number, b: number) => void;
|
|
378
|
+
readonly creategroupoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
379
|
+
readonly __wbg_conversations_free: (a: number, b: number) => void;
|
|
380
|
+
readonly conversations_createGroup: (a: number, b: number, c: number, d: number) => any;
|
|
381
|
+
readonly conversations_createDm: (a: number, b: number, c: number) => any;
|
|
382
|
+
readonly conversations_findGroupById: (a: number, b: number, c: number) => [number, number, number];
|
|
383
|
+
readonly conversations_findDmByTargetInboxId: (a: number, b: number, c: number) => [number, number, number];
|
|
384
|
+
readonly conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
385
|
+
readonly conversations_sync: (a: number) => any;
|
|
386
|
+
readonly conversations_syncAllConversations: (a: number) => any;
|
|
387
|
+
readonly conversations_list: (a: number, b: number) => any;
|
|
388
|
+
readonly conversations_listGroups: (a: number, b: number) => any;
|
|
389
|
+
readonly conversations_listDms: (a: number, b: number) => any;
|
|
441
390
|
readonly __wbg_contenttypeid_free: (a: number, b: number) => void;
|
|
442
391
|
readonly __wbg_get_contenttypeid_typeId: (a: number) => [number, number];
|
|
443
392
|
readonly __wbg_set_contenttypeid_typeId: (a: number, b: number, c: number) => void;
|
|
@@ -461,12 +410,6 @@ export interface InitOutput {
|
|
|
461
410
|
readonly getInboxIdForAddress: (a: number, b: number, c: number, d: number) => any;
|
|
462
411
|
readonly generateInboxId: (a: number, b: number) => [number, number, number, number];
|
|
463
412
|
readonly __wbg_listmessagesoptions_free: (a: number, b: number) => void;
|
|
464
|
-
readonly __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
465
|
-
readonly __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
466
|
-
readonly __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
467
|
-
readonly __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
468
|
-
readonly __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
469
|
-
readonly __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
470
413
|
readonly __wbg_get_listmessagesoptions_deliveryStatus: (a: number) => number;
|
|
471
414
|
readonly __wbg_set_listmessagesoptions_deliveryStatus: (a: number, b: number) => void;
|
|
472
415
|
readonly __wbg_get_listmessagesoptions_direction: (a: number) => number;
|
|
@@ -492,7 +435,8 @@ export interface InitOutput {
|
|
|
492
435
|
readonly client_createInboxSignatureText: (a: number) => any;
|
|
493
436
|
readonly client_addWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
494
437
|
readonly client_revokeWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
495
|
-
readonly
|
|
438
|
+
readonly client_revokeAllOtherInstallationsSignatureText: (a: number) => any;
|
|
439
|
+
readonly client_revokeInstallationsSignatureText: (a: number, b: number, c: number) => any;
|
|
496
440
|
readonly client_addSignature: (a: number, b: number, c: any) => any;
|
|
497
441
|
readonly client_addScwSignature: (a: number, b: number, c: any, d: bigint, e: number, f: bigint) => any;
|
|
498
442
|
readonly client_applySignatureRequests: (a: number) => any;
|
|
@@ -500,43 +444,101 @@ export interface InitOutput {
|
|
|
500
444
|
readonly client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
501
445
|
readonly __wbg_set_contenttypeid_authorityId: (a: number, b: number, c: number) => void;
|
|
502
446
|
readonly __wbg_get_contenttypeid_authorityId: (a: number) => [number, number];
|
|
503
|
-
readonly
|
|
504
|
-
readonly
|
|
505
|
-
readonly
|
|
506
|
-
readonly
|
|
507
|
-
readonly
|
|
508
|
-
readonly
|
|
509
|
-
readonly
|
|
510
|
-
readonly
|
|
511
|
-
readonly
|
|
512
|
-
readonly
|
|
513
|
-
readonly
|
|
514
|
-
readonly
|
|
515
|
-
readonly
|
|
516
|
-
readonly
|
|
517
|
-
readonly
|
|
518
|
-
readonly
|
|
519
|
-
readonly
|
|
520
|
-
readonly
|
|
521
|
-
readonly
|
|
522
|
-
readonly
|
|
523
|
-
readonly
|
|
524
|
-
readonly
|
|
525
|
-
readonly
|
|
526
|
-
readonly
|
|
527
|
-
readonly
|
|
528
|
-
readonly
|
|
529
|
-
readonly
|
|
530
|
-
readonly
|
|
531
|
-
readonly
|
|
532
|
-
readonly
|
|
533
|
-
readonly
|
|
534
|
-
readonly
|
|
535
|
-
readonly
|
|
536
|
-
readonly
|
|
537
|
-
readonly
|
|
538
|
-
readonly
|
|
539
|
-
readonly
|
|
447
|
+
readonly __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
448
|
+
readonly __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
449
|
+
readonly __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
450
|
+
readonly __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
451
|
+
readonly __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
452
|
+
readonly __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
453
|
+
readonly __wbg_client_free: (a: number, b: number) => void;
|
|
454
|
+
readonly __wbg_logoptions_free: (a: number, b: number) => void;
|
|
455
|
+
readonly __wbg_get_logoptions_structured: (a: number) => number;
|
|
456
|
+
readonly __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
457
|
+
readonly __wbg_get_logoptions_performance: (a: number) => number;
|
|
458
|
+
readonly __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
459
|
+
readonly __wbg_get_logoptions_level: (a: number) => number;
|
|
460
|
+
readonly __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
461
|
+
readonly logoptions_new: (a: number, b: number, c: number) => number;
|
|
462
|
+
readonly createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
463
|
+
readonly client_accountAddress: (a: number) => [number, number];
|
|
464
|
+
readonly client_inboxId: (a: number) => [number, number];
|
|
465
|
+
readonly client_isRegistered: (a: number) => number;
|
|
466
|
+
readonly client_installationId: (a: number) => [number, number];
|
|
467
|
+
readonly client_installationIdBytes: (a: number) => any;
|
|
468
|
+
readonly client_canMessage: (a: number, b: number, c: number) => any;
|
|
469
|
+
readonly client_registerIdentity: (a: number) => any;
|
|
470
|
+
readonly client_sendHistorySyncRequest: (a: number) => any;
|
|
471
|
+
readonly client_sendConsentSyncRequest: (a: number) => any;
|
|
472
|
+
readonly client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
473
|
+
readonly client_conversations: (a: number) => number;
|
|
474
|
+
readonly __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
475
|
+
readonly groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
476
|
+
readonly groupmetadata_conversationType: (a: number) => [number, number];
|
|
477
|
+
readonly __wbg_groupmember_free: (a: number, b: number) => void;
|
|
478
|
+
readonly __wbg_get_groupmember_inboxId: (a: number) => [number, number];
|
|
479
|
+
readonly __wbg_set_groupmember_inboxId: (a: number, b: number, c: number) => void;
|
|
480
|
+
readonly __wbg_get_groupmember_accountAddresses: (a: number) => [number, number];
|
|
481
|
+
readonly __wbg_set_groupmember_accountAddresses: (a: number, b: number, c: number) => void;
|
|
482
|
+
readonly __wbg_get_groupmember_installationIds: (a: number) => [number, number];
|
|
483
|
+
readonly __wbg_set_groupmember_installationIds: (a: number, b: number, c: number) => void;
|
|
484
|
+
readonly __wbg_get_groupmember_permissionLevel: (a: number) => number;
|
|
485
|
+
readonly __wbg_set_groupmember_permissionLevel: (a: number, b: number) => void;
|
|
486
|
+
readonly __wbg_get_groupmember_consentState: (a: number) => number;
|
|
487
|
+
readonly __wbg_set_groupmember_consentState: (a: number, b: number) => void;
|
|
488
|
+
readonly groupmember_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
489
|
+
readonly __wbg_conversation_free: (a: number, b: number) => void;
|
|
490
|
+
readonly conversation_id: (a: number) => [number, number];
|
|
491
|
+
readonly conversation_send: (a: number, b: number) => any;
|
|
492
|
+
readonly conversation_sendOptimistic: (a: number, b: number) => [number, number, number, number];
|
|
493
|
+
readonly conversation_publishMessages: (a: number) => any;
|
|
494
|
+
readonly conversation_sync: (a: number) => any;
|
|
495
|
+
readonly conversation_findMessages: (a: number, b: number) => any;
|
|
496
|
+
readonly conversation_listMembers: (a: number) => any;
|
|
497
|
+
readonly conversation_adminList: (a: number) => [number, number, number, number];
|
|
498
|
+
readonly conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
499
|
+
readonly conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
500
|
+
readonly conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
501
|
+
readonly conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
502
|
+
readonly conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
503
|
+
readonly conversation_removeAdmin: (a: number, b: number, c: number) => any;
|
|
504
|
+
readonly conversation_addSuperAdmin: (a: number, b: number, c: number) => any;
|
|
505
|
+
readonly conversation_removeSuperAdmin: (a: number, b: number, c: number) => any;
|
|
506
|
+
readonly conversation_groupPermissions: (a: number) => [number, number, number];
|
|
507
|
+
readonly conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
508
|
+
readonly conversation_removeMembers: (a: number, b: number, c: number) => any;
|
|
509
|
+
readonly conversation_removeMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
510
|
+
readonly conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
511
|
+
readonly conversation_groupName: (a: number) => [number, number, number, number];
|
|
512
|
+
readonly conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
513
|
+
readonly conversation_groupImageUrlSquare: (a: number) => [number, number, number, number];
|
|
514
|
+
readonly conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
515
|
+
readonly conversation_groupDescription: (a: number) => [number, number, number, number];
|
|
516
|
+
readonly conversation_updateGroupPinnedFrameUrl: (a: number, b: number, c: number) => any;
|
|
517
|
+
readonly conversation_groupPinnedFrameUrl: (a: number) => [number, number, number, number];
|
|
518
|
+
readonly conversation_createdAtNs: (a: number) => bigint;
|
|
519
|
+
readonly conversation_isActive: (a: number) => [number, number, number];
|
|
520
|
+
readonly conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
521
|
+
readonly conversation_groupMetadata: (a: number) => any;
|
|
522
|
+
readonly conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
523
|
+
readonly conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
524
|
+
readonly __wbg_installation_free: (a: number, b: number) => void;
|
|
525
|
+
readonly __wbg_get_installation_id: (a: number) => [number, number];
|
|
526
|
+
readonly __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
527
|
+
readonly __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
528
|
+
readonly __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
529
|
+
readonly installation_new: (a: number, b: number, c: number, d: bigint) => number;
|
|
530
|
+
readonly __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
531
|
+
readonly __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
532
|
+
readonly __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
533
|
+
readonly __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
534
|
+
readonly __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
535
|
+
readonly __wbg_get_inboxstate_accountAddresses: (a: number) => [number, number];
|
|
536
|
+
readonly __wbg_set_inboxstate_accountAddresses: (a: number, b: number, c: number) => void;
|
|
537
|
+
readonly inboxstate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
538
|
+
readonly client_inboxState: (a: number, b: number) => any;
|
|
539
|
+
readonly client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
540
|
+
readonly __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
541
|
+
readonly __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
540
542
|
readonly __wbg_permissionpolicyset_free: (a: number, b: number) => void;
|
|
541
543
|
readonly __wbg_get_permissionpolicyset_addMemberPolicy: (a: number) => number;
|
|
542
544
|
readonly __wbg_set_permissionpolicyset_addMemberPolicy: (a: number, b: number) => void;
|
|
@@ -579,10 +581,10 @@ export interface InitOutput {
|
|
|
579
581
|
readonly __externref_table_alloc: () => number;
|
|
580
582
|
readonly __wbindgen_export_5: WebAssembly.Table;
|
|
581
583
|
readonly __wbindgen_export_6: WebAssembly.Table;
|
|
582
|
-
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
583
584
|
readonly __externref_table_dealloc: (a: number) => void;
|
|
584
|
-
readonly
|
|
585
|
-
readonly
|
|
585
|
+
readonly __externref_drop_slice: (a: number, b: number) => void;
|
|
586
|
+
readonly closure2588_externref_shim: (a: number, b: number, c: any) => void;
|
|
587
|
+
readonly closure3682_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
586
588
|
readonly __wbindgen_start: () => void;
|
|
587
589
|
}
|
|
588
590
|
|
package/dist/bindings_wasm.js
CHANGED
|
@@ -200,17 +200,6 @@ function debugString(val) {
|
|
|
200
200
|
return className;
|
|
201
201
|
}
|
|
202
202
|
|
|
203
|
-
function getArrayJsValueFromWasm0(ptr, len) {
|
|
204
|
-
ptr = ptr >>> 0;
|
|
205
|
-
const mem = getDataViewMemory0();
|
|
206
|
-
const result = [];
|
|
207
|
-
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
208
|
-
result.push(wasm.__wbindgen_export_5.get(mem.getUint32(i, true)));
|
|
209
|
-
}
|
|
210
|
-
wasm.__externref_drop_slice(ptr, len);
|
|
211
|
-
return result;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
203
|
function passArrayJsValueToWasm0(array, malloc) {
|
|
215
204
|
const ptr = malloc(array.length * 4, 4) >>> 0;
|
|
216
205
|
const mem = getDataViewMemory0();
|
|
@@ -221,47 +210,28 @@ function passArrayJsValueToWasm0(array, malloc) {
|
|
|
221
210
|
return ptr;
|
|
222
211
|
}
|
|
223
212
|
|
|
224
|
-
function _assertClass(instance, klass) {
|
|
225
|
-
if (!(instance instanceof klass)) {
|
|
226
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
213
|
function takeFromExternrefTable0(idx) {
|
|
231
214
|
const value = wasm.__wbindgen_export_5.get(idx);
|
|
232
215
|
wasm.__externref_table_dealloc(idx);
|
|
233
216
|
return value;
|
|
234
217
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
*
|
|
241
|
-
|
|
242
|
-
* @param {LogOptions | undefined} [log_options]
|
|
243
|
-
* @returns {Promise<Client>}
|
|
244
|
-
*/
|
|
245
|
-
export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
|
|
246
|
-
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
247
|
-
const len0 = WASM_VECTOR_LEN;
|
|
248
|
-
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
249
|
-
const len1 = WASM_VECTOR_LEN;
|
|
250
|
-
const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
251
|
-
const len2 = WASM_VECTOR_LEN;
|
|
252
|
-
var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
253
|
-
var len3 = WASM_VECTOR_LEN;
|
|
254
|
-
var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
255
|
-
var len4 = WASM_VECTOR_LEN;
|
|
256
|
-
let ptr5 = 0;
|
|
257
|
-
if (!isLikeNone(log_options)) {
|
|
258
|
-
_assertClass(log_options, LogOptions);
|
|
259
|
-
ptr5 = log_options.__destroy_into_raw();
|
|
218
|
+
|
|
219
|
+
function getArrayJsValueFromWasm0(ptr, len) {
|
|
220
|
+
ptr = ptr >>> 0;
|
|
221
|
+
const mem = getDataViewMemory0();
|
|
222
|
+
const result = [];
|
|
223
|
+
for (let i = ptr; i < ptr + 4 * len; i += 4) {
|
|
224
|
+
result.push(wasm.__wbindgen_export_5.get(mem.getUint32(i, true)));
|
|
260
225
|
}
|
|
261
|
-
|
|
262
|
-
return
|
|
226
|
+
wasm.__externref_drop_slice(ptr, len);
|
|
227
|
+
return result;
|
|
263
228
|
}
|
|
264
229
|
|
|
230
|
+
function _assertClass(instance, klass) {
|
|
231
|
+
if (!(instance instanceof klass)) {
|
|
232
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
233
|
+
}
|
|
234
|
+
}
|
|
265
235
|
/**
|
|
266
236
|
* @param {string} host
|
|
267
237
|
* @param {string} account_address
|
|
@@ -315,12 +285,42 @@ export function verifySignedWithPublicKey(signature_text, signature_bytes, publi
|
|
|
315
285
|
}
|
|
316
286
|
}
|
|
317
287
|
|
|
318
|
-
|
|
319
|
-
|
|
288
|
+
/**
|
|
289
|
+
* @param {string} host
|
|
290
|
+
* @param {string} inbox_id
|
|
291
|
+
* @param {string} account_address
|
|
292
|
+
* @param {string | undefined} [db_path]
|
|
293
|
+
* @param {Uint8Array | undefined} [encryption_key]
|
|
294
|
+
* @param {string | undefined} [history_sync_url]
|
|
295
|
+
* @param {LogOptions | undefined} [log_options]
|
|
296
|
+
* @returns {Promise<Client>}
|
|
297
|
+
*/
|
|
298
|
+
export function createClient(host, inbox_id, account_address, db_path, encryption_key, history_sync_url, log_options) {
|
|
299
|
+
const ptr0 = passStringToWasm0(host, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
+
const len0 = WASM_VECTOR_LEN;
|
|
301
|
+
const ptr1 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
302
|
+
const len1 = WASM_VECTOR_LEN;
|
|
303
|
+
const ptr2 = passStringToWasm0(account_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
304
|
+
const len2 = WASM_VECTOR_LEN;
|
|
305
|
+
var ptr3 = isLikeNone(db_path) ? 0 : passStringToWasm0(db_path, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
306
|
+
var len3 = WASM_VECTOR_LEN;
|
|
307
|
+
var ptr4 = isLikeNone(history_sync_url) ? 0 : passStringToWasm0(history_sync_url, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
308
|
+
var len4 = WASM_VECTOR_LEN;
|
|
309
|
+
let ptr5 = 0;
|
|
310
|
+
if (!isLikeNone(log_options)) {
|
|
311
|
+
_assertClass(log_options, LogOptions);
|
|
312
|
+
ptr5 = log_options.__destroy_into_raw();
|
|
313
|
+
}
|
|
314
|
+
const ret = wasm.createClient(ptr0, len0, ptr1, len1, ptr2, len2, ptr3, len3, isLikeNone(encryption_key) ? 0 : addToExternrefTable0(encryption_key), ptr4, len4, ptr5);
|
|
315
|
+
return ret;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
function __wbg_adapter_50(arg0, arg1, arg2) {
|
|
319
|
+
wasm.closure2588_externref_shim(arg0, arg1, arg2);
|
|
320
320
|
}
|
|
321
321
|
|
|
322
|
-
function
|
|
323
|
-
wasm.
|
|
322
|
+
function __wbg_adapter_576(arg0, arg1, arg2, arg3) {
|
|
323
|
+
wasm.closure3682_externref_shim(arg0, arg1, arg2, arg3);
|
|
324
324
|
}
|
|
325
325
|
|
|
326
326
|
/**
|
|
@@ -467,29 +467,122 @@ export class Client {
|
|
|
467
467
|
wasm.__wbg_client_free(ptr, 0);
|
|
468
468
|
}
|
|
469
469
|
/**
|
|
470
|
-
*
|
|
471
|
-
*
|
|
472
|
-
* *
|
|
473
|
-
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
474
|
-
* * Otherwise, the state will be read from the local database.
|
|
475
|
-
*
|
|
476
|
-
* @param {boolean} refresh_from_network
|
|
477
|
-
* @returns {Promise<InboxState>}
|
|
470
|
+
* @param {(Consent)[]} records
|
|
471
|
+
* @returns {Promise<void>}
|
|
478
472
|
*/
|
|
479
|
-
|
|
480
|
-
const
|
|
473
|
+
setConsentStates(records) {
|
|
474
|
+
const ptr0 = passArrayJsValueToWasm0(records, wasm.__wbindgen_malloc);
|
|
475
|
+
const len0 = WASM_VECTOR_LEN;
|
|
476
|
+
const ret = wasm.client_setConsentStates(this.__wbg_ptr, ptr0, len0);
|
|
481
477
|
return ret;
|
|
482
478
|
}
|
|
483
479
|
/**
|
|
484
|
-
* @param {
|
|
485
|
-
* @
|
|
480
|
+
* @param {ConsentEntityType} entity_type
|
|
481
|
+
* @param {string} entity
|
|
482
|
+
* @returns {Promise<ConsentState>}
|
|
486
483
|
*/
|
|
487
|
-
|
|
488
|
-
const ptr0 = passStringToWasm0(
|
|
484
|
+
getConsentState(entity_type, entity) {
|
|
485
|
+
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
489
486
|
const len0 = WASM_VECTOR_LEN;
|
|
490
|
-
const ret = wasm.
|
|
487
|
+
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
491
488
|
return ret;
|
|
492
489
|
}
|
|
490
|
+
/**
|
|
491
|
+
* @returns {Promise<string | undefined>}
|
|
492
|
+
*/
|
|
493
|
+
createInboxSignatureText() {
|
|
494
|
+
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
495
|
+
return ret;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* @param {string} new_wallet_address
|
|
499
|
+
* @returns {Promise<string>}
|
|
500
|
+
*/
|
|
501
|
+
addWalletSignatureText(new_wallet_address) {
|
|
502
|
+
const ptr0 = passStringToWasm0(new_wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
503
|
+
const len0 = WASM_VECTOR_LEN;
|
|
504
|
+
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
505
|
+
return ret;
|
|
506
|
+
}
|
|
507
|
+
/**
|
|
508
|
+
* @param {string} wallet_address
|
|
509
|
+
* @returns {Promise<string>}
|
|
510
|
+
*/
|
|
511
|
+
revokeWalletSignatureText(wallet_address) {
|
|
512
|
+
const ptr0 = passStringToWasm0(wallet_address, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
513
|
+
const len0 = WASM_VECTOR_LEN;
|
|
514
|
+
const ret = wasm.client_revokeWalletSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
515
|
+
return ret;
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* @returns {Promise<string>}
|
|
519
|
+
*/
|
|
520
|
+
revokeAllOtherInstallationsSignatureText() {
|
|
521
|
+
const ret = wasm.client_revokeAllOtherInstallationsSignatureText(this.__wbg_ptr);
|
|
522
|
+
return ret;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* @param {(Uint8Array)[]} installation_ids
|
|
526
|
+
* @returns {Promise<string>}
|
|
527
|
+
*/
|
|
528
|
+
revokeInstallationsSignatureText(installation_ids) {
|
|
529
|
+
const ptr0 = passArrayJsValueToWasm0(installation_ids, wasm.__wbindgen_malloc);
|
|
530
|
+
const len0 = WASM_VECTOR_LEN;
|
|
531
|
+
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
532
|
+
return ret;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @param {SignatureRequestType} signature_type
|
|
536
|
+
* @param {Uint8Array} signature_bytes
|
|
537
|
+
* @returns {Promise<void>}
|
|
538
|
+
*/
|
|
539
|
+
addSignature(signature_type, signature_bytes) {
|
|
540
|
+
const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
541
|
+
return ret;
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* @param {SignatureRequestType} signature_type
|
|
545
|
+
* @param {Uint8Array} signature_bytes
|
|
546
|
+
* @param {bigint} chain_id
|
|
547
|
+
* @param {bigint | undefined} [block_number]
|
|
548
|
+
* @returns {Promise<void>}
|
|
549
|
+
*/
|
|
550
|
+
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
551
|
+
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
552
|
+
return ret;
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* @returns {Promise<void>}
|
|
556
|
+
*/
|
|
557
|
+
applySignatureRequests() {
|
|
558
|
+
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
559
|
+
return ret;
|
|
560
|
+
}
|
|
561
|
+
/**
|
|
562
|
+
* @param {string} signature_text
|
|
563
|
+
* @returns {Uint8Array}
|
|
564
|
+
*/
|
|
565
|
+
signWithInstallationKey(signature_text) {
|
|
566
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
567
|
+
const len0 = WASM_VECTOR_LEN;
|
|
568
|
+
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
569
|
+
if (ret[2]) {
|
|
570
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
571
|
+
}
|
|
572
|
+
return takeFromExternrefTable0(ret[0]);
|
|
573
|
+
}
|
|
574
|
+
/**
|
|
575
|
+
* @param {string} signature_text
|
|
576
|
+
* @param {Uint8Array} signature_bytes
|
|
577
|
+
*/
|
|
578
|
+
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
579
|
+
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
580
|
+
const len0 = WASM_VECTOR_LEN;
|
|
581
|
+
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
582
|
+
if (ret[1]) {
|
|
583
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
584
|
+
}
|
|
585
|
+
}
|
|
493
586
|
/**
|
|
494
587
|
* @returns {string}
|
|
495
588
|
*/
|
|
@@ -598,112 +691,29 @@ export class Client {
|
|
|
598
691
|
return Conversations.__wrap(ret);
|
|
599
692
|
}
|
|
600
693
|
/**
|
|
601
|
-
*
|
|
602
|
-
*
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
}
|
|
610
|
-
/**
|
|
611
|
-
* @param {ConsentEntityType} entity_type
|
|
612
|
-
* @param {string} entity
|
|
613
|
-
* @returns {Promise<ConsentState>}
|
|
614
|
-
*/
|
|
615
|
-
getConsentState(entity_type, entity) {
|
|
616
|
-
const ptr0 = passStringToWasm0(entity, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
617
|
-
const len0 = WASM_VECTOR_LEN;
|
|
618
|
-
const ret = wasm.client_getConsentState(this.__wbg_ptr, entity_type, ptr0, len0);
|
|
619
|
-
return ret;
|
|
620
|
-
}
|
|
621
|
-
/**
|
|
622
|
-
* @returns {Promise<string | undefined>}
|
|
623
|
-
*/
|
|
624
|
-
createInboxSignatureText() {
|
|
625
|
-
const ret = wasm.client_createInboxSignatureText(this.__wbg_ptr);
|
|
626
|
-
return ret;
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* @param {string} new_wallet_address
|
|
630
|
-
* @returns {Promise<string>}
|
|
694
|
+
*
|
|
695
|
+
* * Get the client's inbox state.
|
|
696
|
+
* *
|
|
697
|
+
* * If `refresh_from_network` is true, the client will go to the network first to refresh the state.
|
|
698
|
+
* * Otherwise, the state will be read from the local database.
|
|
699
|
+
*
|
|
700
|
+
* @param {boolean} refresh_from_network
|
|
701
|
+
* @returns {Promise<InboxState>}
|
|
631
702
|
*/
|
|
632
|
-
|
|
633
|
-
const
|
|
634
|
-
const len0 = WASM_VECTOR_LEN;
|
|
635
|
-
const ret = wasm.client_addWalletSignatureText(this.__wbg_ptr, ptr0, len0);
|
|
703
|
+
inboxState(refresh_from_network) {
|
|
704
|
+
const ret = wasm.client_inboxState(this.__wbg_ptr, refresh_from_network);
|
|
636
705
|
return ret;
|
|
637
706
|
}
|
|
638
707
|
/**
|
|
639
|
-
* @param {string}
|
|
640
|
-
* @returns {Promise<
|
|
708
|
+
* @param {string} inbox_id
|
|
709
|
+
* @returns {Promise<InboxState>}
|
|
641
710
|
*/
|
|
642
|
-
|
|
643
|
-
const ptr0 = passStringToWasm0(
|
|
711
|
+
getLatestInboxState(inbox_id) {
|
|
712
|
+
const ptr0 = passStringToWasm0(inbox_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
644
713
|
const len0 = WASM_VECTOR_LEN;
|
|
645
|
-
const ret = wasm.
|
|
646
|
-
return ret;
|
|
647
|
-
}
|
|
648
|
-
/**
|
|
649
|
-
* @returns {Promise<string>}
|
|
650
|
-
*/
|
|
651
|
-
revokeInstallationsSignatureText() {
|
|
652
|
-
const ret = wasm.client_revokeInstallationsSignatureText(this.__wbg_ptr);
|
|
653
|
-
return ret;
|
|
654
|
-
}
|
|
655
|
-
/**
|
|
656
|
-
* @param {SignatureRequestType} signature_type
|
|
657
|
-
* @param {Uint8Array} signature_bytes
|
|
658
|
-
* @returns {Promise<void>}
|
|
659
|
-
*/
|
|
660
|
-
addSignature(signature_type, signature_bytes) {
|
|
661
|
-
const ret = wasm.client_addSignature(this.__wbg_ptr, signature_type, signature_bytes);
|
|
662
|
-
return ret;
|
|
663
|
-
}
|
|
664
|
-
/**
|
|
665
|
-
* @param {SignatureRequestType} signature_type
|
|
666
|
-
* @param {Uint8Array} signature_bytes
|
|
667
|
-
* @param {bigint} chain_id
|
|
668
|
-
* @param {bigint | undefined} [block_number]
|
|
669
|
-
* @returns {Promise<void>}
|
|
670
|
-
*/
|
|
671
|
-
addScwSignature(signature_type, signature_bytes, chain_id, block_number) {
|
|
672
|
-
const ret = wasm.client_addScwSignature(this.__wbg_ptr, signature_type, signature_bytes, chain_id, !isLikeNone(block_number), isLikeNone(block_number) ? BigInt(0) : block_number);
|
|
673
|
-
return ret;
|
|
674
|
-
}
|
|
675
|
-
/**
|
|
676
|
-
* @returns {Promise<void>}
|
|
677
|
-
*/
|
|
678
|
-
applySignatureRequests() {
|
|
679
|
-
const ret = wasm.client_applySignatureRequests(this.__wbg_ptr);
|
|
714
|
+
const ret = wasm.client_getLatestInboxState(this.__wbg_ptr, ptr0, len0);
|
|
680
715
|
return ret;
|
|
681
716
|
}
|
|
682
|
-
/**
|
|
683
|
-
* @param {string} signature_text
|
|
684
|
-
* @returns {Uint8Array}
|
|
685
|
-
*/
|
|
686
|
-
signWithInstallationKey(signature_text) {
|
|
687
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
688
|
-
const len0 = WASM_VECTOR_LEN;
|
|
689
|
-
const ret = wasm.client_signWithInstallationKey(this.__wbg_ptr, ptr0, len0);
|
|
690
|
-
if (ret[2]) {
|
|
691
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
692
|
-
}
|
|
693
|
-
return takeFromExternrefTable0(ret[0]);
|
|
694
|
-
}
|
|
695
|
-
/**
|
|
696
|
-
* @param {string} signature_text
|
|
697
|
-
* @param {Uint8Array} signature_bytes
|
|
698
|
-
*/
|
|
699
|
-
verifySignedWithInstallationKey(signature_text, signature_bytes) {
|
|
700
|
-
const ptr0 = passStringToWasm0(signature_text, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
701
|
-
const len0 = WASM_VECTOR_LEN;
|
|
702
|
-
const ret = wasm.client_verifySignedWithInstallationKey(this.__wbg_ptr, ptr0, len0, signature_bytes);
|
|
703
|
-
if (ret[1]) {
|
|
704
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
705
|
-
}
|
|
706
|
-
}
|
|
707
717
|
}
|
|
708
718
|
|
|
709
719
|
const ConsentFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -934,6 +944,25 @@ export class Conversation {
|
|
|
934
944
|
const ptr = this.__destroy_into_raw();
|
|
935
945
|
wasm.__wbg_conversation_free(ptr, 0);
|
|
936
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* @returns {ConsentState}
|
|
949
|
+
*/
|
|
950
|
+
consentState() {
|
|
951
|
+
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
952
|
+
if (ret[2]) {
|
|
953
|
+
throw takeFromExternrefTable0(ret[1]);
|
|
954
|
+
}
|
|
955
|
+
return ret[0];
|
|
956
|
+
}
|
|
957
|
+
/**
|
|
958
|
+
* @param {ConsentState} state
|
|
959
|
+
*/
|
|
960
|
+
updateConsentState(state) {
|
|
961
|
+
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
962
|
+
if (ret[1]) {
|
|
963
|
+
throw takeFromExternrefTable0(ret[0]);
|
|
964
|
+
}
|
|
965
|
+
}
|
|
937
966
|
/**
|
|
938
967
|
* @returns {string}
|
|
939
968
|
*/
|
|
@@ -1001,7 +1030,7 @@ export class Conversation {
|
|
|
1001
1030
|
}
|
|
1002
1031
|
/**
|
|
1003
1032
|
* @param {ListMessagesOptions | undefined} [opts]
|
|
1004
|
-
* @returns {(Message)[]}
|
|
1033
|
+
* @returns {Promise<(Message)[]>}
|
|
1005
1034
|
*/
|
|
1006
1035
|
findMessages(opts) {
|
|
1007
1036
|
let ptr0 = 0;
|
|
@@ -1010,12 +1039,7 @@ export class Conversation {
|
|
|
1010
1039
|
ptr0 = opts.__destroy_into_raw();
|
|
1011
1040
|
}
|
|
1012
1041
|
const ret = wasm.conversation_findMessages(this.__wbg_ptr, ptr0);
|
|
1013
|
-
|
|
1014
|
-
throw takeFromExternrefTable0(ret[2]);
|
|
1015
|
-
}
|
|
1016
|
-
var v2 = getArrayJsValueFromWasm0(ret[0], ret[1]).slice();
|
|
1017
|
-
wasm.__wbindgen_free(ret[0], ret[1] * 4, 4);
|
|
1018
|
-
return v2;
|
|
1042
|
+
return ret;
|
|
1019
1043
|
}
|
|
1020
1044
|
/**
|
|
1021
1045
|
* @returns {Promise<any>}
|
|
@@ -1327,14 +1351,11 @@ export class Conversation {
|
|
|
1327
1351
|
}
|
|
1328
1352
|
}
|
|
1329
1353
|
/**
|
|
1330
|
-
* @returns {GroupMetadata}
|
|
1354
|
+
* @returns {Promise<GroupMetadata>}
|
|
1331
1355
|
*/
|
|
1332
1356
|
groupMetadata() {
|
|
1333
1357
|
const ret = wasm.conversation_groupMetadata(this.__wbg_ptr);
|
|
1334
|
-
|
|
1335
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1336
|
-
}
|
|
1337
|
-
return GroupMetadata.__wrap(ret[0]);
|
|
1358
|
+
return ret;
|
|
1338
1359
|
}
|
|
1339
1360
|
/**
|
|
1340
1361
|
* @returns {string}
|
|
@@ -1367,25 +1388,6 @@ export class Conversation {
|
|
|
1367
1388
|
const ret = wasm.conversation_updatePermissionPolicy(this.__wbg_ptr, permission_update_type, permission_policy_option, isLikeNone(metadata_field) ? 4 : metadata_field);
|
|
1368
1389
|
return ret;
|
|
1369
1390
|
}
|
|
1370
|
-
/**
|
|
1371
|
-
* @returns {ConsentState}
|
|
1372
|
-
*/
|
|
1373
|
-
consentState() {
|
|
1374
|
-
const ret = wasm.conversation_consentState(this.__wbg_ptr);
|
|
1375
|
-
if (ret[2]) {
|
|
1376
|
-
throw takeFromExternrefTable0(ret[1]);
|
|
1377
|
-
}
|
|
1378
|
-
return ret[0];
|
|
1379
|
-
}
|
|
1380
|
-
/**
|
|
1381
|
-
* @param {ConsentState} state
|
|
1382
|
-
*/
|
|
1383
|
-
updateConsentState(state) {
|
|
1384
|
-
const ret = wasm.conversation_updateConsentState(this.__wbg_ptr, state);
|
|
1385
|
-
if (ret[1]) {
|
|
1386
|
-
throw takeFromExternrefTable0(ret[0]);
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
1391
|
}
|
|
1390
1392
|
|
|
1391
1393
|
const ConversationsFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
@@ -2508,7 +2510,7 @@ export class ListMessagesOptions {
|
|
|
2508
2510
|
* @param {bigint | undefined} [arg0]
|
|
2509
2511
|
*/
|
|
2510
2512
|
set sentBeforeNs(arg0) {
|
|
2511
|
-
wasm.
|
|
2513
|
+
wasm.__wbg_set_listconversationsoptions_createdAfterNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
2512
2514
|
}
|
|
2513
2515
|
/**
|
|
2514
2516
|
* @returns {bigint | undefined}
|
|
@@ -2521,7 +2523,7 @@ export class ListMessagesOptions {
|
|
|
2521
2523
|
* @param {bigint | undefined} [arg0]
|
|
2522
2524
|
*/
|
|
2523
2525
|
set sentAfterNs(arg0) {
|
|
2524
|
-
wasm.
|
|
2526
|
+
wasm.__wbg_set_listconversationsoptions_createdBeforeNs(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
2525
2527
|
}
|
|
2526
2528
|
/**
|
|
2527
2529
|
* @returns {bigint | undefined}
|
|
@@ -2534,7 +2536,7 @@ export class ListMessagesOptions {
|
|
|
2534
2536
|
* @param {bigint | undefined} [arg0]
|
|
2535
2537
|
*/
|
|
2536
2538
|
set limit(arg0) {
|
|
2537
|
-
wasm.
|
|
2539
|
+
wasm.__wbg_set_listconversationsoptions_limit(this.__wbg_ptr, !isLikeNone(arg0), isLikeNone(arg0) ? BigInt(0) : arg0);
|
|
2538
2540
|
}
|
|
2539
2541
|
/**
|
|
2540
2542
|
* @returns {DeliveryStatus | undefined}
|
|
@@ -3352,6 +3354,10 @@ function __wbg_get_imports() {
|
|
|
3352
3354
|
const ret = arg0[arg1];
|
|
3353
3355
|
return ret;
|
|
3354
3356
|
};
|
|
3357
|
+
imports.wbg.__wbg_groupmetadata_new = function(arg0) {
|
|
3358
|
+
const ret = GroupMetadata.__wrap(arg0);
|
|
3359
|
+
return ret;
|
|
3360
|
+
};
|
|
3355
3361
|
imports.wbg.__wbg_has_94c2fc1d261bbfe9 = function() { return handleError(function (arg0, arg1) {
|
|
3356
3362
|
const ret = Reflect.has(arg0, arg1);
|
|
3357
3363
|
return ret;
|
|
@@ -3485,7 +3491,7 @@ function __wbg_get_imports() {
|
|
|
3485
3491
|
const a = state0.a;
|
|
3486
3492
|
state0.a = 0;
|
|
3487
3493
|
try {
|
|
3488
|
-
return
|
|
3494
|
+
return __wbg_adapter_576(a, state0.b, arg0, arg1);
|
|
3489
3495
|
} finally {
|
|
3490
3496
|
state0.a = a;
|
|
3491
3497
|
}
|
|
@@ -3784,6 +3790,13 @@ function __wbg_get_imports() {
|
|
|
3784
3790
|
const ret = arg0.wasm;
|
|
3785
3791
|
return ret;
|
|
3786
3792
|
};
|
|
3793
|
+
imports.wbg.__wbindgen_array_new = function() {
|
|
3794
|
+
const ret = [];
|
|
3795
|
+
return ret;
|
|
3796
|
+
};
|
|
3797
|
+
imports.wbg.__wbindgen_array_push = function(arg0, arg1) {
|
|
3798
|
+
arg0.push(arg1);
|
|
3799
|
+
};
|
|
3787
3800
|
imports.wbg.__wbindgen_as_number = function(arg0) {
|
|
3788
3801
|
const ret = +arg0;
|
|
3789
3802
|
return ret;
|
|
@@ -3802,8 +3815,8 @@ function __wbg_get_imports() {
|
|
|
3802
3815
|
const ret = false;
|
|
3803
3816
|
return ret;
|
|
3804
3817
|
};
|
|
3805
|
-
imports.wbg.
|
|
3806
|
-
const ret = makeMutClosure(arg0, arg1,
|
|
3818
|
+
imports.wbg.__wbindgen_closure_wrapper11191 = function(arg0, arg1, arg2) {
|
|
3819
|
+
const ret = makeMutClosure(arg0, arg1, 2589, __wbg_adapter_50);
|
|
3807
3820
|
return ret;
|
|
3808
3821
|
};
|
|
3809
3822
|
imports.wbg.__wbindgen_debug_string = function(arg0, arg1) {
|
|
Binary file
|
|
@@ -1,95 +1,6 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
export const memory: WebAssembly.Memory;
|
|
4
|
-
export const __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
5
|
-
export const groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
6
|
-
export const groupmetadata_conversationType: (a: number) => [number, number];
|
|
7
|
-
export const __wbg_groupmember_free: (a: number, b: number) => void;
|
|
8
|
-
export const __wbg_get_groupmember_inboxId: (a: number) => [number, number];
|
|
9
|
-
export const __wbg_set_groupmember_inboxId: (a: number, b: number, c: number) => void;
|
|
10
|
-
export const __wbg_get_groupmember_accountAddresses: (a: number) => [number, number];
|
|
11
|
-
export const __wbg_set_groupmember_accountAddresses: (a: number, b: number, c: number) => void;
|
|
12
|
-
export const __wbg_get_groupmember_installationIds: (a: number) => [number, number];
|
|
13
|
-
export const __wbg_set_groupmember_installationIds: (a: number, b: number, c: number) => void;
|
|
14
|
-
export const __wbg_get_groupmember_permissionLevel: (a: number) => number;
|
|
15
|
-
export const __wbg_set_groupmember_permissionLevel: (a: number, b: number) => void;
|
|
16
|
-
export const __wbg_get_groupmember_consentState: (a: number) => number;
|
|
17
|
-
export const __wbg_set_groupmember_consentState: (a: number, b: number) => void;
|
|
18
|
-
export const groupmember_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
19
|
-
export const __wbg_conversation_free: (a: number, b: number) => void;
|
|
20
|
-
export const conversation_id: (a: number) => [number, number];
|
|
21
|
-
export const conversation_send: (a: number, b: number) => any;
|
|
22
|
-
export const conversation_sendOptimistic: (a: number, b: number) => [number, number, number, number];
|
|
23
|
-
export const conversation_publishMessages: (a: number) => any;
|
|
24
|
-
export const conversation_sync: (a: number) => any;
|
|
25
|
-
export const conversation_findMessages: (a: number, b: number) => [number, number, number, number];
|
|
26
|
-
export const conversation_listMembers: (a: number) => any;
|
|
27
|
-
export const conversation_adminList: (a: number) => [number, number, number, number];
|
|
28
|
-
export const conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
29
|
-
export const conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
30
|
-
export const conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
31
|
-
export const conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
32
|
-
export const conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
33
|
-
export const conversation_removeAdmin: (a: number, b: number, c: number) => any;
|
|
34
|
-
export const conversation_addSuperAdmin: (a: number, b: number, c: number) => any;
|
|
35
|
-
export const conversation_removeSuperAdmin: (a: number, b: number, c: number) => any;
|
|
36
|
-
export const conversation_groupPermissions: (a: number) => [number, number, number];
|
|
37
|
-
export const conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
38
|
-
export const conversation_removeMembers: (a: number, b: number, c: number) => any;
|
|
39
|
-
export const conversation_removeMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
40
|
-
export const conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
41
|
-
export const conversation_groupName: (a: number) => [number, number, number, number];
|
|
42
|
-
export const conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
43
|
-
export const conversation_groupImageUrlSquare: (a: number) => [number, number, number, number];
|
|
44
|
-
export const conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
45
|
-
export const conversation_groupDescription: (a: number) => [number, number, number, number];
|
|
46
|
-
export const conversation_updateGroupPinnedFrameUrl: (a: number, b: number, c: number) => any;
|
|
47
|
-
export const conversation_groupPinnedFrameUrl: (a: number) => [number, number, number, number];
|
|
48
|
-
export const conversation_createdAtNs: (a: number) => bigint;
|
|
49
|
-
export const conversation_isActive: (a: number) => [number, number, number];
|
|
50
|
-
export const conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
51
|
-
export const conversation_groupMetadata: (a: number) => [number, number, number];
|
|
52
|
-
export const conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
53
|
-
export const conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
54
|
-
export const __wbg_installation_free: (a: number, b: number) => void;
|
|
55
|
-
export const __wbg_get_installation_id: (a: number) => [number, number];
|
|
56
|
-
export const __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
57
|
-
export const __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
58
|
-
export const __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
59
|
-
export const installation_new: (a: number, b: number, c: number, d: bigint) => number;
|
|
60
|
-
export const __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
61
|
-
export const __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
62
|
-
export const __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
63
|
-
export const __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
64
|
-
export const __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
65
|
-
export const __wbg_get_inboxstate_accountAddresses: (a: number) => [number, number];
|
|
66
|
-
export const __wbg_set_inboxstate_accountAddresses: (a: number, b: number, c: number) => void;
|
|
67
|
-
export const inboxstate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
68
|
-
export const client_inboxState: (a: number, b: number) => any;
|
|
69
|
-
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
70
|
-
export const __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
71
|
-
export const __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
72
|
-
export const __wbg_client_free: (a: number, b: number) => void;
|
|
73
|
-
export const __wbg_logoptions_free: (a: number, b: number) => void;
|
|
74
|
-
export const __wbg_get_logoptions_structured: (a: number) => number;
|
|
75
|
-
export const __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
76
|
-
export const __wbg_get_logoptions_performance: (a: number) => number;
|
|
77
|
-
export const __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
78
|
-
export const __wbg_get_logoptions_level: (a: number) => number;
|
|
79
|
-
export const __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
80
|
-
export const logoptions_new: (a: number, b: number, c: number) => number;
|
|
81
|
-
export const createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
82
|
-
export const client_accountAddress: (a: number) => [number, number];
|
|
83
|
-
export const client_inboxId: (a: number) => [number, number];
|
|
84
|
-
export const client_isRegistered: (a: number) => number;
|
|
85
|
-
export const client_installationId: (a: number) => [number, number];
|
|
86
|
-
export const client_installationIdBytes: (a: number) => any;
|
|
87
|
-
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
88
|
-
export const client_registerIdentity: (a: number) => any;
|
|
89
|
-
export const client_sendHistorySyncRequest: (a: number) => any;
|
|
90
|
-
export const client_sendConsentSyncRequest: (a: number) => any;
|
|
91
|
-
export const client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
92
|
-
export const client_conversations: (a: number) => number;
|
|
93
4
|
export const __wbg_consent_free: (a: number, b: number) => void;
|
|
94
5
|
export const __wbg_get_consent_entityType: (a: number) => number;
|
|
95
6
|
export const __wbg_set_consent_entityType: (a: number, b: number) => void;
|
|
@@ -102,6 +13,43 @@ export const client_setConsentStates: (a: number, b: number, c: number) => any;
|
|
|
102
13
|
export const client_getConsentState: (a: number, b: number, c: number, d: number) => any;
|
|
103
14
|
export const conversation_consentState: (a: number) => [number, number, number];
|
|
104
15
|
export const conversation_updateConsentState: (a: number, b: number) => [number, number];
|
|
16
|
+
export const __wbg_listconversationsoptions_free: (a: number, b: number) => void;
|
|
17
|
+
export const __wbg_get_listconversationsoptions_allowedStates: (a: number) => [number, number];
|
|
18
|
+
export const __wbg_set_listconversationsoptions_allowedStates: (a: number, b: number, c: number) => void;
|
|
19
|
+
export const __wbg_get_listconversationsoptions_conversationType: (a: number) => number;
|
|
20
|
+
export const __wbg_set_listconversationsoptions_conversationType: (a: number, b: number) => void;
|
|
21
|
+
export const __wbg_get_listconversationsoptions_createdAfterNs: (a: number) => [number, bigint];
|
|
22
|
+
export const __wbg_set_listconversationsoptions_createdAfterNs: (a: number, b: number, c: bigint) => void;
|
|
23
|
+
export const __wbg_get_listconversationsoptions_createdBeforeNs: (a: number) => [number, bigint];
|
|
24
|
+
export const __wbg_set_listconversationsoptions_createdBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
25
|
+
export const __wbg_get_listconversationsoptions_limit: (a: number) => [number, bigint];
|
|
26
|
+
export const __wbg_set_listconversationsoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
27
|
+
export const listconversationsoptions_new: (a: number, b: number, c: number, d: number, e: bigint, f: number, g: bigint, h: number, i: bigint) => number;
|
|
28
|
+
export const __wbg_creategroupoptions_free: (a: number, b: number) => void;
|
|
29
|
+
export const __wbg_get_creategroupoptions_permissions: (a: number) => number;
|
|
30
|
+
export const __wbg_set_creategroupoptions_permissions: (a: number, b: number) => void;
|
|
31
|
+
export const __wbg_get_creategroupoptions_groupName: (a: number) => [number, number];
|
|
32
|
+
export const __wbg_set_creategroupoptions_groupName: (a: number, b: number, c: number) => void;
|
|
33
|
+
export const __wbg_get_creategroupoptions_groupImageUrlSquare: (a: number) => [number, number];
|
|
34
|
+
export const __wbg_set_creategroupoptions_groupImageUrlSquare: (a: number, b: number, c: number) => void;
|
|
35
|
+
export const __wbg_get_creategroupoptions_groupDescription: (a: number) => [number, number];
|
|
36
|
+
export const __wbg_set_creategroupoptions_groupDescription: (a: number, b: number, c: number) => void;
|
|
37
|
+
export const __wbg_get_creategroupoptions_groupPinnedFrameUrl: (a: number) => [number, number];
|
|
38
|
+
export const __wbg_set_creategroupoptions_groupPinnedFrameUrl: (a: number, b: number, c: number) => void;
|
|
39
|
+
export const __wbg_get_creategroupoptions_customPermissionPolicySet: (a: number) => number;
|
|
40
|
+
export const __wbg_set_creategroupoptions_customPermissionPolicySet: (a: number, b: number) => void;
|
|
41
|
+
export const creategroupoptions_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
|
|
42
|
+
export const __wbg_conversations_free: (a: number, b: number) => void;
|
|
43
|
+
export const conversations_createGroup: (a: number, b: number, c: number, d: number) => any;
|
|
44
|
+
export const conversations_createDm: (a: number, b: number, c: number) => any;
|
|
45
|
+
export const conversations_findGroupById: (a: number, b: number, c: number) => [number, number, number];
|
|
46
|
+
export const conversations_findDmByTargetInboxId: (a: number, b: number, c: number) => [number, number, number];
|
|
47
|
+
export const conversations_findMessageById: (a: number, b: number, c: number) => [number, number, number];
|
|
48
|
+
export const conversations_sync: (a: number) => any;
|
|
49
|
+
export const conversations_syncAllConversations: (a: number) => any;
|
|
50
|
+
export const conversations_list: (a: number, b: number) => any;
|
|
51
|
+
export const conversations_listGroups: (a: number, b: number) => any;
|
|
52
|
+
export const conversations_listDms: (a: number, b: number) => any;
|
|
105
53
|
export const __wbg_contenttypeid_free: (a: number, b: number) => void;
|
|
106
54
|
export const __wbg_get_contenttypeid_typeId: (a: number) => [number, number];
|
|
107
55
|
export const __wbg_set_contenttypeid_typeId: (a: number, b: number, c: number) => void;
|
|
@@ -125,12 +73,6 @@ export const encodedcontent_new: (a: number, b: any, c: number, d: number, e: nu
|
|
|
125
73
|
export const getInboxIdForAddress: (a: number, b: number, c: number, d: number) => any;
|
|
126
74
|
export const generateInboxId: (a: number, b: number) => [number, number, number, number];
|
|
127
75
|
export const __wbg_listmessagesoptions_free: (a: number, b: number) => void;
|
|
128
|
-
export const __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
129
|
-
export const __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
130
|
-
export const __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
131
|
-
export const __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
132
|
-
export const __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
133
|
-
export const __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
134
76
|
export const __wbg_get_listmessagesoptions_deliveryStatus: (a: number) => number;
|
|
135
77
|
export const __wbg_set_listmessagesoptions_deliveryStatus: (a: number, b: number) => void;
|
|
136
78
|
export const __wbg_get_listmessagesoptions_direction: (a: number) => number;
|
|
@@ -156,7 +98,8 @@ export const verifySignedWithPublicKey: (a: number, b: number, c: any, d: any) =
|
|
|
156
98
|
export const client_createInboxSignatureText: (a: number) => any;
|
|
157
99
|
export const client_addWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
158
100
|
export const client_revokeWalletSignatureText: (a: number, b: number, c: number) => any;
|
|
159
|
-
export const
|
|
101
|
+
export const client_revokeAllOtherInstallationsSignatureText: (a: number) => any;
|
|
102
|
+
export const client_revokeInstallationsSignatureText: (a: number, b: number, c: number) => any;
|
|
160
103
|
export const client_addSignature: (a: number, b: number, c: any) => any;
|
|
161
104
|
export const client_addScwSignature: (a: number, b: number, c: any, d: bigint, e: number, f: bigint) => any;
|
|
162
105
|
export const client_applySignatureRequests: (a: number) => any;
|
|
@@ -164,43 +107,101 @@ export const client_signWithInstallationKey: (a: number, b: number, c: number) =
|
|
|
164
107
|
export const client_verifySignedWithInstallationKey: (a: number, b: number, c: number, d: any) => [number, number];
|
|
165
108
|
export const __wbg_set_contenttypeid_authorityId: (a: number, b: number, c: number) => void;
|
|
166
109
|
export const __wbg_get_contenttypeid_authorityId: (a: number) => [number, number];
|
|
167
|
-
export const
|
|
168
|
-
export const
|
|
169
|
-
export const
|
|
170
|
-
export const
|
|
171
|
-
export const
|
|
172
|
-
export const
|
|
173
|
-
export const
|
|
174
|
-
export const
|
|
175
|
-
export const
|
|
176
|
-
export const
|
|
177
|
-
export const
|
|
178
|
-
export const
|
|
179
|
-
export const
|
|
180
|
-
export const
|
|
181
|
-
export const
|
|
182
|
-
export const
|
|
183
|
-
export const
|
|
184
|
-
export const
|
|
185
|
-
export const
|
|
186
|
-
export const
|
|
187
|
-
export const
|
|
188
|
-
export const
|
|
189
|
-
export const
|
|
190
|
-
export const
|
|
191
|
-
export const
|
|
192
|
-
export const
|
|
193
|
-
export const
|
|
194
|
-
export const
|
|
195
|
-
export const
|
|
196
|
-
export const
|
|
197
|
-
export const
|
|
198
|
-
export const
|
|
199
|
-
export const
|
|
200
|
-
export const
|
|
201
|
-
export const
|
|
202
|
-
export const
|
|
203
|
-
export const
|
|
110
|
+
export const __wbg_get_listmessagesoptions_sentBeforeNs: (a: number) => [number, bigint];
|
|
111
|
+
export const __wbg_get_listmessagesoptions_sentAfterNs: (a: number) => [number, bigint];
|
|
112
|
+
export const __wbg_get_listmessagesoptions_limit: (a: number) => [number, bigint];
|
|
113
|
+
export const __wbg_set_listmessagesoptions_sentBeforeNs: (a: number, b: number, c: bigint) => void;
|
|
114
|
+
export const __wbg_set_listmessagesoptions_sentAfterNs: (a: number, b: number, c: bigint) => void;
|
|
115
|
+
export const __wbg_set_listmessagesoptions_limit: (a: number, b: number, c: bigint) => void;
|
|
116
|
+
export const __wbg_client_free: (a: number, b: number) => void;
|
|
117
|
+
export const __wbg_logoptions_free: (a: number, b: number) => void;
|
|
118
|
+
export const __wbg_get_logoptions_structured: (a: number) => number;
|
|
119
|
+
export const __wbg_set_logoptions_structured: (a: number, b: number) => void;
|
|
120
|
+
export const __wbg_get_logoptions_performance: (a: number) => number;
|
|
121
|
+
export const __wbg_set_logoptions_performance: (a: number, b: number) => void;
|
|
122
|
+
export const __wbg_get_logoptions_level: (a: number) => number;
|
|
123
|
+
export const __wbg_set_logoptions_level: (a: number, b: number) => void;
|
|
124
|
+
export const logoptions_new: (a: number, b: number, c: number) => number;
|
|
125
|
+
export const createClient: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => any;
|
|
126
|
+
export const client_accountAddress: (a: number) => [number, number];
|
|
127
|
+
export const client_inboxId: (a: number) => [number, number];
|
|
128
|
+
export const client_isRegistered: (a: number) => number;
|
|
129
|
+
export const client_installationId: (a: number) => [number, number];
|
|
130
|
+
export const client_installationIdBytes: (a: number) => any;
|
|
131
|
+
export const client_canMessage: (a: number, b: number, c: number) => any;
|
|
132
|
+
export const client_registerIdentity: (a: number) => any;
|
|
133
|
+
export const client_sendHistorySyncRequest: (a: number) => any;
|
|
134
|
+
export const client_sendConsentSyncRequest: (a: number) => any;
|
|
135
|
+
export const client_findInboxIdByAddress: (a: number, b: number, c: number) => any;
|
|
136
|
+
export const client_conversations: (a: number) => number;
|
|
137
|
+
export const __wbg_groupmetadata_free: (a: number, b: number) => void;
|
|
138
|
+
export const groupmetadata_creatorInboxId: (a: number) => [number, number];
|
|
139
|
+
export const groupmetadata_conversationType: (a: number) => [number, number];
|
|
140
|
+
export const __wbg_groupmember_free: (a: number, b: number) => void;
|
|
141
|
+
export const __wbg_get_groupmember_inboxId: (a: number) => [number, number];
|
|
142
|
+
export const __wbg_set_groupmember_inboxId: (a: number, b: number, c: number) => void;
|
|
143
|
+
export const __wbg_get_groupmember_accountAddresses: (a: number) => [number, number];
|
|
144
|
+
export const __wbg_set_groupmember_accountAddresses: (a: number, b: number, c: number) => void;
|
|
145
|
+
export const __wbg_get_groupmember_installationIds: (a: number) => [number, number];
|
|
146
|
+
export const __wbg_set_groupmember_installationIds: (a: number, b: number, c: number) => void;
|
|
147
|
+
export const __wbg_get_groupmember_permissionLevel: (a: number) => number;
|
|
148
|
+
export const __wbg_set_groupmember_permissionLevel: (a: number, b: number) => void;
|
|
149
|
+
export const __wbg_get_groupmember_consentState: (a: number) => number;
|
|
150
|
+
export const __wbg_set_groupmember_consentState: (a: number, b: number) => void;
|
|
151
|
+
export const groupmember_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
152
|
+
export const __wbg_conversation_free: (a: number, b: number) => void;
|
|
153
|
+
export const conversation_id: (a: number) => [number, number];
|
|
154
|
+
export const conversation_send: (a: number, b: number) => any;
|
|
155
|
+
export const conversation_sendOptimistic: (a: number, b: number) => [number, number, number, number];
|
|
156
|
+
export const conversation_publishMessages: (a: number) => any;
|
|
157
|
+
export const conversation_sync: (a: number) => any;
|
|
158
|
+
export const conversation_findMessages: (a: number, b: number) => any;
|
|
159
|
+
export const conversation_listMembers: (a: number) => any;
|
|
160
|
+
export const conversation_adminList: (a: number) => [number, number, number, number];
|
|
161
|
+
export const conversation_superAdminList: (a: number) => [number, number, number, number];
|
|
162
|
+
export const conversation_isAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
163
|
+
export const conversation_isSuperAdmin: (a: number, b: number, c: number) => [number, number, number];
|
|
164
|
+
export const conversation_addMembers: (a: number, b: number, c: number) => any;
|
|
165
|
+
export const conversation_addAdmin: (a: number, b: number, c: number) => any;
|
|
166
|
+
export const conversation_removeAdmin: (a: number, b: number, c: number) => any;
|
|
167
|
+
export const conversation_addSuperAdmin: (a: number, b: number, c: number) => any;
|
|
168
|
+
export const conversation_removeSuperAdmin: (a: number, b: number, c: number) => any;
|
|
169
|
+
export const conversation_groupPermissions: (a: number) => [number, number, number];
|
|
170
|
+
export const conversation_addMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
171
|
+
export const conversation_removeMembers: (a: number, b: number, c: number) => any;
|
|
172
|
+
export const conversation_removeMembersByInboxId: (a: number, b: number, c: number) => any;
|
|
173
|
+
export const conversation_updateGroupName: (a: number, b: number, c: number) => any;
|
|
174
|
+
export const conversation_groupName: (a: number) => [number, number, number, number];
|
|
175
|
+
export const conversation_updateGroupImageUrlSquare: (a: number, b: number, c: number) => any;
|
|
176
|
+
export const conversation_groupImageUrlSquare: (a: number) => [number, number, number, number];
|
|
177
|
+
export const conversation_updateGroupDescription: (a: number, b: number, c: number) => any;
|
|
178
|
+
export const conversation_groupDescription: (a: number) => [number, number, number, number];
|
|
179
|
+
export const conversation_updateGroupPinnedFrameUrl: (a: number, b: number, c: number) => any;
|
|
180
|
+
export const conversation_groupPinnedFrameUrl: (a: number) => [number, number, number, number];
|
|
181
|
+
export const conversation_createdAtNs: (a: number) => bigint;
|
|
182
|
+
export const conversation_isActive: (a: number) => [number, number, number];
|
|
183
|
+
export const conversation_addedByInboxId: (a: number) => [number, number, number, number];
|
|
184
|
+
export const conversation_groupMetadata: (a: number) => any;
|
|
185
|
+
export const conversation_dmPeerInboxId: (a: number) => [number, number, number, number];
|
|
186
|
+
export const conversation_updatePermissionPolicy: (a: number, b: number, c: number, d: number) => any;
|
|
187
|
+
export const __wbg_installation_free: (a: number, b: number) => void;
|
|
188
|
+
export const __wbg_get_installation_id: (a: number) => [number, number];
|
|
189
|
+
export const __wbg_set_installation_id: (a: number, b: number, c: number) => void;
|
|
190
|
+
export const __wbg_get_installation_clientTimestampNs: (a: number) => [number, bigint];
|
|
191
|
+
export const __wbg_set_installation_clientTimestampNs: (a: number, b: number, c: bigint) => void;
|
|
192
|
+
export const installation_new: (a: number, b: number, c: number, d: bigint) => number;
|
|
193
|
+
export const __wbg_inboxstate_free: (a: number, b: number) => void;
|
|
194
|
+
export const __wbg_get_inboxstate_recoveryAddress: (a: number) => [number, number];
|
|
195
|
+
export const __wbg_set_inboxstate_recoveryAddress: (a: number, b: number, c: number) => void;
|
|
196
|
+
export const __wbg_get_inboxstate_installations: (a: number) => [number, number];
|
|
197
|
+
export const __wbg_set_inboxstate_installations: (a: number, b: number, c: number) => void;
|
|
198
|
+
export const __wbg_get_inboxstate_accountAddresses: (a: number) => [number, number];
|
|
199
|
+
export const __wbg_set_inboxstate_accountAddresses: (a: number, b: number, c: number) => void;
|
|
200
|
+
export const inboxstate_new: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
|
|
201
|
+
export const client_inboxState: (a: number, b: number) => any;
|
|
202
|
+
export const client_getLatestInboxState: (a: number, b: number, c: number) => any;
|
|
203
|
+
export const __wbg_set_inboxstate_inboxId: (a: number, b: number, c: number) => void;
|
|
204
|
+
export const __wbg_get_inboxstate_inboxId: (a: number) => [number, number];
|
|
204
205
|
export const __wbg_permissionpolicyset_free: (a: number, b: number) => void;
|
|
205
206
|
export const __wbg_get_permissionpolicyset_addMemberPolicy: (a: number) => number;
|
|
206
207
|
export const __wbg_set_permissionpolicyset_addMemberPolicy: (a: number, b: number) => void;
|
|
@@ -243,8 +244,8 @@ export const __wbindgen_exn_store: (a: number) => void;
|
|
|
243
244
|
export const __externref_table_alloc: () => number;
|
|
244
245
|
export const __wbindgen_export_5: WebAssembly.Table;
|
|
245
246
|
export const __wbindgen_export_6: WebAssembly.Table;
|
|
246
|
-
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
247
247
|
export const __externref_table_dealloc: (a: number) => void;
|
|
248
|
-
export const
|
|
249
|
-
export const
|
|
248
|
+
export const __externref_drop_slice: (a: number, b: number) => void;
|
|
249
|
+
export const closure2588_externref_shim: (a: number, b: number, c: any) => void;
|
|
250
|
+
export const closure3682_externref_shim: (a: number, b: number, c: any, d: any) => void;
|
|
250
251
|
export const __wbindgen_start: () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmtp/wasm-bindings",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "WASM bindings for the libXMTP rust library",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"devDependencies": {
|
|
58
58
|
"@sqlite.org/sqlite-wasm": "^3.47.0-build1",
|
|
59
|
-
"binaryen": "^
|
|
59
|
+
"binaryen": "^121.0.0",
|
|
60
60
|
"wasm-pack": "^0.13.1"
|
|
61
61
|
},
|
|
62
62
|
"packageManager": "yarn@4.5.1"
|