@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,77 +1,77 @@
|
|
|
1
|
-
import type {Principal} from '@dfinity/principal';
|
|
1
|
+
import type { Principal } from '@dfinity/principal';
|
|
2
2
|
export type canister_id = Principal;
|
|
3
3
|
export interface canister_settings {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
freezing_threshold: [] | [bigint];
|
|
5
|
+
controllers: [] | [Array<Principal>];
|
|
6
|
+
memory_allocation: [] | [bigint];
|
|
7
|
+
compute_allocation: [] | [bigint];
|
|
8
8
|
}
|
|
9
9
|
export interface definite_canister_settings {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
10
|
+
freezing_threshold: bigint;
|
|
11
|
+
controllers: Array<Principal>;
|
|
12
|
+
memory_allocation: bigint;
|
|
13
|
+
compute_allocation: bigint;
|
|
14
14
|
}
|
|
15
15
|
export interface http_header {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
value: string;
|
|
17
|
+
name: string;
|
|
18
18
|
}
|
|
19
19
|
export type http_request_error =
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
20
|
+
| { dns_error: null }
|
|
21
|
+
| { no_consensus: null }
|
|
22
|
+
| { transform_error: null }
|
|
23
|
+
| { unreachable: null }
|
|
24
|
+
| { bad_tls: null }
|
|
25
|
+
| { conn_timeout: null }
|
|
26
|
+
| { invalid_url: null }
|
|
27
|
+
| { timeout: null };
|
|
28
28
|
export interface http_response {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
status: bigint;
|
|
30
|
+
body: Array<number>;
|
|
31
|
+
headers: Array<http_header>;
|
|
32
32
|
}
|
|
33
33
|
export type user_id = Principal;
|
|
34
34
|
export type wasm_module = Array<number>;
|
|
35
35
|
export interface _SERVICE {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
36
|
+
canister_status: (arg_0: { canister_id: canister_id }) => Promise<{
|
|
37
|
+
status: { stopped: null } | { stopping: null } | { running: null };
|
|
38
|
+
memory_size: bigint;
|
|
39
|
+
cycles: bigint;
|
|
40
|
+
settings: definite_canister_settings;
|
|
41
|
+
module_hash: [] | [Array<number>];
|
|
42
|
+
}>;
|
|
43
|
+
create_canister: (arg_0: {
|
|
44
|
+
settings: [] | [canister_settings];
|
|
45
|
+
}) => Promise<{ canister_id: canister_id }>;
|
|
46
|
+
delete_canister: (arg_0: { canister_id: canister_id }) => Promise<undefined>;
|
|
47
|
+
deposit_cycles: (arg_0: { canister_id: canister_id }) => Promise<undefined>;
|
|
48
|
+
http_request: (arg_0: {
|
|
49
|
+
url: string;
|
|
50
|
+
method: { get: null };
|
|
51
|
+
body: [] | [Array<number>];
|
|
52
|
+
transform: [] | [{ function: [Principal, string] }];
|
|
53
|
+
headers: Array<http_header>;
|
|
54
|
+
}) => Promise<{ Ok: http_response } | { Err: [] | [http_request_error] }>;
|
|
55
|
+
install_code: (arg_0: {
|
|
56
|
+
arg: Array<number>;
|
|
57
|
+
wasm_module: wasm_module;
|
|
58
|
+
mode: { reinstall: null } | { upgrade: null } | { install: null };
|
|
59
|
+
canister_id: canister_id;
|
|
60
|
+
}) => Promise<undefined>;
|
|
61
|
+
provisional_create_canister_with_cycles: (arg_0: {
|
|
62
|
+
settings: [] | [canister_settings];
|
|
63
|
+
amount: [] | [bigint];
|
|
64
|
+
}) => Promise<{ canister_id: canister_id }>;
|
|
65
|
+
provisional_top_up_canister: (arg_0: {
|
|
66
|
+
canister_id: canister_id;
|
|
67
|
+
amount: bigint;
|
|
68
|
+
}) => Promise<undefined>;
|
|
69
|
+
raw_rand: () => Promise<Array<number>>;
|
|
70
|
+
start_canister: (arg_0: { canister_id: canister_id }) => Promise<undefined>;
|
|
71
|
+
stop_canister: (arg_0: { canister_id: canister_id }) => Promise<undefined>;
|
|
72
|
+
uninstall_code: (arg_0: { canister_id: canister_id }) => Promise<undefined>;
|
|
73
|
+
update_settings: (arg_0: {
|
|
74
|
+
canister_id: Principal;
|
|
75
|
+
settings: canister_settings;
|
|
76
|
+
}) => Promise<undefined>;
|
|
77
77
|
}
|
|
@@ -1,128 +1,128 @@
|
|
|
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
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
1
|
+
export const idlFactory = ({ IDL }) => {
|
|
2
|
+
const canister_id = IDL.Principal;
|
|
3
|
+
const definite_canister_settings = IDL.Record({
|
|
4
|
+
freezing_threshold: IDL.Nat,
|
|
5
|
+
controllers: IDL.Vec(IDL.Principal),
|
|
6
|
+
memory_allocation: IDL.Nat,
|
|
7
|
+
compute_allocation: IDL.Nat
|
|
8
|
+
});
|
|
9
|
+
const canister_settings = IDL.Record({
|
|
10
|
+
freezing_threshold: IDL.Opt(IDL.Nat),
|
|
11
|
+
controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
12
|
+
memory_allocation: IDL.Opt(IDL.Nat),
|
|
13
|
+
compute_allocation: IDL.Opt(IDL.Nat)
|
|
14
|
+
});
|
|
15
|
+
const http_header = IDL.Record({ value: IDL.Text, name: IDL.Text });
|
|
16
|
+
const http_response = IDL.Record({
|
|
17
|
+
status: IDL.Nat,
|
|
18
|
+
body: IDL.Vec(IDL.Nat8),
|
|
19
|
+
headers: IDL.Vec(http_header)
|
|
20
|
+
});
|
|
21
|
+
const http_request_error = IDL.Variant({
|
|
22
|
+
dns_error: IDL.Null,
|
|
23
|
+
no_consensus: IDL.Null,
|
|
24
|
+
transform_error: IDL.Null,
|
|
25
|
+
unreachable: IDL.Null,
|
|
26
|
+
bad_tls: IDL.Null,
|
|
27
|
+
conn_timeout: IDL.Null,
|
|
28
|
+
invalid_url: IDL.Null,
|
|
29
|
+
timeout: IDL.Null
|
|
30
|
+
});
|
|
31
|
+
const wasm_module = IDL.Vec(IDL.Nat8);
|
|
32
|
+
return IDL.Service({
|
|
33
|
+
canister_status: IDL.Func(
|
|
34
|
+
[IDL.Record({ canister_id: canister_id })],
|
|
35
|
+
[
|
|
36
|
+
IDL.Record({
|
|
37
|
+
status: IDL.Variant({
|
|
38
|
+
stopped: IDL.Null,
|
|
39
|
+
stopping: IDL.Null,
|
|
40
|
+
running: IDL.Null
|
|
41
|
+
}),
|
|
42
|
+
memory_size: IDL.Nat,
|
|
43
|
+
cycles: IDL.Nat,
|
|
44
|
+
settings: definite_canister_settings,
|
|
45
|
+
module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
|
|
46
|
+
})
|
|
47
|
+
],
|
|
48
|
+
[]
|
|
49
|
+
),
|
|
50
|
+
create_canister: IDL.Func(
|
|
51
|
+
[IDL.Record({ settings: IDL.Opt(canister_settings) })],
|
|
52
|
+
[IDL.Record({ canister_id: canister_id })],
|
|
53
|
+
[]
|
|
54
|
+
),
|
|
55
|
+
delete_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []),
|
|
56
|
+
deposit_cycles: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []),
|
|
57
|
+
http_request: IDL.Func(
|
|
58
|
+
[
|
|
59
|
+
IDL.Record({
|
|
60
|
+
url: IDL.Text,
|
|
61
|
+
method: IDL.Variant({ get: IDL.Null }),
|
|
62
|
+
body: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
63
|
+
transform: IDL.Opt(
|
|
64
|
+
IDL.Variant({
|
|
65
|
+
function: IDL.Func([http_response], [http_response], ['query'])
|
|
66
|
+
})
|
|
67
|
+
),
|
|
68
|
+
headers: IDL.Vec(http_header)
|
|
69
|
+
})
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
IDL.Variant({
|
|
73
|
+
Ok: http_response,
|
|
74
|
+
Err: IDL.Opt(http_request_error)
|
|
75
|
+
})
|
|
76
|
+
],
|
|
77
|
+
[]
|
|
78
|
+
),
|
|
79
|
+
install_code: IDL.Func(
|
|
80
|
+
[
|
|
81
|
+
IDL.Record({
|
|
82
|
+
arg: IDL.Vec(IDL.Nat8),
|
|
83
|
+
wasm_module: wasm_module,
|
|
84
|
+
mode: IDL.Variant({
|
|
85
|
+
reinstall: IDL.Null,
|
|
86
|
+
upgrade: IDL.Null,
|
|
87
|
+
install: IDL.Null
|
|
88
|
+
}),
|
|
89
|
+
canister_id: canister_id
|
|
90
|
+
})
|
|
91
|
+
],
|
|
92
|
+
[],
|
|
93
|
+
[]
|
|
94
|
+
),
|
|
95
|
+
provisional_create_canister_with_cycles: IDL.Func(
|
|
96
|
+
[
|
|
97
|
+
IDL.Record({
|
|
98
|
+
settings: IDL.Opt(canister_settings),
|
|
99
|
+
amount: IDL.Opt(IDL.Nat)
|
|
100
|
+
})
|
|
101
|
+
],
|
|
102
|
+
[IDL.Record({ canister_id: canister_id })],
|
|
103
|
+
[]
|
|
104
|
+
),
|
|
105
|
+
provisional_top_up_canister: IDL.Func(
|
|
106
|
+
[IDL.Record({ canister_id: canister_id, amount: IDL.Nat })],
|
|
107
|
+
[],
|
|
108
|
+
[]
|
|
109
|
+
),
|
|
110
|
+
raw_rand: IDL.Func([], [IDL.Vec(IDL.Nat8)], []),
|
|
111
|
+
start_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []),
|
|
112
|
+
stop_canister: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []),
|
|
113
|
+
uninstall_code: IDL.Func([IDL.Record({ canister_id: canister_id })], [], []),
|
|
114
|
+
update_settings: IDL.Func(
|
|
115
|
+
[
|
|
116
|
+
IDL.Record({
|
|
117
|
+
canister_id: IDL.Principal,
|
|
118
|
+
settings: canister_settings
|
|
119
|
+
})
|
|
120
|
+
],
|
|
121
|
+
[],
|
|
122
|
+
[]
|
|
123
|
+
)
|
|
124
|
+
});
|
|
125
125
|
};
|
|
126
|
-
export const init = ({IDL}) => {
|
|
127
|
-
|
|
126
|
+
export const init = ({ IDL }) => {
|
|
127
|
+
return [];
|
|
128
128
|
};
|
|
@@ -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 './internet_identity.did';
|
|
5
|
+
import { _SERVICE } from './internet_identity.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 './internet_identity.did.js';
|
|
5
|
-
export {idlFactory} from './internet_identity.did.js';
|
|
4
|
+
import { idlFactory } from './internet_identity.did.js';
|
|
5
|
+
export { idlFactory } from './internet_identity.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
|
};
|