@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,48 +1,48 @@
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
4
  export type BlockIndex = bigint;
5
5
  export type Cycles = bigint;
6
6
  export interface CyclesCanisterInitPayload {
7
- last_purged_notification: [] | [BlockIndex];
8
- governance_canister_id: Principal;
9
- minting_account_id: [] | [string];
10
- ledger_canister_id: Principal;
7
+ last_purged_notification: [] | [BlockIndex];
8
+ governance_canister_id: Principal;
9
+ minting_account_id: [] | [string];
10
+ ledger_canister_id: Principal;
11
11
  }
12
12
  export interface IcpXdrConversionRate {
13
- xdr_permyriad_per_icp: bigint;
14
- timestamp_seconds: bigint;
13
+ xdr_permyriad_per_icp: bigint;
14
+ timestamp_seconds: bigint;
15
15
  }
16
16
  export interface IcpXdrConversionRateResponse {
17
- certificate: Uint8Array | number[];
18
- data: IcpXdrConversionRate;
19
- hash_tree: Uint8Array | number[];
17
+ certificate: Uint8Array | number[];
18
+ data: IcpXdrConversionRate;
19
+ hash_tree: Uint8Array | number[];
20
20
  }
21
21
  export interface NotifyCreateCanisterArg {
22
- controller: Principal;
23
- block_index: BlockIndex;
24
- subnet_type: [] | [string];
22
+ controller: Principal;
23
+ block_index: BlockIndex;
24
+ subnet_type: [] | [string];
25
25
  }
26
- export type NotifyCreateCanisterResult = {Ok: Principal} | {Err: NotifyError};
26
+ export type NotifyCreateCanisterResult = { Ok: Principal } | { Err: NotifyError };
27
27
  export type NotifyError =
28
- | {
29
- Refunded: {block_index: [] | [BlockIndex]; reason: string};
30
- }
31
- | {InvalidTransaction: string}
32
- | {Other: {error_message: string; error_code: bigint}}
33
- | {Processing: null}
34
- | {TransactionTooOld: BlockIndex};
28
+ | {
29
+ Refunded: { block_index: [] | [BlockIndex]; reason: string };
30
+ }
31
+ | { InvalidTransaction: string }
32
+ | { Other: { error_message: string; error_code: bigint } }
33
+ | { Processing: null }
34
+ | { TransactionTooOld: BlockIndex };
35
35
  export interface NotifyTopUpArg {
36
- block_index: BlockIndex;
37
- canister_id: Principal;
36
+ block_index: BlockIndex;
37
+ canister_id: Principal;
38
38
  }
39
- export type NotifyTopUpResult = {Ok: Cycles} | {Err: NotifyError};
39
+ export type NotifyTopUpResult = { Ok: Cycles } | { Err: NotifyError };
40
40
  export interface SubnetTypesToSubnetsResponse {
41
- data: Array<[string, Array<Principal>]>;
41
+ data: Array<[string, Array<Principal>]>;
42
42
  }
43
43
  export interface _SERVICE {
44
- get_icp_xdr_conversion_rate: ActorMethod<[], IcpXdrConversionRateResponse>;
45
- get_subnet_types_to_subnets: ActorMethod<[], SubnetTypesToSubnetsResponse>;
46
- notify_create_canister: ActorMethod<[NotifyCreateCanisterArg], NotifyCreateCanisterResult>;
47
- notify_top_up: ActorMethod<[NotifyTopUpArg], NotifyTopUpResult>;
44
+ get_icp_xdr_conversion_rate: ActorMethod<[], IcpXdrConversionRateResponse>;
45
+ get_subnet_types_to_subnets: ActorMethod<[], SubnetTypesToSubnetsResponse>;
46
+ notify_create_canister: ActorMethod<[NotifyCreateCanisterArg], NotifyCreateCanisterResult>;
47
+ notify_top_up: ActorMethod<[NotifyTopUpArg], NotifyTopUpResult>;
48
48
  }
