@wireapp/core-crypto 4.0.1 → 4.2.0

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.
@@ -24,76 +24,78 @@ export declare class CoreCryptoError extends Error {
24
24
  static fromStdError(e: Error): CoreCryptoError | Error;
25
25
  static asyncMapErr<T>(p: Promise<T>): Promise<T>;
26
26
  }
27
- declare enum CredentialType {
28
- /**
29
- * Just a KeyPair
30
- */
31
- Basic = 1,
32
- /**
33
- * A certificate obtained through e2e identity enrollment process
34
- */
35
- X509 = 2
36
- }
37
- declare enum WirePolicy {
38
- /**
39
- * Handshake messages are never encrypted
40
- */
41
- Plaintext = 1,
42
- /**
43
- * Handshake messages are always encrypted
44
- */
45
- Ciphertext = 2
46
- }
47
27
  declare enum Ciphersuite {
48
28
  /**
49
- * DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
50
- */
29
+ * DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
30
+ */
51
31
  MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 = 1,
52
32
  /**
53
- * DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256
54
- */
33
+ * DH KEM P256 | AES-GCM 128 | SHA2-256 | EcDSA P256
34
+ */
55
35
  MLS_128_DHKEMP256_AES128GCM_SHA256_P256 = 2,
56
36
  /**
57
- * DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
58
- */
37
+ * DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
38
+ */
59
39
  MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519 = 3,
60
40
  /**
61
- * DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
62
- */
41
+ * DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
42
+ */
63
43
  MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448 = 4,
64
44
  /**
65
- * DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521
66
- */
45
+ * DH KEM P521 | AES-GCM 256 | SHA2-512 | EcDSA P521
46
+ */
67
47
  MLS_256_DHKEMP521_AES256GCM_SHA512_P521 = 5,
68
48
  /**
69
- * DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
70
- */
49
+ * DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
50
+ */
71
51
  MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448 = 6,
72
52
  /**
73
- * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
74
- */
53
+ * DH KEM P384 | AES-GCM 256 | SHA2-384 | EcDSA P384
54
+ */
75
55
  MLS_256_DHKEMP384_AES256GCM_SHA384_P384 = 7
76
56
  }
57
+ declare enum CredentialType {
58
+ /**
59
+ * Just a KeyPair
60
+ */
61
+ Basic = 1,
62
+ /**
63
+ * A certificate obtained through e2e identity enrollment process
64
+ */
65
+ X509 = 2
66
+ }
67
+ declare enum WirePolicy {
68
+ /**
69
+ * Handshake messages are never encrypted
70
+ */
71
+ Plaintext = 1,
72
+ /**
73
+ * Handshake messages are always encrypted
74
+ */
75
+ Ciphertext = 2
76
+ }
77
77
  declare class AcmeChallenge {
78
+ private constructor();
78
79
  free(): void;
79
80
  /**
80
- * Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be accessed
81
- */
81
+ * Contains raw JSON data of this challenge. This is parsed by the underlying Rust library hence should not be accessed
82
+ */
82
83
  readonly delegate: Uint8Array;
83
84
  /**
84
- * Non-standard, Wire specific claim. Indicates the consumer from where it should get the challenge proof.
85
- * Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint for an OIDC challenge
86
- */
87
- readonly target: string;
88
- /**
89
- * URL of this challenge
90
- */
85
+ * URL of this challenge
86
+ */
91
87
  readonly url: string;
88
+ /**
89
+ * Non-standard, Wire specific claim. Indicates the consumer from where it should get the challenge proof.
90
+ * Either from wire-server "/access-token" endpoint in case of a DPoP challenge, or from an OAuth token endpoint for an OIDC challenge
91
+ */
92
+ readonly target: string;
92
93
  }
