@junobuild/core 0.0.31 → 0.0.33
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/README.md +1 -1
- package/{dist/declarations/mission_control/mission_control.did.d.ts → declarations/deprecated/mission_control-0-0-4.did.d.ts} +2 -23
- package/declarations/{mission_control/mission_control.factory.did.js → deprecated/mission_control-0-0-4.factory.did.js} +2 -39
- package/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
- package/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
- package/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
- package/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
- package/declarations/satellite/satellite.did.d.ts +6 -0
- package/declarations/satellite/satellite.factory.did.js +6 -0
- package/declarations/satellite/satellite.factory.did.mjs +6 -0
- package/dist/browser/canisterStatus-S2QRROEO.js +2 -0
- package/dist/browser/chunk-IRYD4AKF.js +28 -0
- package/dist/browser/{chunk-PPPG6IG5.js.map → chunk-IRYD4AKF.js.map} +2 -2
- package/dist/browser/index.js +14 -14
- package/dist/browser/index.js.map +3 -3
- package/{declarations/mission_control/mission_control.did.d.ts → dist/declarations/deprecated/mission_control-0-0-4.did.d.ts} +2 -23
- package/dist/declarations/{mission_control/mission_control.factory.did.js → deprecated/mission_control-0-0-4.factory.did.js} +2 -39
- package/dist/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
- package/dist/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
- package/dist/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
- package/dist/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
- package/dist/declarations/satellite/satellite.did.d.ts +6 -0
- package/dist/declarations/satellite/satellite.factory.did.js +6 -0
- package/dist/declarations/satellite/satellite.factory.did.mjs +6 -0
- package/dist/node/index.mjs +23 -23
- package/dist/node/index.mjs.map +3 -3
- package/dist/workers/auth.worker.js +6 -6
- package/dist/workers/auth.worker.js.gz +0 -0
- package/dist/workers/auth.worker.js.map +2 -2
- package/package.json +3 -3
- package/declarations/cmc/cmc.did +0 -122
- package/declarations/cmc/cmc.did.d.ts +0 -48
- package/declarations/cmc/cmc.factory.did.js +0 -67
- package/declarations/cmc/index.d.ts +0 -45
- package/declarations/cmc/index.js +0 -37
- package/declarations/console/console.did.d.ts +0 -71
- package/declarations/console/console.factory.did.js +0 -79
- package/declarations/console/console.factory.did.mjs +0 -79
- package/declarations/console/index.d.ts +0 -45
- package/declarations/console/index.js +0 -37
- package/declarations/ic/ic.did +0 -195
- package/declarations/ic/ic.did.d.ts +0 -208
- package/declarations/ic/ic.factory.did.js +0 -274
- package/declarations/mission_control/index.d.ts +0 -45
- package/declarations/mission_control/index.js +0 -38
- package/declarations/observatory/index.d.ts +0 -45
- package/declarations/observatory/index.js +0 -38
- package/declarations/observatory/observatory.did.d.ts +0 -86
- package/declarations/observatory/observatory.factory.did.js +0 -95
- package/declarations/observatory/observatory.factory.did.mjs +0 -95
- package/declarations/orbiter/index.d.ts +0 -45
- package/declarations/orbiter/index.js +0 -37
- package/declarations/orbiter/orbiter.did.d.ts +0 -108
- package/declarations/orbiter/orbiter.factory.did.js +0 -137
- package/dist/browser/canisterStatus-B3CYYH7Z.js +0 -2
- package/dist/browser/chunk-PPPG6IG5.js +0 -28
- package/dist/declarations/cmc/cmc.did +0 -122
- package/dist/declarations/cmc/cmc.did.d.ts +0 -48
- package/dist/declarations/cmc/cmc.factory.did.js +0 -67
- package/dist/declarations/cmc/index.d.ts +0 -45
- package/dist/declarations/cmc/index.js +0 -37
- package/dist/declarations/console/console.did.d.ts +0 -71
- package/dist/declarations/console/console.factory.did.js +0 -79
- package/dist/declarations/console/console.factory.did.mjs +0 -79
- package/dist/declarations/console/index.d.ts +0 -45
- package/dist/declarations/console/index.js +0 -37
- package/dist/declarations/ic/ic.did +0 -195
- package/dist/declarations/ic/ic.did.d.ts +0 -208
- package/dist/declarations/ic/ic.factory.did.js +0 -274
- package/dist/declarations/mission_control/index.d.ts +0 -45
- package/dist/declarations/mission_control/index.js +0 -38
- package/dist/declarations/observatory/index.d.ts +0 -45
- package/dist/declarations/observatory/index.js +0 -38
- package/dist/declarations/observatory/observatory.did.d.ts +0 -86
- package/dist/declarations/observatory/observatory.factory.did.js +0 -95
- package/dist/declarations/observatory/observatory.factory.did.mjs +0 -95
- package/dist/declarations/orbiter/index.d.ts +0 -45
- package/dist/declarations/orbiter/index.js +0 -37
- package/dist/declarations/orbiter/orbiter.did.d.ts +0 -108
- package/dist/declarations/orbiter/orbiter.factory.did.js +0 -137
- /package/dist/browser/{canisterStatus-B3CYYH7Z.js.map → canisterStatus-S2QRROEO.js.map} +0 -0
|
@@ -1,195 +0,0 @@
|
|
|
1
|
-
type canister_id = principal;
|
|
2
|
-
type wasm_module = blob;
|
|
3
|
-
|
|
4
|
-
type canister_settings = record {
|
|
5
|
-
controllers : opt vec principal;
|
|
6
|
-
compute_allocation : opt nat;
|
|
7
|
-
memory_allocation : opt nat;
|
|
8
|
-
freezing_threshold : opt nat;
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
type definite_canister_settings = record {
|
|
12
|
-
controllers : vec principal;
|
|
13
|
-
compute_allocation : nat;
|
|
14
|
-
memory_allocation : nat;
|
|
15
|
-
freezing_threshold : nat;
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
type change_origin = variant {
|
|
19
|
-
from_user : record {
|
|
20
|
-
user_id : principal;
|
|
21
|
-
};
|
|
22
|
-
from_canister : record {
|
|
23
|
-
canister_id : principal;
|
|
24
|
-
canister_version : opt nat64;
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
type change_details = variant {
|
|
29
|
-
creation : record {
|
|
30
|
-
controllers : vec principal;
|
|
31
|
-
};
|
|
32
|
-
code_uninstall;
|
|
33
|
-
code_deployment : record {
|
|
34
|
-
mode : variant {install; reinstall; upgrade};
|
|
35
|
-
module_hash : blob;
|
|
36
|
-
};
|
|
37
|
-
controllers_change : record {
|
|
38
|
-
controllers : vec principal;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
|
|
42
|
-
type change = record {
|
|
43
|
-
timestamp_nanos : nat64;
|
|
44
|
-
canister_version : nat64;
|
|
45
|
-
origin : change_origin;
|
|
46
|
-
details : change_details;
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
type http_header = record { name: text; value: text };
|
|
50
|
-
|
|
51
|
-
type http_response = record {
|
|
52
|
-
status: nat;
|
|
53
|
-
headers: vec http_header;
|
|
54
|
-
body: blob;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
type ecdsa_curve = variant { secp256k1; };
|
|
58
|
-
|
|
59
|
-
type satoshi = nat64;
|
|
60
|
-
|
|
61
|
-
type bitcoin_network = variant {
|
|
62
|
-
mainnet;
|
|
63
|
-
testnet;
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
type bitcoin_address = text;
|
|
67
|
-
|
|
68
|
-
type block_hash = blob;
|
|
69
|
-
|
|
70
|
-
type outpoint = record {
|
|
71
|
-
txid : blob;
|
|
72
|
-
vout : nat32
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
type utxo = record {
|
|
76
|
-
outpoint: outpoint;
|
|
77
|
-
value: satoshi;
|
|
78
|
-
height: nat32;
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
type get_utxos_request = record {
|
|
82
|
-
address : bitcoin_address;
|
|
83
|
-
network: bitcoin_network;
|
|
84
|
-
filter: opt variant {
|
|
85
|
-
min_confirmations: nat32;
|
|
86
|
-
page: blob;
|
|
87
|
-
};
|
|
88
|
-
};
|
|
89
|
-
|
|
90
|
-
type get_current_fee_percentiles_request = record {
|
|
91
|
-
network: bitcoin_network;
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
type get_utxos_response = record {
|
|
95
|
-
utxos: vec utxo;
|
|
96
|
-
tip_block_hash: block_hash;
|
|
97
|
-
tip_height: nat32;
|
|
98
|
-
next_page: opt blob;
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type get_balance_request = record {
|
|
102
|
-
address : bitcoin_address;
|
|
103
|
-
network: bitcoin_network;
|
|
104
|
-
min_confirmations: opt nat32;
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
type send_transaction_request = record {
|
|
108
|
-
transaction: blob;
|
|
109
|
-
network: bitcoin_network;
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
type millisatoshi_per_byte = nat64;
|
|
113
|
-
|
|
114
|
-
service ic : {
|
|
115
|
-
create_canister : (record {
|
|
116
|
-
settings : opt canister_settings;
|
|
117
|
-
sender_canister_version : opt nat64;
|
|
118
|
-
}) -> (record {canister_id : canister_id});
|
|
119
|
-
update_settings : (record {
|
|
120
|
-
canister_id : principal;
|
|
121
|
-
settings : canister_settings;
|
|
122
|
-
sender_canister_version : opt nat64;
|
|
123
|
-
}) -> ();
|
|
124
|
-
install_code : (record {
|
|
125
|
-
mode : variant {install; reinstall; upgrade};
|
|
126
|
-
canister_id : canister_id;
|
|
127
|
-
wasm_module : wasm_module;
|
|
128
|
-
arg : blob;
|
|
129
|
-
sender_canister_version : opt nat64;
|
|
130
|
-
}) -> ();
|
|
131
|
-
uninstall_code : (record {
|
|
132
|
-
canister_id : canister_id;
|
|
133
|
-
sender_canister_version : opt nat64;
|
|
134
|
-
}) -> ();
|
|
135
|
-
start_canister : (record {canister_id : canister_id}) -> ();
|
|
136
|
-
stop_canister : (record {canister_id : canister_id}) -> ();
|
|
137
|
-
canister_status : (record {canister_id : canister_id}) -> (record {
|
|
138
|
-
status : variant { running; stopping; stopped };
|
|
139
|
-
settings: definite_canister_settings;
|
|
140
|
-
module_hash: opt blob;
|
|
141
|
-
memory_size: nat;
|
|
142
|
-
cycles: nat;
|
|
143
|
-
idle_cycles_burned_per_day: nat;
|
|
144
|
-
});
|
|
145
|
-
canister_info : (record {
|
|
146
|
-
canister_id : canister_id;
|
|
147
|
-
num_requested_changes : opt nat64;
|
|
148
|
-
}) -> (record {
|
|
149
|
-
total_num_changes : nat64;
|
|
150
|
-
recent_changes : vec change;
|
|
151
|
-
module_hash : opt blob;
|
|
152
|
-
controllers : vec principal;
|
|
153
|
-
});
|
|
154
|
-
delete_canister : (record {canister_id : canister_id}) -> ();
|
|
155
|
-
deposit_cycles : (record {canister_id : canister_id}) -> ();
|
|
156
|
-
raw_rand : () -> (blob);
|
|
157
|
-
http_request : (record {
|
|
158
|
-
url : text;
|
|
159
|
-
max_response_bytes: opt nat64;
|
|
160
|
-
method : variant { get; head; post };
|
|
161
|
-
headers: vec http_header;
|
|
162
|
-
body : opt blob;
|
|
163
|
-
transform : opt record {
|
|
164
|
-
function : func (record {response : http_response; context : blob}) -> (http_response) query;
|
|
165
|
-
context : blob
|
|
166
|
-
};
|
|
167
|
-
}) -> (http_response);
|
|
168
|
-
|
|
169
|
-
// Threshold ECDSA signature
|
|
170
|
-
ecdsa_public_key : (record {
|
|
171
|
-
canister_id : opt canister_id;
|
|
172
|
-
derivation_path : vec blob;
|
|
173
|
-
key_id : record { curve: ecdsa_curve; name: text };
|
|
174
|
-
}) -> (record { public_key : blob; chain_code : blob; });
|
|
175
|
-
sign_with_ecdsa : (record {
|
|
176
|
-
message_hash : blob;
|
|
177
|
-
derivation_path : vec blob;
|
|
178
|
-
key_id : record { curve: ecdsa_curve; name: text };
|
|
179
|
-
}) -> (record { signature : blob });
|
|
180
|
-
|
|
181
|
-
// bitcoin interface
|
|
182
|
-
bitcoin_get_balance: (get_balance_request) -> (satoshi);
|
|
183
|
-
bitcoin_get_utxos: (get_utxos_request) -> (get_utxos_response);
|
|
184
|
-
bitcoin_send_transaction: (send_transaction_request) -> ();
|
|
185
|
-
bitcoin_get_current_fee_percentiles: (get_current_fee_percentiles_request) -> (vec millisatoshi_per_byte);
|
|
186
|
-
|
|
187
|
-
// provisional interfaces for the pre-ledger world
|
|
188
|
-
provisional_create_canister_with_cycles : (record {
|
|
189
|
-
amount: opt nat;
|
|
190
|
-
settings : opt canister_settings;
|
|
191
|
-
specified_id: opt canister_id;
|
|
192
|
-
}) -> (record {canister_id : canister_id});
|
|
193
|
-
provisional_top_up_canister :
|
|
194
|
-
(record { canister_id: canister_id; amount: nat }) -> ();
|
|
195
|
-
}
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {Principal} from '@dfinity/principal';
|
|
3
|
-
|
|
4
|
-
export type bitcoin_address = string;
|
|
5
|
-
export type bitcoin_network = {mainnet: null} | {testnet: null};
|
|
6
|
-
export type block_hash = Uint8Array;
|
|
7
|
-
export type canister_id = Principal;
|
|
8
|
-
export interface canister_settings {
|
|
9
|
-
freezing_threshold: [] | [bigint];
|
|
10
|
-
controllers: [] | [Array<Principal>];
|
|
11
|
-
memory_allocation: [] | [bigint];
|
|
12
|
-
compute_allocation: [] | [bigint];
|
|
13
|
-
}
|
|
14
|
-
export interface change {
|
|
15
|
-
timestamp_nanos: bigint;
|
|
16
|
-
canister_version: bigint;
|
|
17
|
-
origin: change_origin;
|
|
18
|
-
details: change_details;
|
|
19
|
-
}
|
|
20
|
-
export type change_details =
|
|
21
|
-
| {
|
|
22
|
-
creation: {controllers: Array<Principal>};
|
|
23
|
-
}
|
|
24
|
-
| {
|
|
25
|
-
code_deployment: {
|
|
26
|
-
mode: {reinstall: null} | {upgrade: null} | {install: null};
|
|
27
|
-
module_hash: Uint8Array;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
| {controllers_change: {controllers: Array<Principal>}}
|
|
31
|
-
| {code_uninstall: null};
|
|
32
|
-
export type change_origin =
|
|
33
|
-
| {from_user: {user_id: Principal}}
|
|
34
|
-
| {
|
|
35
|
-
from_canister: {
|
|
36
|
-
canister_version: [] | [bigint];
|
|
37
|
-
canister_id: Principal;
|
|
38
|
-
};
|
|
39
|
-
};
|
|
40
|
-
export interface definite_canister_settings {
|
|
41
|
-
freezing_threshold: bigint;
|
|
42
|
-
controllers: Array<Principal>;
|
|
43
|
-
memory_allocation: bigint;
|
|
44
|
-
compute_allocation: bigint;
|
|
45
|
-
}
|
|
46
|
-
export type ecdsa_curve = {secp256k1: null};
|
|
47
|
-
export interface get_balance_request {
|
|
48
|
-
network: bitcoin_network;
|
|
49
|
-
address: bitcoin_address;
|
|
50
|
-
min_confirmations: [] | [number];
|
|
51
|
-
}
|
|
52
|
-
export interface get_current_fee_percentiles_request {
|
|
53
|
-
network: bitcoin_network;
|
|
54
|
-
}
|
|
55
|
-
export interface get_utxos_request {
|
|
56
|
-
network: bitcoin_network;
|
|
57
|
-
filter: [] | [{page: Uint8Array} | {min_confirmations: number}];
|
|
58
|
-
address: bitcoin_address;
|
|
59
|
-
}
|
|
60
|
-
export interface get_utxos_response {
|
|
61
|
-
next_page: [] | [Uint8Array];
|
|
62
|
-
tip_height: number;
|
|
63
|
-
tip_block_hash: block_hash;
|
|
64
|
-
utxos: Array<utxo>;
|
|
65
|
-
}
|
|
66
|
-
export interface http_header {
|
|
67
|
-
value: string;
|
|
68
|
-
name: string;
|
|
69
|
-
}
|
|
70
|
-
export interface http_response {
|
|
71
|
-
status: bigint;
|
|
72
|
-
body: Uint8Array;
|
|
73
|
-
headers: Array<http_header>;
|
|
74
|
-
}
|
|
75
|
-
export type millisatoshi_per_byte = bigint;
|
|
76
|
-
export interface outpoint {
|
|
77
|
-
txid: Uint8Array;
|
|
78
|
-
vout: number;
|
|
79
|
-
}
|
|
80
|
-
export type satoshi = bigint;
|
|
81
|
-
export interface send_transaction_request {
|
|
82
|
-
transaction: Uint8Array;
|
|
83
|
-
network: bitcoin_network;
|
|
84
|
-
}
|
|
85
|
-
export interface utxo {
|
|
86
|
-
height: number;
|
|
87
|
-
value: satoshi;
|
|
88
|
-
outpoint: outpoint;
|
|
89
|
-
}
|
|
90
|
-
export type wasm_module = Uint8Array;
|
|
91
|
-
export interface _SERVICE {
|
|
92
|
-
bitcoin_get_balance: ActorMethod<[get_balance_request], satoshi>;
|
|
93
|
-
bitcoin_get_current_fee_percentiles: ActorMethod<
|
|
94
|
-
[get_current_fee_percentiles_request],
|
|
95
|
-
BigUint64Array
|
|
96
|
-
>;
|
|
97
|
-
bitcoin_get_utxos: ActorMethod<[get_utxos_request], get_utxos_response>;
|
|
98
|
-
bitcoin_send_transaction: ActorMethod<[send_transaction_request], undefined>;
|
|
99
|
-
canister_info: ActorMethod<
|
|
100
|
-
[{canister_id: canister_id; num_requested_changes: [] | [bigint]}],
|
|
101
|
-
{
|
|
102
|
-
controllers: Array<Principal>;
|
|
103
|
-
module_hash: [] | [Uint8Array];
|
|
104
|
-
recent_changes: Array<change>;
|
|
105
|
-
total_num_changes: bigint;
|
|
106
|
-
}
|
|
107
|
-
>;
|
|
108
|
-
canister_status: ActorMethod<
|
|
109
|
-
[{canister_id: canister_id}],
|
|
110
|
-
{
|
|
111
|
-
status: {stopped: null} | {stopping: null} | {running: null};
|
|
112
|
-
memory_size: bigint;
|
|
113
|
-
cycles: bigint;
|
|
114
|
-
settings: definite_canister_settings;
|
|
115
|
-
idle_cycles_burned_per_day: bigint;
|
|
116
|
-
module_hash: [] | [Uint8Array];
|
|
117
|
-
}
|
|
118
|
-
>;
|
|
119
|
-
create_canister: ActorMethod<
|
|
120
|
-
[
|
|
121
|
-
{
|
|
122
|
-
settings: [] | [canister_settings];
|
|
123
|
-
sender_canister_version: [] | [bigint];
|
|
124
|
-
}
|
|
125
|
-
],
|
|
126
|
-
{canister_id: canister_id}
|
|
127
|
-
>;
|
|
128
|
-
delete_canister: ActorMethod<[{canister_id: canister_id}], undefined>;
|
|
129
|
-
deposit_cycles: ActorMethod<[{canister_id: canister_id}], undefined>;
|
|
130
|
-
ecdsa_public_key: ActorMethod<
|
|
131
|
-
[
|
|
132
|
-
{
|
|
133
|
-
key_id: {name: string; curve: ecdsa_curve};
|
|
134
|
-
canister_id: [] | [canister_id];
|
|
135
|
-
derivation_path: Array<Uint8Array>;
|
|
136
|
-
}
|
|
137
|
-
],
|
|
138
|
-
{public_key: Uint8Array; chain_code: Uint8Array}
|
|
139
|
-
>;
|
|
140
|
-
http_request: ActorMethod<
|
|
141
|
-
[
|
|
142
|
-
{
|
|
143
|
-
url: string;
|
|
144
|
-
method: {get: null} | {head: null} | {post: null};
|
|
145
|
-
max_response_bytes: [] | [bigint];
|
|
146
|
-
body: [] | [Uint8Array];
|
|
147
|
-
transform: [] | [{function: [Principal, string]; context: Uint8Array}];
|
|
148
|
-
headers: Array<http_header>;
|
|
149
|
-
}
|
|
150
|
-
],
|
|
151
|
-
http_response
|
|
152
|
-
>;
|
|
153
|
-
install_code: ActorMethod<
|
|
154
|
-
[
|
|
155
|
-
{
|
|
156
|
-
arg: Uint8Array;
|
|
157
|
-
wasm_module: wasm_module;
|
|
158
|
-
mode: {reinstall: null} | {upgrade: null} | {install: null};
|
|
159
|
-
canister_id: canister_id;
|
|
160
|
-
sender_canister_version: [] | [bigint];
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
undefined
|
|
164
|
-
>;
|
|
165
|
-
provisional_create_canister_with_cycles: ActorMethod<
|
|
166
|
-
[
|
|
167
|
-
{
|
|
168
|
-
settings: [] | [canister_settings];
|
|
169
|
-
specified_id: [] | [canister_id];
|
|
170
|
-
amount: [] | [bigint];
|
|
171
|
-
}
|
|
172
|
-
],
|
|
173
|
-
{canister_id: canister_id}
|
|
174
|
-
>;
|
|
175
|
-
provisional_top_up_canister: ActorMethod<[{canister_id: canister_id; amount: bigint}], undefined>;
|
|
176
|
-
raw_rand: ActorMethod<[], Uint8Array>;
|
|
177
|
-
sign_with_ecdsa: ActorMethod<
|
|
178
|
-
[
|
|
179
|
-
{
|
|
180
|
-
key_id: {name: string; curve: ecdsa_curve};
|
|
181
|
-
derivation_path: Array<Uint8Array>;
|
|
182
|
-
message_hash: Uint8Array;
|
|
183
|
-
}
|
|
184
|
-
],
|
|
185
|
-
{signature: Uint8Array}
|
|
186
|
-
>;
|
|
187
|
-
start_canister: ActorMethod<[{canister_id: canister_id}], undefined>;
|
|
188
|
-
stop_canister: ActorMethod<[{canister_id: canister_id}], undefined>;
|
|
189
|
-
uninstall_code: ActorMethod<
|
|
190
|
-
[
|
|
191
|
-
{
|
|
192
|
-
canister_id: canister_id;
|
|
193
|
-
sender_canister_version: [] | [bigint];
|
|
194
|
-
}
|
|
195
|
-
],
|
|
196
|
-
undefined
|
|
197
|
-
>;
|
|
198
|
-
update_settings: ActorMethod<
|
|
199
|
-
[
|
|
200
|
-
{
|
|
201
|
-
canister_id: Principal;
|
|
202
|
-
settings: canister_settings;
|
|
203
|
-
sender_canister_version: [] | [bigint];
|
|
204
|
-
}
|
|
205
|
-
],
|
|
206
|
-
undefined
|
|
207
|
-
>;
|
|
208
|
-
}
|
|
@@ -1,274 +0,0 @@
|
|
|
1
|
-
// @ts-ignore
|
|
2
|
-
export const idlFactory = ({IDL}) => {
|
|
3
|
-
const bitcoin_network = IDL.Variant({
|
|
4
|
-
mainnet: IDL.Null,
|
|
5
|
-
testnet: IDL.Null
|
|
6
|
-
});
|
|
7
|
-
const bitcoin_address = IDL.Text;
|
|
8
|
-
const get_balance_request = IDL.Record({
|
|
9
|
-
network: bitcoin_network,
|
|
10
|
-
address: bitcoin_address,
|
|
11
|
-
min_confirmations: IDL.Opt(IDL.Nat32)
|
|
12
|
-
});
|
|
13
|
-
const satoshi = IDL.Nat64;
|
|
14
|
-
const get_current_fee_percentiles_request = IDL.Record({
|
|
15
|
-
network: bitcoin_network
|
|
16
|
-
});
|
|
17
|
-
const millisatoshi_per_byte = IDL.Nat64;
|
|
18
|
-
const get_utxos_request = IDL.Record({
|
|
19
|
-
network: bitcoin_network,
|
|
20
|
-
filter: IDL.Opt(
|
|
21
|
-
IDL.Variant({
|
|
22
|
-
page: IDL.Vec(IDL.Nat8),
|
|
23
|
-
min_confirmations: IDL.Nat32
|
|
24
|
-
})
|
|
25
|
-
),
|
|
26
|
-
address: bitcoin_address
|
|
27
|
-
});
|
|
28
|
-
const block_hash = IDL.Vec(IDL.Nat8);
|
|
29
|
-
const outpoint = IDL.Record({
|
|
30
|
-
txid: IDL.Vec(IDL.Nat8),
|
|
31
|
-
vout: IDL.Nat32
|
|
32
|
-
});
|
|
33
|
-
const utxo = IDL.Record({
|
|
34
|
-
height: IDL.Nat32,
|
|
35
|
-
value: satoshi,
|
|
36
|
-
outpoint: outpoint
|
|
37
|
-
});
|
|
38
|
-
const get_utxos_response = IDL.Record({
|
|
39
|
-
next_page: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
40
|
-
tip_height: IDL.Nat32,
|
|
41
|
-
tip_block_hash: block_hash,
|
|
42
|
-
utxos: IDL.Vec(utxo)
|
|
43
|
-
});
|
|
44
|
-
const send_transaction_request = IDL.Record({
|
|
45
|
-
transaction: IDL.Vec(IDL.Nat8),
|
|
46
|
-
network: bitcoin_network
|
|
47
|
-
});
|
|
48
|
-
const canister_id = IDL.Principal;
|
|
49
|
-
const change_origin = IDL.Variant({
|
|
50
|
-
from_user: IDL.Record({user_id: IDL.Principal}),
|
|
51
|
-
from_canister: IDL.Record({
|
|
52
|
-
canister_version: IDL.Opt(IDL.Nat64),
|
|
53
|
-
canister_id: IDL.Principal
|
|
54
|
-
})
|
|
55
|
-
});
|
|
56
|
-
const change_details = IDL.Variant({
|
|
57
|
-
creation: IDL.Record({controllers: IDL.Vec(IDL.Principal)}),
|
|
58
|
-
code_deployment: IDL.Record({
|
|
59
|
-
mode: IDL.Variant({
|
|
60
|
-
reinstall: IDL.Null,
|
|
61
|
-
upgrade: IDL.Null,
|
|
62
|
-
install: IDL.Null
|
|
63
|
-
}),
|
|
64
|
-
module_hash: IDL.Vec(IDL.Nat8)
|
|
65
|
-
}),
|
|
66
|
-
controllers_change: IDL.Record({
|
|
67
|
-
controllers: IDL.Vec(IDL.Principal)
|
|
68
|
-
}),
|
|
69
|
-
code_uninstall: IDL.Null
|
|
70
|
-
});
|
|
71
|
-
const change = IDL.Record({
|
|
72
|
-
timestamp_nanos: IDL.Nat64,
|
|
73
|
-
canister_version: IDL.Nat64,
|
|
74
|
-
origin: change_origin,
|
|
75
|
-
details: change_details
|
|
76
|
-
});
|
|
77
|
-
const definite_canister_settings = IDL.Record({
|
|
78
|
-
freezing_threshold: IDL.Nat,
|
|
79
|
-
controllers: IDL.Vec(IDL.Principal),
|
|
80
|
-
memory_allocation: IDL.Nat,
|
|
81
|
-
compute_allocation: IDL.Nat
|
|
82
|
-
});
|
|
83
|
-
const canister_settings = IDL.Record({
|
|
84
|
-
freezing_threshold: IDL.Opt(IDL.Nat),
|
|
85
|
-
controllers: IDL.Opt(IDL.Vec(IDL.Principal)),
|
|
86
|
-
memory_allocation: IDL.Opt(IDL.Nat),
|
|
87
|
-
compute_allocation: IDL.Opt(IDL.Nat)
|
|
88
|
-
});
|
|
89
|
-
const ecdsa_curve = IDL.Variant({secp256k1: IDL.Null});
|
|
90
|
-
const http_header = IDL.Record({value: IDL.Text, name: IDL.Text});
|
|
91
|
-
const http_response = IDL.Record({
|
|
92
|
-
status: IDL.Nat,
|
|
93
|
-
body: IDL.Vec(IDL.Nat8),
|
|
94
|
-
headers: IDL.Vec(http_header)
|
|
95
|
-
});
|
|
96
|
-
const wasm_module = IDL.Vec(IDL.Nat8);
|
|
97
|
-
return IDL.Service({
|
|
98
|
-
bitcoin_get_balance: IDL.Func([get_balance_request], [satoshi], []),
|
|
99
|
-
bitcoin_get_current_fee_percentiles: IDL.Func(
|
|
100
|
-
[get_current_fee_percentiles_request],
|
|
101
|
-
[IDL.Vec(millisatoshi_per_byte)],
|
|
102
|
-
[]
|
|
103
|
-
),
|
|
104
|
-
bitcoin_get_utxos: IDL.Func([get_utxos_request], [get_utxos_response], []),
|
|
105
|
-
bitcoin_send_transaction: IDL.Func([send_transaction_request], [], []),
|
|
106
|
-
canister_info: IDL.Func(
|
|
107
|
-
[
|
|
108
|
-
IDL.Record({
|
|
109
|
-
canister_id: canister_id,
|
|
110
|
-
num_requested_changes: IDL.Opt(IDL.Nat64)
|
|
111
|
-
})
|
|
112
|
-
],
|
|
113
|
-
[
|
|
114
|
-
IDL.Record({
|
|
115
|
-
controllers: IDL.Vec(IDL.Principal),
|
|
116
|
-
module_hash: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
117
|
-
recent_changes: IDL.Vec(change),
|
|
118
|
-
total_num_changes: IDL.Nat64
|
|
119
|
-
})
|
|
120
|
-
],
|
|
121
|
-
[]
|
|
122
|
-
),
|
|
123
|
-
canister_status: IDL.Func(
|
|
124
|
-
[IDL.Record({canister_id: canister_id})],
|
|
125
|
-
[
|
|
126
|
-
IDL.Record({
|
|
127
|
-
status: IDL.Variant({
|
|
128
|
-
stopped: IDL.Null,
|
|
129
|
-
stopping: IDL.Null,
|
|
130
|
-
running: IDL.Null
|
|
131
|
-
}),
|
|
132
|
-
memory_size: IDL.Nat,
|
|
133
|
-
cycles: IDL.Nat,
|
|
134
|
-
settings: definite_canister_settings,
|
|
135
|
-
idle_cycles_burned_per_day: IDL.Nat,
|
|
136
|
-
module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
|
|
137
|
-
})
|
|
138
|
-
],
|
|
139
|
-
[]
|
|
140
|
-
),
|
|
141
|
-
create_canister: IDL.Func(
|
|
142
|
-
[
|
|
143
|
-
IDL.Record({
|
|
144
|
-
settings: IDL.Opt(canister_settings),
|
|
145
|
-
sender_canister_version: IDL.Opt(IDL.Nat64)
|
|
146
|
-
})
|
|
147
|
-
],
|
|
148
|
-
[IDL.Record({canister_id: canister_id})],
|
|
149
|
-
[]
|
|
150
|
-
),
|
|
151
|
-
delete_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
|
|
152
|
-
deposit_cycles: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
|
|
153
|
-
ecdsa_public_key: IDL.Func(
|
|
154
|
-
[
|
|
155
|
-
IDL.Record({
|
|
156
|
-
key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
|
|
157
|
-
canister_id: IDL.Opt(canister_id),
|
|
158
|
-
derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8))
|
|
159
|
-
})
|
|
160
|
-
],
|
|
161
|
-
[
|
|
162
|
-
IDL.Record({
|
|
163
|
-
public_key: IDL.Vec(IDL.Nat8),
|
|
164
|
-
chain_code: IDL.Vec(IDL.Nat8)
|
|
165
|
-
})
|
|
166
|
-
],
|
|
167
|
-
[]
|
|
168
|
-
),
|
|
169
|
-
http_request: IDL.Func(
|
|
170
|
-
[
|
|
171
|
-
IDL.Record({
|
|
172
|
-
url: IDL.Text,
|
|
173
|
-
method: IDL.Variant({
|
|
174
|
-
get: IDL.Null,
|
|
175
|
-
head: IDL.Null,
|
|
176
|
-
post: IDL.Null
|
|
177
|
-
}),
|
|
178
|
-
max_response_bytes: IDL.Opt(IDL.Nat64),
|
|
179
|
-
body: IDL.Opt(IDL.Vec(IDL.Nat8)),
|
|
180
|
-
transform: IDL.Opt(
|
|
181
|
-
IDL.Record({
|
|
182
|
-
function: IDL.Func(
|
|
183
|
-
[
|
|
184
|
-
IDL.Record({
|
|
185
|
-
context: IDL.Vec(IDL.Nat8),
|
|
186
|
-
response: http_response
|
|
187
|
-
})
|
|
188
|
-
],
|
|
189
|
-
[http_response],
|
|
190
|
-
['query']
|
|
191
|
-
),
|
|
192
|
-
context: IDL.Vec(IDL.Nat8)
|
|
193
|
-
})
|
|
194
|
-
),
|
|
195
|
-
headers: IDL.Vec(http_header)
|
|
196
|
-
})
|
|
197
|
-
],
|
|
198
|
-
[http_response],
|
|
199
|
-
[]
|
|
200
|
-
),
|
|
201
|
-
install_code: IDL.Func(
|
|
202
|
-
[
|
|
203
|
-
IDL.Record({
|
|
204
|
-
arg: IDL.Vec(IDL.Nat8),
|
|
205
|
-
wasm_module: wasm_module,
|
|
206
|
-
mode: IDL.Variant({
|
|
207
|
-
reinstall: IDL.Null,
|
|
208
|
-
upgrade: IDL.Null,
|
|
209
|
-
install: IDL.Null
|
|
210
|
-
}),
|
|
211
|
-
canister_id: canister_id,
|
|
212
|
-
sender_canister_version: IDL.Opt(IDL.Nat64)
|
|
213
|
-
})
|
|
214
|
-
],
|
|
215
|
-
[],
|
|
216
|
-
[]
|
|
217
|
-
),
|
|
218
|
-
provisional_create_canister_with_cycles: IDL.Func(
|
|
219
|
-
[
|
|
220
|
-
IDL.Record({
|
|
221
|
-
settings: IDL.Opt(canister_settings),
|
|
222
|
-
specified_id: IDL.Opt(canister_id),
|
|
223
|
-
amount: IDL.Opt(IDL.Nat)
|
|
224
|
-
})
|
|
225
|
-
],
|
|
226
|
-
[IDL.Record({canister_id: canister_id})],
|
|
227
|
-
[]
|
|
228
|
-
),
|
|
229
|
-
provisional_top_up_canister: IDL.Func(
|
|
230
|
-
[IDL.Record({canister_id: canister_id, amount: IDL.Nat})],
|
|
231
|
-
[],
|
|
232
|
-
[]
|
|
233
|
-
),
|
|
234
|
-
raw_rand: IDL.Func([], [IDL.Vec(IDL.Nat8)], []),
|
|
235
|
-
sign_with_ecdsa: IDL.Func(
|
|
236
|
-
[
|
|
237
|
-
IDL.Record({
|
|
238
|
-
key_id: IDL.Record({name: IDL.Text, curve: ecdsa_curve}),
|
|
239
|
-
derivation_path: IDL.Vec(IDL.Vec(IDL.Nat8)),
|
|
240
|
-
message_hash: IDL.Vec(IDL.Nat8)
|
|
241
|
-
})
|
|
242
|
-
],
|
|
243
|
-
[IDL.Record({signature: IDL.Vec(IDL.Nat8)})],
|
|
244
|
-
[]
|
|
245
|
-
),
|
|
246
|
-
start_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
|
|
247
|
-
stop_canister: IDL.Func([IDL.Record({canister_id: canister_id})], [], []),
|
|
248
|
-
uninstall_code: IDL.Func(
|
|
249
|
-
[
|
|
250
|
-
IDL.Record({
|
|
251
|
-
canister_id: canister_id,
|
|
252
|
-
sender_canister_version: IDL.Opt(IDL.Nat64)
|
|
253
|
-
})
|
|
254
|
-
],
|
|
255
|
-
[],
|
|
256
|
-
[]
|
|
257
|
-
),
|
|
258
|
-
update_settings: IDL.Func(
|
|
259
|
-
[
|
|
260
|
-
IDL.Record({
|
|
261
|
-
canister_id: IDL.Principal,
|
|
262
|
-
settings: canister_settings,
|
|
263
|
-
sender_canister_version: IDL.Opt(IDL.Nat64)
|
|
264
|
-
})
|
|
265
|
-
],
|
|
266
|
-
[],
|
|
267
|
-
[]
|
|
268
|
-
)
|
|
269
|
-
});
|
|
270
|
-
};
|
|
271
|
-
// @ts-ignore
|
|
272
|
-
export const init = ({IDL}) => {
|
|
273
|
-
return [];
|
|
274
|
-
};
|
|
@@ -1,45 +0,0 @@
|
|
|
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
|
-
|
|
5
|
-
import {_SERVICE} from './mission_control.did';
|
|
6
|
-
|
|
7
|
-
export declare const idlFactory: IDL.InterfaceFactory;
|
|
8
|
-
export declare const canisterId: string;
|
|
9
|
-
|
|
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;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
|
|
27
|
-
* @constructs {@link ActorSubClass}
|
|
28
|
-
* @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
|
|
29
|
-
* @param {CreateActorOptions} options - see {@link CreateActorOptions}
|
|
30
|
-
* @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
|
|
31
|
-
* @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
|
|
32
|
-
* @see {@link HttpAgentOptions}
|
|
33
|
-
* @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
|
|
34
|
-
* @see {@link ActorConfig}
|
|
35
|
-
*/
|
|
36
|
-
export declare const createActor: (
|
|
37
|
-
canisterId: string | Principal,
|
|
38
|
-
options?: CreateActorOptions
|
|
39
|
-
) => ActorSubclass<_SERVICE>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Intialized Actor using default settings, ready to talk to a canister using its candid interface
|
|
43
|
-
* @constructs {@link ActorSubClass}
|
|
44
|
-
*/
|
|
45
|
-
export declare const mission_control: ActorSubclass<_SERVICE>;
|