@junobuild/analytics 0.0.10 → 0.0.12
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/workers/analytics.worker.js +16 -16
- package/dist/workers/analytics.worker.js.gz +0 -0
- package/dist/workers/analytics.worker.js.map +4 -4
- 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/index/index.d.ts +0 -45
- package/declarations/index/index.did +0 -68
- package/declarations/index/index.did.d.ts +0 -97
- package/declarations/index/index.factory.did.js +0 -94
- package/declarations/index/index.js +0 -37
- package/declarations/mission_control/index.d.ts +0 -45
- package/declarations/mission_control/index.js +0 -38
- package/declarations/mission_control/mission_control.did.d.ts +0 -101
- package/declarations/mission_control/mission_control.factory.did.js +0 -136
- 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/satellite/index.d.ts +0 -45
- package/declarations/satellite/index.js +0 -37
- package/declarations/satellite/satellite.did.d.ts +0 -201
- package/declarations/satellite/satellite.factory.did.js +0 -215
- package/declarations/satellite/satellite.factory.did.mjs +0 -215
- 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/index/index.d.ts +0 -45
- package/dist/declarations/index/index.did +0 -68
- package/dist/declarations/index/index.did.d.ts +0 -97
- package/dist/declarations/index/index.factory.did.js +0 -94
- package/dist/declarations/index/index.js +0 -37
- package/dist/declarations/mission_control/index.d.ts +0 -45
- package/dist/declarations/mission_control/index.js +0 -38
- package/dist/declarations/mission_control/mission_control.did.d.ts +0 -101
- package/dist/declarations/mission_control/mission_control.factory.did.js +0 -136
- 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/satellite/index.d.ts +0 -45
- package/dist/declarations/satellite/index.js +0 -37
- package/dist/declarations/satellite/satellite.did.d.ts +0 -201
- package/dist/declarations/satellite/satellite.factory.did.js +0 -215
- package/dist/declarations/satellite/satellite.factory.did.mjs +0 -215
|
@@ -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 './index.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 index: ActorSubclass<_SERVICE>;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
type GetAccountIdentifierTransactionsArgs = record {
|
|
2
|
-
max_results : nat64;
|
|
3
|
-
start : opt nat64;
|
|
4
|
-
account_identifier : text;
|
|
5
|
-
};
|
|
6
|
-
type GetAccountIdentifierTransactionsError = record { message : text };
|
|
7
|
-
type GetAccountIdentifierTransactionsResponse = record {
|
|
8
|
-
balance : nat64;
|
|
9
|
-
transactions : vec TransactionWithId;
|
|
10
|
-
oldest_tx_id : opt nat64;
|
|
11
|
-
};
|
|
12
|
-
type GetBlocksRequest = record { start : nat; length : nat };
|
|
13
|
-
type GetBlocksResponse = record { blocks : vec vec nat8; chain_length : nat64 };
|
|
14
|
-
type HttpRequest = record {
|
|
15
|
-
url : text;
|
|
16
|
-
method : text;
|
|
17
|
-
body : vec nat8;
|
|
18
|
-
headers : vec record { text; text };
|
|
19
|
-
};
|
|
20
|
-
type HttpResponse = record {
|
|
21
|
-
body : vec nat8;
|
|
22
|
-
headers : vec record { text; text };
|
|
23
|
-
status_code : nat16;
|
|
24
|
-
};
|
|
25
|
-
type InitArg = record { ledger_id : principal };
|
|
26
|
-
type Operation = variant {
|
|
27
|
-
Approve : record {
|
|
28
|
-
fee : Tokens;
|
|
29
|
-
from : text;
|
|
30
|
-
allowance : Tokens;
|
|
31
|
-
expires_at : opt TimeStamp;
|
|
32
|
-
spender : text;
|
|
33
|
-
};
|
|
34
|
-
Burn : record { from : text; amount : Tokens };
|
|
35
|
-
Mint : record { to : text; amount : Tokens };
|
|
36
|
-
Transfer : record { to : text; fee : Tokens; from : text; amount : Tokens };
|
|
37
|
-
TransferFrom : record {
|
|
38
|
-
to : text;
|
|
39
|
-
fee : Tokens;
|
|
40
|
-
from : text;
|
|
41
|
-
amount : Tokens;
|
|
42
|
-
spender : text;
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
type Result = variant {
|
|
46
|
-
Ok : GetAccountIdentifierTransactionsResponse;
|
|
47
|
-
Err : GetAccountIdentifierTransactionsError;
|
|
48
|
-
};
|
|
49
|
-
type Status = record { num_blocks_synced : nat64 };
|
|
50
|
-
type TimeStamp = record { timestamp_nanos : nat64 };
|
|
51
|
-
type Tokens = record { e8s : nat64 };
|
|
52
|
-
type Transaction = record {
|
|
53
|
-
memo : nat64;
|
|
54
|
-
icrc1_memo : opt vec nat8;
|
|
55
|
-
operation : Operation;
|
|
56
|
-
created_at_time : opt TimeStamp;
|
|
57
|
-
};
|
|
58
|
-
type TransactionWithId = record { id : nat64; transaction : Transaction };
|
|
59
|
-
service : (InitArg) -> {
|
|
60
|
-
get_account_identifier_balance : (text) -> (nat64) query;
|
|
61
|
-
get_account_identifier_transactions : (
|
|
62
|
-
GetAccountIdentifierTransactionsArgs,
|
|
63
|
-
) -> (Result) query;
|
|
64
|
-
get_blocks : (GetBlocksRequest) -> (GetBlocksResponse) query;
|
|
65
|
-
http_request : (HttpRequest) -> (HttpResponse) query;
|
|
66
|
-
ledger_id : () -> (principal) query;
|
|
67
|
-
status : () -> (Status) query;
|
|
68
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type {ActorMethod} from '@dfinity/agent';
|
|
2
|
-
import type {Principal} from '@dfinity/principal';
|
|
3
|
-
|
|
4
|
-
export interface GetAccountIdentifierTransactionsArgs {
|
|
5
|
-
max_results: bigint;
|
|
6
|
-
start: [] | [bigint];
|
|
7
|
-
account_identifier: string;
|
|
8
|
-
}
|
|
9
|
-
export interface GetAccountIdentifierTransactionsError {
|
|
10
|
-
message: string;
|
|
11
|
-
}
|
|
12
|
-
export interface GetAccountIdentifierTransactionsResponse {
|
|
13
|
-
balance: bigint;
|
|
14
|
-
transactions: Array<TransactionWithId>;
|
|
15
|
-
oldest_tx_id: [] | [bigint];
|
|
16
|
-
}
|
|
17
|
-
export interface GetBlocksRequest {
|
|
18
|
-
start: bigint;
|
|
19
|
-
length: bigint;
|
|
20
|
-
}
|
|
21
|
-
export interface GetBlocksResponse {
|
|
22
|
-
blocks: Array<Uint8Array | number[]>;
|
|
23
|
-
chain_length: bigint;
|
|
24
|
-
}
|
|
25
|
-
export interface HttpRequest {
|
|
26
|
-
url: string;
|
|
27
|
-
method: string;
|
|
28
|
-
body: Uint8Array | number[];
|
|
29
|
-
headers: Array<[string, string]>;
|
|
30
|
-
}
|
|
31
|
-
export interface HttpResponse {
|
|
32
|
-
body: Uint8Array | number[];
|
|
33
|
-
headers: Array<[string, string]>;
|
|
34
|
-
status_code: number;
|
|
35
|
-
}
|
|
36
|
-
export interface InitArg {
|
|
37
|
-
ledger_id: Principal;
|
|
38
|
-
}
|
|
39
|
-
export type Operation =
|
|
40
|
-
| {
|
|
41
|
-
Approve: {
|
|
42
|
-
fee: Tokens;
|
|
43
|
-
from: string;
|
|
44
|
-
allowance: Tokens;
|
|
45
|
-
expires_at: [] | [TimeStamp];
|
|
46
|
-
spender: string;
|
|
47
|
-
};
|
|
48
|
-
}
|
|
49
|
-
| {Burn: {from: string; amount: Tokens}}
|
|
50
|
-
| {Mint: {to: string; amount: Tokens}}
|
|
51
|
-
| {
|
|
52
|
-
Transfer: {
|
|
53
|
-
to: string;
|
|
54
|
-
fee: Tokens;
|
|
55
|
-
from: string;
|
|
56
|
-
amount: Tokens;
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
| {
|
|
60
|
-
TransferFrom: {
|
|
61
|
-
to: string;
|
|
62
|
-
fee: Tokens;
|
|
63
|
-
from: string;
|
|
64
|
-
amount: Tokens;
|
|
65
|
-
spender: string;
|
|
66
|
-
};
|
|
67
|
-
};
|
|
68
|
-
export type Result =
|
|
69
|
-
| {Ok: GetAccountIdentifierTransactionsResponse}
|
|
70
|
-
| {Err: GetAccountIdentifierTransactionsError};
|
|
71
|
-
export interface Status {
|
|
72
|
-
num_blocks_synced: bigint;
|
|
73
|
-
}
|
|
74
|
-
export interface TimeStamp {
|
|
75
|
-
timestamp_nanos: bigint;
|
|
76
|
-
}
|
|
77
|
-
export interface Tokens {
|
|
78
|
-
e8s: bigint;
|
|
79
|
-
}
|
|
80
|
-
export interface Transaction {
|
|
81
|
-
memo: bigint;
|
|
82
|
-
icrc1_memo: [] | [Uint8Array | number[]];
|
|
83
|
-
operation: Operation;
|
|
84
|
-
created_at_time: [] | [TimeStamp];
|
|
85
|
-
}
|
|
86
|
-
export interface TransactionWithId {
|
|
87
|
-
id: bigint;
|
|
88
|
-
transaction: Transaction;
|
|
89
|
-
}
|
|
90
|
-
export interface _SERVICE {
|
|
91
|
-
get_account_identifier_balance: ActorMethod<[string], bigint>;
|
|
92
|
-
get_account_identifier_transactions: ActorMethod<[GetAccountIdentifierTransactionsArgs], Result>;
|
|
93
|
-
get_blocks: ActorMethod<[GetBlocksRequest], GetBlocksResponse>;
|
|
94
|
-
http_request: ActorMethod<[HttpRequest], HttpResponse>;
|
|
95
|
-
ledger_id: ActorMethod<[], Principal>;
|
|
96
|
-
status: ActorMethod<[], Status>;
|
|
97
|
-
}
|