@xmtp/node-bindings 1.2.0 → 1.2.3
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 +20 -19
- package/dist/index.js +4 -2
- package/dist/version.json +2 -2
- package/package.json +1 -1
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ export declare class Client {
|
|
|
8
8
|
installationIdBytes(): Uint8Array
|
|
9
9
|
/** The resulting vec will be the same length as the input and should be zipped for the results. */
|
|
10
10
|
canMessage(accountIdentities: Array<Identifier>): Promise<Record<string, boolean>>
|
|
11
|
-
registerIdentity(): Promise<void>
|
|
11
|
+
registerIdentity(signatureRequest: SignatureRequestHandle): Promise<void>
|
|
12
12
|
conversations(): Conversations
|
|
13
13
|
sendSyncRequest(): Promise<void>
|
|
14
14
|
findInboxIdByIdentifier(identifier: Identifier): Promise<string | null>
|
|
@@ -17,6 +17,7 @@ export declare class Client {
|
|
|
17
17
|
apiStatistics(): ApiStats
|
|
18
18
|
apiIdentityStatistics(): IdentityStats
|
|
19
19
|
apiAggregateStatistics(): string
|
|
20
|
+
clearAllStatistics(): void
|
|
20
21
|
uploadDebugArchive(serverUrl: string): Promise<string>
|
|
21
22
|
setConsentStates(records: Array<Consent>): Promise<void>
|
|
22
23
|
getConsentState(entityType: ConsentEntityType, entity: string): Promise<ConsentState>
|
|
@@ -34,16 +35,13 @@ export declare class Client {
|
|
|
34
35
|
* Returns a JavaScript Object mapping installation ID strings to KeyPackageStatus objects.
|
|
35
36
|
*/
|
|
36
37
|
getKeyPackageStatusesForInstallationIds(installationIds: Array<string>): Promise<Record<string, KeyPackageStatus>>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
addPasskeySignature(signatureType: SignatureRequestType, signature: PasskeySignature): Promise<void>
|
|
45
|
-
addScwSignature(signatureType: SignatureRequestType, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | undefined | null): Promise<void>
|
|
46
|
-
applySignatureRequests(): Promise<void>
|
|
38
|
+
createInboxSignatureRequest(): Promise<SignatureRequestHandle | null>
|
|
39
|
+
addIdentifierSignatureRequest(newIdentifier: Identifier): Promise<SignatureRequestHandle>
|
|
40
|
+
revokeIdentifierSignatureRequest(identifier: Identifier): Promise<SignatureRequestHandle>
|
|
41
|
+
revokeAllOtherInstallationsSignatureRequest(): Promise<SignatureRequestHandle>
|
|
42
|
+
revokeInstallationsSignatureRequest(installationIds: Array<Uint8Array>): Promise<SignatureRequestHandle>
|
|
43
|
+
changeRecoveryIdentifierSignatureRequest(newRecoveryIdentifier: Identifier): Promise<SignatureRequestHandle>
|
|
44
|
+
applySignatureRequest(signatureRequest: SignatureRequestHandle): Promise<void>
|
|
47
45
|
signWithInstallationKey(signatureText: string): Uint8Array
|
|
48
46
|
verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void
|
|
49
47
|
}
|
|
@@ -139,6 +137,13 @@ export declare class GroupPermissions {
|
|
|
139
137
|
policySet(): PermissionPolicySet
|
|
140
138
|
}
|
|
141
139
|
|
|
140
|
+
export declare class SignatureRequestHandle {
|
|
141
|
+
signatureText(): Promise<string>
|
|
142
|
+
addEcdsaSignature(signatureBytes: Uint8Array): Promise<void>
|
|
143
|
+
addPasskeySignature(signature: PasskeySignature): Promise<void>
|
|
144
|
+
addScwSignature(accountIdentifier: Identifier, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | undefined | null): Promise<void>
|
|
145
|
+
}
|
|
146
|
+
|
|
142
147
|
export declare class StreamCloser {
|
|
143
148
|
/**
|
|
144
149
|
* Signal the stream to end
|
|
@@ -167,6 +172,8 @@ export interface ApiStats {
|
|
|
167
172
|
subscribeWelcomes: bigint
|
|
168
173
|
}
|
|
169
174
|
|
|
175
|
+
export declare export declare function applySignatureRequest(host: string, signatureRequest: SignatureRequestHandle): Promise<void>
|
|
176
|
+
|
|
170
177
|
export interface Consent {
|
|
171
178
|
entityType: ConsentEntityType
|
|
172
179
|
state: ConsentState
|
|
@@ -223,7 +230,7 @@ export declare const enum ConversationType {
|
|
|
223
230
|
* It can be one of: `debug`, `info`, `warn`, `error` or 'off'.
|
|
224
231
|
* By default, logging is disabled.
|
|
225
232
|
*/
|
|
226
|
-
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>
|
|
233
|
+
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, allowOffline?: boolean | undefined | null): Promise<Client>
|
|
227
234
|
|
|
228
235
|
export interface CreateDmOptions {
|
|
229
236
|
messageDisappearingSettings?: MessageDisappearingSettings
|
|
@@ -473,13 +480,7 @@ export interface RemoteAttachmentInfo {
|
|
|
473
480
|
filename?: string
|
|
474
481
|
}
|
|
475
482
|
|
|
476
|
-
export declare
|
|
477
|
-
AddWallet = 0,
|
|
478
|
-
CreateInbox = 1,
|
|
479
|
-
RevokeWallet = 2,
|
|
480
|
-
RevokeInstallations = 3,
|
|
481
|
-
ChangeRecoveryIdentifier = 4
|
|
482
|
-
}
|
|
483
|
+
export declare export declare function revokeInstallationsSignatureRequest(host: string, recoveryIdentifier: Identifier, inboxId: string, installationIds: Array<Uint8Array>): Promise<SignatureRequestHandle>
|
|
483
484
|
|
|
484
485
|
export declare const enum SortDirection {
|
|
485
486
|
Ascending = 0,
|
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,
|
|
368
|
+
const { Client, Conversation, ConversationListItem, Conversations, GroupMember, GroupMetadata, GroupPermissions, SignatureRequestHandle, StreamCloser, applySignatureRequest, 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, revokeInstallationsSignatureRequest, SortDirection, SyncWorkerMode, verifySignedWithPublicKey } = nativeBinding
|
|
369
369
|
export { Client }
|
|
370
370
|
export { Conversation }
|
|
371
371
|
export { ConversationListItem }
|
|
@@ -373,7 +373,9 @@ export { Conversations }
|
|
|
373
373
|
export { GroupMember }
|
|
374
374
|
export { GroupMetadata }
|
|
375
375
|
export { GroupPermissions }
|
|
376
|
+
export { SignatureRequestHandle }
|
|
376
377
|
export { StreamCloser }
|
|
378
|
+
export { applySignatureRequest }
|
|
377
379
|
export { ConsentEntityType }
|
|
378
380
|
export { ConsentState }
|
|
379
381
|
export { ContentType }
|
|
@@ -399,7 +401,7 @@ export { PermissionPolicy }
|
|
|
399
401
|
export { PermissionUpdateType }
|
|
400
402
|
export { ReactionAction }
|
|
401
403
|
export { ReactionSchema }
|
|
402
|
-
export {
|
|
404
|
+
export { revokeInstallationsSignatureRequest }
|
|
403
405
|
export { SortDirection }
|
|
404
406
|
export { SyncWorkerMode }
|
|
405
407
|
export { verifySignedWithPublicKey }
|
package/dist/version.json
CHANGED