@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.
Files changed (45) hide show
  1. package/dist/browser/index.js +16 -16
  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 +45 -32
  8. package/dist/declarations/console/console.factory.did.js +60 -47
  9. package/dist/declarations/console/console.factory.did.mjs +60 -47
  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 +79 -20
  21. package/dist/declarations/internet_identity/internet_identity.did.d.ts +152 -109
  22. package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -185
  23. package/dist/declarations/ledger/index.d.ts +18 -18
  24. package/dist/declarations/ledger/index.js +22 -22
  25. package/dist/declarations/ledger/ledger.did.d.ts +64 -64
  26. package/dist/declarations/ledger/ledger.factory.did.js +96 -96
  27. package/dist/declarations/mission_control/index.d.ts +18 -18
  28. package/dist/declarations/mission_control/index.js +22 -22
  29. package/dist/declarations/mission_control/mission_control.did.d.ts +34 -17
  30. package/dist/declarations/mission_control/mission_control.factory.did.js +48 -26
  31. package/dist/declarations/satellite/index.d.ts +18 -18
  32. package/dist/declarations/satellite/index.js +22 -22
  33. package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
  34. package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
  35. package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
  36. package/dist/declarations/satellite/satellite.did.d.ts +131 -113
  37. package/dist/declarations/satellite/satellite.factory.did.js +189 -167
  38. package/dist/declarations/satellite/satellite.factory.did.mjs +189 -167
  39. package/dist/node/index.mjs +23 -23
  40. package/dist/node/index.mjs.map +4 -4
  41. package/dist/types/api/actor.api.d.ts +2 -0
  42. package/dist/types/api/mission-control.api.d.ts +2 -1
  43. package/dist/types/api/satellite.api.d.ts +5 -2
  44. package/dist/types/services/satellite.services.d.ts +2 -1
  45. package/package.json +1 -1
