@dynamic-labs/embedded-wallet 3.0.0-alpha.8

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +3494 -0
  2. package/LICENSE +21 -0
  3. package/README.md +7 -0
  4. package/_virtual/_tslib.cjs +36 -0
  5. package/_virtual/_tslib.js +32 -0
  6. package/package.json +39 -0
  7. package/src/index.cjs +23 -0
  8. package/src/index.d.ts +7 -0
  9. package/src/index.js +9 -0
  10. package/src/lib/AuthenticatorHandler/TurnkeyAuthenticatorRecoveryHandler.cjs +226 -0
  11. package/src/lib/AuthenticatorHandler/TurnkeyAuthenticatorRecoveryHandler.d.ts +1640 -0
  12. package/src/lib/AuthenticatorHandler/TurnkeyAuthenticatorRecoveryHandler.js +222 -0
  13. package/src/lib/AuthenticatorHandler/index.d.ts +1 -0
  14. package/src/lib/ExportHandler/ExportHandler.cjs +141 -0
  15. package/src/lib/ExportHandler/ExportHandler.d.ts +1630 -0
  16. package/src/lib/ExportHandler/ExportHandler.js +137 -0
  17. package/src/lib/ExportHandler/index.d.ts +1 -0
  18. package/src/lib/TurnkeyWalletConnectorBase/TurnkeyWalletConnectorBase.cjs +217 -0
  19. package/src/lib/TurnkeyWalletConnectorBase/TurnkeyWalletConnectorBase.d.ts +68 -0
  20. package/src/lib/TurnkeyWalletConnectorBase/TurnkeyWalletConnectorBase.js +213 -0
  21. package/src/lib/TurnkeyWalletConnectorBase/index.d.ts +1 -0
  22. package/src/lib/constants.cjs +8 -0
  23. package/src/lib/constants.d.ts +1 -0
  24. package/src/lib/constants.js +4 -0
  25. package/src/lib/utils/PasskeyService/PasskeyService.cjs +41 -0
  26. package/src/lib/utils/PasskeyService/PasskeyService.d.ts +23 -0
  27. package/src/lib/utils/PasskeyService/PasskeyService.js +37 -0
  28. package/src/lib/utils/PasskeyService/index.d.ts +2 -0
  29. package/src/lib/utils/PasskeyService/types.d.ts +6 -0
  30. package/src/lib/utils/PasskeyService/utils/createTurnkeyPasskeyService/createTurnkeyPasskeyService.cjs +14 -0
  31. package/src/lib/utils/PasskeyService/utils/createTurnkeyPasskeyService/createTurnkeyPasskeyService.d.ts +2 -0
  32. package/src/lib/utils/PasskeyService/utils/createTurnkeyPasskeyService/createTurnkeyPasskeyService.js +10 -0
  33. package/src/lib/utils/PasskeyService/utils/createTurnkeyPasskeyService/index.d.ts +1 -0
  34. package/src/lib/utils/base64UrlEncode/base64UrlEncode.cjs +12 -0
  35. package/src/lib/utils/base64UrlEncode/base64UrlEncode.d.ts +1 -0
  36. package/src/lib/utils/base64UrlEncode/base64UrlEncode.js +8 -0
  37. package/src/lib/utils/base64UrlEncode/index.d.ts +1 -0
  38. package/src/lib/utils/convertAttestationTransports/convertAttestationTransports.cjs +17 -0
  39. package/src/lib/utils/convertAttestationTransports/convertAttestationTransports.d.ts +4 -0
  40. package/src/lib/utils/convertAttestationTransports/convertAttestationTransports.js +13 -0
  41. package/src/lib/utils/convertAttestationTransports/index.d.ts +1 -0
  42. package/src/lib/utils/findTurnkeyVerifiedCredential/findTurnkeyVerifiedCredential.cjs +8 -0
  43. package/src/lib/utils/findTurnkeyVerifiedCredential/findTurnkeyVerifiedCredential.d.ts +2 -0
  44. package/src/lib/utils/findTurnkeyVerifiedCredential/findTurnkeyVerifiedCredential.js +4 -0
  45. package/src/lib/utils/findTurnkeyVerifiedCredential/index.d.ts +1 -0
  46. package/src/lib/utils/generateRandomBuffer/generateRandomBuffer.cjs +12 -0
  47. package/src/lib/utils/generateRandomBuffer/generateRandomBuffer.d.ts +1 -0
  48. package/src/lib/utils/generateRandomBuffer/generateRandomBuffer.js +8 -0
  49. package/src/lib/utils/generateRandomBuffer/index.d.ts +1 -0
  50. package/src/lib/utils/index.d.ts +4 -0
  51. package/src/types.cjs +17 -0
  52. package/src/types.d.ts +8 -0
  53. package/src/types.js +13 -0
