@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.
Files changed (69) hide show
  1. package/README.md +1 -1
  2. package/dist/workers/analytics.worker.js +16 -16
  3. package/dist/workers/analytics.worker.js.gz +0 -0
  4. package/dist/workers/analytics.worker.js.map +4 -4
  5. package/package.json +3 -3
  6. package/declarations/cmc/cmc.did +0 -122
  7. package/declarations/cmc/cmc.did.d.ts +0 -48
  8. package/declarations/cmc/cmc.factory.did.js +0 -67
  9. package/declarations/cmc/index.d.ts +0 -45
  10. package/declarations/cmc/index.js +0 -37
  11. package/declarations/console/console.did.d.ts +0 -71
  12. package/declarations/console/console.factory.did.js +0 -79
  13. package/declarations/console/console.factory.did.mjs +0 -79
  14. package/declarations/console/index.d.ts +0 -45
  15. package/declarations/console/index.js +0 -37
  16. package/declarations/ic/ic.did +0 -195
  17. package/declarations/ic/ic.did.d.ts +0 -208
  18. package/declarations/ic/ic.factory.did.js +0 -274
  19. package/declarations/index/index.d.ts +0 -45
  20. package/declarations/index/index.did +0 -68
  21. package/declarations/index/index.did.d.ts +0 -97
  22. package/declarations/index/index.factory.did.js +0 -94
  23. package/declarations/index/index.js +0 -37
  24. package/declarations/mission_control/index.d.ts +0 -45
  25. package/declarations/mission_control/index.js +0 -38
  26. package/declarations/mission_control/mission_control.did.d.ts +0 -101
  27. package/declarations/mission_control/mission_control.factory.did.js +0 -136
  28. package/declarations/observatory/index.d.ts +0 -45
  29. package/declarations/observatory/index.js +0 -38
  30. package/declarations/observatory/observatory.did.d.ts +0 -86
  31. package/declarations/observatory/observatory.factory.did.js +0 -95
  32. package/declarations/observatory/observatory.factory.did.mjs +0 -95
  33. package/declarations/satellite/index.d.ts +0 -45
  34. package/declarations/satellite/index.js +0 -37
  35. package/declarations/satellite/satellite.did.d.ts +0 -201
  36. package/declarations/satellite/satellite.factory.did.js +0 -215
  37. package/declarations/satellite/satellite.factory.did.mjs +0 -215
  38. package/dist/declarations/cmc/cmc.did +0 -122
  39. package/dist/declarations/cmc/cmc.did.d.ts +0 -48
  40. package/dist/declarations/cmc/cmc.factory.did.js +0 -67
  41. package/dist/declarations/cmc/index.d.ts +0 -45
  42. package/dist/declarations/cmc/index.js +0 -37
  43. package/dist/declarations/console/console.did.d.ts +0 -71
  44. package/dist/declarations/console/console.factory.did.js +0 -79
  45. package/dist/declarations/console/console.factory.did.mjs +0 -79
  46. package/dist/declarations/console/index.d.ts +0 -45
  47. package/dist/declarations/console/index.js +0 -37
  48. package/dist/declarations/ic/ic.did +0 -195
  49. package/dist/declarations/ic/ic.did.d.ts +0 -208
  50. package/dist/declarations/ic/ic.factory.did.js +0 -274
  51. package/dist/declarations/index/index.d.ts +0 -45
  52. package/dist/declarations/index/index.did +0 -68
  53. package/dist/declarations/index/index.did.d.ts +0 -97
  54. package/dist/declarations/index/index.factory.did.js +0 -94
  55. package/dist/declarations/index/index.js +0 -37
  56. package/dist/declarations/mission_control/index.d.ts +0 -45
  57. package/dist/declarations/mission_control/index.js +0 -38
  58. package/dist/declarations/mission_control/mission_control.did.d.ts +0 -101
  59. package/dist/declarations/mission_control/mission_control.factory.did.js +0 -136
  60. package/dist/declarations/observatory/index.d.ts +0 -45
  61. package/dist/declarations/observatory/index.js +0 -38
  62. package/dist/declarations/observatory/observatory.did.d.ts +0 -86
  63. package/dist/declarations/observatory/observatory.factory.did.js +0 -95
  64. package/dist/declarations/observatory/observatory.factory.did.mjs +0 -95
  65. package/dist/declarations/satellite/index.d.ts +0 -45
  66. package/dist/declarations/satellite/index.js +0 -37
  67. package/dist/declarations/satellite/satellite.did.d.ts +0 -201
  68. package/dist/declarations/satellite/satellite.factory.did.js +0 -215
  69. package/dist/declarations/satellite/satellite.factory.did.mjs +0 -215
