@storagehub/api-augment 0.2.11 → 0.4.0

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 (50) hide show
  1. package/dist/parachain/interfaces/lookup.js +160 -213
  2. package/dist/parachain/interfaces/lookup.js.map +1 -1
  3. package/dist/parachain/interfaces/storagehubclient/runtime.js +5 -0
  4. package/dist/parachain/interfaces/storagehubclient/runtime.js.map +1 -1
  5. package/dist/solochain-evm/interfaces/lookup.js +290 -343
  6. package/dist/solochain-evm/interfaces/lookup.js.map +1 -1
  7. package/dist/types/parachain/interfaces/augment-api-errors.d.ts +4 -108
  8. package/dist/types/parachain/interfaces/augment-api-events.d.ts +25 -103
  9. package/dist/types/parachain/interfaces/augment-api-query.d.ts +11 -0
  10. package/dist/types/parachain/interfaces/augment-api-runtime.d.ts +8 -0
  11. package/dist/types/parachain/interfaces/augment-api-tx.d.ts +75 -10
  12. package/dist/types/parachain/interfaces/augment-types.d.ts +2 -1
  13. package/dist/types/parachain/interfaces/lookup.d.ts +118 -145
  14. package/dist/types/parachain/interfaces/registry.d.ts +2 -2
  15. package/dist/types/parachain/interfaces/storagehubclient/types.d.ts +14 -4
  16. package/dist/types/parachain/interfaces/types-lookup.d.ts +175 -234
  17. package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +4 -108
  18. package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +25 -103
  19. package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +11 -0
  20. package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +8 -0
  21. package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +75 -10
  22. package/dist/types/solochain-evm/interfaces/augment-types.d.ts +2 -1
  23. package/dist/types/solochain-evm/interfaces/lookup.d.ts +248 -275
  24. package/dist/types/solochain-evm/interfaces/registry.d.ts +2 -2
  25. package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +14 -4
  26. package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +305 -364
  27. package/metadata-sh-parachain.json +1 -1
  28. package/metadata-sh-solochain-evm.json +1 -1
  29. package/package.json +2 -2
  30. package/src/parachain/interfaces/augment-api-errors.ts +4 -108
  31. package/src/parachain/interfaces/augment-api-events.ts +22 -113
  32. package/src/parachain/interfaces/augment-api-query.ts +12 -0
  33. package/src/parachain/interfaces/augment-api-runtime.ts +14 -0
  34. package/src/parachain/interfaces/augment-api-tx.ts +76 -10
  35. package/src/parachain/interfaces/augment-types.ts +2 -0
  36. package/src/parachain/interfaces/lookup.ts +160 -213
  37. package/src/parachain/interfaces/registry.ts +2 -2
  38. package/src/parachain/interfaces/storagehubclient/runtime.ts +5 -0
  39. package/src/parachain/interfaces/storagehubclient/types.ts +14 -4
  40. package/src/parachain/interfaces/types-lookup.ts +225 -314
  41. package/src/solochain-evm/interfaces/augment-api-errors.ts +4 -108
  42. package/src/solochain-evm/interfaces/augment-api-events.ts +22 -113
  43. package/src/solochain-evm/interfaces/augment-api-query.ts +12 -0
  44. package/src/solochain-evm/interfaces/augment-api-runtime.ts +14 -0
  45. package/src/solochain-evm/interfaces/augment-api-tx.ts +76 -10
  46. package/src/solochain-evm/interfaces/augment-types.ts +2 -0
  47. package/src/solochain-evm/interfaces/lookup.ts +290 -343
  48. package/src/solochain-evm/interfaces/registry.ts +2 -2
  49. package/src/solochain-evm/interfaces/storagehubclient/types.ts +14 -4
  50. package/src/solochain-evm/interfaces/types-lookup.ts +355 -444
@@ -174,10 +174,6 @@ declare module "@polkadot/api-base/types/errors" {
174
174
  [key: string]: AugmentedError<ApiType>;
175
175
  };
