@wireapp/core-crypto 5.4.0 → 6.0.1
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/package.json +21 -22
- package/src/core-crypto-ffi_bg.wasm +0 -0
- package/src/core-crypto-ffi_bg.wasm.d.ts +227 -188
- package/src/corecrypto.d.ts +485 -475
- package/src/corecrypto.js +1496 -902
package/src/corecrypto.d.ts
CHANGED
@@ -33,47 +33,77 @@ export declare enum Ciphersuite {
|
|
33
33
|
*/
|
34
34
|
MLS_256_DHKEMP384_AES256GCM_SHA384_P384 = 7
|
35
35
|
}
|
36
|
-
|
36
|
+
/* tslint:disable */
|
37
|
+
/* eslint-disable */
|
38
|
+
/**
|
39
|
+
* Updates the key of the CoreCrypto database.
|
40
|
+
* To be used only once, when moving from CoreCrypto <= 5.x to CoreCrypto 6.x.
|
41
|
+
*/
|
42
|
+
export function migrateDatabaseKeyTypeToBytes(name: string, old_key: string, new_key: DatabaseKey): Promise<void>;
|
43
|
+
export enum CredentialType {
|
37
44
|
/**
|
38
|
-
*
|
45
|
+
* Basic credential i.e. a KeyPair
|
39
46
|
*/
|
40
|
-
|
47
|
+
Basic = 1,
|
41
48
|
/**
|
42
|
-
*
|
49
|
+
* A x509 certificate generally obtained through e2e identity enrollment process
|
43
50
|
*/
|
44
|
-
|
51
|
+
X509 = 2
|
52
|
+
}
|
53
|
+
export enum DeviceStatus {
|
45
54
|
/**
|
46
|
-
*
|
55
|
+
* All is fine
|
47
56
|
*/
|
48
|
-
|
57
|
+
Valid = 1,
|
49
58
|
/**
|
50
|
-
*
|
59
|
+
* The Credential's certificate is expired
|
51
60
|
*/
|
52
|
-
|
61
|
+
Expired = 2,
|
53
62
|
/**
|
54
|
-
*
|
63
|
+
* The Credential's certificate is revoked (not implemented yet)
|
55
64
|
*/
|
56
|
-
|
65
|
+
Revoked = 3
|
66
|
+
}
|
67
|
+
declare enum E2eiConversationState {
|
57
68
|
/**
|
58
|
-
*
|
69
|
+
* All clients have a valid E2EI certificate
|
59
70
|
*/
|
60
|
-
|
71
|
+
Verified = 1,
|
61
72
|
/**
|
62
|
-
*
|
73
|
+
* Some clients are either still Basic or their certificate is expired
|
63
74
|
*/
|
64
|
-
|
75
|
+
NotVerified = 2,
|
76
|
+
/**
|
77
|
+
* All clients are still Basic. If all client have expired certificates, [E2eiConversationState::NotVerified] is returned.
|
78
|
+
*/
|
79
|
+
NotEnabled = 3
|
65
80
|
}
|
66
|
-
declare enum
|
81
|
+
declare enum MlsGroupInfoEncryptionType {
|
67
82
|
/**
|
68
|
-
*
|
83
|
+
* Unencrypted `GroupInfo`
|
69
84
|
*/
|
70
|
-
|
85
|
+
Plaintext = 1,
|
71
86
|
/**
|
72
|
-
*
|
87
|
+
* `GroupInfo` encrypted in a JWE
|
73
88
|
*/
|
74
|
-
|
89
|
+
JweEncrypted = 2
|
75
90
|
}
|
76
|
-
declare enum
|
91
|
+
declare enum MlsRatchetTreeType {
|
92
|
+
/**
|
93
|
+
* Plain old and complete `GroupInfo`
|
94
|
+
*/
|
95
|
+
Full = 1,
|
96
|
+
/**
|
97
|
+
* Contains `GroupInfo` changes since previous epoch (not yet implemented)
|
98
|
+
* (see [draft](https://github.com/rohan-wire/ietf-drafts/blob/main/mahy-mls-ratchet-tree-delta/draft-mahy-mls-ratchet-tree-delta.md))
|
99
|
+
*/
|
100
|
+
Delta = 2,
|
101
|
+
ByRef = 3
|
102
|
+
}
|
103
|
+
/**
|
104
|
+
* See [core_crypto::prelude::MlsWirePolicy]
|
105
|
+
*/
|
106
|
+
export enum WirePolicy {
|
77
107
|
/**
|
78
108
|
* Handshake messages are never encrypted
|
79
109
|
*/
|
@@ -85,7 +115,9 @@ declare enum WirePolicy {
|
|
85
115
|
}
|
86
116
|
/**
|
87
117
|
* For creating a challenge.
|
88
|
-
*
|
118
|
+
*
|
119
|
+
* - See https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5.1
|
120
|
+
* - See [core_crypto::e2e_identity::types::E2eiAcmeChallenge]
|
89
121
|
*/
|
90
122
|
export class AcmeChallenge {
|
91
123
|
private constructor();
|
@@ -104,6 +136,57 @@ export class AcmeChallenge {
|
|
104
136
|
*/
|
105
137
|
readonly target: string;
|
106
138
|
}
|
139
|
+
declare class AcmeDirectory {
|
140
|
+
private constructor();
|
141
|
+
free(): void;
|
142
|
+
/**
|
143
|
+
* URL for fetching a new nonce. Use this only for creating a new account.
|
144
|
+
*/
|
145
|
+
readonly newNonce: string;
|
146
|
+
/**
|
147
|
+
* URL for creating a new account.
|
148
|
+
*/
|
149
|
+
readonly newAccount: string;
|
150
|
+
/**
|
151
|
+
* URL for creating a new order.
|
152
|
+
*/
|
153
|
+
readonly newOrder: string;
|
154
|
+
/**
|
155
|
+
* Revocation URL
|
156
|
+
*/
|
157
|
+
readonly revokeCert: string;
|
158
|
+
}
|
159
|
+
declare class ArrayOfByteArray {
|
160
|
+
free(): void;
|
161
|
+
constructor(aoba: Uint8Array[]);
|
162
|
+
as_arrays(): Uint8Array[];
|
163
|
+
}
|
164
|
+
declare class BufferedDecryptedMessage {
|
165
|
+
private constructor();
|
166
|
+
free(): void;
|
167
|
+
readonly message: Uint8Array | undefined;
|
168
|
+
readonly proposals: ProposalBundle[];
|
169
|
+
/**
|
170
|
+
* It is set to false if ingesting this MLS message has resulted in the client being removed from the group (i.e. a Remove commit)
|
171
|
+
*/
|
172
|
+
readonly isActive: boolean;
|
173
|
+
/**
|
174
|
+
* Commit delay hint (in milliseconds) to prevent clients from hammering the server with epoch changes
|
175
|
+
*/
|
176
|
+
readonly commitDelay: bigint | undefined;
|
177
|
+
readonly senderClientId: ClientId | undefined;
|
178
|
+
/**
|
179
|
+
* true when the decrypted message resulted in an epoch change i.e. it was a commit
|
180
|
+
*
|
181
|
+
* Deprecated: this member will be removed in the future. Prefer using the `EpochObserver` interface.
|
182
|
+
*/
|
183
|
+
readonly hasEpochChanged: boolean;
|
184
|
+
readonly identity: WireIdentity;
|
185
|
+
/**
|
186
|
+
* New CRL Distribution of members of this group
|
187
|
+
*/
|
188
|
+
readonly crlNewDistributionPoints: NewCrlDistributionPoints;
|
189
|
+
}
|
107
190
|
/**
|
108
191
|
* Metadata describing the conditions of the build of this software.
|
109
192
|
*/
|
@@ -155,416 +238,372 @@ export class BuildMetadata {
|
|
155
238
|
*/
|
156
239
|
readonly gitDirty: string;
|
157
240
|
}
|
241
|
+
declare class Ciphersuite$1 {
|
242
|
+
free(): void;
|
243
|
+
as_u16(): number;
|
244
|
+
constructor(discriminant: number);
|
245
|
+
}
|
246
|
+
declare class Ciphersuites {
|
247
|
+
free(): void;
|
248
|
+
constructor(ids: Uint16Array);
|
249
|
+
}
|
250
|
+
declare class ClientId {
|
251
|
+
free(): void;
|
252
|
+
constructor(bytes: Uint8Array);
|
253
|
+
as_bytes(): Uint8Array;
|
254
|
+
}
|
158
255
|
declare class ConversationConfiguration {
|
159
256
|
free(): void;
|
160
|
-
constructor(ciphersuite?: Ciphersuite$1, external_senders?:
|
161
|
-
/**
|
162
|
-
* List of client IDs that are allowed to be external senders
|
163
|
-
*/
|
164
|
-
readonly externalSenders: Array<any>;
|
165
|
-
/**
|
166
|
-
* Conversation ciphersuite
|
167
|
-
*/
|
257
|
+
constructor(ciphersuite?: Ciphersuite$1 | null, external_senders?: Uint8Array[] | null, key_rotation_span?: number | null, wire_policy?: WirePolicy | null);
|
168
258
|
readonly ciphersuite: Ciphersuite$1 | undefined;
|
259
|
+
readonly custom: CustomConfiguration;
|
169
260
|
/**
|
170
|
-
*
|
261
|
+
* List of client IDs that are allowed to be external senders
|
171
262
|
*/
|
172
|
-
readonly
|
263
|
+
readonly externalSenders: Uint8Array[];
|
173
264
|
}
|
174
265
|
declare class CoreCryptoContext {
|
175
266
|
private constructor();
|
176
267
|
free(): void;
|
177
268
|
/**
|
178
|
-
*
|
179
|
-
*
|
180
|
-
* see [core_crypto::context::CentralContext::set_data]
|
269
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_new_enrollment]
|
181
270
|
*/
|
182
|
-
|
271
|
+
e2ei_new_enrollment(client_id: string, display_name: string, handle: string, team: string | null | undefined, expiry_sec: number, ciphersuite: Ciphersuite$1): Promise<FfiWireE2EIdentity>;
|
183
272
|
/**
|
184
|
-
*
|
185
|
-
*
|
186
|
-
* see [core_crypto::context::CentralContext::get_data]
|
273
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_new_activation_enrollment]
|
187
274
|
*/
|
188
|
-
|
275
|
+
e2ei_new_activation_enrollment(display_name: string, handle: string, team: string | null | undefined, expiry_sec: number, ciphersuite: Ciphersuite$1): Promise<FfiWireE2EIdentity>;
|
189
276
|
/**
|
190
|
-
*
|
277
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_new_rotate_enrollment]
|
191
278
|
*/
|
192
|
-
|
279
|
+
e2ei_new_rotate_enrollment(display_name: string | null | undefined, handle: string | null | undefined, team: string | null | undefined, expiry_sec: number, ciphersuite: Ciphersuite$1): Promise<FfiWireE2EIdentity>;
|
193
280
|
/**
|
194
|
-
*
|
195
|
-
*
|
196
|
-
* See [core_crypto::mls::context::CentralContext::mls_generate_keypairs]
|
281
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_register_acme_ca]
|
197
282
|
*/
|
198
|
-
|
283
|
+
e2ei_register_acme_ca(trust_anchor_pem: string): Promise<void>;
|
199
284
|
/**
|
200
|
-
*
|
201
|
-
*
|
202
|
-
* See [core_crypto::mls::context::CentralContext::mls_init_with_client_id]
|
285
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_register_intermediate_ca_pem]
|
203
286
|
*/
|
204
|
-
|
287
|
+
e2ei_register_intermediate_ca(cert_pem: string): Promise<NewCrlDistributionPoints>;
|
205
288
|
/**
|
206
|
-
*
|
207
|
-
*
|
208
|
-
* see [core_crypto::mls::context::CentralContext::client_public_key]
|
289
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_register_crl]
|
209
290
|
*/
|
210
|
-
|
291
|
+
e2ei_register_crl(crl_dp: string, crl_der: Uint8Array): Promise<CrlRegistration>;
|
211
292
|
/**
|
212
|
-
*
|
213
|
-
*
|
214
|
-
* see [core_crypto::mls::context::CentralContext::get_or_create_client_keypackages]
|
293
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_mls_init_only]
|
215
294
|
*/
|
216
|
-
|
295
|
+
e2ei_mls_init_only(enrollment: FfiWireE2EIdentity, certificate_chain: string, nb_key_package?: number | null): Promise<NewCrlDistributionPoints>;
|
217
296
|
/**
|
218
|
-
*
|
219
|
-
*
|
220
|
-
* see [core_crypto::mls::context::CentralContext::client_valid_key_packages_count]
|
297
|
+
* See [core_crypto::mls::conversation::ConversationGuard::e2ei_rotate]
|
221
298
|
*/
|
222
|
-
|
299
|
+
e2ei_rotate(conversation_id: Uint8Array): Promise<void>;
|
223
300
|
/**
|
224
|
-
*
|
225
|
-
*
|
226
|
-
* see [core_crypto::mls::context::CentralContext::delete_keypackages]
|
301
|
+
* See [core_crypto::transaction_context::TransactionContext::save_x509_credential]
|
227
302
|
*/
|
228
|
-
|
303
|
+
save_x509_credential(enrollment: FfiWireE2EIdentity, certificate_chain: string): Promise<NewCrlDistributionPoints>;
|
229
304
|
/**
|
230
|
-
*
|
231
|
-
*
|
232
|
-
* see [core_crypto::mls::context::CentralContext::new_conversation]
|
305
|
+
* See [core_crypto::transaction_context::TransactionContext::delete_stale_key_packages]
|
233
306
|
*/
|
234
|
-
|
307
|
+
delete_stale_key_packages(ciphersuite: Ciphersuite$1): Promise<void>;
|
235
308
|
/**
|
236
|
-
*
|
309
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_enrollment_stash]
|
237
310
|
*
|
238
|
-
*
|
311
|
+
* Note that this can only succeed id the enrollment is unique and there are no other hard refs to it.
|
239
312
|
*/
|
240
|
-
|
313
|
+
e2ei_enrollment_stash(enrollment: FfiWireE2EIdentity): Promise<Uint8Array>;
|
241
314
|
/**
|
242
|
-
*
|
243
|
-
*
|
244
|
-
* see [core_crypto::mls::context::CentralContext::conversation_ciphersuite]
|
315
|
+
* See [core_crypto::transaction_context::TransactionContext::e2ei_enrollment_stash_pop]
|
245
316
|
*/
|
246
|
-
|
317
|
+
e2ei_enrollment_stash_pop(handle: Uint8Array): Promise<FfiWireE2EIdentity>;
|
247
318
|
/**
|
248
|
-
*
|
249
|
-
*
|
250
|
-
* see [core_crypto::mls::context::CentralContext::conversation_exists]
|
319
|
+
* See [core_crypto::mls::conversation::conversation_guard::ConversationGuard::e2ei_conversation_state]
|
251
320
|
*/
|
252
|
-
|
321
|
+
e2ei_conversation_state(conversation_id: Uint8Array): Promise<E2eiConversationState>;
|
253
322
|
/**
|
254
|
-
*
|
255
|
-
*
|
256
|
-
* see [core_crypto::mls::context::CentralContext::process_raw_welcome_message]
|
323
|
+
* See [core_crypto::mls::Client::e2ei_is_enabled]
|
257
324
|
*/
|
258
|
-
|
325
|
+
e2ei_is_enabled(ciphersuite: Ciphersuite$1): Promise<boolean>;
|
259
326
|
/**
|
260
|
-
*
|
261
|
-
*
|
262
|
-
* see [core_crypto::mls::conversation::conversation_guard::ConversationGuard::add_members]
|
327
|
+
* See [core_crypto::mls::Client::get_device_identities]
|
263
328
|
*/
|
264
|
-
|
329
|
+
get_device_identities(conversation_id: Uint8Array, device_ids: ClientId[]): Promise<WireIdentity[]>;
|
265
330
|
/**
|
266
|
-
*
|
267
|
-
*
|
268
|
-
* see [core_crypto::mls::context::CentralContext::remove_members_from_conversation]
|
331
|
+
* See [core_crypto::mls::Client::get_user_identities]
|
269
332
|
*/
|
270
|
-
|
333
|
+
get_user_identities(conversation_id: Uint8Array, user_ids: string[]): Promise<Map<string, WireIdentity[]>>;
|
271
334
|
/**
|
272
|
-
*
|
273
|
-
*
|
274
|
-
* see [core_crypto::mls::conversation::ConversationGuard::mark_as_child_of]
|
335
|
+
* See [core_crypto::mls::Client::get_credential_in_use]
|
275
336
|
*/
|
276
|
-
|
337
|
+
get_credential_in_use(group_info: Uint8Array, credential_type: CredentialType): Promise<E2eiConversationState>;
|
338
|
+
e2ei_dump_pki_env(): Promise<E2eiDumpedPkiEnv | undefined>;
|
277
339
|
/**
|
278
|
-
*
|
279
|
-
*
|
280
|
-
* see [core_crypto::mls::context::CentralContext::update_keying_material]
|
340
|
+
* See [core_crypto::mls::MlsCentral::e2ei_is_pki_env_setup]
|
281
341
|
*/
|
282
|
-
|
342
|
+
e2ei_is_pki_env_setup(): Promise<boolean>;
|
283
343
|
/**
|
284
|
-
*
|
285
|
-
*
|
286
|
-
* see [core_crypto::mls::context::CentralContext::commit_pending_proposals]
|
344
|
+
* See [core_crypto::context::CentralContext::mls_init]
|
287
345
|
*/
|
288
|
-
|
346
|
+
mls_init(client_id: ClientId, ciphersuites: Ciphersuites, nb_key_package?: number | null): Promise<void>;
|
289
347
|
/**
|
290
|
-
*
|
291
|
-
*
|
292
|
-
* see [core_crypto::mls::context::CentralContext::wipe_conversation]
|
348
|
+
* See [core_crypto::context::CentralContext::mls_generate_keypairs]
|
293
349
|
*/
|
294
|
-
|
350
|
+
mls_generate_keypairs(ciphersuites: Ciphersuites): Promise<ClientId[]>;
|
295
351
|
/**
|
296
|
-
*
|
297
|
-
*
|
298
|
-
* see [core_crypto::mls::conversation::conversation_guard::ConversationGuard::decrypt_message]
|
352
|
+
* See [core_crypto::context::CentralContext::mls_init_with_client_id]
|
299
353
|
*/
|
300
|
-
|
354
|
+
mls_init_with_client_id(client_id: ClientId, tmp_client_ids: ClientId[], ciphersuites: Ciphersuites): Promise<void>;
|
301
355
|
/**
|
302
|
-
*
|
303
|
-
*
|
304
|
-
* see [core_crypto::mls::conversation::conversation_guard::ConversationGuard::encrypt_message]
|
356
|
+
* See [core_crypto::mls::MlsCentral::client_public_key]
|
305
357
|
*/
|
306
|
-
|
358
|
+
client_public_key(ciphersuite: Ciphersuite$1, credential_type: CredentialType): Promise<Uint8Array>;
|
307
359
|
/**
|
308
|
-
*
|
309
|
-
*
|
310
|
-
* see [core_crypto::mls::context::CentralContext::join_by_external_commit]
|
360
|
+
* See [core_crypto::mls::conversation::ConversationGuard::epoch]
|
311
361
|
*/
|
312
|
-
|
362
|
+
conversation_epoch(conversation_id: Uint8Array): Promise<bigint>;
|
313
363
|
/**
|
314
|
-
*
|
315
|
-
*
|
316
|
-
* see [core_crypto::mls::context::CentralContext::random_bytes]
|
364
|
+
* See [core_crypto::mls::conversation::ConversationGuard::ciphersuite]
|
317
365
|
*/
|
318
|
-
|
366
|
+
conversation_ciphersuite(conversation_id: Uint8Array): Promise<Ciphersuite$1>;
|
319
367
|
/**
|
320
|
-
*
|
321
|
-
*
|
322
|
-
* see [core_crypto::mls::conversation::ImmutableConversation::export_secret_key]
|
368
|
+
* See [core_crypto::mls::MlsCentral::conversation_exists]
|
323
369
|
*/
|
324
|
-
|
370
|
+
conversation_exists(conversation_id: Uint8Array): Promise<boolean>;
|
325
371
|
/**
|
326
|
-
*
|
327
|
-
*
|
328
|
-
* see [core_crypto::mls::conversation::ImmutableConversation::get_external_sender]
|
372
|
+
* See [core_crypto::mls::conversation::ImmutableConversation::get_client_ids]
|
329
373
|
*/
|
330
|
-
|
374
|
+
get_client_ids(conversation_id: Uint8Array): Promise<ClientId[]>;
|
331
375
|
/**
|
332
|
-
*
|
333
|
-
*
|
334
|
-
* see [core_crypto::conversation::ImmutableConversation::get_client_ids]
|
376
|
+
* See [core_crypto::mls::conversation::ImmutableConversation::export_secret_key]
|
335
377
|
*/
|
336
|
-
|
378
|
+
export_secret_key(conversation_id: Uint8Array, key_length: number): Promise<Uint8Array>;
|
337
379
|
/**
|
338
|
-
*
|
339
|
-
*
|
340
|
-
* see [core_crypto::proteus::ProteusCentral::try_new]
|
380
|
+
* See [core_crypto::mls::conversation::ImmutableConversation::get_external_sender]
|
341
381
|
*/
|
342
|
-
|
382
|
+
get_external_sender(conversation_id: Uint8Array): Promise<Uint8Array>;
|
343
383
|
/**
|
344
|
-
*
|
345
|
-
*
|
346
|
-
* See [core_crypto::context::CentralContext::proteus_session_from_prekey]
|
384
|
+
* See [core_crypto::context::CentralContext::get_or_create_client_keypackages]
|
347
385
|
*/
|
348
|
-
|
386
|
+
client_keypackages(ciphersuite: Ciphersuite$1, credential_type: CredentialType, amount_requested: number): Promise<ArrayOfByteArray>;
|
349
387
|
/**
|
350
|
-
*
|
351
|
-
*
|
352
|
-
* See [core_crypto::context::CentralContext::proteus_session_from_message]
|
388
|
+
* See [core_crypto::context::CentralContext::client_valid_key_packages_count]
|
353
389
|
*/
|
354
|
-
|
390
|
+
client_valid_keypackages_count(ciphersuite: Ciphersuite$1, credential_type: CredentialType): Promise<bigint>;
|
355
391
|
/**
|
356
|
-
*
|
357
|
-
*
|
358
|
-
* /// **Note**: This isn't usually needed as persisting sessions happens automatically when decrypting/encrypting messages and initializing Sessions
|
359
|
-
*
|
360
|
-
* See [core_crypto::context::CentralContext::proteus_session_save]
|
392
|
+
* See [core_crypto::context::CentralContext::delete_keypackages]
|
361
393
|
*/
|
362
|
-
|
394
|
+
delete_keypackages(refs: ArrayOfByteArray): Promise<void>;
|
363
395
|
/**
|
364
|
-
*
|
365
|
-
*
|
366
|
-
* See [core_crypto::context::CentralContext::proteus_session_delete]
|
396
|
+
* See [core_crypto::context::CentralContext::new_conversation]
|
367
397
|
*/
|
368
|
-
|
398
|
+
create_conversation(conversation_id: Uint8Array, creator_credential_type: CredentialType, config: ConversationConfiguration): Promise<void>;
|
369
399
|
/**
|
370
|
-
*
|
371
|
-
*
|
372
|
-
* See [core_crypto::context::CentralContext::proteus_session_exists]
|
400
|
+
* See [core_crypto::context::CentralContext::process_raw_welcome_message]
|
373
401
|
*/
|
374
|
-
|
402
|
+
process_welcome_message(welcome_message: Uint8Array, custom_configuration: CustomConfiguration): Promise<WelcomeBundle>;
|
375
403
|
/**
|
376
|
-
*
|
377
|
-
*
|
378
|
-
* See [core_crypto::context::CentralContext::proteus_decrypt]
|
404
|
+
* See [core_crypto::mls::conversation::conversation_guard::ConversationGuard::add_members]
|
379
405
|
*/
|
380
|
-
|
406
|
+
add_clients_to_conversation(conversation_id: Uint8Array, key_packages: ArrayOfByteArray): Promise<NewCrlDistributionPoints>;
|
381
407
|
/**
|
382
|
-
*
|
383
|
-
*
|
384
|
-
* See [core_crypto::context::CentralContext::proteus_encrypt]
|
408
|
+
* See [core_crypto::context::CentralContext::remove_members_from_conversation]
|
385
409
|
*/
|
386
|
-
|
410
|
+
remove_clients_from_conversation(conversation_id: Uint8Array, clients: ClientId[]): Promise<void>;
|
387
411
|
/**
|
388
|
-
*
|
389
|
-
*
|
390
|
-
* See [core_crypto::context::CentralContext::proteus_encrypt_batched]
|
412
|
+
* See [core_crypto::mls::conversation::ConversationGuard::mark_as_child_of]
|
391
413
|
*/
|
392
|
-
|
414
|
+
mark_conversation_as_child_of(child_id: Uint8Array, parent_id: Uint8Array): Promise<void>;
|
393
415
|
/**
|
394
|
-
*
|
395
|
-
*
|
396
|
-
* See [core_crypto::context::CentralContext::proteus_new_prekey]
|
416
|
+
* See [core_crypto::context::CentralContext::update_keying_material]
|
397
417
|
*/
|
398
|
-
|
418
|
+
update_keying_material(conversation_id: Uint8Array): Promise<void>;
|
399
419
|
/**
|
400
|
-
*
|
401
|
-
*
|
402
|
-
* See [core_crypto::context::CentralContext::proteus_new_prekey_auto]
|
420
|
+
* See [core_crypto::mls::conversation::conversation_guard::ConversationGuard::commit_pending_proposals]
|
403
421
|
*/
|
404
|
-
|
422
|
+
commit_pending_proposals(conversation_id: Uint8Array): Promise<void>;
|
405
423
|
/**
|
406
|
-
*
|
407
|
-
*
|
408
|
-
* See [core_crypto::context::CentralContext::proteus_last_resort_prekey]
|
424
|
+
* see [core_crypto::context::CentralContext::wipe_conversation]
|
409
425
|
*/
|
410
|
-
|
426
|
+
wipe_conversation(conversation_id: Uint8Array): Promise<void>;
|
411
427
|
/**
|
412
|
-
*
|
413
|
-
*
|
414
|
-
* See [core_crypto::context::CentralContext::proteus_last_resort_prekey_id]
|
428
|
+
* See [core_crypto::mls::conversation::conversation_guard::ConversationGuard::decrypt_message]
|
415
429
|
*/
|
416
|
-
|
430
|
+
decrypt_message(conversation_id: Uint8Array, payload: Uint8Array): Promise<DecryptedMessage>;
|
417
431
|
/**
|
418
|
-
*
|
419
|
-
*
|
420
|
-
* See [core_crypto::context::CentralContext::proteus_fingerprint]
|
432
|
+
* See [core_crypto::mls::conversation::conversation_guard::ConversationGuard::encrypt_message]
|
421
433
|
*/
|
422
|
-
|
434
|
+
encrypt_message(conversation_id: Uint8Array, message: Uint8Array): Promise<Uint8Array>;
|
423
435
|
/**
|
424
|
-
*
|
425
|
-
*
|
426
|
-
* see [core_crypto::proteus::ProteusCentral::fingerprint_local]
|
436
|
+
* See [core_crypto::context::CentralContext::join_by_external_commit]
|
427
437
|
*/
|
428
|
-
|
438
|
+
join_by_external_commit(group_info: Uint8Array, custom_configuration: CustomConfiguration, credential_type: CredentialType): Promise<WelcomeBundle>;
|
429
439
|
/**
|
430
|
-
*
|
431
|
-
*
|
432
|
-
* See [core_crypto::context::CentralContext::proteus_fingerprint_remote]
|
440
|
+
* See [core_crypto::proteus::ProteusCentral::try_new]
|
433
441
|
*/
|
434
|
-
|
442
|
+
proteus_init(): Promise<void>;
|
435
443
|
/**
|
436
|
-
*
|
437
|
-
*
|
438
|
-
* See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
|
444
|
+
* See [core_crypto::context::CentralContext::proteus_session_from_prekey]
|
439
445
|
*/
|
440
|
-
|
446
|
+
proteus_session_from_prekey(session_id: string, prekey: Uint8Array): Promise<void>;
|
441
447
|
/**
|
442
|
-
*
|
443
|
-
*
|
444
|
-
* See [core_crypto::context::CentralContext::proteus_cryptobox_migrate]
|
448
|
+
* See [core_crypto::context::CentralContext::proteus_session_from_message]
|
445
449
|
*/
|
446
|
-
|
450
|
+
proteus_session_from_message(session_id: string, envelope: Uint8Array): Promise<Uint8Array>;
|
447
451
|
/**
|
448
|
-
*
|
449
|
-
*
|
450
|
-
* see [core_crypto::mls::context::CentralContext::e2ei_new_enrollment]
|
452
|
+
* See [core_crypto::context::CentralContext::proteus_session_save]
|
453
|
+
* **Note**: This isn't usually needed as persisting sessions happens automatically when decrypting/encrypting messages and initializing Sessions
|
451
454
|
*/
|
452
|
-
|
455
|
+
proteus_session_save(session_id: string): Promise<void>;
|
453
456
|
/**
|
454
|
-
*
|
455
|
-
*
|
456
|
-
* see [core_crypto::mls::context::CentralContext::e2ei_new_activation_enrollment]
|
457
|
+
* See [core_crypto::context::CentralContext::proteus_session_delete]
|
457
458
|
*/
|
458
|
-
|
459
|
+
proteus_session_delete(session_id: string): Promise<void>;
|
459
460
|
/**
|
460
|
-
*
|
461
|
-
*
|
462
|
-
* see [core_crypto::mls::context::CentralContext::e2ei_new_rotate_enrollment]
|
461
|
+
* See [core_crypto::context::CentralContext::proteus_session_exists]
|
463
462
|
*/
|
464
|
-
|
463
|
+
proteus_session_exists(session_id: string): Promise<boolean>;
|
465
464
|
/**
|
466
|
-
* See [core_crypto::
|
465
|
+
* See [core_crypto::context::CentralContext::proteus_decrypt]
|
467
466
|
*/
|
468
|
-
|
467
|
+
proteus_decrypt(session_id: string, ciphertext: Uint8Array): Promise<Uint8Array>;
|
469
468
|
/**
|
470
|
-
* See [core_crypto::
|
469
|
+
* See [core_crypto::context::CentralContext::proteus_encrypt]
|
471
470
|
*/
|
472
|
-
|
471
|
+
proteus_encrypt(session_id: string, plaintext: Uint8Array): Promise<Uint8Array>;
|
473
472
|
/**
|
474
|
-
* See [core_crypto::
|
473
|
+
* See [core_crypto::context::CentralContext::proteus_encrypt_batched]
|
475
474
|
*/
|
476
|
-
|
475
|
+
proteus_encrypt_batched(sessions: string[], plaintext: Uint8Array): Promise<Map<string, Uint8Array>>;
|
477
476
|
/**
|
478
|
-
* See [core_crypto::
|
477
|
+
* See [core_crypto::context::CentralContext::proteus_new_prekey]
|
479
478
|
*/
|
480
|
-
|
479
|
+
proteus_new_prekey(prekey_id: number): Promise<Uint8Array>;
|
481
480
|
/**
|
482
|
-
* See [core_crypto::
|
481
|
+
* See [core_crypto::context::CentralContext::proteus_new_prekey_auto]
|
483
482
|
*/
|
484
|
-
|
483
|
+
proteus_new_prekey_auto(): Promise<ProteusAutoPrekeyBundle>;
|
485
484
|
/**
|
486
|
-
*
|
485
|
+
* See [core_crypto::context::CentralContext::proteus_last_resort_prekey]
|
487
486
|
*/
|
488
|
-
|
487
|
+
proteus_last_resort_prekey(): Promise<Uint8Array>;
|
489
488
|
/**
|
490
|
-
*
|
491
|
-
*
|
492
|
-
* See [core_crypto::mls::conversation::ConversationGuard::e2ei_rotate]
|
489
|
+
* See [core_crypto::context::CentralContext::proteus_fingerprint]
|
493
490
|
*/
|
494
|
-
|
491
|
+
proteus_fingerprint(): Promise<string>;
|
495
492
|
/**
|
496
|
-
*
|
497
|
-
*
|
498
|
-
* see [core_crypto::mls::context::CentralContext::save_x509_credential]
|
493
|
+
* See [core_crypto::context::CentralContext::proteus_fingerprint_local]
|
499
494
|
*/
|
500
|
-
|
495
|
+
proteus_fingerprint_local(session_id: string): Promise<string>;
|
501
496
|
/**
|
502
|
-
*
|
503
|
-
*
|
504
|
-
* see [core_crypto::context::CentralContext::delete_stale_key_packages]
|
497
|
+
* See [core_crypto::context::CentralContext::proteus_fingerprint_remote]
|
505
498
|
*/
|
506
|
-
|
499
|
+
proteus_fingerprint_remote(session_id: string): Promise<string>;
|
507
500
|
/**
|
508
|
-
*
|
501
|
+
* See [core_crypto::context::CentralContext::proteus_cryptobox_migrate]
|
509
502
|
*/
|
510
|
-
|
503
|
+
proteus_cryptobox_migrate(path: string): Promise<void>;
|
511
504
|
/**
|
512
|
-
*
|
505
|
+
* See [core_crypto::context::CentralContext::proteus_reload_sessions]
|
513
506
|
*/
|
514
|
-
|
507
|
+
proteus_reload_sessions(): Promise<void>;
|
515
508
|
/**
|
516
|
-
*
|
517
|
-
*
|
518
|
-
* see [core_crypto::mls::conversation::ImmutableConversation::e2ei_conversation_state]
|
509
|
+
* See [core_crypto::proteus::ProteusCentral::last_resort_prekey_id]
|
519
510
|
*/
|
520
|
-
|
511
|
+
static proteus_last_resort_prekey_id(): number;
|
521
512
|
/**
|
522
|
-
*
|
523
|
-
*
|
524
|
-
* see [core_crypto::mls::context::CentralContext::e2ei_is_enabled]
|
513
|
+
* See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
|
525
514
|
*/
|
526
|
-
|
515
|
+
static proteus_fingerprint_prekeybundle(prekey: Uint8Array): string;
|
527
516
|
/**
|
528
|
-
*
|
529
|
-
*
|
530
|
-
* see [core_crypto::mls::context::CentralContext::get_device_identities]
|
517
|
+
* See [core_crypto::context::CentralContext::set_data].
|
531
518
|
*/
|
532
|
-
|
519
|
+
set_data(data: Uint8Array): Promise<void>;
|
533
520
|
/**
|
534
|
-
*
|
535
|
-
*
|
536
|
-
* see [core_crypto::mls::context::CentralContext::get_user_identities]
|
521
|
+
* See [core_crypto::context::CentralContext::get_data].
|
537
522
|
*/
|
538
|
-
|
523
|
+
get_data(): Promise<Uint8Array | undefined>;
|
539
524
|
/**
|
540
|
-
*
|
541
|
-
*
|
542
|
-
* see [core_crypto::mls::context::CentralContext::get_credential_in_use]
|
525
|
+
* see [core_crypto::mls::context::CentralContext::random_bytes]
|
543
526
|
*/
|
544
|
-
|
527
|
+
random_bytes(len: number): Promise<Uint8Array>;
|
545
528
|
}
|
546
|
-
declare class
|
529
|
+
declare class CrlRegistration {
|
547
530
|
free(): void;
|
548
|
-
constructor(
|
531
|
+
constructor(dirty: boolean, expiration?: bigint | null);
|
532
|
+
/**
|
533
|
+
* Whether this CRL modifies the old CRL (i.e. has a different revocated cert list)
|
534
|
+
*/
|
535
|
+
dirty: boolean;
|
536
|
+
/**
|
537
|
+
* Optional expiration timestamp
|
538
|
+
*/
|
539
|
+
get expiration(): bigint | undefined;
|
540
|
+
/**
|
541
|
+
* Optional expiration timestamp
|
542
|
+
*/
|
543
|
+
set expiration(value: bigint | null | undefined);
|
549
544
|
}
|
550
545
|
/**
|
551
546
|
* see [core_crypto::prelude::MlsCustomConfiguration]
|
552
547
|
*/
|
553
548
|
export class CustomConfiguration {
|
554
549
|
free(): void;
|
555
|
-
constructor(key_rotation_span?: number, wire_policy?: WirePolicy);
|
550
|
+
constructor(key_rotation_span?: number | null, wire_policy?: WirePolicy | null);
|
556
551
|
/**
|
557
552
|
* Duration in seconds after which we will automatically force a self-update commit
|
558
553
|
* Note: This isn't currently implemented
|
559
554
|
*/
|
560
|
-
keyRotationSpan
|
555
|
+
get keyRotationSpan(): number | undefined;
|
556
|
+
/**
|
557
|
+
* Duration in seconds after which we will automatically force a self-update commit
|
558
|
+
* Note: This isn't currently implemented
|
559
|
+
*/
|
560
|
+
set keyRotationSpan(value: number | null | undefined);
|
561
561
|
/**
|
562
562
|
* Defines if handshake messages are encrypted or not
|
563
563
|
* Note: encrypted handshake messages are not supported by wire-server
|
564
564
|
*/
|
565
|
-
wirePolicy
|
565
|
+
get wirePolicy(): WirePolicy | undefined;
|
566
|
+
/**
|
567
|
+
* Defines if handshake messages are encrypted or not
|
568
|
+
* Note: encrypted handshake messages are not supported by wire-server
|
569
|
+
*/
|
570
|
+
set wirePolicy(value: WirePolicy | null | undefined);
|
571
|
+
}
|
572
|
+
export class DatabaseKey {
|
573
|
+
free(): void;
|
574
|
+
constructor(buf: Uint8Array);
|
566
575
|
}
|
567
|
-
declare class
|
576
|
+
declare class DecryptedMessage {
|
577
|
+
private constructor();
|
578
|
+
free(): void;
|
579
|
+
readonly message: Uint8Array | undefined;
|
580
|
+
readonly proposals: ProposalBundle[];
|
581
|
+
/**
|
582
|
+
* It is set to false if ingesting this MLS message has resulted in the client being removed from the group (i.e. a Remove commit)
|
583
|
+
*/
|
584
|
+
readonly isActive: boolean;
|
585
|
+
/**
|
586
|
+
* Commit delay hint (in milliseconds) to prevent clients from hammering the server with epoch changes
|
587
|
+
*/
|
588
|
+
readonly commitDelay: bigint | undefined;
|
589
|
+
readonly senderClientId: ClientId | undefined;
|
590
|
+
/**
|
591
|
+
* true when the decrypted message resulted in an epoch change i.e. it was a commit
|
592
|
+
*
|
593
|
+
* Deprecated: this member will be removed in the future. Prefer using the `EpochObserver` interface.
|
594
|
+
*/
|
595
|
+
readonly hasEpochChanged: boolean;
|
596
|
+
readonly identity: WireIdentity;
|
597
|
+
readonly bufferedMessages: BufferedDecryptedMessage[] | undefined;
|
598
|
+
/**
|
599
|
+
* New CRL Distribution of members of this group
|
600
|
+
*/
|
601
|
+
readonly crlNewDistributionPoints: NewCrlDistributionPoints;
|
602
|
+
}
|
603
|
+
/**
|
604
|
+
* Dump of the PKI environemnt as PEM
|
605
|
+
*/
|
606
|
+
export class E2eiDumpedPkiEnv {
|
568
607
|
private constructor();
|
569
608
|
free(): void;
|
570
609
|
/**
|
@@ -574,85 +613,91 @@ declare class E2eiDumpedPkiEnv {
|
|
574
613
|
/**
|
575
614
|
* Intermediate CAs that are loaded
|
576
615
|
*/
|
577
|
-
readonly intermediates:
|
616
|
+
readonly intermediates: string[];
|
578
617
|
/**
|
579
618
|
* CRLs registered in the PKI env
|
580
619
|
*/
|
581
|
-
readonly crls:
|
620
|
+
readonly crls: string[];
|
582
621
|
}
|
583
622
|
declare class FfiWireE2EIdentity {
|
584
623
|
private constructor();
|
585
624
|
free(): void;
|
586
625
|
/**
|
587
|
-
* See [core_crypto::e2e_identity::
|
626
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::directory_response]
|
588
627
|
*/
|
589
|
-
directory_response(directory: Uint8Array): Promise<
|
628
|
+
directory_response(directory: Uint8Array): Promise<AcmeDirectory>;
|
590
629
|
/**
|
591
|
-
* See [core_crypto::e2e_identity::
|
630
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_account_request]
|
592
631
|
*/
|
593
|
-
new_account_request(previous_nonce: string): Promise<
|
632
|
+
new_account_request(previous_nonce: string): Promise<Uint8Array>;
|
594
633
|
/**
|
595
|
-
* See [core_crypto::e2e_identity::
|
634
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_account_response]
|
596
635
|
*/
|
597
|
-
new_account_response(account: Uint8Array): Promise<
|
636
|
+
new_account_response(account: Uint8Array): Promise<void>;
|
598
637
|
/**
|
599
|
-
* See [core_crypto::e2e_identity::
|
638
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_order_request]
|
600
639
|
*/
|
601
|
-
new_order_request(previous_nonce: string): Promise<
|
640
|
+
new_order_request(previous_nonce: string): Promise<Uint8Array>;
|
602
641
|
/**
|
603
|
-
* See [core_crypto::e2e_identity::
|
642
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_order_response]
|
604
643
|
*/
|
605
|
-
new_order_response(order: Uint8Array): Promise<
|
644
|
+
new_order_response(order: Uint8Array): Promise<NewAcmeOrder>;
|
606
645
|
/**
|
607
|
-
* See [core_crypto::e2e_identity::
|
646
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_authz_request]
|
608
647
|
*/
|
609
|
-
new_authz_request(url: string, previous_nonce: string): Promise<
|
648
|
+
new_authz_request(url: string, previous_nonce: string): Promise<Uint8Array>;
|
610
649
|
/**
|
611
|
-
* See [core_crypto::e2e_identity::
|
650
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_authz_response]
|
612
651
|
*/
|
613
|
-
new_authz_response(authz: Uint8Array): Promise<
|
652
|
+
new_authz_response(authz: Uint8Array): Promise<NewAcmeAuthz>;
|
614
653
|
/**
|
615
|
-
* See [core_crypto::e2e_identity::
|
654
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::create_dpop_token]
|
616
655
|
*/
|
617
|
-
create_dpop_token(expiry_secs: number, backend_nonce: string): Promise<
|
656
|
+
create_dpop_token(expiry_secs: number, backend_nonce: string): Promise<string>;
|
618
657
|
/**
|
619
|
-
* See [core_crypto::e2e_identity::
|
658
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_dpop_challenge_request]
|
620
659
|
*/
|
621
|
-
new_dpop_challenge_request(access_token: string, previous_nonce: string): Promise<
|
660
|
+
new_dpop_challenge_request(access_token: string, previous_nonce: string): Promise<Uint8Array>;
|
622
661
|
/**
|
623
|
-
* See [core_crypto::e2e_identity::
|
662
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_dpop_challenge_response]
|
624
663
|
*/
|
625
|
-
new_dpop_challenge_response(challenge: Uint8Array): Promise<
|
664
|
+
new_dpop_challenge_response(challenge: Uint8Array): Promise<void>;
|
626
665
|
/**
|
627
|
-
* See [core_crypto::e2e_identity::
|
666
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::check_order_request]
|
628
667
|
*/
|
629
|
-
|
668
|
+
check_order_request(order_url: string, previous_nonce: string): Promise<Uint8Array>;
|
630
669
|
/**
|
631
|
-
* See [core_crypto::e2e_identity::
|
670
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::check_order_response]
|
632
671
|
*/
|
633
|
-
|
672
|
+
check_order_response(order: Uint8Array): Promise<string>;
|
634
673
|
/**
|
635
|
-
* See [core_crypto::
|
674
|
+
* See [core_crypto::prelude::E2eiEnrollment::finalize_request]
|
636
675
|
*/
|
637
|
-
|
676
|
+
finalize_request(previous_nonce: string): Promise<Uint8Array>;
|
638
677
|
/**
|
639
|
-
* See [core_crypto::
|
678
|
+
* See [core_crypto::prelude::E2eiEnrollment::finalize_response]
|
640
679
|
*/
|
641
|
-
|
680
|
+
finalize_response(finalize: Uint8Array): Promise<string>;
|
642
681
|
/**
|
643
|
-
* See [core_crypto::
|
682
|
+
* See [core_crypto::prelude::E2eiEnrollment::certificate_request]
|
644
683
|
*/
|
645
|
-
|
684
|
+
certificate_request(previous_nonce: string): Promise<Uint8Array>;
|
646
685
|
/**
|
647
|
-
* See [core_crypto::e2e_identity::
|
686
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_oidc_challenge_request]
|
648
687
|
*/
|
649
|
-
|
688
|
+
new_oidc_challenge_request(id_token: string, previous_nonce: string): Promise<Uint8Array>;
|
650
689
|
/**
|
651
|
-
* See [core_crypto::e2e_identity::
|
690
|
+
* See [core_crypto::e2e_identity::E2eiEnrollment::new_oidc_challenge_response]
|
652
691
|
*/
|
653
|
-
|
692
|
+
new_oidc_challenge_response(challenge: Uint8Array): Promise<void>;
|
654
693
|
}
|
655
|
-
|
694
|
+
/**
|
695
|
+
* Result of an authorization creation.
|
696
|
+
*
|
697
|
+
* - See https://www.rfc-editor.org/rfc/rfc8555.html#section-7.5
|
698
|
+
* - See [core_crypto::e2e_identity::types::E2eiNewAcmeAuthz]
|
699
|
+
*/
|
700
|
+
export class NewAcmeAuthz {
|
656
701
|
private constructor();
|
657
702
|
free(): void;
|
658
703
|
/**
|
@@ -668,30 +713,70 @@ declare class NewAcmeAuthz {
|
|
668
713
|
*/
|
669
714
|
readonly challenge: AcmeChallenge;
|
670
715
|
}
|
671
|
-
|
716
|
+
/**
|
717
|
+
* Result of an order creation.
|
718
|
+
*
|
719
|
+
* - See https://www.rfc-editor.org/rfc/rfc8555.html#section-7.4
|
720
|
+
* - See [core_crypto::e2e_identity::types::E2eiNewAcmeOrder]
|
721
|
+
*/
|
722
|
+
export class NewAcmeOrder {
|
723
|
+
private constructor();
|
724
|
+
free(): void;
|
725
|
+
readonly delegate: Uint8Array;
|
726
|
+
readonly authorizations: string[];
|
727
|
+
}
|
728
|
+
declare class NewCrlDistributionPoints {
|
729
|
+
private constructor();
|
730
|
+
free(): void;
|
731
|
+
as_strings(): string[] | undefined;
|
732
|
+
}
|
733
|
+
declare class ProposalBundle {
|
672
734
|
private constructor();
|
673
735
|
free(): void;
|
674
|
-
readonly authorizations: (Uint8Array)[];
|
675
736
|
/**
|
676
|
-
*
|
737
|
+
* TLS-serialized MLS proposal that needs to be fanned out to other (existing) members of the conversation
|
677
738
|
*/
|
678
|
-
|
739
|
+
proposal: Uint8Array;
|
740
|
+
/**
|
741
|
+
* Unique identifier of a proposal.
|
742
|
+
*/
|
743
|
+
proposal_ref: Uint8Array;
|
744
|
+
/**
|
745
|
+
* New CRL Distribution of members of this group
|
746
|
+
*/
|
747
|
+
get crl_new_distribution_points(): string[] | undefined;
|
748
|
+
/**
|
749
|
+
* New CRL Distribution of members of this group
|
750
|
+
*/
|
751
|
+
set crl_new_distribution_points(value: string[] | null | undefined);
|
679
752
|
}
|
753
|
+
declare class ProteusAutoPrekeyBundle {
|
754
|
+
private constructor();
|
755
|
+
free(): void;
|
756
|
+
readonly id: number;
|
757
|
+
readonly pkb: Uint8Array;
|
758
|
+
}
|
759
|
+
/**
|
760
|
+
* see [core_crypto::prelude::MlsConversationCreationMessage]
|
761
|
+
*/
|
680
762
|
export class WelcomeBundle {
|
681
763
|
private constructor();
|
682
764
|
free(): void;
|
683
765
|
/**
|
684
766
|
* Identifier of the joined conversation
|
685
767
|
*/
|
686
|
-
|
768
|
+
id: Uint8Array;
|
769
|
+
/**
|
770
|
+
* New CRL Distribution of members of this group
|
771
|
+
*/
|
772
|
+
get crl_new_distribution_points(): string[] | undefined;
|
687
773
|
/**
|
688
774
|
* New CRL Distribution of members of this group
|
689
775
|
*/
|
690
|
-
|
776
|
+
set crl_new_distribution_points(value: string[] | null | undefined);
|
691
777
|
}
|
692
778
|
/**
|
693
|
-
*
|
694
|
-
* Those claims are verifiable by any member in the group
|
779
|
+
* See [core_crypto::prelude::WireIdentity]
|
695
780
|
*/
|
696
781
|
export class WireIdentity {
|
697
782
|
private constructor();
|
@@ -703,49 +788,27 @@ export class WireIdentity {
|
|
703
788
|
/**
|
704
789
|
* Status of the Credential at the moment this object is created
|
705
790
|
*/
|
706
|
-
readonly status:
|
791
|
+
readonly status: DeviceStatus;
|
707
792
|
/**
|
708
793
|
* MLS thumbprint
|
709
794
|
*/
|
710
795
|
readonly thumbprint: string;
|
711
|
-
|
796
|
+
credentialType: CredentialType;
|
712
797
|
readonly x509Identity: X509Identity | undefined;
|
713
798
|
}
|
714
799
|
/**
|
715
|
-
*
|
716
|
-
* Those claims are verifiable by any member in the group
|
800
|
+
* See [core_crypto::prelude::X509Identity]
|
717
801
|
*/
|
718
802
|
export class X509Identity {
|
719
803
|
private constructor();
|
720
804
|
free(): void;
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
readonly displayName: string;
|
729
|
-
/**
|
730
|
-
* DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
|
731
|
-
*/
|
732
|
-
readonly domain: string;
|
733
|
-
/**
|
734
|
-
* X509 certificate identifying this client in the MLS group ; PEM encoded
|
735
|
-
*/
|
736
|
-
readonly certificate: string;
|
737
|
-
/**
|
738
|
-
* X509 certificate serial number
|
739
|
-
*/
|
740
|
-
readonly serialNumber: string;
|
741
|
-
/**
|
742
|
-
* X509 certificate not before as Unix timestamp
|
743
|
-
*/
|
744
|
-
readonly notBefore: bigint;
|
745
|
-
/**
|
746
|
-
* X509 certificate not after as Unix timestamp
|
747
|
-
*/
|
748
|
-
readonly notAfter: bigint;
|
805
|
+
handle: string;
|
806
|
+
display_name: string;
|
807
|
+
domain: string;
|
808
|
+
certificate: string;
|
809
|
+
serial_number: string;
|
810
|
+
not_before: bigint;
|
811
|
+
not_after: bigint;
|
749
812
|
}
|
750
813
|
interface ConversationConfiguration$1 {
|
751
814
|
/**
|
@@ -791,29 +854,6 @@ export declare class CoreCryptoError extends Error {
|
|
791
854
|
static fromStdError(e: Error): CoreCryptoError | Error;
|
792
855
|
static asyncMapErr<T>(p: Promise<T>): Promise<T>;
|
793
856
|
}
|
794
|
-
declare enum CredentialType$1 {
|
795
|
-
/**
|
796
|
-
* Just a KeyPair
|
797
|
-
*/
|
798
|
-
Basic = 1,
|
799
|
-
/**
|
800
|
-
* A certificate obtained through e2e identity enrollment process
|
801
|
-
*/
|
802
|
-
X509 = 2
|
803
|
-
}
|
804
|
-
/**
|
805
|
-
* see [core_crypto::prelude::MlsWirePolicy]
|
806
|
-
*/
|
807
|
-
declare enum WirePolicy$1 {
|
808
|
-
/**
|
809
|
-
* Handshake messages are never encrypted
|
810
|
-
*/
|
811
|
-
Plaintext = 1,
|
812
|
-
/**
|
813
|
-
* Handshake messages are always encrypted
|
814
|
-
*/
|
815
|
-
Ciphertext = 2
|
816
|
-
}
|
817
857
|
/**
|
818
858
|
* Alias for conversation IDs.
|
819
859
|
* This is a freeform, uninspected buffer.
|
@@ -823,7 +863,7 @@ export type ConversationId = Uint8Array;
|
|
823
863
|
* Alias for client identifier.
|
824
864
|
* This is a freeform, uninspected buffer.
|
825
865
|
*/
|
826
|
-
|
866
|
+
type ClientId$1 = Uint8Array;
|
827
867
|
/**
|
828
868
|
* Alias for proposal reference. It is a byte array of size 16.
|
829
869
|
*/
|
@@ -859,52 +899,20 @@ export interface GroupInfoBundle {
|
|
859
899
|
/**
|
860
900
|
* see {@link GroupInfoEncryptionType}
|
861
901
|
*/
|
862
|
-
encryptionType:
|
902
|
+
encryptionType: MlsGroupInfoEncryptionType;
|
863
903
|
/**
|
864
904
|
* see {@link RatchetTreeType}
|
865
905
|
*/
|
866
|
-
ratchetTreeType:
|
906
|
+
ratchetTreeType: MlsRatchetTreeType;
|
867
907
|
/**
|
868
908
|
* TLS-serialized GroupInfo
|
869
909
|
*/
|
870
910
|
payload: Uint8Array;
|
871
911
|
}
|
872
|
-
/**
|
873
|
-
* Informs whether the GroupInfo is confidential
|
874
|
-
* see [core_crypto::mls::conversation::group_info::GroupInfoEncryptionType]
|
875
|
-
*/
|
876
|
-
export declare enum GroupInfoEncryptionType {
|
877
|
-
/**
|
878
|
-
* Unencrypted
|
879
|
-
*/
|
880
|
-
Plaintext = 1,
|
881
|
-
/**
|
882
|
-
* Encrypted in a JWE (not yet implemented)
|
883
|
-
*/
|
884
|
-
JweEncrypted = 2
|
885
|
-
}
|
886
|
-
/**
|
887
|
-
* Represents different ways of carrying the Ratchet Tree with some optimizations to save some space
|
888
|
-
* see [core_crypto::mls::conversation::group_info::RatchetTreeType]
|
889
|
-
*/
|
890
|
-
export declare enum RatchetTreeType {
|
891
|
-
/**
|
892
|
-
* Complete GroupInfo
|
893
|
-
*/
|
894
|
-
Full = 1,
|
895
|
-
/**
|
896
|
-
* Contains the difference since previous epoch (not yet implemented)
|
897
|
-
*/
|
898
|
-
Delta = 2,
|
899
|
-
/**
|
900
|
-
* To define (not yet implemented)
|
901
|
-
*/
|
902
|
-
ByRef = 3
|
903
|
-
}
|
904
912
|
/**
|
905
913
|
* This is a wrapper for all the possible outcomes you can get after decrypting a message
|
906
914
|
*/
|
907
|
-
|
915
|
+
interface DecryptedMessage$1 {
|
908
916
|
/**
|
909
917
|
* Raw decrypted application message, if the decrypted MLS message is an application message
|
910
918
|
*/
|
@@ -915,7 +923,7 @@ export interface DecryptedMessage {
|
|
915
923
|
* * local pending proposal not in the accepted commit
|
916
924
|
* * If there is a pending commit, its proposals which are not in the accepted commit
|
917
925
|
*/
|
918
|
-
proposals: ProposalBundle[];
|
926
|
+
proposals: ProposalBundle$1[];
|
919
927
|
/**
|
920
928
|
* It is set to false if ingesting this MLS message has resulted in the client being removed from the group (i.e. a Remove commit)
|
921
929
|
*/
|
@@ -927,7 +935,7 @@ export interface DecryptedMessage {
|
|
927
935
|
/**
|
928
936
|
* Client identifier of the sender of the message being decrypted. Only present for application messages.
|
929
937
|
*/
|
930
|
-
senderClientId?: ClientId;
|
938
|
+
senderClientId?: ClientId$1;
|
931
939
|
/**
|
932
940
|
* true when the decrypted message resulted in an epoch change i.e. it was a commit
|
933
941
|
*/
|
@@ -943,7 +951,7 @@ export interface DecryptedMessage {
|
|
943
951
|
* Contains buffered messages for next epoch which were received before the commit creating the epoch
|
944
952
|
* because the DS did not fan them out in order.
|
945
953
|
*/
|
946
|
-
bufferedMessages?: BufferedDecryptedMessage[];
|
954
|
+
bufferedMessages?: BufferedDecryptedMessage$1[];
|
947
955
|
/**
|
948
956
|
* New CRL distribution points that appeared by the introduction of a new credential
|
949
957
|
*/
|
@@ -952,7 +960,7 @@ export interface DecryptedMessage {
|
|
952
960
|
/**
|
953
961
|
* Almost same as {@link DecryptedMessage} but avoids recursion
|
954
962
|
*/
|
955
|
-
|
963
|
+
interface BufferedDecryptedMessage$1 {
|
956
964
|
/**
|
957
965
|
* see {@link DecryptedMessage.message}
|
958
966
|
*/
|
@@ -960,7 +968,7 @@ export interface BufferedDecryptedMessage {
|
|
960
968
|
/**
|
961
969
|
* see {@link DecryptedMessage.proposals}
|
962
970
|
*/
|
963
|
-
proposals: ProposalBundle[];
|
971
|
+
proposals: ProposalBundle$1[];
|
964
972
|
/**
|
965
973
|
* see {@link DecryptedMessage.isActive}
|
966
974
|
*/
|
@@ -972,7 +980,7 @@ export interface BufferedDecryptedMessage {
|
|
972
980
|
/**
|
973
981
|
* see {@link DecryptedMessage.senderClientId}
|
974
982
|
*/
|
975
|
-
senderClientId?: ClientId;
|
983
|
+
senderClientId?: ClientId$1;
|
976
984
|
/**
|
977
985
|
* see {@link DecryptedMessage.hasEpochChanged}
|
978
986
|
*/
|
@@ -986,28 +994,10 @@ export interface BufferedDecryptedMessage {
|
|
986
994
|
*/
|
987
995
|
crlNewDistributionPoints?: string[];
|
988
996
|
}
|
989
|
-
/**
|
990
|
-
* Indicates the standalone status of a device Credential in a MLS group at a moment T.
|
991
|
-
* This does not represent the states where a device is not using MLS or is not using end-to-end identity
|
992
|
-
*/
|
993
|
-
export declare enum DeviceStatus {
|
994
|
-
/**
|
995
|
-
* All is fine
|
996
|
-
*/
|
997
|
-
Valid = 1,
|
998
|
-
/**
|
999
|
-
* The Credential's certificate is expired
|
1000
|
-
*/
|
1001
|
-
Expired = 2,
|
1002
|
-
/**
|
1003
|
-
* The Credential's certificate is revoked
|
1004
|
-
*/
|
1005
|
-
Revoked = 3
|
1006
|
-
}
|
1007
997
|
/**
|
1008
998
|
* Returned by all methods creating proposals. Contains a proposal message and an identifier to roll back the proposal
|
1009
999
|
*/
|
1010
|
-
|
1000
|
+
interface ProposalBundle$1 {
|
1011
1001
|
/**
|
1012
1002
|
* TLS-serialized MLS proposal that needs to be fanned out to other (existing) members of the conversation
|
1013
1003
|
*
|
@@ -1074,7 +1064,7 @@ export interface CRLRegistration {
|
|
1074
1064
|
*/
|
1075
1065
|
expiration?: number;
|
1076
1066
|
}
|
1077
|
-
|
1067
|
+
interface AcmeDirectory$1 {
|
1078
1068
|
/**
|
1079
1069
|
* URL for fetching a new nonce. Use this only for creating a new account.
|
1080
1070
|
*/
|
@@ -1095,12 +1085,12 @@ export interface AcmeDirectory {
|
|
1095
1085
|
/**
|
1096
1086
|
* Returned by APIs whose code paths potentially discover new certificate revocation list distribution URLs.
|
1097
1087
|
*/
|
1098
|
-
|
1088
|
+
type NewCrlDistributionPoints$1 = string[] | undefined;
|
1099
1089
|
export type JsonRawData = Uint8Array;
|
1100
1090
|
export declare class E2eiEnrollment {
|
1101
1091
|
#private;
|
1102
1092
|
/** @hidden */
|
1103
|
-
constructor(e2ei:
|
1093
|
+
constructor(e2ei: FfiWireE2EIdentity);
|
1104
1094
|
free(): void;
|
1105
1095
|
/**
|
1106
1096
|
* Should only be used internally
|
@@ -1114,7 +1104,7 @@ export declare class E2eiEnrollment {
|
|
1114
1104
|
* @param directory HTTP response body
|
1115
1105
|
* @see https://www.rfc-editor.org/rfc/rfc8555.html#section-7.1.1
|
1116
1106
|
*/
|
1117
|
-
directoryResponse(directory: JsonRawData): Promise<AcmeDirectory>;
|
1107
|
+
directoryResponse(directory: JsonRawData): Promise<AcmeDirectory$1>;
|
1118
1108
|
/**
|
1119
1109
|
* For creating a new acme account. This returns a signed JWS-alike request body to send to
|
1120
1110
|
* `POST /acme/{provisioner-name}/new-account`.
|
@@ -1245,7 +1235,7 @@ export declare class E2eiEnrollment {
|
|
1245
1235
|
* Note: this does not check pending state (pending commit, pending proposals) so it does not
|
1246
1236
|
* consider members about to be added/removed
|
1247
1237
|
*/
|
1248
|
-
|
1238
|
+
declare enum E2eiConversationState$1 {
|
1249
1239
|
/**
|
1250
1240
|
* All clients have a valid E2EI certificate
|
1251
1241
|
*/
|
@@ -1262,7 +1252,7 @@ export declare enum E2eiConversationState {
|
|
1262
1252
|
/**
|
1263
1253
|
* Data shape for proteusNewPrekeyAuto() call returns.
|
1264
1254
|
*/
|
1265
|
-
|
1255
|
+
interface ProteusAutoPrekeyBundle$1 {
|
1266
1256
|
/**
|
1267
1257
|
* Proteus PreKey id
|
1268
1258
|
*
|
@@ -1300,7 +1290,7 @@ declare class CoreCryptoContext$1 {
|
|
1300
1290
|
* @param ciphersuites - All the ciphersuites supported by this MLS client
|
1301
1291
|
* @param nbKeyPackage - number of initial KeyPackage to create when initializing the client
|
1302
1292
|
*/
|
1303
|
-
mlsInit(clientId: ClientId, ciphersuites: Ciphersuite[], nbKeyPackage?: number): Promise<void>;
|
1293
|
+
mlsInit(clientId: ClientId$1, ciphersuites: Ciphersuite[], nbKeyPackage?: number): Promise<void>;
|
1304
1294
|
/**
|
1305
1295
|
* Generates a MLS KeyPair/CredentialBundle with a temporary, random client ID.
|
1306
1296
|
* This method is designed to be used in conjunction with {@link CoreCryptoContext.mlsInitWithClientId} and represents the first step in this process
|
@@ -1318,7 +1308,7 @@ declare class CoreCryptoContext$1 {
|
|
1318
1308
|
* @param signaturePublicKeys - The public key you were given at the first step; This is for authentication purposes
|
1319
1309
|
* @param ciphersuites - All the ciphersuites supported by this MLS client
|
1320
1310
|
*/
|
1321
|
-
mlsInitWithClientId(clientId: ClientId, signaturePublicKeys: Uint8Array[], ciphersuites: Ciphersuite[]): Promise<void>;
|
1311
|
+
mlsInitWithClientId(clientId: ClientId$1, signaturePublicKeys: Uint8Array[], ciphersuites: Ciphersuite[]): Promise<void>;
|
1322
1312
|
/**
|
1323
1313
|
* Checks if the Client is member of a given conversation and if the MLS Group is loaded up
|
1324
1314
|
*
|
@@ -1378,9 +1368,8 @@ declare class CoreCryptoContext$1 {
|
|
1378
1368
|
* @param configuration - configuration of the MLS group
|
1379
1369
|
* @param configuration.ciphersuite - The {@link Ciphersuite} that is chosen to be the group's
|
1380
1370
|
* @param configuration.externalSenders - Array of Client IDs that are qualified as external senders within the group
|
1381
|
-
* @param configuration.custom - {@link CustomConfiguration}
|
1382
1371
|
*/
|
1383
|
-
createConversation(conversationId: ConversationId, creatorCredentialType: CredentialType
|
1372
|
+
createConversation(conversationId: ConversationId, creatorCredentialType: CredentialType, configuration?: ConversationConfiguration$1): Promise<void>;
|
1384
1373
|
/**
|
1385
1374
|
* Decrypts a message for a given conversation.
|
1386
1375
|
*
|
@@ -1394,7 +1383,7 @@ declare class CoreCryptoContext$1 {
|
|
1394
1383
|
*
|
1395
1384
|
* @returns a {@link DecryptedMessage}. Note that {@link DecryptedMessage#message} is `undefined` when the encrypted payload contains a system message such a proposal or commit
|
1396
1385
|
*/
|
1397
|
-
decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage>;
|
1386
|
+
decryptMessage(conversationId: ConversationId, payload: Uint8Array): Promise<DecryptedMessage$1>;
|
1398
1387
|
/**
|
1399
1388
|
* Encrypts a message for a given conversation
|
1400
1389
|
*
|
@@ -1423,14 +1412,14 @@ declare class CoreCryptoContext$1 {
|
|
1423
1412
|
* @param credentialType - of the public key to look for
|
1424
1413
|
* @returns the client's public signature key
|
1425
1414
|
*/
|
1426
|
-
clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType
|
1415
|
+
clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType): Promise<Uint8Array>;
|
1427
1416
|
/**
|
1428
1417
|
*
|
1429
1418
|
* @param ciphersuite - of the KeyPackages to count
|
1430
1419
|
* @param credentialType - of the KeyPackages to count
|
1431
1420
|
* @returns The amount of valid, non-expired KeyPackages that are persisted in the backing storage
|
1432
1421
|
*/
|
1433
|
-
clientValidKeypackagesCount(ciphersuite: Ciphersuite, credentialType: CredentialType
|
1422
|
+
clientValidKeypackagesCount(ciphersuite: Ciphersuite, credentialType: CredentialType): Promise<number>;
|
1434
1423
|
/**
|
1435
1424
|
* Fetches a requested amount of keypackages
|
1436
1425
|
*
|
@@ -1439,7 +1428,7 @@ declare class CoreCryptoContext$1 {
|
|
1439
1428
|
* @param amountRequested - The amount of keypackages requested
|
1440
1429
|
* @returns An array of length `amountRequested` containing TLS-serialized KeyPackages
|
1441
1430
|
*/
|
1442
|
-
clientKeypackages(ciphersuite: Ciphersuite, credentialType: CredentialType
|
1431
|
+
clientKeypackages(ciphersuite: Ciphersuite, credentialType: CredentialType, amountRequested: number): Promise<Array<Uint8Array>>;
|
1443
1432
|
/**
|
1444
1433
|
* Prunes local KeyPackages after making sure they also have been deleted on the backend side
|
1445
1434
|
* You should only use this after calling {@link CoreCryptoContext.e2eiRotate} on all conversations.
|
@@ -1457,7 +1446,7 @@ declare class CoreCryptoContext$1 {
|
|
1457
1446
|
*
|
1458
1447
|
* @returns Potentially a list of newly discovered crl distribution points
|
1459
1448
|
*/
|
1460
|
-
addClientsToConversation(conversationId: ConversationId, keyPackages: Uint8Array[]): Promise<NewCrlDistributionPoints>;
|
1449
|
+
addClientsToConversation(conversationId: ConversationId, keyPackages: Uint8Array[]): Promise<NewCrlDistributionPoints$1>;
|
1461
1450
|
/**
|
1462
1451
|
* Removes the provided clients from a conversation; Assuming those clients exist and the current client is allowed
|
1463
1452
|
* to do so, otherwise this operation does nothing.
|
@@ -1465,7 +1454,7 @@ declare class CoreCryptoContext$1 {
|
|
1465
1454
|
* @param conversationId - The ID of the conversation
|
1466
1455
|
* @param clientIds - Array of Client IDs to remove.
|
1467
1456
|
*/
|
1468
|
-
removeClientsFromConversation(conversationId: ConversationId, clientIds: ClientId[]): Promise<void>;
|
1457
|
+
removeClientsFromConversation(conversationId: ConversationId, clientIds: ClientId$1[]): Promise<void>;
|
1469
1458
|
/**
|
1470
1459
|
* Update the keying material of the conversation.
|
1471
1460
|
*
|
@@ -1495,7 +1484,7 @@ declare class CoreCryptoContext$1 {
|
|
1495
1484
|
*
|
1496
1485
|
* @return see {@link WelcomeBundle}
|
1497
1486
|
*/
|
1498
|
-
joinByExternalCommit(groupInfo: Uint8Array, credentialType: CredentialType
|
1487
|
+
joinByExternalCommit(groupInfo: Uint8Array, credentialType: CredentialType, configuration?: Partial<CustomConfiguration>): Promise<WelcomeBundle>;
|
1499
1488
|
/**
|
1500
1489
|
* Derives a new key from the group
|
1501
1490
|
*
|
@@ -1522,7 +1511,7 @@ declare class CoreCryptoContext$1 {
|
|
1522
1511
|
*
|
1523
1512
|
* @returns A list of clients from the members of the group
|
1524
1513
|
*/
|
1525
|
-
getClientIds(conversationId: ConversationId): Promise<ClientId[]>;
|
1514
|
+
getClientIds(conversationId: ConversationId): Promise<ClientId$1[]>;
|
1526
1515
|
/**
|
1527
1516
|
* Allows {@link CoreCryptoContext} to act as a CSPRNG provider
|
1528
1517
|
*
|
@@ -1613,7 +1602,7 @@ declare class CoreCryptoContext$1 {
|
|
1613
1602
|
*
|
1614
1603
|
* @returns A CBOR-serialized version of the PreKeyBundle corresponding to the newly generated and stored PreKey accompanied by its ID
|
1615
1604
|
*/
|
1616
|
-
proteusNewPrekeyAuto(): Promise<ProteusAutoPrekeyBundle>;
|
1605
|
+
proteusNewPrekeyAuto(): Promise<ProteusAutoPrekeyBundle$1>;
|
1617
1606
|
/**
|
1618
1607
|
* Proteus last resort prekey stuff
|
1619
1608
|
*
|
@@ -1707,7 +1696,7 @@ declare class CoreCryptoContext$1 {
|
|
1707
1696
|
* @param nbKeyPackage - number of initial KeyPackage to create when initializing the client
|
1708
1697
|
* @returns a MlsClient initialized with only a x509 credential
|
1709
1698
|
*/
|
1710
|
-
e2eiMlsInitOnly(enrollment: E2eiEnrollment, certificateChain: string, nbKeyPackage?: number): Promise<NewCrlDistributionPoints>;
|
1699
|
+
e2eiMlsInitOnly(enrollment: E2eiEnrollment, certificateChain: string, nbKeyPackage?: number): Promise<NewCrlDistributionPoints$1>;
|
1711
1700
|
/**
|
1712
1701
|
* Dumps the PKI environment as PEM
|
1713
1702
|
*
|
@@ -1735,7 +1724,7 @@ declare class CoreCryptoContext$1 {
|
|
1735
1724
|
*
|
1736
1725
|
* @param certPEM - PEM certificate to register as an Intermediate CA
|
1737
1726
|
*/
|
1738
|
-
e2eiRegisterIntermediateCA(certPEM: string): Promise<NewCrlDistributionPoints>;
|
1727
|
+
e2eiRegisterIntermediateCA(certPEM: string): Promise<NewCrlDistributionPoints$1>;
|
1739
1728
|
/**
|
1740
1729
|
* Registers a CRL for the use in E2EI processing.
|
1741
1730
|
*
|
@@ -1777,7 +1766,7 @@ declare class CoreCryptoContext$1 {
|
|
1777
1766
|
* @param certificateChain - the raw response from ACME server
|
1778
1767
|
* @returns Potentially a list of new crl distribution points discovered in the certificate chain
|
1779
1768
|
*/
|
1780
|
-
saveX509Credential(enrollment: E2eiEnrollment, certificateChain: string): Promise<NewCrlDistributionPoints>;
|
1769
|
+
saveX509Credential(enrollment: E2eiEnrollment, certificateChain: string): Promise<NewCrlDistributionPoints$1>;
|
1781
1770
|
/**
|
1782
1771
|
* Deletes all key packages whose credential does not match the most recently
|
1783
1772
|
* saved x509 credential and the provided signature scheme.
|
@@ -1806,7 +1795,7 @@ declare class CoreCryptoContext$1 {
|
|
1806
1795
|
* @param conversationId The group's ID
|
1807
1796
|
* @returns the conversation state given current members
|
1808
1797
|
*/
|
1809
|
-
e2eiConversationState(conversationId: ConversationId): Promise<E2eiConversationState>;
|
1798
|
+
e2eiConversationState(conversationId: ConversationId): Promise<E2eiConversationState$1>;
|
1810
1799
|
/**
|
1811
1800
|
* Returns true when end-to-end-identity is enabled for the given Ciphersuite
|
1812
1801
|
*
|
@@ -1822,7 +1811,7 @@ declare class CoreCryptoContext$1 {
|
|
1822
1811
|
* @param deviceIds - identifiers of the devices
|
1823
1812
|
* @returns identities or if no member has a x509 certificate, it will return an empty List
|
1824
1813
|
*/
|
1825
|
-
getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId[]): Promise<WireIdentity[]>;
|
1814
|
+
getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId$1[]): Promise<WireIdentity[]>;
|
1826
1815
|
/**
|
1827
1816
|
* From a given conversation, get the identity of the users (device holders) supplied.
|
1828
1817
|
* Identity is only present for devices with a Certificate Credential (after turning on end-to-end identity).
|
@@ -1841,7 +1830,7 @@ declare class CoreCryptoContext$1 {
|
|
1841
1830
|
* @param credentialType - kind of Credential to check usage of. Defaults to X509 for now as no other value will give any result.
|
1842
1831
|
* @returns see {@link E2eiConversationState}
|
1843
1832
|
*/
|
1844
|
-
getCredentialInUse(groupInfo: Uint8Array, credentialType?: CredentialType
|
1833
|
+
getCredentialInUse(groupInfo: Uint8Array, credentialType?: CredentialType): Promise<E2eiConversationState$1>;
|
1845
1834
|
}
|
1846
1835
|
/**
|
1847
1836
|
* Params for CoreCrypto deferred initialization
|
@@ -1856,7 +1845,7 @@ export interface CoreCryptoDeferredParams {
|
|
1856
1845
|
* Encryption master key
|
1857
1846
|
* This should be appropriately stored in a secure location (i.e. WebCrypto private key storage)
|
1858
1847
|
*/
|
1859
|
-
key:
|
1848
|
+
key: DatabaseKey;
|
1860
1849
|
/**
|
1861
1850
|
* External PRNG entropy pool seed.
|
1862
1851
|
* This **must** be exactly 32 bytes
|
@@ -1876,7 +1865,7 @@ export interface CoreCryptoParams extends CoreCryptoDeferredParams {
|
|
1876
1865
|
* MLS Client ID.
|
1877
1866
|
* This should stay consistent as it will be verified against the stored signature & identity to validate the persisted credential
|
1878
1867
|
*/
|
1879
|
-
clientId: ClientId;
|
1868
|
+
clientId: ClientId$1;
|
1880
1869
|
/**
|
1881
1870
|
* All the ciphersuites this MLS client can support
|
1882
1871
|
*/
|
@@ -1896,7 +1885,7 @@ export interface EpochObserver {
|
|
1896
1885
|
*
|
1897
1886
|
* @param logger - the interface to be called when something is going to be logged
|
1898
1887
|
**/
|
1899
|
-
export declare function setLogger(logger: CoreCryptoLogger
|
1888
|
+
export declare function setLogger(logger: CoreCryptoLogger): void;
|
1900
1889
|
/**
|
1901
1890
|
* An interface to register a logger in CoreCrypto
|
1902
1891
|
**/
|
@@ -1947,7 +1936,7 @@ export declare class CoreCrypto {
|
|
1947
1936
|
* Should only be used internally
|
1948
1937
|
*/
|
1949
1938
|
inner(): unknown;
|
1950
|
-
static setLogger(logger:
|
1939
|
+
static setLogger(logger: CoreCryptoLogger): void;
|
1951
1940
|
static setMaxLogLevel(level: CoreCryptoLogLevel): void;
|
1952
1941
|
/**
|
1953
1942
|
* This is your entrypoint to initialize {@link CoreCrypto}!
|
@@ -2003,11 +1992,23 @@ export declare class CoreCrypto {
|
|
2003
1992
|
transaction<R>(callback: (ctx: CoreCryptoContext$1) => Promise<R>): Promise<R>;
|
2004
1993
|
/** @hidden */
|
2005
1994
|
private constructor();
|
1995
|
+
/**
|
1996
|
+
* If this returns `false` you **cannot** call {@link CoreCrypto.close} as it will produce an error because of the
|
1997
|
+
* outstanding references that were detected.
|
1998
|
+
*
|
1999
|
+
* As always with this kind of thing, beware TOCTOU.
|
2000
|
+
*
|
2001
|
+
* @returns whether the CoreCrypto instance can currently close.
|
2002
|
+
*/
|
2003
|
+
canClose(): Promise<boolean>;
|
2006
2004
|
/**
|
2007
2005
|
* If this returns `true` you **cannot** call {@link CoreCrypto.close} as it will produce an error because of the
|
2008
2006
|
* outstanding references that were detected.
|
2009
2007
|
*
|
2010
|
-
*
|
2008
|
+
* This will never return `true` as we need an async method to accurately determine whether or not this can close.
|
2009
|
+
*
|
2010
|
+
* @returns false
|
2011
|
+
* @deprecated prefer {@link CoreCrypto.canClose}
|
2011
2012
|
*/
|
2012
2013
|
isLocked(): boolean;
|
2013
2014
|
/**
|
@@ -2021,8 +2022,9 @@ export declare class CoreCrypto {
|
|
2021
2022
|
* a commit bundle or a message, respectively.
|
2022
2023
|
*
|
2023
2024
|
* @param transportProvider - Any implementor of the {@link MlsTransport} interface
|
2025
|
+
* @param _ctx - unused
|
2024
2026
|
*/
|
2025
|
-
provideTransport(transportProvider: MlsTransport,
|
2027
|
+
provideTransport(transportProvider: MlsTransport, _ctx?: unknown): Promise<void>;
|
2026
2028
|
/**
|
2027
2029
|
* See {@link CoreCryptoContext.conversationExists}.
|
2028
2030
|
*/
|
@@ -2053,7 +2055,7 @@ export declare class CoreCrypto {
|
|
2053
2055
|
* @param credentialType - of the public key to look for
|
2054
2056
|
* @returns the client's public signature key
|
2055
2057
|
*/
|
2056
|
-
clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType
|
2058
|
+
clientPublicKey(ciphersuite: Ciphersuite, credentialType: CredentialType): Promise<Uint8Array>;
|
2057
2059
|
/**
|
2058
2060
|
* See {@link CoreCryptoContext.exportSecretKey}.
|
2059
2061
|
*
|
@@ -2079,7 +2081,7 @@ export declare class CoreCrypto {
|
|
2079
2081
|
*
|
2080
2082
|
* @returns A list of clients from the members of the group
|
2081
2083
|
*/
|
2082
|
-
getClientIds(conversationId: ConversationId): Promise<ClientId[]>;
|
2084
|
+
getClientIds(conversationId: ConversationId): Promise<ClientId$1[]>;
|
2083
2085
|
/**
|
2084
2086
|
* See {@link CoreCryptoContext.randomBytes}.
|
2085
2087
|
*
|
@@ -2159,7 +2161,7 @@ export declare class CoreCrypto {
|
|
2159
2161
|
* @param deviceIds - identifiers of the devices
|
2160
2162
|
* @returns identities or if no member has a x509 certificate, it will return an empty List
|
2161
2163
|
*/
|
2162
|
-
getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId[]): Promise<WireIdentity[]>;
|
2164
|
+
getDeviceIdentities(conversationId: ConversationId, deviceIds: ClientId$1[]): Promise<WireIdentity[]>;
|
2163
2165
|
/**
|
2164
2166
|
* See {@link CoreCryptoContext.getUserIdentities}.
|
2165
2167
|
*
|
@@ -2175,7 +2177,7 @@ export declare class CoreCrypto {
|
|
2175
2177
|
* @param credentialType - kind of Credential to check usage of. Defaults to X509 for now as no other value will give any result.
|
2176
2178
|
* @returns see {@link E2eiConversationState}
|
2177
2179
|
*/
|
2178
|
-
getCredentialInUse(groupInfo: Uint8Array, credentialType?: CredentialType
|
2180
|
+
getCredentialInUse(groupInfo: Uint8Array, credentialType?: CredentialType): Promise<E2eiConversationState$1>;
|
2179
2181
|
/**
|
2180
2182
|
* Registers an epoch observer, which will then be notified every time a conversation's epoch changes.
|
2181
2183
|
*
|
@@ -2186,10 +2188,18 @@ export declare class CoreCrypto {
|
|
2186
2188
|
}
|
2187
2189
|
|
2188
2190
|
export {
|
2191
|
+
AcmeDirectory$1 as AcmeDirectory,
|
2192
|
+
BufferedDecryptedMessage$1 as BufferedDecryptedMessage,
|
2193
|
+
ClientId$1 as ClientId,
|
2189
2194
|
ConversationConfiguration$1 as ConversationConfiguration,
|
2190
2195
|
CoreCryptoContext$1 as CoreCryptoContext,
|
2191
|
-
|
2192
|
-
|
2196
|
+
DecryptedMessage$1 as DecryptedMessage,
|
2197
|
+
E2eiConversationState$1 as E2eiConversationState,
|
2198
|
+
MlsGroupInfoEncryptionType as GroupInfoEncryptionType,
|
2199
|
+
MlsRatchetTreeType as RatchetTreeType,
|
2200
|
+
NewCrlDistributionPoints$1 as NewCrlDistributionPoints,
|
2201
|
+
ProposalBundle$1 as ProposalBundle,
|
2202
|
+
ProteusAutoPrekeyBundle$1 as ProteusAutoPrekeyBundle,
|
2193
2203
|
};
|
2194
2204
|
|
2195
2205
|
export {};
|