@junobuild/admin 0.0.7 → 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.
Files changed (43) hide show
  1. package/dist/browser/index.js +14 -14
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/declarations/cmc/cmc.did.d.ts +30 -30
  4. package/dist/declarations/cmc/cmc.factory.did.js +63 -63
  5. package/dist/declarations/cmc/index.d.ts +18 -18
  6. package/dist/declarations/cmc/index.js +22 -22
  7. package/dist/declarations/console/console.did.d.ts +37 -37
  8. package/dist/declarations/console/console.factory.did.js +60 -60
  9. package/dist/declarations/console/console.factory.did.mjs +60 -60
  10. package/dist/declarations/console/index.d.ts +18 -18
  11. package/dist/declarations/console/index.js +22 -22
  12. package/dist/declarations/frontend/frontend.did.d.ts +136 -136
  13. package/dist/declarations/frontend/frontend.factory.did.js +206 -206
  14. package/dist/declarations/frontend/index.d.ts +18 -18
  15. package/dist/declarations/frontend/index.js +22 -22
  16. package/dist/declarations/ic/ic.did.d.ts +63 -63
  17. package/dist/declarations/ic/ic.factory.did.js +126 -126
  18. package/dist/declarations/internet_identity/index.d.ts +18 -18
  19. package/dist/declarations/internet_identity/index.js +22 -22
  20. package/dist/declarations/internet_identity/internet_identity.did.d.ts +136 -136
  21. package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -231
  22. package/dist/declarations/ledger/index.d.ts +18 -18
  23. package/dist/declarations/ledger/index.js +22 -22
  24. package/dist/declarations/ledger/ledger.did.d.ts +64 -64
  25. package/dist/declarations/ledger/ledger.factory.did.js +96 -96
  26. package/dist/declarations/mission_control/index.d.ts +18 -18
  27. package/dist/declarations/mission_control/index.js +22 -22
  28. package/dist/declarations/mission_control/mission_control.did.d.ts +30 -30
  29. package/dist/declarations/mission_control/mission_control.factory.did.js +48 -48
  30. package/dist/declarations/satellite/index.d.ts +18 -18
  31. package/dist/declarations/satellite/index.js +22 -22
  32. package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
  33. package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
  34. package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
  35. package/dist/declarations/satellite/satellite.did.d.ts +124 -120
  36. package/dist/declarations/satellite/satellite.factory.did.js +189 -189
  37. package/dist/declarations/satellite/satellite.factory.did.mjs +189 -189
  38. package/dist/node/index.mjs +23 -23
  39. package/dist/node/index.mjs.map +4 -4
  40. package/dist/types/api/actor.api.d.ts +2 -0
  41. package/dist/types/api/satellite.api.d.ts +3 -0
  42. package/dist/types/services/satellite.services.d.ts +2 -1
  43. package/package.json +1 -1
