@storagehub/api-augment 0.2.10 → 0.2.14
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/parachain/interfaces/augment-api-consts.js +1 -1
- package/dist/parachain/interfaces/augment-api-errors.js +1 -1
- package/dist/parachain/interfaces/augment-api-events.js +1 -1
- package/dist/parachain/interfaces/augment-api-query.js +1 -1
- package/dist/parachain/interfaces/augment-api-rpc.js +1 -1
- package/dist/parachain/interfaces/augment-api-runtime.js +1 -1
- package/dist/parachain/interfaces/augment-api-tx.js +1 -1
- package/dist/parachain/interfaces/augment-api.js +7 -7
- package/dist/parachain/interfaces/augment-types.js +1 -1
- package/dist/parachain/interfaces/index.js +1 -1
- package/dist/parachain/interfaces/lookup.js +2406 -2869
- package/dist/parachain/interfaces/lookup.js.map +1 -1
- package/dist/parachain/interfaces/registry.js +1 -1
- package/dist/parachain/interfaces/storagehubclient/index.js +1 -1
- package/dist/parachain/interfaces/types-lookup.js +1 -1
- package/dist/parachain/interfaces/types.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-consts.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-errors.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-events.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-query.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-rpc.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-runtime.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api-tx.js +1 -1
- package/dist/solochain-evm/interfaces/augment-api.js +7 -7
- package/dist/solochain-evm/interfaces/augment-types.js +1 -1
- package/dist/solochain-evm/interfaces/index.js +1 -1
- package/dist/solochain-evm/interfaces/lookup.js +1686 -2107
- package/dist/solochain-evm/interfaces/lookup.js.map +1 -1
- package/dist/solochain-evm/interfaces/registry.js +1 -1
- package/dist/solochain-evm/interfaces/storagehubclient/index.js +1 -1
- package/dist/solochain-evm/interfaces/types-lookup.js +1 -1
- package/dist/solochain-evm/interfaces/types.js +1 -1
- package/dist/types/parachain/interfaces/augment-api-consts.d.ts +7 -7
- package/dist/types/parachain/interfaces/augment-api-errors.d.ts +8 -107
- package/dist/types/parachain/interfaces/augment-api-events.d.ts +185 -917
- package/dist/types/parachain/interfaces/augment-api-query.d.ts +112 -319
- package/dist/types/parachain/interfaces/augment-api-rpc.d.ts +32 -32
- package/dist/types/parachain/interfaces/augment-api-runtime.d.ts +25 -25
- package/dist/types/parachain/interfaces/augment-api-tx.d.ts +212 -637
- package/dist/types/parachain/interfaces/augment-api.d.ts +7 -7
- package/dist/types/parachain/interfaces/augment-types.d.ts +76 -75
- package/dist/types/parachain/interfaces/index.d.ts +1 -1
- package/dist/types/parachain/interfaces/lookup.d.ts +289 -326
- package/dist/types/parachain/interfaces/registry.d.ts +4 -4
- package/dist/types/parachain/interfaces/storagehubclient/index.d.ts +1 -1
- package/dist/types/parachain/interfaces/storagehubclient/types.d.ts +46 -36
- package/dist/types/parachain/interfaces/types-lookup.d.ts +525 -712
- package/dist/types/parachain/interfaces/types.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +7 -7
- package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +8 -107
- package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +150 -763
- package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +100 -291
- package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +32 -32
- package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +25 -25
- package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +195 -582
- package/dist/types/solochain-evm/interfaces/augment-api.d.ts +7 -7
- package/dist/types/solochain-evm/interfaces/augment-types.d.ts +76 -75
- package/dist/types/solochain-evm/interfaces/index.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/lookup.d.ts +239 -276
- package/dist/types/solochain-evm/interfaces/registry.d.ts +4 -4
- package/dist/types/solochain-evm/interfaces/storagehubclient/index.d.ts +1 -1
- package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +47 -37
- package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +425 -582
- package/dist/types/solochain-evm/interfaces/types.d.ts +1 -1
- package/metadata-sh-parachain.json +1 -1
- package/metadata-sh-solochain-evm.json +1 -1
- package/package.json +2 -2
- package/src/parachain/interfaces/augment-api-errors.ts +5 -104
- package/src/parachain/interfaces/augment-api-events.ts +14 -113
- package/src/parachain/interfaces/augment-api-tx.ts +63 -10
- package/src/parachain/interfaces/augment-types.ts +2 -0
- package/src/parachain/interfaces/lookup.ts +326 -388
- package/src/parachain/interfaces/registry.ts +2 -2
- package/src/parachain/interfaces/storagehubclient/types.ts +14 -4
- package/src/parachain/interfaces/types-lookup.ts +388 -486
- package/src/solochain-evm/interfaces/augment-api-errors.ts +5 -104
- package/src/solochain-evm/interfaces/augment-api-events.ts +14 -113
- package/src/solochain-evm/interfaces/augment-api-tx.ts +63 -10
- package/src/solochain-evm/interfaces/augment-types.ts +2 -0
- package/src/solochain-evm/interfaces/lookup.ts +276 -338
- package/src/solochain-evm/interfaces/registry.ts +2 -2
- package/src/solochain-evm/interfaces/storagehubclient/types.ts +14 -4
- package/src/solochain-evm/interfaces/types-lookup.ts +338 -436
- package/storagehub-api-augment-0.2.14.tgz +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storagehub/api-augment",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.14",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@polkadot/types-codec": "^16.4.7",
|
|
35
35
|
"tsx": "4.20.5",
|
|
36
36
|
"typescript": "^5.9.2",
|
|
37
|
-
"@storagehub/types-bundle": "0.2.
|
|
37
|
+
"@storagehub/types-bundle": "0.2.9"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"scrape": "pnpm tsx scripts/scrapeMetadata.ts",
|
|
@@ -162,10 +162,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
162
162
|
[key: string]: AugmentedError<ApiType>;
|
|
163
163
|
};
|
|
164
164
|
fileSystem: {
|
|
165
|
-
/**
|
|
166
|
-
* BSP did not succeed threshold check.
|
|
167
|
-
**/
|
|
168
|
-
AboveThreshold: AugmentedError<ApiType>;
|
|
169
165
|
/**
|
|
170
166
|
* Batch file deletion must contain files from a single bucket only.
|
|
171
167
|
**/
|
|
@@ -174,18 +170,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
174
170
|
* BSP has already confirmed storing the given file.
|
|
175
171
|
**/
|
|
176
172
|
BspAlreadyConfirmed: AugmentedError<ApiType>;
|
|
177
|
-
/**
|
|
178
|
-
* BSP is already a data server for the move bucket request.
|
|
179
|
-
**/
|
|
180
|
-
BspAlreadyDataServer: AugmentedError<ApiType>;
|
|
181
173
|
/**
|
|
182
174
|
* BSP already volunteered to store the given file.
|
|
183
175
|
**/
|
|
184
176
|
BspAlreadyVolunteered: AugmentedError<ApiType>;
|
|
185
|
-
/**
|
|
186
|
-
* Too many registered data servers for the move bucket request.
|
|
187
|
-
**/
|
|
188
|
-
BspDataServersExceeded: AugmentedError<ApiType>;
|
|
189
177
|
/**
|
|
190
178
|
* BSP has not confirmed storing the given file.
|
|
191
179
|
**/
|
|
@@ -202,10 +190,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
202
190
|
* Action not allowed while the bucket is being moved.
|
|
203
191
|
**/
|
|
204
192
|
BucketIsBeingMoved: AugmentedError<ApiType>;
|
|
205
|
-
/**
|
|
206
|
-
* Bucket is not private. Call `update_bucket_privacy` to make it private.
|
|
207
|
-
**/
|
|
208
|
-
BucketIsNotPrivate: AugmentedError<ApiType>;
|
|
209
193
|
/**
|
|
210
194
|
* Bucket is not empty.
|
|
211
195
|
**/
|
|
@@ -222,10 +206,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
222
206
|
* Collection ID was not found.
|
|
223
207
|
**/
|
|
224
208
|
CollectionNotFound: AugmentedError<ApiType>;
|
|
225
|
-
/**
|
|
226
|
-
* Divided by 0
|
|
227
|
-
**/
|
|
228
|
-
DividedByZero: AugmentedError<ApiType>;
|
|
229
209
|
/**
|
|
230
210
|
* Duplicate file key detected within the same batch deletion request.
|
|
231
211
|
**/
|
|
@@ -250,18 +230,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
250
230
|
* Failed to create file metadata
|
|
251
231
|
**/
|
|
252
232
|
FailedToCreateFileMetadata: AugmentedError<ApiType>;
|
|
253
|
-
/**
|
|
254
|
-
* Failed to decode threshold.
|
|
255
|
-
**/
|
|
256
|
-
FailedToDecodeThreshold: AugmentedError<ApiType>;
|
|
257
|
-
/**
|
|
258
|
-
* Failed to encode BSP id as slice.
|
|
259
|
-
**/
|
|
260
|
-
FailedToEncodeBsp: AugmentedError<ApiType>;
|
|
261
|
-
/**
|
|
262
|
-
* Failed to encode fingerprint as slice.
|
|
263
|
-
**/
|
|
264
|
-
FailedToEncodeFingerprint: AugmentedError<ApiType>;
|
|
265
233
|
/**
|
|
266
234
|
* Failed to get owner account of ID of provider
|
|
267
235
|
**/
|
|
@@ -287,21 +255,14 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
287
255
|
**/
|
|
288
256
|
FailedToQueryEarliestFileVolunteerTick: AugmentedError<ApiType>;
|
|
289
257
|
/**
|
|
290
|
-
*
|
|
291
|
-
|
|
292
|
-
FailedTypeConversion: AugmentedError<ApiType>;
|
|
293
|
-
/**
|
|
294
|
-
* File key already pending deletion.
|
|
295
|
-
**/
|
|
296
|
-
FileKeyAlreadyPendingDeletion: AugmentedError<ApiType>;
|
|
297
|
-
/**
|
|
298
|
-
* File key computed from metadata doesn't match the provided file key.
|
|
258
|
+
* File has an active storage request and as such is not eligible for deletion.
|
|
259
|
+
* The user should use the `revoke_storage_request` extrinsic to revoke it first.
|
|
299
260
|
**/
|
|
300
|
-
|
|
261
|
+
FileHasActiveStorageRequest: AugmentedError<ApiType>;
|
|
301
262
|
/**
|
|
302
|
-
* File
|
|
263
|
+
* File has an `IncompleteStorageRequest` associated with it and as such is not eligible for a new storage request
|
|
303
264
|
**/
|
|
304
|
-
|
|
265
|
+
FileHasIncompleteStorageRequest: AugmentedError<ApiType>;
|
|
305
266
|
/**
|
|
306
267
|
* The bounded vector that holds file metadata to process it is full but there's still more to process.
|
|
307
268
|
**/
|
|
@@ -314,10 +275,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
314
275
|
* Failed to fetch the rate for the payment stream.
|
|
315
276
|
**/
|
|
316
277
|
FixedRatePaymentStreamNotFound: AugmentedError<ApiType>;
|
|
317
|
-
/**
|
|
318
|
-
* Forest proof verification failed.
|
|
319
|
-
**/
|
|
320
|
-
ForestProofVerificationFailed: AugmentedError<ApiType>;
|
|
321
278
|
/**
|
|
322
279
|
* Failed to get value when just checked it existed.
|
|
323
280
|
**/
|
|
@@ -326,10 +283,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
326
283
|
* Incomplete storage request not found.
|
|
327
284
|
**/
|
|
328
285
|
IncompleteStorageRequestNotFound: AugmentedError<ApiType>;
|
|
329
|
-
/**
|
|
330
|
-
* Key already exists in mapping when it should not.
|
|
331
|
-
**/
|
|
332
|
-
InconsistentStateKeyAlreadyExists: AugmentedError<ApiType>;
|
|
333
286
|
/**
|
|
334
287
|
* SP does not have enough storage capacity to store the file.
|
|
335
288
|
**/
|
|
@@ -354,23 +307,11 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
354
307
|
* Invalid signed operation provided.
|
|
355
308
|
**/
|
|
356
309
|
InvalidSignedOperation: AugmentedError<ApiType>;
|
|
357
|
-
/**
|
|
358
|
-
* Maximum threshold cannot be zero.
|
|
359
|
-
**/
|
|
360
|
-
MaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
361
|
-
/**
|
|
362
|
-
* Max replication target cannot be smaller than default replication target.
|
|
363
|
-
**/
|
|
364
|
-
MaxReplicationTargetSmallerThanDefault: AugmentedError<ApiType>;
|
|
365
310
|
/**
|
|
366
311
|
* Error created in 2024. If you see this, you are well beyond the singularity and should
|
|
367
312
|
* probably stop using this pallet.
|
|
368
313
|
**/
|
|
369
314
|
MaxTickNumberReached: AugmentedError<ApiType>;
|
|
370
|
-
/**
|
|
371
|
-
* Max number of user pending deletion requests reached.
|
|
372
|
-
**/
|
|
373
|
-
MaxUserPendingDeletionRequestsReached: AugmentedError<ApiType>;
|
|
374
315
|
/**
|
|
375
316
|
* Minimum amount of blocks between the request opening and being able to confirm it not reached.
|
|
376
317
|
**/
|
|
@@ -407,10 +348,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
407
348
|
* No global reputation weight set.
|
|
408
349
|
**/
|
|
409
350
|
NoGlobalReputationWeightSet: AugmentedError<ApiType>;
|
|
410
|
-
/**
|
|
411
|
-
* Privacy update results in no change
|
|
412
|
-
**/
|
|
413
|
-
NoPrivacyChange: AugmentedError<ApiType>;
|
|
414
351
|
/**
|
|
415
352
|
* Account is not a BSP.
|
|
416
353
|
**/
|
|
@@ -427,10 +364,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
427
364
|
* Operation failed because the account is not the owner of the bucket.
|
|
428
365
|
**/
|
|
429
366
|
NotBucketOwner: AugmentedError<ApiType>;
|
|
430
|
-
/**
|
|
431
|
-
* Unauthorized operation, signer does not own the file.
|
|
432
|
-
**/
|
|
433
|
-
NotFileOwner: AugmentedError<ApiType>;
|
|
434
367
|
/**
|
|
435
368
|
* The MSP is trying to confirm to store a file from a storage request is not the one selected to store it.
|
|
436
369
|
**/
|
|
@@ -439,10 +372,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
439
372
|
* Operations not allowed for insolvent provider
|
|
440
373
|
**/
|
|
441
374
|
OperationNotAllowedForInsolventProvider: AugmentedError<ApiType>;
|
|
442
|
-
/**
|
|
443
|
-
* Operations not allowed while bucket is not being stored by an MSP
|
|
444
|
-
**/
|
|
445
|
-
OperationNotAllowedWhileBucketIsNotStoredByMsp: AugmentedError<ApiType>;
|
|
446
375
|
/**
|
|
447
376
|
* Certain operations (such as issuing new storage requests) are not allowed when interacting with insolvent users.
|
|
448
377
|
**/
|
|
@@ -459,10 +388,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
459
388
|
* Provider is not storing the file.
|
|
460
389
|
**/
|
|
461
390
|
ProviderNotStoringFile: AugmentedError<ApiType>;
|
|
462
|
-
/**
|
|
463
|
-
* Root of the provider not found.
|
|
464
|
-
**/
|
|
465
|
-
ProviderRootNotFound: AugmentedError<ApiType>;
|
|
466
391
|
/**
|
|
467
392
|
* Replication target cannot be zero.
|
|
468
393
|
**/
|
|
@@ -491,10 +416,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
491
416
|
* Operation not allowed while the storage request exists.
|
|
492
417
|
**/
|
|
493
418
|
StorageRequestExists: AugmentedError<ApiType>;
|
|
494
|
-
/**
|
|
495
|
-
* No slot available found in ticks to insert storage request expiration time.
|
|
496
|
-
**/
|
|
497
|
-
StorageRequestExpiredNoSlotAvailable: AugmentedError<ApiType>;
|
|
498
419
|
/**
|
|
499
420
|
* Not authorized to delete the storage request.
|
|
500
421
|
**/
|
|
@@ -503,34 +424,14 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
503
424
|
* Storage request not registered for the given file.
|
|
504
425
|
**/
|
|
505
426
|
StorageRequestNotFound: AugmentedError<ApiType>;
|
|
506
|
-
/**
|
|
507
|
-
* Operation not allowed while the storage request is not being revoked.
|
|
508
|
-
**/
|
|
509
|
-
StorageRequestNotRevoked: AugmentedError<ApiType>;
|
|
510
427
|
/**
|
|
511
428
|
* Arithmetic error in threshold calculation.
|
|
512
429
|
**/
|
|
513
430
|
ThresholdArithmeticError: AugmentedError<ApiType>;
|
|
514
|
-
/**
|
|
515
|
-
* BSPs assignment threshold cannot be below asymptote.
|
|
516
|
-
**/
|
|
517
|
-
ThresholdBelowAsymptote: AugmentedError<ApiType>;
|
|
518
|
-
/**
|
|
519
|
-
* Tick range to maximum threshold cannot be zero.
|
|
520
|
-
**/
|
|
521
|
-
TickRangeToMaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
522
|
-
/**
|
|
523
|
-
* Too many batch responses to process.
|
|
524
|
-
**/
|
|
525
|
-
TooManyBatchResponses: AugmentedError<ApiType>;
|
|
526
431
|
/**
|
|
527
432
|
* Too many storage request responses.
|
|
528
433
|
**/
|
|
529
434
|
TooManyStorageRequestResponses: AugmentedError<ApiType>;
|
|
530
|
-
/**
|
|
531
|
-
* Number of removed BSPs volunteered from storage request prefix did not match the expected number.
|
|
532
|
-
**/
|
|
533
|
-
UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
|
|
534
435
|
/**
|
|
535
436
|
* A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
|
|
536
437
|
**/
|
|
@@ -26,7 +26,6 @@ import type {
|
|
|
26
26
|
FrameSupportMessagesProcessMessageError,
|
|
27
27
|
FrameSupportTokensMiscBalanceStatus,
|
|
28
28
|
FrameSystemDispatchEventInfo,
|
|
29
|
-
PalletFileSystemEitherAccountIdOrMspId,
|
|
30
29
|
PalletFileSystemFileOperationIntention,
|
|
31
30
|
PalletFileSystemRejectedStorageRequestReason,
|
|
32
31
|
PalletNftsAttributeNamespace,
|
|
@@ -488,45 +487,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
488
487
|
[who: AccountId32, bucketId: H256, collectionId: Option<u32>, private: bool],
|
|
489
488
|
{ who: AccountId32; bucketId: H256; collectionId: Option<u32>; private: bool }
|
|
490
489
|
>;
|
|
491
|
-
/**
|
|
492
|
-
* Failed to decrease MSP's used capacity for expired file deletion request
|
|
493
|
-
**/
|
|
494
|
-
FailedToDecreaseMspUsedCapacity: AugmentedEvent<
|
|
495
|
-
ApiType,
|
|
496
|
-
[
|
|
497
|
-
user: AccountId32,
|
|
498
|
-
mspId: H256,
|
|
499
|
-
fileKey: H256,
|
|
500
|
-
fileSize: u64,
|
|
501
|
-
error: SpRuntimeDispatchError
|
|
502
|
-
],
|
|
503
|
-
{
|
|
504
|
-
user: AccountId32;
|
|
505
|
-
mspId: H256;
|
|
506
|
-
fileKey: H256;
|
|
507
|
-
fileSize: u64;
|
|
508
|
-
error: SpRuntimeDispatchError;
|
|
509
|
-
}
|
|
510
|
-
>;
|
|
511
|
-
/**
|
|
512
|
-
* Failed to get the MSP owner of the bucket for an expired file deletion request
|
|
513
|
-
* This is different from the bucket not having a MSP, which is allowed and won't error
|
|
514
|
-
**/
|
|
515
|
-
FailedToGetMspOfBucket: AugmentedEvent<
|
|
516
|
-
ApiType,
|
|
517
|
-
[bucketId: H256, error: SpRuntimeDispatchError],
|
|
518
|
-
{ bucketId: H256; error: SpRuntimeDispatchError }
|
|
519
|
-
>;
|
|
520
|
-
/**
|
|
521
|
-
* Notifies that a priority challenge with a trie remove mutation failed to be queued in the `on_idle` hook.
|
|
522
|
-
* This can happen if the priority challenge queue is full, and the failed challenge should be manually
|
|
523
|
-
* queued at a later time.
|
|
524
|
-
**/
|
|
525
|
-
FailedToQueuePriorityChallenge: AugmentedEvent<
|
|
526
|
-
ApiType,
|
|
527
|
-
[fileKey: H256, error: SpRuntimeDispatchError],
|
|
528
|
-
{ fileKey: H256; error: SpRuntimeDispatchError }
|
|
529
|
-
>;
|
|
530
490
|
/**
|
|
531
491
|
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
532
492
|
* the return of that storage request's deposit to the user failed.
|
|
@@ -536,49 +496,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
536
496
|
[fileKey: H256, owner: AccountId32, amountToReturn: u128, error: SpRuntimeDispatchError],
|
|
537
497
|
{ fileKey: H256; owner: AccountId32; amountToReturn: u128; error: SpRuntimeDispatchError }
|
|
538
498
|
>;
|
|
539
|
-
/**
|
|
540
|
-
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
541
|
-
* the transfer of a part of that storage request's deposit to one of the volunteered BSPs failed.
|
|
542
|
-
**/
|
|
543
|
-
FailedToTransferDepositFundsToBsp: AugmentedEvent<
|
|
544
|
-
ApiType,
|
|
545
|
-
[
|
|
546
|
-
fileKey: H256,
|
|
547
|
-
owner: AccountId32,
|
|
548
|
-
bspId: H256,
|
|
549
|
-
amountToTransfer: u128,
|
|
550
|
-
error: SpRuntimeDispatchError
|
|
551
|
-
],
|
|
552
|
-
{
|
|
553
|
-
fileKey: H256;
|
|
554
|
-
owner: AccountId32;
|
|
555
|
-
bspId: H256;
|
|
556
|
-
amountToTransfer: u128;
|
|
557
|
-
error: SpRuntimeDispatchError;
|
|
558
|
-
}
|
|
559
|
-
>;
|
|
560
|
-
/**
|
|
561
|
-
* Notifies that a file will be deleted.
|
|
562
|
-
**/
|
|
563
|
-
FileDeletionRequest: AugmentedEvent<
|
|
564
|
-
ApiType,
|
|
565
|
-
[
|
|
566
|
-
user: AccountId32,
|
|
567
|
-
fileKey: H256,
|
|
568
|
-
fileSize: u64,
|
|
569
|
-
bucketId: H256,
|
|
570
|
-
mspId: H256,
|
|
571
|
-
proofOfInclusion: bool
|
|
572
|
-
],
|
|
573
|
-
{
|
|
574
|
-
user: AccountId32;
|
|
575
|
-
fileKey: H256;
|
|
576
|
-
fileSize: u64;
|
|
577
|
-
bucketId: H256;
|
|
578
|
-
mspId: H256;
|
|
579
|
-
proofOfInclusion: bool;
|
|
580
|
-
}
|
|
581
|
-
>;
|
|
582
499
|
/**
|
|
583
500
|
* Notifies that a file deletion has been requested.
|
|
584
501
|
* Contains a signed intention that allows any actor to execute the actual deletion.
|
|
@@ -601,6 +518,20 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
601
518
|
* the file key from the BSPs and/or Bucket storing that file from their forest.
|
|
602
519
|
**/
|
|
603
520
|
IncompleteStorageRequest: AugmentedEvent<ApiType, [fileKey: H256], { fileKey: H256 }>;
|
|
521
|
+
/**
|
|
522
|
+
* Notifies that an incomplete storage request has been fully cleaned up.
|
|
523
|
+
*
|
|
524
|
+
* This event is emitted in two scenarios:
|
|
525
|
+
* 1. When an incomplete storage request is created but there are no providers to clean
|
|
526
|
+
* (e.g., MSP confirmed with inclusion proof and no BSPs confirmed).
|
|
527
|
+
* 2. When the file has been removed from all providers and the incomplete storage
|
|
528
|
+
* request entry is removed from storage.
|
|
529
|
+
**/
|
|
530
|
+
IncompleteStorageRequestCleanedUp: AugmentedEvent<
|
|
531
|
+
ApiType,
|
|
532
|
+
[fileKey: H256],
|
|
533
|
+
{ fileKey: H256 }
|
|
534
|
+
>;
|
|
604
535
|
/**
|
|
605
536
|
* Notifies that a bucket has been moved to a new MSP under a new value proposition.
|
|
606
537
|
**/
|
|
@@ -721,36 +652,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
721
652
|
expiresAt: u32;
|
|
722
653
|
}
|
|
723
654
|
>;
|
|
724
|
-
/**
|
|
725
|
-
* Notifies that a file key has been queued for a priority challenge for file deletion.
|
|
726
|
-
**/
|
|
727
|
-
PriorityChallengeForFileDeletionQueued: AugmentedEvent<
|
|
728
|
-
ApiType,
|
|
729
|
-
[issuer: PalletFileSystemEitherAccountIdOrMspId, fileKey: H256],
|
|
730
|
-
{ issuer: PalletFileSystemEitherAccountIdOrMspId; fileKey: H256 }
|
|
731
|
-
>;
|
|
732
|
-
/**
|
|
733
|
-
* Notifies that a proof has been submitted for a pending file deletion request.
|
|
734
|
-
**/
|
|
735
|
-
ProofSubmittedForPendingFileDeletionRequest: AugmentedEvent<
|
|
736
|
-
ApiType,
|
|
737
|
-
[
|
|
738
|
-
user: AccountId32,
|
|
739
|
-
fileKey: H256,
|
|
740
|
-
fileSize: u64,
|
|
741
|
-
bucketId: H256,
|
|
742
|
-
mspId: H256,
|
|
743
|
-
proofOfInclusion: bool
|
|
744
|
-
],
|
|
745
|
-
{
|
|
746
|
-
user: AccountId32;
|
|
747
|
-
fileKey: H256;
|
|
748
|
-
fileSize: u64;
|
|
749
|
-
bucketId: H256;
|
|
750
|
-
mspId: H256;
|
|
751
|
-
proofOfInclusion: bool;
|
|
752
|
-
}
|
|
753
|
-
>;
|
|
754
655
|
/**
|
|
755
656
|
* Notifies that a SP has stopped storing a file because its owner has become insolvent.
|
|
756
657
|
**/
|
|
@@ -423,11 +423,31 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
423
423
|
};
|
|
424
424
|
fileSystem: {
|
|
425
425
|
/**
|
|
426
|
-
* Executed by a BSP to confirm
|
|
426
|
+
* Executed by a BSP to confirm stopping storage of a file and remove it from their forest.
|
|
427
427
|
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
430
|
-
*
|
|
428
|
+
* This is the second step of the two-phase stop storing process. The BSP must have previously
|
|
429
|
+
* called [`bsp_request_stop_storing`] to open a pending stop storing request.
|
|
430
|
+
*
|
|
431
|
+
* A minimum waiting period ([`MinWaitForStopStoring`]) must pass between the request and this
|
|
432
|
+
* confirmation. This prevents a BSP from immediately dropping a file when challenged for it,
|
|
433
|
+
* ensuring they can't avoid slashing by quickly calling stop storing upon receiving a challenge.
|
|
434
|
+
*
|
|
435
|
+
* ## What this extrinsic does
|
|
436
|
+
*
|
|
437
|
+
* 1. Verifies the pending stop storing request exists and the minimum wait time has passed
|
|
438
|
+
* 2. Verifies the file is still in the BSP's forest via the inclusion proof
|
|
439
|
+
* 3. **Removes the file from the BSP's forest and updates their root**
|
|
440
|
+
* 4. Decreases the BSP's used capacity
|
|
441
|
+
* 5. Stops challenge/randomness cycles if the BSP has no more files
|
|
442
|
+
*
|
|
443
|
+
* Note: The payment stream was already updated in [`bsp_request_stop_storing`].
|
|
444
|
+
*
|
|
445
|
+
* ## Errors
|
|
446
|
+
*
|
|
447
|
+
* - [`PendingStopStoringRequestNotFound`]: No pending request exists for this BSP and file
|
|
448
|
+
* - [`MinWaitForStopStoringNotReached`]: The minimum waiting period hasn't passed yet
|
|
449
|
+
* - [`OperationNotAllowedWithInsolventUser`]: The file owner is insolvent (the BSP should use
|
|
450
|
+
* [`stop_storing_for_insolvent_user`] instead)
|
|
431
451
|
**/
|
|
432
452
|
bspConfirmStopStoring: AugmentedSubmittable<
|
|
433
453
|
(
|
|
@@ -464,12 +484,45 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
464
484
|
/**
|
|
465
485
|
* Executed by a BSP to request to stop storing a file.
|
|
466
486
|
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
*
|
|
471
|
-
* This
|
|
472
|
-
*
|
|
487
|
+
* This is the first step of a two-phase process for a BSP to voluntarily stop storing a file.
|
|
488
|
+
* The BSP must later call [`bsp_confirm_stop_storing`] after a minimum waiting period to
|
|
489
|
+
* complete the process and actually remove the file from their forest.
|
|
490
|
+
*
|
|
491
|
+
* **Important**: This extrinsic does NOT modify the BSP's forest root. The file remains in the
|
|
492
|
+
* BSP's forest until [`bsp_confirm_stop_storing`] is called.
|
|
493
|
+
*
|
|
494
|
+
* The BSP is required to provide the file metadata (bucket_id, location, owner, fingerprint, size)
|
|
495
|
+
* to reconstruct and verify the file key. The BSP can get this metadata from its file storage, but
|
|
496
|
+
* it providing it is not a proof that the BSP actually has the file, since this metadata can be obtained
|
|
497
|
+
* from the original storage request or from the assigned MSP if the storage request no longer exists.
|
|
498
|
+
*
|
|
499
|
+
* ## Behavior based on storage request state
|
|
500
|
+
*
|
|
501
|
+
* 1. **Storage request exists and BSP has confirmed storing it**: The BSP is removed from the
|
|
502
|
+
* storage request's confirmed and volunteered lists and the confirmed/volunteered counts are decremented.
|
|
503
|
+
* The BSP is also removed from the storage request as a data server.
|
|
504
|
+
*
|
|
505
|
+
* 2. **Storage request exists but BSP is not a volunteer**: The `bsps_required` count is
|
|
506
|
+
* incremented to compensate for the BSP leaving.
|
|
507
|
+
*
|
|
508
|
+
* 3. **No storage request exists**: A new storage request is created with `bsps_required = 1`
|
|
509
|
+
* so another BSP can pick up the file and maintain its replication target. If `can_serve` is true,
|
|
510
|
+
* the requesting BSP is added as a data server to help the new volunteer download the file.
|
|
511
|
+
*
|
|
512
|
+
* ## Fees
|
|
513
|
+
*
|
|
514
|
+
* The BSP is charged a penalty fee ([`BspStopStoringFilePenalty`]) which is transferred to the treasury.
|
|
515
|
+
*
|
|
516
|
+
* ## Payment Stream
|
|
517
|
+
*
|
|
518
|
+
* The payment stream with the file owner is **updated immediately** in this extrinsic (not in
|
|
519
|
+
* [`bsp_confirm_stop_storing`]). This removes any financial incentive for the BSP to delay or
|
|
520
|
+
* skip the confirmation, as they stop getting paid as soon as they announce their intent to stop storing.
|
|
521
|
+
*
|
|
522
|
+
* ## Restrictions
|
|
523
|
+
*
|
|
524
|
+
* This extrinsic will fail with [`FileHasIncompleteStorageRequest`] if an `IncompleteStorageRequest`
|
|
525
|
+
* exists for the file key. The BSP must wait until fisherman nodes clean up the incomplete request.
|
|
473
526
|
**/
|
|
474
527
|
bspRequestStopStoring: AugmentedSubmittable<
|
|
475
528
|
(
|
|
@@ -1401,6 +1401,7 @@ import type {
|
|
|
1401
1401
|
LoadFileInStorageResult,
|
|
1402
1402
|
MainStorageProviderId,
|
|
1403
1403
|
MerklePatriciaRoot,
|
|
1404
|
+
MspStorageRequestStatus,
|
|
1404
1405
|
Multiaddresses,
|
|
1405
1406
|
ProviderId,
|
|
1406
1407
|
QueryAvailableStorageCapacityError,
|
|
@@ -2137,6 +2138,7 @@ declare module "@polkadot/types/types/registry" {
|
|
|
2137
2138
|
MomentOf: MomentOf;
|
|
2138
2139
|
MoreAttestations: MoreAttestations;
|
|
2139
2140
|
MortalEra: MortalEra;
|
|
2141
|
+
MspStorageRequestStatus: MspStorageRequestStatus;
|
|
2140
2142
|
MultiAddress: MultiAddress;
|
|
2141
2143
|
Multiaddresses: Multiaddresses;
|
|
2142
2144
|
MultiAsset: MultiAsset;
|