@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.
- package/declarations/cmc/index.js +6 -1
- package/declarations/console/console.did.d.ts +5 -4
- package/declarations/console/console.factory.did.js +3 -2
- package/declarations/console/console.factory.did.mjs +3 -2
- package/declarations/console/index.js +6 -1
- package/declarations/ic/ic.did +131 -18
- package/declarations/ic/ic.did.d.ts +184 -53
- package/declarations/ic/ic.factory.did.js +167 -24
- package/declarations/mission_control/index.js +7 -1
- package/declarations/mission_control/mission_control.did.d.ts +1 -0
- package/declarations/mission_control/mission_control.factory.did.js +5 -0
- package/declarations/observatory/index.js +7 -1
- package/declarations/satellite/index.js +6 -1
- package/declarations/satellite/satellite.did.d.ts +1 -0
- package/declarations/satellite/satellite.factory.did.js +1 -0
- package/declarations/satellite/satellite.factory.did.mjs +1 -0
- package/dist/browser/index.js +15 -15
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/cmc/index.js +6 -1
- package/dist/declarations/console/console.did.d.ts +5 -4
- package/dist/declarations/console/console.factory.did.js +3 -2
- package/dist/declarations/console/console.factory.did.mjs +3 -2
- package/dist/declarations/console/index.js +6 -1
- package/dist/declarations/ic/ic.did +131 -18
- package/dist/declarations/ic/ic.did.d.ts +184 -53
- package/dist/declarations/ic/ic.factory.did.js +167 -24
- package/dist/declarations/mission_control/index.js +7 -1
- package/dist/declarations/mission_control/mission_control.did.d.ts +1 -0
- package/dist/declarations/mission_control/mission_control.factory.did.js +5 -0
- package/dist/declarations/observatory/index.js +7 -1
- package/dist/declarations/satellite/index.js +6 -1
- package/dist/declarations/satellite/satellite.did.d.ts +1 -0
- package/dist/declarations/satellite/satellite.factory.did.js +1 -0
- package/dist/declarations/satellite/satellite.factory.did.mjs +1 -0
- package/dist/node/index.mjs +19 -19
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/ic.api.d.ts +1 -1
- package/dist/types/constants/config.constants.d.ts +2 -0
- package/dist/types/services/mission-control.services.d.ts +1 -1
- package/dist/types/services/satellite.services.d.ts +2 -2
- package/dist/types/types/config.types.d.ts +9 -3
- package/dist/types/types/ic.types.d.ts +2 -1
- package/package.json +1 -1
- package/declarations/frontend/frontend.did +0 -188
- package/declarations/frontend/frontend.did.d.ts +0 -172
- package/declarations/frontend/frontend.factory.did.js +0 -210
- package/declarations/frontend/index.d.ts +0 -45
- package/declarations/frontend/index.js +0 -32
- package/declarations/internet_identity/index.d.ts +0 -45
- package/declarations/internet_identity/index.js +0 -32
- package/declarations/internet_identity/internet_identity.did +0 -378
- package/declarations/internet_identity/internet_identity.did.d.ts +0 -231
- package/declarations/internet_identity/internet_identity.factory.did.js +0 -277
- package/declarations/ledger/index.d.ts +0 -45
- package/declarations/ledger/index.js +0 -32
- package/declarations/ledger/ledger.did +0 -266
- package/declarations/ledger/ledger.did.d.ts +0 -117
- package/declarations/ledger/ledger.factory.did.js +0 -115
- package/dist/declarations/frontend/frontend.did +0 -188
- package/dist/declarations/frontend/frontend.did.d.ts +0 -172
- package/dist/declarations/frontend/frontend.factory.did.js +0 -210
- package/dist/declarations/frontend/index.d.ts +0 -45
- package/dist/declarations/frontend/index.js +0 -32
- package/dist/declarations/internet_identity/index.d.ts +0 -45
- package/dist/declarations/internet_identity/index.js +0 -32
- package/dist/declarations/internet_identity/internet_identity.did +0 -378
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +0 -231
- package/dist/declarations/internet_identity/internet_identity.factory.did.js +0 -277
- package/dist/declarations/ledger/index.d.ts +0 -45
- package/dist/declarations/ledger/index.js +0 -32
- package/dist/declarations/ledger/ledger.did +0 -266
- package/dist/declarations/ledger/ledger.did.d.ts +0 -117
- package/dist/declarations/ledger/ledger.factory.did.js +0 -115
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {Actor, HttpAgent} from '@dfinity/agent';
|
|
2
|
-
|
|
3
|
-
// Imports and re-exports candid interface
|
|
4
|
-
import {idlFactory} from './frontend.did.js';
|
|
5
|
-
export {idlFactory} from './frontend.did.js';
|
|
6
|
-
|
|
7
|
-
// CANISTER_ID is replaced by webpack based on node environment
|
|
8
|
-
|
|
9
|
-
export const createActor = (canisterId, options = {}) => {
|
|
10
|
-
const agent = options.agent || new HttpAgent({...options.agentOptions});
|
|
11
|
-
|
|
12
|
-
if (options.agent && options.agentOptions) {
|
|
13
|
-
console.warn(
|
|
14
|
-
'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Fetch root key for certificate validation during development
|
|
19
|
-
if (process.env.DFX_NETWORK !== 'ic') {
|
|
20
|
-
agent.fetchRootKey().catch((err) => {
|
|
21
|
-
console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
|
|
22
|
-
console.error(err);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Creates an actor with using the candid interface and the HttpAgent
|
|
27
|
-
return Actor.createActor(idlFactory, {
|
|
28
|
-
agent,
|
|
29
|
-
canisterId,
|
|
30
|
-
...options.actorOptions
|
|
31
|
-
});
|
|
32
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
|
|
2
|
-
import type {IDL} from '@dfinity/candid';
|
|
3
|
-
import type {Principal} from '@dfinity/principal';
|
|
4
|
-
|
|
5
|
-
import {_SERVICE} from './internet_identity.did';
|
|
6
|
-
|
|
7
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
8
|
-
export declare const canisterId: string;
|
|
9
|
-
|
|
10
|
-
export declare interface CreateActorOptions {
|
|
11
|
-
/**
|
|
12
|
-
* @see {@link Agent}
|
|
13
|
-
*/
|
|
14
|
-
agent?: Agent;
|
|
15
|
-
/**
|
|
16
|
-
* @see {@link HttpAgentOptions}
|
|
17
|
-
*/
|
|
18
|
-
agentOptions?: HttpAgentOptions;
|
|
19
|
-
/**
|
|
20
|
-
* @see {@link ActorConfig}
|
|
21
|
-
*/
|
|
22
|
-
actorOptions?: ActorConfig;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
|
|
27
|
-
* @constructs {@link ActorSubClass}
|
|
28
|
-
* @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
|
|
29
|
-
* @param {CreateActorOptions} options - see {@link CreateActorOptions}
|
|
30
|
-
* @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
|
|
31
|
-
* @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
|
|
32
|
-
* @see {@link HttpAgentOptions}
|
|
33
|
-
* @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
|
|
34
|
-
* @see {@link ActorConfig}
|
|
35
|
-
*/
|
|
36
|
-
export declare const createActor: (
|
|
37
|
-
canisterId: string | Principal,
|
|
38
|
-
options?: CreateActorOptions
|
|
39
|
-
) => ActorSubclass<_SERVICE>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Intialized Actor using default settings, ready to talk to a canister using its candid interface
|
|
43
|
-
* @constructs {@link ActorSubClass}
|
|
44
|
-
*/
|
|
45
|
-
export declare const internet_identity: ActorSubclass<_SERVICE>;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import {Actor, HttpAgent} from '@dfinity/agent';
|
|
2
|
-
|
|
3
|
-
// Imports and re-exports candid interface
|
|
4
|
-
import {idlFactory} from './internet_identity.did.js';
|
|
5
|
-
export {idlFactory} from './internet_identity.did.js';
|
|
6
|
-
|
|
7
|
-
// CANISTER_ID is replaced by webpack based on node environment
|
|
8
|
-
|
|
9
|
-
export const createActor = (canisterId, options = {}) => {
|
|
10
|
-
const agent = options.agent || new HttpAgent({...options.agentOptions});
|
|
11
|
-
|
|
12
|
-
if (options.agent && options.agentOptions) {
|
|
13
|
-
console.warn(
|
|
14
|
-
'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
|
|
15
|
-
);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// Fetch root key for certificate validation during development
|
|
19
|
-
if (process.env.DFX_NETWORK !== 'ic') {
|
|
20
|
-
agent.fetchRootKey().catch((err) => {
|
|
21
|
-
console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
|
|
22
|
-
console.error(err);
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Creates an actor with using the candid interface and the HttpAgent
|
|
27
|
-
return Actor.createActor(idlFactory, {
|
|
28
|
-
agent,
|
|
29
|
-
canisterId,
|
|
30
|
-
...options.actorOptions
|
|
31
|
-
});
|
|
32
|
-
};
|
|
@@ -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
|
-
}
|