@@ -1,65 +1,65 @@
1
- export const idlFactory = ({IDL}) => {
2
- const BlockIndex = IDL.Nat64;
3
- const CyclesCanisterInitPayload = IDL.Record({
4
- last_purged_notification: IDL.Opt(BlockIndex),
5
- governance_canister_id: IDL.Principal,
6
- minting_account_id: IDL.Opt(IDL.Text),
7
- ledger_canister_id: IDL.Principal
8
- });
9
- const IcpXdrConversionRate = IDL.Record({
10
- xdr_permyriad_per_icp: IDL.Nat64,
11
- timestamp_seconds: IDL.Nat64
12
- });
13
- const IcpXdrConversionRateResponse = IDL.Record({
14
- certificate: IDL.Vec(IDL.Nat8),
15
- data: IcpXdrConversionRate,
16
- hash_tree: IDL.Vec(IDL.Nat8)
17
- });
18
- const SubnetTypesToSubnetsResponse = IDL.Record({
19
- data: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Principal)))
20
- });
21
- const NotifyCreateCanisterArg = IDL.Record({
22
- controller: IDL.Principal,
23
- block_index: BlockIndex,
24
- subnet_type: IDL.Opt(IDL.Text)
25
- });
26
- const NotifyError = IDL.Variant({
27
- Refunded: IDL.Record({
28
- block_index: IDL.Opt(BlockIndex),
29
- reason: IDL.Text
30
- }),
31
- InvalidTransaction: IDL.Text,
32
- Other: IDL.Record({
33
- error_message: IDL.Text,
34
- error_code: IDL.Nat64
35
- }),
36
- Processing: IDL.Null,
37
- TransactionTooOld: BlockIndex
38
- });
39
- const NotifyCreateCanisterResult = IDL.Variant({
40
- Ok: IDL.Principal,
41
- Err: NotifyError
42
- });
43
- const NotifyTopUpArg = IDL.Record({
44
- block_index: BlockIndex,
45
- canister_id: IDL.Principal
46
- });
47
- const Cycles = IDL.Nat;
48
- const NotifyTopUpResult = IDL.Variant({Ok: Cycles, Err: NotifyError});
49
- return IDL.Service({
50
- get_icp_xdr_conversion_rate: IDL.Func([], [IcpXdrConversionRateResponse], ['query']),
51
- get_subnet_types_to_subnets: IDL.Func([], [SubnetTypesToSubnetsResponse], ['query']),
52
- notify_create_canister: IDL.Func([NotifyCreateCanisterArg], [NotifyCreateCanisterResult], []),
53
- notify_top_up: IDL.Func([NotifyTopUpArg], [NotifyTopUpResult], [])
54
- });
1
+ export const idlFactory = ({ IDL }) => {
2
+ const BlockIndex = IDL.Nat64;
3
+ const CyclesCanisterInitPayload = IDL.Record({
4
+ last_purged_notification: IDL.Opt(BlockIndex),
5
+ governance_canister_id: IDL.Principal,
6
+ minting_account_id: IDL.Opt(IDL.Text),
7
+ ledger_canister_id: IDL.Principal
8
+ });
9
+ const IcpXdrConversionRate = IDL.Record({
10
+ xdr_permyriad_per_icp: IDL.Nat64,
11
+ timestamp_seconds: IDL.Nat64
12
+ });
13
+ const IcpXdrConversionRateResponse = IDL.Record({
14
+ certificate: IDL.Vec(IDL.Nat8),
15
+ data: IcpXdrConversionRate,
16
+ hash_tree: IDL.Vec(IDL.Nat8)
17
+ });
18
+ const SubnetTypesToSubnetsResponse = IDL.Record({
19
+ data: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Principal)))
20
+ });
21
+ const NotifyCreateCanisterArg = IDL.Record({
22
+ controller: IDL.Principal,
23
+ block_index: BlockIndex,
24
+ subnet_type: IDL.Opt(IDL.Text)
25
+ });
26
+ const NotifyError = IDL.Variant({
27
+ Refunded: IDL.Record({
28
+ block_index: IDL.Opt(BlockIndex),
29
+ reason: IDL.Text
30
+ }),
31
+ InvalidTransaction: IDL.Text,
32
+ Other: IDL.Record({
33
+ error_message: IDL.Text,
34
+ error_code: IDL.Nat64
35
+ }),
36
+ Processing: IDL.Null,
37
+ TransactionTooOld: BlockIndex
38
+ });
39
+ const NotifyCreateCanisterResult = IDL.Variant({
40
+ Ok: IDL.Principal,
41
+ Err: NotifyError
42
+ });
43
+ const NotifyTopUpArg = IDL.Record({
44
+ block_index: BlockIndex,
45
+ canister_id: IDL.Principal
46
+ });
47
+ const Cycles = IDL.Nat;
48
+ const NotifyTopUpResult = IDL.Variant({ Ok: Cycles, Err: NotifyError });
49
+ return IDL.Service({
50
+ get_icp_xdr_conversion_rate: IDL.Func([], [IcpXdrConversionRateResponse], ['query']),
51
+ get_subnet_types_to_subnets: IDL.Func([], [SubnetTypesToSubnetsResponse], ['query']),
52
+ notify_create_canister: IDL.Func([NotifyCreateCanisterArg], [NotifyCreateCanisterResult], []),
53
+ notify_top_up: IDL.Func([NotifyTopUpArg], [NotifyTopUpResult], [])
54
+ });
55
55
  };