@@ -1,187 +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
- archive_integration: IDL.Opt(IDL.Variant({pull: IDL.Null, push: IDL.Null})),
6
- module_hash: IDL.Vec(IDL.Nat8),
7
- entries_fetch_limit: IDL.Nat16
8
- });
9
- const InternetIdentityInit = IDL.Record({
10
- upgrade_persistent_state: IDL.Opt(IDL.Bool),
11
- assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
12
- archive_config: IDL.Opt(ArchiveConfig),
13
- canister_creation_cycles_cost: IDL.Opt(IDL.Nat64)
14
- });
15
- const UserNumber = IDL.Nat64;
16
- const DeviceProtection = IDL.Variant({
17
- unprotected: IDL.Null,
18
- protected: IDL.Null
19
- });
20
- const PublicKey = IDL.Vec(IDL.Nat8);
21
- const DeviceKey = PublicKey;
22
- const KeyType = IDL.Variant({
23
- platform: IDL.Null,
24
- seed_phrase: IDL.Null,
25
- cross_platform: IDL.Null,
26
- unknown: IDL.Null
27
- });
28
- const Purpose = IDL.Variant({
29
- authentication: IDL.Null,
30
- recovery: IDL.Null
31
- });
32
- const CredentialId = IDL.Vec(IDL.Nat8);
33
- const DeviceData = IDL.Record({
34
- alias: IDL.Text,
35
- protection: DeviceProtection,
36
- pubkey: DeviceKey,
37
- key_type: KeyType,
38
- purpose: Purpose,
39
- credential_id: IDL.Opt(CredentialId)
40
- });
41
- const Timestamp = IDL.Nat64;
42
- const AddTentativeDeviceResponse = IDL.Variant({
43
- device_registration_mode_off: IDL.Null,
44
- another_device_tentatively_added: IDL.Null,
45
- added_tentatively: IDL.Record({
46
- verification_code: IDL.Text,
47
- device_registration_timeout: Timestamp
48
- })
49
- });
50
- const ChallengeKey = IDL.Text;
51
- const Challenge = IDL.Record({
52
- png_base64: IDL.Text,
53
- challenge_key: ChallengeKey
54
- });
55
- const DeployArchiveResult = IDL.Variant({
56
- creation_in_progress: IDL.Null,
57
- success: IDL.Principal,
58
- failed: IDL.Text
59
- });
60
- const BufferedArchiveEntry = IDL.Record({
61
- sequence_number: IDL.Nat64,
62
- entry: IDL.Vec(IDL.Nat8),
63
- anchor_number: UserNumber,
64
- timestamp: Timestamp
65
- });
66
- const DeviceRegistrationInfo = IDL.Record({
67
- tentative_device: IDL.Opt(DeviceData),
68
- expiration: Timestamp
69
- });
70
- const IdentityAnchorInfo = IDL.Record({
71
- devices: IDL.Vec(DeviceData),
72
- device_registration: IDL.Opt(DeviceRegistrationInfo)
73
- });
74
- const FrontendHostname = IDL.Text;
75
- const SessionKey = PublicKey;
76
- const Delegation = IDL.Record({
77
- pubkey: PublicKey,
78
- targets: IDL.Opt(IDL.Vec(IDL.Principal)),
79
- expiration: Timestamp
80
- });
81
- const SignedDelegation = IDL.Record({
82
- signature: IDL.Vec(IDL.Nat8),
83
- delegation: Delegation
84
- });
85
- const GetDelegationResponse = IDL.Variant({
86
- no_such_delegation: IDL.Null,
87
- signed_delegation: SignedDelegation
88
- });
89
- const HeaderField = IDL.Tuple(IDL.Text, IDL.Text);
90
- const HttpRequest = IDL.Record({
91
- url: IDL.Text,
92
- method: IDL.Text,
93
- body: IDL.Vec(IDL.Nat8),
94
- headers: IDL.Vec(HeaderField)
95
- });
96
- const Token = IDL.Record({});
97
- const StreamingCallbackHttpResponse = IDL.Record({
98
- token: IDL.Opt(Token),
99
- body: IDL.Vec(IDL.Nat8)
100
- });
101
- const StreamingStrategy = IDL.Variant({
102
- Callback: IDL.Record({
103
- token: Token,
104
- callback: IDL.Func([Token], [StreamingCallbackHttpResponse], ['query'])
105
- })
106
- });
107
- const HttpResponse = IDL.Record({
108
- body: IDL.Vec(IDL.Nat8),
109
- headers: IDL.Vec(HeaderField),
110
- streaming_strategy: IDL.Opt(StreamingStrategy),
111
- status_code: IDL.Nat16
112
- });
113
- const UserKey = PublicKey;
114
- const ChallengeResult = IDL.Record({
115
- key: ChallengeKey,
116
- chars: IDL.Text
117
- });
118
- const RegisterResponse = IDL.Variant({
119
- bad_challenge: IDL.Null,
120
- canister_full: IDL.Null,
121
- registered: IDL.Record({user_number: UserNumber})
122
- });
123
- const ArchiveInfo = IDL.Record({
124
- archive_config: IDL.Opt(ArchiveConfig),
125
- archive_canister: IDL.Opt(IDL.Principal)
126
- });
127
- const InternetIdentityStats = IDL.Record({
128
- storage_layout_version: IDL.Nat8,
129
- users_registered: IDL.Nat64,
130
- assigned_user_number_range: IDL.Tuple(IDL.Nat64, IDL.Nat64),
131
- archive_info: ArchiveInfo,
132
- canister_creation_cycles_cost: IDL.Nat64
133
- });
134
- const VerifyTentativeDeviceResponse = IDL.Variant({
135
- device_registration_mode_off: IDL.Null,
136
- verified: IDL.Null,
137
- wrong_code: IDL.Record({retries_left: IDL.Nat8}),
138
- no_device_to_verify: IDL.Null
139
- });
140
- return IDL.Service({
141
- acknowledge_entries: IDL.Func([IDL.Nat64], [], []),
142
- add: IDL.Func([UserNumber, DeviceData], [], []),
143
- add_tentative_device: IDL.Func([UserNumber, DeviceData], [AddTentativeDeviceResponse], []),
144
- create_challenge: IDL.Func([], [Challenge], []),
145
- deploy_archive: IDL.Func([IDL.Vec(IDL.Nat8)], [DeployArchiveResult], []),
146
- enter_device_registration_mode: IDL.Func([UserNumber], [Timestamp], []),
147
- exit_device_registration_mode: IDL.Func([UserNumber], [], []),
148
- fetch_entries: IDL.Func([], [IDL.Vec(BufferedArchiveEntry)], []),
149
- get_anchor_info: IDL.Func([UserNumber], [IdentityAnchorInfo], []),
150
- get_delegation: IDL.Func(
151
- [UserNumber, FrontendHostname, SessionKey, Timestamp],
152
- [GetDelegationResponse],
153
- ['query']
154
- ),
155
- get_principal: IDL.Func([UserNumber, FrontendHostname], [IDL.Principal], ['query']),
156
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
157
- init_salt: IDL.Func([], [], []),
158
- lookup: IDL.Func([UserNumber], [IDL.Vec(DeviceData)], ['query']),
159
- prepare_delegation: IDL.Func(
160
- [UserNumber, FrontendHostname, SessionKey, IDL.Opt(IDL.Nat64)],
161
- [UserKey, Timestamp],
162
- []
163
- ),
164
- register: IDL.Func([DeviceData, ChallengeResult], [RegisterResponse], []),
165
- remove: IDL.Func([UserNumber, DeviceKey], [], []),
166
- replace: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
167
- stats: IDL.Func([], [InternetIdentityStats], ['query']),
168
- update: IDL.Func([UserNumber, DeviceKey, DeviceData], [], []),
169
- verify_tentative_device: IDL.Func([UserNumber, IDL.Text], [VerifyTentativeDeviceResponse], [])
170
- });
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
+ });
171
214
  };
172
- export const init = ({IDL}) => {
173
- const ArchiveConfig = IDL.Record({
174
- polling_interval_ns: IDL.Nat64,
175
- entries_buffer_limit: IDL.Nat64,
176
- archive_integration: IDL.Opt(IDL.Variant({pull: IDL.Null, push: IDL.Null})),
177
- module_hash: IDL.Vec(IDL.Nat8),
178
- entries_fetch_limit: IDL.Nat16
179
- });
180
- const InternetIdentityInit = IDL.Record({
181
- upgrade_persistent_state: IDL.Opt(IDL.Bool),
182
- assigned_user_number_range: IDL.Opt(IDL.Tuple(IDL.Nat64, IDL.Nat64)),
183
- archive_config: IDL.Opt(ArchiveConfig),
184
- canister_creation_cycles_cost: IDL.Opt(IDL.Nat64)
185
- });
186
- 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)];
187
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
  };