93
94
  /**
94
- * Metadata describing the conditions of the build of this software.
95
- */
95
+ * Metadata describing the conditions of the build of this software.
96
+ */
96
97
  export class BuildMetadata {
98
+ private constructor();
97
99
  /**
98
100
  ** Return copy of self without private attributes.
99
101
  */
@@ -104,846 +106,637 @@ export class BuildMetadata {
104
106
  toString(): string;
105
107
  free(): void;
106
108
  /**
107
- * Whether this build was in Debug mode (true) or Release mode (false)
108
- */
109
+ * Build Timestamp
110
+ */
111
+ readonly timestamp: string;
112
+ /**
113
+ * Whether this build was in Debug mode (true) or Release mode (false)
114
+ */
109
115
  readonly cargoDebug: string;
110
116
  /**
111
- * Features enabled for this build
112
- */
117
+ * Features enabled for this build
118
+ */
113
119
  readonly cargoFeatures: string;
114
120
  /**
115
- * Git branch
116
- */
121
+ * Optimization level
122
+ */
123
+ readonly optLevel: string;
124
+ /**
125
+ * Build target triple
126
+ */
127
+ readonly targetTriple: string;
128
+ /**
129
+ * Git branch
130
+ */
117
131
  readonly gitBranch: string;
118
132
  /**
119
- * Output of `git describe`
120
- */
133
+ * Output of `git describe`
134
+ */
121
135
  readonly gitDescribe: string;
122
136
  /**
123
- * `true` when the source code differed from the commit at the most recent git hash
124
- */
125
- readonly gitDirty: string;
126
- /**
127
- * Hash of current git commit
128
- */
137
+ * Hash of current git commit
138
+ */
129
139
  readonly gitSha: string;
130
140
  /**
131
- * Optimization level
132
- */
133
- readonly optLevel: string;
134
- /**
135
- * Build target triple
136
- */
137
- readonly targetTriple: string;
138
- /**
139
- * Build Timestamp
140
- */
141
- readonly timestamp: string;
141
+ * `true` when the source code differed from the commit at the most recent git hash
142
+ */
143
+ readonly gitDirty: string;
142
144
  }
143
145
  /**
144
- * Configuration object for new conversations
145
- * see [core_crypto::prelude::MlsConversationConfiguration]
146
- */
146
+ * Configuration object for new conversations
147
+ * see [core_crypto::prelude::MlsConversationConfiguration]
148
+ */
147
149
  export class ConversationConfiguration {
148
150
  free(): void;
149
- /**
150
- * @param {Ciphersuite | undefined} [ciphersuite]
151
- * @param {(Uint8Array)[] | undefined} [external_senders]
152
- * @param {number | undefined} [key_rotation_span]
153
- * @param {WirePolicy | undefined} [wire_policy]
154
- */
155
151
  constructor(ciphersuite?: Ciphersuite, external_senders?: (Uint8Array)[], key_rotation_span?: number, wire_policy?: WirePolicy);
156
152
  /**
157
- * Conversation ciphersuite
158
- */
153
+ * List of client IDs that are allowed to be external senders
154
+ */
155
+ readonly externalSenders: Array<any>;
156
+ /**
157
+ * Conversation ciphersuite
158
+ */
159
159
  readonly ciphersuite: Ciphersuite | undefined;
160
160
  /**
161
- * Additional configuration
162
- */
161
+ * Additional configuration
162
+ */
163
163
  readonly custom: CustomConfiguration;
164
- /**
165
- * List of client IDs that are allowed to be external senders
166
- */
167
- readonly externalSenders: Array<any>;
168
164
  }
169
165
  declare class CoreCryptoContext {
166
+ private constructor();
170
167
  free(): void;
171
168
  /**
172
- * Returns: [`WasmCryptoResult<()>`]
173
- *
174
- * see [core_crypto::context::CentralContext::set_data]
175
- * @param {Uint8Array} data
176
- * @returns {Promise<any>}
177
- */
169
+ * Returns: [`WasmCryptoResult<()>`]
170
+ *
171
+ * see [core_crypto::context::CentralContext::set_data]
172
+ */
178
173
  set_data(data: Uint8Array): Promise<any>;
179
174
  /**
180
- * Returns: [`WasmCryptoResult<Option<js_sys::Uint8Array>>`]
181
- *
182
- * see [core_crypto::context::CentralContext::get_data]
183
- * @returns {Promise<any>}
184
- */
175
+ * Returns: [`WasmCryptoResult<Option<js_sys::Uint8Array>>`]
176
+ *
177
+ * see [core_crypto::context::CentralContext::get_data]
178
+ */
185
179
  get_data(): Promise<any>;
186
180
  /**
187
- * see [core_crypto::mls::context::CentralContext::mls_init]
188
- * @param {Uint8Array} client_id
189
- * @param {Uint16Array} ciphersuites
190
- * @param {number | undefined} [nb_key_package]
191
- * @returns {Promise<any>}
192
- */
181
+ * see [core_crypto::mls::context::CentralContext::mls_init]
182
+ */
193
183
  mls_init(client_id: Uint8Array, ciphersuites: Uint16Array, nb_key_package?: number): Promise<any>;
194
184
  /**
195
- * Returns [`WasmCryptoResult<Vec<u8>>`]
196
- *
197
- * See [core_crypto::mls::context::CentralContext::mls_generate_keypairs]
198
- * @param {Uint16Array} ciphersuites
199
- * @returns {Promise<any>}
200
- */
185
+ * Returns [`WasmCryptoResult<Vec<u8>>`]
186
+ *
187
+ * See [core_crypto::mls::context::CentralContext::mls_generate_keypairs]
188
+ */
201
189
  mls_generate_keypair(ciphersuites: Uint16Array): Promise<any>;
202
190
  /**
203
- * Returns [`WasmCryptoResult<()>`]
204
- *
205
- * See [core_crypto::mls::context::CentralContext::mls_init_with_client_id]
206
- * @param {Uint8Array} client_id
207
- * @param {(Uint8Array)[]} signature_public_keys
208
- * @param {Uint16Array} ciphersuites
209
- * @returns {Promise<any>}
210
- */
191
+ * Returns [`WasmCryptoResult<()>`]
192
+ *
193
+ * See [core_crypto::mls::context::CentralContext::mls_init_with_client_id]
194
+ */
211
195
  mls_init_with_client_id(client_id: Uint8Array, signature_public_keys: (Uint8Array)[], ciphersuites: Uint16Array): Promise<any>;
212
196
  /**
213
- * Returns:: [`WasmCryptoResult<js_sys::Uint8Array>`]
214
- *
215
- * see [core_crypto::mls::context::CentralContext::client_public_key]
216
- * @param {Ciphersuite} ciphersuite
217
- * @param {CredentialType} credential_type
218
- * @returns {Promise<any>}
219
- */
197
+ * Returns:: [`WasmCryptoResult<js_sys::Uint8Array>`]
198
+ *
199
+ * see [core_crypto::mls::context::CentralContext::client_public_key]
200
+ */
220
201
  client_public_key(ciphersuite: Ciphersuite, credential_type: CredentialType): Promise<any>;
221
202
  /**
222
- * Returns: [`WasmCryptoResult<js_sys::Array<js_sys::Uint8Array>>`]
223
- *
224
- * see [core_crypto::mls::context::CentralContext::get_or_create_client_keypackages]
225
- * @param {Ciphersuite} ciphersuite
226
- * @param {CredentialType} credential_type
227
- * @param {number} amount_requested
228
- * @returns {Promise<any>}
229
- */
203
+ * Returns: [`WasmCryptoResult<js_sys::Array<js_sys::Uint8Array>>`]
204
+ *
205
+ * see [core_crypto::mls::context::CentralContext::get_or_create_client_keypackages]
206
+ */
230
207
  client_keypackages(ciphersuite: Ciphersuite, credential_type: CredentialType, amount_requested: number): Promise<any>;
231
208
  /**
232
- * Returns: [`WasmCryptoResult<usize>`]
233
- *
234
- * see [core_crypto::mls::context::CentralContext::client_valid_key_packages_count]
235
- * @param {Ciphersuite} ciphersuite
236
- * @param {CredentialType} credential_type
237
- * @returns {Promise<any>}
238
- */
209
+ * Returns: [`WasmCryptoResult<usize>`]
210
+ *
211
+ * see [core_crypto::mls::context::CentralContext::client_valid_key_packages_count]
212
+ */
239
213
  client_valid_keypackages_count(ciphersuite: Ciphersuite, credential_type: CredentialType): Promise<any>;
240
214
  /**
241
- * Returns: [`WasmCryptoResult<usize>`]
242
- *
243
- * see [core_crypto::mls::context::CentralContext::delete_keypackages]
244
- * @param {(Uint8Array)[]} refs
245
- * @returns {Promise<any>}
246
- */
215
+ * Returns: [`WasmCryptoResult<usize>`]
216
+ *
217
+ * see [core_crypto::mls::context::CentralContext::delete_keypackages]
218
+ */
247
219
  delete_keypackages(refs: (Uint8Array)[]): Promise<any>;
248
220
  /**
249
- * Returns: [`WasmCryptoResult<()>`]
250
- *
251
- * see [core_crypto::mls::context::CentralContext::new_conversation]
252
- * @param {Uint8Array} conversation_id
253
- * @param {CredentialType} creator_credential_type
254
- * @param {ConversationConfiguration} config
255
- * @returns {Promise<any>}
256
- */
221
+ * Returns: [`WasmCryptoResult<()>`]
222
+ *
223
+ * see [core_crypto::mls::context::CentralContext::new_conversation]
224
+ */
257
225
  create_conversation(conversation_id: Uint8Array, creator_credential_type: CredentialType, config: ConversationConfiguration): Promise<any>;
258
226
  /**
259
- * Returns [`WasmCryptoResult<u64>`]
260
- *
261
- * see [core_crypto::mls::context::CentralContext::conversation_epoch]
262
- * @param {Uint8Array} conversation_id
263
- * @returns {Promise<any>}
264
- */
227
+ * Returns [`WasmCryptoResult<u64>`]
228
+ *
229
+ * see [core_crypto::mls::context::CentralContext::conversation_epoch]
230
+ */
265
231
  conversation_epoch(conversation_id: Uint8Array): Promise<any>;
266
232
  /**
267
- * Returns [`WasmCryptoResult<Ciphersuite>`]
268
- *
269
- * see [core_crypto::mls::context::CentralContext::conversation_ciphersuite]
270
- * @param {Uint8Array} conversation_id
271
- * @returns {Promise<any>}
272
- */
233
+ * Returns [`WasmCryptoResult<Ciphersuite>`]
234
+ *
235
+ * see [core_crypto::mls::context::CentralContext::conversation_ciphersuite]
236
+ */
273
237
  conversation_ciphersuite(conversation_id: Uint8Array): Promise<any>;
274
238
  /**
275
- * Returns: [`bool`]
276
- *
277
- * see [core_crypto::mls::context::CentralContext::conversation_exists]
278
- * @param {Uint8Array} conversation_id
279
- * @returns {Promise<any>}
280
- */
239
+ * Returns: [`bool`]
240
+ *
241
+ * see [core_crypto::mls::context::CentralContext::conversation_exists]
242
+ */
281
243
  conversation_exists(conversation_id: Uint8Array): Promise<any>;
282
244
  /**
283
- * Returns: [`WasmCryptoResult<Uint8Array>`]
284
- *
285
- * see [core_crypto::mls::context::CentralContext::process_raw_welcome_message]
286
- * @param {Uint8Array} welcome_message
287
- * @param {CustomConfiguration} custom_configuration
288
- * @returns {Promise<any>}
289
- */
245
+ * Returns: [`WasmCryptoResult<Uint8Array>`]
246
+ *
247
+ * see [core_crypto::mls::context::CentralContext::process_raw_welcome_message]
248
+ */
290
249
  process_welcome_message(welcome_message: Uint8Array, custom_configuration: CustomConfiguration): Promise<any>;
291
250
  /**
292
- * Returns: [`WasmCryptoResult<Option<Vec<String>>>`]
293
- *
294
- * see [core_crypto::mls::context::CentralContext::add_members_to_conversation]
295
- * @param {Uint8Array} conversation_id
296
- * @param {(Uint8Array)[]} key_packages
297
- * @returns {Promise<any>}
298
- */
251
+ * Returns: [`WasmCryptoResult<Option<Vec<String>>>`]
252
+ *
253
+ * see [core_crypto::mls::conversation::conversation_guard::ConversationGuard::add_members]
254
+ */
299
255
  add_clients_to_conversation(conversation_id: Uint8Array, key_packages: (Uint8Array)[]): Promise<any>;
300
256
  /**
301
- * Returns: [`WasmCryptoResult<()>`]
302
- *
303
- * see [core_crypto::mls::context::CentralContext::remove_members_from_conversation]
304
- * @param {Uint8Array} conversation_id
305
- * @param {(Uint8Array)[]} clients
306
- * @returns {Promise<any>}
307
- */
257
+ * Returns: [`WasmCryptoResult<()>`]
258
+ *
259
+ * see [core_crypto::mls::context::CentralContext::remove_members_from_conversation]
260
+ */
308
261
  remove_clients_from_conversation(conversation_id: Uint8Array, clients: (Uint8Array)[]): Promise<any>;
309
262
  /**
310
- * Returns: [`WasmCryptoResult<()>`]
311
- *
312
- * see [core_crypto::mls::context::CentralContext::mark_conversation_as_child_of]
313
- * @param {Uint8Array} child_id
314
- * @param {Uint8Array} parent_id
315
- * @returns {Promise<any>}
316
- */
263
+ * Returns: [`WasmCryptoResult<()>`]
264
+ *
265
+ * see [core_crypto::mls::context::CentralContext::mark_conversation_as_child_of]
266
+ */
317
267
  mark_conversation_as_child_of(child_id: Uint8Array, parent_id: Uint8Array): Promise<any>;
318
268
  /**
319
- * Returns: [`WasmCryptoResult()`]
320
- *
321
- * see [core_crypto::mls::context::CentralContext::update_keying_material]
322
- * @param {Uint8Array} conversation_id
323
- * @returns {Promise<any>}
324
- */
269
+ * Returns: [`WasmCryptoResult()`]
270
+ *
271
+ * see [core_crypto::mls::context::CentralContext::update_keying_material]
272
+ */
325
273
  update_keying_material(conversation_id: Uint8Array): Promise<any>;
326
274
  /**
327
- * Returns: [`WasmCryptoResult()`]
328
- *
329
- * see [core_crypto::mls::context::CentralContext::commit_pending_proposals]
330
- * @param {Uint8Array} conversation_id
331
- * @returns {Promise<any>}
332
- */
275
+ * Returns: [`WasmCryptoResult()`]
276
+ *
277
+ * see [core_crypto::mls::context::CentralContext::commit_pending_proposals]
278
+ */
333
279
  commit_pending_proposals(conversation_id: Uint8Array): Promise<any>;
334
280
  /**
335
- * Returns: [`WasmCryptoResult<()>`]
336
- *
337
- * see [core_crypto::mls::context::CentralContext::wipe_conversation]
338
- * @param {Uint8Array} conversation_id
339
- * @returns {Promise<any>}
340
- */
281
+ * Returns: [`WasmCryptoResult<()>`]
282
+ *
283
+ * see [core_crypto::mls::context::CentralContext::wipe_conversation]
284
+ */
341
285
  wipe_conversation(conversation_id: Uint8Array): Promise<any>;
342
286
  /**
343
- * Returns: [`WasmCryptoResult<DecryptedMessage>`]
344
- *
345
- * see [core_crypto::mls::context::CentralContext::decrypt_message]
346
- * @param {Uint8Array} conversation_id
347
- * @param {Uint8Array} payload
348
- * @returns {Promise<any>}
349
- */
287
+ * Returns: [`WasmCryptoResult<DecryptedMessage>`]
288
+ *
289
+ * see [core_crypto::mls::context::CentralContext::decrypt_message]
290
+ */
350
291
  decrypt_message(conversation_id: Uint8Array, payload: Uint8Array): Promise<any>;
351
292
  /**
352
- * Returns: [`WasmCryptoResult<Uint8Array>`]
353
- *
354
- * see [core_crypto::mls::context::CentralContext::encrypt_message]
355
- * @param {Uint8Array} conversation_id
356
- * @param {Uint8Array} message
357
- * @returns {Promise<any>}
358
- */
293
+ * Returns: [`WasmCryptoResult<Uint8Array>`]
294
+ *
295
+ * see [core_crypto::mls::conversation::conversation_guard::ConversationGuard::encrypt_message]
296
+ */
359
297
  encrypt_message(conversation_id: Uint8Array, message: Uint8Array): Promise<any>;
360
298
  /**
361
- * Returns: [`WasmCryptoResult<WelcomeBundle>`]
362
- *
363
- * see [core_crypto::mls::context::CentralContext::join_by_external_commit]
364
- * @param {Uint8Array} group_info
365
- * @param {CustomConfiguration} custom_configuration
366
- * @param {CredentialType} credential_type
367
- * @returns {Promise<any>}
368
- */
299
+ * Returns: [`WasmCryptoResult<WelcomeBundle>`]
300
+ *
301
+ * see [core_crypto::mls::context::CentralContext::join_by_external_commit]
302
+ */
369
303
  join_by_external_commit(group_info: Uint8Array, custom_configuration: CustomConfiguration, credential_type: CredentialType): Promise<any>;
370
304
  /**
371
- * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
372
- *
373
- * see [core_crypto::mls::context::CentralContext::random_bytes]
374
- * @param {number} len
375
- * @returns {Promise<any>}
376
- */
305
+ * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
306
+ *
307
+ * see [core_crypto::mls::context::CentralContext::random_bytes]
308
+ */
377
309
  random_bytes(len: number): Promise<any>;
378
310
  /**
379
- * Returns: [`WasmCryptoResult<Vec<u8>>`]
380
- *
381
- * see [core_crypto::mls::context::CentralContext::export_secret_key]
382
- * @param {Uint8Array} conversation_id
383
- * @param {number} key_length
384
- * @returns {Promise<any>}
385
- */
311
+ * Returns: [`WasmCryptoResult<Vec<u8>>`]
312
+ *
313
+ * see [core_crypto::mls::context::CentralContext::export_secret_key]
314
+ */
386
315
  export_secret_key(conversation_id: Uint8Array, key_length: number): Promise<any>;
387
316
  /**
388
- * Returns: [`WasmCryptoResult<Vec<u8>>`]
389
- *
390
- * see [core_crypto::mls::context::CentralContext::get_external_sender]
391
- * @param {Uint8Array} id
392
- * @returns {Promise<any>}
393
- */
317
+ * Returns: [`WasmCryptoResult<Vec<u8>>`]
318
+ *
319
+ * see [core_crypto::mls::context::CentralContext::get_external_sender]
320
+ */
394
321
  get_external_sender(id: Uint8Array): Promise<any>;
395
322
  /**
396
- * Returns: [`WasmCryptoResult<Box<[js_sys::Uint8Array]>`]
397
- *
398
- * see [core_crypto::mls::context::CentralContext::get_client_ids]
399
- * @param {Uint8Array} conversation_id
400
- * @returns {Promise<any>}
401
- */
323
+ * Returns: [`WasmCryptoResult<Box<[js_sys::Uint8Array]>`]
324
+ *
325
+ * see [core_crypto::mls::context::CentralContext::get_client_ids]
326
+ */
402
327
  get_client_ids(conversation_id: Uint8Array): Promise<any>;
403
328
  /**
404
- * Returns: [`WasmCryptoResult<()>`]
405
- *
406
- * see [core_crypto::proteus::ProteusCentral::try_new]
407
- * @returns {Promise<any>}
408
- */
329
+ * Returns: [`WasmCryptoResult<()>`]
330
+ *
331
+ * see [core_crypto::proteus::ProteusCentral::try_new]
332
+ */
409
333
  proteus_init(): Promise<any>;
410
334
  /**
411
- * Returns: [`WasmCryptoResult<()>`]
412
- *
413
- * See [core_crypto::context::CentralContext::proteus_session_from_prekey]
414
- * @param {string} session_id
415
- * @param {Uint8Array} prekey
416
- * @returns {Promise<any>}
417
- */
335
+ * Returns: [`WasmCryptoResult<()>`]
336
+ *
337
+ * See [core_crypto::context::CentralContext::proteus_session_from_prekey]
338
+ */
418
339
  proteus_session_from_prekey(session_id: string, prekey: Uint8Array): Promise<any>;
419
340
  /**
420
- * Returns: [`WasmCryptoResult<Vec<u8>>`]
421
- *
422
- * See [core_crypto::context::CentralContext::proteus_session_from_message]
423
- * @param {string} session_id
424
- * @param {Uint8Array} envelope
425
- * @returns {Promise<any>}
426
- */
341
+ * Returns: [`WasmCryptoResult<Vec<u8>>`]
342
+ *
343
+ * See [core_crypto::context::CentralContext::proteus_session_from_message]
344
+ */
427
345
  proteus_session_from_message(session_id: string, envelope: Uint8Array): Promise<any>;
428
346
  /**
429
- * Returns: [`WasmCryptoResult<()>`]
430
- *
431
- * /// **Note**: This isn't usually needed as persisting sessions happens automatically when decrypting/encrypting messages and initializing Sessions
432
- *
433
- * See [core_crypto::context::CentralContext::proteus_session_save]
434
- * @param {string} session_id
435
- * @returns {Promise<any>}
436
- */
347
+ * Returns: [`WasmCryptoResult<()>`]
348
+ *
349
+ * /// **Note**: This isn't usually needed as persisting sessions happens automatically when decrypting/encrypting messages and initializing Sessions
350
+ *
351
+ * See [core_crypto::context::CentralContext::proteus_session_save]
352
+ */
437
353
  proteus_session_save(session_id: string): Promise<any>;
438
354
  /**
439
- * Returns: [`WasmCryptoResult<()>`]
440
- *
441
- * See [core_crypto::context::CentralContext::proteus_session_delete]
442
- * @param {string} session_id
443
- * @returns {Promise<any>}
444
- */
355
+ * Returns: [`WasmCryptoResult<()>`]
356
+ *
357
+ * See [core_crypto::context::CentralContext::proteus_session_delete]
358
+ */
445
359
  proteus_session_delete(session_id: string): Promise<any>;
446
360
  /**
447
- * Returns: [`WasmCryptoResult<bool>`]
448
- *
449
- * See [core_crypto::context::CentralContext::proteus_session_exists]
450
- * @param {string} session_id
451
- * @returns {Promise<any>}
452
- */
361
+ * Returns: [`WasmCryptoResult<bool>`]
362
+ *
363
+ * See [core_crypto::context::CentralContext::proteus_session_exists]
364
+ */
453
365
  proteus_session_exists(session_id: string): Promise<any>;
454
366
  /**
455
- * Returns: [`WasmCryptoResult<Vec<u8>>`]
456
- *
457
- * See [core_crypto::context::CentralContext::proteus_decrypt]
458
- * @param {string} session_id
459
- * @param {Uint8Array} ciphertext
460
- * @returns {Promise<any>}
461
- */
367
+ * Returns: [`WasmCryptoResult<Vec<u8>>`]
368
+ *
369
+ * See [core_crypto::context::CentralContext::proteus_decrypt]
370
+ */
462
371
  proteus_decrypt(session_id: string, ciphertext: Uint8Array): Promise<any>;
463
372
  /**
464
- * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
465
- *
466
- * See [core_crypto::context::CentralContext::proteus_encrypt]
467
- * @param {string} session_id
468
- * @param {Uint8Array} plaintext
469
- * @returns {Promise<any>}
470
- */
373
+ * Returns: [`WasmCryptoResult<js_sys::Uint8Array>`]
374
+ *
375
+ * See [core_crypto::context::CentralContext::proteus_encrypt]
376
+ */
471
377
  proteus_encrypt(session_id: string, plaintext: Uint8Array): Promise<any>;
472
378
  /**
473
- * Returns: [`WasmCryptoResult<js_sys::Map<string, Uint8Array>>`]
474
- *
475
- * See [core_crypto::context::CentralContext::proteus_encrypt_batched]
476
- * @param {(string)[]} sessions
477
- * @param {Uint8Array} plaintext
478
- * @returns {Promise<any>}
479
- */
379
+ * Returns: [`WasmCryptoResult<js_sys::Map<string, Uint8Array>>`]
380
+ *
381
+ * See [core_crypto::context::CentralContext::proteus_encrypt_batched]
382
+ */
480
383
  proteus_encrypt_batched(sessions: (string)[], plaintext: Uint8Array): Promise<any>;
481
384
  /**
482
- * Returns: [`WasmCryptoResult<Uint8Array>`]
483
- *
484
- * See [core_crypto::context::CentralContext::proteus_new_prekey]
485
- * @param {number} prekey_id
486
- * @returns {Promise<any>}
487
- */
385
+ * Returns: [`WasmCryptoResult<Uint8Array>`]
386
+ *
387
+ * See [core_crypto::context::CentralContext::proteus_new_prekey]
388
+ */
488
389
  proteus_new_prekey(prekey_id: number): Promise<any>;
489
390
  /**
490
- * Returns: [`WasmCryptoResult<ProteusAutoPrekeyBundle>`]
491
- *
492
- * See [core_crypto::context::CentralContext::proteus_new_prekey_auto]
493
- * @returns {Promise<any>}
494
- */
391
+ * Returns: [`WasmCryptoResult<ProteusAutoPrekeyBundle>`]
392
+ *
393
+ * See [core_crypto::context::CentralContext::proteus_new_prekey_auto]
394
+ */
495
395
  proteus_new_prekey_auto(): Promise<any>;
496
396
  /**
497
- * Returns [`WasmCryptoResult<Uint8Array>`]
498
- *
499
- * See [core_crypto::context::CentralContext::proteus_last_resort_prekey]
500
- * @returns {Promise<any>}
501
- */
397
+ * Returns [`WasmCryptoResult<Uint8Array>`]
398
+ *
399
+ * See [core_crypto::context::CentralContext::proteus_last_resort_prekey]
400
+ */
502
401
  proteus_last_resort_prekey(): Promise<any>;
503
402
  /**
504
- * Returns: [`WasmCryptoResult<u16>`]
505
- *
506
- * See [core_crypto::context::CentralContext::proteus_last_resort_prekey_id]
507
- * @returns {number}
508
- */
403
+ * Returns: [`WasmCryptoResult<u16>`]
404
+ *
405
+ * See [core_crypto::context::CentralContext::proteus_last_resort_prekey_id]
406
+ */
509
407
  static proteus_last_resort_prekey_id(): number;
510
408
  /**
511
- * Returns: [`WasmCryptoResult<String>`]
512
- *
513
- * See [core_crypto::context::CentralContext::proteus_fingerprint]
514
- * @returns {Promise<string>}
515
- */
409
+ * Returns: [`WasmCryptoResult<String>`]
410
+ *
411
+ * See [core_crypto::context::CentralContext::proteus_fingerprint]
412
+ */
516
413
  proteus_fingerprint(): Promise<string>;
517
414
  /**
518
- * Returns: [`WasmCryptoResult<String>`]
519
- *
520
- * see [core_crypto::proteus::ProteusCentral::fingerprint_local]
521
- * @param {string} session_id
522
- * @returns {Promise<string>}
523
- */
415
+ * Returns: [`WasmCryptoResult<String>`]
416
+ *
417
+ * see [core_crypto::proteus::ProteusCentral::fingerprint_local]
418
+ */
524
419
  proteus_fingerprint_local(session_id: string): Promise<string>;
525
420
  /**
526
- * Returns: [`WasmCryptoResult<String>`]
527
- *
528
- * See [core_crypto::context::CentralContext::proteus_fingerprint_remote]
529
- * @param {string} session_id
530
- * @returns {Promise<string>}
531
- */
421
+ * Returns: [`WasmCryptoResult<String>`]
422
+ *
423
+ * See [core_crypto::context::CentralContext::proteus_fingerprint_remote]
424
+ */
532
425
  proteus_fingerprint_remote(session_id: string): Promise<string>;
533
426
  /**
534
- * Returns: [`WasmCryptoResult<String>`]
535
- *
536
- * See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
537
- * @param {Uint8Array} prekey
538
- * @returns {string}
539
- */
427
+ * Returns: [`WasmCryptoResult<String>`]
428
+ *
429
+ * See [core_crypto::proteus::ProteusCentral::fingerprint_prekeybundle]
430
+ */
540
431
  static proteus_fingerprint_prekeybundle(prekey: Uint8Array): string;
541
432
  /**
542
- * Returns: [`WasmCryptoResult<()>`]
543
- *
544
- * See [core_crypto::context::CentralContext::proteus_cryptobox_migrate]
545
- * @param {string} path
546
- * @returns {Promise<any>}
547
- */
433
+ * Returns: [`WasmCryptoResult<()>`]
434
+ *
435
+ * See [core_crypto::context::CentralContext::proteus_cryptobox_migrate]
436
+ */
548
437
  proteus_cryptobox_migrate(path: string): Promise<any>;
549
438
  /**
550
- * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
551
- *
552
- * see [core_crypto::mls::context::CentralContext::e2ei_new_enrollment]
553
- * @param {string} client_id
554
- * @param {string} display_name
555
- * @param {string} handle
556
- * @param {string | undefined} team
557
- * @param {number} expiry_sec
558
- * @param {Ciphersuite} ciphersuite
559
- * @returns {Promise<any>}
560
- */
439
+ * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
440
+ *
441
+ * see [core_crypto::mls::context::CentralContext::e2ei_new_enrollment]
442
+ */
561
443
  e2ei_new_enrollment(client_id: string, display_name: string, handle: string, team: string | undefined, expiry_sec: number, ciphersuite: Ciphersuite): Promise<any>;
562
444
  /**
563
- * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
564
- *
565
- * see [core_crypto::mls::context::CentralContext::e2ei_new_activation_enrollment]
566
- * @param {string} display_name
567
- * @param {string} handle
568
- * @param {string | undefined} team
569
- * @param {number} expiry_sec
570
- * @param {Ciphersuite} ciphersuite
571
- * @returns {Promise<any>}
572
- */
445
+ * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
446
+ *
447
+ * see [core_crypto::mls::context::CentralContext::e2ei_new_activation_enrollment]
448
+ */
573
449
  e2ei_new_activation_enrollment(display_name: string, handle: string, team: string | undefined, expiry_sec: number, ciphersuite: Ciphersuite): Promise<any>;
574
450
  /**
575
- * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
576
- *
577
- * see [core_crypto::mls::context::CentralContext::e2ei_new_rotate_enrollment]
578
- * @param {string | undefined} display_name
579
- * @param {string | undefined} handle
580
- * @param {string | undefined} team
581
- * @param {number} expiry_sec
582
- * @param {Ciphersuite} ciphersuite
583
- * @returns {Promise<any>}
584
- */
451
+ * Returns: [`WasmCryptoResult<E2eiEnrollment>`]
452
+ *
453
+ * see [core_crypto::mls::context::CentralContext::e2ei_new_rotate_enrollment]
454
+ */
585
455
  e2ei_new_rotate_enrollment(display_name: string | undefined, handle: string | undefined, team: string | undefined, expiry_sec: number, ciphersuite: Ciphersuite): Promise<any>;
586
456
  /**
587
- * See [core_crypto::mls::context::CentralContext::e2ei_dump_pki_env]
588
- * @returns {Promise<Promise<any>>}
589
- */
457
+ * See [core_crypto::mls::context::CentralContext::e2ei_dump_pki_env]
458
+ */
590
459
  e2ei_dump_pki_env(): Promise<Promise<any>>;
591
460
  /**
592
- * See [core_crypto::mls::context::CentralContext::e2ei_is_pki_env_setup]
593
- * @returns {Promise<Promise<any>>}
594
- */
461
+ * See [core_crypto::mls::context::CentralContext::e2ei_is_pki_env_setup]
462
+ */
595
463
  e2ei_is_pki_env_setup(): Promise<Promise<any>>;
596
464
  /**
597
- * See [core_crypto::mls::context::CentralContext::e2ei_register_acme_ca]
598
- * @param {string} trust_anchor_pem
599
- * @returns {Promise<Promise<any>>}
600
- */
465
+ * See [core_crypto::mls::context::CentralContext::e2ei_register_acme_ca]
466
+ */
601
467
  e2ei_register_acme_ca(trust_anchor_pem: string): Promise<Promise<any>>;
602
468
  /**
603
- * See [core_crypto::mls::context::CentralContext::e2ei_register_intermediate_ca]
604
- * @param {string} cert_pem
605
- * @returns {Promise<Promise<any>>}
606
- */
469
+ * See [core_crypto::mls::context::CentralContext::e2ei_register_intermediate_ca]
470
+ */
607
471
  e2ei_register_intermediate_ca(cert_pem: string): Promise<Promise<any>>;
608
472
  /**
609
- * See [core_crypto::mls::context::CentralContext::e2ei_register_crl]
610
- * @param {string} crl_dp
611
- * @param {Uint8Array} crl_der
612
- * @returns {Promise<Promise<any>>}
613
- */
473
+ * See [core_crypto::mls::context::CentralContext::e2ei_register_crl]
474
+ */
614
475
  e2ei_register_crl(crl_dp: string, crl_der: Uint8Array): Promise<Promise<any>>;
615
476
  /**
616
- * see [core_crypto::mls::context::CentralContext::e2ei_mls_init_only]
617
- * @param {FfiWireE2EIdentity} enrollment
618
- * @param {string} certificate_chain
619
- * @param {number | undefined} [nb_key_package]
620
- * @returns {Promise<any>}
621
- */
477
+ * see [core_crypto::mls::context::CentralContext::e2ei_mls_init_only]
478
+ */
622
479
  e2ei_mls_init_only(enrollment: FfiWireE2EIdentity, certificate_chain: string, nb_key_package?: number): Promise<any>;
623
480
  /**
624
- * Returns: [`WasmCryptoResult<()>`]
625
- *
626
- * see [core_crypto::context::CentralContext::e2ei_rotate]
627
- * @param {Uint8Array} conversation_id
628
- * @returns {Promise<any>}
629
- */
481
+ * Returns: [`WasmCryptoResult<()>`]
482
+ *
483
+ * see [core_crypto::context::CentralContext::e2ei_rotate]
484
+ */
630
485
  e2ei_rotate(conversation_id: Uint8Array): Promise<any>;
631
486
  /**
632
- * Returns: [`WasmCryptoResult<Option<Vec<String>>>`]
633
- *
634
- * see [core_crypto::mls::context::CentralContext::save_x509_credential]
635
- * @param {FfiWireE2EIdentity} enrollment
636
- * @param {string} certificate_chain
637
- * @returns {Promise<any>}
638
- */
487
+ * Returns: [`WasmCryptoResult<Option<Vec<String>>>`]
488
+ *
489
+ * see [core_crypto::mls::context::CentralContext::save_x509_credential]
490
+ */
639
491
  save_x509_credential(enrollment: FfiWireE2EIdentity, certificate_chain: string): Promise<any>;
640
492
  /**
641
- * Returns: [`WasmCryptoResult<()>`]
642
- *
643
- * see [core_crypto::context::CentralContext::delete_stale_key_packages]
644
- * @param {Ciphersuite} cipher_suite
645
- * @returns {Promise<any>}
646
- */
493
+ * Returns: [`WasmCryptoResult<()>`]
494
+ *
495
+ * see [core_crypto::context::CentralContext::delete_stale_key_packages]
496
+ */
647
497
  delete_stale_key_packages(cipher_suite: Ciphersuite): Promise<any>;
648
498
  /**
649
- * see [core_crypto::mls::context::CentralContext::e2ei_enrollment_stash]
650
- * @param {FfiWireE2EIdentity} enrollment
651
- * @returns {Promise<any>}
652
- */
499
+ * see [core_crypto::mls::context::CentralContext::e2ei_enrollment_stash]
500
+ */
653
501
  e2ei_enrollment_stash(enrollment: FfiWireE2EIdentity): Promise<any>;
654
502
  /**
655
- * see [core_crypto::mls::context::CentralContext::e2ei_enrollment_stash_pop]
656
- * @param {Uint8Array} handle
657
- * @returns {Promise<any>}
658
- */
503
+ * see [core_crypto::mls::context::CentralContext::e2ei_enrollment_stash_pop]
504
+ */
659
505
  e2ei_enrollment_stash_pop(handle: Uint8Array): Promise<any>;
660
506
  /**
661
- * Returns [`WasmCryptoResult<u8>`]
662
- *
663
- * see [core_crypto::mls::context::CentralContext::e2ei_conversation_state]
664
- * @param {Uint8Array} conversation_id
665
- * @returns {Promise<any>}
666
- */
507
+ * Returns [`WasmCryptoResult<u8>`]
508
+ *
509
+ * see [core_crypto::mls::context::CentralContext::e2ei_conversation_state]
510
+ */
667
511
  e2ei_conversation_state(conversation_id: Uint8Array): Promise<any>;
668
512
  /**
669
- * Returns [`WasmCryptoResult<bool>`]
670
- *
671
- * see [core_crypto::mls::context::CentralContext::e2ei_is_enabled]
672
- * @param {Ciphersuite} ciphersuite
673
- * @returns {Promise<any>}
674
- */
513
+ * Returns [`WasmCryptoResult<bool>`]
514
+ *
515
+ * see [core_crypto::mls::context::CentralContext::e2ei_is_enabled]
516
+ */
675
517
  e2ei_is_enabled(ciphersuite: Ciphersuite): Promise<any>;
676
518
  /**
677
- * Returns [`WasmCryptoResult<Vec<WireIdentity>>`]
678
- *
679
- * see [core_crypto::mls::context::CentralContext::get_device_identities]
680
- * @param {Uint8Array} conversation_id
681
- * @param {(Uint8Array)[]} device_ids
682
- * @returns {Promise<any>}
683
- */
519
+ * Returns [`WasmCryptoResult<Vec<WireIdentity>>`]
520
+ *
521
+ * see [core_crypto::mls::context::CentralContext::get_device_identities]
522
+ */
684
523
  get_device_identities(conversation_id: Uint8Array, device_ids: (Uint8Array)[]): Promise<any>;
685
524
  /**
686
- * Returns [`WasmCryptoResult<HashMap<String, Vec<WireIdentity>>>`]
687
- *
688
- * see [core_crypto::mls::context::CentralContext::get_user_identities]
689
- * @param {Uint8Array} conversation_id
690
- * @param {(string)[]} user_ids
691
- * @returns {Promise<any>}
692
- */
525
+ * Returns [`WasmCryptoResult<HashMap<String, Vec<WireIdentity>>>`]
526
+ *
527
+ * see [core_crypto::mls::context::CentralContext::get_user_identities]
528
+ */
693
529
  get_user_identities(conversation_id: Uint8Array, user_ids: (string)[]): Promise<any>;
694
530
  /**
695
- * Returns: [`WasmCryptoResult<u8>`]
696
- *
697
- * see [core_crypto::mls::context::CentralContext::get_credential_in_use]
698
- * @param {Uint8Array} group_info
699
- * @param {CredentialType} credential_type
700
- * @returns {Promise<any>}
701
- */
531
+ * Returns: [`WasmCryptoResult<u8>`]
532
+ *
533
+ * see [core_crypto::mls::context::CentralContext::get_credential_in_use]
534
+ */
702
535
  get_credential_in_use(group_info: Uint8Array, credential_type: CredentialType): Promise<any>;
703
536
  }
704
537
  declare class CoreCryptoWasmLogger {
705
538
  free(): void;
706
- /**
707
- * @param {Function} logger
708
- * @param {any} ctx
709
- */
710
539
  constructor(logger: Function, ctx: any);
711
540
  }
712
541
  /**
713
- * see [core_crypto::prelude::MlsCustomConfiguration]
714
- */
542
+ * see [core_crypto::prelude::MlsCustomConfiguration]
543
+ */
715
544
  export class CustomConfiguration {
716
545
  free(): void;
717
- /**
718
- * @param {number | undefined} [key_rotation_span]
719
- * @param {WirePolicy | undefined} [wire_policy]
720
- */
721
546
  constructor(key_rotation_span?: number, wire_policy?: WirePolicy);
722
547
  /**
723
- * Duration in seconds after which we will automatically force a self-update commit
724
- * Note: This isn't currently implemented
725
- */
548
+ * Duration in seconds after which we will automatically force a self-update commit
549
+ * Note: This isn't currently implemented
550
+ */
726
551
  keyRotationSpan?: number;
727
552
  /**
728
- * Defines if handshake messages are encrypted or not
729
- * Note: encrypted handshake messages are not supported by wire-server
730
- */
553
+ * Defines if handshake messages are encrypted or not
554
+ * Note: encrypted handshake messages are not supported by wire-server
555
+ */
731
556
  wirePolicy?: WirePolicy;
732
557
  }
733
558
  declare class E2eiDumpedPkiEnv {
559
+ private constructor();
734
560
  free(): void;
735
561
  /**
736
- * CRLs registered in the PKI env
737
- */
738
- readonly crls: (string)[];
562
+ * Root CA in use (i.e. Trust Anchor)
563
+ */
564
+ readonly root_ca: string;
739
565
  /**
740
- * Intermediate CAs that are loaded
741
- */
566
+ * Intermediate CAs that are loaded
567
+ */
742
568
  readonly intermediates: (string)[];
743
569
  /**
744
- * Root CA in use (i.e. Trust Anchor)
745
- */
746
- readonly root_ca: string;
570
+ * CRLs registered in the PKI env
571
+ */
572
+ readonly crls: (string)[];
747
573
  }
748
574
  declare class FfiWireE2EIdentity {
575
+ private constructor();
749
576
  free(): void;
750
577
  /**
751
- * See [core_crypto::e2e_identity::WireE2eIdentity::directory_response]
752
- * @param {Uint8Array} directory
753
- * @returns {Promise<any>}
754
- */
578
+ * See [core_crypto::e2e_identity::WireE2eIdentity::directory_response]
579
+ */
755
580
  directory_response(directory: Uint8Array): Promise<any>;
756
581
  /**
757
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_request]
758
- * @param {string} previous_nonce
759
- * @returns {Promise<any>}
760
- */
582
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_request]
583
+ */
761
584
  new_account_request(previous_nonce: string): Promise<any>;
762
585
  /**
763
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_response]
764
- * @param {Uint8Array} account
765
- * @returns {Promise<any>}
766
- */
586
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_account_response]
587
+ */
767
588
  new_account_response(account: Uint8Array): Promise<any>;