@@ -1,233 +1,233 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ArchiveConfig = IDL.Record({
3
- polling_interval_ns: IDL.Nat64,
4
- entries_buffer_limit: IDL.Nat64,
5
- module_hash: IDL.Vec(IDL.Nat8),
6
- entries_fetch_limit: IDL.Nat16
7
- });
8
- const RateLimitConfig = IDL.Record({
9
- max_tokens: IDL.Nat64,
10
- time_per_token_ns: IDL.Nat64
11
- });
12
- const InternetIdentityInit = IDL.Record({
13
- assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
14
- archive_config: IDL.Opt(ArchiveConfig),
15
- canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
16
- register_rate_limit: IDL.Opt(RateLimitConfig)
17
- });
18
- const UserNumber = IDL.Nat64;
19
- const DeviceProtection = IDL.Variant({
20
- unprotected: IDL.Null,
21
- protected: IDL.Null
22
- });
23
- const PublicKey = IDL.Vec(IDL.Nat8);
24
- const DeviceKey = PublicKey;
25
- const KeyType = IDL.Variant({
26
- platform: IDL.Null,
27
- seed_phrase: IDL.Null,
28
- cross_platform: IDL.Null,
29
- unknown: IDL.Null
30
- });
31
- const Purpose = IDL.Variant({
32
- authentication: IDL.Null,
33
- recovery: IDL.Null
34
- });
35
- const CredentialId = IDL.Vec(IDL.Nat8);
36
- const DeviceData = IDL.Record({
37
- alias: IDL.Text,
38
- origin: IDL.Opt(IDL.Text),
39
- protection: DeviceProtection,
40
- pubkey: DeviceKey,
41
- key_type: KeyType,
42
- purpose: Purpose,
43
- credential_id: IDL.Opt(CredentialId)
44
- });
45
- const Timestamp = IDL.Nat64;
46
- const AddTentativeDeviceResponse = IDL.Variant({
47
- device_registration_mode_off: IDL.Null,
48
- another_device_tentatively_added: IDL.Null,
49
- added_tentatively: IDL.Record({
50
- verification_code: IDL.Text,
51
- device_registration_timeout: Timestamp
52
- })
53
- });
54
- const ChallengeKey = IDL.Text;
55
- const Challenge = IDL.Record({
56
- png_base64: IDL.Text,
57
- challenge_key: ChallengeKey
58
- });
59
- const DeployArchiveResult = IDL.Variant({
60
- creation_in_progress: IDL.Null,
61
- success: IDL.Principal,
62
- failed: IDL.Text
63
- });
64
- const BufferedArchiveEntry = IDL.Record({
65
- sequence_number: IDL.Nat64,
66
- entry: IDL.Vec(IDL.Nat8),
67
- anchor_number: UserNumber,
68
- timestamp: Timestamp
69
- });
70
- const WebAuthnCredential = IDL.Record({
71
- pubkey: PublicKey,
72
- credential_id: CredentialId
73
- });
74
- const AnchorCredentials = IDL.Record({
75
- recovery_phrases: IDL.Vec(PublicKey),
76
- credentials: IDL.Vec(WebAuthnCredential),
77
- recovery_credentials: IDL.Vec(WebAuthnCredential)
78
- });
79
- const DeviceWithUsage = IDL.Record({
80
- alias: IDL.Text,
81
- last_usage: IDL.Opt(Timestamp),
82
- origin: IDL.Opt(IDL.Text),
83
- protection: DeviceProtection,
84
- pubkey: DeviceKey,
85
- key_type: KeyType,
86
- purpose: Purpose,
87
- credential_id: IDL.Opt(CredentialId)
88
- });
89
- const DeviceRegistrationInfo = IDL.Record({
90
- tentative_device: IDL.Opt(DeviceData),
91
- expiration: Timestamp
92
- });
93
- const IdentityAnchorInfo = IDL.Record({
94
- devices: IDL.Vec(DeviceWithUsage),
95
- device_registration: IDL.Opt(DeviceRegistrationInfo)
96
- });
97
- const FrontendHostname = IDL.Text;
98
- const SessionKey = PublicKey;
99
- const Delegation = IDL.Record({
100
- pubkey: PublicKey,
101
- targets: IDL.Opt(IDL.Vec(IDL.Principal)),
102
- expiration: Timestamp
103
- });
104
- const SignedDelegation = IDL.Record({
105
- signature: IDL.Vec(IDL.Nat8),
106
- delegation: Delegation
107
- });
108
- const GetDelegationResponse = IDL.Variant({
109
- no_such_delegation: IDL.Null,
110
- signed_delegation: SignedDelegation
111
- });
112
- const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
113
- const HttpRequest = IDL.Record({
114
- url: IDL.Text,
115
- method: IDL.Text,
116
- body: IDL.Vec(IDL.Nat8),
117
- headers: IDL.Vec(HeaderField)
118
- });
119
- const Token = IDL.Record({});
120
- const StreamingCallbackHttpResponse = IDL.Record({
121
- token: IDL.Opt(Token),
122
- body: IDL.Vec(IDL.Nat8)
123
- });
124
- const StreamingStrategy = IDL.Variant({
125
- Callback: IDL.Record({
126
- token: Token,
127
- callback: IDL.Func([Token], [StreamingCallbackHttpResponse], ['query'])
128
- })
129
- });
130
- const HttpResponse = IDL.Record({
131
- body: IDL.Vec(IDL.Nat8),
132
- headers: IDL.Vec(HeaderField),
133
- upgrade: IDL.Opt(IDL.Bool),
134
- streaming_strategy: IDL.Opt(StreamingStrategy),
135
- status_code: IDL.Nat16
136
- });
137
- const UserKey = PublicKey;
138
- const ChallengeResult = IDL.Record({
139
- key: ChallengeKey,
140
- chars: IDL.Text
141
- });
142
- const RegisterResponse = IDL.Variant({
143
- bad_challenge: IDL.Null,
144
- canister_full: IDL.Null,
145
- registered: IDL.Record({user_number: UserNumber})
146
- });
147
- const ArchiveInfo = IDL.Record({
148
- archive_config: IDL.Opt(ArchiveConfig),
149
- archive_canister: IDL.Opt(IDL.Principal)
150
- });
151
- const ActiveAnchorCounter = IDL.Record({
152
- counter: IDL.Nat64,
153
- start_timestamp: Timestamp
154
- });
155
- const CompletedActiveAnchorStats = IDL.Record({
156
- monthly_active_anchors: IDL.Opt(ActiveAnchorCounter),
157
- daily_active_anchors: IDL.Opt(ActiveAnchorCounter)
158
- });
159
- const OngoingActiveAnchorStats = IDL.Record({
160
- monthly_active_anchors: IDL.Vec(ActiveAnchorCounter),
161
- daily_active_anchors: ActiveAnchorCounter
162
- });
163
- const ActiveAnchorStatistics = IDL.Record({
164
- completed: CompletedActiveAnchorStats,
165
- ongoing: OngoingActiveAnchorStats
166
- });
167
- const InternetIdentityStats = IDL.Record({
168
- storage_layout_version: IDL.Nat8,
169
- users_registered: IDL.Nat64,
170
- assigned_user_number_range: IDL.Tuple(IDL.Nat64, IDL.Nat64),
171
- archive_info: ArchiveInfo,
172
- canister_creation_cycles_cost: IDL.Nat64,
173
- active_anchor_stats: IDL.Opt(ActiveAnchorStatistics)
174
- });
175
- const VerifyTentativeDeviceResponse = IDL.Variant({
176
- device_registration_mode_off: IDL.Null,
177
- verified: IDL.Null,
178
- wrong_code: IDL.Record({retries_left: IDL.Nat8}),
179
- no_device_to_verify: IDL.Null
180
- });
181
- return IDL.Service({
182
- acknowledge_entries: IDL.Func([IDL.Nat64], [], []),
183
- add: IDL.Func([UserNumber, DeviceData], [], []),
184
- add_tentative_device: IDL.Func([UserNumber, DeviceData], [AddTentativeDeviceResponse], []),
185
- create_challenge: IDL.Func([], [Challenge], []),
186
- deploy_archive: IDL.Func([IDL.Vec(IDL.Nat8)], [DeployArchiveResult], []),
187
- enter_device_registration_mode: IDL.Func([UserNumber], [Timestamp], []),
188
- exit_device_registration_mode: IDL.Func([UserNumber], [], []),
189
- fetch_entries: IDL.Func([], [IDL.Vec(BufferedArchiveEntry)], []),
190
- get_anchor_credentials: IDL.Func([UserNumber], [AnchorCredentials], ['query']),
191
- get_anchor_info: IDL.Func([UserNumber], [IdentityAnchorInfo], []),
192
- get_delegation: IDL.Func(
193
- [UserNumber, FrontendHostname, SessionKey, Timestamp],
194
- [GetDelegationResponse],
195
- ['query']
196
- ),
197
- get_principal: IDL.Func([UserNumber, FrontendHostname], [IDL.Principal], ['query']),
198
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
199
- http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
200
- init_salt: IDL.Func([], [], []),
201
- lookup: IDL.Func([UserNumber], [IDL.Vec(DeviceData)], ['query']),
202
- prepare_delegation: IDL.Func(
203
- [UserNumber, FrontendHostname, SessionKey, IDL.Opt(IDL.Nat64)],
204
- [UserKey, Timestamp],
205
- []
206
- ),
207
- register: IDL.Func([DeviceData, ChallengeResult], [RegisterResponse], []),
208
- remove: IDL.Func([UserNumber, DeviceKey], [], []),
209
- replace: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
210
- stats: IDL.Func([], [InternetIdentityStats], ['query']),
211
- update: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
212
- verify_tentative_device: IDL.Func([UserNumber, IDL.Text], [VerifyTentativeDeviceResponse], [])
213
- });
1
+ export const idlFactory = ({ IDL }) => {
2
+ const ArchiveConfig = IDL.Record({
3
+ polling_interval_ns: IDL.Nat64,
4
+ entries_buffer_limit: IDL.Nat64,
5
+ module_hash: IDL.Vec(IDL.Nat8),
6
+ entries_fetch_limit: IDL.Nat16
7
+ });
8
+ const RateLimitConfig = IDL.Record({
9
+ max_tokens: IDL.Nat64,
10
+ time_per_token_ns: IDL.Nat64
11
+ });
12
+ const InternetIdentityInit = IDL.Record({
13
+ assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
14
+ archive_config: IDL.Opt(ArchiveConfig),
15
+ canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
16
+ register_rate_limit: IDL.Opt(RateLimitConfig)
17
+ });
18
+ const UserNumber = IDL.Nat64;
19
+ const DeviceProtection = IDL.Variant({
20
+ unprotected: IDL.Null,
21
+ protected: IDL.Null
22
+ });
23
+ const PublicKey = IDL.Vec(IDL.Nat8);
24
+ const DeviceKey = PublicKey;
25
+ const KeyType = IDL.Variant({
26
+ platform: IDL.Null,
27
+ seed_phrase: IDL.Null,
28
+ cross_platform: IDL.Null,
29
+ unknown: IDL.Null
30
+ });
31
+ const Purpose = IDL.Variant({
32
+ authentication: IDL.Null,
33
+ recovery: IDL.Null
34
+ });
35
+ const CredentialId = IDL.Vec(IDL.Nat8);
36
+ const DeviceData = IDL.Record({
37
+ alias: IDL.Text,
38
+ origin: IDL.Opt(IDL.Text),
39
+ protection: DeviceProtection,
40
+ pubkey: DeviceKey,
41
+ key_type: KeyType,
42
+ purpose: Purpose,
43
+ credential_id: IDL.Opt(CredentialId)
44
+ });
45
+ const Timestamp = IDL.Nat64;
46
+ const AddTentativeDeviceResponse = IDL.Variant({
47
+ device_registration_mode_off: IDL.Null,
48
+ another_device_tentatively_added: IDL.Null,
49
+ added_tentatively: IDL.Record({
50
+ verification_code: IDL.Text,
51
+ device_registration_timeout: Timestamp
52
+ })
53
+ });
54
+ const ChallengeKey = IDL.Text;
55
+ const Challenge = IDL.Record({
56
+ png_base64: IDL.Text,
57
+ challenge_key: ChallengeKey
58
+ });
59
+ const DeployArchiveResult = IDL.Variant({
60
+ creation_in_progress: IDL.Null,
61
+ success: IDL.Principal,
62
+ failed: IDL.Text
63
+ });
64
+ const BufferedArchiveEntry = IDL.Record({
65
+ sequence_number: IDL.Nat64,
66
+ entry: IDL.Vec(IDL.Nat8),
67
+ anchor_number: UserNumber,
68
+ timestamp: Timestamp
69
+ });
70
+ const WebAuthnCredential = IDL.Record({
71
+ pubkey: PublicKey,
72
+ credential_id: CredentialId
73
+ });
74
+ const AnchorCredentials = IDL.Record({
75
+ recovery_phrases: IDL.Vec(PublicKey),
76
+ credentials: IDL.Vec(WebAuthnCredential),
77
+ recovery_credentials: IDL.Vec(WebAuthnCredential)
78
+ });
79
+ const DeviceWithUsage = IDL.Record({
80
+ alias: IDL.Text,
81
+ last_usage: IDL.Opt(Timestamp),
82
+ origin: IDL.Opt(IDL.Text),
83
+ protection: DeviceProtection,
84
+ pubkey: DeviceKey,
85
+ key_type: KeyType,
86
+ purpose: Purpose,
87
+ credential_id: IDL.Opt(CredentialId)
88
+ });
89
+ const DeviceRegistrationInfo = IDL.Record({
90
+ tentative_device: IDL.Opt(DeviceData),
91
+ expiration: Timestamp
92
+ });
93
+ const IdentityAnchorInfo = IDL.Record({
94
+ devices: IDL.Vec(DeviceWithUsage),
95
+ device_registration: IDL.Opt(DeviceRegistrationInfo)
96
+ });
97
+ const FrontendHostname = IDL.Text;
98
+ const SessionKey = PublicKey;
99
+ const Delegation = IDL.Record({
100
+ pubkey: PublicKey,
101
+ targets: IDL.Opt(IDL.Vec(IDL.Principal)),
102
+ expiration: Timestamp
103
+ });
104
+ const SignedDelegation = IDL.Record({
105
+ signature: IDL.Vec(IDL.Nat8),
106
+ delegation: Delegation
107
+ });
108
+ const GetDelegationResponse = IDL.Variant({
109
+ no_such_delegation: IDL.Null,
110
+ signed_delegation: SignedDelegation
111
+ });
112
+ const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
113
+ const HttpRequest = IDL.Record({
114
+ url: IDL.Text,
115
+ method: IDL.Text,
116
+ body: IDL.Vec(IDL.Nat8),
117
+ headers: IDL.Vec(HeaderField)
118
+ });
119
+ const Token = IDL.Record({});
120
+ const StreamingCallbackHttpResponse = IDL.Record({
121
+ token: IDL.Opt(Token),
122
+ body: IDL.Vec(IDL.Nat8)
123
+ });
124
+ const StreamingStrategy = IDL.Variant({
125
+ Callback: IDL.Record({
126
+ token: Token,
127
+ callback: IDL.Func([Token], [StreamingCallbackHttpResponse], ['query'])
128
+ })
129
+ });
130
+ const HttpResponse = IDL.Record({
131
+ body: IDL.Vec(IDL.Nat8),
132
+ headers: IDL.Vec(HeaderField),
133
+ upgrade: IDL.Opt(IDL.Bool),
134
+ streaming_strategy: IDL.Opt(StreamingStrategy),
135
+ status_code: IDL.Nat16
136
+ });
137
+ const UserKey = PublicKey;
138
+ const ChallengeResult = IDL.Record({
139
+ key: ChallengeKey,
140
+ chars: IDL.Text
141
+ });
142
+ const RegisterResponse = IDL.Variant({
143
+ bad_challenge: IDL.Null,
144
+ canister_full: IDL.Null,
145
+ registered: IDL.Record({ user_number: UserNumber })
146
+ });
147
+ const ArchiveInfo = IDL.Record({
148
+ archive_config: IDL.Opt(ArchiveConfig),
149
+ archive_canister: IDL.Opt(IDL.Principal)
150
+ });
151
+ const ActiveAnchorCounter = IDL.Record({
152
+ counter: IDL.Nat64,
153
+ start_timestamp: Timestamp
154
+ });
155
+ const CompletedActiveAnchorStats = IDL.Record({
156
+ monthly_active_anchors: IDL.Opt(ActiveAnchorCounter),
157
+ daily_active_anchors: IDL.Opt(ActiveAnchorCounter)
158
+ });
159
+ const OngoingActiveAnchorStats = IDL.Record({
160
+ monthly_active_anchors: IDL.Vec(ActiveAnchorCounter),
161
+ daily_active_anchors: ActiveAnchorCounter
162
+ });
163
+ const ActiveAnchorStatistics = IDL.Record({
164
+ completed: CompletedActiveAnchorStats,
165
+ ongoing: OngoingActiveAnchorStats
166
+ });
167
+ const InternetIdentityStats = IDL.Record({
168
+ storage_layout_version: IDL.Nat8,
169
+ users_registered: IDL.Nat64,
170
+ assigned_user_number_range: IDL.Tuple(IDL.Nat64, IDL.Nat64),
171
+ archive_info: ArchiveInfo,
172
+ canister_creation_cycles_cost: IDL.Nat64,
173
+ active_anchor_stats: IDL.Opt(ActiveAnchorStatistics)
174
+ });
175
+ const VerifyTentativeDeviceResponse = IDL.Variant({
176
+ device_registration_mode_off: IDL.Null,
177
+ verified: IDL.Null,
178
+ wrong_code: IDL.Record({ retries_left: IDL.Nat8 }),
179
+ no_device_to_verify: IDL.Null
180
+ });
181
+ return IDL.Service({
182
+ acknowledge_entries: IDL.Func([IDL.Nat64], [], []),
183
+ add: IDL.Func([UserNumber, DeviceData], [], []),
184
+ add_tentative_device: IDL.Func([UserNumber, DeviceData], [AddTentativeDeviceResponse], []),
185
+ create_challenge: IDL.Func([], [Challenge], []),
186
+ deploy_archive: IDL.Func([IDL.Vec(IDL.Nat8)], [DeployArchiveResult], []),
187
+ enter_device_registration_mode: IDL.Func([UserNumber], [Timestamp], []),
188
+ exit_device_registration_mode: IDL.Func([UserNumber], [], []),
189
+ fetch_entries: IDL.Func([], [IDL.Vec(BufferedArchiveEntry)], []),
190
+ get_anchor_credentials: IDL.Func([UserNumber], [AnchorCredentials], ['query']),
191
+ get_anchor_info: IDL.Func([UserNumber], [IdentityAnchorInfo], []),
192
+ get_delegation: IDL.Func(
193
+ [UserNumber, FrontendHostname, SessionKey, Timestamp],
194
+ [GetDelegationResponse],
195
+ ['query']
196
+ ),
197
+ get_principal: IDL.Func([UserNumber, FrontendHostname], [IDL.Principal], ['query']),
198
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
199
+ http_request_update: IDL.Func([HttpRequest], [HttpResponse], []),
200
+ init_salt: IDL.Func([], [], []),
201
+ lookup: IDL.Func([UserNumber], [IDL.Vec(DeviceData)], ['query']),
202
+ prepare_delegation: IDL.Func(
203
+ [UserNumber, FrontendHostname, SessionKey, IDL.Opt(IDL.Nat64)],
204
+ [UserKey, Timestamp],
205
+ []
206
+ ),
207
+ register: IDL.Func([DeviceData, ChallengeResult], [RegisterResponse], []),
208
+ remove: IDL.Func([UserNumber, DeviceKey], [], []),
209
+ replace: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
210
+ stats: IDL.Func([], [InternetIdentityStats], ['query']),
211
+ update: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
212
+ verify_tentative_device: IDL.Func([UserNumber, IDL.Text], [VerifyTentativeDeviceResponse], [])
213
+ });
214
214
  };