@@ -1,215 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const CommitBatch = IDL.Record({
4
- batch_id: IDL.Nat,
5
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
- chunk_ids: IDL.Vec(IDL.Nat)
7
- });
8
- const DeleteControllersArgs = IDL.Record({
9
- controllers: IDL.Vec(IDL.Principal)
10
- });
11
- const ControllerScope = IDL.Variant({
12
- Write: IDL.Null,
13
- Admin: IDL.Null
14
- });
15
- const Controller = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
18
- created_at: IDL.Nat64,
19
- scope: ControllerScope,
20
- expires_at: IDL.Opt(IDL.Nat64)
21
- });
22
- const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
23
- const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
24
- const StorageConfig = IDL.Record({
25
- rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
26
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
27
- });
28
- const Config = IDL.Record({storage: StorageConfig});
29
- const Doc = IDL.Record({
30
- updated_at: IDL.Nat64,
31
- owner: IDL.Principal,
32
- data: IDL.Vec(IDL.Nat8),
33
- description: IDL.Opt(IDL.Text),
34
- created_at: IDL.Nat64
35
- });
36
- const HttpRequest = IDL.Record({
37
- url: IDL.Text,
38
- method: IDL.Text,
39
- body: IDL.Vec(IDL.Nat8),
40
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
41
- });
42
- const StreamingCallbackToken = IDL.Record({
43
- token: IDL.Opt(IDL.Text),
44
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
45
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
- index: IDL.Nat64,
47
- encoding_type: IDL.Text,
48
- full_path: IDL.Text
49
- });
50
- const StreamingStrategy = IDL.Variant({
51
- Callback: IDL.Record({
52
- token: StreamingCallbackToken,
53
- callback: IDL.Func([], [], ['query'])
54
- })
55
- });
56
- const HttpResponse = IDL.Record({
57
- body: IDL.Vec(IDL.Nat8),
58
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
59
- streaming_strategy: IDL.Opt(StreamingStrategy),
60
- status_code: IDL.Nat16
61
- });
62
- const StreamingCallbackHttpResponse = IDL.Record({
63
- token: IDL.Opt(StreamingCallbackToken),
64
- body: IDL.Vec(IDL.Nat8)
65
- });
66
- const InitAssetKey = IDL.Record({
67
- token: IDL.Opt(IDL.Text),
68
- collection: IDL.Text,
69
- name: IDL.Text,
70
- description: IDL.Opt(IDL.Text),
71
- encoding_type: IDL.Opt(IDL.Text),
72
- full_path: IDL.Text
73
- });
74
- const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
75
- const ListOrderField = IDL.Variant({
76
- UpdatedAt: IDL.Null,
77
- Keys: IDL.Null,
78
- CreatedAt: IDL.Null
79
- });
80
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
81
- const ListMatcher = IDL.Record({
82
- key: IDL.Opt(IDL.Text),
83
- description: IDL.Opt(IDL.Text)
84
- });
85
- const ListPaginate = IDL.Record({
86
- start_after: IDL.Opt(IDL.Text),
87
- limit: IDL.Opt(IDL.Nat64)
88
- });
89
- const ListParams = IDL.Record({
90
- order: IDL.Opt(ListOrder),
91
- owner: IDL.Opt(IDL.Principal),
92
- matcher: IDL.Opt(ListMatcher),
93
- paginate: IDL.Opt(ListPaginate)
94
- });
95
- const AssetKey = IDL.Record({
96
- token: IDL.Opt(IDL.Text),
97
- collection: IDL.Text,
98
- owner: IDL.Principal,
99
- name: IDL.Text,
100
- description: IDL.Opt(IDL.Text),
101
- full_path: IDL.Text
102
- });
103
- const AssetEncodingNoContent = IDL.Record({
104
- modified: IDL.Nat64,
105
- sha256: IDL.Vec(IDL.Nat8),
106
- total_length: IDL.Nat
107
- });
108
- const AssetNoContent = IDL.Record({
109
- key: AssetKey,
110
- updated_at: IDL.Nat64,
111
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
112
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
113
- created_at: IDL.Nat64
114
- });
115
- const ListResults = IDL.Record({
116
- matches_pages: IDL.Opt(IDL.Nat64),
117
- matches_length: IDL.Nat64,
118
- items_page: IDL.Opt(IDL.Nat64),
119
- items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
120
- items_length: IDL.Nat64
121
- });
122
- const CustomDomain = IDL.Record({
123
- updated_at: IDL.Nat64,
124
- created_at: IDL.Nat64,
125
- bn_id: IDL.Opt(IDL.Text)
126
- });
127
- const ListResults_1 = IDL.Record({
128
- matches_pages: IDL.Opt(IDL.Nat64),
129
- matches_length: IDL.Nat64,
130
- items_page: IDL.Opt(IDL.Nat64),
131
- items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
132
- items_length: IDL.Nat64
133
- });
134
- const Permission = IDL.Variant({
135
- Controllers: IDL.Null,
136
- Private: IDL.Null,
137
- Public: IDL.Null,
138
- Managed: IDL.Null
139
- });
140
- const Rule = IDL.Record({
141
- updated_at: IDL.Nat64,
142
- max_size: IDL.Opt(IDL.Nat),
143
- read: Permission,
144
- created_at: IDL.Nat64,
145
- write: Permission
146
- });
147
- const SetController = IDL.Record({
148
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
149
- scope: ControllerScope,
150
- expires_at: IDL.Opt(IDL.Nat64)
151
- });
152
- const SetControllersArgs = IDL.Record({
153
- controller: SetController,
154
- controllers: IDL.Vec(IDL.Principal)
155
- });
156
- const SetDoc = IDL.Record({
157
- updated_at: IDL.Opt(IDL.Nat64),
158
- data: IDL.Vec(IDL.Nat8),
159
- description: IDL.Opt(IDL.Text)
160
- });
161
- const SetRule = IDL.Record({
162
- updated_at: IDL.Opt(IDL.Nat64),
163
- max_size: IDL.Opt(IDL.Nat),
164
- read: Permission,
165
- write: Permission
166
- });
167
- const UploadChunk = IDL.Record({
168
- content: IDL.Vec(IDL.Nat8),
169
- batch_id: IDL.Nat,
170
- order_id: IDL.Opt(IDL.Nat)
171
- });
172
- const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
173
- return IDL.Service({
174
- commit_asset_upload: IDL.Func([CommitBatch], [], []),
175
- del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
176
- del_assets: IDL.Func([IDL.Text], [], []),
177
- del_controllers: IDL.Func(
178
- [DeleteControllersArgs],
179
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
- []
181
- ),
182
- del_custom_domain: IDL.Func([IDL.Text], [], []),
183
- del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
184
- del_rule: IDL.Func([RulesType, IDL.Text, DelDoc], [], []),
185
- get_config: IDL.Func([], [Config], []),
186
- get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
187
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
188
- http_request_streaming_callback: IDL.Func(
189
- [StreamingCallbackToken],
190
- [StreamingCallbackHttpResponse],
191
- ['query']
192
- ),
193
- init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
194
- list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
195
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
196
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
197
- list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
198
- list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
199
- set_config: IDL.Func([Config], [], []),
200
- set_controllers: IDL.Func(
201
- [SetControllersArgs],
202
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
203
- []
204
- ),
205
- set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
206
- set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
207
- set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
208
- upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
209
- version: IDL.Func([], [IDL.Text], ['query'])
210
- });
211
- };
212
- // @ts-ignore
213
- export const init = ({IDL}) => {
214
- return [];
215
- };
@@ -1,215 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const CommitBatch = IDL.Record({
4
- batch_id: IDL.Nat,
5
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
- chunk_ids: IDL.Vec(IDL.Nat)
7
- });
8
- const DeleteControllersArgs = IDL.Record({
9
- controllers: IDL.Vec(IDL.Principal)
10
- });
11
- const ControllerScope = IDL.Variant({
12
- Write: IDL.Null,
13
- Admin: IDL.Null
14
- });
15
- const Controller = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
18
- created_at: IDL.Nat64,
19
- scope: ControllerScope,
20
- expires_at: IDL.Opt(IDL.Nat64)
21
- });
22
- const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
23
- const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
24
- const StorageConfig = IDL.Record({
25
- rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
26
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
27
- });
28
- const Config = IDL.Record({storage: StorageConfig});
29
- const Doc = IDL.Record({
30
- updated_at: IDL.Nat64,
31
- owner: IDL.Principal,
32
- data: IDL.Vec(IDL.Nat8),
33
- description: IDL.Opt(IDL.Text),
34
- created_at: IDL.Nat64
35
- });
36
- const HttpRequest = IDL.Record({
37
- url: IDL.Text,
38
- method: IDL.Text,
39
- body: IDL.Vec(IDL.Nat8),
40
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
41
- });
42
- const StreamingCallbackToken = IDL.Record({
43
- token: IDL.Opt(IDL.Text),
44
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
45
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
- index: IDL.Nat64,
47
- encoding_type: IDL.Text,
48
- full_path: IDL.Text
49
- });
50
- const StreamingStrategy = IDL.Variant({
51
- Callback: IDL.Record({
52
- token: StreamingCallbackToken,
53
- callback: IDL.Func([], [], ['query'])
54
- })
55
- });
56
- const HttpResponse = IDL.Record({
57
- body: IDL.Vec(IDL.Nat8),
58
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
59
- streaming_strategy: IDL.Opt(StreamingStrategy),
60
- status_code: IDL.Nat16
61
- });
62
- const StreamingCallbackHttpResponse = IDL.Record({
63
- token: IDL.Opt(StreamingCallbackToken),
64
- body: IDL.Vec(IDL.Nat8)
65
- });
66
- const InitAssetKey = IDL.Record({
67
- token: IDL.Opt(IDL.Text),
68
- collection: IDL.Text,
69
- name: IDL.Text,
70
- description: IDL.Opt(IDL.Text),
71
- encoding_type: IDL.Opt(IDL.Text),
72
- full_path: IDL.Text
73
- });
74
- const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
75
- const ListOrderField = IDL.Variant({
76
- UpdatedAt: IDL.Null,
77
- Keys: IDL.Null,
78
- CreatedAt: IDL.Null
79
- });
80
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
81
- const ListMatcher = IDL.Record({
82
- key: IDL.Opt(IDL.Text),
83
- description: IDL.Opt(IDL.Text)
84
- });
85
- const ListPaginate = IDL.Record({
86
- start_after: IDL.Opt(IDL.Text),
87
- limit: IDL.Opt(IDL.Nat64)
88
- });
89
- const ListParams = IDL.Record({
90
- order: IDL.Opt(ListOrder),
91
- owner: IDL.Opt(IDL.Principal),
92
- matcher: IDL.Opt(ListMatcher),
93
- paginate: IDL.Opt(ListPaginate)
94
- });
95
- const AssetKey = IDL.Record({
96
- token: IDL.Opt(IDL.Text),
97
- collection: IDL.Text,
98
- owner: IDL.Principal,
99
- name: IDL.Text,
100
- description: IDL.Opt(IDL.Text),
101
- full_path: IDL.Text
102
- });
103
- const AssetEncodingNoContent = IDL.Record({
104
- modified: IDL.Nat64,
105
- sha256: IDL.Vec(IDL.Nat8),
106
- total_length: IDL.Nat
107
- });
108
- const AssetNoContent = IDL.Record({
109
- key: AssetKey,
110
- updated_at: IDL.Nat64,
111
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
112
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
113
- created_at: IDL.Nat64
114
- });
115
- const ListResults = IDL.Record({
116
- matches_pages: IDL.Opt(IDL.Nat64),
117
- matches_length: IDL.Nat64,
118
- items_page: IDL.Opt(IDL.Nat64),
119
- items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
120
- items_length: IDL.Nat64
121
- });
122
- const CustomDomain = IDL.Record({
123
- updated_at: IDL.Nat64,
124
- created_at: IDL.Nat64,
125
- bn_id: IDL.Opt(IDL.Text)
126
- });
127
- const ListResults_1 = IDL.Record({
128
- matches_pages: IDL.Opt(IDL.Nat64),
129
- matches_length: IDL.Nat64,
130
- items_page: IDL.Opt(IDL.Nat64),
131
- items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
132
- items_length: IDL.Nat64
133
- });
134
- const Permission = IDL.Variant({
135
- Controllers: IDL.Null,
136
- Private: IDL.Null,
137
- Public: IDL.Null,
138
- Managed: IDL.Null
139
- });
140
- const Rule = IDL.Record({
141
- updated_at: IDL.Nat64,
142
- max_size: IDL.Opt(IDL.Nat),
143
- read: Permission,
144
- created_at: IDL.Nat64,
145
- write: Permission
146
- });
147
- const SetController = IDL.Record({
148
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
149
- scope: ControllerScope,
150
- expires_at: IDL.Opt(IDL.Nat64)
151
- });
152
- const SetControllersArgs = IDL.Record({
153
- controller: SetController,
154
- controllers: IDL.Vec(IDL.Principal)
155
- });
156
- const SetDoc = IDL.Record({
157
- updated_at: IDL.Opt(IDL.Nat64),
158
- data: IDL.Vec(IDL.Nat8),
159
- description: IDL.Opt(IDL.Text)
160
- });
161
- const SetRule = IDL.Record({
162
- updated_at: IDL.Opt(IDL.Nat64),
163
- max_size: IDL.Opt(IDL.Nat),
164
- read: Permission,
165
- write: Permission
166
- });
167
- const UploadChunk = IDL.Record({
168
- content: IDL.Vec(IDL.Nat8),
169
- batch_id: IDL.Nat,
170
- order_id: IDL.Opt(IDL.Nat)
171
- });
172
- const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
173
- return IDL.Service({
174
- commit_asset_upload: IDL.Func([CommitBatch], [], []),
175
- del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
176
- del_assets: IDL.Func([IDL.Text], [], []),
177
- del_controllers: IDL.Func(
178
- [DeleteControllersArgs],
179
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
- []
181
- ),
182
- del_custom_domain: IDL.Func([IDL.Text], [], []),
183
- del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
184
- del_rule: IDL.Func([RulesType, IDL.Text, DelDoc], [], []),
185
- get_config: IDL.Func([], [Config], []),
186
- get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
187
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
188
- http_request_streaming_callback: IDL.Func(
189
- [StreamingCallbackToken],
190
- [StreamingCallbackHttpResponse],
191
- ['query']
192
- ),
193
- init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
194
- list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
195
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
196
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
197
- list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
198
- list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
199
- set_config: IDL.Func([Config], [], []),
200
- set_controllers: IDL.Func(
201
- [SetControllersArgs],
202
- [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
203
- []
204
- ),
205
- set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
206
- set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
207
- set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
208
- upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
209
- version: IDL.Func([], [IDL.Text], ['query'])
210
- });
211
- };
212
- // @ts-ignore
213
- export const init = ({IDL}) => {
214
- return [];
215
- };
@@ -1,122 +0,0 @@
1
- type Cycles = nat;
2
- type BlockIndex = nat64;
3
-
4
- // The argument of the [notify_top_up] method.
5
- type NotifyTopUpArg = record {
6
- // Index of the block on the ICP ledger that contains the payment.
7
- block_index : BlockIndex;
8
-
9
- // The canister to top up.
10
- canister_id : principal;
11
- };
12
-
13
- // The argument of the [notify_create_canister] method.
14
- type NotifyCreateCanisterArg = record {
15
- // Index of the block on the ICP ledger that contains the payment.
16
- block_index : BlockIndex;
17
-
18
- // The controller of canister to create.
19
- controller : principal;
20
-
21
- // An optional subnet type that, if set, determines what type of subnet
22
- // the new canister will be created on.
23
- subnet_type: opt text;
24
- };
25
-
26
- type NotifyError = variant {
27
- // The payment processing failed and the payment was returned the caller.
28
- // This is a non-retriable error.
29
- Refunded : record {
30
- // The reason for the refund.
31
- reason : text;
32
- // The index of the block containing the refund.
33
- block_index : opt BlockIndex;
34
- };
35
-
36
- // The same payment is already being processed by a concurrent request.
37
- // This is a retriable error.
38
- Processing;
39
-
40
- // The payment was too old to be processed.
41
- // The value of the variant is the oldest block index that can still be processed.
42
- // This a non-retriable error.
43
- TransactionTooOld : BlockIndex;
44
-
45
- // The transaction does not satisfy the cycle minting canister payment protocol.
46
- // The text contains the description of the problem.
47
- // This is a non-retriable error.
48
- InvalidTransaction : text;
49
-
50
- // Other error.
51
- Other : record { error_code : nat64; error_message : text };
52
- };
53
-
54
- type NotifyTopUpResult = variant {
55
- // The amount of cycles sent to the specified canister.
56
- Ok : Cycles;
57
- Err : NotifyError;
58
- };
59
-
60
- type NotifyCreateCanisterResult = variant {
61
- // The principal of the newly created canister.
62
- Ok : principal;
63
- Err : NotifyError;
64
- };
65
-
66
- type IcpXdrConversionRate = record {
67
- // The time for which the market data was queried, expressed in UNIX epoch
68
- // time in seconds.
69
- timestamp_seconds : nat64;
70
-
71
- // The number of 10,000ths of IMF SDR (currency code XDR) that corresponds
72
- // to 1 ICP. This value reflects the current market price of one ICP token.
73
- xdr_permyriad_per_icp : nat64;
74
- };
75
-
76
-
77
- type IcpXdrConversionRateResponse = record {
78
- // The latest ICP/XDR conversion rate.
79
- data : IcpXdrConversionRate;
80
-
81
- // CBOR-serialized hash tree as specified in
82
- // https://smartcontracts.org/docs/interface-spec/index.html#certification-encoding.
83
- // The hash tree is used for certification and hash the following structure:
84
- // ```
85
- // *
86
- // |
87
- // +-- ICP_XDR_CONVERSION_RATE -- [ Candid encoded IcpXdrConversionRate ]
88
- // |
89
- // `-- AVERAGE_ICP_XDR_CONVERSION_RATE -- [ Candid encoded IcpXdrConversionRate ]
90
- // ```
91
- hash_tree : blob;
92
-
93
- // System certificate as specified in
94
- // https://smartcontracts.org/docs/interface-spec/index.html#certification-encoding
95
- certificate : blob;
96
- };
97
-
98
- type SubnetTypesToSubnetsResponse = record {
99
- data: vec record { text; vec principal };
100
- };
101
-
102
- type CyclesCanisterInitPayload = record {
103
- governance_canister_id : principal;
104
- minting_account_id : opt text;
105
- ledger_canister_id : principal;
106
- last_purged_notification: opt BlockIndex;
107
- };
108
-
109
- service: (CyclesCanisterInitPayload) -> {
110
- // Propmts the cycles minting canister to process a payment by converting ICP
111
- // into cycles and sending the cycles the specified canister.
112
- notify_top_up : (NotifyTopUpArg) -> (NotifyTopUpResult);
113
-
114
- // Prompts the cycles minting canister to process a payment for canister creation.
115
- notify_create_canister : (NotifyCreateCanisterArg) -> (NotifyCreateCanisterResult);
116
-
117
- // Returns the ICP/XDR conversion rate.
118
- get_icp_xdr_conversion_rate : () -> (IcpXdrConversionRateResponse) query;
119
-
120
- // Returns the current mapping of subnet types to subnets.
121
- get_subnet_types_to_subnets : () -> (SubnetTypesToSubnetsResponse) query;
122
- }
@@ -1,48 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export type BlockIndex = bigint;
5
- export type Cycles = bigint;
6
- export interface CyclesCanisterInitPayload {
7
- last_purged_notification: [] | [BlockIndex];
8
- governance_canister_id: Principal;
9
- minting_account_id: [] | [string];
10
- ledger_canister_id: Principal;
11
- }
12
- export interface IcpXdrConversionRate {
13
- xdr_permyriad_per_icp: bigint;
14
- timestamp_seconds: bigint;
15
- }
16
- export interface IcpXdrConversionRateResponse {
17
- certificate: Uint8Array | number[];
18
- data: IcpXdrConversionRate;
19
- hash_tree: Uint8Array | number[];
20
- }
21
- export interface NotifyCreateCanisterArg {
22
- controller: Principal;
23
- block_index: BlockIndex;
24
- subnet_type: [] | [string];
25
- }
26
- export type NotifyCreateCanisterResult = {Ok: Principal} | {Err: NotifyError};
27
- export type NotifyError =
28
- | {
29
- Refunded: {block_index: [] | [BlockIndex]; reason: string};
30
- }
31
- | {InvalidTransaction: string}
32
- | {Other: {error_message: string; error_code: bigint}}
33
- | {Processing: null}
34
- | {TransactionTooOld: BlockIndex};
35
- export interface NotifyTopUpArg {
36
- block_index: BlockIndex;
37
- canister_id: Principal;
38
- }
39
- export type NotifyTopUpResult = {Ok: Cycles} | {Err: NotifyError};
40
- export interface SubnetTypesToSubnetsResponse {
41
- data: Array<[string, Array<Principal>]>;
42
- }
43
- export interface _SERVICE {
44
- get_icp_xdr_conversion_rate: ActorMethod<[], IcpXdrConversionRateResponse>;
45
- get_subnet_types_to_subnets: ActorMethod<[], SubnetTypesToSubnetsResponse>;
46
- notify_create_canister: ActorMethod<[NotifyCreateCanisterArg], NotifyCreateCanisterResult>;
47
- notify_top_up: ActorMethod<[NotifyTopUpArg], NotifyTopUpResult>;
48
- }
@@ -1,67 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const BlockIndex = IDL.Nat64;
4
- const CyclesCanisterInitPayload = IDL.Record({
5
- last_purged_notification: IDL.Opt(BlockIndex),
6
- governance_canister_id: IDL.Principal,
7
- minting_account_id: IDL.Opt(IDL.Text),
8
- ledger_canister_id: IDL.Principal
9
- });
10
- const IcpXdrConversionRate = IDL.Record({
11
- xdr_permyriad_per_icp: IDL.Nat64,
12
- timestamp_seconds: IDL.Nat64
13
- });
14
- const IcpXdrConversionRateResponse = IDL.Record({
15
- certificate: IDL.Vec(IDL.Nat8),
16
- data: IcpXdrConversionRate,
17
- hash_tree: IDL.Vec(IDL.Nat8)
18
- });
19
- const SubnetTypesToSubnetsResponse = IDL.Record({
20
- data: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Principal)))
21
- });
22
- const NotifyCreateCanisterArg = IDL.Record({
23
- controller: IDL.Principal,
24
- block_index: BlockIndex,
25
- subnet_type: IDL.Opt(IDL.Text)
26
- });
27
- const NotifyError = IDL.Variant({
28
- Refunded: IDL.Record({
29
- block_index: IDL.Opt(BlockIndex),
30
- reason: IDL.Text
31
- }),
32
- InvalidTransaction: IDL.Text,
33
- Other: IDL.Record({
34
- error_message: IDL.Text,
35
- error_code: IDL.Nat64
36
- }),
37
- Processing: IDL.Null,
38
- TransactionTooOld: BlockIndex
39
- });
40
- const NotifyCreateCanisterResult = IDL.Variant({
41
- Ok: IDL.Principal,
42
- Err: NotifyError
43
- });
44
- const NotifyTopUpArg = IDL.Record({
45
- block_index: BlockIndex,
46
- canister_id: IDL.Principal
47
- });
48
- const Cycles = IDL.Nat;
49
- const NotifyTopUpResult = IDL.Variant({Ok: Cycles, Err: NotifyError});
50
- return IDL.Service({
51
- get_icp_xdr_conversion_rate: IDL.Func([], [IcpXdrConversionRateResponse], ['query']),
52
- get_subnet_types_to_subnets: IDL.Func([], [SubnetTypesToSubnetsResponse], ['query']),
53
- notify_create_canister: IDL.Func([NotifyCreateCanisterArg], [NotifyCreateCanisterResult], []),
54
- notify_top_up: IDL.Func([NotifyTopUpArg], [NotifyTopUpResult], [])
55
- });
56
- };
57
- // @ts-ignore
58
- export const init = ({IDL}) => {
59
- const BlockIndex = IDL.Nat64;
60
- const CyclesCanisterInitPayload = IDL.Record({
61
- last_purged_notification: IDL.Opt(BlockIndex),
62
- governance_canister_id: IDL.Principal,
63
- minting_account_id: IDL.Opt(IDL.Text),
64
- ledger_canister_id: IDL.Principal
65
- });
66
- return [CyclesCanisterInitPayload];
67
- };