768
589
  /**
769
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
770
- * @param {string} previous_nonce
771
- * @returns {Promise<any>}
772
- */
590
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_request]
591
+ */
773
592
  new_order_request(previous_nonce: string): Promise<any>;
774
593
  /**
775
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_response]
776
- * @param {Uint8Array} order
777
- * @returns {Promise<any>}
778
- */
594
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_order_response]
595
+ */
779
596
  new_order_response(order: Uint8Array): Promise<any>;
780
597
  /**
781
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_request]
782
- * @param {string} url
783
- * @param {string} previous_nonce
784
- * @returns {Promise<any>}
785
- */
598
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_request]
599
+ */
786
600
  new_authz_request(url: string, previous_nonce: string): Promise<any>;
787
601
  /**
788
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_response]
789
- * @param {Uint8Array} authz
790
- * @returns {Promise<any>}
791
- */
602
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_authz_response]
603
+ */
792
604
  new_authz_response(authz: Uint8Array): Promise<any>;
793
605
  /**
794
- * See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
795
- * @param {number} expiry_secs
796
- * @param {string} backend_nonce
797
- * @returns {Promise<any>}
798
- */
606
+ * See [core_crypto::e2e_identity::WireE2eIdentity::create_dpop_token]
607
+ */
799
608
  create_dpop_token(expiry_secs: number, backend_nonce: string): Promise<any>;
