@storagehub/api-augment 0.1.0 → 0.2.1

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 (190) hide show
  1. package/LICENSE +674 -0
  2. package/biome.json +2 -9
  3. package/dist/parachain/index.js.map +1 -0
  4. package/dist/parachain/interfaces/augment-api-consts.js.map +1 -0
  5. package/dist/parachain/interfaces/augment-api-errors.js.map +1 -0
  6. package/dist/parachain/interfaces/augment-api-events.js.map +1 -0
  7. package/dist/parachain/interfaces/augment-api-query.js.map +1 -0
  8. package/dist/parachain/interfaces/augment-api-rpc.js.map +1 -0
  9. package/dist/parachain/interfaces/augment-api-runtime.js.map +1 -0
  10. package/dist/parachain/interfaces/augment-api-tx.js.map +1 -0
  11. package/dist/parachain/interfaces/augment-api.js.map +1 -0
  12. package/dist/parachain/interfaces/augment-types.js.map +1 -0
  13. package/dist/parachain/interfaces/definitions.js.map +1 -0
  14. package/dist/parachain/interfaces/index.js.map +1 -0
  15. package/dist/{interfaces → parachain/interfaces}/lookup.js +1465 -813
  16. package/dist/parachain/interfaces/lookup.js.map +1 -0
  17. package/dist/parachain/interfaces/registry.js.map +1 -0
  18. package/dist/parachain/interfaces/storagehubclient/definitions.js +7 -0
  19. package/dist/parachain/interfaces/storagehubclient/definitions.js.map +1 -0
  20. package/dist/parachain/interfaces/storagehubclient/index.js.map +1 -0
  21. package/dist/parachain/interfaces/storagehubclient/runtime.js.map +1 -0
  22. package/dist/parachain/interfaces/storagehubclient/types.js.map +1 -0
  23. package/dist/parachain/interfaces/types-lookup.js.map +1 -0
  24. package/dist/parachain/interfaces/types.js.map +1 -0
  25. package/dist/solochain-evm/index.js +4 -0
  26. package/dist/solochain-evm/index.js.map +1 -0
  27. package/dist/solochain-evm/interfaces/augment-api-consts.js +6 -0
  28. package/dist/solochain-evm/interfaces/augment-api-consts.js.map +1 -0
  29. package/dist/solochain-evm/interfaces/augment-api-errors.js +6 -0
  30. package/dist/solochain-evm/interfaces/augment-api-errors.js.map +1 -0
  31. package/dist/solochain-evm/interfaces/augment-api-events.js +6 -0
  32. package/dist/solochain-evm/interfaces/augment-api-events.js.map +1 -0
  33. package/dist/solochain-evm/interfaces/augment-api-query.js +6 -0
  34. package/dist/solochain-evm/interfaces/augment-api-query.js.map +1 -0
  35. package/dist/solochain-evm/interfaces/augment-api-rpc.js +6 -0
  36. package/dist/solochain-evm/interfaces/augment-api-rpc.js.map +1 -0
  37. package/dist/solochain-evm/interfaces/augment-api-runtime.js +6 -0
  38. package/dist/solochain-evm/interfaces/augment-api-runtime.js.map +1 -0
  39. package/dist/solochain-evm/interfaces/augment-api-tx.js +6 -0
  40. package/dist/solochain-evm/interfaces/augment-api-tx.js.map +1 -0
  41. package/dist/solochain-evm/interfaces/augment-api.js +10 -0
  42. package/dist/solochain-evm/interfaces/augment-api.js.map +1 -0
  43. package/dist/solochain-evm/interfaces/augment-types.js +6 -0
  44. package/dist/solochain-evm/interfaces/augment-types.js.map +1 -0
  45. package/dist/solochain-evm/interfaces/definitions.js +2 -0
  46. package/dist/solochain-evm/interfaces/definitions.js.map +1 -0
  47. package/dist/solochain-evm/interfaces/index.js +4 -0
  48. package/dist/solochain-evm/interfaces/index.js.map +1 -0
  49. package/dist/solochain-evm/interfaces/lookup.js +3744 -0
  50. package/dist/solochain-evm/interfaces/lookup.js.map +1 -0
  51. package/dist/solochain-evm/interfaces/registry.js +6 -0
  52. package/dist/solochain-evm/interfaces/registry.js.map +1 -0
  53. package/dist/solochain-evm/interfaces/storagehubclient/definitions.js +7 -0
  54. package/dist/solochain-evm/interfaces/storagehubclient/definitions.js.map +1 -0
  55. package/dist/solochain-evm/interfaces/storagehubclient/index.js +4 -0
  56. package/dist/solochain-evm/interfaces/storagehubclient/index.js.map +1 -0
  57. package/dist/solochain-evm/interfaces/storagehubclient/types.js +4 -0
  58. package/dist/solochain-evm/interfaces/storagehubclient/types.js.map +1 -0
  59. package/dist/solochain-evm/interfaces/types-lookup.js +6 -0
  60. package/dist/solochain-evm/interfaces/types-lookup.js.map +1 -0
  61. package/dist/solochain-evm/interfaces/types.js +4 -0
  62. package/dist/solochain-evm/interfaces/types.js.map +1 -0
  63. package/dist/types/{interfaces → parachain/interfaces}/augment-api-consts.d.ts +147 -20
  64. package/dist/types/{interfaces → parachain/interfaces}/augment-api-errors.d.ts +235 -8
  65. package/dist/types/{interfaces → parachain/interfaces}/augment-api-events.d.ts +542 -118
  66. package/dist/types/{interfaces → parachain/interfaces}/augment-api-query.d.ts +208 -118
  67. package/dist/types/{interfaces → parachain/interfaces}/augment-api-rpc.d.ts +61 -4
  68. package/dist/types/{interfaces → parachain/interfaces}/augment-api-runtime.d.ts +97 -8
  69. package/dist/types/{interfaces → parachain/interfaces}/augment-api-tx.d.ts +356 -181
  70. package/dist/types/{interfaces → parachain/interfaces}/augment-types.d.ts +144 -11
  71. package/dist/types/{interfaces → parachain/interfaces}/lookup.d.ts +1067 -513
  72. package/dist/types/parachain/interfaces/registry.d.ts +311 -0
  73. package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/types.d.ts +129 -18
  74. package/dist/types/{interfaces → parachain/interfaces}/types-lookup.d.ts +1619 -887
  75. package/dist/types/solochain-evm/interfaces/augment-api-consts.d.ts +641 -0
  76. package/dist/types/solochain-evm/interfaces/augment-api-errors.d.ts +1260 -0
  77. package/dist/types/solochain-evm/interfaces/augment-api-events.d.ts +2058 -0
  78. package/dist/types/solochain-evm/interfaces/augment-api-query.d.ts +1317 -0
  79. package/dist/types/solochain-evm/interfaces/augment-api-rpc.d.ts +775 -0
  80. package/dist/types/solochain-evm/interfaces/augment-api-runtime.d.ts +535 -0
  81. package/dist/types/solochain-evm/interfaces/augment-api-tx.d.ts +2381 -0
  82. package/dist/types/solochain-evm/interfaces/augment-api.d.ts +7 -0
  83. package/dist/types/solochain-evm/interfaces/augment-types.d.ts +1418 -0
  84. package/dist/types/solochain-evm/interfaces/index.d.ts +1 -0
  85. package/dist/types/solochain-evm/interfaces/lookup.d.ts +3363 -0
  86. package/dist/types/solochain-evm/interfaces/registry.d.ts +252 -0
  87. package/dist/types/solochain-evm/interfaces/storagehubclient/definitions.d.ts +6 -0
  88. package/dist/types/solochain-evm/interfaces/storagehubclient/index.d.ts +1 -0
  89. package/dist/types/solochain-evm/interfaces/storagehubclient/types.d.ts +319 -0
  90. package/dist/types/solochain-evm/interfaces/types-lookup.d.ts +3577 -0
  91. package/dist/types/solochain-evm/interfaces/types.d.ts +1 -0
  92. package/metadata-sh-parachain.json +5 -0
  93. package/metadata-sh-solochain-evm.json +5 -0
  94. package/package.json +41 -26
  95. package/scripts/scrapeMetadata.ts +41 -29
  96. package/src/parachain/index.ts +3 -0
  97. package/src/{interfaces → parachain/interfaces}/augment-api-consts.ts +147 -20
  98. package/src/{interfaces → parachain/interfaces}/augment-api-errors.ts +235 -8
  99. package/src/{interfaces → parachain/interfaces}/augment-api-events.ts +527 -137
  100. package/src/{interfaces → parachain/interfaces}/augment-api-query.ts +272 -145
  101. package/src/{interfaces → parachain/interfaces}/augment-api-rpc.ts +123 -5
  102. package/src/{interfaces → parachain/interfaces}/augment-api-runtime.ts +183 -8
  103. package/src/{interfaces → parachain/interfaces}/augment-api-tx.ts +374 -182
  104. package/src/{interfaces → parachain/interfaces}/augment-types.ts +278 -12
  105. package/src/parachain/interfaces/definitions.ts +1 -0
  106. package/src/{interfaces → parachain/interfaces}/lookup.ts +1497 -813
  107. package/src/{interfaces → parachain/interfaces}/registry.ts +176 -98
  108. package/src/parachain/interfaces/storagehubclient/definitions.ts +7 -0
  109. package/src/{interfaces → parachain/interfaces}/storagehubclient/types.ts +158 -18
  110. package/src/{interfaces → parachain/interfaces}/types-lookup.ts +1970 -896
  111. package/src/solochain-evm/index.ts +3 -0
  112. package/src/solochain-evm/interfaces/augment-api-consts.ts +655 -0
  113. package/src/solochain-evm/interfaces/augment-api-errors.ts +1268 -0
  114. package/src/solochain-evm/interfaces/augment-api-events.ts +1813 -0
  115. package/src/solochain-evm/interfaces/augment-api-query.ts +1838 -0
  116. package/src/solochain-evm/interfaces/augment-api-rpc.ts +1319 -0
  117. package/src/solochain-evm/interfaces/augment-api-runtime.ts +958 -0
  118. package/src/solochain-evm/interfaces/augment-api-tx.ts +2818 -0
  119. package/src/solochain-evm/interfaces/augment-api.ts +10 -0
  120. package/src/solochain-evm/interfaces/augment-types.ts +2774 -0
  121. package/src/solochain-evm/interfaces/definitions.ts +1 -0
  122. package/src/solochain-evm/interfaces/index.ts +4 -0
  123. package/src/solochain-evm/interfaces/lookup.ts +3788 -0
  124. package/src/solochain-evm/interfaces/registry.ts +506 -0
  125. package/src/solochain-evm/interfaces/storagehubclient/definitions.ts +7 -0
  126. package/src/solochain-evm/interfaces/storagehubclient/index.ts +4 -0
  127. package/src/solochain-evm/interfaces/storagehubclient/types.ts +391 -0
  128. package/src/solochain-evm/interfaces/types-lookup.ts +4616 -0
  129. package/src/solochain-evm/interfaces/types.ts +4 -0
  130. package/tsconfig.json +17 -20
  131. package/tsconfig.parachain.json +17 -0
  132. package/tsconfig.solochain-evm.json +17 -0
  133. package/tsconfig.tsbuildinfo +1 -0
  134. package/dist/index.js.map +0 -1
  135. package/dist/interfaces/augment-api-consts.js.map +0 -1
  136. package/dist/interfaces/augment-api-errors.js.map +0 -1
  137. package/dist/interfaces/augment-api-events.js.map +0 -1
  138. package/dist/interfaces/augment-api-query.js.map +0 -1
  139. package/dist/interfaces/augment-api-rpc.js.map +0 -1
  140. package/dist/interfaces/augment-api-runtime.js.map +0 -1
  141. package/dist/interfaces/augment-api-tx.js.map +0 -1
  142. package/dist/interfaces/augment-api.js.map +0 -1
  143. package/dist/interfaces/augment-types.js.map +0 -1
  144. package/dist/interfaces/definitions.js.map +0 -1
  145. package/dist/interfaces/index.js.map +0 -1
  146. package/dist/interfaces/lookup.js.map +0 -1
  147. package/dist/interfaces/registry.js.map +0 -1
  148. package/dist/interfaces/storagehubclient/definitions.js +0 -7
  149. package/dist/interfaces/storagehubclient/definitions.js.map +0 -1
  150. package/dist/interfaces/storagehubclient/index.js.map +0 -1
  151. package/dist/interfaces/storagehubclient/runtime.js.map +0 -1
  152. package/dist/interfaces/storagehubclient/types.js.map +0 -1
  153. package/dist/interfaces/types-lookup.js.map +0 -1
  154. package/dist/interfaces/types.js.map +0 -1
  155. package/dist/types/interfaces/registry.d.ts +0 -272
  156. package/src/interfaces/storagehubclient/definitions.ts +0 -7
  157. package/storagehub.json +0 -1
  158. /package/dist/{index.js → parachain/index.js} +0 -0
  159. /package/dist/{interfaces → parachain/interfaces}/augment-api-consts.js +0 -0
  160. /package/dist/{interfaces → parachain/interfaces}/augment-api-errors.js +0 -0
  161. /package/dist/{interfaces → parachain/interfaces}/augment-api-events.js +0 -0
  162. /package/dist/{interfaces → parachain/interfaces}/augment-api-query.js +0 -0
  163. /package/dist/{interfaces → parachain/interfaces}/augment-api-rpc.js +0 -0
  164. /package/dist/{interfaces → parachain/interfaces}/augment-api-runtime.js +0 -0
  165. /package/dist/{interfaces → parachain/interfaces}/augment-api-tx.js +0 -0
  166. /package/dist/{interfaces → parachain/interfaces}/augment-api.js +0 -0
  167. /package/dist/{interfaces → parachain/interfaces}/augment-types.js +0 -0
  168. /package/dist/{interfaces → parachain/interfaces}/definitions.js +0 -0
  169. /package/dist/{interfaces → parachain/interfaces}/index.js +0 -0
  170. /package/dist/{interfaces → parachain/interfaces}/registry.js +0 -0
  171. /package/dist/{interfaces → parachain/interfaces}/storagehubclient/index.js +0 -0
  172. /package/dist/{interfaces → parachain/interfaces}/storagehubclient/runtime.js +0 -0
  173. /package/dist/{interfaces → parachain/interfaces}/storagehubclient/types.js +0 -0
  174. /package/dist/{interfaces → parachain/interfaces}/types-lookup.js +0 -0
  175. /package/dist/{interfaces → parachain/interfaces}/types.js +0 -0
  176. /package/dist/types/{index.d.ts → parachain/index.d.ts} +0 -0
  177. /package/dist/types/{interfaces → parachain/interfaces}/augment-api.d.ts +0 -0
  178. /package/dist/types/{interfaces → parachain/interfaces}/definitions.d.ts +0 -0
  179. /package/dist/types/{interfaces → parachain/interfaces}/index.d.ts +0 -0
  180. /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/definitions.d.ts +0 -0
  181. /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/index.d.ts +0 -0
  182. /package/dist/types/{interfaces → parachain/interfaces}/storagehubclient/runtime.d.ts +0 -0
  183. /package/dist/types/{interfaces → parachain/interfaces}/types.d.ts +0 -0
  184. /package/{src/index.ts → dist/types/solochain-evm/index.d.ts} +0 -0
  185. /package/{src/interfaces/definitions.ts → dist/types/solochain-evm/interfaces/definitions.d.ts} +0 -0
  186. /package/src/{interfaces → parachain/interfaces}/augment-api.ts +0 -0
  187. /package/src/{interfaces → parachain/interfaces}/index.ts +0 -0
  188. /package/src/{interfaces → parachain/interfaces}/storagehubclient/index.ts +0 -0
  189. /package/src/{interfaces → parachain/interfaces}/storagehubclient/runtime.ts +0 -0
  190. /package/src/{interfaces → parachain/interfaces}/types.ts +0 -0