56
- export const init = ({IDL}) => {
57
- const BlockIndex = IDL.Nat64;
58
- const CyclesCanisterInitPayload = IDL.Record({
59
- last_purged_notification: IDL.Opt(BlockIndex),
60
- governance_canister_id: IDL.Principal,
61
- minting_account_id: IDL.Opt(IDL.Text),
62
- ledger_canister_id: IDL.Principal
63
- });
64
- return [CyclesCanisterInitPayload];
56
+ export const init = ({ IDL }) => {
57
+ const BlockIndex = IDL.Nat64;
58
+ const CyclesCanisterInitPayload = IDL.Record({
59
+ last_purged_notification: IDL.Opt(BlockIndex),
60
+ governance_canister_id: IDL.Principal,
61
+ minting_account_id: IDL.Opt(IDL.Text),
62
+ ledger_canister_id: IDL.Principal
63
+ });
64
+ return [CyclesCanisterInitPayload];
65
65
  };
@@ -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 './cmc.did';
5
+ import { _SERVICE } from './cmc.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 './cmc.did.js';
5
- export {idlFactory} from './cmc.did.js';
4
+ import { idlFactory } from './cmc.did.js';
5
+ export { idlFactory } from './cmc.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
  };
@@ -1,47 +1,60 @@
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 ControllersArgs {
5
- controllers: Array<Principal>;
6
- }
7
4
  export interface CreateSatelliteArgs {
8
- block_index: [] | [bigint];
9
- user: Principal;
5
+ block_index: [] | [bigint];
6
+ user: Principal;
7
+ }
8
+ export interface DeleteControllersArgs {
9
+ controllers: Array<Principal>;
10
10
  }
11
11
  export interface GetCreateSatelliteFeeArgs {
12
- user: Principal;
12
+ user: Principal;
13
13
  }
14
14
  export interface LoadRelease {
15
- total: bigint;
16
- chunks: bigint;
15
+ total: bigint;
16
+ chunks: bigint;
17
17
  }
18
18
  export interface MissionControl {
19
- updated_at: bigint;
20
- credits: Tokens;
21
- mission_control_id: [] | [Principal];
22
- owner: Principal;
23
- created_at: bigint;
19
+ updated_at: bigint;
20
+ credits: Tokens;
21
+ mission_control_id: [] | [Principal];
22
+ owner: Principal;
23
+ created_at: bigint;
24
+ }
25
+ export interface RateConfig {
26
+ max_tokens: bigint;
27
+ time_per_token_ns: bigint;
24
28
  }
25
- export type ReleaseType = {MissionControl: null} | {Satellite: null};
26
29
  export interface ReleasesVersion {
27
- satellite: [] | [string];
28
- mission_control: [] | [string];
30
+ satellite: [] | [string];
31
+ mission_control: [] | [string];
32
+ }
33
+ export type Segment = { MissionControl: null } | { Satellite: null };
34
+ export interface SetController {
35
+ metadata: Array<[string, string]>;
36
+ expires_at: [] | [bigint];
37
+ }
38
+ export interface SetControllersArgs {
39
+ controller: SetController;
40
+ controllers: Array<Principal>;
29
41
  }
30
42
  export interface Tokens {
31
- e8s: bigint;
43
+ e8s: bigint;
32
44
  }