800
609
  /**
801
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_dpop_challenge_request]
802
- * @param {string} access_token
803
- * @param {string} previous_nonce
804
- * @returns {Promise<any>}
805
- */
610
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_dpop_challenge_request]
611
+ */
806
612
  new_dpop_challenge_request(access_token: string, previous_nonce: string): Promise<any>;
807
613
  /**
808
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_dpop_challenge_response]
809
- * @param {Uint8Array} challenge
810
- * @returns {Promise<any>}
811
- */
614
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_dpop_challenge_response]
615
+ */
812
616
  new_dpop_challenge_response(challenge: Uint8Array): Promise<any>;
813
617
  /**
814
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_oidc_challenge_request]
815
- * @param {string} id_token
816
- * @param {string} previous_nonce
817
- * @returns {Promise<any>}
818
- */
618
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_oidc_challenge_request]
619
+ */
819
620
  new_oidc_challenge_request(id_token: string, previous_nonce: string): Promise<any>;
820
621
  /**
821
- * See [core_crypto::e2e_identity::WireE2eIdentity::new_oidc_challenge_response]
822
- * @param {Uint8Array} challenge
823
- * @returns {Promise<any>}
824
- */
622
+ * See [core_crypto::e2e_identity::WireE2eIdentity::new_oidc_challenge_response]
623
+ */
825
624
  new_oidc_challenge_response(challenge: Uint8Array): Promise<any>;
