@storagehub/types-bundle 0.2.4 → 0.2.6
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/definitions.js +22 -22
- package/dist/rpc.js +264 -274
- package/dist/runtime.js +409 -410
- package/dist/types/rpc.d.ts +1 -4
- package/dist/types.js +281 -281
- package/package.json +1 -1
package/dist/runtime.js
CHANGED
|
@@ -1,423 +1,422 @@
|
|
|
1
1
|
const FILE_SYSTEM_V1 = {
|
|
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
|
-
}
|
|
2
|
+
is_storage_request_open_to_volunteers: {
|
|
3
|
+
description: "Check if a storage request is open to volunteers.",
|
|
4
|
+
params: [
|
|
5
|
+
{
|
|
6
|
+
name: "fileKey",
|
|
7
|
+
type: "H256"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
type: "Result<bool, IsStorageRequestOpenToVolunteersError>"
|
|
11
|
+
},
|
|
12
|
+
query_earliest_file_volunteer_tick: {
|
|
13
|
+
description: "Query the earliest tick number that a BSP can volunteer for a file.",
|
|
14
|
+
params: [
|
|
15
|
+
{
|
|
16
|
+
name: "bspId",
|
|
17
|
+
type: "BackupStorageProviderId"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
name: "fileKey",
|
|
21
|
+
type: "H256"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
type: "Result<BlockNumber, QueryFileEarliestVolunteerBlockError>"
|
|
25
|
+
},
|
|
26
|
+
query_bsp_confirm_chunks_to_prove_for_file: {
|
|
27
|
+
description: "Query the chunks that a BSP needs to prove to confirm that it is storing a file.",
|
|
28
|
+
params: [
|
|
29
|
+
{
|
|
30
|
+
name: "bspId",
|
|
31
|
+
type: "BackupStorageProviderId"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
name: "fileKey",
|
|
35
|
+
type: "H256"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
type: "Result<Vec<ChunkId>, QueryBspConfirmChunksToProveForFileError>"
|
|
39
|
+
},
|
|
40
|
+
query_msp_confirm_chunks_to_prove_for_file: {
|
|
41
|
+
description: "Query the chunks that a MSP needs to prove to confirm that it is storing a file.",
|
|
42
|
+
params: [
|
|
43
|
+
{
|
|
44
|
+
name: "mspId",
|
|
45
|
+
type: "MainStorageProviderId"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
name: "fileKey",
|
|
49
|
+
type: "H256"
|
|
50
|
+
}
|
|
51
|
+
],
|
|
52
|
+
type: "Result<Vec<ChunkId>, QueryMspConfirmChunksToProveForFileError>"
|
|
53
|
+
},
|
|
54
|
+
query_bsps_volunteered_for_file: {
|
|
55
|
+
description: "Query the BSPs that volunteered for a file.",
|
|
56
|
+
params: [
|
|
57
|
+
{
|
|
58
|
+
name: "fileKey",
|
|
59
|
+
type: "H256"
|
|
60
|
+
}
|
|
61
|
+
],
|
|
62
|
+
type: "Result<Vec<BackupStorageProviderId>, QueryBspsVolunteeredForFileError>"
|
|
63
|
+
},
|
|
64
|
+
decode_generic_apply_delta_event_info: {
|
|
65
|
+
description: "Decodes the BucketId expected to be found in the event info of a generic apply delta.",
|
|
66
|
+
params: [
|
|
67
|
+
{
|
|
68
|
+
name: "encodedEventInfo",
|
|
69
|
+
type: "Vec<u8>"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
type: "Result<BucketId, GenericApplyDeltaEventInfoError>"
|
|
73
|
+
},
|
|
74
|
+
pending_storage_requests_by_msp: {
|
|
75
|
+
description: "Get pending storage requests for a Main Storage Provider.",
|
|
76
|
+
params: [
|
|
77
|
+
{
|
|
78
|
+
name: "mspId",
|
|
79
|
+
type: "MainStorageProviderId"
|
|
80
|
+
}
|
|
81
|
+
],
|
|
82
|
+
type: "BTreeMap<H256, StorageRequestMetadata>"
|
|
83
|
+
},
|
|
84
|
+
storage_requests_by_msp: {
|
|
85
|
+
description: "Get the storage requests for a given MSP.",
|
|
86
|
+
params: [
|
|
87
|
+
{
|
|
88
|
+
name: "mspId",
|
|
89
|
+
type: "MainStorageProviderId"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
type: "BTreeMap<H256, StorageRequestMetadata>"
|
|
93
|
+
},
|
|
94
|
+
query_incomplete_storage_request_metadata: {
|
|
95
|
+
description: "Query incomplete storage request metadata for a file key.",
|
|
96
|
+
params: [
|
|
97
|
+
{
|
|
98
|
+
name: "fileKey",
|
|
99
|
+
type: "H256"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
type: "Result<IncompleteStorageRequestMetadataResponse, QueryIncompleteStorageRequestMetadataError>"
|
|
103
|
+
}
|
|
105
104
|
};
|
|
106
105
|
const PROOFS_DEALER_V1 = {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
type: "BlockNumber"
|
|
131
|
-
},
|
|
132
|
-
get_checkpoint_challenges: {
|
|
133
|
-
description: "Get checkpoint challenges for a given block.",
|
|
134
|
-
params: [
|
|
135
|
-
{
|
|
136
|
-
name: "tick",
|
|
106
|
+
get_last_tick_provider_submitted_proof: {
|
|
107
|
+
description: "Get the last tick for which the submitter submitted a proof.",
|
|
108
|
+
params: [
|
|
109
|
+
{
|
|
110
|
+
name: "providerId",
|
|
111
|
+
type: "ProviderId"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
type: "Result<BlockNumber, GetProofSubmissionRecordError>"
|
|
115
|
+
},
|
|
116
|
+
get_next_tick_to_submit_proof_for: {
|
|
117
|
+
description: "Get the next tick for which the submitter should submit a proof.",
|
|
118
|
+
params: [
|
|
119
|
+
{
|
|
120
|
+
name: "providerId",
|
|
121
|
+
type: "ProviderId"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
type: "Result<BlockNumber, GetProofSubmissionRecordError>"
|
|
125
|
+
},
|
|
126
|
+
get_last_checkpoint_challenge_tick: {
|
|
127
|
+
description: "Get the last checkpoint challenge tick.",
|
|
128
|
+
params: [],
|
|
137
129
|
type: "BlockNumber"
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
130
|
+
},
|
|
131
|
+
get_checkpoint_challenges: {
|
|
132
|
+
description: "Get checkpoint challenges for a given block.",
|
|
133
|
+
params: [
|
|
134
|
+
{
|
|
135
|
+
name: "tick",
|
|
136
|
+
type: "BlockNumber"
|
|
137
|
+
}
|
|
138
|
+
],
|
|
139
|
+
type: "Result<Vec<(Key, Option<TrieRemoveMutation>)>, GetCheckpointChallengesError>"
|
|
140
|
+
},
|
|
141
|
+
get_challenge_seed: {
|
|
142
|
+
description: "Get the seed for a given challenge tick.",
|
|
143
|
+
params: [
|
|
144
|
+
{
|
|
145
|
+
name: "tick",
|
|
146
|
+
type: "BlockNumber"
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
type: "Result<RandomnessOutput, GetChallengeSeedError>"
|
|
150
|
+
},
|
|
151
|
+
get_challenge_period: {
|
|
152
|
+
description: "Get the challenge period for a given Provider.",
|
|
153
|
+
params: [
|
|
154
|
+
{
|
|
155
|
+
name: "providerId",
|
|
156
|
+
type: "ProviderId"
|
|
157
|
+
}
|
|
158
|
+
],
|
|
159
|
+
type: "Result<BlockNumber, GetChallengePeriodError>"
|
|
160
|
+
},
|
|
161
|
+
get_checkpoint_challenge_period: {
|
|
162
|
+
description: "Get the checkpoint challenge period.",
|
|
163
|
+
params: [],
|
|
147
164
|
type: "BlockNumber"
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
type: "
|
|
195
|
-
|
|
196
|
-
],
|
|
197
|
-
type: "Vec<Key>"
|
|
198
|
-
},
|
|
199
|
-
get_current_tick: {
|
|
200
|
-
description: "Get the current tick.",
|
|
201
|
-
params: [],
|
|
202
|
-
type: "BlockNumber"
|
|
203
|
-
},
|
|
204
|
-
get_next_deadline_tick: {
|
|
205
|
-
description: "Get the next deadline tick.",
|
|
206
|
-
params: [
|
|
207
|
-
{
|
|
208
|
-
name: "providerId",
|
|
209
|
-
type: "ProviderId"
|
|
210
|
-
}
|
|
211
|
-
],
|
|
212
|
-
type: "Result<BlockNumber, GetNextDeadlineTickError>"
|
|
213
|
-
}
|
|
165
|
+
},
|
|
166
|
+
get_challenges_from_seed: {
|
|
167
|
+
description: "Get challenges from a seed.",
|
|
168
|
+
params: [
|
|
169
|
+
{
|
|
170
|
+
name: "seed",
|
|
171
|
+
type: "RandomnessOutput"
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
name: "providerId",
|
|
175
|
+
type: "ProviderId"
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "count",
|
|
179
|
+
type: "u32"
|
|
180
|
+
}
|
|
181
|
+
],
|
|
182
|
+
type: "Vec<Key>"
|
|
183
|
+
},
|
|
184
|
+
get_forest_challenges_from_seed: {
|
|
185
|
+
description: "Get forest challenges from a seed.",
|
|
186
|
+
params: [
|
|
187
|
+
{
|
|
188
|
+
name: "seed",
|
|
189
|
+
type: "RandomnessOutput"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
name: "providerId",
|
|
193
|
+
type: "ProviderId"
|
|
194
|
+
}
|
|
195
|
+
],
|
|
196
|
+
type: "Vec<Key>"
|
|
197
|
+
},
|
|
198
|
+
get_current_tick: {
|
|
199
|
+
description: "Get the current tick.",
|
|
200
|
+
params: [],
|
|
201
|
+
type: "BlockNumber"
|
|
202
|
+
},
|
|
203
|
+
get_next_deadline_tick: {
|
|
204
|
+
description: "Get the next deadline tick.",
|
|
205
|
+
params: [
|
|
206
|
+
{
|
|
207
|
+
name: "providerId",
|
|
208
|
+
type: "ProviderId"
|
|
209
|
+
}
|
|
210
|
+
],
|
|
211
|
+
type: "Result<BlockNumber, GetNextDeadlineTickError>"
|
|
212
|
+
}
|
|
214
213
|
};
|
|
215
214
|
const STORAGE_PROVIDERS_V1 = {
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
215
|
+
get_bsp_info: {
|
|
216
|
+
description: "Get the BSP info for a given BSP ID.",
|
|
217
|
+
params: [
|
|
218
|
+
{
|
|
219
|
+
name: "bspId",
|
|
220
|
+
type: "BackupStorageProviderId"
|
|
221
|
+
}
|
|
222
|
+
],
|
|
223
|
+
type: "Result<BackupStorageProvider, GetBspInfoError>"
|
|
224
|
+
},
|
|
225
|
+
get_storage_provider_id: {
|
|
226
|
+
description: "Get the Storage Provider ID for a given Account ID.",
|
|
227
|
+
params: [
|
|
228
|
+
{
|
|
229
|
+
name: "who",
|
|
230
|
+
type: "AccountId"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
type: "Option<StorageProviderId>"
|
|
234
|
+
},
|
|
235
|
+
get_worst_case_scenario_slashable_amount: {
|
|
236
|
+
description: "Get the worst case scenario slashable amount for a provider.",
|
|
237
|
+
params: [
|
|
238
|
+
{
|
|
239
|
+
name: "providerId",
|
|
240
|
+
type: "ProviderId"
|
|
241
|
+
}
|
|
242
|
+
],
|
|
243
|
+
type: "Option<Balance>"
|
|
244
|
+
},
|
|
245
|
+
get_slash_amount_per_max_file_size: {
|
|
246
|
+
description: "Get the slashable amount corresponding to the configured max file size.",
|
|
247
|
+
params: [],
|
|
248
|
+
type: "Balance"
|
|
249
|
+
},
|
|
250
|
+
query_storage_provider_capacity: {
|
|
251
|
+
description: "Query the storage provider capacity.",
|
|
252
|
+
params: [
|
|
253
|
+
{
|
|
254
|
+
name: "providerId",
|
|
255
|
+
type: "ProviderId"
|
|
256
|
+
}
|
|
257
|
+
],
|
|
258
|
+
type: "Result<StorageDataUnit, QueryStorageProviderCapacityError>"
|
|
259
|
+
},
|
|
260
|
+
query_available_storage_capacity: {
|
|
261
|
+
description: "Query the available storage capacity.",
|
|
262
|
+
params: [
|
|
263
|
+
{
|
|
264
|
+
name: "providerId",
|
|
265
|
+
type: "ProviderId"
|
|
266
|
+
}
|
|
267
|
+
],
|
|
268
|
+
type: "Result<StorageDataUnit, QueryAvailableStorageCapacityError>"
|
|
269
|
+
},
|
|
270
|
+
query_earliest_change_capacity_block: {
|
|
271
|
+
description: "Query the earliest block number that a BSP can change its capacity.",
|
|
272
|
+
params: [
|
|
273
|
+
{
|
|
274
|
+
name: "providerId",
|
|
275
|
+
type: "BackupStorageProviderId"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
type: "Result<BlockNumber, QueryEarliestChangeCapacityBlockError>"
|
|
279
|
+
},
|
|
280
|
+
query_msp_id_of_bucket_id: {
|
|
281
|
+
description: "Query the MSP ID of a bucket ID.",
|
|
282
|
+
params: [
|
|
283
|
+
{
|
|
284
|
+
name: "bucketId",
|
|
285
|
+
type: "H256"
|
|
286
|
+
}
|
|
287
|
+
],
|
|
288
|
+
type: "Result<ProviderId, QueryMspIdOfBucketIdError>"
|
|
289
|
+
},
|
|
290
|
+
query_provider_multiaddresses: {
|
|
291
|
+
description: "Query the provider's multiaddresses.",
|
|
292
|
+
params: [
|
|
293
|
+
{
|
|
294
|
+
name: "providerId",
|
|
295
|
+
type: "ProviderId"
|
|
296
|
+
}
|
|
297
|
+
],
|
|
298
|
+
type: "Result<Multiaddresses, QueryProviderMultiaddressesError>"
|
|
299
|
+
},
|
|
300
|
+
query_value_propositions_for_msp: {
|
|
301
|
+
description: "Query the value propositions for a MSP.",
|
|
302
|
+
params: [
|
|
303
|
+
{
|
|
304
|
+
name: "mspId",
|
|
305
|
+
type: "MainStorageProviderId"
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
type: "Vec<ValuePropositionWithId>"
|
|
309
|
+
},
|
|
310
|
+
get_bsp_stake: {
|
|
311
|
+
description: "Get the stake of a BSP.",
|
|
312
|
+
params: [
|
|
313
|
+
{
|
|
314
|
+
name: "bspId",
|
|
315
|
+
type: "BackupStorageProviderId"
|
|
316
|
+
}
|
|
317
|
+
],
|
|
318
|
+
type: "Result<Balance, GetStakeError>"
|
|
319
|
+
},
|
|
320
|
+
can_delete_provider: {
|
|
321
|
+
description: "Check if a provider can be deleted.",
|
|
322
|
+
params: [
|
|
323
|
+
{
|
|
324
|
+
name: "providerId",
|
|
325
|
+
type: "ProviderId"
|
|
326
|
+
}
|
|
327
|
+
],
|
|
328
|
+
type: "bool"
|
|
329
|
+
},
|
|
330
|
+
query_buckets_for_msp: {
|
|
331
|
+
description: "Get the Buckets that an MSP is storing.",
|
|
332
|
+
params: [
|
|
333
|
+
{
|
|
334
|
+
name: "mspId",
|
|
335
|
+
type: "MainStorageProviderId"
|
|
336
|
+
}
|
|
337
|
+
],
|
|
338
|
+
type: "Result<Vec<BucketId>, QueryBucketsForMspError>"
|
|
339
|
+
},
|
|
340
|
+
query_buckets_of_user_stored_by_msp: {
|
|
341
|
+
description: "Query the buckets stored by an MSP that belong to a specific user.",
|
|
342
|
+
params: [
|
|
343
|
+
{
|
|
344
|
+
name: "mspId",
|
|
345
|
+
type: "ProviderId"
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
name: "user",
|
|
349
|
+
type: "AccountId"
|
|
350
|
+
}
|
|
351
|
+
],
|
|
352
|
+
type: "Result<Vec<H256>, QueryBucketsOfUserStoredByMspError>"
|
|
353
|
+
}
|
|
355
354
|
};
|
|
356
355
|
const PAYMENT_STREAMS_V1 = {
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
356
|
+
get_users_with_debt_over_threshold: {
|
|
357
|
+
description: "Get the users that have a debt to the provider greater than the threshold.",
|
|
358
|
+
params: [
|
|
359
|
+
{
|
|
360
|
+
name: "providerId",
|
|
361
|
+
type: "ProviderId"
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "threshold",
|
|
365
|
+
type: "Balance"
|
|
366
|
+
}
|
|
367
|
+
],
|
|
368
|
+
type: "Result<Vec<AccountId>, GetUsersWithDebtOverThresholdError>"
|
|
369
|
+
},
|
|
370
|
+
get_users_of_payment_streams_of_provider: {
|
|
371
|
+
description: "Get the payment streams of a provider.",
|
|
372
|
+
params: [
|
|
373
|
+
{
|
|
374
|
+
name: "providerId",
|
|
375
|
+
type: "ProviderId"
|
|
376
|
+
}
|
|
377
|
+
],
|
|
378
|
+
type: "Vec<AccountId>"
|
|
379
|
+
},
|
|
380
|
+
get_providers_with_payment_streams_with_user: {
|
|
381
|
+
description: "Get the Providers that have at least one payment stream with a specific user.",
|
|
382
|
+
params: [
|
|
383
|
+
{
|
|
384
|
+
name: "userAccount",
|
|
385
|
+
type: "AccountId"
|
|
386
|
+
}
|
|
387
|
+
],
|
|
388
|
+
type: "Vec<ProviderId>"
|
|
389
|
+
},
|
|
390
|
+
get_current_price_per_giga_unit_per_tick: {
|
|
391
|
+
description: "Get the current price per giga unit per tick",
|
|
392
|
+
params: [],
|
|
366
393
|
type: "Balance"
|
|
367
|
-
|
|
368
|
-
],
|
|
369
|
-
type: "Result<Vec<AccountId>, GetUsersWithDebtOverThresholdError>"
|
|
370
|
-
},
|
|
371
|
-
get_users_of_payment_streams_of_provider: {
|
|
372
|
-
description: "Get the payment streams of a provider.",
|
|
373
|
-
params: [
|
|
374
|
-
{
|
|
375
|
-
name: "providerId",
|
|
376
|
-
type: "ProviderId"
|
|
377
|
-
}
|
|
378
|
-
],
|
|
379
|
-
type: "Vec<AccountId>"
|
|
380
|
-
},
|
|
381
|
-
get_providers_with_payment_streams_with_user: {
|
|
382
|
-
description: "Get the Providers that have at least one payment stream with a specific user.",
|
|
383
|
-
params: [
|
|
384
|
-
{
|
|
385
|
-
name: "userAccount",
|
|
386
|
-
type: "AccountId"
|
|
387
|
-
}
|
|
388
|
-
],
|
|
389
|
-
type: "Vec<ProviderId>"
|
|
390
|
-
},
|
|
391
|
-
get_current_price_per_giga_unit_per_tick: {
|
|
392
|
-
description: "Get the current price per giga unit per tick",
|
|
393
|
-
params: [],
|
|
394
|
-
type: "Balance"
|
|
395
|
-
}
|
|
394
|
+
}
|
|
396
395
|
};
|
|
397
396
|
export const runtime = {
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
397
|
+
FileSystemApi: [
|
|
398
|
+
{
|
|
399
|
+
methods: FILE_SYSTEM_V1,
|
|
400
|
+
version: 1
|
|
401
|
+
}
|
|
402
|
+
],
|
|
403
|
+
ProofsDealerApi: [
|
|
404
|
+
{
|
|
405
|
+
methods: PROOFS_DEALER_V1,
|
|
406
|
+
version: 1
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
StorageProvidersApi: [
|
|
410
|
+
{
|
|
411
|
+
methods: STORAGE_PROVIDERS_V1,
|
|
412
|
+
version: 1
|
|
413
|
+
}
|
|
414
|
+
],
|
|
415
|
+
PaymentStreamsApi: [
|
|
416
|
+
{
|
|
417
|
+
methods: PAYMENT_STREAMS_V1,
|
|
418
|
+
version: 1
|
|
419
|
+
}
|
|
420
|
+
]
|
|
422
421
|
};
|
|
423
|
-
//# sourceMappingURL=runtime.js.map
|
|
422
|
+
//# sourceMappingURL=runtime.js.map
|