33
45
  export interface _SERVICE {
34
- add_controllers: ActorMethod<[ControllersArgs], undefined>;
35
- add_invitation_code: ActorMethod<[string], undefined>;
36
- create_satellite: ActorMethod<[CreateSatelliteArgs], Principal>;
37
- get_create_satellite_fee: ActorMethod<[GetCreateSatelliteFeeArgs], [] | [Tokens]>;
38
- get_credits: ActorMethod<[], Tokens>;
39
- get_releases_version: ActorMethod<[], ReleasesVersion>;
40
- get_user_mission_control_center: ActorMethod<[], [] | [MissionControl]>;
41
- init_user_mission_control_center: ActorMethod<[[] | [string]], MissionControl>;
42
- list_user_mission_control_centers: ActorMethod<[], Array<[Principal, MissionControl]>>;
43
- load_release: ActorMethod<[ReleaseType, Uint8Array | number[], string], LoadRelease>;
44
- remove_controllers: ActorMethod<[ControllersArgs], undefined>;
45
- reset_release: ActorMethod<[ReleaseType], undefined>;
46
- version: ActorMethod<[], string>;
46
+ add_invitation_code: ActorMethod<[string], undefined>;
47
+ create_satellite: ActorMethod<[CreateSatelliteArgs], Principal>;
48
+ del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
49
+ get_create_satellite_fee: ActorMethod<[GetCreateSatelliteFeeArgs], [] | [Tokens]>;
50
+ get_credits: ActorMethod<[], Tokens>;
51
+ get_releases_version: ActorMethod<[], ReleasesVersion>;
52
+ get_user_mission_control_center: ActorMethod<[], [] | [MissionControl]>;
53
+ init_user_mission_control_center: ActorMethod<[[] | [string]], MissionControl>;
54
+ list_user_mission_control_centers: ActorMethod<[], Array<[Principal, MissionControl]>>;
55
+ load_release: ActorMethod<[Segment, Uint8Array | number[], string], LoadRelease>;
56
+ reset_release: ActorMethod<[Segment], undefined>;
57
+ set_controllers: ActorMethod<[SetControllersArgs], undefined>;
58
+ update_rate_config: ActorMethod<[Segment, RateConfig], undefined>;
59
+ version: ActorMethod<[], string>;
47
60
  }