826
625
  /**
827
- * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_request]
828
- * @param {string} order_url
829
- * @param {string} previous_nonce
830
- * @returns {Promise<any>}
831
- */
626
+ * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_request]
627
+ */
832
628
  check_order_request(order_url: string, previous_nonce: string): Promise<any>;
833
629
  /**
834
- * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_response]
835
- * @param {Uint8Array} order
836
- * @returns {Promise<any>}
837
- */
630
+ * See [core_crypto::e2e_identity::WireE2eIdentity::check_order_response]
631
+ */
838
632
  check_order_response(order: Uint8Array): Promise<any>;
839
633
  /**
840
- * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_request]
841
- * @param {string} previous_nonce
842
- * @returns {Promise<any>}
843
- */
634
+ * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_request]
635
+ */
844
636
  finalize_request(previous_nonce: string): Promise<any>;
845
637
  /**
846
- * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_response]
847
- * @param {Uint8Array} finalize
848
- * @returns {Promise<any>}
849
- */
638
+ * See [core_crypto::e2e_identity::WireE2eIdentity::finalize_response]
639
+ */
850
640
  finalize_response(finalize: Uint8Array): Promise<any>;
851
641
  /**
852
- * See [core_crypto::e2e_identity::WireE2eIdentity::certificate_request]
853
- * @param {string} previous_nonce
854
- * @returns {Promise<any>}
855
- */
642
+ * See [core_crypto::e2e_identity::WireE2eIdentity::certificate_request]
643
+ */
856
644
  certificate_request(previous_nonce: string): Promise<any>;
