@xmtp/node-bindings 1.2.2 → 1.2.4
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 -18
- package/dist/index.js +5 -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>
|
|
@@ -35,16 +35,13 @@ export declare class Client {
|
|
|
35
35
|
* Returns a JavaScript Object mapping installation ID strings to KeyPackageStatus objects.
|
|
36
36
|
*/
|
|
37
37
|
getKeyPackageStatusesForInstallationIds(installationIds: Array<string>): Promise<Record<string, KeyPackageStatus>>
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
addPasskeySignature(signatureType: SignatureRequestType, signature: PasskeySignature): Promise<void>
|
|
46
|
-
addScwSignature(signatureType: SignatureRequestType, signatureBytes: Uint8Array, chainId: bigint, blockNumber?: bigint | undefined | null): Promise<void>
|
|
47
|
-
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>
|
|
48
45
|
signWithInstallationKey(signatureText: string): Uint8Array
|
|
49
46
|
verifySignedWithInstallationKey(signatureText: string, signatureBytes: Uint8Array): void
|
|
50
47
|
}
|
|
@@ -140,6 +137,13 @@ export declare class GroupPermissions {
|
|
|
140
137
|
policySet(): PermissionPolicySet
|
|
141
138
|
}
|
|
142
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
|
+
|
|
143
147
|
export declare class StreamCloser {
|
|
144
148
|
/**
|
|
145
149
|
* Signal the stream to end
|
|
@@ -168,6 +172,8 @@ export interface ApiStats {
|
|
|
168
172
|
subscribeWelcomes: bigint
|
|
169
173
|
}
|
|
170
174
|
|
|
175
|
+
export declare export declare function applySignatureRequest(host: string, signatureRequest: SignatureRequestHandle): Promise<void>
|
|
176
|
+
|
|
171
177
|
export interface Consent {
|
|
172
178
|
entityType: ConsentEntityType
|
|
173
179
|
state: ConsentState
|
|
@@ -312,6 +318,8 @@ export interface InboxState {
|
|
|
312
318
|
identifiers: Array<Identifier>
|
|
313
319
|
}
|
|
314
320
|
|
|
321
|
+
export declare export declare function inboxStateFromInboxIds(host: string, inboxIds: Array<string>): Promise<Array<InboxState>>
|
|
322
|
+
|
|
315
323
|
export interface Installation {
|
|
316
324
|
bytes: Uint8Array
|
|
317
325
|
clientTimestampNs?: bigint
|
|
@@ -474,13 +482,7 @@ export interface RemoteAttachmentInfo {
|
|
|
474
482
|
filename?: string
|
|
475
483
|
}
|
|
476
484
|
|
|
477
|
-
export declare
|
|
478
|
-
AddWallet = 0,
|
|
479
|
-
CreateInbox = 1,
|
|
480
|
-
RevokeWallet = 2,
|
|
481
|
-
RevokeInstallations = 3,
|
|
482
|
-
ChangeRecoveryIdentifier = 4
|
|
483
|
-
}
|
|
485
|
+
export declare export declare function revokeInstallationsSignatureRequest(host: string, recoveryIdentifier: Identifier, inboxId: string, installationIds: Array<Uint8Array>): Promise<SignatureRequestHandle>
|
|
484
486
|
|
|
485
487
|
export declare const enum SortDirection {
|
|
486
488
|
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, inboxStateFromInboxIds, 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 }
|
|
@@ -390,6 +392,7 @@ export { GroupMembershipState }
|
|
|
390
392
|
export { GroupMessageKind }
|
|
391
393
|
export { GroupPermissionsOptions }
|
|
392
394
|
export { IdentifierKind }
|
|
395
|
+
export { inboxStateFromInboxIds }
|
|
393
396
|
export { isAddressAuthorized }
|
|
394
397
|
export { isInstallationAuthorized }
|
|
395
398
|
export { LogLevel }
|
|
@@ -399,7 +402,7 @@ export { PermissionPolicy }
|
|
|
399
402
|
export { PermissionUpdateType }
|
|
400
403
|
export { ReactionAction }
|
|
401
404
|
export { ReactionSchema }
|
|
402
|
-
export {
|
|
405
|
+
export { revokeInstallationsSignatureRequest }
|
|
403
406
|
export { SortDirection }
|
|
404
407
|
export { SyncWorkerMode }
|
|
405
408
|
export { verifySignedWithPublicKey }
|
package/dist/version.json
CHANGED