@xmtp/node-bindings 1.1.3 → 1.2.0-dev.4ba3b55
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 +27 -3
- 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
|
@@ -14,6 +14,7 @@ export declare class Client {
|
|
|
14
14
|
sendConsentSyncRequest(): Promise<void>
|
|
15
15
|
findInboxIdByIdentifier(identifier: Identifier): Promise<string | null>
|
|
16
16
|
addressesFromInboxId(refreshFromNetwork: boolean, inboxIds: Array<string>): Promise<Array<InboxState>>
|
|
17
|
+
syncPreferences(): Promise<number>
|
|
17
18
|
setConsentStates(records: Array<Consent>): Promise<void>
|
|
18
19
|
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>
|
|
19
20
|
/**
|
|
@@ -24,11 +25,18 @@ export declare class Client {
|
|
|
24
25
|
*/
|
|
25
26
|
inboxState(refreshFromNetwork: boolean): Promise<InboxState>
|
|
26
27
|
getLatestInboxState(inboxId: string): Promise<InboxState>
|
|
28
|
+
/**
|
|
29
|
+
* Get key package statuses for a list of installation IDs.
|
|
30
|
+
*
|
|
31
|
+
* Returns a JavaScript Object mapping installation ID strings to KeyPackageStatus objects.
|
|
32
|
+
*/
|
|
33
|
+
getKeyPackageStatusesForInstallationIds(installationIds: Array<string>): Promise<Record<string, KeyPackageStatus>>
|
|
27
34
|
createInboxSignatureText(): Promise<string | null>
|
|
28
35
|
addIdentifierSignatureText(newIdentifier: Identifier): Promise<string>
|
|
29
36
|
revokeIdentifierSignatureText(identifier: Identifier): Promise<string>
|
|
30
37
|
revokeAllOtherInstallationsSignatureText(): Promise<string>
|
|
31
38
|
revokeInstallationsSignatureText(installationIds: Array<Uint8Array>): Promise<string>
|
|
39
|
+
changeRecoveryIdentifierSignatureText(newRecoveryIdentifier: Identifier): Promise<string>
|
|
32
40
|
addEcdsaSignature(signatureType: SignatureRequestType, signatureBytes: Uint8Array): Promise<void>
|
|
33
41
|
addPasskeySignature(signatureType: SignatureRequestType, signature: PasskeySignature): Promise<void>
|
|
34
42
|
addScwSignature(signatureType: SignatureRequestType, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | undefined | null): Promise<void>
|
|
@@ -192,13 +200,13 @@ export declare const enum ConversationType {
|
|
|
192
200
|
}
|
|
193
201
|
|
|
194
202
|
/**
|
|
195
|
-
* Create a client
|
|
203
|
+
* Create a client.
|
|
196
204
|
*
|
|
197
205
|
* Optionally specify a filter for the log level as a string.
|
|
198
206
|
* It can be one of: `debug`, `info`, `warn`, `error` or 'off'.
|
|
199
207
|
* By default, logging is disabled.
|
|
200
208
|
*/
|
|
201
|
-
export declare export declare function createClient(host: string, isSecure: boolean, dbPath: string | undefined | null, inboxId: string, accountIdentifier: Identifier, encryptionKey?: Uint8Array | undefined | null,
|
|
209
|
+
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>
|
|
202
210
|
|
|
203
211
|
export interface CreateDmOptions {
|
|
204
212
|
messageDisappearingSettings?: MessageDisappearingSettings
|
|
@@ -288,6 +296,16 @@ export declare export declare function isAddressAuthorized(host: string, inboxId
|
|
|
288
296
|
|
|
289
297
|
export declare export declare function isInstallationAuthorized(host: string, inboxId: string, installationId: Uint8Array): Promise<boolean>
|
|
290
298
|
|
|
299
|
+
export interface KeyPackageStatus {
|
|
300
|
+
lifetime?: Lifetime
|
|
301
|
+
validationError?: string
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
export interface Lifetime {
|
|
305
|
+
notBefore: bigint
|
|
306
|
+
notAfter: bigint
|
|
307
|
+
}
|
|
308
|
+
|
|
291
309
|
export interface ListConversationsOptions {
|
|
292
310
|
consentStates?: Array<ConsentState>
|
|
293
311
|
createdAfterNs?: number
|
|
@@ -432,7 +450,8 @@ export declare const enum SignatureRequestType {
|
|
|
432
450
|
AddWallet = 0,
|
|
433
451
|
CreateInbox = 1,
|
|
434
452
|
RevokeWallet = 2,
|
|
435
|
-
RevokeInstallations = 3
|
|
453
|
+
RevokeInstallations = 3,
|
|
454
|
+
ChangeRecoveryIdentifier = 4
|
|
436
455
|
}
|
|
437
456
|
|
|
438
457
|
export declare const enum SortDirection {
|
|
@@ -440,4 +459,9 @@ export declare const enum SortDirection {
|
|
|
440
459
|
Descending = 1
|
|
441
460
|
}
|
|
442
461
|
|
|
462
|
+
export declare const enum SyncWorkerMode {
|
|
463
|
+
enabled = 'enabled',
|
|
464
|
+
disabled = 'disabled'
|
|
465
|
+
}
|
|
466
|
+
|
|
443
467
|
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.
|
|
3
|
+
"version": "1.2.0-dev.4ba3b55",
|
|
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.14.0",
|
|
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.27.2",
|
|
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": {
|