176
176
  fileSystem: {
177
- /**
178
- * BSP did not succeed threshold check.
179
- **/
180
- AboveThreshold: AugmentedError<ApiType>;
181
177
  /**
182
178
  * Batch file deletion must contain files from a single bucket only.
183
179
  **/
@@ -186,18 +182,10 @@ declare module "@polkadot/api-base/types/errors" {
186
182
  * BSP has already confirmed storing the given file.
187
183
  **/
188
184
  BspAlreadyConfirmed: AugmentedError<ApiType>;
189
- /**
190
- * BSP is already a data server for the move bucket request.
191
- **/
192
- BspAlreadyDataServer: AugmentedError<ApiType>;
193
185
  /**
194
186
  * BSP already volunteered to store the given file.
195
187
  **/
196
188
  BspAlreadyVolunteered: AugmentedError<ApiType>;
197
- /**
198
- * Too many registered data servers for the move bucket request.
199
- **/
200
- BspDataServersExceeded: AugmentedError<ApiType>;
201
189
  /**
202
190
  * BSP has not confirmed storing the given file.
203
191
  **/
@@ -214,10 +202,6 @@ declare module "@polkadot/api-base/types/errors" {
214
202
  * Action not allowed while the bucket is being moved.
215
203
  **/
216
204
  BucketIsBeingMoved: AugmentedError<ApiType>;
217
- /**
218
- * Bucket is not private. Call `update_bucket_privacy` to make it private.
219
- **/
220
- BucketIsNotPrivate: AugmentedError<ApiType>;
221
205
  /**
222
206
  * Bucket is not empty.
223
207
  **/
@@ -234,10 +218,6 @@ declare module "@polkadot/api-base/types/errors" {
234
218
  * Collection ID was not found.
235
219
  **/
236
220
  CollectionNotFound: AugmentedError<ApiType>;
237
- /**
238
- * Divided by 0
239
- **/
240
- DividedByZero: AugmentedError<ApiType>;
241
221
  /**
242
222
  * Duplicate file key detected within the same batch deletion request.
243
223
  **/
@@ -262,18 +242,6 @@ declare module "@polkadot/api-base/types/errors" {
262
242
  * Failed to create file metadata
263
243
  **/
264
244
  FailedToCreateFileMetadata: AugmentedError<ApiType>;
265
- /**
266
- * Failed to decode threshold.
267
- **/
268
- FailedToDecodeThreshold: AugmentedError<ApiType>;
269
- /**
270
- * Failed to encode BSP id as slice.
271
- **/
272
- FailedToEncodeBsp: AugmentedError<ApiType>;
273
- /**
274
- * Failed to encode fingerprint as slice.
275
- **/
276
- FailedToEncodeFingerprint: AugmentedError<ApiType>;
277
245
  /**
278
246
  * Failed to get owner account of ID of provider
279
247
  **/
@@ -298,10 +266,6 @@ declare module "@polkadot/api-base/types/errors" {
298
266
  * Failed to query earliest volunteer tick
299
267
  **/
300
268
  FailedToQueryEarliestFileVolunteerTick: AugmentedError<ApiType>;
301
- /**
302
- * Failed to convert to primitive type.
303
- **/
304
- FailedTypeConversion: AugmentedError<ApiType>;
305
269
  /**
306
270
  * File has an active storage request and as such is not eligible for deletion.
307
271
  * The user should use the `revoke_storage_request` extrinsic to revoke it first.
@@ -311,18 +275,6 @@ declare module "@polkadot/api-base/types/errors" {
311
275
  * File has an `IncompleteStorageRequest` associated with it and as such is not eligible for a new storage request
312
276
  **/
313
277
  FileHasIncompleteStorageRequest: AugmentedError<ApiType>;
314
- /**
315
- * File key already pending deletion.
316
- **/
317
- FileKeyAlreadyPendingDeletion: AugmentedError<ApiType>;
318
- /**
319
- * File key computed from metadata doesn't match the provided file key.
320
- **/
321
- FileKeyMismatch: AugmentedError<ApiType>;
322
- /**
323
- * File key not found in pending deletion requests.
324
- **/
325
- FileKeyNotPendingDeletion: AugmentedError<ApiType>;
326
278
  /**
327
279
  * The bounded vector that holds file metadata to process it is full but there's still more to process.
328
280
  **/
@@ -335,10 +287,6 @@ declare module "@polkadot/api-base/types/errors" {
335
287
  * Failed to fetch the rate for the payment stream.
336
288
  **/
337
289
  FixedRatePaymentStreamNotFound: AugmentedError<ApiType>;
338
- /**
339
- * Forest proof verification failed.
340
- **/
341
- ForestProofVerificationFailed: AugmentedError<ApiType>;
342
290
  /**
343
291
  * Failed to get value when just checked it existed.
344
292
  **/
@@ -347,10 +295,6 @@ declare module "@polkadot/api-base/types/errors" {
347
295
  * Incomplete storage request not found.
348
296
  **/
349
297
  IncompleteStorageRequestNotFound: AugmentedError<ApiType>;
350
- /**
351
- * Key already exists in mapping when it should not.
352
- **/
353
- InconsistentStateKeyAlreadyExists: AugmentedError<ApiType>;
354
298
  /**
355
299
  * SP does not have enough storage capacity to store the file.
356
300
  **/
@@ -375,23 +319,11 @@ declare module "@polkadot/api-base/types/errors" {
375
319
  * Invalid signed operation provided.
376
320
  **/
377
321
  InvalidSignedOperation: AugmentedError<ApiType>;
378
- /**
379
- * Maximum threshold cannot be zero.
380
- **/
381
- MaximumThresholdCannotBeZero: AugmentedError<ApiType>;
382
- /**
383
- * Max replication target cannot be smaller than default replication target.
384
- **/
385
- MaxReplicationTargetSmallerThanDefault: AugmentedError<ApiType>;
386
322
  /**
387
323
  * Error created in 2024. If you see this, you are well beyond the singularity and should
388
324
  * probably stop using this pallet.
389
325
  **/
390
326
  MaxTickNumberReached: AugmentedError<ApiType>;
391
- /**
392
- * Max number of user pending deletion requests reached.
393
- **/
394
- MaxUserPendingDeletionRequestsReached: AugmentedError<ApiType>;
395
327
  /**
396
328
  * Minimum amount of blocks between the request opening and being able to confirm it not reached.
397
329
  **/
@@ -428,10 +360,6 @@ declare module "@polkadot/api-base/types/errors" {
428
360
  * No global reputation weight set.
429
361
  **/
430
362
  NoGlobalReputationWeightSet: AugmentedError<ApiType>;
431
- /**
432
- * Privacy update results in no change
433
- **/
434
- NoPrivacyChange: AugmentedError<ApiType>;
435
363
  /**
436
364
  * Account is not a BSP.
437
365
  **/
@@ -448,10 +376,6 @@ declare module "@polkadot/api-base/types/errors" {
448
376
  * Operation failed because the account is not the owner of the bucket.
449
377
  **/
450
378
  NotBucketOwner: AugmentedError<ApiType>;
451
- /**
452
- * Unauthorized operation, signer does not own the file.
453
- **/
454
- NotFileOwner: AugmentedError<ApiType>;
455
379
  /**
456
380
  * The MSP is trying to confirm to store a file from a storage request is not the one selected to store it.
457
381
  **/
@@ -460,10 +384,6 @@ declare module "@polkadot/api-base/types/errors" {
460
384
  * Operations not allowed for insolvent provider
461
385
  **/
462
386
  OperationNotAllowedForInsolventProvider: AugmentedError<ApiType>;
463
- /**
464
- * Operations not allowed while bucket is not being stored by an MSP
465
- **/
466
- OperationNotAllowedWhileBucketIsNotStoredByMsp: AugmentedError<ApiType>;
467
387
  /**
468
388
  * Certain operations (such as issuing new storage requests) are not allowed when interacting with insolvent users.
469
389
  **/
@@ -480,10 +400,6 @@ declare module "@polkadot/api-base/types/errors" {
480
400
  * Provider is not storing the file.
481
401
  **/
482
402
  ProviderNotStoringFile: AugmentedError<ApiType>;
483
- /**
484
- * Root of the provider not found.
485
- **/
486
- ProviderRootNotFound: AugmentedError<ApiType>;
487
403
  /**
488
404
  * Replication target cannot be zero.
489
405
  **/
@@ -512,10 +428,6 @@ declare module "@polkadot/api-base/types/errors" {
512
428
  * Operation not allowed while the storage request exists.
513
429
  **/
514
430
  StorageRequestExists: AugmentedError<ApiType>;
515
- /**
516
- * No slot available found in ticks to insert storage request expiration time.
517
- **/
518
- StorageRequestExpiredNoSlotAvailable: AugmentedError<ApiType>;
519
431
  /**
520
432
  * Not authorized to delete the storage request.
521
433
  **/
@@ -524,38 +436,22 @@ declare module "@polkadot/api-base/types/errors" {
524
436
  * Storage request not registered for the given file.
525
437
  **/
526
438
  StorageRequestNotFound: AugmentedError<ApiType>;
527
- /**
528
- * Operation not allowed while the storage request is not being revoked.
529
- **/
530
- StorageRequestNotRevoked: AugmentedError<ApiType>;
531
439
  /**
532
440
  * Arithmetic error in threshold calculation.
533
441
  **/
534
442
  ThresholdArithmeticError: AugmentedError<ApiType>;
535
- /**
536
- * BSPs assignment threshold cannot be below asymptote.
537
- **/
538
- ThresholdBelowAsymptote: AugmentedError<ApiType>;
539
- /**
540
- * Tick range to maximum threshold cannot be zero.
541
- **/
542
- TickRangeToMaximumThresholdCannotBeZero: AugmentedError<ApiType>;
543
- /**
544
- * Too many batch responses to process.
545
- **/
546
- TooManyBatchResponses: AugmentedError<ApiType>;
547
443
  /**
548
444
  * Too many storage request responses.
549
445
  **/
550
446
  TooManyStorageRequestResponses: AugmentedError<ApiType>;
551
- /**
552
- * Number of removed BSPs volunteered from storage request prefix did not match the expected number.
553
- **/
554
- UnexpectedNumberOfRemovedVolunteeredBsps: AugmentedError<ApiType>;
555
447
  /**
556
448
  * A SP tried to stop storing files from a user that was supposedly insolvent, but the user is not insolvent.
557
449
  **/
558
450
  UserNotInsolvent: AugmentedError<ApiType>;
451
+ /**
452
+ * Operation is currently paused.
453
+ **/
454
+ UserOperationPaused: AugmentedError<ApiType>;
559
455
  /**
560
456
  * The selected value proposition is not available in the MSP.
561
457
  **/
@@ -3,7 +3,7 @@ import type { ApiTypes, AugmentedEvent } from "@polkadot/api-base/types";
3
3
  import type { Bytes, Null, Option, Result, U8aFixed, Vec, bool, u128, u32, u64 } from "@polkadot/types-codec";
4
4
  import type { ITuple } from "@polkadot/types-codec/types";
5
5
  import type { AccountId20, H160, H256 } from "@polkadot/types/interfaces/runtime";
6
- import type { EthereumLog, EvmCoreErrorExitReason, FpAccountEthereumSignature, FrameSupportTokensMiscBalanceStatus, FrameSystemDispatchEventInfo, PalletFileSystemEitherAccountIdOrMspId, PalletFileSystemFileOperationIntention, PalletFileSystemRejectedStorageRequestReason, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletProofsDealerCustomChallenge, PalletProofsDealerProof, PalletStorageProvidersStorageProviderId, PalletStorageProvidersTopUpMetadata, PalletStorageProvidersValueProposition, PalletStorageProvidersValuePropositionWithId, ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParametersKey, ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParametersValue, ShpFileMetadataFileMetadata, ShpTraitsTrieMutation, SpConsensusGrandpaAppPublic, SpRuntimeDispatchError } from "@polkadot/types/lookup";
6
+ import type { EthereumLog, EvmCoreErrorExitReason, FpAccountEthereumSignature, FrameSupportTokensMiscBalanceStatus, FrameSystemDispatchEventInfo, PalletFileSystemFileOperationIntention, PalletFileSystemRejectedStorageRequestReason, PalletNftsAttributeNamespace, PalletNftsPalletAttributes, PalletNftsPriceWithDirection, PalletProofsDealerCustomChallenge, PalletProofsDealerProof, PalletStorageProvidersStorageProviderId, PalletStorageProvidersTopUpMetadata, PalletStorageProvidersValueProposition, PalletStorageProvidersValuePropositionWithId, ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParametersKey, ShSolochainEvmRuntimeConfigsRuntimeParamsRuntimeParametersValue, ShpFileMetadataFileMetadata, ShpTraitsTrieMutation, SpConsensusGrandpaAppPublic, SpRuntimeDispatchError } from "@polkadot/types/lookup";
7
7
  export type __AugmentedEvent<ApiType extends ApiTypes> = AugmentedEvent<ApiType>;
8
8
  declare module "@polkadot/api-base/types/events" {
9
9
  interface AugmentedEvents<ApiType extends ApiTypes> {
@@ -458,45 +458,6 @@ declare module "@polkadot/api-base/types/events" {
458
458
  collectionId: Option<u32>;
459
459
  private: bool;
460
460
  }>;
461
- /**
462
- * Failed to decrease MSP's used capacity for expired file deletion request
463
- **/
464
- FailedToDecreaseMspUsedCapacity: AugmentedEvent<ApiType, [
465
- user: AccountId20,
466
- mspId: H256,
467
- fileKey: H256,
468
- fileSize: u64,
469
- error: SpRuntimeDispatchError
470
- ], {
471
- user: AccountId20;
472
- mspId: H256;
473
- fileKey: H256;
474
- fileSize: u64;
475
- error: SpRuntimeDispatchError;
476
- }>;
477
- /**
478
- * Failed to get the MSP owner of the bucket for an expired file deletion request
479
- * This is different from the bucket not having a MSP, which is allowed and won't error
480
- **/
481
- FailedToGetMspOfBucket: AugmentedEvent<ApiType, [
482
- bucketId: H256,
483
- error: SpRuntimeDispatchError
484
- ], {
485
- bucketId: H256;
486
- error: SpRuntimeDispatchError;
487
- }>;
488
- /**
489
- * Notifies that a priority challenge with a trie remove mutation failed to be queued in the `on_idle` hook.
490
- * This can happen if the priority challenge queue is full, and the failed challenge should be manually
491
- * queued at a later time.
492
- **/
493
- FailedToQueuePriorityChallenge: AugmentedEvent<ApiType, [
494
- fileKey: H256,
495
- error: SpRuntimeDispatchError
496
- ], {
497
- fileKey: H256;
498
- error: SpRuntimeDispatchError;
499
- }>;
500
461
  /**
501
462
  * Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
502
463
  * the return of that storage request's deposit to the user failed.
@@ -512,41 +473,6 @@ declare module "@polkadot/api-base/types/events" {
512
473
  amountToReturn: u128;
513
474
  error: SpRuntimeDispatchError;
514
475
  }>;
515
- /**
516
- * Event to notify if, in the `on_idle` hook when cleaning up an expired storage request,
517
- * the transfer of a part of that storage request's deposit to one of the volunteered BSPs failed.
518
- **/
519
- FailedToTransferDepositFundsToBsp: AugmentedEvent<ApiType, [
520
- fileKey: H256,
521
- owner: AccountId20,
522
- bspId: H256,
523
- amountToTransfer: u128,
524
- error: SpRuntimeDispatchError
525
- ], {
526
- fileKey: H256;
527
- owner: AccountId20;
528
- bspId: H256;
529
- amountToTransfer: u128;
530
- error: SpRuntimeDispatchError;
531
- }>;
532
- /**
533
- * Notifies that a file will be deleted.
534
- **/
535
- FileDeletionRequest: AugmentedEvent<ApiType, [
536
- user: AccountId20,
537
- fileKey: H256,
538
- fileSize: u64,
539
- bucketId: H256,
540
- mspId: H256,
541
- proofOfInclusion: bool
542
- ], {
543
- user: AccountId20;
544
- fileKey: H256;
545
- fileSize: u64;
546
- bucketId: H256;
547
- mspId: H256;
548
- proofOfInclusion: bool;
549
- }>;
550
476
  /**
551
477
  * Notifies that a file deletion has been requested.
552
478
  * Contains a signed intention that allows any actor to execute the actual deletion.
@@ -567,6 +493,20 @@ declare module "@polkadot/api-base/types/events" {
567
493
  IncompleteStorageRequest: AugmentedEvent<ApiType, [fileKey: H256], {
568
494
  fileKey: H256;
569
495
  }>;
496
+ /**
497
+ * Notifies that an incomplete storage request has been fully cleaned up.
498
+ *
499
+ * This event is emitted in two scenarios:
500
+ * 1. When an incomplete storage request is created but there are no providers to clean
501
+ * (e.g., MSP confirmed with inclusion proof and no BSPs confirmed).
502
+ * 2. When the file has been removed from all providers and the incomplete storage
503
+ * request entry is removed from storage.
504
+ **/
505
+ IncompleteStorageRequestCleanedUp: AugmentedEvent<ApiType, [
506
+ fileKey: H256
507
+ ], {
508
+ fileKey: H256;
509
+ }>;
570
510
  /**
571
511
  * Notifies that a bucket has been moved to a new MSP under a new value proposition.
572
512
  **/
@@ -711,34 +651,6 @@ declare module "@polkadot/api-base/types/events" {
711
651
  peerIds: Vec<Bytes>;
712
652
  expiresAt: u32;
713
653
  }>;
714
- /**
715
- * Notifies that a file key has been queued for a priority challenge for file deletion.
716
- **/
717
- PriorityChallengeForFileDeletionQueued: AugmentedEvent<ApiType, [
718
- issuer: PalletFileSystemEitherAccountIdOrMspId,
719
- fileKey: H256
720
- ], {
721
- issuer: PalletFileSystemEitherAccountIdOrMspId;
722
- fileKey: H256;
723
- }>;
724
- /**
725
- * Notifies that a proof has been submitted for a pending file deletion request.
726
- **/
727
- ProofSubmittedForPendingFileDeletionRequest: AugmentedEvent<ApiType, [
728
- user: AccountId20,
729
- fileKey: H256,
730
- fileSize: u64,
731
- bucketId: H256,
732
- mspId: H256,
733
- proofOfInclusion: bool
734
- ], {
735
- user: AccountId20;
736
- fileKey: H256;
737
- fileSize: u64;
738
- bucketId: H256;
739
- mspId: H256;
740
- proofOfInclusion: bool;
741
- }>;
742
654
  /**
743
655
  * Notifies that a SP has stopped storing a file because its owner has become insolvent.
744
656
  **/
@@ -805,6 +717,16 @@ declare module "@polkadot/api-base/types/events" {
805
717
  ], {
806
718
  actualUsedCapacity: u64;
807
719
  }>;
720
+ /**
721
+ * Notifies that the user operation pause flags have been updated.
722
+ **/
723
+ UserOperationPauseFlagsUpdated: AugmentedEvent<ApiType, [
724
+ old: u32,
725
+ new_: u32
726
+ ], {
727
+ old: u32;
728
+ new_: u32;
729
+ }>;
808
730
  /**
809
731
  * Generic event
810
732
  **/
@@ -382,6 +382,17 @@ declare module "@polkadot/api-base/types/storage" {
382
382
  storageRequests: AugmentedQuery<ApiType, (arg: H256 | string | Uint8Array) => Observable<Option<PalletFileSystemStorageRequestMetadata>>, [
383
383
  H256
384
384
  ]> & QueryableStorageEntry<ApiType, [H256]>;
385
+ /**
386
+ * Bitmask controlling which user operations are currently paused.
387
+ *
388
+ * When a particular bit is set in this mask, the corresponding user operation in this pallet
389
+ * is considered paused and should fail with [`Error::UserOperationPaused`].
390
+ *
391
+ * By default this is initialised to [`UserOperationPauseFlags::NONE`], meaning no operations
392
+ * are paused. Governance (for example via sudo) can update it using the
393
+ * `set_user_operation_pause_flags` extrinsic.
394
+ **/
395
+ userOperationPauseFlagsStorage: AugmentedQuery<ApiType, () => Observable<u32>, []> & QueryableStorageEntry<ApiType, []>;
385
396
  /**
386
397
  * Generic query
387
398
  **/
@@ -214,6 +214,10 @@ declare module "@polkadot/api-base/types/calls" {
214
214
  * Decodes the BucketId expected to be found in the event info of a generic apply delta.
215
215
  **/
216
216
  decodeGenericApplyDeltaEventInfo: AugmentedCall<ApiType, (encodedEventInfo: Bytes | string | Uint8Array) => Observable<Result<BucketId, GenericApplyDeltaEventInfoError>>>;
217
+ /**
218
+ * Get the maximum batch size for confirm storage requests.
219
+ **/
220
+ getMaxBatchConfirmStorageRequests: AugmentedCall<ApiType, () => Observable<u32>>;
217
221
  /**
218
222
  * Check if a storage request is open to volunteers.
219
223
  **/
@@ -246,6 +250,10 @@ declare module "@polkadot/api-base/types/calls" {
246
250
  * Query the chunks that a MSP needs to prove to confirm that it is storing a file.
247
251
  **/
248
252
  queryMspConfirmChunksToProveForFile: AugmentedCall<ApiType, (mspId: MainStorageProviderId | string | Uint8Array, fileKey: H256 | string | Uint8Array) => Observable<Result<Vec<ChunkId>, QueryMspConfirmChunksToProveForFileError>>>;
253
+ /**
254
+ * Query the file keys that a BSP still needs to confirm storing after volunteering.
255
+ **/
256
+ queryPendingBspConfirmStorageRequests: AugmentedCall<ApiType, (bspId: BackupStorageProviderId | string | Uint8Array, fileKeys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<Vec<H256>>>;
249
257
  /**
250
258
  * Get the storage requests for a given MSP.
251
259
  **/
@@ -284,11 +284,31 @@ declare module "@polkadot/api-base/types/submittable" {
284
284
  };
285
285
  fileSystem: {
286
286
  /**
287
- * Executed by a BSP to confirm to stop storing a file.
287
+ * Executed by a BSP to confirm stopping storage of a file and remove it from their forest.
288
288
  *
289
- * It has to have previously opened a pending stop storing request using the `bsp_request_stop_storing` extrinsic.
290
- * The minimum amount of blocks between the request and the confirmation is defined by the runtime, such that the
291
- * BSP can't immediately stop storing a file it has previously lost when receiving a challenge for it.
289
+ * This is the second step of the two-phase stop storing process. The BSP must have previously
290
+ * called [`bsp_request_stop_storing`] to open a pending stop storing request.
291
+ *
292
+ * A minimum waiting period ([`MinWaitForStopStoring`]) must pass between the request and this
293
+ * confirmation. This prevents a BSP from immediately dropping a file when challenged for it,
294
+ * ensuring they can't avoid slashing by quickly calling stop storing upon receiving a challenge.
295
+ *
296
+ * ## What this extrinsic does
297
+ *
298
+ * 1. Verifies the pending stop storing request exists and the minimum wait time has passed
299
+ * 2. Verifies the file is still in the BSP's forest via the inclusion proof
300
+ * 3. **Removes the file from the BSP's forest and updates their root**
301
+ * 4. Decreases the BSP's used capacity
302
+ * 5. Stops challenge/randomness cycles if the BSP has no more files
303
+ *
304
+ * Note: The payment stream was already updated in [`bsp_request_stop_storing`].
305
+ *
306
+ * ## Errors
307
+ *
308
+ * - [`PendingStopStoringRequestNotFound`]: No pending request exists for this BSP and file
309
+ * - [`MinWaitForStopStoringNotReached`]: The minimum waiting period hasn't passed yet
310
+ * - [`OperationNotAllowedWithInsolventUser`]: The file owner is insolvent (the BSP should use
311
+ * [`stop_storing_for_insolvent_user`] instead)
292
312
  **/
293
313
  bspConfirmStopStoring: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, inclusionForestProof: SpTrieStorageProofCompactProof | {
294
314
  encodedNodes?: any;
@@ -311,12 +331,45 @@ declare module "@polkadot/api-base/types/submittable" {
311
331
  /**
312
332
  * Executed by a BSP to request to stop storing a file.
313
333
  *
314
- * In the event when a storage request no longer exists for the data the BSP no longer stores,
315
- * it is required that the BSP still has access to the metadata of the initial storage request.
316
- * If they do not, they will at least need that metadata to reconstruct the File ID and from wherever
317
- * the BSP gets that data is up to it. One example could be from the assigned MSP.
318
- * This metadata is necessary since it is needed to reconstruct the leaf node key in the storage
319
- * provider's Merkle Forest.
334
+ * This is the first step of a two-phase process for a BSP to voluntarily stop storing a file.
335
+ * The BSP must later call [`bsp_confirm_stop_storing`] after a minimum waiting period to
336
+ * complete the process and actually remove the file from their forest.
337
+ *
338
+ * **Important**: This extrinsic does NOT modify the BSP's forest root. The file remains in the
339
+ * BSP's forest until [`bsp_confirm_stop_storing`] is called.
340
+ *
341
+ * The BSP is required to provide the file metadata (bucket_id, location, owner, fingerprint, size)
342
+ * to reconstruct and verify the file key. The BSP can get this metadata from its file storage, but
343
+ * it providing it is not a proof that the BSP actually has the file, since this metadata can be obtained
344
+ * from the original storage request or from the assigned MSP if the storage request no longer exists.
345
+ *
346
+ * ## Behavior based on storage request state
347
+ *
348
+ * 1. **Storage request exists and BSP has confirmed storing it**: The BSP is removed from the
349
+ * storage request's confirmed and volunteered lists and the confirmed/volunteered counts are decremented.
350
+ * The BSP is also removed from the storage request as a data server.
351
+ *
352
+ * 2. **Storage request exists but BSP is not a volunteer**: The `bsps_required` count is
353
+ * incremented to compensate for the BSP leaving.
354
+ *
355
+ * 3. **No storage request exists**: A new storage request is created with `bsps_required = 1`
356
+ * so another BSP can pick up the file and maintain its replication target. If `can_serve` is true,
357
+ * the requesting BSP is added as a data server to help the new volunteer download the file.
358
+ *
359
+ * ## Fees
360
+ *
361
+ * The BSP is charged a penalty fee ([`BspStopStoringFilePenalty`]) which is transferred to the treasury.
362
+ *
363
+ * ## Payment Stream
364
+ *
365
+ * The payment stream with the file owner is **updated immediately** in this extrinsic (not in
366
+ * [`bsp_confirm_stop_storing`]). This removes any financial incentive for the BSP to delay or
367
+ * skip the confirmation, as they stop getting paid as soon as they announce their intent to stop storing.
368
+ *
369
+ * ## Restrictions
370
+ *
371
+ * This extrinsic will fail with [`FileHasIncompleteStorageRequest`] if an `IncompleteStorageRequest`
372
+ * exists for the file key. The BSP must wait until fisherman nodes clean up the incomplete request.
320
373
  **/
321
374
  bspRequestStopStoring: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, owner: AccountId20 | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, canServe: bool | boolean | Uint8Array, inclusionForestProof: SpTrieStorageProofCompactProof | {
322
375
  encodedNodes?: any;
@@ -506,6 +559,18 @@ declare module "@polkadot/api-base/types/submittable" {
506
559
  revokeStorageRequest: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
507
560
  H256
508
561
  ]>;
562
+ /**
563
+ * Set the pause flags that control which user operations are currently allowed.
564
+ *
565
+ * This extrinsic can only be called by `Root` (for example via `pallet-sudo` or governance).
566
+ * Passing [`UserOperationPauseFlags::NONE`] unpauses all operations, while setting one or more
567
+ * bits in the flags pauses the corresponding user operations.
568
+ *
569
+ * This call replaces the entire bitmask in storage with the provided value.
570
+ **/
571
+ setUserOperationPauseFlags: AugmentedSubmittable<(newFlags: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
572
+ u32
573
+ ]>;
509
574
  /**
510
575
  * Executed by a SP to stop storing a file from an insolvent user.
511
576
  *
@@ -71,7 +71,7 @@ import type { VestingInfo } from "@polkadot/types/interfaces/vesting";
71
71
  import type { AssetIdV2, AssetIdV3, AssetIdV4, AssetIdV5, AssetInstance, AssetInstanceV0, AssetInstanceV1, AssetInstanceV2, AssetInstanceV3, AssetInstanceV4, AssetInstanceV5, BodyId, BodyIdV2, BodyIdV3, BodyPart, BodyPartV2, BodyPartV3, DoubleEncodedCall, Fungibility, FungibilityV0, FungibilityV1, FungibilityV2, FungibilityV3, FungibilityV4, FungibilityV5, HintV5, InboundStatus, InstructionV2, InstructionV3, InstructionV4, InstructionV5, InteriorMultiLocation, InteriorMultiLocationV2, InteriorMultiLocationV3, InteriorMultiLocationV5, Junction, JunctionV0, JunctionV1, JunctionV2, JunctionV3, JunctionV4, JunctionV5, Junctions, JunctionsV1, JunctionsV2, JunctionsV3, JunctionsV4, JunctionsV5, MaxPalletNameLen, MaxPalletsInfo, MaybeErrorCodeV3, MultiAsset, MultiAssetFilter, MultiAssetFilterV1, MultiAssetFilterV2, MultiAssetFilterV3, MultiAssetFilterV4, MultiAssetFilterV5, MultiAssetTransferFilterV5, MultiAssetV0, MultiAssetV1, MultiAssetV2, MultiAssetV3, MultiAssetV4, MultiAssetV5, MultiAssets, MultiAssetsV1, MultiAssetsV2, MultiAssetsV3, MultiAssetsV4, MultiAssetsV5, MultiLocation, MultiLocationV0, MultiLocationV1, MultiLocationV2, MultiLocationV3, MultiLocationV4, MultiLocationV5, NetworkId, NetworkIdV2, NetworkIdV3, NetworkIdV4, NetworkIdV5, OriginKindV0, OriginKindV1, OriginKindV2, OriginKindV3, OriginKindV4, OutboundStatus, Outcome, OutcomeV4, PalletInfoV3, PalletInfoV4, PalletInfoV5, QueryId, QueryResponseInfoV3, QueryResponseInfoV4, QueryResponseInfoV5, QueryStatus, QueueConfigData, Response, ResponseV0, ResponseV1, ResponseV2, ResponseV2Error, ResponseV3, ResponseV3Error, ResponseV3Result, ResponseV4, ResponseV5, UncheckedFungibilityV4, UncheckedFungibilityV5, VersionMigrationStage, VersionV3, VersionV4, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, VersionedResponse, VersionedXcm, WeightLimitV2, WeightLimitV3, WildFungibility, WildFungibilityV0, WildFungibilityV1, WildFungibilityV2, WildFungibilityV3, WildFungibilityV4, WildFungibilityV5, WildMultiAsset, WildMultiAssetV1, WildMultiAssetV2, WildMultiAssetV3, WildMultiAssetV4, WildMultiAssetV5, Xcm, XcmAssetId, XcmError, XcmErrorV0, XcmErrorV1, XcmErrorV2, XcmErrorV3, XcmErrorV4, XcmErrorV5, XcmOrderV0, XcmOrderV1, XcmOrigin, XcmOriginKind, XcmV0, XcmV1, XcmV2, XcmV3, XcmV4, XcmV5, XcmVersion, XcmpMessageFormat } from "@polkadot/types/interfaces/xcm";
72
72
  import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
73
73
  import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
74
- import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, GetValuePropositionsResult, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, RpcProviderId, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
74
+ import type { AddFilesToForestStorageResult, BackupStorageProvider, BackupStorageProviderId, BucketId, CheckpointChallenge, ChunkId, FileMetadata, GenericApplyDeltaEventInfoError, GetBspInfoError, GetChallengePeriodError, GetChallengeSeedError, GetCheckpointChallengesError, GetFileFromFileStorageResult, GetNextDeadlineTickError, GetProofSubmissionRecordError, GetStakeError, GetUsersWithDebtOverThresholdError, GetValuePropositionsResult, IncompleteFileStatus, IncompleteStorageRequestMetadataResponse, IsStorageRequestOpenToVolunteersError, LoadFileInStorageResult, MainStorageProviderId, MerklePatriciaRoot, MspStorageRequestStatus, Multiaddresses, ProviderId, QueryAvailableStorageCapacityError, QueryBspConfirmChunksToProveForFileError, QueryBspsVolunteeredForFileError, QueryBucketsForMspError, QueryBucketsOfUserStoredByMspError, QueryConfirmChunksToProveForFileError, QueryEarliestChangeCapacityBlockError, QueryFileEarliestVolunteerBlockError, QueryIncompleteStorageRequestMetadataError, QueryMspConfirmChunksToProveForFileError, QueryMspIdOfBucketIdError, QueryProviderMultiaddressesError, QueryStorageProviderCapacityError, RandomnessOutput, RemoveFilesFromForestStorageResult, ReputationWeightType, RpcProviderId, SaveFileToDisk, ShouldRemoveFile, StorageDataUnit, StorageProviderId, StorageRequestMetadata, TrieRemoveMutation, ValuePropId, ValueProposition, ValuePropositionWithId } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
75
75
  declare module "@polkadot/types/types/registry" {
76
76
  interface InterfaceTypes {
77
77
  AbridgedCandidateReceipt: AbridgedCandidateReceipt;
@@ -778,6 +778,7 @@ declare module "@polkadot/types/types/registry" {
778
778
  MomentOf: MomentOf;
779
779
  MoreAttestations: MoreAttestations;
780
780
  MortalEra: MortalEra;
781
+ MspStorageRequestStatus: MspStorageRequestStatus;
781
782
  MultiAddress: MultiAddress;
782
783
  Multiaddresses: Multiaddresses;
783
784
  MultiAsset: MultiAsset;