@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
|
@@ -182,10 +182,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
182
182
|
[key: string]: AugmentedError<ApiType>;
|
|
183
183
|
};
|
|
184
184
|
fileSystem: {
|
|
185
|
-
/**
|
|
186
|
-
* BSP did not succeed threshold check.
|
|
187
|
-
**/
|
|
188
|
-
AboveThreshold: AugmentedError<ApiType>;
|
|
189
185
|
/**
|
|
190
186
|
* Batch file deletion must contain files from a single bucket only.
|
|
191
187
|
**/
|
|
@@ -194,18 +190,10 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
194
190
|
* BSP has already confirmed storing the given file.
|
|
195
191
|
**/
|
|
196
192
|
BspAlreadyConfirmed: AugmentedError<ApiType>;
|
|
197
|
-
/**
|
|
198
|
-
* BSP is already a data server for the move bucket request.
|
|
199
|
-
**/
|
|
200
|
-
BspAlreadyDataServer: AugmentedError<ApiType>;
|
|
201
193
|
/**
|
|
202
194
|
* BSP already volunteered to store the given file.
|
|
203
195
|
**/
|
|
204
196
|
BspAlreadyVolunteered: AugmentedError<ApiType>;
|
|
205
|
-
/**
|
|
206
|
-
* Too many registered data servers for the move bucket request.
|
|
207
|
-
**/
|
|
208
|
-
BspDataServersExceeded: AugmentedError<ApiType>;
|
|
209
197
|
/**
|
|
210
198
|
* BSP has not confirmed storing the given file.
|
|
211
199
|
**/
|
|
@@ -222,10 +210,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
222
210
|
* Action not allowed while the bucket is being moved.
|
|
223
211
|
**/
|
|
224
212
|
BucketIsBeingMoved: AugmentedError<ApiType>;
|
|
225
|
-
/**
|
|
226
|
-
* Bucket is not private. Call `update_bucket_privacy` to make it private.
|
|
227
|
-
**/
|
|
228
|
-
BucketIsNotPrivate: AugmentedError<ApiType>;
|
|
229
213
|
/**
|
|
230
214
|
* Bucket is not empty.
|
|
231
215
|
**/
|
|
@@ -242,10 +226,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
242
226
|
* Collection ID was not found.
|
|
243
227
|
**/
|
|
244
228
|
CollectionNotFound: AugmentedError<ApiType>;
|
|
245
|
-
/**
|
|
246
|
-
* Divided by 0
|
|
247
|
-
**/
|
|
248
|
-
DividedByZero: AugmentedError<ApiType>;
|
|
249
229
|
/**
|
|
250
230
|
* Duplicate file key detected within the same batch deletion request.
|
|
251
231
|
**/
|
|
@@ -270,18 +250,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
270
250
|
* Failed to create file metadata
|
|
271
251
|
**/
|
|
272
252
|
FailedToCreateFileMetadata: AugmentedError<ApiType>;
|
|
273
|
-
/**
|
|
274
|
-
* Failed to decode threshold.
|
|
275
|
-
**/
|
|
276
|
-
FailedToDecodeThreshold: AugmentedError<ApiType>;
|
|
277
|
-
/**
|
|
278
|
-
* Failed to encode BSP id as slice.
|
|
279
|
-
**/
|
|
280
|
-
FailedToEncodeBsp: AugmentedError<ApiType>;
|
|
281
|
-
/**
|
|
282
|
-
* Failed to encode fingerprint as slice.
|
|
283
|
-
**/
|
|
284
|
-
FailedToEncodeFingerprint: AugmentedError<ApiType>;
|
|
285
253
|
/**
|
|
286
254
|
* Failed to get owner account of ID of provider
|
|
287
255
|
**/
|
|
@@ -307,21 +275,14 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
307
275
|
**/
|
|
308
276
|
FailedToQueryEarliestFileVolunteerTick: AugmentedError<ApiType>;
|
|
309
277
|
/**
|
|
310
|
-
*
|
|
311
|
-
|
|
312
|
-
FailedTypeConversion: AugmentedError<ApiType>;
|
|
313
|
-
/**
|
|
314
|
-
* File key already pending deletion.
|
|
315
|
-
**/
|
|
316
|
-
FileKeyAlreadyPendingDeletion: AugmentedError<ApiType>;
|
|
317
|
-
/**
|
|
318
|
-
* File key computed from metadata doesn't match the provided file key.
|
|
278
|
+
* File has an active storage request and as such is not eligible for deletion.
|
|
279
|
+
* The user should use the `revoke_storage_request` extrinsic to revoke it first.
|
|
319
280
|
**/
|
|
320
|
-
|
|
281
|
+
FileHasActiveStorageRequest: AugmentedError<ApiType>;
|
|
321
282
|
/**
|
|
322
|
-
* File
|
|
283
|
+
* File has an `IncompleteStorageRequest` associated with it and as such is not eligible for a new storage request
|
|
323
284
|
**/
|
|
324
|
-
|
|
285
|
+
FileHasIncompleteStorageRequest: AugmentedError<ApiType>;
|
|
325
286
|
/**
|
|
326
287
|
* The bounded vector that holds file metadata to process it is full but there's still more to process.
|
|
327
288
|
**/
|
|
@@ -334,10 +295,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
334
295
|
* Failed to fetch the rate for the payment stream.
|
|
335
296
|
**/
|
|
336
297
|
FixedRatePaymentStreamNotFound: AugmentedError<ApiType>;
|
|
337
|
-
/**
|
|
338
|
-
* Forest proof verification failed.
|
|
339
|
-
**/
|
|
340
|
-
ForestProofVerificationFailed: AugmentedError<ApiType>;
|
|
341
298
|
/**
|
|
342
299
|
* Failed to get value when just checked it existed.
|
|
343
300
|
**/
|
|
@@ -346,10 +303,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
346
303
|
* Incomplete storage request not found.
|
|
347
304
|
**/
|
|
348
305
|
IncompleteStorageRequestNotFound: AugmentedError<ApiType>;
|
|
349
|
-
/**
|
|
350
|
-
* Key already exists in mapping when it should not.
|
|
351
|
-
**/
|
|
352
|
-
InconsistentStateKeyAlreadyExists: AugmentedError<ApiType>;
|
|
353
306
|
/**
|
|
354
307
|
* SP does not have enough storage capacity to store the file.
|
|
355
308
|
**/
|
|
@@ -374,23 +327,11 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
374
327
|
* Invalid signed operation provided.
|
|
375
328
|
**/
|
|
376
329
|
InvalidSignedOperation: AugmentedError<ApiType>;
|
|
377
|
-
/**
|
|
378
|
-
* Maximum threshold cannot be zero.
|
|
379
|
-
**/
|
|
380
|
-
MaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
381
|
-
/**
|
|
382
|
-
* Max replication target cannot be smaller than default replication target.
|
|
383
|
-
**/
|
|
384
|
-
MaxReplicationTargetSmallerThanDefault: AugmentedError<ApiType>;
|
|
385
330
|
/**
|
|
386
331
|
* Error created in 2024. If you see this, you are well beyond the singularity and should
|
|
387
332
|
* probably stop using this pallet.
|
|
388
333
|
**/
|
|
389
334
|
MaxTickNumberReached: AugmentedError<ApiType>;
|
|
390
|
-
/**
|
|
391
|
-
* Max number of user pending deletion requests reached.
|
|
392
|
-
**/
|
|
393
|
-
MaxUserPendingDeletionRequestsReached: AugmentedError<ApiType>;
|
|
394
335
|
/**
|
|
395
336
|
* Minimum amount of blocks between the request opening and being able to confirm it not reached.
|
|
396
337
|
**/
|
|
@@ -427,10 +368,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
427
368
|
* No global reputation weight set.
|
|
428
369
|
**/
|
|
429
370
|
NoGlobalReputationWeightSet: AugmentedError<ApiType>;
|
|
430
|
-
/**
|
|
431
|
-
* Privacy update results in no change
|
|
432
|
-
**/
|
|
433
|
-
NoPrivacyChange: AugmentedError<ApiType>;
|
|
434
371
|
/**
|
|
435
372
|
* Account is not a BSP.
|
|
436
373
|
**/
|
|
@@ -447,10 +384,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
447
384
|
* Operation failed because the account is not the owner of the bucket.
|
|
448
385
|
**/
|
|
449
386
|
NotBucketOwner: AugmentedError<ApiType>;
|
|
450
|
-
/**
|
|
451
|
-
* Unauthorized operation, signer does not own the file.
|
|
452
|
-
**/
|
|
453
|
-
NotFileOwner: AugmentedError<ApiType>;
|
|
454
387
|
/**
|
|
455
388
|
* The MSP is trying to confirm to store a file from a storage request is not the one selected to store it.
|
|
456
389
|
**/
|
|
@@ -459,10 +392,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
459
392
|
* Operations not allowed for insolvent provider
|
|
460
393
|
**/
|
|
461
394
|
OperationNotAllowedForInsolventProvider: AugmentedError<ApiType>;
|
|
462
|
-
/**
|
|
463
|
-
* Operations not allowed while bucket is not being stored by an MSP
|
|
464
|
-
**/
|
|
465
|
-
OperationNotAllowedWhileBucketIsNotStoredByMsp: AugmentedError<ApiType>;
|
|
466
395
|
/**
|
|
467
396
|
* Certain operations (such as issuing new storage requests) are not allowed when interacting with insolvent users.
|
|
468
397
|
**/
|
|
@@ -479,10 +408,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
479
408
|
* Provider is not storing the file.
|
|
480
409
|
**/
|
|
481
410
|
ProviderNotStoringFile: AugmentedError<ApiType>;
|
|
482
|
-
/**
|
|
483
|
-
* Root of the provider not found.
|
|
484
|
-
**/
|
|
485
|
-
ProviderRootNotFound: AugmentedError<ApiType>;
|
|
486
411
|
/**
|
|
487
412
|
* Replication target cannot be zero.
|
|
488
413
|
**/
|
|
@@ -511,10 +436,6 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
511
436
|
* Operation not allowed while the storage request exists.
|
|
512
437
|
**/
|
|
513
438
|
StorageRequestExists: AugmentedError<ApiType>;
|
|
514
|
-
/**
|
|
515
|
-
* No slot available found in ticks to insert storage request expiration time.
|
|
516
|
-
**/
|
|
517
|
-
StorageRequestExpiredNoSlotAvailable: AugmentedError<ApiType>;
|
|
518
439
|
/**
|
|
519
440
|
* Not authorized to delete the storage request.
|
|
520
441
|
**/
|
|
@@ -523,34 +444,14 @@ declare module "@polkadot/api-base/types/errors" {
|
|
|
523
444
|
* Storage request not registered for the given file.
|
|
524
445
|
**/
|
|
525
446
|
StorageRequestNotFound: AugmentedError<ApiType>;
|
|
526
|
-
/**
|
|
527
|
-
* Operation not allowed while the storage request is not being revoked.
|
|
528
|
-
**/
|
|
529
|
-
StorageRequestNotRevoked: AugmentedError<ApiType>;
|
|
530
447
|
/**
|
|
531
448
|
* Arithmetic error in threshold calculation.
|
|
532
449
|
**/
|
|
533
450
|
ThresholdArithmeticError: AugmentedError<ApiType>;
|
|
534
|
-
/**
|
|
535
|
-
* BSPs assignment threshold cannot be below asymptote.
|
|
536
|
-
**/
|
|
537
|
-
ThresholdBelowAsymptote: AugmentedError<ApiType>;
|
|
538
|
-
/**
|
|
539
|
-
* Tick range to maximum threshold cannot be zero.
|
|
540
|
-
**/
|
|
541
|
-
TickRangeToMaximumThresholdCannotBeZero: AugmentedError<ApiType>;
|
|
542
|
-
/**
|
|
543
|
-
* Too many batch responses to process.
|
|
544
|
-
**/
|
|
545
|
-
TooManyBatchResponses: AugmentedError<ApiType>;
|
|
546
451
|
/**
|
|
547
452
|
* Too many storage request responses.
|
|
548
453
|
**/
|
|
549
454
|
TooManyStorageRequestResponses: AugmentedError<ApiType>;
|
|
550
|
-
/**
|
|
551
|
-
* Number of removed BSPs volunteered from storage request prefix did not match the expected number.
|
|
552
|
-
**/
|
|
553
|
-
UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
|
|
554
455
|
/**
|
|
555
456
|
* A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
|
|
556
457
|
**/
|
|
@@ -26,7 +26,6 @@ import type {
|
|
|
26
26
|
FpAccountEthereumSignature,
|
|
27
27
|
FrameSupportTokensMiscBalanceStatus,
|
|
28
28
|
FrameSystemDispatchEventInfo,
|
|
29
|
-
PalletFileSystemEitherAccountIdOrMspId,
|
|
30
29
|
PalletFileSystemFileOperationIntention,
|
|
31
30
|
PalletFileSystemRejectedStorageRequestReason,
|
|
32
31
|
PalletNftsAttributeNamespace,
|
|
@@ -427,45 +426,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
427
426
|
[who: AccountId20, bucketId: H256, collectionId: Option<u32>, private: bool],
|
|
428
427
|
{ who: AccountId20; bucketId: H256; collectionId: Option<u32>; private: bool }
|
|
429
428
|
>;
|
|
430
|
-
/**
|
|
431
|
-
* Failed to decrease MSP's used capacity for expired file deletion request
|
|
432
|
-
**/
|
|
433
|
-
FailedToDecreaseMspUsedCapacity: AugmentedEvent<
|
|
434
|
-
ApiType,
|
|
435
|
-
[
|
|
436
|
-
user: AccountId20,
|
|
437
|
-
mspId: H256,
|
|
438
|
-
fileKey: H256,
|
|
439
|
-
fileSize: u64,
|
|
440
|
-
error: SpRuntimeDispatchError
|
|
441
|
-
],
|
|
442
|
-
{
|
|
443
|
-
user: AccountId20;
|
|
444
|
-
mspId: H256;
|
|
445
|
-
fileKey: H256;
|
|
446
|
-
fileSize: u64;
|
|
447
|
-
error: SpRuntimeDispatchError;
|
|
448
|
-
}
|
|
449
|
-
>;
|
|
450
|
-
/**
|
|
451
|
-
* Failed to get the MSP owner of the bucket for an expired file deletion request
|
|
452
|
-
* This is different from the bucket not having a MSP, which is allowed and won't error
|
|
453
|
-
**/
|
|
454
|
-
FailedToGetMspOfBucket: AugmentedEvent<
|
|
455
|
-
ApiType,
|
|
456
|
-
[bucketId: H256, error: SpRuntimeDispatchError],
|
|
457
|
-
{ bucketId: H256; error: SpRuntimeDispatchError }
|
|
458
|
-
>;
|
|
459
|
-
/**
|
|
460
|
-
* Notifies that a priority challenge with a trie remove mutation failed to be queued in the `on_idle` hook.
|
|
461
|
-
* This can happen if the priority challenge queue is full, and the failed challenge should be manually
|
|
462
|
-
* queued at a later time.
|
|
463
|
-
**/
|
|
464
|
-
FailedToQueuePriorityChallenge: AugmentedEvent<
|
|
465
|
-
ApiType,
|
|
466
|
-
[fileKey: H256, error: SpRuntimeDispatchError],
|
|
467
|
-
{ fileKey: H256; error: SpRuntimeDispatchError }
|
|
468
|
-
>;
|
|
469
429
|
/**
|
|
470
430
|
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
471
431
|
* the return of that storage request's deposit to the user failed.
|
|
@@ -475,49 +435,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
475
435
|
[fileKey: H256, owner: AccountId20, amountToReturn: u128, error: SpRuntimeDispatchError],
|
|
476
436
|
{ fileKey: H256; owner: AccountId20; amountToReturn: u128; error: SpRuntimeDispatchError }
|
|
477
437
|
>;
|
|
478
|
-
/**
|
|
479
|
-
* Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
|
|
480
|
-
* the transfer of a part of that storage request's deposit to one of the volunteered BSPs failed.
|
|
481
|
-
**/
|
|
482
|
-
FailedToTransferDepositFundsToBsp: AugmentedEvent<
|
|
483
|
-
ApiType,
|
|
484
|
-
[
|
|
485
|
-
fileKey: H256,
|
|
486
|
-
owner: AccountId20,
|
|
487
|
-
bspId: H256,
|
|
488
|
-
amountToTransfer: u128,
|
|
489
|
-
error: SpRuntimeDispatchError
|
|
490
|
-
],
|
|
491
|
-
{
|
|
492
|
-
fileKey: H256;
|
|
493
|
-
owner: AccountId20;
|
|
494
|
-
bspId: H256;
|
|
495
|
-
amountToTransfer: u128;
|
|
496
|
-
error: SpRuntimeDispatchError;
|
|
497
|
-
}
|
|
498
|
-
>;
|
|
499
|
-
/**
|
|
500
|
-
* Notifies that a file will be deleted.
|
|
501
|
-
**/
|
|
502
|
-
FileDeletionRequest: AugmentedEvent<
|
|
503
|
-
ApiType,
|
|
504
|
-
[
|
|
505
|
-
user: AccountId20,
|
|
506
|
-
fileKey: H256,
|
|
507
|
-
fileSize: u64,
|
|
508
|
-
bucketId: H256,
|
|
509
|
-
mspId: H256,
|
|
510
|
-
proofOfInclusion: bool
|
|
511
|
-
],
|
|
512
|
-
{
|
|
513
|
-
user: AccountId20;
|
|
514
|
-
fileKey: H256;
|
|
515
|
-
fileSize: u64;
|
|
516
|
-
bucketId: H256;
|
|
517
|
-
mspId: H256;
|
|
518
|
-
proofOfInclusion: bool;
|
|
519
|
-
}
|
|
520
|
-
>;
|
|
521
438
|
/**
|
|
522
439
|
* Notifies that a file deletion has been requested.
|
|
523
440
|
* Contains a signed intention that allows any actor to execute the actual deletion.
|
|
@@ -540,6 +457,20 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
540
457
|
* the file key from the BSPs and/or Bucket storing that file from their forest.
|
|
541
458
|
**/
|
|
542
459
|
IncompleteStorageRequest: AugmentedEvent<ApiType, [fileKey: H256], { fileKey: H256 }>;
|
|
460
|
+
/**
|
|
461
|
+
* Notifies that an incomplete storage request has been fully cleaned up.
|
|
462
|
+
*
|
|
463
|
+
* This event is emitted in two scenarios:
|
|
464
|
+
* 1. When an incomplete storage request is created but there are no providers to clean
|
|
465
|
+
* (e.g., MSP confirmed with inclusion proof and no BSPs confirmed).
|
|
466
|
+
* 2. When the file has been removed from all providers and the incomplete storage
|
|
467
|
+
* request entry is removed from storage.
|
|
468
|
+
**/
|
|
469
|
+
IncompleteStorageRequestCleanedUp: AugmentedEvent<
|
|
470
|
+
ApiType,
|
|
471
|
+
[fileKey: H256],
|
|
472
|
+
{ fileKey: H256 }
|
|
473
|
+
>;
|
|
543
474
|
/**
|
|
544
475
|
* Notifies that a bucket has been moved to a new MSP under a new value proposition.
|
|
545
476
|
**/
|
|
@@ -660,36 +591,6 @@ declare module "@polkadot/api-base/types/events" {
|
|
|
660
591
|
expiresAt: u32;
|
|
661
592
|
}
|
|
662
593
|
>;
|
|
663
|
-
/**
|
|
664
|
-
* Notifies that a file key has been queued for a priority challenge for file deletion.
|
|
665
|
-
**/
|
|
666
|
-
PriorityChallengeForFileDeletionQueued: AugmentedEvent<
|
|
667
|
-
ApiType,
|
|
668
|
-
[issuer: PalletFileSystemEitherAccountIdOrMspId, fileKey: H256],
|
|
669
|
-
{ issuer: PalletFileSystemEitherAccountIdOrMspId; fileKey: H256 }
|
|
670
|
-
>;
|
|
671
|
-
/**
|
|
672
|
-
* Notifies that a proof has been submitted for a pending file deletion request.
|
|
673
|
-
**/
|
|
674
|
-
ProofSubmittedForPendingFileDeletionRequest: AugmentedEvent<
|
|
675
|
-
ApiType,
|
|
676
|
-
[
|
|
677
|
-
user: AccountId20,
|
|
678
|
-
fileKey: H256,
|
|
679
|
-
fileSize: u64,
|
|
680
|
-
bucketId: H256,
|
|
681
|
-
mspId: H256,
|
|
682
|
-
proofOfInclusion: bool
|
|
683
|
-
],
|
|
684
|
-
{
|
|
685
|
-
user: AccountId20;
|
|
686
|
-
fileKey: H256;
|
|
687
|
-
fileSize: u64;
|
|
688
|
-
bucketId: H256;
|
|
689
|
-
mspId: H256;
|
|
690
|
-
proofOfInclusion: bool;
|
|
691
|
-
}
|
|
692
|
-
>;
|
|
693
594
|
/**
|
|
694
595
|
* Notifies that a SP has stopped storing a file because its owner has become insolvent.
|
|
695
596
|
**/
|
|
@@ -422,11 +422,31 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
422
422
|
};
|
|
423
423
|
fileSystem: {
|
|
424
424
|
/**
|
|
425
|
-
* Executed by a BSP to confirm
|
|
425
|
+
* Executed by a BSP to confirm stopping storage of a file and remove it from their forest.
|
|
426
426
|
*
|
|
427
|
-
*
|
|
428
|
-
*
|
|
429
|
-
*
|
|
427
|
+
* This is the second step of the two-phase stop storing process. The BSP must have previously
|
|
428
|
+
* called [`bsp_request_stop_storing`] to open a pending stop storing request.
|
|
429
|
+
*
|
|
430
|
+
* A minimum waiting period ([`MinWaitForStopStoring`]) must pass between the request and this
|
|
431
|
+
* confirmation. This prevents a BSP from immediately dropping a file when challenged for it,
|
|
432
|
+
* ensuring they can't avoid slashing by quickly calling stop storing upon receiving a challenge.
|
|
433
|
+
*
|
|
434
|
+
* ## What this extrinsic does
|
|
435
|
+
*
|
|
436
|
+
* 1. Verifies the pending stop storing request exists and the minimum wait time has passed
|
|
437
|
+
* 2. Verifies the file is still in the BSP's forest via the inclusion proof
|
|
438
|
+
* 3. **Removes the file from the BSP's forest and updates their root**
|
|
439
|
+
* 4. Decreases the BSP's used capacity
|
|
440
|
+
* 5. Stops challenge/randomness cycles if the BSP has no more files
|
|
441
|
+
*
|
|
442
|
+
* Note: The payment stream was already updated in [`bsp_request_stop_storing`].
|
|
443
|
+
*
|
|
444
|
+
* ## Errors
|
|
445
|
+
*
|
|
446
|
+
* - [`PendingStopStoringRequestNotFound`]: No pending request exists for this BSP and file
|
|
447
|
+
* - [`MinWaitForStopStoringNotReached`]: The minimum waiting period hasn't passed yet
|
|
448
|
+
* - [`OperationNotAllowedWithInsolventUser`]: The file owner is insolvent (the BSP should use
|
|
449
|
+
* [`stop_storing_for_insolvent_user`] instead)
|
|
430
450
|
**/
|
|
431
451
|
bspConfirmStopStoring: AugmentedSubmittable<
|
|
432
452
|
(
|
|
@@ -463,12 +483,45 @@ declare module "@polkadot/api-base/types/submittable" {
|
|
|
463
483
|
/**
|
|
464
484
|
* Executed by a BSP to request to stop storing a file.
|
|
465
485
|
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
468
|
-
*
|
|
469
|
-
*
|
|
470
|
-
* This
|
|
471
|
-
*
|
|
486
|
+
* This is the first step of a two-phase process for a BSP to voluntarily stop storing a file.
|
|
487
|
+
* The BSP must later call [`bsp_confirm_stop_storing`] after a minimum waiting period to
|
|
488
|
+
* complete the process and actually remove the file from their forest.
|
|
489
|
+
*
|
|
490
|
+
* **Important**: This extrinsic does NOT modify the BSP's forest root. The file remains in the
|
|
491
|
+
* BSP's forest until [`bsp_confirm_stop_storing`] is called.
|
|
492
|
+
*
|
|
493
|
+
* The BSP is required to provide the file metadata (bucket_id, location, owner, fingerprint, size)
|
|
494
|
+
* to reconstruct and verify the file key. The BSP can get this metadata from its file storage, but
|
|
495
|
+
* it providing it is not a proof that the BSP actually has the file, since this metadata can be obtained
|
|
496
|
+
* from the original storage request or from the assigned MSP if the storage request no longer exists.
|
|
497
|
+
*
|
|
498
|
+
* ## Behavior based on storage request state
|
|
499
|
+
*
|
|
500
|
+
* 1. **Storage request exists and BSP has confirmed storing it**: The BSP is removed from the
|
|
501
|
+
* storage request's confirmed and volunteered lists and the confirmed/volunteered counts are decremented.
|
|
502
|
+
* The BSP is also removed from the storage request as a data server.
|
|
503
|
+
*
|
|
504
|
+
* 2. **Storage request exists but BSP is not a volunteer**: The `bsps_required` count is
|
|
505
|
+
* incremented to compensate for the BSP leaving.
|
|
506
|
+
*
|
|
507
|
+
* 3. **No storage request exists**: A new storage request is created with `bsps_required = 1`
|
|
508
|
+
* so another BSP can pick up the file and maintain its replication target. If `can_serve` is true,
|
|
509
|
+
* the requesting BSP is added as a data server to help the new volunteer download the file.
|
|
510
|
+
*
|
|
511
|
+
* ## Fees
|
|
512
|
+
*
|
|
513
|
+
* The BSP is charged a penalty fee ([`BspStopStoringFilePenalty`]) which is transferred to the treasury.
|
|
514
|
+
*
|
|
515
|
+
* ## Payment Stream
|
|
516
|
+
*
|
|
517
|
+
* The payment stream with the file owner is **updated immediately** in this extrinsic (not in
|
|
518
|
+
* [`bsp_confirm_stop_storing`]). This removes any financial incentive for the BSP to delay or
|
|
519
|
+
* skip the confirmation, as they stop getting paid as soon as they announce their intent to stop storing.
|
|
520
|
+
*
|
|
521
|
+
* ## Restrictions
|
|
522
|
+
*
|
|
523
|
+
* This extrinsic will fail with [`FileHasIncompleteStorageRequest`] if an `IncompleteStorageRequest`
|
|
524
|
+
* exists for the file key. The BSP must wait until fisherman nodes clean up the incomplete request.
|
|
472
525
|
**/
|
|
473
526
|
bspRequestStopStoring: AugmentedSubmittable<
|
|
474
527
|
(
|
|
@@ -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;
|