@@ -0,0 +1,1640 @@
1
+ import { TurnkeyClient } from '@turnkey/http';
2
+ import { AuthenticatorRecoveryHandler, AuthenticatorType, RecoveryWebAuthnAttestation } from '@dynamic-labs/wallet-connector-core';
3
+ declare class TurnkeyAuthenticatorRecoveryHandler implements AuthenticatorRecoveryHandler {
4
+ private __recoveryType;
5
+ private __iframeStamper;
6
+ private __publicKey;
7
+ private __client;
8
+ private __turnkeyRecoveryUserId;
9
+ private __createdAt;
10
+ private __sessionExpiration;
11
+ get publicKey(): string | null | undefined;
12
+ get client(): TurnkeyClient | undefined;
13
+ get recoveryType(): AuthenticatorType | undefined;
14
+ get recoveryUserId(): string;
15
+ set recoveryUserId(turnkeyRecoveryUserId: string);
16
+ clear(): void;
17
+ initRecovery(authType: AuthenticatorType, iframeContainer: HTMLElement, iframeElementId: string, sessionExpiration?: number): Promise<string | null>;
18
+ verifyRecoveryCode(recoveryBundle: string, organizationId?: string): Promise<void>;
19
+ completeRecovery({ attestation, challenge, turnkeySubOrganizationId, }: RecoveryWebAuthnAttestation): Promise<{
20
+ activity: {
21
+ id: string;
22
+ organizationId: string;
23
+ status: "ACTIVITY_STATUS_CREATED" | "ACTIVITY_STATUS_PENDING" | "ACTIVITY_STATUS_COMPLETED" | "ACTIVITY_STATUS_FAILED" | "ACTIVITY_STATUS_CONSENSUS_NEEDED" | "ACTIVITY_STATUS_REJECTED";
24
+ type: "ACTIVITY_TYPE_RECOVER_USER" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" | "ACTIVITY_TYPE_UPDATE_USER" | "ACTIVITY_TYPE_CREATE_API_KEYS" | "ACTIVITY_TYPE_CREATE_USERS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" | "ACTIVITY_TYPE_CREATE_INVITATIONS" | "ACTIVITY_TYPE_ACCEPT_INVITATION" | "ACTIVITY_TYPE_CREATE_POLICY" | "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" | "ACTIVITY_TYPE_DELETE_USERS" | "ACTIVITY_TYPE_DELETE_API_KEYS" | "ACTIVITY_TYPE_DELETE_INVITATION" | "ACTIVITY_TYPE_DELETE_ORGANIZATION" | "ACTIVITY_TYPE_DELETE_POLICY" | "ACTIVITY_TYPE_CREATE_USER_TAG" | "ACTIVITY_TYPE_DELETE_USER_TAGS" | "ACTIVITY_TYPE_CREATE_ORGANIZATION" | "ACTIVITY_TYPE_SIGN_TRANSACTION" | "ACTIVITY_TYPE_APPROVE_ACTIVITY" | "ACTIVITY_TYPE_REJECT_ACTIVITY" | "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD" | "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" | "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" | "ACTIVITY_TYPE_UPDATE_USER_TAG" | "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" | "ACTIVITY_TYPE_CREATE_USERS_V2" | "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" | "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" | "ACTIVITY_TYPE_UPDATE_POLICY" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" | "ACTIVITY_TYPE_CREATE_WALLET" | "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" | "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" | "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" | "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_EXPORT_WALLET" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" | "ACTIVITY_TYPE_EMAIL_AUTH" | "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT";
25
+ intent: {
26
+ createOrganizationIntent: {
27
+ organizationName: string;
28
+ rootEmail: string;
29
+ rootAuthenticator: {
30
+ authenticatorName: string;
31
+ userId: string;
32
+ attestation: {
33
+ id: string;
34
+ type: "public-key";
35
+ rawId: string;
36
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
37
+ response: {
38
+ clientDataJson: string;
39
+ attestationObject: string;
40
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
41
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
42
+ };
43
+ clientExtensionResults: {
44
+ appid?: boolean | undefined;
45
+ appidExclude?: boolean | undefined;
46
+ credProps?: {
47
+ rk: boolean;
48
+ } | undefined;
49
+ };
50
+ };
51
+ challenge: string;
52
+ };
53
+ rootUserId?: string | undefined;
54
+ };
55
+ createAuthenticatorsIntent?: {
56
+ authenticators: {
57
+ authenticatorName: string;
58
+ userId: string;
59
+ attestation: {
60
+ id: string;
61
+ type: "public-key";
62
+ rawId: string;
63
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
64
+ response: {
65
+ clientDataJson: string;
66
+ attestationObject: string;
67
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
68
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
69
+ };
70
+ clientExtensionResults: {
71
+ appid?: boolean | undefined;
72
+ appidExclude?: boolean | undefined;
73
+ credProps?: {
74
+ rk: boolean;
75
+ } | undefined;
76
+ };
77
+ };
78
+ challenge: string;
79
+ }[];
80
+ userId: string;
81
+ } | undefined;
82
+ createUsersIntent?: {
83
+ users: {
84
+ userName: string;
85
+ userEmail?: string | undefined;
86
+ accessType: "ACCESS_TYPE_WEB" | "ACCESS_TYPE_API" | "ACCESS_TYPE_ALL";
87
+ apiKeys: {
88
+ apiKeyName: string;
89
+ publicKey: string;
90
+ expirationSeconds?: string | undefined;
91
+ }[];
92
+ authenticators: {
93
+ authenticatorName: string;
94
+ userId: string;
95
+ attestation: {
96
+ id: string;
97
+ type: "public-key";
98
+ rawId: string;
99
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
100
+ response: {
101
+ clientDataJson: string;
102
+ attestationObject: string;
103
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
104
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
105
+ };
106
+ clientExtensionResults: {
107
+ appid?: boolean | undefined;
108
+ appidExclude?: boolean | undefined;
109
+ credProps?: {
110
+ rk: boolean;
111
+ } | undefined;
112
+ };
113
+ };
114
+ challenge: string;
115
+ }[];
116
+ userTags: string[];
117
+ }[];
118
+ } | undefined;
119
+ createPrivateKeysIntent?: {
120
+ privateKeys: {
121
+ privateKeyName: string;
122
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
123
+ privateKeyTags: string[];
124
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
125
+ }[];
126
+ } | undefined;
127
+ signRawPayloadIntent?: {
128
+ privateKeyId: string;
129
+ payload: string;
130
+ encoding: "PAYLOAD_ENCODING_HEXADECIMAL" | "PAYLOAD_ENCODING_TEXT_UTF8";
131
+ hashFunction: "HASH_FUNCTION_NO_OP" | "HASH_FUNCTION_SHA256" | "HASH_FUNCTION_KECCAK256" | "HASH_FUNCTION_NOT_APPLICABLE";
132
+ } | undefined;
133
+ createInvitationsIntent?: {
134
+ invitations: {
135
+ receiverUserName: string;
136
+ receiverUserEmail: string;
137
+ receiverUserTags: string[];
138
+ accessType: "ACCESS_TYPE_WEB" | "ACCESS_TYPE_API" | "ACCESS_TYPE_ALL";
139
+ senderUserId: string;
140
+ }[];
141
+ } | undefined;
142
+ acceptInvitationIntent?: {
143
+ invitationId: string;
144
+ userId: string;
145
+ authenticator: {
146
+ authenticatorName: string;
147
+ userId: string;
148
+ attestation: {
149
+ id: string;
150
+ type: "public-key";
151
+ rawId: string;
152
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
153
+ response: {
154
+ clientDataJson: string;
155
+ attestationObject: string;
156
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
157
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
158
+ };
159
+ clientExtensionResults: {
160
+ appid?: boolean | undefined;
161
+ appidExclude?: boolean | undefined;
162
+ credProps?: {
163
+ rk: boolean;
164
+ } | undefined;
165
+ };
166
+ };
167
+ challenge: string;
168
+ };
169
+ } | undefined;
170
+ createPolicyIntent?: {
171
+ policyName: string;
172
+ selectors: {
173
+ subject?: string | undefined;
174
+ operator?: "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" | "OPERATOR_MORE_THAN_OR_EQUAL" | "OPERATOR_LESS_THAN" | "OPERATOR_LESS_THAN_OR_EQUAL" | "OPERATOR_CONTAINS" | "OPERATOR_NOT_EQUAL" | "OPERATOR_IN" | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL" | undefined;
175
+ target?: string | undefined;
176
+ }[];
177
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
178
+ notes?: string | undefined;
179
+ } | undefined;
180
+ disablePrivateKeyIntent?: {
181
+ privateKeyId: string;
182
+ } | undefined;
183
+ deleteUsersIntent?: {
184
+ userIds: string[];
185
+ } | undefined;
186
+ deleteAuthenticatorsIntent?: {
187
+ userId: string;
188
+ authenticatorIds: string[];
189
+ } | undefined;
190
+ deleteInvitationIntent?: {
191
+ invitationId: string;
192
+ } | undefined;
193
+ deleteOrganizationIntent?: {
194
+ organizationId: string;
195
+ } | undefined;
196
+ deletePolicyIntent?: {
197
+ policyId: string;
198
+ } | undefined;
199
+ createUserTagIntent?: {
200
+ userTagName: string;
201
+ userIds: string[];
202
+ } | undefined;
203
+ deleteUserTagsIntent?: {
204
+ userTagIds: string[];
205
+ } | undefined;
206
+ signTransactionIntent?: {
207
+ privateKeyId: string;
208
+ unsignedTransaction: string;
209
+ type: "TRANSACTION_TYPE_ETHEREUM";
210
+ } | undefined;
211
+ createApiKeysIntent?: {
212
+ apiKeys: {
213
+ apiKeyName: string;
214
+ publicKey: string;
215
+ expirationSeconds?: string | undefined;
216
+ }[];
217
+ userId: string;
218
+ } | undefined;
219
+ deleteApiKeysIntent?: {
220
+ userId: string;
221
+ apiKeyIds: string[];
222
+ } | undefined;
223
+ approveActivityIntent?: {
224
+ fingerprint: string;
225
+ } | undefined;
226
+ rejectActivityIntent?: {
227
+ fingerprint: string;
228
+ } | undefined;
229
+ createPrivateKeyTagIntent?: {
230
+ privateKeyTagName: string;
231
+ privateKeyIds: string[];
232
+ } | undefined;
233
+ deletePrivateKeyTagsIntent?: {
234
+ privateKeyTagIds: string[];
235
+ } | undefined;
236
+ createPolicyIntentV2?: {
237
+ policyName: string;
238
+ selectors: {
239
+ subject?: string | undefined;
240
+ operator?: "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" | "OPERATOR_MORE_THAN_OR_EQUAL" | "OPERATOR_LESS_THAN" | "OPERATOR_LESS_THAN_OR_EQUAL" | "OPERATOR_CONTAINS" | "OPERATOR_NOT_EQUAL" | "OPERATOR_IN" | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL" | undefined;
241
+ targets?: string[] | undefined;
242
+ }[];
243
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
244
+ notes?: string | undefined;
245
+ } | undefined;
246
+ setPaymentMethodIntent?: {
247
+ number: string;
248
+ cvv: string;
249
+ expiryMonth: string;
250
+ expiryYear: string;
251
+ cardHolderEmail: string;
252
+ cardHolderName: string;
253
+ } | undefined;
254
+ activateBillingTierIntent?: {
255
+ productId: string;
256
+ } | undefined;
257
+ deletePaymentMethodIntent?: {
258
+ paymentMethodId: string;
259
+ } | undefined;
260
+ createPolicyIntentV3?: {
261
+ policyName: string;
262
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
263
+ condition?: string | undefined;
264
+ consensus?: string | undefined;
265
+ notes?: string | undefined;
266
+ } | undefined;
267
+ createApiOnlyUsersIntent?: {
268
+ apiOnlyUsers: {
269
+ userName: string;
270
+ userEmail?: string | undefined;
271
+ userTags: string[];
272
+ apiKeys: {
273
+ apiKeyName: string;
274
+ publicKey: string;
275
+ expirationSeconds?: string | undefined;
276
+ }[];
277
+ }[];
278
+ } | undefined;
279
+ updateRootQuorumIntent?: {
280
+ threshold: number;
281
+ userIds: string[];
282
+ } | undefined;
283
+ updateUserTagIntent?: {
284
+ userTagId: string;
285
+ newUserTagName?: string | undefined;
286
+ addUserIds: string[];
287
+ removeUserIds: string[];
288
+ } | undefined;
289
+ updatePrivateKeyTagIntent?: {
290
+ privateKeyTagId: string;
291
+ newPrivateKeyTagName?: string | undefined;
292
+ addPrivateKeyIds: string[];
293
+ removePrivateKeyIds: string[];
294
+ } | undefined;
295
+ createAuthenticatorsIntentV2?: {
296
+ authenticators: {
297
+ authenticatorName: string;
298
+ challenge: string;
299
+ attestation: {
300
+ credentialId: string;
301
+ clientDataJson: string;
302
+ attestationObject: string;
303
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
304
+ };
305
+ }[];
306
+ userId: string;
307
+ } | undefined;
308
+ acceptInvitationIntentV2?: {
309
+ invitationId: string;
310
+ userId: string;
311
+ authenticator: {
312
+ authenticatorName: string;
313
+ challenge: string;
314
+ attestation: {
315
+ credentialId: string;
316
+ clientDataJson: string;
317
+ attestationObject: string;
318
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
319
+ };
320
+ };
321
+ } | undefined;
322
+ createOrganizationIntentV2?: {
323
+ organizationName: string;
324
+ rootEmail: string;
325
+ rootAuthenticator: {
326
+ authenticatorName: string;
327
+ challenge: string;
328
+ attestation: {
329
+ credentialId: string;
330
+ clientDataJson: string;
331
+ attestationObject: string;
332
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
333
+ };
334
+ };
335
+ rootUserId?: string | undefined;
336
+ } | undefined;
337
+ createUsersIntentV2?: {
338
+ users: {
339
+ userName: string;
340
+ userEmail?: string | undefined;
341
+ apiKeys: {
342
+ apiKeyName: string;
343
+ publicKey: string;
344
+ expirationSeconds?: string | undefined;
345
+ }[];
346
+ authenticators: {
347
+ authenticatorName: string;
348
+ challenge: string;
349
+ attestation: {
350
+ credentialId: string;
351
+ clientDataJson: string;
352
+ attestationObject: string;
353
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
354
+ };
355
+ }[];
356
+ userTags: string[];
357
+ }[];
358
+ } | undefined;
359
+ createSubOrganizationIntent?: {
360
+ name: string;
361
+ rootAuthenticator: {
362
+ authenticatorName: string;
363
+ challenge: string;
364
+ attestation: {
365
+ credentialId: string;
366
+ clientDataJson: string;
367
+ attestationObject: string;
368
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
369
+ };
370
+ };
371
+ } | undefined;
372
+ createSubOrganizationIntentV2?: {
373
+ subOrganizationName: string;
374
+ rootUsers: {
375
+ userName: string;
376
+ userEmail?: string | undefined;
377
+ apiKeys: {
378
+ apiKeyName: string;
379
+ publicKey: string;
380
+ expirationSeconds?: string | undefined;
381
+ }[];
382
+ authenticators: {
383
+ authenticatorName: string;
384
+ challenge: string;
385
+ attestation: {
386
+ credentialId: string;
387
+ clientDataJson: string;
388
+ attestationObject: string;
389
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
390
+ };
391
+ }[];
392
+ }[];
393
+ rootQuorumThreshold: number;
394
+ } | undefined;
395
+ updateAllowedOriginsIntent?: {
396
+ allowedOrigins: string[];
397
+ } | undefined;
398
+ createPrivateKeysIntentV2?: {
399
+ privateKeys: {
400
+ privateKeyName: string;
401
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
402
+ privateKeyTags: string[];
403
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
404
+ }[];
405
+ } | undefined;
406
+ updateUserIntent?: {
407
+ userId: string;
408
+ userName?: string | undefined;
409
+ userEmail?: string | undefined;
410
+ userTagIds?: string[] | undefined;
411
+ } | undefined;
412
+ updatePolicyIntent?: {
413
+ policyId: string;
414
+ policyName?: string | undefined;
415
+ policyEffect?: "EFFECT_ALLOW" | "EFFECT_DENY" | undefined;
416
+ policyCondition?: string | undefined;
417
+ policyConsensus?: string | undefined;
418
+ policyNotes?: string | undefined;
419
+ } | undefined;
420
+ setPaymentMethodIntentV2?: {
421
+ paymentMethodId: string;
422
+ cardHolderEmail: string;
423
+ cardHolderName: string;
424
+ } | undefined;
425
+ createSubOrganizationIntentV3?: {
426
+ subOrganizationName: string;
427
+ rootUsers: {
428
+ userName: string;
429
+ userEmail?: string | undefined;
430
+ apiKeys: {
431
+ apiKeyName: string;
432
+ publicKey: string;
433
+ expirationSeconds?: string | undefined;
434
+ }[];
435
+ authenticators: {
436
+ authenticatorName: string;
437
+ challenge: string;
438
+ attestation: {
439
+ credentialId: string;
440
+ clientDataJson: string;
441
+ attestationObject: string;
442
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
443
+ };
444
+ }[];
445
+ }[];
446
+ rootQuorumThreshold: number;
447
+ privateKeys: {
448
+ privateKeyName: string;
449
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
450
+ privateKeyTags: string[];
451
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
452
+ }[];
453
+ } | undefined;
454
+ createWalletIntent?: {
455
+ walletName: string;
456
+ accounts: {
457
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
458
+ pathFormat: "PATH_FORMAT_BIP32";
459
+ path: string;
460
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
461
+ }[];
462
+ mnemonicLength?: number | undefined;
463
+ } | undefined;
464
+ createWalletAccountsIntent?: {
465
+ walletId: string;
466
+ accounts: {
467
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
468
+ pathFormat: "PATH_FORMAT_BIP32";
469
+ path: string;
470
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
471
+ }[];
472
+ } | undefined;
473
+ initUserEmailRecoveryIntent?: {
474
+ email: string;
475
+ targetPublicKey: string;
476
+ expirationSeconds?: string | undefined;
477
+ } | undefined;
478
+ recoverUserIntent?: {
479
+ authenticator: {
480
+ authenticatorName: string;
481
+ challenge: string;
482
+ attestation: {
483
+ credentialId: string;
484
+ clientDataJson: string;
485
+ attestationObject: string;
486
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
487
+ };
488
+ };
489
+ userId: string;
490
+ } | undefined;
491
+ setOrganizationFeatureIntent?: {
492
+ name: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY";
493
+ value: string;
494
+ } | undefined;
495
+ removeOrganizationFeatureIntent?: {
496
+ name: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY";
497
+ } | undefined;
498
+ signRawPayloadIntentV2?: {
499
+ signWith: string;
500
+ payload: string;
501
+ encoding: "PAYLOAD_ENCODING_HEXADECIMAL" | "PAYLOAD_ENCODING_TEXT_UTF8";
502
+ hashFunction: "HASH_FUNCTION_NO_OP" | "HASH_FUNCTION_SHA256" | "HASH_FUNCTION_KECCAK256" | "HASH_FUNCTION_NOT_APPLICABLE";
503
+ } | undefined;
504
+ signTransactionIntentV2?: {
505
+ signWith: string;
506
+ unsignedTransaction: string;
507
+ type: "TRANSACTION_TYPE_ETHEREUM";
508
+ } | undefined;
509
+ exportPrivateKeyIntent?: {
510
+ privateKeyId: string;
511
+ targetPublicKey: string;
512
+ } | undefined;
513
+ exportWalletIntent?: {
514
+ walletId: string;
515
+ targetPublicKey: string;
516
+ language?: "MNEMONIC_LANGUAGE_ENGLISH" | "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" | "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" | "MNEMONIC_LANGUAGE_CZECH" | "MNEMONIC_LANGUAGE_FRENCH" | "MNEMONIC_LANGUAGE_ITALIAN" | "MNEMONIC_LANGUAGE_JAPANESE" | "MNEMONIC_LANGUAGE_KOREAN" | "MNEMONIC_LANGUAGE_SPANISH" | undefined;
517
+ } | undefined;
518
+ createSubOrganizationIntentV4?: {
519
+ subOrganizationName: string;
520
+ rootUsers: {
521
+ userName: string;
522
+ userEmail?: string | undefined;
523
+ apiKeys: {
524
+ apiKeyName: string;
525
+ publicKey: string;
526
+ expirationSeconds?: string | undefined;
527
+ }[];
528
+ authenticators: {
529
+ authenticatorName: string;
530
+ challenge: string;
531
+ attestation: {
532
+ credentialId: string;
533
+ clientDataJson: string;
534
+ attestationObject: string;
535
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
536
+ };
537
+ }[];
538
+ }[];
539
+ rootQuorumThreshold: number;
540
+ wallet?: {
541
+ walletName: string;
542
+ accounts: {
543
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
544
+ pathFormat: "PATH_FORMAT_BIP32";
545
+ path: string;
546
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
547
+ }[];
548
+ mnemonicLength?: number | undefined;
549
+ } | undefined;
550
+ disableEmailRecovery?: boolean | undefined;
551
+ disableEmailAuth?: boolean | undefined;
552
+ } | undefined;
553
+ emailAuthIntent?: {
554
+ email: string;
555
+ targetPublicKey: string;
556
+ apiKeyName?: string | undefined;
557
+ expirationSeconds?: string | undefined;
558
+ emailCustomization?: {
559
+ subject?: string | undefined;
560
+ body?: string | undefined;
561
+ styling?: string | undefined;
562
+ urlPrefix?: string | undefined;
563
+ } | undefined;
564
+ } | undefined;
565
+ exportWalletAccountIntent?: {
566
+ address: string;
567
+ targetPublicKey: string;
568
+ } | undefined;
569
+ };
570
+ result: {
571
+ createOrganizationResult?: {
572
+ organizationId: string;
573
+ } | undefined;
574
+ createAuthenticatorsResult?: {
575
+ authenticatorIds: string[];
576
+ } | undefined;
577
+ createUsersResult?: {
578
+ userIds: string[];
579
+ } | undefined;
580
+ createPrivateKeysResult?: {
581
+ privateKeyIds: string[];
582
+ } | undefined;
583
+ createInvitationsResult?: {
584
+ invitationIds: string[];
585
+ } | undefined;
586
+ acceptInvitationResult?: {
587
+ invitationId: string;
588
+ userId: string;
589
+ } | undefined;
590
+ signRawPayloadResult?: {
591
+ r: string;
592
+ s: string;
593
+ v: string;
594
+ } | undefined;
595
+ createPolicyResult?: {
596
+ policyId: string;
597
+ } | undefined;
598
+ disablePrivateKeyResult?: {
599
+ privateKeyId: string;
600
+ } | undefined;
601
+ deleteUsersResult?: {
602
+ userIds: string[];
603
+ } | undefined;
604
+ deleteAuthenticatorsResult?: {
605
+ authenticatorIds: string[];
606
+ } | undefined;
607
+ deleteInvitationResult?: {
608
+ invitationId: string;
609
+ } | undefined;
610
+ deleteOrganizationResult?: {
611
+ organizationId: string;
612
+ } | undefined;
613
+ deletePolicyResult?: {
614
+ policyId: string;
615
+ } | undefined;
616
+ createUserTagResult?: {
617
+ userTagId: string;
618
+ userIds: string[];
619
+ } | undefined;
620
+ deleteUserTagsResult?: {
621
+ userTagIds: string[];
622
+ userIds: string[];
623
+ } | undefined;
624
+ signTransactionResult?: {
625
+ signedTransaction: string;
626
+ } | undefined;
627
+ deleteApiKeysResult?: {
628
+ apiKeyIds: string[];
629
+ } | undefined;
630
+ createApiKeysResult?: {
631
+ apiKeyIds: string[];
632
+ } | undefined;
633
+ createPrivateKeyTagResult?: {
634
+ privateKeyTagId: string;
635
+ privateKeyIds: string[];
636
+ } | undefined;
637
+ deletePrivateKeyTagsResult?: {
638
+ privateKeyTagIds: string[];
639
+ privateKeyIds: string[];
640
+ } | undefined;
641
+ setPaymentMethodResult?: {
642
+ lastFour: string;
643
+ cardHolderName: string;
644
+ cardHolderEmail: string;
645
+ } | undefined;
646
+ activateBillingTierResult?: {
647
+ productId: string;
648
+ } | undefined;
649
+ deletePaymentMethodResult?: {
650
+ paymentMethodId: string;
651
+ } | undefined;
652
+ createApiOnlyUsersResult?: {
653
+ userIds: string[];
654
+ } | undefined;
655
+ updateRootQuorumResult?: {
656
+ [key: string]: unknown;
657
+ } | undefined;
658
+ updateUserTagResult?: {
659
+ userTagId: string;
660
+ } | undefined;
661
+ updatePrivateKeyTagResult?: {
662
+ privateKeyTagId: string;
663
+ } | undefined;
664
+ createSubOrganizationResult?: {
665
+ subOrganizationId: string;
666
+ } | undefined;
667
+ updateAllowedOriginsResult?: {
668
+ [key: string]: unknown;
669
+ } | undefined;
670
+ createPrivateKeysResultV2?: {
671
+ privateKeys: {
672
+ privateKeyId?: string | undefined;
673
+ addresses?: {
674
+ format?: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | undefined;
675
+ address?: string | undefined;
676
+ }[] | undefined;
677
+ }[];
678
+ } | undefined;
679
+ updateUserResult?: {
680
+ userId: string;
681
+ } | undefined;
682
+ updatePolicyResult?: {
683
+ policyId: string;
684
+ } | undefined;
685
+ createSubOrganizationResultV3?: {
686
+ subOrganizationId: string;
687
+ privateKeys: {
688
+ privateKeyId?: string | undefined;
689
+ addresses?: {
690
+ format?: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | undefined;
691
+ address?: string | undefined;
692
+ }[] | undefined;
693
+ }[];
694
+ } | undefined;
695
+ createWalletResult?: {
696
+ walletId: string;
697
+ addresses: string[];
698
+ } | undefined;
699
+ createWalletAccountsResult?: {
700
+ addresses: string[];
701
+ } | undefined;
702
+ initUserEmailRecoveryResult?: {
703
+ userId: string;
704
+ } | undefined;
705
+ recoverUserResult?: {
706
+ authenticatorId: string[];
707
+ } | undefined;
708
+ setOrganizationFeatureResult?: {
709
+ features: {
710
+ name?: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY" | undefined;
711
+ value?: string | undefined;
712
+ }[];
713
+ } | undefined;
714
+ removeOrganizationFeatureResult?: {
715
+ features: {
716
+ name?: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY" | undefined;
717
+ value?: string | undefined;
718
+ }[];
719
+ } | undefined;
720
+ exportPrivateKeyResult?: {
721
+ privateKeyId: string;
722
+ exportBundle: string;
723
+ } | undefined;
724
+ exportWalletResult?: {
725
+ walletId: string;
726
+ exportBundle: string;
727
+ } | undefined;
728
+ createSubOrganizationResultV4?: {
729
+ subOrganizationId: string;
730
+ wallet?: {
731
+ walletId: string;
732
+ addresses: string[];
733
+ } | undefined;
734
+ } | undefined;
735
+ emailAuthResult?: {
736
+ userId: string;
737
+ apiKeyId: string;
738
+ } | undefined;
739
+ exportWalletAccountResult?: {
740
+ address: string;
741
+ exportBundle: string;
742
+ } | undefined;
743
+ };
744
+ votes: {
745
+ id: string;
746
+ userId: string;
747
+ user: {
748
+ userId: string;
749
+ userName: string;
750
+ userEmail?: string | undefined;
751
+ authenticators: {
752
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
753
+ attestationType: string;
754
+ aaguid: string;
755
+ credentialId: string;
756
+ model: string;
757
+ credential: {
758
+ publicKey: string;
759
+ type: "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR";
760
+ };
761
+ authenticatorId: string;
762
+ authenticatorName: string;
763
+ createdAt: {
764
+ seconds: string;
765
+ nanos: string;
766
+ };
767
+ updatedAt: {
768
+ seconds: string;
769
+ nanos: string;
770
+ };
771
+ }[];
772
+ apiKeys: {
773
+ credential: {
774
+ publicKey: string;
775
+ type: "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR";
776
+ };
777
+ apiKeyId: string;
778
+ apiKeyName: string;
779
+ createdAt: {
780
+ seconds: string;
781
+ nanos: string;
782
+ };
783
+ updatedAt: {
784
+ seconds: string;
785
+ nanos: string;
786
+ };
787
+ expirationSeconds?: string | undefined;
788
+ }[];
789
+ userTags: string[];
790
+ createdAt: {
791
+ seconds: string;
792
+ nanos: string;
793
+ };
794
+ updatedAt: {
795
+ seconds: string;
796
+ nanos: string;
797
+ };
798
+ };
799
+ activityId: string;
800
+ selection: "VOTE_SELECTION_APPROVED" | "VOTE_SELECTION_REJECTED";
801
+ message: string;
802
+ publicKey: string;
803
+ signature: string;
804
+ scheme: string;
805
+ createdAt: {
806
+ seconds: string;
807
+ nanos: string;
808
+ };
809
+ }[];
810
+ fingerprint: string;
811
+ canApprove: boolean;
812
+ canReject: boolean;
813
+ createdAt: {
814
+ seconds: string;
815
+ nanos: string;
816
+ };
817
+ updatedAt: {
818
+ seconds: string;
819
+ nanos: string;
820
+ };
821
+ };
822
+ }>;
823
+ isSessionActive: () => boolean;
824
+ addPasskeyAuthenticator({ attestation, challenge, turnkeySubOrganizationId, }: RecoveryWebAuthnAttestation): Promise<{
825
+ activity: {
826
+ id: string;
827
+ organizationId: string;
828
+ status: "ACTIVITY_STATUS_CREATED" | "ACTIVITY_STATUS_PENDING" | "ACTIVITY_STATUS_COMPLETED" | "ACTIVITY_STATUS_FAILED" | "ACTIVITY_STATUS_CONSENSUS_NEEDED" | "ACTIVITY_STATUS_REJECTED";
829
+ type: "ACTIVITY_TYPE_RECOVER_USER" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" | "ACTIVITY_TYPE_UPDATE_USER" | "ACTIVITY_TYPE_CREATE_API_KEYS" | "ACTIVITY_TYPE_CREATE_USERS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" | "ACTIVITY_TYPE_CREATE_INVITATIONS" | "ACTIVITY_TYPE_ACCEPT_INVITATION" | "ACTIVITY_TYPE_CREATE_POLICY" | "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" | "ACTIVITY_TYPE_DELETE_USERS" | "ACTIVITY_TYPE_DELETE_API_KEYS" | "ACTIVITY_TYPE_DELETE_INVITATION" | "ACTIVITY_TYPE_DELETE_ORGANIZATION" | "ACTIVITY_TYPE_DELETE_POLICY" | "ACTIVITY_TYPE_CREATE_USER_TAG" | "ACTIVITY_TYPE_DELETE_USER_TAGS" | "ACTIVITY_TYPE_CREATE_ORGANIZATION" | "ACTIVITY_TYPE_SIGN_TRANSACTION" | "ACTIVITY_TYPE_APPROVE_ACTIVITY" | "ACTIVITY_TYPE_REJECT_ACTIVITY" | "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD" | "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" | "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" | "ACTIVITY_TYPE_UPDATE_USER_TAG" | "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" | "ACTIVITY_TYPE_CREATE_USERS_V2" | "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" | "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" | "ACTIVITY_TYPE_UPDATE_POLICY" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" | "ACTIVITY_TYPE_CREATE_WALLET" | "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" | "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" | "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" | "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_EXPORT_WALLET" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" | "ACTIVITY_TYPE_EMAIL_AUTH" | "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT";
830
+ intent: {
831
+ createOrganizationIntent: {
832
+ organizationName: string;
833
+ rootEmail: string;
834
+ rootAuthenticator: {
835
+ authenticatorName: string;
836
+ userId: string;
837
+ attestation: {
838
+ id: string;
839
+ type: "public-key";
840
+ rawId: string;
841
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
842
+ response: {
843
+ clientDataJson: string;
844
+ attestationObject: string;
845
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
846
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
847
+ };
848
+ clientExtensionResults: {
849
+ appid?: boolean | undefined;
850
+ appidExclude?: boolean | undefined;
851
+ credProps?: {
852
+ rk: boolean;
853
+ } | undefined;
854
+ };
855
+ };
856
+ challenge: string;
857
+ };
858
+ rootUserId?: string | undefined;
859
+ };
860
+ createAuthenticatorsIntent?: {
861
+ authenticators: {
862
+ authenticatorName: string;
863
+ userId: string;
864
+ attestation: {
865
+ id: string;
866
+ type: "public-key";
867
+ rawId: string;
868
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
869
+ response: {
870
+ clientDataJson: string;
871
+ attestationObject: string;
872
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
873
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
874
+ };
875
+ clientExtensionResults: {
876
+ appid?: boolean | undefined;
877
+ appidExclude?: boolean | undefined;
878
+ credProps?: {
879
+ rk: boolean;
880
+ } | undefined;
881
+ };
882
+ };
883
+ challenge: string;
884
+ }[];
885
+ userId: string;
886
+ } | undefined;
887
+ createUsersIntent?: {
888
+ users: {
889
+ userName: string;
890
+ userEmail?: string | undefined;
891
+ accessType: "ACCESS_TYPE_WEB" | "ACCESS_TYPE_API" | "ACCESS_TYPE_ALL";
892
+ apiKeys: {
893
+ apiKeyName: string;
894
+ publicKey: string;
895
+ expirationSeconds?: string | undefined;
896
+ }[];
897
+ authenticators: {
898
+ authenticatorName: string;
899
+ userId: string;
900
+ attestation: {
901
+ id: string;
902
+ type: "public-key";
903
+ rawId: string;
904
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
905
+ response: {
906
+ clientDataJson: string;
907
+ attestationObject: string;
908
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
909
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
910
+ };
911
+ clientExtensionResults: {
912
+ appid?: boolean | undefined;
913
+ appidExclude?: boolean | undefined;
914
+ credProps?: {
915
+ rk: boolean;
916
+ } | undefined;
917
+ };
918
+ };
919
+ challenge: string;
920
+ }[];
921
+ userTags: string[];
922
+ }[];
923
+ } | undefined;
924
+ createPrivateKeysIntent?: {
925
+ privateKeys: {
926
+ privateKeyName: string;
927
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
928
+ privateKeyTags: string[];
929
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
930
+ }[];
931
+ } | undefined;
932
+ signRawPayloadIntent?: {
933
+ privateKeyId: string;
934
+ payload: string;
935
+ encoding: "PAYLOAD_ENCODING_HEXADECIMAL" | "PAYLOAD_ENCODING_TEXT_UTF8";
936
+ hashFunction: "HASH_FUNCTION_NO_OP" | "HASH_FUNCTION_SHA256" | "HASH_FUNCTION_KECCAK256" | "HASH_FUNCTION_NOT_APPLICABLE";
937
+ } | undefined;
938
+ createInvitationsIntent?: {
939
+ invitations: {
940
+ receiverUserName: string;
941
+ receiverUserEmail: string;
942
+ receiverUserTags: string[];
943
+ accessType: "ACCESS_TYPE_WEB" | "ACCESS_TYPE_API" | "ACCESS_TYPE_ALL";
944
+ senderUserId: string;
945
+ }[];
946
+ } | undefined;
947
+ acceptInvitationIntent?: {
948
+ invitationId: string;
949
+ userId: string;
950
+ authenticator: {
951
+ authenticatorName: string;
952
+ userId: string;
953
+ attestation: {
954
+ id: string;
955
+ type: "public-key";
956
+ rawId: string;
957
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
958
+ response: {
959
+ clientDataJson: string;
960
+ attestationObject: string;
961
+ transports?: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[] | undefined;
962
+ authenticatorAttachment?: "cross-platform" | "platform" | null | undefined;
963
+ };
964
+ clientExtensionResults: {
965
+ appid?: boolean | undefined;
966
+ appidExclude?: boolean | undefined;
967
+ credProps?: {
968
+ rk: boolean;
969
+ } | undefined;
970
+ };
971
+ };
972
+ challenge: string;
973
+ };
974
+ } | undefined;
975
+ createPolicyIntent?: {
976
+ policyName: string;
977
+ selectors: {
978
+ subject?: string | undefined;
979
+ operator?: "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" | "OPERATOR_MORE_THAN_OR_EQUAL" | "OPERATOR_LESS_THAN" | "OPERATOR_LESS_THAN_OR_EQUAL" | "OPERATOR_CONTAINS" | "OPERATOR_NOT_EQUAL" | "OPERATOR_IN" | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL" | undefined;
980
+ target?: string | undefined;
981
+ }[];
982
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
983
+ notes?: string | undefined;
984
+ } | undefined;
985
+ disablePrivateKeyIntent?: {
986
+ privateKeyId: string;
987
+ } | undefined;
988
+ deleteUsersIntent?: {
989
+ userIds: string[];
990
+ } | undefined;
991
+ deleteAuthenticatorsIntent?: {
992
+ userId: string;
993
+ authenticatorIds: string[];
994
+ } | undefined;
995
+ deleteInvitationIntent?: {
996
+ invitationId: string;
997
+ } | undefined;
998
+ deleteOrganizationIntent?: {
999
+ organizationId: string;
1000
+ } | undefined;
1001
+ deletePolicyIntent?: {
1002
+ policyId: string;
1003
+ } | undefined;
1004
+ createUserTagIntent?: {
1005
+ userTagName: string;
1006
+ userIds: string[];
1007
+ } | undefined;
1008
+ deleteUserTagsIntent?: {
1009
+ userTagIds: string[];
1010
+ } | undefined;
1011
+ signTransactionIntent?: {
1012
+ privateKeyId: string;
1013
+ unsignedTransaction: string;
1014
+ type: "TRANSACTION_TYPE_ETHEREUM";
1015
+ } | undefined;
1016
+ createApiKeysIntent?: {
1017
+ apiKeys: {
1018
+ apiKeyName: string;
1019
+ publicKey: string;
1020
+ expirationSeconds?: string | undefined;
1021
+ }[];
1022
+ userId: string;
1023
+ } | undefined;
1024
+ deleteApiKeysIntent?: {
1025
+ userId: string;
1026
+ apiKeyIds: string[];
1027
+ } | undefined;
1028
+ approveActivityIntent?: {
1029
+ fingerprint: string;
1030
+ } | undefined;
1031
+ rejectActivityIntent?: {
1032
+ fingerprint: string;
1033
+ } | undefined;
1034
+ createPrivateKeyTagIntent?: {
1035
+ privateKeyTagName: string;
1036
+ privateKeyIds: string[];
1037
+ } | undefined;
1038
+ deletePrivateKeyTagsIntent?: {
1039
+ privateKeyTagIds: string[];
1040
+ } | undefined;
1041
+ createPolicyIntentV2?: {
1042
+ policyName: string;
1043
+ selectors: {
1044
+ subject?: string | undefined;
1045
+ operator?: "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" | "OPERATOR_MORE_THAN_OR_EQUAL" | "OPERATOR_LESS_THAN" | "OPERATOR_LESS_THAN_OR_EQUAL" | "OPERATOR_CONTAINS" | "OPERATOR_NOT_EQUAL" | "OPERATOR_IN" | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL" | undefined;
1046
+ targets?: string[] | undefined;
1047
+ }[];
1048
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
1049
+ notes?: string | undefined;
1050
+ } | undefined;
1051
+ setPaymentMethodIntent?: {
1052
+ number: string;
1053
+ cvv: string;
1054
+ expiryMonth: string;
1055
+ expiryYear: string;
1056
+ cardHolderEmail: string;
1057
+ cardHolderName: string;
1058
+ } | undefined;
1059
+ activateBillingTierIntent?: {
1060
+ productId: string;
1061
+ } | undefined;
1062
+ deletePaymentMethodIntent?: {
1063
+ paymentMethodId: string;
1064
+ } | undefined;
1065
+ createPolicyIntentV3?: {
1066
+ policyName: string;
1067
+ effect: "EFFECT_ALLOW" | "EFFECT_DENY";
1068
+ condition?: string | undefined;
1069
+ consensus?: string | undefined;
1070
+ notes?: string | undefined;
1071
+ } | undefined;
1072
+ createApiOnlyUsersIntent?: {
1073
+ apiOnlyUsers: {
1074
+ userName: string;
1075
+ userEmail?: string | undefined;
1076
+ userTags: string[];
1077
+ apiKeys: {
1078
+ apiKeyName: string;
1079
+ publicKey: string;
1080
+ expirationSeconds?: string | undefined;
1081
+ }[];
1082
+ }[];
1083
+ } | undefined;
1084
+ updateRootQuorumIntent?: {
1085
+ threshold: number;
1086
+ userIds: string[];
1087
+ } | undefined;
1088
+ updateUserTagIntent?: {
1089
+ userTagId: string;
1090
+ newUserTagName?: string | undefined;
1091
+ addUserIds: string[];
1092
+ removeUserIds: string[];
1093
+ } | undefined;
1094
+ updatePrivateKeyTagIntent?: {
1095
+ privateKeyTagId: string;
1096
+ newPrivateKeyTagName?: string | undefined;
1097
+ addPrivateKeyIds: string[];
1098
+ removePrivateKeyIds: string[];
1099
+ } | undefined;
1100
+ createAuthenticatorsIntentV2?: {
1101
+ authenticators: {
1102
+ authenticatorName: string;
1103
+ challenge: string;
1104
+ attestation: {
1105
+ credentialId: string;
1106
+ clientDataJson: string;
1107
+ attestationObject: string;
1108
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1109
+ };
1110
+ }[];
1111
+ userId: string;
1112
+ } | undefined;
1113
+ acceptInvitationIntentV2?: {
1114
+ invitationId: string;
1115
+ userId: string;
1116
+ authenticator: {
1117
+ authenticatorName: string;
1118
+ challenge: string;
1119
+ attestation: {
1120
+ credentialId: string;
1121
+ clientDataJson: string;
1122
+ attestationObject: string;
1123
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1124
+ };
1125
+ };
1126
+ } | undefined;
1127
+ createOrganizationIntentV2?: {
1128
+ organizationName: string;
1129
+ rootEmail: string;
1130
+ rootAuthenticator: {
1131
+ authenticatorName: string;
1132
+ challenge: string;
1133
+ attestation: {
1134
+ credentialId: string;
1135
+ clientDataJson: string;
1136
+ attestationObject: string;
1137
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1138
+ };
1139
+ };
1140
+ rootUserId?: string | undefined;
1141
+ } | undefined;
1142
+ createUsersIntentV2?: {
1143
+ users: {
1144
+ userName: string;
1145
+ userEmail?: string | undefined;
1146
+ apiKeys: {
1147
+ apiKeyName: string;
1148
+ publicKey: string;
1149
+ expirationSeconds?: string | undefined;
1150
+ }[];
1151
+ authenticators: {
1152
+ authenticatorName: string;
1153
+ challenge: string;
1154
+ attestation: {
1155
+ credentialId: string;
1156
+ clientDataJson: string;
1157
+ attestationObject: string;
1158
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1159
+ };
1160
+ }[];
1161
+ userTags: string[];
1162
+ }[];
1163
+ } | undefined;
1164
+ createSubOrganizationIntent?: {
1165
+ name: string;
1166
+ rootAuthenticator: {
1167
+ authenticatorName: string;
1168
+ challenge: string;
1169
+ attestation: {
1170
+ credentialId: string;
1171
+ clientDataJson: string;
1172
+ attestationObject: string;
1173
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1174
+ };
1175
+ };
1176
+ } | undefined;
1177
+ createSubOrganizationIntentV2?: {
1178
+ subOrganizationName: string;
1179
+ rootUsers: {
1180
+ userName: string;
1181
+ userEmail?: string | undefined;
1182
+ apiKeys: {
1183
+ apiKeyName: string;
1184
+ publicKey: string;
1185
+ expirationSeconds?: string | undefined;
1186
+ }[];
1187
+ authenticators: {
1188
+ authenticatorName: string;
1189
+ challenge: string;
1190
+ attestation: {
1191
+ credentialId: string;
1192
+ clientDataJson: string;
1193
+ attestationObject: string;
1194
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1195
+ };
1196
+ }[];
1197
+ }[];
1198
+ rootQuorumThreshold: number;
1199
+ } | undefined;
1200
+ updateAllowedOriginsIntent?: {
1201
+ allowedOrigins: string[];
1202
+ } | undefined;
1203
+ createPrivateKeysIntentV2?: {
1204
+ privateKeys: {
1205
+ privateKeyName: string;
1206
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
1207
+ privateKeyTags: string[];
1208
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
1209
+ }[];
1210
+ } | undefined;
1211
+ updateUserIntent?: {
1212
+ userId: string;
1213
+ userName?: string | undefined;
1214
+ userEmail?: string | undefined;
1215
+ userTagIds?: string[] | undefined;
1216
+ } | undefined;
1217
+ updatePolicyIntent?: {
1218
+ policyId: string;
1219
+ policyName?: string | undefined;
1220
+ policyEffect?: "EFFECT_ALLOW" | "EFFECT_DENY" | undefined;
1221
+ policyCondition?: string | undefined;
1222
+ policyConsensus?: string | undefined;
1223
+ policyNotes?: string | undefined;
1224
+ } | undefined;
1225
+ setPaymentMethodIntentV2?: {
1226
+ paymentMethodId: string;
1227
+ cardHolderEmail: string;
1228
+ cardHolderName: string;
1229
+ } | undefined;
1230
+ createSubOrganizationIntentV3?: {
1231
+ subOrganizationName: string;
1232
+ rootUsers: {
1233
+ userName: string;
1234
+ userEmail?: string | undefined;
1235
+ apiKeys: {
1236
+ apiKeyName: string;
1237
+ publicKey: string;
1238
+ expirationSeconds?: string | undefined;
1239
+ }[];
1240
+ authenticators: {
1241
+ authenticatorName: string;
1242
+ challenge: string;
1243
+ attestation: {
1244
+ credentialId: string;
1245
+ clientDataJson: string;
1246
+ attestationObject: string;
1247
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1248
+ };
1249
+ }[];
1250
+ }[];
1251
+ rootQuorumThreshold: number;
1252
+ privateKeys: {
1253
+ privateKeyName: string;
1254
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
1255
+ privateKeyTags: string[];
1256
+ addressFormats: ("ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS")[];
1257
+ }[];
1258
+ } | undefined;
1259
+ createWalletIntent?: {
1260
+ walletName: string;
1261
+ accounts: {
1262
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
1263
+ pathFormat: "PATH_FORMAT_BIP32";
1264
+ path: string;
1265
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
1266
+ }[];
1267
+ mnemonicLength?: number | undefined;
1268
+ } | undefined;
1269
+ createWalletAccountsIntent?: {
1270
+ walletId: string;
1271
+ accounts: {
1272
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
1273
+ pathFormat: "PATH_FORMAT_BIP32";
1274
+ path: string;
1275
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
1276
+ }[];
1277
+ } | undefined;
1278
+ initUserEmailRecoveryIntent?: {
1279
+ email: string;
1280
+ targetPublicKey: string;
1281
+ expirationSeconds?: string | undefined;
1282
+ } | undefined;
1283
+ recoverUserIntent?: {
1284
+ authenticator: {
1285
+ authenticatorName: string;
1286
+ challenge: string;
1287
+ attestation: {
1288
+ credentialId: string;
1289
+ clientDataJson: string;
1290
+ attestationObject: string;
1291
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1292
+ };
1293
+ };
1294
+ userId: string;
1295
+ } | undefined;
1296
+ setOrganizationFeatureIntent?: {
1297
+ name: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY";
1298
+ value: string;
1299
+ } | undefined;
1300
+ removeOrganizationFeatureIntent?: {
1301
+ name: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY";
1302
+ } | undefined;
1303
+ signRawPayloadIntentV2?: {
1304
+ signWith: string;
1305
+ payload: string;
1306
+ encoding: "PAYLOAD_ENCODING_HEXADECIMAL" | "PAYLOAD_ENCODING_TEXT_UTF8";
1307
+ hashFunction: "HASH_FUNCTION_NO_OP" | "HASH_FUNCTION_SHA256" | "HASH_FUNCTION_KECCAK256" | "HASH_FUNCTION_NOT_APPLICABLE";
1308
+ } | undefined;
1309
+ signTransactionIntentV2?: {
1310
+ signWith: string;
1311
+ unsignedTransaction: string;
1312
+ type: "TRANSACTION_TYPE_ETHEREUM";
1313
+ } | undefined;
1314
+ exportPrivateKeyIntent?: {
1315
+ privateKeyId: string;
1316
+ targetPublicKey: string;
1317
+ } | undefined;
1318
+ exportWalletIntent?: {
1319
+ walletId: string;
1320
+ targetPublicKey: string;
1321
+ language?: "MNEMONIC_LANGUAGE_ENGLISH" | "MNEMONIC_LANGUAGE_SIMPLIFIED_CHINESE" | "MNEMONIC_LANGUAGE_TRADITIONAL_CHINESE" | "MNEMONIC_LANGUAGE_CZECH" | "MNEMONIC_LANGUAGE_FRENCH" | "MNEMONIC_LANGUAGE_ITALIAN" | "MNEMONIC_LANGUAGE_JAPANESE" | "MNEMONIC_LANGUAGE_KOREAN" | "MNEMONIC_LANGUAGE_SPANISH" | undefined;
1322
+ } | undefined;
1323
+ createSubOrganizationIntentV4?: {
1324
+ subOrganizationName: string;
1325
+ rootUsers: {
1326
+ userName: string;
1327
+ userEmail?: string | undefined;
1328
+ apiKeys: {
1329
+ apiKeyName: string;
1330
+ publicKey: string;
1331
+ expirationSeconds?: string | undefined;
1332
+ }[];
1333
+ authenticators: {
1334
+ authenticatorName: string;
1335
+ challenge: string;
1336
+ attestation: {
1337
+ credentialId: string;
1338
+ clientDataJson: string;
1339
+ attestationObject: string;
1340
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1341
+ };
1342
+ }[];
1343
+ }[];
1344
+ rootQuorumThreshold: number;
1345
+ wallet?: {
1346
+ walletName: string;
1347
+ accounts: {
1348
+ curve: "CURVE_SECP256K1" | "CURVE_ED25519";
1349
+ pathFormat: "PATH_FORMAT_BIP32";
1350
+ path: string;
1351
+ addressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS";
1352
+ }[];
1353
+ mnemonicLength?: number | undefined;
1354
+ } | undefined;
1355
+ disableEmailRecovery?: boolean | undefined;
1356
+ disableEmailAuth?: boolean | undefined;
1357
+ } | undefined;
1358
+ emailAuthIntent?: {
1359
+ email: string;
1360
+ targetPublicKey: string;
1361
+ apiKeyName?: string | undefined;
1362
+ expirationSeconds?: string | undefined;
1363
+ emailCustomization?: {
1364
+ subject?: string | undefined;
1365
+ body?: string | undefined;
1366
+ styling?: string | undefined;
1367
+ urlPrefix?: string | undefined;
1368
+ } | undefined;
1369
+ } | undefined;
1370
+ exportWalletAccountIntent?: {
1371
+ address: string;
1372
+ targetPublicKey: string;
1373
+ } | undefined;
1374
+ };
1375
+ result: {
1376
+ createOrganizationResult?: {
1377
+ organizationId: string;
1378
+ } | undefined;
1379
+ createAuthenticatorsResult?: {
1380
+ authenticatorIds: string[];
1381
+ } | undefined;
1382
+ createUsersResult?: {
1383
+ userIds: string[];
1384
+ } | undefined;
1385
+ createPrivateKeysResult?: {
1386
+ privateKeyIds: string[];
1387
+ } | undefined;
1388
+ createInvitationsResult?: {
1389
+ invitationIds: string[];
1390
+ } | undefined;
1391
+ acceptInvitationResult?: {
1392
+ invitationId: string;
1393
+ userId: string;
1394
+ } | undefined;
1395
+ signRawPayloadResult?: {
1396
+ r: string;
1397
+ s: string;
1398
+ v: string;
1399
+ } | undefined;
1400
+ createPolicyResult?: {
1401
+ policyId: string;
1402
+ } | undefined;
1403
+ disablePrivateKeyResult?: {
1404
+ privateKeyId: string;
1405
+ } | undefined;
1406
+ deleteUsersResult?: {
1407
+ userIds: string[];
1408
+ } | undefined;
1409
+ deleteAuthenticatorsResult?: {
1410
+ authenticatorIds: string[];
1411
+ } | undefined;
1412
+ deleteInvitationResult?: {
1413
+ invitationId: string;
1414
+ } | undefined;
1415
+ deleteOrganizationResult?: {
1416
+ organizationId: string;
1417
+ } | undefined;
1418
+ deletePolicyResult?: {
1419
+ policyId: string;
1420
+ } | undefined;
1421
+ createUserTagResult?: {
1422
+ userTagId: string;
1423
+ userIds: string[];
1424
+ } | undefined;
1425
+ deleteUserTagsResult?: {
1426
+ userTagIds: string[];
1427
+ userIds: string[];
1428
+ } | undefined;
1429
+ signTransactionResult?: {
1430
+ signedTransaction: string;
1431
+ } | undefined;
1432
+ deleteApiKeysResult?: {
1433
+ apiKeyIds: string[];
1434
+ } | undefined;
1435
+ createApiKeysResult?: {
1436
+ apiKeyIds: string[];
1437
+ } | undefined;
1438
+ createPrivateKeyTagResult?: {
1439
+ privateKeyTagId: string;
1440
+ privateKeyIds: string[];
1441
+ } | undefined;
1442
+ deletePrivateKeyTagsResult?: {
1443
+ privateKeyTagIds: string[];
1444
+ privateKeyIds: string[];
1445
+ } | undefined;
1446
+ setPaymentMethodResult?: {
1447
+ lastFour: string;
1448
+ cardHolderName: string;
1449
+ cardHolderEmail: string;
1450
+ } | undefined;
1451
+ activateBillingTierResult?: {
1452
+ productId: string;
1453
+ } | undefined;
1454
+ deletePaymentMethodResult?: {
1455
+ paymentMethodId: string;
1456
+ } | undefined;
1457
+ createApiOnlyUsersResult?: {
1458
+ userIds: string[];
1459
+ } | undefined;
1460
+ updateRootQuorumResult?: {
1461
+ [key: string]: unknown;
1462
+ } | undefined;
1463
+ updateUserTagResult?: {
1464
+ userTagId: string;
1465
+ } | undefined;
1466
+ updatePrivateKeyTagResult?: {
1467
+ privateKeyTagId: string;
1468
+ } | undefined;
1469
+ createSubOrganizationResult?: {
1470
+ subOrganizationId: string;
1471
+ } | undefined;
1472
+ updateAllowedOriginsResult?: {
1473
+ [key: string]: unknown;
1474
+ } | undefined;
1475
+ createPrivateKeysResultV2?: {
1476
+ privateKeys: {
1477
+ privateKeyId?: string | undefined;
1478
+ addresses?: {
1479
+ format?: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | undefined;
1480
+ address?: string | undefined;
1481
+ }[] | undefined;
1482
+ }[];
1483
+ } | undefined;
1484
+ updateUserResult?: {
1485
+ userId: string;
1486
+ } | undefined;
1487
+ updatePolicyResult?: {
1488
+ policyId: string;
1489
+ } | undefined;
1490
+ createSubOrganizationResultV3?: {
1491
+ subOrganizationId: string;
1492
+ privateKeys: {
1493
+ privateKeyId?: string | undefined;
1494
+ addresses?: {
1495
+ format?: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | undefined;
1496
+ address?: string | undefined;
1497
+ }[] | undefined;
1498
+ }[];
1499
+ } | undefined;
1500
+ createWalletResult?: {
1501
+ walletId: string;
1502
+ addresses: string[];
1503
+ } | undefined;
1504
+ createWalletAccountsResult?: {
1505
+ addresses: string[];
1506
+ } | undefined;
1507
+ initUserEmailRecoveryResult?: {
1508
+ userId: string;
1509
+ } | undefined;
1510
+ recoverUserResult?: {
1511
+ authenticatorId: string[];
1512
+ } | undefined;
1513
+ setOrganizationFeatureResult?: {
1514
+ features: {
1515
+ name?: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY" | undefined;
1516
+ value?: string | undefined;
1517
+ }[];
1518
+ } | undefined;
1519
+ removeOrganizationFeatureResult?: {
1520
+ features: {
1521
+ name?: "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY" | "FEATURE_NAME_WEBAUTHN_ORIGINS" | "FEATURE_NAME_EMAIL_AUTH" | "FEATURE_NAME_EMAIL_RECOVERY" | undefined;
1522
+ value?: string | undefined;
1523
+ }[];
1524
+ } | undefined;
1525
+ exportPrivateKeyResult?: {
1526
+ privateKeyId: string;
1527
+ exportBundle: string;
1528
+ } | undefined;
1529
+ exportWalletResult?: {
1530
+ walletId: string;
1531
+ exportBundle: string;
1532
+ } | undefined;
1533
+ createSubOrganizationResultV4?: {
1534
+ subOrganizationId: string;
1535
+ wallet?: {
1536
+ walletId: string;
1537
+ addresses: string[];
1538
+ } | undefined;
1539
+ } | undefined;
1540
+ emailAuthResult?: {
1541
+ userId: string;
1542
+ apiKeyId: string;
1543
+ } | undefined;
1544
+ exportWalletAccountResult?: {
1545
+ address: string;
1546
+ exportBundle: string;
1547
+ } | undefined;
1548
+ };
1549
+ votes: {
1550
+ id: string;
1551
+ userId: string;
1552
+ user: {
1553
+ userId: string;
1554
+ userName: string;
1555
+ userEmail?: string | undefined;
1556
+ authenticators: {
1557
+ transports: ("AUTHENTICATOR_TRANSPORT_BLE" | "AUTHENTICATOR_TRANSPORT_INTERNAL" | "AUTHENTICATOR_TRANSPORT_NFC" | "AUTHENTICATOR_TRANSPORT_USB" | "AUTHENTICATOR_TRANSPORT_HYBRID")[];
1558
+ attestationType: string;
1559
+ aaguid: string;
1560
+ credentialId: string;
1561
+ model: string;
1562
+ credential: {
1563
+ publicKey: string;
1564
+ type: "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR";
1565
+ };
1566
+ authenticatorId: string;
1567
+ authenticatorName: string;
1568
+ createdAt: {
1569
+ seconds: string;
1570
+ nanos: string;
1571
+ };
1572
+ updatedAt: {
1573
+ seconds: string;
1574
+ nanos: string;
1575
+ };
1576
+ }[];
1577
+ apiKeys: {
1578
+ credential: {
1579
+ publicKey: string;
1580
+ type: "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" | "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR";
1581
+ };
1582
+ apiKeyId: string;
1583
+ apiKeyName: string;
1584
+ createdAt: {
1585
+ seconds: string;
1586
+ nanos: string;
1587
+ };
1588
+ updatedAt: {
1589
+ seconds: string;
1590
+ nanos: string;
1591
+ };
1592
+ expirationSeconds?: string | undefined;
1593
+ }[];
1594
+ userTags: string[];
1595
+ createdAt: {
1596
+ seconds: string;
1597
+ nanos: string;
1598
+ };
1599
+ updatedAt: {
1600
+ seconds: string;
1601
+ nanos: string;
1602
+ };
1603
+ };
1604
+ activityId: string;
1605
+ selection: "VOTE_SELECTION_APPROVED" | "VOTE_SELECTION_REJECTED";
1606
+ message: string;
1607
+ publicKey: string;
1608
+ signature: string;
1609
+ scheme: string;
1610
+ createdAt: {
1611
+ seconds: string;
1612
+ nanos: string;
1613
+ };
1614
+ }[];
1615
+ fingerprint: string;
1616
+ canApprove: boolean;
1617
+ canReject: boolean;
1618
+ createdAt: {
1619
+ seconds: string;
1620
+ nanos: string;
1621
+ };
1622
+ updatedAt: {
1623
+ seconds: string;
1624
+ nanos: string;
1625
+ };
1626
+ };
1627
+ }>;
1628
+ addEmailRecovery({ organizationId, email, turnkeyUserId, }: {
1629
+ organizationId: string;
1630
+ email: string;
1631
+ turnkeyUserId: string;
1632
+ }): Promise<{
1633
+ signedRequest: import("@turnkey/http").TSignedRequest;
1634
+ userId: string;
1635
+ }>;
1636
+ private isValidCode;
1637
+ private isExpired;
1638
+ }
1639
+ export declare const turnkeyAuthenticatorRecoveryHandler: TurnkeyAuthenticatorRecoveryHandler;
1640
+ export {};