@junobuild/admin 0.0.20 → 0.0.21

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 (73) hide show
  1. package/declarations/cmc/index.js +6 -1
  2. package/declarations/console/console.did.d.ts +5 -4
  3. package/declarations/console/console.factory.did.js +3 -2
  4. package/declarations/console/console.factory.did.mjs +3 -2
  5. package/declarations/console/index.js +6 -1
  6. package/declarations/ic/ic.did +131 -18
  7. package/declarations/ic/ic.did.d.ts +184 -53
  8. package/declarations/ic/ic.factory.did.js +167 -24
  9. package/declarations/mission_control/index.js +7 -1
  10. package/declarations/mission_control/mission_control.did.d.ts +1 -0
  11. package/declarations/mission_control/mission_control.factory.did.js +5 -0
  12. package/declarations/observatory/index.js +7 -1
  13. package/declarations/satellite/index.js +6 -1
  14. package/declarations/satellite/satellite.did.d.ts +1 -0
  15. package/declarations/satellite/satellite.factory.did.js +1 -0
  16. package/declarations/satellite/satellite.factory.did.mjs +1 -0
  17. package/dist/browser/index.js +15 -15
  18. package/dist/browser/index.js.map +4 -4
  19. package/dist/declarations/cmc/index.js +6 -1
  20. package/dist/declarations/console/console.did.d.ts +5 -4
  21. package/dist/declarations/console/console.factory.did.js +3 -2
  22. package/dist/declarations/console/console.factory.did.mjs +3 -2
  23. package/dist/declarations/console/index.js +6 -1
  24. package/dist/declarations/ic/ic.did +131 -18
  25. package/dist/declarations/ic/ic.did.d.ts +184 -53
  26. package/dist/declarations/ic/ic.factory.did.js +167 -24
  27. package/dist/declarations/mission_control/index.js +7 -1
  28. package/dist/declarations/mission_control/mission_control.did.d.ts +1 -0
  29. package/dist/declarations/mission_control/mission_control.factory.did.js +5 -0
  30. package/dist/declarations/observatory/index.js +7 -1
  31. package/dist/declarations/satellite/index.js +6 -1
  32. package/dist/declarations/satellite/satellite.did.d.ts +1 -0
  33. package/dist/declarations/satellite/satellite.factory.did.js +1 -0
  34. package/dist/declarations/satellite/satellite.factory.did.mjs +1 -0
  35. package/dist/node/index.mjs +19 -19
  36. package/dist/node/index.mjs.map +4 -4
  37. package/dist/types/api/ic.api.d.ts +1 -1
  38. package/dist/types/constants/config.constants.d.ts +2 -0
  39. package/dist/types/services/mission-control.services.d.ts +1 -1
  40. package/dist/types/services/satellite.services.d.ts +2 -2
  41. package/dist/types/types/config.types.d.ts +9 -3
  42. package/dist/types/types/ic.types.d.ts +2 -1
  43. package/package.json +1 -1
  44. package/declarations/frontend/frontend.did +0 -188
  45. package/declarations/frontend/frontend.did.d.ts +0 -172
  46. package/declarations/frontend/frontend.factory.did.js +0 -210
  47. package/declarations/frontend/index.d.ts +0 -45
  48. package/declarations/frontend/index.js +0 -32
  49. package/declarations/internet_identity/index.d.ts +0 -45
  50. package/declarations/internet_identity/index.js +0 -32
  51. package/declarations/internet_identity/internet_identity.did +0 -378
  52. package/declarations/internet_identity/internet_identity.did.d.ts +0 -231
  53. package/declarations/internet_identity/internet_identity.factory.did.js +0 -277
  54. package/declarations/ledger/index.d.ts +0 -45
  55. package/declarations/ledger/index.js +0 -32
  56. package/declarations/ledger/ledger.did +0 -266
  57. package/declarations/ledger/ledger.did.d.ts +0 -117
  58. package/declarations/ledger/ledger.factory.did.js +0 -115
  59. package/dist/declarations/frontend/frontend.did +0 -188
  60. package/dist/declarations/frontend/frontend.did.d.ts +0 -172
  61. package/dist/declarations/frontend/frontend.factory.did.js +0 -210
  62. package/dist/declarations/frontend/index.d.ts +0 -45
  63. package/dist/declarations/frontend/index.js +0 -32
  64. package/dist/declarations/internet_identity/index.d.ts +0 -45
  65. package/dist/declarations/internet_identity/index.js +0 -32
  66. package/dist/declarations/internet_identity/internet_identity.did +0 -378
  67. package/dist/declarations/internet_identity/internet_identity.did.d.ts +0 -231
  68. package/dist/declarations/internet_identity/internet_identity.factory.did.js +0 -277
  69. package/dist/declarations/ledger/index.d.ts +0 -45
  70. package/dist/declarations/ledger/index.js +0 -32
  71. package/dist/declarations/ledger/ledger.did +0 -266
  72. package/dist/declarations/ledger/ledger.did.d.ts +0 -117
  73. package/dist/declarations/ledger/ledger.factory.did.js +0 -115