@@ -1,49 +1,62 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
- const CreateSatelliteArgs = IDL.Record({
6
- block_index: IDL.Opt(IDL.Nat64),
7
- user: IDL.Principal
8
- });
9
- const GetCreateSatelliteFeeArgs = IDL.Record({user: IDL.Principal});
10
- const Tokens = IDL.Record({e8s: IDL.Nat64});
11
- const ReleasesVersion = IDL.Record({
12
- satellite: IDL.Opt(IDL.Text),
13
- mission_control: IDL.Opt(IDL.Text)
14
- });
15
- const MissionControl = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- credits: Tokens,
18
- mission_control_id: IDL.Opt(IDL.Principal),
19
- owner: IDL.Principal,
20
- created_at: IDL.Nat64
21
- });
22
- const ReleaseType = IDL.Variant({
23
- MissionControl: IDL.Null,
24
- Satellite: IDL.Null
25
- });
26
- const LoadRelease = IDL.Record({total: IDL.Nat64, chunks: IDL.Nat64});
27
- return IDL.Service({
28
- add_controllers: IDL.Func([ControllersArgs], [], []),
29
- add_invitation_code: IDL.Func([IDL.Text], [], []),
30
- create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []),
31
- get_create_satellite_fee: IDL.Func([GetCreateSatelliteFeeArgs], [IDL.Opt(Tokens)], ['query']),
32
- get_credits: IDL.Func([], [Tokens], ['query']),
33
- get_releases_version: IDL.Func([], [ReleasesVersion], ['query']),
34
- get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
35
- init_user_mission_control_center: IDL.Func([IDL.Opt(IDL.Text)], [MissionControl], []),
36
- list_user_mission_control_centers: IDL.Func(
37
- [],
38
- [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
39
- ['query']
40
- ),
41
- load_release: IDL.Func([ReleaseType, IDL.Vec(IDL.Nat8), IDL.Text], [LoadRelease], []),
42
- remove_controllers: IDL.Func([ControllersArgs], [], []),
43
- reset_release: IDL.Func([ReleaseType], [], []),
44
- version: IDL.Func([], [IDL.Text], ['query'])
45
- });
1
+ export const idlFactory = ({ IDL }) => {
2
+ const CreateSatelliteArgs = IDL.Record({
3
+ block_index: IDL.Opt(IDL.Nat64),
4
+ user: IDL.Principal
5
+ });
6
+ const DeleteControllersArgs = IDL.Record({
7
+ controllers: IDL.Vec(IDL.Principal)
8
+ });
9
+ const GetCreateSatelliteFeeArgs = IDL.Record({ user: IDL.Principal });
10
+ const Tokens = IDL.Record({ e8s: IDL.Nat64 });
11
+ const ReleasesVersion = IDL.Record({
12
+ satellite: IDL.Opt(IDL.Text),
13
+ mission_control: IDL.Opt(IDL.Text)
14
+ });
15
+ const MissionControl = IDL.Record({
16
+ updated_at: IDL.Nat64,
17
+ credits: Tokens,
18
+ mission_control_id: IDL.Opt(IDL.Principal),
19
+ owner: IDL.Principal,
20
+ created_at: IDL.Nat64
21
+ });
22
+ const Segment = IDL.Variant({
23
+ MissionControl: IDL.Null,
24
+ Satellite: IDL.Null
25
+ });
26
+ const LoadRelease = IDL.Record({ total: IDL.Nat64, chunks: IDL.Nat64 });
27
+ const SetController = IDL.Record({
28
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
29
+ expires_at: IDL.Opt(IDL.Nat64)
30
+ });
31
+ const SetControllersArgs = IDL.Record({
32
+ controller: SetController,
33
+ controllers: IDL.Vec(IDL.Principal)
34
+ });
35
+ const RateConfig = IDL.Record({
36
+ max_tokens: IDL.Nat64,
37
+ time_per_token_ns: IDL.Nat64
38
+ });
39
+ return IDL.Service({
40
+ add_invitation_code: IDL.Func([IDL.Text], [], []),
41
+ create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []),
42
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
43
+ get_create_satellite_fee: IDL.Func([GetCreateSatelliteFeeArgs], [IDL.Opt(Tokens)], ['query']),
44
+ get_credits: IDL.Func([], [Tokens], ['query']),
45
+ get_releases_version: IDL.Func([], [ReleasesVersion], ['query']),
46
+ get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
47
+ init_user_mission_control_center: IDL.Func([IDL.Opt(IDL.Text)], [MissionControl], []),
48
+ list_user_mission_control_centers: IDL.Func(
49
+ [],
50
+ [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
51
+ ['query']
52
+ ),
53
+ load_release: IDL.Func([Segment, IDL.Vec(IDL.Nat8), IDL.Text], [LoadRelease], []),
54
+ reset_release: IDL.Func([Segment], [], []),
55
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
56
+ update_rate_config: IDL.Func([Segment, RateConfig], [], []),
57
+ version: IDL.Func([], [IDL.Text], ['query'])
58
+ });
46
59
  };
