@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.
- package/package.json +1 -1
- package/src/core-crypto-ffi_bg.wasm +0 -0
- package/src/core-crypto-ffi_bg.wasm.d.ts +236 -233
- package/src/corecrypto.d.ts +432 -639
- package/src/corecrypto.js +1007 -1178
package/src/corecrypto.d.ts
CHANGED
@@ -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
|
-
|
50
|
-
|
29
|
+
* DH KEM x25519 | AES-GCM 128 | SHA2-256 | Ed25519
|
30
|
+
*/
|
51
31
|
MLS_128_DHKEMX25519_AES128GCM_SHA256_Ed25519 = 1,
|
52
32
|
/**
|
53
|
-
|
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
|
-
|
58
|
-
|
37
|
+
* DH KEM x25519 | Chacha20Poly1305 | SHA2-256 | Ed25519
|
38
|
+
*/
|
59
39
|
MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519 = 3,
|
60
40
|
/**
|
61
|
-
|
62
|
-
|
41
|
+
* DH KEM x448 | AES-GCM 256 | SHA2-512 | Ed448
|
42
|
+
*/
|
63
43
|
MLS_256_DHKEMX448_AES256GCM_SHA512_Ed448 = 4,
|
64
44
|
/**
|
65
|
-
|
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
|
-
|
70
|
-
|
49
|
+
* DH KEM x448 | Chacha20Poly1305 | SHA2-512 | Ed448
|
50
|
+
*/
|
71
51
|
MLS_256_DHKEMX448_CHACHA20POLY1305_SHA512_Ed448 = 6,
|
72
52
|
/**
|
73
|
-
|
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
|
-
|
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
|
-
|
85
|
-
|
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
|
-
|
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
|
-
|
112
|
-
|
117
|
+
* Features enabled for this build
|
118
|
+
*/
|
113
119
|
readonly cargoFeatures: string;
|
114
120
|
/**
|
115
|
-
|
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
|
-
|
120
|
-
|
133
|
+
* Output of `git describe`
|
134
|
+
*/
|
121
135
|
readonly gitDescribe: string;
|
122
136
|
/**
|
123
|
-
|
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
|
-
|
132
|
-
|
133
|
-
readonly
|
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
|
-
|
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
|
-
|
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
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
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
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
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
|
-
|
188
|
-
|
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
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
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
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
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
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
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
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
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
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
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
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
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
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
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
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
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
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
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
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
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
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
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
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
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
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
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
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
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
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
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
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
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
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
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
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
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
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
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
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
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
|
-
|
372
|
-
|
373
|
-
|
374
|
-
|
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
|
-
|
380
|
-
|
381
|
-
|
382
|
-
|
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
|
-
|
389
|
-
|
390
|
-
|
391
|
-
|
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
|
-
|
397
|
-
|
398
|
-
|
399
|
-
|
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
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
*/
|
329
|
+
* Returns: [`WasmCryptoResult<()>`]
|
330
|
+
*
|
331
|
+
* see [core_crypto::proteus::ProteusCentral::try_new]
|
332
|
+
*/
|
409
333
|
proteus_init(): Promise<any>;
|
410
334
|
/**
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
|
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
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
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
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
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
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
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
|
-
|
448
|
-
|
449
|
-
|
450
|
-
|
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
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
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
|
-
|
465
|
-
|
466
|
-
|
467
|
-
|
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
|
-
|
474
|
-
|
475
|
-
|
476
|
-
|
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
|
-
|
483
|
-
|
484
|
-
|
485
|
-
|
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
|
-
|
491
|
-
|
492
|
-
|
493
|
-
|
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
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
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
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
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
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
*/
|
409
|
+
* Returns: [`WasmCryptoResult<String>`]
|
410
|
+
*
|
411
|
+
* See [core_crypto::context::CentralContext::proteus_fingerprint]
|
412
|
+
*/
|
516
413
|
proteus_fingerprint(): Promise<string>;
|
517
414
|
/**
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
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
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
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
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
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
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
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
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
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
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
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
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
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
|
-
|
588
|
-
|
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
|
-
|
593
|
-
|
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
|
-
|
598
|
-
|
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
|
-
|
604
|
-
|
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
|
-
|
610
|
-
|
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
|
-
|
617
|
-
|
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
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
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
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
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
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
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
|
-
|
650
|
-
|
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
|
-
|
656
|
-
|
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
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
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
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
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
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
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
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
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
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
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
|
-
|
724
|
-
|
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
|
-
|
729
|
-
|
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
|
-
|
737
|
-
|
738
|
-
readonly
|
562
|
+
* Root CA in use (i.e. Trust Anchor)
|
563
|
+
*/
|
564
|
+
readonly root_ca: string;
|
739
565
|
/**
|
740
|
-
|
741
|
-
|
566
|
+
* Intermediate CAs that are loaded
|
567
|
+
*/
|
742
568
|
readonly intermediates: (string)[];
|
743
569
|
/**
|
744
|
-
|
745
|
-
|
746
|
-
readonly
|
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
|
-
|
752
|
-
|
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
|
-
|
758
|
-
|
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
|
-
|
764
|
-
|
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
|
-
|
770
|
-
|
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
|
-
|
776
|
-
|
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
|
-
|
782
|
-
|
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
|
-
|
789
|
-
|
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
|
-
|
795
|
-
|
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
|
-
|
802
|
-
|
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
|
-
|
809
|
-
|
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
|
-
|
815
|
-
|
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
|
-
|
822
|
-
|
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
|
-
|
828
|
-
|
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
|
-
|
835
|
-
|
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
|
-
|
841
|
-
|
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
|
-
|
847
|
-
|
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
|
-
|
853
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
900
|
-
|
691
|
+
* Unique client identifier e.g. `T4Coy4vdRzianwfOgXpn6A:6add501bacd1d90e@whitehouse.gov`
|
692
|
+
*/
|
901
693
|
readonly clientId: string;
|
902
694
|
/**
|
903
|
-
|
904
|
-
|
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
|
-
|
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
|
-
|
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
|
-
|
921
|
-
|
922
|
-
readonly
|
713
|
+
* user handle e.g. `john_wire`
|
714
|
+
*/
|
715
|
+
readonly handle: string;
|
923
716
|
/**
|
924
|
-
|
925
|
-
|
717
|
+
* Name as displayed in the messaging application e.g. `John Fitzgerald Kennedy`
|
718
|
+
*/
|
926
719
|
readonly displayName: string;
|
927
720
|
/**
|
928
|
-
|
929
|
-
|
721
|
+
* DNS domain for which this identity proof was generated e.g. `whitehouse.gov`
|
722
|
+
*/
|
930
723
|
readonly domain: string;
|
931
724
|
/**
|
932
|
-
|
933
|
-
|
934
|
-
readonly
|
725
|
+
* X509 certificate identifying this client in the MLS group ; PEM encoded
|
726
|
+
*/
|
727
|
+
readonly certificate: string;
|
935
728
|
/**
|
936
|
-
|
937
|
-
|
938
|
-
readonly
|
729
|
+
* X509 certificate serial number
|
730
|
+
*/
|
731
|
+
readonly serialNumber: string;
|
939
732
|
/**
|
940
|
-
|
941
|
-
|
733
|
+
* X509 certificate not before as Unix timestamp
|
734
|
+
*/
|
942
735
|
readonly notBefore: bigint;
|
943
736
|
/**
|
944
|
-
|
945
|
-
|
946
|
-
readonly
|
737
|
+
* X509 certificate not after as Unix timestamp
|
738
|
+
*/
|
739
|
+
readonly notAfter: bigint;
|
947
740
|
}
|
948
741
|
/**
|
949
742
|
* see [core_crypto::prelude::CiphersuiteName]
|