857
645
  }
858
646
  declare class NewAcmeAuthz {
647
+ private constructor();
859
648
  free(): void;
860
649
  /**
861
- * Associated ACME Challenge
862
- */
863
- readonly challenge: AcmeChallenge;
864
- /**
865
- * DNS entry associated with those challenge
866
- */
650
+ * DNS entry associated with those challenge
651
+ */
867
652
  readonly identifier: string;
868
653
  /**
869
- * ACME challenge + ACME key thumbprint
870
- */
654
+ * ACME challenge + ACME key thumbprint
655
+ */
871
656
  readonly keyauth: string | undefined;
657
+ /**
658
+ * Associated ACME Challenge
659
+ */
660
+ readonly challenge: AcmeChallenge;
872
661
  }
873
662
  declare class NewAcmeOrder {
663
+ private constructor();
874
664
  free(): void;
875
- /**
876
- */
877
665
  readonly authorizations: (Uint8Array)[];
878
666
  /**
879
- * Contains raw JSON data of this order. This is parsed by the underlying Rust library hence should not be accessed
880
- */
667
+ * Contains raw JSON data of this order. This is parsed by the underlying Rust library hence should not be accessed
668
+ */
881
669
  readonly delegate: Uint8Array;
882
670
  }
883
- /**
884
- */
885
671
  export class WelcomeBundle {
672
+ private constructor();
886
673
  free(): void;
887
674
  /**
888
- * New CRL Distribution of members of this group
889
- */
890
- readonly crlNewDistributionPoints: Array<any> | undefined;
891
- /**
892
- * Identifier of the joined conversation
893
- */
675
+ * Identifier of the joined conversation
676
+ */
894
677
  readonly id: Uint8Array;
678
+ /**
679
+ * New CRL Distribution of members of this group
680
+ */
681
+ readonly crlNewDistributionPoints: Array<any> | undefined;
895
682
  }