215
- export const init = ({IDL}) => {
216
- const ArchiveConfig = IDL.Record({
217
- polling_interval_ns: IDL.Nat64,
218
- entries_buffer_limit: IDL.Nat64,
219
- module_hash: IDL.Vec(IDL.Nat8),
220
- entries_fetch_limit: IDL.Nat16
221
- });
222
- const RateLimitConfig = IDL.Record({
223
- max_tokens: IDL.Nat64,
224
- time_per_token_ns: IDL.Nat64
225
- });
226
- const InternetIdentityInit = IDL.Record({
227
- assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
228
- archive_config: IDL.Opt(ArchiveConfig),
229
- canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
230
- register_rate_limit: IDL.Opt(RateLimitConfig)
231
- });
232
- return [IDL.Opt(InternetIdentityInit)];
215
+ export const init = ({ IDL }) => {
216
+ const ArchiveConfig = IDL.Record({
217
+ polling_interval_ns: IDL.Nat64,
218
+ entries_buffer_limit: IDL.Nat64,
219
+ module_hash: IDL.Vec(IDL.Nat8),
220
+ entries_fetch_limit: IDL.Nat16
221
+ });
222
+ const RateLimitConfig = IDL.Record({
223
+ max_tokens: IDL.Nat64,
224
+ time_per_token_ns: IDL.Nat64
225
+ });
226
+ const InternetIdentityInit = IDL.Record({
227
+ assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
228
+ archive_config: IDL.Opt(ArchiveConfig),
229
+ canister_creation_cycles_cost: IDL.Opt(IDL.Nat64),
230
+ register_rate_limit: IDL.Opt(RateLimitConfig)
231
+ });
232
+ return [IDL.Opt(InternetIdentityInit)];
233
233
  };
@@ -1,25 +1,25 @@
1
- import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
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
4
 
5
- import {_SERVICE} from './ledger.did';
5
+ import { _SERVICE } from './ledger.did';
6
6
 
7
7
  export declare const idlFactory: IDL.InterfaceFactory;
8
8
  export declare const canisterId: string;
9
9
 
10
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;
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
23
  }
24
24
 
25
25
  /**
@@ -34,8 +34,8 @@ export declare interface CreateActorOptions {
34
34
  * @see {@link ActorConfig}
35
35
  */
36
36
  export declare const createActor: (
37
- canisterId: string | Principal,
38
- options?: CreateActorOptions
37
+ canisterId: string | Principal,
38
+ options?: CreateActorOptions
39
39
  ) => ActorSubclass<_SERVICE>;
40
40
 
41
41
  /**
@@ -1,32 +1,32 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
1
+ import { Actor, HttpAgent } from '@dfinity/agent';
2
2
 
3
3
  // Imports and re-exports candid interface
4
- import {idlFactory} from './ledger.did.js';
5
- export {idlFactory} from './ledger.did.js';
4
+ import { idlFactory } from './ledger.did.js';
5
+ export { idlFactory } from './ledger.did.js';
6
6
 
7
7
  // CANISTER_ID is replaced by webpack based on node environment
8
8
 
9
9
  export const createActor = (canisterId, options = {}) => {
10
- const agent = options.agent || new HttpAgent({...options.agentOptions});
10
+ const agent = options.agent || new HttpAgent({ ...options.agentOptions });
11
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
- }
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
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
- }
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
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
- });
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
32
  };