@@ -19,7 +19,10 @@ import type {
19
19
  CumulusPrimitivesParachainInherentParachainInherentData,
20
20
  PalletBalancesAdjustmentDirection,
21
21
  PalletFileSystemBucketMoveRequestResponse,
22
- PalletFileSystemMspStorageRequestResponse,
22
+ PalletFileSystemFileKeyWithProof,
23
+ PalletFileSystemFileOperationIntention,
24
+ PalletFileSystemReplicationTarget,
25
+ PalletFileSystemStorageRequestMspBucketResponse,
23
26
  PalletNftsAttributeNamespace,
24
27
  PalletNftsCancelAttributesApprovalWitness,
25
28
  PalletNftsCollectionConfig,
@@ -32,15 +35,13 @@ import type {
32
35
  PalletNftsPreSignedMint,
33
36
  PalletNftsPriceWithDirection,
34
37
  PalletProofsDealerProof,
35
- PalletStorageProvidersValueProposition,
36
- ShpFileKeyVerifierFileKeyProof,
38
+ ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters,
39
+ ShParachainRuntimeSessionKeys,
37
40
  SpRuntimeMultiSignature,
38
41
  SpTrieStorageProofCompactProof,
39
42
  SpWeightsWeightV2Weight,
40
43
  StagingXcmExecutorAssetTransferTransferType,
41
- StagingXcmV4Location,
42
- StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters,
43
- StorageHubRuntimeSessionKeys,
44
+ StagingXcmV5Location,
44
45
  XcmV3WeightLimit,
45
46
  XcmVersionedAssetId,
46
47
  XcmVersionedAssets,
@@ -420,13 +421,6 @@ declare module "@polkadot/api-base/types/submittable" {
420
421
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
421
422
  };
422
423
  fileSystem: {
423
- /**
424
- * Add yourself as a data server for providing the files of the bucket requested to be moved.
425
- **/
426
- bspAddDataServerForMoveBucketRequest: AugmentedSubmittable<
427
- (bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
428
- [H256]
429
- >;
430
424
  /**
431
425
  * Executed by a BSP to confirm to stop storing a file.
432
426
  *
@@ -456,18 +450,15 @@ declare module "@polkadot/api-base/types/submittable" {
456
450
  | string
457
451
  | Uint8Array,
458
452
  fileKeysAndProofs:
459
- | Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>
460
- | [
461
- H256 | string | Uint8Array,
462
- (
463
- | ShpFileKeyVerifierFileKeyProof
464
- | { fileMetadata?: any; proof?: any }
465
- | string
466
- | Uint8Array
467
- )
468
- ][]
453
+ | Vec<PalletFileSystemFileKeyWithProof>
454
+ | (
455
+ | PalletFileSystemFileKeyWithProof
456
+ | { fileKey?: any; proof?: any }
457
+ | string
458
+ | Uint8Array
459
+ )[]
469
460
  ) => SubmittableExtrinsic<ApiType>,
470
- [SpTrieStorageProofCompactProof, Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>]
461
+ [SpTrieStorageProofCompactProof, Vec<PalletFileSystemFileKeyWithProof>]
471
462
  >;
472
463
  /**
473
464
  * Executed by a BSP to request to stop storing a file.
@@ -519,26 +510,82 @@ declare module "@polkadot/api-base/types/submittable" {
519
510
  (
520
511
  mspId: H256 | string | Uint8Array,
521
512
  name: Bytes | string | Uint8Array,
522
- private: bool | boolean | Uint8Array
513
+ private: bool | boolean | Uint8Array,
514
+ valuePropId: H256 | string | Uint8Array
523
515
  ) => SubmittableExtrinsic<ApiType>,
524
- [H256, Bytes, bool]
516
+ [H256, Bytes, bool, H256]
525
517
  >;
518
+ /**
519
+ * Dispatchable extrinsic that allows a User to delete any of their buckets if it is currently empty.
520
+ * This way, the User is allowed to remove now unused buckets to recover their deposit for them.
521
+ *
522
+ * The User must provide the BucketId of the bucket they want to delete, which should correspond to a
523
+ * bucket that is both theirs and currently empty.
524
+ *
525
+ * To check if a bucket is empty, we compare its current root with the one of an empty trie.
526
+ **/
527
+ deleteBucket: AugmentedSubmittable<
528
+ (bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
529
+ [H256]
530
+ >;
531
+ /**
532
+ * Deletes a file from a provider's forest, changing its root
533
+ *
534
+ * This extrinsic allows any actor to execute file deletion based on signed intentions
535
+ * from the `FileDeletionRequested` event. It requires a valid forest proof showing that the
536
+ * file exists in the specified provider's forest before allowing deletion.
537
+ *
538
+ * If `bsp_id` is `None`, the file will be deleted from the bucket forest.
539
+ * If `bsp_id` is `Some(id)`, the file will be deleted from the specified BSP's forest.
540
+ **/
526
541
  deleteFile: AugmentedSubmittable<
527
542
  (
543
+ fileOwner: AccountId32 | string | Uint8Array,
544
+ signedIntention:
545
+ | PalletFileSystemFileOperationIntention
546
+ | { fileKey?: any; operation?: any }
547
+ | string
548
+ | Uint8Array,
549
+ signature:
550
+ | SpRuntimeMultiSignature
551
+ | { Ed25519: any }
552
+ | { Sr25519: any }
553
+ | { Ecdsa: any }
554
+ | string
555
+ | Uint8Array,
528
556
  bucketId: H256 | string | Uint8Array,
529
- fileKey: H256 | string | Uint8Array,
530
557
  location: Bytes | string | Uint8Array,
531
558
  size: u64 | AnyNumber | Uint8Array,
532
559
  fingerprint: H256 | string | Uint8Array,
533
- maybeInclusionForestProof:
534
- | Option<SpTrieStorageProofCompactProof>
535
- | null
536
- | Uint8Array
537
- | SpTrieStorageProofCompactProof
538
- | { encodedNodes?: any }
539
- | string
560
+ bspId: Option<H256> | null | Uint8Array | H256 | string,
561
+ forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
540
562
  ) => SubmittableExtrinsic<ApiType>,
541
- [H256, H256, Bytes, u64, H256, Option<SpTrieStorageProofCompactProof>]
563
+ [
564
+ AccountId32,
565
+ PalletFileSystemFileOperationIntention,
566
+ SpRuntimeMultiSignature,
567
+ H256,
568
+ Bytes,
569
+ u64,
570
+ H256,
571
+ Option<H256>,
572
+ SpTrieStorageProofCompactProof
573
+ ]
574
+ >;
575
+ /**
576
+ * Delete a file from an incomplete (rejected, expired or revoked) storage request.
577
+ *
578
+ * This extrinsic allows fisherman nodes to delete files from providers when an IncompleteStorageRequestMetadata for the given file_key
579
+ * exist in the IncompleteStorageRequests mapping. It validates that the IncompleteStorageRequestMetadata exists,
580
+ * that the provider has the file in its Merkle Patricia Forest, and verifies the file key matches the metadata.
581
+ **/
582
+ deleteFileForIncompleteStorageRequest: AugmentedSubmittable<
583
+ (
584
+ fileKey: H256 | string | Uint8Array,
585
+ bspId: Option<H256> | null | Uint8Array | H256 | string,
586
+ forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
587
+ ) => SubmittableExtrinsic<ApiType>,
588
+ [H256, Option<H256>, SpTrieStorageProofCompactProof]
542
589
  >;
543
590
  /**
544
591
  * Issue a new storage request for a file
@@ -550,9 +597,19 @@ declare module "@polkadot/api-base/types/submittable" {
550
597
  fingerprint: H256 | string | Uint8Array,
551
598
  size: u64 | AnyNumber | Uint8Array,
552
599
  mspId: H256 | string | Uint8Array,
553
- peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[]
600
+ peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[],
601
+ replicationTarget:
602
+ | PalletFileSystemReplicationTarget
603
+ | { Basic: any }
604
+ | { Standard: any }
605
+ | { HighSecurity: any }
606
+ | { SuperHighSecurity: any }
607
+ | { UltraHighSecurity: any }
608
+ | { Custom: any }
609
+ | string
610
+ | Uint8Array
554
611
  ) => SubmittableExtrinsic<ApiType>,
555
- [H256, Bytes, H256, u64, H256, Vec<Bytes>]
612
+ [H256, Bytes, H256, u64, H256, Vec<Bytes>, PalletFileSystemReplicationTarget]
556
613
  >;
557
614
  mspRespondMoveBucketRequest: AugmentedSubmittable<
558
615
  (
@@ -579,35 +636,76 @@ declare module "@polkadot/api-base/types/submittable" {
579
636
  **/
580
637
  mspRespondStorageRequestsMultipleBuckets: AugmentedSubmittable<
581
638
  (
582
- fileKeyResponsesInput:
583
- | Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>>
584
- | [
585
- H256 | string | Uint8Array,
586
- (
587
- | PalletFileSystemMspStorageRequestResponse
588
- | { accept?: any; reject?: any }
589
- | string
590
- | Uint8Array
591
- )
592
- ][]
639
+ storageRequestMspResponse:
640
+ | Vec<PalletFileSystemStorageRequestMspBucketResponse>
641
+ | (
642
+ | PalletFileSystemStorageRequestMspBucketResponse
643
+ | { bucketId?: any; accept?: any; reject?: any }
644
+ | string
645
+ | Uint8Array
646
+ )[]
593
647
  ) => SubmittableExtrinsic<ApiType>,
594
- [Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>>]
648
+ [Vec<PalletFileSystemStorageRequestMspBucketResponse>]
649
+ >;
650
+ mspStopStoringBucket: AugmentedSubmittable<
651
+ (bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
652
+ [H256]
653
+ >;
654
+ /**
655
+ * Executed by a MSP to stop storing a bucket from an insolvent user.
656
+ *
657
+ * This is used when a user has become insolvent and the MSP needs to stop storing the buckets of that user, since
658
+ * it won't be getting paid for them anymore.
659
+ * It validates that:
660
+ * - The sender is the MSP that's currently storing the bucket, and the bucket exists.
661
+ * - That the user is currently insolvent OR
662
+ * - That the payment stream between the MSP and user doesn't exist (which would occur as a consequence of the MSP previously
663
+ * having deleted another bucket it was storing for this user through this extrinsic).
664
+ * And then completely removes the bucket from the system.
665
+ *
666
+ * If there was a storage request pending for the bucket, it will eventually expire without being fulfilled (because the MSP can't
667
+ * accept storage requests for insolvent users and BSPs can't volunteer nor confirm them either) and afterwards any BSPs that
668
+ * had confirmed the file can just call `sp_stop_storing_for_insolvent_user` to get rid of it.
669
+ **/
670
+ mspStopStoringBucketForInsolventUser: AugmentedSubmittable<
671
+ (bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
672
+ [H256]
595
673
  >;
596
- pendingFileDeletionRequestSubmitProof: AugmentedSubmittable<
674
+ /**
675
+ * Request deletion of a file using a signed delete intention.
676
+ *
677
+ * The origin must be signed and the signature must be valid for the given delete intention.
678
+ * The delete intention must contain the file key and the delete operation.
679
+ * File metadata is provided separately for ownership verification.
680
+ **/
681
+ requestDeleteFile: AugmentedSubmittable<
597
682
  (
598
- user: AccountId32 | string | Uint8Array,
599
- fileKey: H256 | string | Uint8Array,
683
+ signedIntention:
684
+ | PalletFileSystemFileOperationIntention
685
+ | { fileKey?: any; operation?: any }
686
+ | string
687
+ | Uint8Array,
688
+ signature:
689
+ | SpRuntimeMultiSignature
690
+ | { Ed25519: any }
691
+ | { Sr25519: any }
692
+ | { Ecdsa: any }
693
+ | string
694
+ | Uint8Array,
600
695
  bucketId: H256 | string | Uint8Array,
601
- forestProof: SpTrieStorageProofCompactProof | { encodedNodes?: any } | string | Uint8Array
696
+ location: Bytes | string | Uint8Array,
697
+ size: u64 | AnyNumber | Uint8Array,
698
+ fingerprint: H256 | string | Uint8Array
602
699
  ) => SubmittableExtrinsic<ApiType>,
603
- [AccountId32, H256, H256, SpTrieStorageProofCompactProof]
700
+ [PalletFileSystemFileOperationIntention, SpRuntimeMultiSignature, H256, Bytes, u64, H256]
604
701
  >;
605
702
  requestMoveBucket: AugmentedSubmittable<
606
703
  (
607
704
  bucketId: H256 | string | Uint8Array,
608
- newMspId: H256 | string | Uint8Array
705
+ newMspId: H256 | string | Uint8Array,
706
+ newValuePropId: H256 | string | Uint8Array
609
707
  ) => SubmittableExtrinsic<ApiType>,
610
- [H256, H256]
708
+ [H256, H256, H256]
611
709
  >;
612
710
  /**
613
711
  * Revoke storage request
@@ -616,13 +714,6 @@ declare module "@polkadot/api-base/types/submittable" {
616
714
  (fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
617
715
  [H256]
618
716
  >;
619
- setGlobalParameters: AugmentedSubmittable<
620
- (
621
- replicationTarget: Option<u32> | null | Uint8Array | u32 | AnyNumber,
622
- tickRangeToMaximumThreshold: Option<u32> | null | Uint8Array | u32 | AnyNumber
623
- ) => SubmittableExtrinsic<ApiType>,
624
- [Option<u32>, Option<u32>]
625
- >;
626
717
  /**
627
718
  * Executed by a SP to stop storing a file from an insolvent user.
628
719
  *
@@ -1845,38 +1936,6 @@ declare module "@polkadot/api-base/types/submittable" {
1845
1936
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
1846
1937
  };
1847
1938
  parachainSystem: {
1848
- /**
1849
- * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
1850
- * later.
1851
- *
1852
- * The `check_version` parameter sets a boolean flag for whether or not the runtime's spec
1853
- * version and name should be verified on upgrade. Since the authorization only has a hash,
1854
- * it cannot actually perform the verification.
1855
- *
1856
- * This call requires Root origin.
1857
- **/
1858
- authorizeUpgrade: AugmentedSubmittable<
1859
- (
1860
- codeHash: H256 | string | Uint8Array,
1861
- checkVersion: bool | boolean | Uint8Array
1862
- ) => SubmittableExtrinsic<ApiType>,
1863
- [H256, bool]
1864
- >;
1865
- /**
1866
- * Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
1867
- *
1868
- * If the authorization required a version check, this call will ensure the spec name
1869
- * remains unchanged and that the spec version has increased.
1870
- *
1871
- * Note that this function will not apply the new `code`, but only attempt to schedule the
1872
- * upgrade with the Relay Chain.
1873
- *
1874
- * All origins are allowed.
1875
- **/
1876
- enactAuthorizedUpgrade: AugmentedSubmittable<
1877
- (code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
1878
- [Bytes]
1879
- >;
1880
1939
  /**
1881
1940
  * Set the current validation data.
1882
1941
  *
@@ -1922,12 +1981,12 @@ declare module "@polkadot/api-base/types/submittable" {
1922
1981
  setParameter: AugmentedSubmittable<
1923
1982
  (
1924
1983
  keyValue:
1925
- | StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters
1984
+ | ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters
1926
1985
  | { RuntimeConfig: any }
1927
1986
  | string
1928
1987
  | Uint8Array
1929
1988
  ) => SubmittableExtrinsic<ApiType>,
1930
- [StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters]
1989
+ [ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters]
1931
1990
  >;
1932
1991
  /**
1933
1992
  * Generic tx
@@ -1935,6 +1994,44 @@ declare module "@polkadot/api-base/types/submittable" {
1935
1994
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
1936
1995
  };
1937
1996
  paymentStreams: {
1997
+ /**
1998
+ * Dispatchable extrinsic that allows Providers to charge multiple User's payment streams.
1999
+ *
2000
+ * The dispatch origin for this call must be Signed.
2001
+ * The origin must be the Provider that has at least one type of payment stream with each of the Users.
2002
+ *
2003
+ * Parameters:
2004
+ * - `user_accounts`: The array of User Account IDs that have payment streams with the Provider.
2005
+ *
2006
+ * This extrinsic will perform the following checks and logic:
2007
+ * 1. Check that the extrinsic was signed and get the signer.
2008
+ * 2. Check that the array of Users is not bigger than the maximum allowed.
2009
+ * 3. Execute a for loop for each User in the array of User Account IDs, in which it:
2010
+ * a. Checks that a payment stream between the signer (Provider) and the User exists
2011
+ * b. If there is a fixed-rate payment stream:
2012
+ * 1. Get the rate of the payment stream
2013
+ * 2. Get the difference between the last charged tick number and the last chargeable tick number of the stream
2014
+ * 3. Calculate the amount to charge doing `rate * difference`
2015
+ * 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
2016
+ * 5. Update the last charged tick number of the payment stream
2017
+ * c. If there is a dynamic-rate payment stream:
2018
+ * 1. Get the amount provided by the Provider
2019
+ * 2. Get the difference between price index when the stream was last charged and the price index at the last chargeable tick
2020
+ * 3. Calculate the amount to charge doing `amount_provided * difference`
2021
+ * 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
2022
+ * 5. Update the price index when the stream was last charged of the payment stream
2023
+ *
2024
+ * Emits a `PaymentStreamCharged` per User that had to pay and a `UsersCharged` event when successful.
2025
+ *
2026
+ * Notes: a Provider could have both a fixed-rate and a dynamic-rate payment stream with a User. If that's the case, this extrinsic
2027
+ * will try to charge both and the amount charged will be the sum of the amounts charged for each payment stream.
2028
+ **/
2029
+ chargeMultipleUsersPaymentStreams: AugmentedSubmittable<
2030
+ (
2031
+ userAccounts: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]
2032
+ ) => SubmittableExtrinsic<ApiType>,
2033
+ [Vec<AccountId32>]
2034
+ >;
1938
2035
  /**
1939
2036
  * Dispatchable extrinsic that allows Providers to charge a payment stream from a User.
1940
2037
  *
@@ -1971,7 +2068,7 @@ declare module "@polkadot/api-base/types/submittable" {
1971
2068
  >;
1972
2069
  /**
1973
2070
  * Dispatchable extrinsic that allows a user flagged as without funds long ago enough to clear this flag from its account,
1974
- * allowing it to begin contracting and paying for services again. If there's any outstanding debt, it will be charged and cleared.
2071
+ * allowing it to begin contracting and paying for services again. It should have previously paid all its outstanding debt.
1975
2072
  *
1976
2073
  * The dispatch origin for this call must be Signed.
1977
2074
  * The origin must be the User that has been flagged as without funds.
@@ -1980,18 +2077,10 @@ declare module "@polkadot/api-base/types/submittable" {
1980
2077
  * 1. Check that the extrinsic was signed and get the signer.
1981
2078
  * 2. Check that the user has been flagged as without funds.
1982
2079
  * 3. Check that the cooldown period has passed since the user was flagged as without funds.
1983
- * 4. Check if there's any outstanding debt and charge it. This is done by:
1984
- * a. Releasing any remaining funds held as a deposit for each payment stream.
1985
- * b. Getting all payment streams of the user and charging them, paying the Providers for the services.
1986
- * c. Returning the User any remaining funds.
1987
- * d. Deleting all payment streams of the user.
2080
+ * 4. Check that there's no remaining outstanding debt.
1988
2081
  * 5. Unflag the user as without funds.
1989
2082
  *
1990
2083
  * Emits a 'UserSolvent' event when successful.
1991
- *
1992
- * Notes: this extrinsic iterates over all remaining payment streams of the user and charges them, so it can be expensive in terms of weight.
1993
- * The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
1994
- * finds more convenient to wait for Providers to get its deposits one by one instead.
1995
2084
  **/
1996
2085
  clearInsolventFlag: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1997
2086
  /**
@@ -2099,8 +2188,8 @@ declare module "@polkadot/api-base/types/submittable" {
2099
2188
  [H256, AccountId32]
2100
2189
  >;
2101
2190
  /**
2102
- * Dispatchable extrinsic that allows a user flagged as without funds to pay all remaining payment streams to be able to recover
2103
- * its deposits.
2191
+ * Dispatchable extrinsic that allows a user flagged as without funds to pay the Providers that still have payment streams
2192
+ * with it, in order to recover as much of its deposits as possible.
2104
2193
  *
2105
2194
  * The dispatch origin for this call must be Signed.
2106
2195
  * The origin must be the User that has been flagged as without funds.
@@ -2108,17 +2197,23 @@ declare module "@polkadot/api-base/types/submittable" {
2108
2197
  * This extrinsic will perform the following checks and logic:
2109
2198
  * 1. Check that the extrinsic was signed and get the signer.
2110
2199
  * 2. Check that the user has been flagged as without funds.
2111
- * 3. Release the user's funds that were held as a deposit for each payment stream.
2112
- * 4. Get all payment streams of the user and charge them, paying the Providers for the services.
2113
- * 5. Delete all payment streams of the user.
2200
+ * 3. Release the user's funds that were held as a deposit for each payment stream to be paid.
2201
+ * 4. Get the payment streams that the user has with the provided list of Providers, and pay them for the services.
2202
+ * 5. Delete the charged payment streams of the user.
2114
2203
  *
2115
- * Emits a 'UserPaidDebts' event when successful.
2204
+ * Emits a 'UserPaidSomeDebts' event when successful if the user has remaining debts. If the user has successfully paid all its debts,
2205
+ * it emits a 'UserPaidAllDebts' event.
2116
2206
  *
2117
- * Notes: this extrinsic iterates over all payment streams of the user and charges them, so it can be expensive in terms of weight.
2118
- * The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
2119
- * finds more convenient to wait for Providers to get its deposits one by one instead.
2207
+ * Notes: this extrinsic iterates over the provided list of Providers, getting the payment streams they have with the user and charging
2208
+ * them, so the execution could get expensive. It's recommended to provide a list of Providers that the user actually has payment streams with,
2209
+ * which can be obtained by calling the `get_providers_with_payment_streams_with_user` runtime API.
2210
+ * There was an idea to limit the amount of Providers that can be received by this extrinsic using a constant in the configuration of this pallet,
2211
+ * but the correct benchmarking of this extrinsic should be enough to avoid any potential abuse.
2120
2212
  **/
2121
- payOutstandingDebt: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
2213
+ payOutstandingDebt: AugmentedSubmittable<
2214
+ (providers: Vec<H256> | (H256 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>,
2215
+ [Vec<H256>]
2216
+ >;
2122
2217
  /**
2123
2218
  * Dispatchable extrinsic that allows root to update an existing dynamic-rate payment stream between a User and a Provider.
2124
2219
  *
@@ -2189,16 +2284,16 @@ declare module "@polkadot/api-base/types/submittable" {
2189
2284
  (
2190
2285
  assets:
2191
2286
  | XcmVersionedAssets
2192
- | { V2: any }
2193
2287
  | { V3: any }
2194
2288
  | { V4: any }
2289
+ | { V5: any }
2195
2290
  | string
2196
2291
  | Uint8Array,
2197
2292
  beneficiary:
2198
2293
  | XcmVersionedLocation
2199
- | { V2: any }
2200
2294
  | { V3: any }
2201
2295
  | { V4: any }
2296
+ | { V5: any }
2202
2297
  | string
2203
2298
  | Uint8Array
2204
2299
  ) => SubmittableExtrinsic<ApiType>,
@@ -2216,7 +2311,7 @@ declare module "@polkadot/api-base/types/submittable" {
2216
2311
  **/
2217
2312
  execute: AugmentedSubmittable<
2218
2313
  (
2219
- message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array,
2314
+ message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array,
2220
2315
  maxWeight:
2221
2316
  | SpWeightsWeightV2Weight
2222
2317
  | { refTime?: any; proofSize?: any }
@@ -2248,9 +2343,9 @@ declare module "@polkadot/api-base/types/submittable" {
2248
2343
  (
2249
2344
  location:
2250
2345
  | XcmVersionedLocation
2251
- | { V2: any }
2252
2346
  | { V3: any }
2253
2347
  | { V4: any }
2348
+ | { V5: any }
2254
2349
  | string
2255
2350
  | Uint8Array
2256
2351
  ) => SubmittableExtrinsic<ApiType>,
@@ -2278,9 +2373,9 @@ declare module "@polkadot/api-base/types/submittable" {
2278
2373
  (
2279
2374
  location:
2280
2375
  | XcmVersionedLocation
2281
- | { V2: any }
2282
2376
  | { V3: any }
2283
2377
  | { V4: any }
2378
+ | { V5: any }
2284
2379
  | string
2285
2380
  | Uint8Array
2286
2381
  ) => SubmittableExtrinsic<ApiType>,
@@ -2296,10 +2391,10 @@ declare module "@polkadot/api-base/types/submittable" {
2296
2391
  **/
2297
2392
  forceXcmVersion: AugmentedSubmittable<
2298
2393
  (
2299
- location: StagingXcmV4Location | { parents?: any; interior?: any } | string | Uint8Array,
2394
+ location: StagingXcmV5Location | { parents?: any; interior?: any } | string | Uint8Array,
2300
2395
  version: u32 | AnyNumber | Uint8Array
2301
2396
  ) => SubmittableExtrinsic<ApiType>,
2302
- [StagingXcmV4Location, u32]
2397
+ [StagingXcmV5Location, u32]
2303
2398
  >;
2304
2399
  /**
2305
2400
  * Transfer some assets from the local chain to the destination chain through their local,
@@ -2337,23 +2432,23 @@ declare module "@polkadot/api-base/types/submittable" {
2337
2432
  (
2338
2433
  dest:
2339
2434
  | XcmVersionedLocation
2340
- | { V2: any }
2341
2435
  | { V3: any }
2342
2436
  | { V4: any }
2437
+ | { V5: any }
2343
2438
  | string
2344
2439
  | Uint8Array,
2345
2440
  beneficiary:
2346
2441
  | XcmVersionedLocation
2347
- | { V2: any }
2348
2442
  | { V3: any }
2349
2443
  | { V4: any }
2444
+ | { V5: any }
2350
2445
  | string
2351
2446
  | Uint8Array,
2352
2447
  assets:
2353
2448
  | XcmVersionedAssets
2354
- | { V2: any }
2355
2449
  | { V3: any }
2356
2450
  | { V4: any }
2451
+ | { V5: any }
2357
2452
  | string
2358
2453
  | Uint8Array,
2359
2454
  feeAssetItem: u32 | AnyNumber | Uint8Array,
@@ -2390,23 +2485,23 @@ declare module "@polkadot/api-base/types/submittable" {
2390
2485
  (
2391
2486
  dest:
2392
2487
  | XcmVersionedLocation
2393
- | { V2: any }
2394
2488
  | { V3: any }
2395
2489
  | { V4: any }
2490
+ | { V5: any }
2396
2491
  | string
2397
2492
  | Uint8Array,
2398
2493
  beneficiary:
2399
2494
  | XcmVersionedLocation
2400
- | { V2: any }
2401
2495
  | { V3: any }
2402
2496
  | { V4: any }
2497
+ | { V5: any }
2403
2498
  | string
2404
2499
  | Uint8Array,
2405
2500
  assets:
2406
2501
  | XcmVersionedAssets
2407
- | { V2: any }
2408
2502
  | { V3: any }
2409
2503
  | { V4: any }
2504
+ | { V5: any }
2410
2505
  | string
2411
2506
  | Uint8Array,
2412
2507
  feeAssetItem: u32 | AnyNumber | Uint8Array,
@@ -2455,23 +2550,23 @@ declare module "@polkadot/api-base/types/submittable" {
2455
2550
  (
2456
2551
  dest:
2457
2552
  | XcmVersionedLocation
2458
- | { V2: any }
2459
2553
  | { V3: any }
2460
2554
  | { V4: any }
2555
+ | { V5: any }
2461
2556
  | string
2462
2557
  | Uint8Array,
2463
2558
  beneficiary:
2464
2559
  | XcmVersionedLocation
2465
- | { V2: any }
2466
2560
  | { V3: any }
2467
2561
  | { V4: any }
2562
+ | { V5: any }
2468
2563
  | string
2469
2564
  | Uint8Array,
2470
2565
  assets:
2471
2566
  | XcmVersionedAssets
2472
- | { V2: any }
2473
2567
  | { V3: any }
2474
2568
  | { V4: any }
2569
+ | { V5: any }
2475
2570
  | string
2476
2571
  | Uint8Array,
2477
2572
  feeAssetItem: u32 | AnyNumber | Uint8Array
@@ -2482,12 +2577,12 @@ declare module "@polkadot/api-base/types/submittable" {
2482
2577
  (
2483
2578
  dest:
2484
2579
  | XcmVersionedLocation
2485
- | { V2: any }
2486
2580
  | { V3: any }
2487
2581
  | { V4: any }
2582
+ | { V5: any }
2488
2583
  | string
2489
2584
  | Uint8Array,
2490
- message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array
2585
+ message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array
2491
2586
  ) => SubmittableExtrinsic<ApiType>,
2492
2587
  [XcmVersionedLocation, XcmVersionedXcm]
2493
2588
  >;
@@ -2515,23 +2610,23 @@ declare module "@polkadot/api-base/types/submittable" {
2515
2610
  (
2516
2611
  dest:
2517
2612
  | XcmVersionedLocation
2518
- | { V2: any }
2519
2613
  | { V3: any }
2520
2614
  | { V4: any }
2615
+ | { V5: any }
2521
2616
  | string
2522
2617
  | Uint8Array,
2523
2618
  beneficiary:
2524
2619
  | XcmVersionedLocation
2525
- | { V2: any }
2526
2620
  | { V3: any }
2527
2621
  | { V4: any }
2622
+ | { V5: any }
2528
2623
  | string
2529
2624
  | Uint8Array,
2530
2625
  assets:
2531
2626
  | XcmVersionedAssets
2532
- | { V2: any }
2533
2627
  | { V3: any }
2534
2628
  | { V4: any }
2629
+ | { V5: any }
2535
2630
  | string
2536
2631
  | Uint8Array,
2537
2632
  feeAssetItem: u32 | AnyNumber | Uint8Array
@@ -2577,23 +2672,23 @@ declare module "@polkadot/api-base/types/submittable" {
2577
2672
  (
2578
2673
  dest:
2579
2674
  | XcmVersionedLocation
2580
- | { V2: any }
2581
2675
  | { V3: any }
2582
2676
  | { V4: any }
2677
+ | { V5: any }
2583
2678
  | string
2584
2679
  | Uint8Array,
2585
2680
  beneficiary:
2586
2681
  | XcmVersionedLocation
2587
- | { V2: any }
2588
2682
  | { V3: any }
2589
2683
  | { V4: any }
2684
+ | { V5: any }
2590
2685
  | string
2591
2686
  | Uint8Array,
2592
2687
  assets:
2593
2688
  | XcmVersionedAssets
2594
- | { V2: any }
2595
2689
  | { V3: any }
2596
2690
  | { V4: any }
2691
+ | { V5: any }
2597
2692
  | string
2598
2693
  | Uint8Array,
2599
2694
  feeAssetItem: u32 | AnyNumber | Uint8Array,
@@ -2660,16 +2755,16 @@ declare module "@polkadot/api-base/types/submittable" {
2660
2755
  (
2661
2756
  dest:
2662
2757
  | XcmVersionedLocation
2663
- | { V2: any }
2664
2758
  | { V3: any }
2665
2759
  | { V4: any }
2760
+ | { V5: any }
2666
2761
  | string
2667
2762
  | Uint8Array,
2668
2763
  assets:
2669
2764
  | XcmVersionedAssets
2670
- | { V2: any }
2671
2765
  | { V3: any }
2672
2766
  | { V4: any }
2767
+ | { V5: any }
2673
2768
  | string
2674
2769
  | Uint8Array,
2675
2770
  assetsTransferType:
@@ -2680,7 +2775,13 @@ declare module "@polkadot/api-base/types/submittable" {
2680
2775
  | { RemoteReserve: any }
2681
2776
  | string
2682
2777
  | Uint8Array,
2683
- remoteFeesId: XcmVersionedAssetId | { V3: any } | { V4: any } | string | Uint8Array,
2778
+ remoteFeesId:
2779
+ | XcmVersionedAssetId
2780
+ | { V3: any }
2781
+ | { V4: any }
2782
+ | { V5: any }
2783
+ | string
2784
+ | Uint8Array,
2684
2785
  feesTransferType:
2685
2786
  | StagingXcmExecutorAssetTransferTransferType
2686
2787
  | { Teleport: any }
@@ -2691,9 +2792,9 @@ declare module "@polkadot/api-base/types/submittable" {
2691
2792
  | Uint8Array,
2692
2793
  customXcmOnDest:
2693
2794
  | XcmVersionedXcm
2694
- | { V2: any }
2695
2795
  | { V3: any }
2696
2796
  | { V4: any }
2797
+ | { V5: any }
2697
2798
  | string
2698
2799
  | Uint8Array,
2699
2800
  weightLimit:
@@ -2722,7 +2823,7 @@ declare module "@polkadot/api-base/types/submittable" {
2722
2823
  /**
2723
2824
  * Introduce a new challenge.
2724
2825
  *
2725
- * This function allows anyone to add a new challenge to the `ChallengesQueue`.
2826
+ * This function allows authorized origins to add a new challenge to the `ChallengesQueue`.
2726
2827
  * The challenge will be dispatched in the coming blocks.
2727
2828
  * Users are charged a small fee for submitting a challenge, which
2728
2829
  * goes to the Treasury.
@@ -2743,6 +2844,13 @@ declare module "@polkadot/api-base/types/submittable" {
2743
2844
  (provider: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
2744
2845
  [H256]
2745
2846
  >;
2847
+ priorityChallenge: AugmentedSubmittable<
2848
+ (
2849
+ key: H256 | string | Uint8Array,
2850
+ shouldRemoveKey: bool | boolean | Uint8Array
2851
+ ) => SubmittableExtrinsic<ApiType>,
2852
+ [H256, bool]
2853
+ >;
2746
2854
  /**
2747
2855
  * Set the [`ChallengesTickerPaused`] to `true` or `false`.
2748
2856
  *
@@ -2759,19 +2867,23 @@ declare module "@polkadot/api-base/types/submittable" {
2759
2867
  * is provided, the proof submitter is considered to be the Provider.
2760
2868
  * Relies on a Providers pallet to get the root for the Provider.
2761
2869
  * Validates that the proof corresponds to a challenge that was made in the past,
2762
- * by checking the `TickToChallengesSeed` StorageMap. The challenge tick that the
2763
- * Provider should have submitted a proof is calculated based on the last tick they
2764
- * submitted a proof for ([`LastTickProviderSubmittedAProofFor`]), and the proving period for
2765
- * that Provider, which is a function of their stake.
2870
+ * by checking the [`TickToChallengesSeed`] StorageMap. The challenge tick that the
2871
+ * Provider should be submitting a proof for is retrieved from [`ProviderToProofSubmissionRecord`],
2872
+ * and it was calculated based on the last tick they submitted a proof for, and the challenge
2873
+ * period for that Provider, at the time of the previous proof submission or when it was
2874
+ * marked as slashable.
2875
+ *
2766
2876
  * This extrinsic also checks that there hasn't been a checkpoint challenge round
2767
2877
  * in between the last time the Provider submitted a proof for and the tick
2768
2878
  * for which the proof is being submitted. If there has been, the Provider is
2769
- * subject to slashing.
2879
+ * expected to include responses to the checkpoint challenges in the proof.
2770
2880
  *
2771
2881
  * If valid:
2772
2882
  * - Pushes forward the Provider in the [`TickToProvidersDeadlines`] StorageMap a number
2773
2883
  * of ticks corresponding to the stake of the Provider.
2774
- * - Registers this tick as the last tick in which the Provider submitted a proof.
2884
+ * - Registers the last tick for which the Provider submitted a proof for in
2885
+ * [`ProviderToProofSubmissionRecord`], as well as the next tick for which the Provider
2886
+ * should submit a proof for.
2775
2887
  *
2776
2888
  * Execution of this extrinsic should be refunded if the proof is valid.
2777
2889
  **/
@@ -2793,32 +2905,42 @@ declare module "@polkadot/api-base/types/submittable" {
2793
2905
  };
2794
2906
  providers: {
2795
2907
  /**
2796
- * Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
2908
+ * Dispatchable extrinsic that allows BSPs and MSPs to add a new multiaddress to their account.
2797
2909
  *
2798
2910
  * The dispatch origin for this call must be Signed.
2799
- * The origin must be the account that wants to add a value proposition.
2911
+ * The origin must be the account that wants to add a new multiaddress.
2800
2912
  *
2801
2913
  * Parameters:
2802
- * - `new_value_prop`: The value proposition that the MSP wants to add to its service.
2914
+ * - `new_multiaddress`: The new multiaddress that the signer wants to add to its account.
2803
2915
  *
2804
2916
  * This extrinsic will perform the following checks and logic:
2805
2917
  * 1. Check that the extrinsic was signed and get the signer.
2806
- * 2. Check that the signer is registered as a MSP
2807
- * 3. Check that the MSP has not reached the maximum amount of value propositions
2808
- * 4. Check that the value proposition is valid (size and any other relevant checks)
2809
- * 5. Update the MSPs storage to add the value proposition (with its identifier)
2918
+ * 2. Check that the signer is registered as a MSP or BSP.
2919
+ * 3. Check that the Provider has not reached the maximum amount of multiaddresses.
2920
+ * 4. Check that the multiaddress is valid (size and any other relevant checks). TODO: Implement this.
2921
+ * 5. Update the Provider's storage to add the multiaddress.
2922
+ *
2923
+ * Emits `MultiAddressAdded` event when successful.
2924
+ **/
2925
+ addMultiaddress: AugmentedSubmittable<
2926
+ (newMultiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
2927
+ [Bytes]
2928
+ >;
2929
+ /**
2930
+ * Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
2931
+ *
2932
+ * The dispatch origin for this call must be Signed.
2933
+ * The origin must be the account that wants to add a value proposition.
2810
2934
  *
2811
2935
  * Emits `ValuePropAdded` event when successful.
2812
2936
  **/
2813
2937
  addValueProp: AugmentedSubmittable<
2814
2938
  (
2815
- newValueProp:
2816
- | PalletStorageProvidersValueProposition
2817
- | { identifier?: any; dataLimit?: any; protocols?: any }
2818
- | string
2819
- | Uint8Array
2939
+ pricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array,
2940
+ commitment: Bytes | string | Uint8Array,
2941
+ bucketDataLimit: u64 | AnyNumber | Uint8Array
2820
2942
  ) => SubmittableExtrinsic<ApiType>,
2821
- [PalletStorageProvidersValueProposition]
2943
+ [u128, Bytes, u64]
2822
2944
  >;
2823
2945
  /**
2824
2946
  * Dispatchable extrinsic that allows users to sign off as a Backup Storage Provider.
@@ -2906,7 +3028,7 @@ declare module "@polkadot/api-base/types/submittable" {
2906
3028
  * Notes:
2907
3029
  * - This extrinsic could be called by the user itself or by a third party
2908
3030
  * - The deposit that the user has to pay to register as a SP is held when the user requests to register as a SP
2909
- * - If this extrinsic is successful, it will be free for the caller, to incentive state debloating
3031
+ * - If this extrinsic is successful, it will be free for the caller, to incentive state de-bloating
2910
3032
  **/
2911
3033
  confirmSignUp: AugmentedSubmittable<
2912
3034
  (
@@ -2914,6 +3036,27 @@ declare module "@polkadot/api-base/types/submittable" {
2914
3036
  ) => SubmittableExtrinsic<ApiType>,
2915
3037
  [Option<AccountId32>]
2916
3038
  >;
3039
+ /**
3040
+ * Delete a provider from the system.
3041
+ *
3042
+ * This can only be done if the following conditions are met:
3043
+ * - The provider is insolvent.
3044
+ * - The provider has no active payment streams.
3045
+ *
3046
+ * This is a free operation and can be called by anyone with a signed transaction.
3047
+ *
3048
+ * You can utilize the runtime API `can_delete_provider` to check if a provider can be deleted
3049
+ * to automate the process.
3050
+ *
3051
+ * Emits `MspDeleted` or `BspDeleted` event when successful.
3052
+ *
3053
+ * This operation is free if successful to encourage the community to delete insolvent providers,
3054
+ * debloating the state.
3055
+ **/
3056
+ deleteProvider: AugmentedSubmittable<
3057
+ (providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
3058
+ [H256]
3059
+ >;
2917
3060
  /**
2918
3061
  * Dispatchable extrinsic that allows to forcefully and automatically sing up a Backup Storage Provider.
2919
3062
  *
@@ -2947,7 +3090,7 @@ declare module "@polkadot/api-base/types/submittable" {
2947
3090
  [AccountId32, H256, u64, Vec<Bytes>, AccountId32, Option<u32>]
2948
3091
  >;
2949
3092
  /**
2950
- * Dispatchable extrinsic that allows to forcefully and automatically sing up a Main Storage Provider.
3093
+ * Dispatchable extrinsic that allows to forcefully and automatically sign up a Main Storage Provider.
2951
3094
  *
2952
3095
  * The dispatch origin for this call must be Root.
2953
3096
  * The `who` parameter is the account that wants to sign up as a Main Storage Provider.
@@ -2976,14 +3119,22 @@ declare module "@polkadot/api-base/types/submittable" {
2976
3119
  mspId: H256 | string | Uint8Array,
2977
3120
  capacity: u64 | AnyNumber | Uint8Array,
2978
3121
  multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
2979
- valueProp:
2980
- | PalletStorageProvidersValueProposition
2981
- | { identifier?: any; dataLimit?: any; protocols?: any }
2982
- | string
2983
- | Uint8Array,
3122
+ valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array,
3123
+ commitment: Bytes | string | Uint8Array,
3124
+ valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array,
2984
3125
  paymentAccount: AccountId32 | string | Uint8Array
2985
3126
  ) => SubmittableExtrinsic<ApiType>,
2986
- [AccountId32, H256, u64, Vec<Bytes>, PalletStorageProvidersValueProposition, AccountId32]
3127
+ [AccountId32, H256, u64, Vec<Bytes>, u128, Bytes, u64, AccountId32]
3128
+ >;
3129
+ /**
3130
+ * Dispatchable extrinsic only callable by an MSP that allows it to make a value proposition unavailable.
3131
+ *
3132
+ * This operation cannot be reversed. You can only add new value propositions.
3133
+ * This will not affect existing buckets which are using this value proposition.
3134
+ **/
3135
+ makeValuePropUnavailable: AugmentedSubmittable<
3136
+ (valuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
3137
+ [H256]
2987
3138
  >;
2988
3139
  /**
2989
3140
  * Dispatchable extrinsic that allows users to sign off as a Main Storage Provider.
@@ -3001,7 +3152,31 @@ declare module "@polkadot/api-base/types/submittable" {
3001
3152
  *
3002
3153
  * Emits `MspSignOffSuccess` event when successful.
3003
3154
  **/
3004
- mspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
3155
+ mspSignOff: AugmentedSubmittable<
3156
+ (mspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
3157
+ [H256]
3158
+ >;
3159
+ /**
3160
+ * Dispatchable extrinsic that allows BSPs and MSPs to remove an existing multiaddress from their account.
3161
+ *
3162
+ * The dispatch origin for this call must be Signed.
3163
+ * The origin must be the account that wants to remove a multiaddress.
3164
+ *
3165
+ * Parameters:
3166
+ * - `multiaddress`: The multiaddress that the signer wants to remove from its account.
3167
+ *
3168
+ * This extrinsic will perform the following checks and logic:
3169
+ * 1. Check that the extrinsic was signed and get the signer.
3170
+ * 2. Check that the signer is registered as a MSP or BSP.
3171
+ * 3. Check that the multiaddress exists in the Provider's account.
3172
+ * 4. Update the Provider's storage to remove the multiaddress.
3173
+ *
3174
+ * Emits `MultiAddressRemoved` event when successful.
3175
+ **/
3176
+ removeMultiaddress: AugmentedSubmittable<
3177
+ (multiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
3178
+ [Bytes]
3179
+ >;
3005
3180
  /**
3006
3181
  * Dispatchable extrinsic that allows users to sign up as a Backup Storage Provider.
3007
3182
  *
@@ -3067,25 +3242,42 @@ declare module "@polkadot/api-base/types/submittable" {
3067
3242
  (
3068
3243
  capacity: u64 | AnyNumber | Uint8Array,
3069
3244
  multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[],
3070
- valueProp:
3071
- | PalletStorageProvidersValueProposition
3072
- | { identifier?: any; dataLimit?: any; protocols?: any }
3073
- | string
3074
- | Uint8Array,
3245
+ valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array,
3246
+ commitment: Bytes | string | Uint8Array,
3247
+ valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array,
3075
3248
  paymentAccount: AccountId32 | string | Uint8Array
3076
3249
  ) => SubmittableExtrinsic<ApiType>,
3077
- [u64, Vec<Bytes>, PalletStorageProvidersValueProposition, AccountId32]
3250
+ [u64, Vec<Bytes>, u128, Bytes, u64, AccountId32]
3078
3251
  >;
3079
3252
  /**
3080
3253
  * Dispatchable extrinsic to slash a _slashable_ Storage Provider.
3081
3254
  *
3082
3255
  * A Storage Provider is _slashable_ iff it has failed to respond to challenges for providing proofs of storage.
3083
3256
  * In the context of the StorageHub protocol, the proofs-dealer pallet marks a Storage Provider as _slashable_ when it fails to respond to challenges.
3257
+ *
3258
+ * This is a free operation to incentivise the community to slash misbehaving providers.
3084
3259
  **/
3085
3260
  slash: AugmentedSubmittable<
3086
3261
  (providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>,
3087
3262
  [H256]
3088
3263
  >;
3264
+ /**
3265
+ * BSP operation to stop all of your automatic cycles.
3266
+ *
3267
+ * This includes:
3268
+ *
3269
+ * - Commit reveal randomness cycle
3270
+ * - Proof challenge cycle
3271
+ *
3272
+ * If you are an BSP, the only requirement that must be met is that your root is the default one (an empty root).
3273
+ **/
3274
+ stopAllCycles: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
3275
+ /**
3276
+ * Dispatchable extrinsic to top-up the deposit of a Storage Provider.
3277
+ *
3278
+ * The dispatch origin for this call must be signed.
3279
+ **/
3280
+ topUpDeposit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
3089
3281
  /**
3090
3282
  * Generic tx
3091
3283
  **/
@@ -3132,10 +3324,10 @@ declare module "@polkadot/api-base/types/submittable" {
3132
3324
  **/
3133
3325
  setKeys: AugmentedSubmittable<
3134
3326
  (
3135
- keys: StorageHubRuntimeSessionKeys | { aura?: any } | string | Uint8Array,
3327
+ keys: ShParachainRuntimeSessionKeys | { aura?: any } | string | Uint8Array,
3136
3328
  proof: Bytes | string | Uint8Array
3137
3329
  ) => SubmittableExtrinsic<ApiType>,
3138
- [StorageHubRuntimeSessionKeys, Bytes]
3330
+ [ShParachainRuntimeSessionKeys, Bytes]
3139
3331
  >;
3140
3332
  /**
3141
3333
  * Generic tx