@@ -1,378 +0,0 @@
1
- type UserNumber = nat64;
2
- type PublicKey = blob;
3
- type CredentialId = blob;
4
- type DeviceKey = PublicKey;
5
- type UserKey = PublicKey;
6
- type SessionKey = PublicKey;
7
- type FrontendHostname = text;
8
- type Timestamp = nat64;
9
-
10
- type HeaderField = record {
11
- text;
12
- text;
13
- };
14
-
15
- type HttpRequest = record {
16
- method: text;
17
- url: text;
18
- headers: vec HeaderField;
19
- body: blob;
20
- };
21
-
22
- type HttpResponse = record {
23
- status_code: nat16;
24
- headers: vec HeaderField;
25
- body: blob;
26
- upgrade : opt bool;
27
- streaming_strategy: opt StreamingStrategy;
28
- };
29
-
30
- type StreamingCallbackHttpResponse = record {
31
- body: blob;
32
- token: opt Token;
33
- };
34
-
35
- type Token = record {};
36
-
37
- type StreamingStrategy = variant {
38
- Callback: record {
39
- callback: func (Token) -> (StreamingCallbackHttpResponse) query;
40
- token: Token;
41
- };
42
- };
43
-
44
- type Purpose = variant {
45
- recovery;
46
- authentication;
47
- };
48
-
49
- type KeyType = variant {
50
- unknown;
51
- platform;
52
- cross_platform;
53
- seed_phrase;
54
- };
55
-
56
- // This describes whether a device is "protected" or not.
57
- // When protected, a device can only be updated or removed if the
58
- // user is authenticated with that very device.
59
- type DeviceProtection = variant {
60
- protected;
61
- unprotected;
62
- };
63
-
64
- type Challenge = record {
65
- png_base64: text;
66
- challenge_key: ChallengeKey;
67
- };
68
-
69
- type DeviceData = record {
70
- pubkey : DeviceKey;
71
- alias : text;
72
- credential_id : opt CredentialId;
73
- purpose: Purpose;
74
- key_type: KeyType;
75
- protection: DeviceProtection;
76
- origin: opt text;
77
- // Metadata map for additional device information.
78
- //
79
- // Note: some fields above will be moved to the metadata map in the future.
80
- // All field names of `DeviceData` (such as 'alias', 'origin, etc.) are
81
- // reserved and cannot be written.
82
- metadata: opt MetadataMap;
83
- };
84
-
85
- // The same as `DeviceData` but with the `last_usage` field.
86
- // This field cannot be written, hence the separate type.
87
- type DeviceWithUsage = record {
88
- pubkey : DeviceKey;
89
- alias : text;
90
- credential_id : opt CredentialId;
91
- purpose: Purpose;
92
- key_type: KeyType;
93
- protection: DeviceProtection;
94
- origin: opt text;
95
- last_usage: opt Timestamp;
96
- metadata: opt MetadataMap;
97
- };
98
-
99
- // Map with some variants for the value type.
100
- // Note, due to the Candid mapping this must be a tuple type thus we cannot name the fields `key` and `value`.
101
- type MetadataMap = vec record {
102
- text;
103
- variant { map : MetadataMap; string : text; bytes : vec nat8 };
104
- };
105
-
106
- type RegisterResponse = variant {
107
- // A new user was successfully registered.
108
- registered: record {
109
- user_number: UserNumber;
110
- };
111
- // No more registrations are possible in this instance of the II service canister.
112
- canister_full;
113
- // The challenge was not successful.
114
- bad_challenge;
115
- };
116
-
117
- type AddTentativeDeviceResponse = variant {
118
- // The device was tentatively added.
119
- added_tentatively: record {
120
- verification_code: text;
121
- // Expiration date, in nanos since the epoch
122
- device_registration_timeout: Timestamp;
123
- };
124
- // Device registration mode is off, either due to timeout or because it was never enabled.
125
- device_registration_mode_off;
126
- // There is another device already added tentatively
127
- another_device_tentatively_added;
128
- };
129
-
130
- type VerifyTentativeDeviceResponse = variant {
131
- // The device was successfully verified.
132
- verified;
133
- // Wrong verification code entered. Retry with correct code.
134
- wrong_code: record {
135
- retries_left: nat8
136
- };
137
- // Device registration mode is off, either due to timeout or because it was never enabled.
138
- device_registration_mode_off;
139
- // There is no tentative device to be verified.
140
- no_device_to_verify;
141
- };
142
-
143
- type Delegation = record {
144
- pubkey: PublicKey;
145
- expiration: Timestamp;
146
- targets: opt vec principal;
147
- };
148
-
149
- type SignedDelegation = record {
150
- delegation: Delegation;
151
- signature: blob;
152
- };
153
-
154
- type GetDelegationResponse = variant {
155
- // The signed delegation was successfully retrieved.
156
- signed_delegation: SignedDelegation;
157
-
158
- // The signature is not ready. Maybe retry by calling `prepare_delegation`
159
- no_such_delegation
160
- };
161
-
162
- type InternetIdentityStats = record {
163
- users_registered: nat64;
164
- storage_layout_version: nat8;
165
- assigned_user_number_range: record {
166
- nat64;
167
- nat64;
168
- };
169
- archive_info: ArchiveInfo;
170
- canister_creation_cycles_cost: nat64;
171
- active_anchor_stats: opt ActiveAnchorStatistics;
172
- domain_active_anchor_stats: opt DomainActiveAnchorStatistics;
173
- max_num_latest_delegation_origins: nat64;
174
- latest_delegation_origins: vec FrontendHostname
175
- };
176
-
177
- // Configuration parameters related to the archive.
178
- type ArchiveConfig = record {
179
- // The allowed module hash of the archive canister.
180
- // Changing this parameter does _not_ deploy the archive, but enable archive deployments with the
181
- // corresponding wasm module.
182
- module_hash : blob;
183
- // Buffered archive entries limit. If reached, II will stop accepting new anchor operations
184
- // until the buffered operations are acknowledged by the archive.
185
- entries_buffer_limit: nat64;
186
- // The maximum number of entries to be transferred to the archive per call.
187
- entries_fetch_limit: nat16;
188
- // Polling interval to fetch new entries from II (in nanoseconds).
189
- // Changes to this parameter will only take effect after an archive deployment.
190
- polling_interval_ns: nat64;
191
- };
192
-
193
- // Information about the archive.
194
- type ArchiveInfo = record {
195
- // Canister id of the archive or empty if no archive has been deployed yet.
196
- archive_canister : opt principal;
197
- // Configuration parameters related to the II archive.
198
- archive_config: opt ArchiveConfig;
199
- };
200
-
201
- // Rate limit configuration.
202
- // Currently only used for `register`.
203
- type RateLimitConfig = record {
204
- // Time it takes (in ns) for a rate limiting token to be replenished.
205
- time_per_token_ns : nat64;
206
- // How many tokens are at most generated (to accommodate peaks).
207
- max_tokens: nat64;
208
- };
209
-
210
- type ActiveAnchorStatistics = record {
211
- // Stats for the last completed collection period for daily and monthly active anchors
212
- completed: CompletedActiveAnchorStats;
213
- // ongoing periods for daily and monthly active anchors
214
- ongoing: OngoingActiveAnchorStats;
215
- };
216
-
217
- type CompletedActiveAnchorStats = record {
218
- daily_active_anchors: opt ActiveAnchorCounter;
219
- monthly_active_anchors: opt ActiveAnchorCounter;
220
- };
221
-
222
- type OngoingActiveAnchorStats = record {
223
- // Ongoing active anchor counter for the current 24 h time bucket.
224
- daily_active_anchors: ActiveAnchorCounter;
225
- // Monthly active users are collected using 30-day sliding windows.
226
- // This vec contains up to 30 30-day active windows each offset by one day.
227
- // The vec is sorted, new collection windows are added at the end.
228
- monthly_active_anchors: vec ActiveAnchorCounter;
229
- };
230
-
231
- type ActiveAnchorCounter = record {
232
- start_timestamp: Timestamp;
233
- counter: nat64;
234
- };
235
-
236
- type DomainActiveAnchorStatistics = record {
237
- // Stats for the last completed collection period for daily and monthly active anchors
238
- completed: DomainCompletedActiveAnchorStats;
239
- // ongoing periods for daily and monthly active anchors
240
- ongoing: DomainOngoingActiveAnchorStats;
241
- };
242
-
243
- type DomainCompletedActiveAnchorStats = record {
244
- daily_active_anchors: opt DomainActiveAnchorCounter;
245
- monthly_active_anchors: opt DomainActiveAnchorCounter;
246
- };
247
-
248
- type DomainOngoingActiveAnchorStats = record {
249
- // Ongoing active anchor counter for the current 24 h time bucket.
250
- daily_active_anchors: DomainActiveAnchorCounter;
251
- // Monthly active users are collected using 30-day sliding windows.
252
- // This vec contains up to 30 30-day active windows each offset by one day.
253
- // The vec is sorted, new collection windows are added at the end.
254
- monthly_active_anchors: vec DomainActiveAnchorCounter;
255
- };
256
-
257
- type DomainActiveAnchorCounter = record {
258
- start_timestamp: Timestamp;
259
- ic0_app_counter: nat64;
260
- internetcomputer_org_counter: nat64;
261
- both_ii_domains_counter: nat64;
262
- };
263
-
264
- // Init arguments of II which can be supplied on install and upgrade.
265
- // Setting a value to null keeps the previous value.
266
- type InternetIdentityInit = record {
267
- // Set lowest and highest anchor
268
- assigned_user_number_range : opt record {
269
- nat64;
270
- nat64;
271
- };
272
- // Configuration parameters related to the II archive.
273
- // Note: some parameters changes (like the polling interval) will only take effect after an archive deployment.
274
- // See ArchiveConfig for details.
275
- archive_config: opt ArchiveConfig;
276
- // Set the amounts of cycles sent with the create canister message.
277
- // This is configurable because in the staging environment cycles are required.
278
- // The canister creation cost on mainnet is currently 100'000'000'000 cycles. If this value is higher thant the
279
- // canister creation cost, the newly created canister will keep extra cycles.
280
- canister_creation_cycles_cost : opt nat64;
281
- // Rate limit for the `register` call.
282
- register_rate_limit : opt RateLimitConfig;
283
- // Maximum number of latest delegation origins to track.
284
- // Default: 1000
285
- max_num_latest_delegation_origins : opt nat64;
286
- };
287
-
288
- type ChallengeKey = text;
289
-
290
- type ChallengeResult = record {
291
- key : ChallengeKey;
292
- chars : text;
293
- };
294
-
295
- // Extra information about registration status for new devices
296
- type DeviceRegistrationInfo = record {
297
- // If present, the user has tentatively added a new device. This
298
- // new device needs to be verified (see relevant endpoint) before
299
- // 'expiration'.
300
- tentative_device : opt DeviceData;
301
- // The timestamp at which the anchor will turn off registration mode
302
- // (and the tentative device will be forgotten, if any, and if not verified)
303
- expiration: Timestamp;
304
- };
305
-
306
- // Information about the anchor
307
- type IdentityAnchorInfo = record {
308
- // All devices that can authenticate to this anchor
309
- devices : vec DeviceWithUsage;
310
- // Device registration status used when adding devices, see DeviceRegistrationInfo
311
- device_registration: opt DeviceRegistrationInfo;
312
- };
313
-
314
- type AnchorCredentials = record {
315
- credentials : vec WebAuthnCredential;
316
- recovery_credentials : vec WebAuthnCredential;
317
- recovery_phrases: vec PublicKey;
318
- };
319
-
320
- type WebAuthnCredential = record {
321
- credential_id : CredentialId;
322
- pubkey: PublicKey;
323
- };
324
-
325
- type DeployArchiveResult = variant {
326
- // The archive was deployed successfully and the supplied wasm module has been installed. The principal of the archive
327
- // canister is returned.
328
- success: principal;
329
- // Initial archive creation is already in progress.
330
- creation_in_progress;
331
- // Archive deployment failed. An error description is returned.
332
- failed: text;
333
- };
334
-
335
- type BufferedArchiveEntry = record {
336
- anchor_number: UserNumber;
337
- timestamp: Timestamp;
338
- sequence_number: nat64;
339
- entry: blob;
340
- };
341
-
342
-
343
- service : (opt InternetIdentityInit) -> {
344
- init_salt: () -> ();
345
- create_challenge : () -> (Challenge);
346
- register : (DeviceData, ChallengeResult, opt principal) -> (RegisterResponse);
347
- add : (UserNumber, DeviceData) -> ();
348
- update : (UserNumber, DeviceKey, DeviceData) -> ();
349
- // Atomically replace device matching the device key with the new device data
350
- replace : (UserNumber, DeviceKey, DeviceData) -> ();
351
- remove : (UserNumber, DeviceKey) -> ();
352
- // Returns all devices of the user (authentication and recovery) but no information about device registrations.
353
- // Note: Clears out the 'alias' fields on the devices. Use 'get_anchor_info' to obtain the full information.
354
- // Deprecated: Use 'get_anchor_credentials' instead.
355
- lookup : (UserNumber) -> (vec DeviceData) query;
356
- get_anchor_credentials : (UserNumber) -> (AnchorCredentials) query;
357
- get_anchor_info : (UserNumber) -> (IdentityAnchorInfo);
358
- get_principal : (UserNumber, FrontendHostname) -> (principal) query;
359
- stats : () -> (InternetIdentityStats) query;
360
-
361
- enter_device_registration_mode : (UserNumber) -> (Timestamp);
362
- exit_device_registration_mode : (UserNumber) -> ();
363
- add_tentative_device : (UserNumber, DeviceData) -> (AddTentativeDeviceResponse);
364
- verify_tentative_device : (UserNumber, verification_code: text) -> (VerifyTentativeDeviceResponse);
365
-
366
- prepare_delegation : (UserNumber, FrontendHostname, SessionKey, maxTimeToLive : opt nat64) -> (UserKey, Timestamp);
367
- get_delegation: (UserNumber, FrontendHostname, SessionKey, Timestamp) -> (GetDelegationResponse) query;
368
-
369
- http_request: (request: HttpRequest) -> (HttpResponse) query;
370
- http_request_update: (request: HttpRequest) -> (HttpResponse);
371
-
372
- deploy_archive: (wasm: blob) -> (DeployArchiveResult);
373
- /// Returns a batch of entries _sorted by sequence number_ to be archived.
374
- /// This is an update call because the archive information _must_ be certified.
375
- /// Only callable by this IIs archive canister.
376
- fetch_entries: () -> (vec BufferedArchiveEntry);
377
- acknowledge_entries: (sequence_number: nat64) -> ();
378
- }
@@ -1,231 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export interface ActiveAnchorCounter {
5
- counter: bigint;
6
- start_timestamp: Timestamp;
7
- }
8
- export interface ActiveAnchorStatistics {
9
- completed: CompletedActiveAnchorStats;
10
- ongoing: OngoingActiveAnchorStats;
11
- }
12
- export type AddTentativeDeviceResponse =
13
- | {
14
- device_registration_mode_off: null;
15
- }
16
- | {another_device_tentatively_added: null}
17
- | {
18
- added_tentatively: {
19
- verification_code: string;
20
- device_registration_timeout: Timestamp;
21
- };
22
- };
23
- export interface AnchorCredentials {
24
- recovery_phrases: Array<PublicKey>;
25
- credentials: Array<WebAuthnCredential>;
26
- recovery_credentials: Array<WebAuthnCredential>;
27
- }
28
- export interface ArchiveConfig {
29
- polling_interval_ns: bigint;
30
- entries_buffer_limit: bigint;
31
- module_hash: Uint8Array | number[];
32
- entries_fetch_limit: number;
33
- }
34
- export interface ArchiveInfo {
35
- archive_config: [] | [ArchiveConfig];
36
- archive_canister: [] | [Principal];
37
- }
38
- export interface BufferedArchiveEntry {
39
- sequence_number: bigint;
40
- entry: Uint8Array | number[];
41
- anchor_number: UserNumber;
42
- timestamp: Timestamp;
43
- }
44
- export interface Challenge {
45
- png_base64: string;
46
- challenge_key: ChallengeKey;
47
- }
48
- export type ChallengeKey = string;
49
- export interface ChallengeResult {
50
- key: ChallengeKey;
51
- chars: string;
52
- }
53
- export interface CompletedActiveAnchorStats {
54
- monthly_active_anchors: [] | [ActiveAnchorCounter];
55
- daily_active_anchors: [] | [ActiveAnchorCounter];
56
- }
57
- export type CredentialId = Uint8Array | number[];
58
- export interface Delegation {
59
- pubkey: PublicKey;
60
- targets: [] | [Array<Principal>];
61
- expiration: Timestamp;
62
- }
63
- export type DeployArchiveResult =
64
- | {creation_in_progress: null}
65
- | {success: Principal}
66
- | {failed: string};
67
- export interface DeviceData {
68
- alias: string;
69
- metadata: [] | [MetadataMap];
70
- origin: [] | [string];
71
- protection: DeviceProtection;
72
- pubkey: DeviceKey;
73
- key_type: KeyType;
74
- purpose: Purpose;
75
- credential_id: [] | [CredentialId];
76
- }
77
- export type DeviceKey = PublicKey;
78
- export type DeviceProtection = {unprotected: null} | {protected: null};
79
- export interface DeviceRegistrationInfo {
80
- tentative_device: [] | [DeviceData];
81
- expiration: Timestamp;
82
- }
83
- export interface DeviceWithUsage {
84
- alias: string;
85
- last_usage: [] | [Timestamp];
86
- metadata: [] | [MetadataMap];
87
- origin: [] | [string];
88
- protection: DeviceProtection;
89
- pubkey: DeviceKey;
90
- key_type: KeyType;
91
- purpose: Purpose;
92
- credential_id: [] | [CredentialId];
93
- }
94
- export interface DomainActiveAnchorCounter {
95
- start_timestamp: Timestamp;
96
- internetcomputer_org_counter: bigint;
97
- ic0_app_counter: bigint;
98
- both_ii_domains_counter: bigint;
99
- }
100
- export interface DomainActiveAnchorStatistics {
101
- completed: DomainCompletedActiveAnchorStats;
102
- ongoing: DomainOngoingActiveAnchorStats;
103
- }
104
- export interface DomainCompletedActiveAnchorStats {
105
- monthly_active_anchors: [] | [DomainActiveAnchorCounter];
106
- daily_active_anchors: [] | [DomainActiveAnchorCounter];
107
- }
108
- export interface DomainOngoingActiveAnchorStats {
109
- monthly_active_anchors: Array<DomainActiveAnchorCounter>;
110
- daily_active_anchors: DomainActiveAnchorCounter;
111
- }
112
- export type FrontendHostname = string;
113
- export type GetDelegationResponse =
114
- | {no_such_delegation: null}
115
- | {signed_delegation: SignedDelegation};
116
- export type HeaderField = [string, string];
117
- export interface HttpRequest {
118
- url: string;
119
- method: string;
120
- body: Uint8Array | number[];
121
- headers: Array<HeaderField>;
122
- }
123
- export interface HttpResponse {
124
- body: Uint8Array | number[];
125
- headers: Array<HeaderField>;
126
- upgrade: [] | [boolean];
127
- streaming_strategy: [] | [StreamingStrategy];
128
- status_code: number;
129
- }
130
- export interface IdentityAnchorInfo {
131
- devices: Array<DeviceWithUsage>;
132
- device_registration: [] | [DeviceRegistrationInfo];
133
- }
134
- export interface InternetIdentityInit {
135
- max_num_latest_delegation_origins: [] | [bigint];
136
- assigned_user_number_range: [] | [[bigint, bigint]];
137
- archive_config: [] | [ArchiveConfig];
138
- canister_creation_cycles_cost: [] | [bigint];
139
- register_rate_limit: [] | [RateLimitConfig];
140
- }
141
- export interface InternetIdentityStats {
142
- storage_layout_version: number;
143
- users_registered: bigint;
144
- domain_active_anchor_stats: [] | [DomainActiveAnchorStatistics];
145
- max_num_latest_delegation_origins: bigint;
146
- assigned_user_number_range: [bigint, bigint];
147
- latest_delegation_origins: Array<FrontendHostname>;
148
- archive_info: ArchiveInfo;
149
- canister_creation_cycles_cost: bigint;
150
- active_anchor_stats: [] | [ActiveAnchorStatistics];
151
- }
152
- export type KeyType =
153
- | {platform: null}
154
- | {seed_phrase: null}
155
- | {cross_platform: null}
156
- | {unknown: null};
157
- export type MetadataMap = Array<
158
- [string, {map: MetadataMap} | {string: string} | {bytes: Uint8Array | number[]}]
159
- >;
160
- export interface OngoingActiveAnchorStats {
161
- monthly_active_anchors: Array<ActiveAnchorCounter>;
162
- daily_active_anchors: ActiveAnchorCounter;
163
- }
164
- export type PublicKey = Uint8Array | number[];
165
- export type Purpose = {authentication: null} | {recovery: null};
166
- export interface RateLimitConfig {
167
- max_tokens: bigint;
168
- time_per_token_ns: bigint;
169
- }
170
- export type RegisterResponse =
171
- | {bad_challenge: null}
172
- | {canister_full: null}
173
- | {registered: {user_number: UserNumber}};
174
- export type SessionKey = PublicKey;
175
- export interface SignedDelegation {
176
- signature: Uint8Array | number[];
177
- delegation: Delegation;
178
- }
179
- export interface StreamingCallbackHttpResponse {
180
- token: [] | [Token];
181
- body: Uint8Array | number[];
182
- }
183
- export type StreamingStrategy = {
184
- Callback: {token: Token; callback: [Principal, string]};
185
- };
186
- export type Timestamp = bigint;
187
- export type Token = {};
188
- export type UserKey = PublicKey;
189
- export type UserNumber = bigint;
190
- export type VerifyTentativeDeviceResponse =
191
- | {
192
- device_registration_mode_off: null;
193
- }
194
- | {verified: null}
195
- | {wrong_code: {retries_left: number}}
196
- | {no_device_to_verify: null};
197
- export interface WebAuthnCredential {
198
- pubkey: PublicKey;
199
- credential_id: CredentialId;
200
- }
201
- export interface _SERVICE {
202
- acknowledge_entries: ActorMethod<[bigint], undefined>;
203
- add: ActorMethod<[UserNumber, DeviceData], undefined>;
204
- add_tentative_device: ActorMethod<[UserNumber, DeviceData], AddTentativeDeviceResponse>;
205
- create_challenge: ActorMethod<[], Challenge>;
206
- deploy_archive: ActorMethod<[Uint8Array | number[]], DeployArchiveResult>;
207
- enter_device_registration_mode: ActorMethod<[UserNumber], Timestamp>;
208
- exit_device_registration_mode: ActorMethod<[UserNumber], undefined>;
209
- fetch_entries: ActorMethod<[], Array<BufferedArchiveEntry>>;
210
- get_anchor_credentials: ActorMethod<[UserNumber], AnchorCredentials>;
211
- get_anchor_info: ActorMethod<[UserNumber], IdentityAnchorInfo>;
212
- get_delegation: ActorMethod<
213
- [UserNumber, FrontendHostname, SessionKey, Timestamp],
214
- GetDelegationResponse
215
- >;
216
- get_principal: ActorMethod<[UserNumber, FrontendHostname], Principal>;
217
- http_request: ActorMethod<[HttpRequest], HttpResponse>;
218
- http_request_update: ActorMethod<[HttpRequest], HttpResponse>;
219
- init_salt: ActorMethod<[], undefined>;
220
- lookup: ActorMethod<[UserNumber], Array<DeviceData>>;
221
- prepare_delegation: ActorMethod<
222
- [UserNumber, FrontendHostname, SessionKey, [] | [bigint]],
223
- [UserKey, Timestamp]
224
- >;
225
- register: ActorMethod<[DeviceData, ChallengeResult, [] | [Principal]], RegisterResponse>;
226
- remove: ActorMethod<[UserNumber, DeviceKey], undefined>;
227
- replace: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
228
- stats: ActorMethod<[], InternetIdentityStats>;
229
- update: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
230
- verify_tentative_device: ActorMethod<[UserNumber, string], VerifyTentativeDeviceResponse>;
231
- }