@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.
- package/dist/browser/index.js +14 -14
- package/dist/browser/index.js.map +4 -4
- package/dist/declarations/cmc/cmc.did.d.ts +30 -30
- package/dist/declarations/cmc/cmc.factory.did.js +63 -63
- package/dist/declarations/cmc/index.d.ts +18 -18
- package/dist/declarations/cmc/index.js +22 -22
- package/dist/declarations/console/console.did.d.ts +37 -37
- package/dist/declarations/console/console.factory.did.js +60 -60
- package/dist/declarations/console/console.factory.did.mjs +60 -60
- package/dist/declarations/console/index.d.ts +18 -18
- package/dist/declarations/console/index.js +22 -22
- package/dist/declarations/frontend/frontend.did.d.ts +136 -136
- package/dist/declarations/frontend/frontend.factory.did.js +206 -206
- package/dist/declarations/frontend/index.d.ts +18 -18
- package/dist/declarations/frontend/index.js +22 -22
- package/dist/declarations/ic/ic.did.d.ts +63 -63
- package/dist/declarations/ic/ic.factory.did.js +126 -126
- package/dist/declarations/internet_identity/index.d.ts +18 -18
- package/dist/declarations/internet_identity/index.js +22 -22
- package/dist/declarations/internet_identity/internet_identity.did.d.ts +136 -136
- package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -231
- package/dist/declarations/ledger/index.d.ts +18 -18
- package/dist/declarations/ledger/index.js +22 -22
- package/dist/declarations/ledger/ledger.did.d.ts +64 -64
- package/dist/declarations/ledger/ledger.factory.did.js +96 -96
- package/dist/declarations/mission_control/index.d.ts +18 -18
- package/dist/declarations/mission_control/index.js +22 -22
- package/dist/declarations/mission_control/mission_control.did.d.ts +30 -30
- package/dist/declarations/mission_control/mission_control.factory.did.js +48 -48
- package/dist/declarations/satellite/index.d.ts +18 -18
- package/dist/declarations/satellite/index.js +22 -22
- package/dist/declarations/satellite/satellite-deprecated.did.d.ts +186 -0
- package/dist/declarations/satellite/satellite-deprecated.factory.did.js +191 -0
- package/dist/declarations/satellite/satellite-deprecated.factory.did.mjs +191 -0
- package/dist/declarations/satellite/satellite.did.d.ts +124 -120
- package/dist/declarations/satellite/satellite.factory.did.js +189 -189
- package/dist/declarations/satellite/satellite.factory.did.mjs +189 -189
- package/dist/node/index.mjs +23 -23
- package/dist/node/index.mjs.map +4 -4
- package/dist/types/api/actor.api.d.ts +2 -0
- package/dist/types/api/satellite.api.d.ts +3 -0
- package/dist/types/services/satellite.services.d.ts +2 -1
- 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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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
|
-
|
|
14
|
-
|
|
13
|
+
xdr_permyriad_per_icp: bigint;
|
|
14
|
+
timestamp_seconds: bigint;
|
|
15
15
|
}
|
|
16
16
|
export interface IcpXdrConversionRateResponse {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
certificate: Uint8Array | number[];
|
|
18
|
+
data: IcpXdrConversionRate;
|
|
19
|
+
hash_tree: Uint8Array | number[];
|
|
20
20
|
}
|
|
21
21
|
export interface NotifyCreateCanisterArg {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
37
|
-
|
|
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
|
-
|
|
41
|
+
data: Array<[string, Array<Principal>]>;
|
|
42
42
|
}
|
|
43
43
|
export interface _SERVICE {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
38
|
-
|
|
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
|
-
|
|
10
|
+
const agent = options.agent || new HttpAgent({ ...options.agentOptions });
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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,60 +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
4
|
export interface CreateSatelliteArgs {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
block_index: [] | [bigint];
|
|
6
|
+
user: Principal;
|
|
7
7
|
}
|
|
8
8
|
export interface DeleteControllersArgs {
|
|
9
|
-
|
|
9
|
+
controllers: Array<Principal>;
|
|
10
10
|
}
|
|
11
11
|
export interface GetCreateSatelliteFeeArgs {
|
|
12
|
-
|
|
12
|
+
user: Principal;
|
|
13
13
|
}
|
|
14
14
|
export interface LoadRelease {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
total: bigint;
|
|
16
|
+
chunks: bigint;
|
|
17
17
|
}
|
|
18
18
|
export interface MissionControl {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
updated_at: bigint;
|
|
20
|
+
credits: Tokens;
|
|
21
|
+
mission_control_id: [] | [Principal];
|
|
22
|
+
owner: Principal;
|
|
23
|
+
created_at: bigint;
|
|
24
24
|
}
|
|
25
25
|
export interface RateConfig {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
max_tokens: bigint;
|
|
27
|
+
time_per_token_ns: bigint;
|
|
28
28
|
}
|
|
29
29
|
export interface ReleasesVersion {
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
satellite: [] | [string];
|
|
31
|
+
mission_control: [] | [string];
|
|
32
32
|
}
|
|
33
|
-
export type Segment = {MissionControl: null} | {Satellite: null};
|
|
33
|
+
export type Segment = { MissionControl: null } | { Satellite: null };
|
|
34
34
|
export interface SetController {
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
metadata: Array<[string, string]>;
|
|
36
|
+
expires_at: [] | [bigint];
|
|
37
37
|
}
|
|
38
38
|
export interface SetControllersArgs {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
controller: SetController;
|
|
40
|
+
controllers: Array<Principal>;
|
|
41
41
|
}
|
|
42
42
|
export interface Tokens {
|
|
43
|
-
|
|
43
|
+
e8s: bigint;
|
|
44
44
|
}
|
|
45
45
|
export interface _SERVICE {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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>;
|
|
60
60
|
}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
export const idlFactory = ({IDL}) => {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
+
});
|
|
59
59
|
};
|
|
60
|
-
export const init = ({IDL}) => {
|
|
61
|
-
|
|
60
|
+
export const init = ({ IDL }) => {
|
|
61
|
+
return [];
|
|
62
62
|
};
|