47
- export const init = ({IDL}) => {
48
- return [];
60
+ export const init = ({ IDL }) => {
61
+ return [];
49
62
  };
@@ -1,49 +1,62 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
- const CreateSatelliteArgs = IDL.Record({
6
- block_index: IDL.Opt(IDL.Nat64),
7
- user: IDL.Principal
8
- });
9
- const GetCreateSatelliteFeeArgs = IDL.Record({user: IDL.Principal});
10
- const Tokens = IDL.Record({e8s: IDL.Nat64});
11
- const ReleasesVersion = IDL.Record({
12
- satellite: IDL.Opt(IDL.Text),
13
- mission_control: IDL.Opt(IDL.Text)
14
- });
15
- const MissionControl = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- credits: Tokens,
18
- mission_control_id: IDL.Opt(IDL.Principal),
19
- owner: IDL.Principal,
20
- created_at: IDL.Nat64
21
- });
22
- const ReleaseType = IDL.Variant({
23
- MissionControl: IDL.Null,
24
- Satellite: IDL.Null
25
- });
26
- const LoadRelease = IDL.Record({total: IDL.Nat64, chunks: IDL.Nat64});
27
- return IDL.Service({
28
- add_controllers: IDL.Func([ControllersArgs], [], []),
29
- add_invitation_code: IDL.Func([IDL.Text], [], []),
30
- create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []),
31
- get_create_satellite_fee: IDL.Func([GetCreateSatelliteFeeArgs], [IDL.Opt(Tokens)], ['query']),
32
- get_credits: IDL.Func([], [Tokens], ['query']),
33
- get_releases_version: IDL.Func([], [ReleasesVersion], ['query']),
34
- get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
35
- init_user_mission_control_center: IDL.Func([IDL.Opt(IDL.Text)], [MissionControl], []),
36
- list_user_mission_control_centers: IDL.Func(
37
- [],
38
- [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
39
- ['query']
40
- ),
41
- load_release: IDL.Func([ReleaseType, IDL.Vec(IDL.Nat8), IDL.Text], [LoadRelease], []),
42
- remove_controllers: IDL.Func([ControllersArgs], [], []),
43
- reset_release: IDL.Func([ReleaseType], [], []),
44
- version: IDL.Func([], [IDL.Text], ['query'])
45
- });
1
+ export const idlFactory = ({ IDL }) => {
2
+ const CreateSatelliteArgs = IDL.Record({
3
+ block_index: IDL.Opt(IDL.Nat64),
4
+ user: IDL.Principal
5
+ });
6
+ const DeleteControllersArgs = IDL.Record({
7
+ controllers: IDL.Vec(IDL.Principal)
8
+ });
9
+ const GetCreateSatelliteFeeArgs = IDL.Record({ user: IDL.Principal });
10
+ const Tokens = IDL.Record({ e8s: IDL.Nat64 });
11
+ const ReleasesVersion = IDL.Record({
12
+ satellite: IDL.Opt(IDL.Text),
13
+ mission_control: IDL.Opt(IDL.Text)
14
+ });
15
+ const MissionControl = IDL.Record({
16
+ updated_at: IDL.Nat64,
17
+ credits: Tokens,
18
+ mission_control_id: IDL.Opt(IDL.Principal),
19
+ owner: IDL.Principal,
20
+ created_at: IDL.Nat64
21
+ });
22
+ const Segment = IDL.Variant({
23
+ MissionControl: IDL.Null,
24
+ Satellite: IDL.Null
25
+ });
26
+ const LoadRelease = IDL.Record({ total: IDL.Nat64, chunks: IDL.Nat64 });
27
+ const SetController = IDL.Record({
28
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
29
+ expires_at: IDL.Opt(IDL.Nat64)
30
+ });
31
+ const SetControllersArgs = IDL.Record({
32
+ controller: SetController,
33
+ controllers: IDL.Vec(IDL.Principal)
34
+ });
35
+ const RateConfig = IDL.Record({
36
+ max_tokens: IDL.Nat64,
37
+ time_per_token_ns: IDL.Nat64
38
+ });
39
+ return IDL.Service({
40
+ add_invitation_code: IDL.Func([IDL.Text], [], []),
41
+ create_satellite: IDL.Func([CreateSatelliteArgs], [IDL.Principal], []),
42
+ del_controllers: IDL.Func([DeleteControllersArgs], [], []),
43
+ get_create_satellite_fee: IDL.Func([GetCreateSatelliteFeeArgs], [IDL.Opt(Tokens)], ['query']),
44
+ get_credits: IDL.Func([], [Tokens], ['query']),
45
+ get_releases_version: IDL.Func([], [ReleasesVersion], ['query']),
46
+ get_user_mission_control_center: IDL.Func([], [IDL.Opt(MissionControl)], ['query']),
47
+ init_user_mission_control_center: IDL.Func([IDL.Opt(IDL.Text)], [MissionControl], []),
48
+ list_user_mission_control_centers: IDL.Func(
49
+ [],
50
+ [IDL.Vec(IDL.Tuple(IDL.Principal, MissionControl))],
51
+ ['query']
52
+ ),
53
+ load_release: IDL.Func([Segment, IDL.Vec(IDL.Nat8), IDL.Text], [LoadRelease], []),
54
+ reset_release: IDL.Func([Segment], [], []),
55
+ set_controllers: IDL.Func([SetControllersArgs], [], []),
56
+ update_rate_config: IDL.Func([Segment, RateConfig], [], []),
57
+ version: IDL.Func([], [IDL.Text], ['query'])
58
+ });
46
59
  };
47
- export const init = ({IDL}) => {
48
- return [];
60
+ export const init = ({ IDL }) => {
61
+ return [];
49
62
  };