@junobuild/admin 0.0.6 → 0.0.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.
- package/dist/browser/index.js +16 -16
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/cmc/cmc.did.d.ts +30 -30
- package/dist/declarations/cmc/cmc.factory.did.js +63 -63
- package/dist/declarations/cmc/index.d.ts +18 -18
- package/dist/declarations/cmc/index.js +22 -22
- package/dist/declarations/console/console.did.d.ts +45 -32
- package/dist/declarations/console/console.factory.did.js +60 -47
- package/dist/declarations/console/console.factory.did.mjs +60 -47
- package/dist/declarations/console/index.d.ts +18 -18
- package/dist/declarations/console/index.js +22 -22
- package/dist/declarations/frontend/frontend.did.d.ts +136 -136
- package/dist/declarations/frontend/frontend.factory.did.js +206 -206
- package/dist/declarations/frontend/index.d.ts +18 -18
- package/dist/declarations/frontend/index.js +22 -22
- package/dist/declarations/ic/ic.did.d.ts +63 -63
- package/dist/declarations/ic/ic.factory.did.js +126 -126
- package/dist/declarations/internet_identity/index.d.ts +18 -18
- package/dist/declarations/internet_identity/index.js +22 -22
- package/dist/declarations/internet_identity/internet_identity.did +79 -20
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +152 -109
- package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -185
- package/dist/declarations/ledger/index.d.ts +18 -18
- package/dist/declarations/ledger/index.js +22 -22
- package/dist/declarations/ledger/ledger.did.d.ts +64 -64
- package/dist/declarations/ledger/ledger.factory.did.js +96 -96
- package/dist/declarations/mission_control/index.d.ts +18 -18
- package/dist/declarations/mission_control/index.js +22 -22
- package/dist/declarations/mission_control/mission_control.did.d.ts +34 -17
- package/dist/declarations/mission_control/mission_control.factory.did.js +48 -26
- package/dist/declarations/satellite/index.d.ts +18 -18
- package/dist/declarations/satellite/index.js +22 -22
- package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
- package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
- package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
- package/dist/declarations/satellite/satellite.did.d.ts +131 -113
- package/dist/declarations/satellite/satellite.factory.did.js +189 -167
- package/dist/declarations/satellite/satellite.factory.did.mjs +189 -167
- package/dist/node/index.mjs +23 -23
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.api.d.ts +2 -0
- package/dist/types/api/mission-control.api.d.ts +2 -1
- package/dist/types/api/satellite.api.d.ts +5 -2
- package/dist/types/services/satellite.services.d.ts +2 -1
- package/package.json +1 -1
|
@@ -23,6 +23,7 @@ type HttpResponse = record {
|
|
|
23
23
|
status_code: nat16;
|
|
24
24
|
headers: vec HeaderField;
|
|
25
25
|
body: blob;
|
|
26
|
+
upgrade : opt bool;
|
|
26
27
|
streaming_strategy: opt StreamingStrategy;
|
|
27
28
|
};
|
|
28
29
|
|
|
@@ -72,6 +73,20 @@ type DeviceData = record {
|
|
|
72
73
|
purpose: Purpose;
|
|
73
74
|
key_type: KeyType;
|
|
74
75
|
protection: DeviceProtection;
|
|
76
|
+
origin: opt text;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
// The same as `DeviceData` but with the `last_usage` field.
|
|
80
|
+
// This field cannot be written, hence the separate type.
|
|
81
|
+
type DeviceWithUsage = record {
|
|
82
|
+
pubkey : DeviceKey;
|
|
83
|
+
alias : text;
|
|
84
|
+
credential_id : opt CredentialId;
|
|
85
|
+
purpose: Purpose;
|
|
86
|
+
key_type: KeyType;
|
|
87
|
+
protection: DeviceProtection;
|
|
88
|
+
origin: opt text;
|
|
89
|
+
last_usage: opt Timestamp;
|
|
75
90
|
};
|
|
76
91
|
|
|
77
92
|
type RegisterResponse = variant {
|
|
@@ -89,6 +104,7 @@ type AddTentativeDeviceResponse = variant {
|
|
|
89
104
|
// The device was tentatively added.
|
|
90
105
|
added_tentatively: record {
|
|
91
106
|
verification_code: text;
|
|
107
|
+
// Expiration date, in nanos since the epoch
|
|
92
108
|
device_registration_timeout: Timestamp;
|
|
93
109
|
};
|
|
94
110
|
// Device registration mode is off, either due to timeout or because it was never enabled.
|
|
@@ -138,6 +154,7 @@ type InternetIdentityStats = record {
|
|
|
138
154
|
};
|
|
139
155
|
archive_info: ArchiveInfo;
|
|
140
156
|
canister_creation_cycles_cost: nat64;
|
|
157
|
+
active_anchor_stats: opt ActiveAnchorStatistics;
|
|
141
158
|
};
|
|
142
159
|
|
|
143
160
|
// Configuration parameters related to the archive.
|
|
@@ -148,28 +165,12 @@ type ArchiveConfig = record {
|
|
|
148
165
|
module_hash : blob;
|
|
149
166
|
// Buffered archive entries limit. If reached, II will stop accepting new anchor operations
|
|
150
167
|
// until the buffered operations are acknowledged by the archive.
|
|
151
|
-
// Currently unused: in preparation of switching the archive integration to pull.
|
|
152
|
-
// Configured value will be discarded for storage_layout_version < 6.
|
|
153
168
|
entries_buffer_limit: nat64;
|
|
154
169
|
// The maximum number of entries to be transferred to the archive per call.
|
|
155
|
-
// Currently unused: in preparation of switching the archive integration to pull.
|
|
156
|
-
// Configured value will be discarded for storage_layout_version < 6.
|
|
157
170
|
entries_fetch_limit: nat16;
|
|
158
171
|
// Polling interval to fetch new entries from II (in nanoseconds).
|
|
159
172
|
// Changes to this parameter will only take effect after an archive deployment.
|
|
160
|
-
// Currently unused: in preparation of switching the archive integration to pull.
|
|
161
|
-
// Configured value will be discarded for storage_layout_version < 6.
|
|
162
173
|
polling_interval_ns: nat64;
|
|
163
|
-
|
|
164
|
-
// How the entries get transferred to the archive.
|
|
165
|
-
// This is opt, so that the config parameter can be removed after switching from push to pull.
|
|
166
|
-
// Configured value will be discarded for storage_layout_version < 6.
|
|
167
|
-
archive_integration: opt variant {
|
|
168
|
-
// II pushes the entries to the archive (legacy variant).
|
|
169
|
-
push;
|
|
170
|
-
// The archive pulls the entries from II.
|
|
171
|
-
pull;
|
|
172
|
-
}
|
|
173
174
|
};
|
|
174
175
|
|
|
175
176
|
// Information about the archive.
|
|
@@ -180,6 +181,41 @@ type ArchiveInfo = record {
|
|
|
180
181
|
archive_config: opt ArchiveConfig;
|
|
181
182
|
};
|
|
182
183
|
|
|
184
|
+
// Rate limit configuration.
|
|
185
|
+
// Currently only used for `register`.
|
|
186
|
+
type RateLimitConfig = record {
|
|
187
|
+
// Time it takes (in ns) for a rate limiting token to be replenished.
|
|
188
|
+
time_per_token_ns : nat64;
|
|
189
|
+
// How many tokens are at most generated (to accommodate peaks).
|
|
190
|
+
max_tokens: nat64;
|
|
191
|
+
};
|
|
192
|
+
|
|
193
|
+
type ActiveAnchorStatistics = record {
|
|
194
|
+
// Stats for the last completed collection period for daily and monthly active anchors
|
|
195
|
+
completed: CompletedActiveAnchorStats;
|
|
196
|
+
// ongoing periods for daily and monthly active anchors
|
|
197
|
+
ongoing: OngoingActiveAnchorStats;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
type CompletedActiveAnchorStats = record {
|
|
201
|
+
daily_active_anchors: opt ActiveAnchorCounter;
|
|
202
|
+
monthly_active_anchors: opt ActiveAnchorCounter;
|
|
203
|
+
};
|
|
204
|
+
|
|
205
|
+
type OngoingActiveAnchorStats = record {
|
|
206
|
+
// Ongoing active anchor counter for the current 24 h time bucket.
|
|
207
|
+
daily_active_anchors: ActiveAnchorCounter;
|
|
208
|
+
// Monthly active users are collected using 30-day sliding windows.
|
|
209
|
+
// This vec contains up to 30 30-day active windows each offset by one day.
|
|
210
|
+
// The vec is sorted, new collection windows are added at the end.
|
|
211
|
+
monthly_active_anchors: vec ActiveAnchorCounter;
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
type ActiveAnchorCounter = record {
|
|
215
|
+
start_timestamp: Timestamp;
|
|
216
|
+
counter: nat64;
|
|
217
|
+
};
|
|
218
|
+
|
|
183
219
|
// Init arguments of II which can be supplied on install and upgrade.
|
|
184
220
|
// Setting a value to null keeps the previous value.
|
|
185
221
|
type InternetIdentityInit = record {
|
|
@@ -197,8 +233,8 @@ type InternetIdentityInit = record {
|
|
|
197
233
|
// The canister creation cost on mainnet is currently 100'000'000'000 cycles. If this value is higher thant the
|
|
198
234
|
// canister creation cost, the newly created canister will keep extra cycles.
|
|
199
235
|
canister_creation_cycles_cost : opt nat64;
|
|
200
|
-
//
|
|
201
|
-
|
|
236
|
+
// Rate limit for the `register` call.
|
|
237
|
+
register_rate_limit : opt RateLimitConfig;
|
|
202
238
|
};
|
|
203
239
|
|
|
204
240
|
type ChallengeKey = text;
|
|
@@ -208,16 +244,36 @@ type ChallengeResult = record {
|
|
|
208
244
|
chars : text;
|
|
209
245
|
};
|
|
210
246
|
|
|
247
|
+
// Extra information about registration status for new devices
|
|
211
248
|
type DeviceRegistrationInfo = record {
|
|
249
|
+
// If present, the user has tentatively added a new device. This
|
|
250
|
+
// new device needs to be verified (see relevant endpoint) before
|
|
251
|
+
// 'expiration'.
|
|
212
252
|
tentative_device : opt DeviceData;
|
|
253
|
+
// The timestamp at which the anchor will turn off registration mode
|
|
254
|
+
// (and the tentative device will be forgotten, if any, and if not verified)
|
|
213
255
|
expiration: Timestamp;
|
|
214
256
|
};
|
|
215
257
|
|
|
258
|
+
// Information about the anchor
|
|
216
259
|
type IdentityAnchorInfo = record {
|
|
217
|
-
devices
|
|
260
|
+
// All devices that can authenticate to this anchor
|
|
261
|
+
devices : vec DeviceWithUsage;
|
|
262
|
+
// Device registration status used when adding devices, see DeviceRegistrationInfo
|
|
218
263
|
device_registration: opt DeviceRegistrationInfo;
|
|
219
264
|
};
|
|
220
265
|
|
|
266
|
+
type AnchorCredentials = record {
|
|
267
|
+
credentials : vec WebAuthnCredential;
|
|
268
|
+
recovery_credentials : vec WebAuthnCredential;
|
|
269
|
+
recovery_phrases: vec PublicKey;
|
|
270
|
+
};
|
|
271
|
+
|
|
272
|
+
type WebAuthnCredential = record {
|
|
273
|
+
credential_id : CredentialId;
|
|
274
|
+
pubkey: PublicKey;
|
|
275
|
+
};
|
|
276
|
+
|
|
221
277
|
type DeployArchiveResult = variant {
|
|
222
278
|
// The archive was deployed successfully and the supplied wasm module has been installed. The principal of the archive
|
|
223
279
|
// canister is returned.
|
|
@@ -246,8 +302,10 @@ service : (opt InternetIdentityInit) -> {
|
|
|
246
302
|
replace : (UserNumber, DeviceKey, DeviceData) -> ();
|
|
247
303
|
remove : (UserNumber, DeviceKey) -> ();
|
|
248
304
|
// Returns all devices of the user (authentication and recovery) but no information about device registrations.
|
|
249
|
-
// Note:
|
|
305
|
+
// Note: Clears out the 'alias' fields on the devices. Use 'get_anchor_info' to obtain the full information.
|
|
306
|
+
// Deprecated: Use 'get_anchor_credentials' instead.
|
|
250
307
|
lookup : (UserNumber) -> (vec DeviceData) query;
|
|
308
|
+
get_anchor_credentials : (UserNumber) -> (AnchorCredentials) query;
|
|
251
309
|
get_anchor_info : (UserNumber) -> (IdentityAnchorInfo);
|
|
252
310
|
get_principal : (UserNumber, FrontendHostname) -> (principal) query;
|
|
253
311
|
stats : () -> (InternetIdentityStats) query;
|
|
@@ -261,6 +319,7 @@ service : (opt InternetIdentityInit) -> {
|
|
|
261
319
|
get_delegation: (UserNumber, FrontendHostname, SessionKey, Timestamp) -> (GetDelegationResponse) query;
|
|
262
320
|
|
|
263
321
|
http_request: (request: HttpRequest) -> (HttpResponse) query;
|
|
322
|
+
http_request_update: (request: HttpRequest) -> (HttpResponse);
|
|
264
323
|
|
|
265
324
|
deploy_archive: (wasm: blob) -> (DeployArchiveResult);
|
|
266
325
|
/// Returns a batch of entries _sorted by sequence number_ to be archived.
|
|
@@ -1,161 +1,204 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {Principal} from '@dfinity/principal';
|
|
1
|
+
import type { ActorMethod } from '@dfinity/agent';
|
|
2
|
+
import type { Principal } from '@dfinity/principal';
|
|
3
3
|
|
|
4
|
+
export interface ActiveAnchorCounter {
|
|
5
|
+
counter: bigint;
|
|
6
|
+
start_timestamp: Timestamp;
|
|
7
|
+
}
|
|
8
|
+
export interface ActiveAnchorStatistics {
|
|
9
|
+
completed: CompletedActiveAnchorStats;
|
|
10
|
+
ongoing: OngoingActiveAnchorStats;
|
|
11
|
+
}
|
|
4
12
|
export type AddTentativeDeviceResponse =
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
+
}
|
|
15
28
|
export interface ArchiveConfig {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
entries_fetch_limit: number;
|
|
29
|
+
polling_interval_ns: bigint;
|
|
30
|
+
entries_buffer_limit: bigint;
|
|
31
|
+
module_hash: Uint8Array | number[];
|
|
32
|
+
entries_fetch_limit: number;
|
|
21
33
|
}
|
|
22
34
|
export interface ArchiveInfo {
|
|
23
|
-
|
|
24
|
-
|
|
35
|
+
archive_config: [] | [ArchiveConfig];
|
|
36
|
+
archive_canister: [] | [Principal];
|
|
25
37
|
}
|
|
26
38
|
export interface BufferedArchiveEntry {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
39
|
+
sequence_number: bigint;
|
|
40
|
+
entry: Uint8Array | number[];
|
|
41
|
+
anchor_number: UserNumber;
|
|
42
|
+
timestamp: Timestamp;
|
|
31
43
|
}
|
|
32
44
|
export interface Challenge {
|
|
33
|
-
|
|
34
|
-
|
|
45
|
+
png_base64: string;
|
|
46
|
+
challenge_key: ChallengeKey;
|
|
35
47
|
}
|
|
36
48
|
export type ChallengeKey = string;
|
|
37
49
|
export interface ChallengeResult {
|
|
38
|
-
|
|
39
|
-
|
|
50
|
+
key: ChallengeKey;
|
|
51
|
+
chars: string;
|
|
52
|
+
}
|
|
53
|
+
export interface CompletedActiveAnchorStats {
|
|
54
|
+
monthly_active_anchors: [] | [ActiveAnchorCounter];
|
|
55
|
+
daily_active_anchors: [] | [ActiveAnchorCounter];
|
|
40
56
|
}
|
|
41
57
|
export type CredentialId = Uint8Array | number[];
|
|
42
58
|
export interface Delegation {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
59
|
+
pubkey: PublicKey;
|
|
60
|
+
targets: [] | [Array<Principal>];
|
|
61
|
+
expiration: Timestamp;
|
|
46
62
|
}
|
|
47
63
|
export type DeployArchiveResult =
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
64
|
+
| { creation_in_progress: null }
|
|
65
|
+
| { success: Principal }
|
|
66
|
+
| { failed: string };
|
|
51
67
|
export interface DeviceData {
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
68
|
+
alias: string;
|
|
69
|
+
origin: [] | [string];
|
|
70
|
+
protection: DeviceProtection;
|
|
71
|
+
pubkey: DeviceKey;
|
|
72
|
+
key_type: KeyType;
|
|
73
|
+
purpose: Purpose;
|
|
74
|
+
credential_id: [] | [CredentialId];
|
|
58
75
|
}
|
|
59
76
|
export type DeviceKey = PublicKey;
|
|
60
|
-
export type DeviceProtection = {unprotected: null} | {protected: null};
|
|
77
|
+
export type DeviceProtection = { unprotected: null } | { protected: null };
|
|
61
78
|
export interface DeviceRegistrationInfo {
|
|
62
|
-
|
|
63
|
-
|
|
79
|
+
tentative_device: [] | [DeviceData];
|
|
80
|
+
expiration: Timestamp;
|
|
81
|
+
}
|
|
82
|
+
export interface DeviceWithUsage {
|
|
83
|
+
alias: string;
|
|
84
|
+
last_usage: [] | [Timestamp];
|
|
85
|
+
origin: [] | [string];
|
|
86
|
+
protection: DeviceProtection;
|
|
87
|
+
pubkey: DeviceKey;
|
|
88
|
+
key_type: KeyType;
|
|
89
|
+
purpose: Purpose;
|
|
90
|
+
credential_id: [] | [CredentialId];
|
|
64
91
|
}
|
|
65
92
|
export type FrontendHostname = string;
|
|
66
93
|
export type GetDelegationResponse =
|
|
67
|
-
|
|
68
|
-
|
|
94
|
+
| { no_such_delegation: null }
|
|
95
|
+
| { signed_delegation: SignedDelegation };
|
|
69
96
|
export type HeaderField = [string, string];
|
|
70
97
|
export interface HttpRequest {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
98
|
+
url: string;
|
|
99
|
+
method: string;
|
|
100
|
+
body: Uint8Array | number[];
|
|
101
|
+
headers: Array<HeaderField>;
|
|
75
102
|
}
|
|
76
103
|
export interface HttpResponse {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
104
|
+
body: Uint8Array | number[];
|
|
105
|
+
headers: Array<HeaderField>;
|
|
106
|
+
upgrade: [] | [boolean];
|
|
107
|
+
streaming_strategy: [] | [StreamingStrategy];
|
|
108
|
+
status_code: number;
|
|
81
109
|
}
|
|
82
110
|
export interface IdentityAnchorInfo {
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
devices: Array<DeviceWithUsage>;
|
|
112
|
+
device_registration: [] | [DeviceRegistrationInfo];
|
|
85
113
|
}
|
|
86
114
|
export interface InternetIdentityInit {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
115
|
+
assigned_user_number_range: [] | [[bigint, bigint]];
|
|
116
|
+
archive_config: [] | [ArchiveConfig];
|
|
117
|
+
canister_creation_cycles_cost: [] | [bigint];
|
|
118
|
+
register_rate_limit: [] | [RateLimitConfig];
|
|
91
119
|
}
|
|
92
120
|
export interface InternetIdentityStats {
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
121
|
+
storage_layout_version: number;
|
|
122
|
+
users_registered: bigint;
|
|
123
|
+
assigned_user_number_range: [bigint, bigint];
|
|
124
|
+
archive_info: ArchiveInfo;
|
|
125
|
+
canister_creation_cycles_cost: bigint;
|
|
126
|
+
active_anchor_stats: [] | [ActiveAnchorStatistics];
|
|
98
127
|
}
|
|
99
128
|
export type KeyType =
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
129
|
+
| { platform: null }
|
|
130
|
+
| { seed_phrase: null }
|
|
131
|
+
| { cross_platform: null }
|
|
132
|
+
| { unknown: null };
|
|
133
|
+
export interface OngoingActiveAnchorStats {
|
|
134
|
+
monthly_active_anchors: Array<ActiveAnchorCounter>;
|
|
135
|
+
daily_active_anchors: ActiveAnchorCounter;
|
|
136
|
+
}
|
|
104
137
|
export type PublicKey = Uint8Array | number[];
|
|
105
|
-
export type Purpose = {authentication: null} | {recovery: null};
|
|
138
|
+
export type Purpose = { authentication: null } | { recovery: null };
|
|
139
|
+
export interface RateLimitConfig {
|
|
140
|
+
max_tokens: bigint;
|
|
141
|
+
time_per_token_ns: bigint;
|
|
142
|
+
}
|
|
106
143
|
export type RegisterResponse =
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
144
|
+
| { bad_challenge: null }
|
|
145
|
+
| { canister_full: null }
|
|
146
|
+
| { registered: { user_number: UserNumber } };
|
|
110
147
|
export type SessionKey = PublicKey;
|
|
111
148
|
export interface SignedDelegation {
|
|
112
|
-
|
|
113
|
-
|
|
149
|
+
signature: Uint8Array | number[];
|
|
150
|
+
delegation: Delegation;
|
|
114
151
|
}
|
|
115
152
|
export interface StreamingCallbackHttpResponse {
|
|
116
|
-
|
|
117
|
-
|
|
153
|
+
token: [] | [Token];
|
|
154
|
+
body: Uint8Array | number[];
|
|
118
155
|
}
|
|
119
156
|
export type StreamingStrategy = {
|
|
120
|
-
|
|
157
|
+
Callback: { token: Token; callback: [Principal, string] };
|
|
121
158
|
};
|
|
122
159
|
export type Timestamp = bigint;
|
|
123
160
|
export type Token = {};
|
|
124
161
|
export type UserKey = PublicKey;
|
|
125
162
|
export type UserNumber = bigint;
|
|
126
163
|
export type VerifyTentativeDeviceResponse =
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
164
|
+
| {
|
|
165
|
+
device_registration_mode_off: null;
|
|
166
|
+
}
|
|
167
|
+
| { verified: null }
|
|
168
|
+
| { wrong_code: { retries_left: number } }
|
|
169
|
+
| { no_device_to_verify: null };
|
|
170
|
+
export interface WebAuthnCredential {
|
|
171
|
+
pubkey: PublicKey;
|
|
172
|
+
credential_id: CredentialId;
|
|
173
|
+
}
|
|
133
174
|
export interface _SERVICE {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
175
|
+
acknowledge_entries: ActorMethod<[bigint], undefined>;
|
|
176
|
+
add: ActorMethod<[UserNumber, DeviceData], undefined>;
|
|
177
|
+
add_tentative_device: ActorMethod<[UserNumber, DeviceData], AddTentativeDeviceResponse>;
|
|
178
|
+
create_challenge: ActorMethod<[], Challenge>;
|
|
179
|
+
deploy_archive: ActorMethod<[Uint8Array | number[]], DeployArchiveResult>;
|
|
180
|
+
enter_device_registration_mode: ActorMethod<[UserNumber], Timestamp>;
|
|
181
|
+
exit_device_registration_mode: ActorMethod<[UserNumber], undefined>;
|
|
182
|
+
fetch_entries: ActorMethod<[], Array<BufferedArchiveEntry>>;
|
|
183
|
+
get_anchor_credentials: ActorMethod<[UserNumber], AnchorCredentials>;
|
|
184
|
+
get_anchor_info: ActorMethod<[UserNumber], IdentityAnchorInfo>;
|
|
185
|
+
get_delegation: ActorMethod<
|
|
186
|
+
[UserNumber, FrontendHostname, SessionKey, Timestamp],
|
|
187
|
+
GetDelegationResponse
|
|
188
|
+
>;
|
|
189
|
+
get_principal: ActorMethod<[UserNumber, FrontendHostname], Principal>;
|
|
190
|
+
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
191
|
+
http_request_update: ActorMethod<[HttpRequest], HttpResponse>;
|
|
192
|
+
init_salt: ActorMethod<[], undefined>;
|
|
193
|
+
lookup: ActorMethod<[UserNumber], Array<DeviceData>>;
|
|
194
|
+
prepare_delegation: ActorMethod<
|
|
195
|
+
[UserNumber, FrontendHostname, SessionKey, [] | [bigint]],
|
|
196
|
+
[UserKey, Timestamp]
|
|
197
|
+
>;
|
|
198
|
+
register: ActorMethod<[DeviceData, ChallengeResult], RegisterResponse>;
|
|
199
|
+
remove: ActorMethod<[UserNumber, DeviceKey], undefined>;
|
|
200
|
+
replace: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
|
|
201
|
+
stats: ActorMethod<[], InternetIdentityStats>;
|
|
202
|
+
update: ActorMethod<[UserNumber, DeviceKey, DeviceData], undefined>;
|
|
203
|
+
verify_tentative_device: ActorMethod<[UserNumber, string], VerifyTentativeDeviceResponse>;
|
|
161
204
|
}
|