@xmtp/node-bindings 1.2.0-dev.ef2c57d → 1.2.0-rc1
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_node.darwin-arm64.node +0 -0
- package/dist/bindings_node.darwin-x64.node +0 -0
- package/dist/bindings_node.linux-arm64-gnu.node +0 -0
- package/dist/bindings_node.linux-arm64-musl.node +0 -0
- package/dist/bindings_node.linux-x64-gnu.node +0 -0
- package/dist/bindings_node.linux-x64-musl.node +0 -0
- package/dist/bindings_node.win32-x64-msvc.node +0 -0
- package/dist/index.d.ts +25 -8
- package/dist/index.js +2 -1
- package/dist/version.json +3 -3
- package/package.json +6 -6
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export declare class Client {
|
|
|
10
10
|
canMessage(accountIdentities: Array<Identifier>): Promise<Record<string, boolean>>
|
|
11
11
|
registerIdentity(): Promise<void>
|
|
12
12
|
conversations(): Conversations
|
|
13
|
-
|
|
14
|
-
sendConsentSyncRequest(): Promise<void>
|
|
13
|
+
sendSyncRequest(): Promise<void>
|
|
15
14
|
findInboxIdByIdentifier(identifier: Identifier): Promise<string | null>
|
|
16
15
|
addressesFromInboxId(refreshFromNetwork: boolean, inboxIds: Array<string>): Promise<Array<InboxState>>
|
|
16
|
+
syncPreferences(): Promise<number>
|
|
17
17
|
setConsentStates(records: Array<Consent>): Promise<void>
|
|
18
18
|
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>
|
|
19
19
|
/**
|
|
@@ -88,6 +88,8 @@ export declare class Conversation {
|
|
|
88
88
|
messageDisappearingSettings(): MessageDisappearingSettings | null
|
|
89
89
|
isMessageDisappearingEnabled(): boolean
|
|
90
90
|
getHmacKeys(): Array<HmacKey>
|
|
91
|
+
debugInfo(): Promise<ConversationDebugInfo>
|
|
92
|
+
findDuplicateDms(): Promise<Array<Conversation>>
|
|
91
93
|
}
|
|
92
94
|
|
|
93
95
|
export declare class ConversationListItem {
|
|
@@ -96,6 +98,7 @@ export declare class ConversationListItem {
|
|
|
96
98
|
}
|
|
97
99
|
|
|
98
100
|
export declare class Conversations {
|
|
101
|
+
createGroupOptimistic(options?: CreateGroupOptions | undefined | null): Conversation
|
|
99
102
|
createGroup(accountIdentities: Array<Identifier>, options?: CreateGroupOptions | undefined | null): Promise<Conversation>
|
|
100
103
|
createGroupByInboxId(inboxIds: Array<string>, options?: CreateGroupOptions | undefined | null): Promise<Conversation>
|
|
101
104
|
createDm(accountIdentity: Identifier, options?: CreateDmOptions | undefined | null): Promise<Conversation>
|
|
@@ -106,6 +109,7 @@ export declare class Conversations {
|
|
|
106
109
|
processStreamedWelcomeMessage(envelopeBytes: Uint8Array): Promise<Conversation>
|
|
107
110
|
sync(): Promise<void>
|
|
108
111
|
syncAllConversations(consentStates?: Array<ConsentState> | undefined | null): Promise<bigint>
|
|
112
|
+
syncDeviceSync(): Promise<void>
|
|
109
113
|
list(opts?: ListConversationsOptions | undefined | null): Array<ConversationListItem>
|
|
110
114
|
listGroups(opts?: ListConversationsOptions | undefined | null): Array<ConversationListItem>
|
|
111
115
|
listDms(opts?: ListConversationsOptions | undefined | null): Array<ConversationListItem>
|
|
@@ -113,9 +117,9 @@ export declare class Conversations {
|
|
|
113
117
|
stream(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
114
118
|
streamGroups(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
115
119
|
streamDms(callback: (err: null | Error, result: Conversation | undefined) => void): StreamCloser
|
|
116
|
-
streamAllMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
117
|
-
streamAllGroupMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
118
|
-
streamAllDmMessages(callback: (err: null | Error, result: Message | undefined) => void): StreamCloser
|
|
120
|
+
streamAllMessages(callback: (err: null | Error, result: Message | undefined) => void, conversationType?: ConversationType, consentStates?: ConsentState[]): StreamCloser
|
|
121
|
+
streamAllGroupMessages(callback: (err: null | Error, result: Message | undefined) => void, consentStates?: ConsentState[]): StreamCloser
|
|
122
|
+
streamAllDmMessages(callback: (err: null | Error, result: Message | undefined) => void, consentStates?: ConsentState[]): StreamCloser
|
|
119
123
|
streamConsent(callback: (err: null | Error, result: Consent[] | undefined) => void): StreamCloser
|
|
120
124
|
streamPreferences(callback: (err: null | Error, result: any[] | undefined) => void): StreamCloser
|
|
121
125
|
}
|
|
@@ -192,6 +196,12 @@ export interface ContentTypeId {
|
|
|
192
196
|
versionMinor: number
|
|
193
197
|
}
|
|
194
198
|
|
|
199
|
+
export interface ConversationDebugInfo {
|
|
200
|
+
epoch: bigint
|
|
201
|
+
maybeForked: boolean
|
|
202
|
+
forkDetails: string
|
|
203
|
+
}
|
|
204
|
+
|
|
195
205
|
export declare const enum ConversationType {
|
|
196
206
|
Dm = 0,
|
|
197
207
|
Group = 1,
|
|
@@ -199,13 +209,13 @@ export declare const enum ConversationType {
|
|
|
199
209
|
}
|
|
200
210
|
|
|
201
211
|
/**
|
|
202
|
-
* Create a client
|
|
212
|
+
* Create a client.
|
|
203
213
|
*
|
|
204
214
|
* Optionally specify a filter for the log level as a string.
|
|
205
215
|
* It can be one of: `debug`, `info`, `warn`, `error` or 'off'.
|
|
206
216
|
* By default, logging is disabled.
|
|
207
217
|
*/
|
|
208
|
-
export declare export declare function createClient(host: string, isSecure: boolean, dbPath: string | undefined | null, inboxId: string, accountIdentifier: Identifier, encryptionKey?: Uint8Array | undefined | null,
|
|
218
|
+
export declare export declare function createClient(host: string, isSecure: boolean, dbPath: string | undefined | null, inboxId: string, accountIdentifier: Identifier, encryptionKey?: Uint8Array | undefined | null, deviceSyncServerUrl?: string | undefined | null, deviceSyncWorkerMode?: SyncWorkerMode | undefined | null, logOptions?: LogOptions | undefined | null): Promise<Client>
|
|
209
219
|
|
|
210
220
|
export interface CreateDmOptions {
|
|
211
221
|
messageDisappearingSettings?: MessageDisappearingSettings
|
|
@@ -249,7 +259,8 @@ export declare export declare function getInboxIdForIdentifier(host: string, isS
|
|
|
249
259
|
export declare const enum GroupMembershipState {
|
|
250
260
|
Allowed = 0,
|
|
251
261
|
Rejected = 1,
|
|
252
|
-
Pending = 2
|
|
262
|
+
Pending = 2,
|
|
263
|
+
Restored = 3
|
|
253
264
|
}
|
|
254
265
|
|
|
255
266
|
export declare const enum GroupMessageKind {
|
|
@@ -320,6 +331,7 @@ export interface ListMessagesOptions {
|
|
|
320
331
|
deliveryStatus?: DeliveryStatus
|
|
321
332
|
direction?: SortDirection
|
|
322
333
|
contentTypes?: Array<ContentType>
|
|
334
|
+
kind?: GroupMessageKind
|
|
323
335
|
}
|
|
324
336
|
|
|
325
337
|
export declare const enum LogLevel {
|
|
@@ -458,4 +470,9 @@ export declare const enum SortDirection {
|
|
|
458
470
|
Descending = 1
|
|
459
471
|
}
|
|
460
472
|
|
|
473
|
+
export declare const enum SyncWorkerMode {
|
|
474
|
+
enabled = 'enabled',
|
|
475
|
+
disabled = 'disabled'
|
|
476
|
+
}
|
|
477
|
+
|
|
461
478
|
export declare export declare function verifySignedWithPublicKey(signatureText: string, signatureBytes: Uint8Array, publicKey: Uint8Array): void
|
package/dist/index.js
CHANGED
|
@@ -365,7 +365,7 @@ if (!nativeBinding) {
|
|
|
365
365
|
throw new Error(`Failed to load native binding`)
|
|
366
366
|
}
|
|
367
367
|
|
|
368
|
-
const { Client, Conversation, ConversationListItem, Conversations, GroupMember, GroupMetadata, GroupPermissions, StreamCloser, ConsentEntityType, ConsentState, ContentType, ConversationType, createClient, decodeMultiRemoteAttachment, decodeReaction, DeliveryStatus, encodeMultiRemoteAttachment, encodeReaction, generateInboxId, getInboxIdForIdentifier, GroupMembershipState, GroupMessageKind, GroupPermissionsOptions, IdentifierKind, isAddressAuthorized, isInstallationAuthorized, LogLevel, MetadataField, PermissionLevel, PermissionPolicy, PermissionUpdateType, ReactionAction, ReactionSchema, SignatureRequestType, SortDirection, verifySignedWithPublicKey } = nativeBinding
|
|
368
|
+
const { Client, Conversation, ConversationListItem, Conversations, GroupMember, GroupMetadata, GroupPermissions, StreamCloser, ConsentEntityType, ConsentState, ContentType, ConversationType, createClient, decodeMultiRemoteAttachment, decodeReaction, DeliveryStatus, encodeMultiRemoteAttachment, encodeReaction, generateInboxId, getInboxIdForIdentifier, GroupMembershipState, GroupMessageKind, GroupPermissionsOptions, IdentifierKind, isAddressAuthorized, isInstallationAuthorized, LogLevel, MetadataField, PermissionLevel, PermissionPolicy, PermissionUpdateType, ReactionAction, ReactionSchema, SignatureRequestType, SortDirection, SyncWorkerMode, verifySignedWithPublicKey } = nativeBinding
|
|
369
369
|
export { Client }
|
|
370
370
|
export { Conversation }
|
|
371
371
|
export { ConversationListItem }
|
|
@@ -401,4 +401,5 @@ export { ReactionAction }
|
|
|
401
401
|
export { ReactionSchema }
|
|
402
402
|
export { SignatureRequestType }
|
|
403
403
|
export { SortDirection }
|
|
404
|
+
export { SyncWorkerMode }
|
|
404
405
|
export { verifySignedWithPublicKey }
|
package/dist/version.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xmtp/node-bindings",
|
|
3
|
-
"version": "1.2.0-
|
|
3
|
+
"version": "1.2.0-rc1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://git@github.com/xmtp/libxmtp.git",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@ianvs/prettier-plugin-sort-imports": "^4.4.1",
|
|
42
42
|
"@napi-rs/cli": "^3.0.0-alpha.64",
|
|
43
|
-
"@types/node": "^22.
|
|
43
|
+
"@types/node": "^22.15.2",
|
|
44
44
|
"@types/uuid": "^10.0.0",
|
|
45
45
|
"fast-glob": "^3.3.3",
|
|
46
46
|
"prettier": "^3.5.0",
|
|
@@ -48,11 +48,11 @@
|
|
|
48
48
|
"tsx": "^4.19.3",
|
|
49
49
|
"typescript": "^5.8.2",
|
|
50
50
|
"uuid": "^11.1.0",
|
|
51
|
-
"viem": "^2.
|
|
52
|
-
"vite": "^6.2
|
|
51
|
+
"viem": "^2.28.0",
|
|
52
|
+
"vite": "^6.3.2",
|
|
53
53
|
"vite-tsconfig-paths": "^5.1.4",
|
|
54
|
-
"vitest": "^3.
|
|
55
|
-
"zx": "^8.
|
|
54
|
+
"vitest": "^3.1.1",
|
|
55
|
+
"zx": "^8.5.0"
|
|
56
56
|
},
|
|
57
57
|
"packageManager": "yarn@4.6.0",
|
|
58
58
|
"engines": {
|