896
- declare class WireIdentity {
683
+ /**
684
+ * Represents the identity claims identifying a client
685
+ * Those claims are verifiable by any member in the group
686
+ */
687
+ export class WireIdentity {
688
+ private constructor();
897
689
  free(): void;
898
690
  /**
899
- * Unique client identifier e.g. `T4Coy4vdRzianwfOgXpn6A:6add501bacd1d90e@whitehouse.gov`
900
- */
691
+ * Unique client identifier e.g. `T4Coy4vdRzianwfOgXpn6A:6add501bacd1d90e@whitehouse.gov`
692
+ */
901
693
  readonly clientId: string;
902
694
  /**
903
- */
904
- readonly credentialType: number;
905
- /**
906
- * Status of the Credential at the moment this object is created
907
- */
695
+ * Status of the Credential at the moment this object is created
696
+ */
908
697
  readonly status: number;
909
698
  /**
910
- * MLS thumbprint
911
- */
699
+ * MLS thumbprint
700
+ */
912
701
  readonly thumbprint: string;
913
- /**
914
- */
702
+ readonly credentialType: number;
915
703
  readonly x509Identity: X509Identity | undefined;
916
704
  }
917
- declare class X509Identity {
705
+ /**
706
+ * Represents the identity claims identifying a client
707
+ * Those claims are verifiable by any member in the group
708
+ */
709
+ export class X509Identity {
710
+ private constructor();
918
711
  free(): void;
919
712
  /**
920
- * X509 certificate identifying this client in the MLS group ; PEM encoded
921
- */
922
- readonly certificate: string;
713
+ * user handle e.g. `john_wire`
714
+ */
715
+ readonly handle: string;
923
716
  /**
924
- * Name as displayed in the messaging application e.g. `John Fitzgerald Kennedy`
925
- */
717
+ * Name as displayed in the messaging application e.g. `John Fitzgerald Kennedy`
718
+ */
926
719
  readonly displayName: string;
927
720
  /**
928
- * DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
929
- */
721
+ * DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
722
+ */
930
723
  readonly domain: string;
931
724
  /**
932
- * user handle e.g. `john_wire`
933
- */
934
- readonly handle: string;
725
+ * X509 certificate identifying this client in the MLS group ; PEM encoded
726
+ */
727
+ readonly certificate: string;
935
728
  /**
936
- * X509 certificate not after as Unix timestamp
937
- */
938
- readonly notAfter: bigint;
729
+ * X509 certificate serial number
730
+ */
731
+ readonly serialNumber: string;
939
732
  /**
940
- * X509 certificate not before as Unix timestamp
941
- */
733
+ * X509 certificate not before as Unix timestamp
734
+ */
942
735
  readonly notBefore: bigint;
943
736
  /**
944
- * X509 certificate serial number
945
- */
946
- readonly serialNumber: string;
737
+ * X509 certificate not after as Unix timestamp
738
+ */
739
+ readonly notAfter: bigint;
947
740
  }
948
741
  /**
949
742
  * see [core_crypto::prelude::CiphersuiteName]