@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
@@ -3,7 +3,7 @@ import type { ApiTypes, AugmentedSubmittable, SubmittableExtrinsic, SubmittableE
3
3
  import type { Bytes, Compact, Option, Vec, bool, u128, u32, u64 } from "@polkadot/types-codec";
4
4
  import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
5
5
  import type { AccountId32, Call, H256, MultiAddress } from "@polkadot/types/interfaces/runtime";
6
- import type { CumulusPrimitivesCoreAggregateMessageOrigin, CumulusPrimitivesParachainInherentParachainInherentData, PalletBalancesAdjustmentDirection, PalletFileSystemBucketMoveRequestResponse, PalletFileSystemMspStorageRequestResponse, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletProofsDealerProof, PalletStorageProvidersValueProposition, ShpFileKeyVerifierFileKeyProof, SpRuntimeMultiSignature, SpTrieStorageProofCompactProof, SpWeightsWeightV2Weight, StagingXcmExecutorAssetTransferTransferType, StagingXcmV4Location, StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters, StorageHubRuntimeSessionKeys, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup";
6
+ import type { CumulusPrimitivesCoreAggregateMessageOrigin, CumulusPrimitivesParachainInherentParachainInherentData, PalletBalancesAdjustmentDirection, PalletFileSystemBucketMoveRequestResponse, PalletFileSystemFileKeyWithProof, PalletFileSystemFileOperationIntention, PalletFileSystemReplicationTarget, PalletFileSystemStorageRequestMspBucketResponse, PalletNftsAttributeNamespace, PalletNftsCancelAttributesApprovalWitness, PalletNftsCollectionConfig, PalletNftsDestroyWitness, PalletNftsItemConfig, PalletNftsItemTip, PalletNftsMintSettings, PalletNftsMintWitness, PalletNftsPreSignedAttributes, PalletNftsPreSignedMint, PalletNftsPriceWithDirection, PalletProofsDealerProof, ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters, ShParachainRuntimeSessionKeys, SpRuntimeMultiSignature, SpTrieStorageProofCompactProof, SpWeightsWeightV2Weight, StagingXcmExecutorAssetTransferTransferType, StagingXcmV5Location, XcmV3WeightLimit, XcmVersionedAssetId, XcmVersionedAssets, XcmVersionedLocation, XcmVersionedXcm } from "@polkadot/types/lookup";
7
7
  export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
8
8
  export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
9
9
  export type __SubmittableExtrinsicFunction<ApiType extends ApiTypes> = SubmittableExtrinsicFunction<ApiType>;
@@ -341,12 +341,6 @@ declare module "@polkadot/api-base/types/submittable" {
341
341
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
342
342
  };
343
343
  fileSystem: {
344
- /**
345
- * Add yourself as a data server for providing the files of the bucket requested to be moved.
346
- **/
347
- bspAddDataServerForMoveBucketRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
348
- H256
349
- ]>;
350
344
  /**
351
345
  * Executed by a BSP to confirm to stop storing a file.
352
346
  *
@@ -365,15 +359,12 @@ declare module "@polkadot/api-base/types/submittable" {
365
359
  **/
366
360
  bspConfirmStoring: AugmentedSubmittable<(nonInclusionForestProof: SpTrieStorageProofCompactProof | {
367
361
  encodedNodes?: any;
368
- } | string | Uint8Array, fileKeysAndProofs: Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>> | [
369
- H256 | string | Uint8Array,
370
- (ShpFileKeyVerifierFileKeyProof | {
371
- fileMetadata?: any;
372
- proof?: any;
373
- } | string | Uint8Array)
374
- ][]) => SubmittableExtrinsic<ApiType>, [
362
+ } | string | Uint8Array, fileKeysAndProofs: Vec<PalletFileSystemFileKeyWithProof> | (PalletFileSystemFileKeyWithProof | {
363
+ fileKey?: any;
364
+ proof?: any;
365
+ } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
375
366
  SpTrieStorageProofCompactProof,
376
- Vec<ITuple<[H256, ShpFileKeyVerifierFileKeyProof]>>
367
+ Vec<PalletFileSystemFileKeyWithProof>
377
368
  ]>;
378
369
  /**
379
370
  * Executed by a BSP to request to stop storing a file.
@@ -414,31 +405,93 @@ declare module "@polkadot/api-base/types/submittable" {
414
405
  createAndAssociateCollectionWithBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
415
406
  H256
416
407
  ]>;
417
- createBucket: AugmentedSubmittable<(mspId: H256 | string | Uint8Array, name: Bytes | string | Uint8Array, private: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
408
+ createBucket: AugmentedSubmittable<(mspId: H256 | string | Uint8Array, name: Bytes | string | Uint8Array, private: bool | boolean | Uint8Array, valuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
418
409
  H256,
419
410
  Bytes,
420
- bool
411
+ bool,
412
+ H256
421
413
  ]>;
422
- deleteFile: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, fileKey: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, fingerprint: H256 | string | Uint8Array, maybeInclusionForestProof: Option<SpTrieStorageProofCompactProof> | null | Uint8Array | SpTrieStorageProofCompactProof | {
414
+ /**
415
+ * Dispatchable extrinsic that allows a User to delete any of their buckets if it is currently empty.
416
+ * This way, the User is allowed to remove now unused buckets to recover their deposit for them.
417
+ *
418
+ * The User must provide the BucketId of the bucket they want to delete, which should correspond to a
419
+ * bucket that is both theirs and currently empty.
420
+ *
421
+ * To check if a bucket is empty, we compare its current root with the one of an empty trie.
422
+ **/
423
+ deleteBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
424
+ H256
425
+ ]>;
426
+ /**
427
+ * Deletes a file from a provider's forest, changing its root
428
+ *
429
+ * This extrinsic allows any actor to execute file deletion based on signed intentions
430
+ * from the `FileDeletionRequested` event. It requires a valid forest proof showing that the
431
+ * file exists in the specified provider's forest before allowing deletion.
432
+ *
433
+ * If `bsp_id` is `None`, the file will be deleted from the bucket forest.
434
+ * If `bsp_id` is `Some(id)`, the file will be deleted from the specified BSP's forest.
435
+ **/
436
+ deleteFile: AugmentedSubmittable<(fileOwner: AccountId32 | string | Uint8Array, signedIntention: PalletFileSystemFileOperationIntention | {
437
+ fileKey?: any;
438
+ operation?: any;
439
+ } | string | Uint8Array, signature: SpRuntimeMultiSignature | {
440
+ Ed25519: any;
441
+ } | {
442
+ Sr25519: any;
443
+ } | {
444
+ Ecdsa: any;
445
+ } | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, fingerprint: H256 | string | Uint8Array, bspId: Option<H256> | null | Uint8Array | H256 | string, forestProof: SpTrieStorageProofCompactProof | {
423
446
  encodedNodes?: any;
424
- } | string) => SubmittableExtrinsic<ApiType>, [
425
- H256,
447
+ } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
448
+ AccountId32,
449
+ PalletFileSystemFileOperationIntention,
450
+ SpRuntimeMultiSignature,
426
451
  H256,
427
452
  Bytes,
428
453
  u64,
429
454
  H256,
430
- Option<SpTrieStorageProofCompactProof>
455
+ Option<H256>,
456
+ SpTrieStorageProofCompactProof
457
+ ]>;
458
+ /**
459
+ * Delete a file from an incomplete (rejected, expired or revoked) storage request.
460
+ *
461
+ * This extrinsic allows fisherman nodes to delete files from providers when an IncompleteStorageRequestMetadata for the given file_key
462
+ * exist in the IncompleteStorageRequests mapping. It validates that the IncompleteStorageRequestMetadata exists,
463
+ * that the provider has the file in its Merkle Patricia Forest, and verifies the file key matches the metadata.
464
+ **/
465
+ deleteFileForIncompleteStorageRequest: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array, bspId: Option<H256> | null | Uint8Array | H256 | string, forestProof: SpTrieStorageProofCompactProof | {
466
+ encodedNodes?: any;
467
+ } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
468
+ H256,
469
+ Option<H256>,
470
+ SpTrieStorageProofCompactProof
431
471
  ]>;
432
472
  /**
433
473
  * Issue a new storage request for a file
434
474
  **/
435
- issueStorageRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, mspId: H256 | string | Uint8Array, peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
475
+ issueStorageRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, fingerprint: H256 | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, mspId: H256 | string | Uint8Array, peerIds: Vec<Bytes> | (Bytes | string | Uint8Array)[], replicationTarget: PalletFileSystemReplicationTarget | {
476
+ Basic: any;
477
+ } | {
478
+ Standard: any;
479
+ } | {
480
+ HighSecurity: any;
481
+ } | {
482
+ SuperHighSecurity: any;
483
+ } | {
484
+ UltraHighSecurity: any;
485
+ } | {
486
+ Custom: any;
487
+ } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
436
488
  H256,
437
489
  Bytes,
438
490
  H256,
439
491
  u64,
440
492
  H256,
441
- Vec<Bytes>
493
+ Vec<Bytes>,
494
+ PalletFileSystemReplicationTarget
442
495
  ]>;
443
496
  mspRespondMoveBucketRequest: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, response: PalletFileSystemBucketMoveRequestResponse | "Accepted" | "Rejected" | number | Uint8Array) => SubmittableExtrinsic<ApiType>, [
444
497
  H256,
@@ -455,24 +508,61 @@ declare module "@polkadot/api-base/types/submittable" {
455
508
  * the MSP actually has the files, while the non-inclusion proof is necessary to verify that the MSP
456
509
  * wasn't storing it before.
457
510
  **/
458
- mspRespondStorageRequestsMultipleBuckets: AugmentedSubmittable<(fileKeyResponsesInput: Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>> | [
459
- H256 | string | Uint8Array,
460
- (PalletFileSystemMspStorageRequestResponse | {
461
- accept?: any;
462
- reject?: any;
463
- } | string | Uint8Array)
464
- ][]) => SubmittableExtrinsic<ApiType>, [
465
- Vec<ITuple<[H256, PalletFileSystemMspStorageRequestResponse]>>
511
+ mspRespondStorageRequestsMultipleBuckets: AugmentedSubmittable<(storageRequestMspResponse: Vec<PalletFileSystemStorageRequestMspBucketResponse> | (PalletFileSystemStorageRequestMspBucketResponse | {
512
+ bucketId?: any;
513
+ accept?: any;
514
+ reject?: any;
515
+ } | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
516
+ Vec<PalletFileSystemStorageRequestMspBucketResponse>
466
517
  ]>;
467
- pendingFileDeletionRequestSubmitProof: AugmentedSubmittable<(user: AccountId32 | string | Uint8Array, fileKey: H256 | string | Uint8Array, bucketId: H256 | string | Uint8Array, forestProof: SpTrieStorageProofCompactProof | {
468
- encodedNodes?: any;
469
- } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
470
- AccountId32,
471
- H256,
518
+ mspStopStoringBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
519
+ H256
520
+ ]>;
521
+ /**
522
+ * Executed by a MSP to stop storing a bucket from an insolvent user.
523
+ *
524
+ * This is used when a user has become insolvent and the MSP needs to stop storing the buckets of that user, since
525
+ * it won't be getting paid for them anymore.
526
+ * It validates that:
527
+ * - The sender is the MSP that's currently storing the bucket, and the bucket exists.
528
+ * - That the user is currently insolvent OR
529
+ * - That the payment stream between the MSP and user doesn't exist (which would occur as a consequence of the MSP previously
530
+ * having deleted another bucket it was storing for this user through this extrinsic).
531
+ * And then completely removes the bucket from the system.
532
+ *
533
+ * If there was a storage request pending for the bucket, it will eventually expire without being fulfilled (because the MSP can't
534
+ * accept storage requests for insolvent users and BSPs can't volunteer nor confirm them either) and afterwards any BSPs that
535
+ * had confirmed the file can just call `sp_stop_storing_for_insolvent_user` to get rid of it.
536
+ **/
537
+ mspStopStoringBucketForInsolventUser: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
538
+ H256
539
+ ]>;
540
+ /**
541
+ * Request deletion of a file using a signed delete intention.
542
+ *
543
+ * The origin must be signed and the signature must be valid for the given delete intention.
544
+ * The delete intention must contain the file key and the delete operation.
545
+ * File metadata is provided separately for ownership verification.
546
+ **/
547
+ requestDeleteFile: AugmentedSubmittable<(signedIntention: PalletFileSystemFileOperationIntention | {
548
+ fileKey?: any;
549
+ operation?: any;
550
+ } | string | Uint8Array, signature: SpRuntimeMultiSignature | {
551
+ Ed25519: any;
552
+ } | {
553
+ Sr25519: any;
554
+ } | {
555
+ Ecdsa: any;
556
+ } | string | Uint8Array, bucketId: H256 | string | Uint8Array, location: Bytes | string | Uint8Array, size: u64 | AnyNumber | Uint8Array, fingerprint: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
557
+ PalletFileSystemFileOperationIntention,
558
+ SpRuntimeMultiSignature,
472
559
  H256,
473
- SpTrieStorageProofCompactProof
560
+ Bytes,
561
+ u64,
562
+ H256
474
563
  ]>;
475
- requestMoveBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, newMspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
564
+ requestMoveBucket: AugmentedSubmittable<(bucketId: H256 | string | Uint8Array, newMspId: H256 | string | Uint8Array, newValuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
565
+ H256,
476
566
  H256,
477
567
  H256
478
568
  ]>;
@@ -482,10 +572,6 @@ declare module "@polkadot/api-base/types/submittable" {
482
572
  revokeStorageRequest: AugmentedSubmittable<(fileKey: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
483
573
  H256
484
574
  ]>;
485
- setGlobalParameters: AugmentedSubmittable<(replicationTarget: Option<u32> | null | Uint8Array | u32 | AnyNumber, tickRangeToMaximumThreshold: Option<u32> | null | Uint8Array | u32 | AnyNumber) => SubmittableExtrinsic<ApiType>, [
486
- Option<u32>,
487
- Option<u32>
488
- ]>;
489
575
  /**
490
576
  * Executed by a SP to stop storing a file from an insolvent user.
491
577
  *
@@ -1586,34 +1672,6 @@ declare module "@polkadot/api-base/types/submittable" {
1586
1672
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
1587
1673
  };
1588
1674
  parachainSystem: {
1589
- /**
1590
- * Authorize an upgrade to a given `code_hash` for the runtime. The runtime can be supplied
1591
- * later.
1592
- *
1593
- * The `check_version` parameter sets a boolean flag for whether or not the runtime's spec
1594
- * version and name should be verified on upgrade. Since the authorization only has a hash,
1595
- * it cannot actually perform the verification.
1596
- *
1597
- * This call requires Root origin.
1598
- **/
1599
- authorizeUpgrade: AugmentedSubmittable<(codeHash: H256 | string | Uint8Array, checkVersion: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1600
- H256,
1601
- bool
1602
- ]>;
1603
- /**
1604
- * Provide the preimage (runtime binary) `code` for an upgrade that has been authorized.
1605
- *
1606
- * If the authorization required a version check, this call will ensure the spec name
1607
- * remains unchanged and that the spec version has increased.
1608
- *
1609
- * Note that this function will not apply the new `code`, but only attempt to schedule the
1610
- * upgrade with the Relay Chain.
1611
- *
1612
- * All origins are allowed.
1613
- **/
1614
- enactAuthorizedUpgrade: AugmentedSubmittable<(code: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1615
- Bytes
1616
- ]>;
1617
1675
  /**
1618
1676
  * Set the current validation data.
1619
1677
  *
@@ -1648,10 +1706,10 @@ declare module "@polkadot/api-base/types/submittable" {
1648
1706
  * The dispatch origin of this call must be `AdminOrigin` for the given `key`. Values be
1649
1707
  * deleted by setting them to `None`.
1650
1708
  **/
1651
- setParameter: AugmentedSubmittable<(keyValue: StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters | {
1709
+ setParameter: AugmentedSubmittable<(keyValue: ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters | {
1652
1710
  RuntimeConfig: any;
1653
1711
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1654
- StorageHubRuntimeConfigsRuntimeParamsRuntimeParameters
1712
+ ShParachainRuntimeConfigsRuntimeParamsRuntimeParameters
1655
1713
  ]>;
1656
1714
  /**
1657
1715
  * Generic tx
@@ -1659,6 +1717,41 @@ declare module "@polkadot/api-base/types/submittable" {
1659
1717
  [key: string]: SubmittableExtrinsicFunction<ApiType>;
1660
1718
  };
1661
1719
  paymentStreams: {
1720
+ /**
1721
+ * Dispatchable extrinsic that allows Providers to charge multiple User's payment streams.
1722
+ *
1723
+ * The dispatch origin for this call must be Signed.
1724
+ * The origin must be the Provider that has at least one type of payment stream with each of the Users.
1725
+ *
1726
+ * Parameters:
1727
+ * - `user_accounts`: The array of User Account IDs that have payment streams with the Provider.
1728
+ *
1729
+ * This extrinsic will perform the following checks and logic:
1730
+ * 1. Check that the extrinsic was signed and get the signer.
1731
+ * 2. Check that the array of Users is not bigger than the maximum allowed.
1732
+ * 3. Execute a for loop for each User in the array of User Account IDs, in which it:
1733
+ * a. Checks that a payment stream between the signer (Provider) and the User exists
1734
+ * b. If there is a fixed-rate payment stream:
1735
+ * 1. Get the rate of the payment stream
1736
+ * 2. Get the difference between the last charged tick number and the last chargeable tick number of the stream
1737
+ * 3. Calculate the amount to charge doing `rate * difference`
1738
+ * 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
1739
+ * 5. Update the last charged tick number of the payment stream
1740
+ * c. If there is a dynamic-rate payment stream:
1741
+ * 1. Get the amount provided by the Provider
1742
+ * 2. Get the difference between price index when the stream was last charged and the price index at the last chargeable tick
1743
+ * 3. Calculate the amount to charge doing `amount_provided * difference`
1744
+ * 4. Charge the user (if the user does not have enough funds, it gets flagged and a `UserWithoutFunds` event is emitted)
1745
+ * 5. Update the price index when the stream was last charged of the payment stream
1746
+ *
1747
+ * Emits a `PaymentStreamCharged` per User that had to pay and a `UsersCharged` event when successful.
1748
+ *
1749
+ * 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
1750
+ * will try to charge both and the amount charged will be the sum of the amounts charged for each payment stream.
1751
+ **/
1752
+ chargeMultipleUsersPaymentStreams: AugmentedSubmittable<(userAccounts: Vec<AccountId32> | (AccountId32 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
1753
+ Vec<AccountId32>
1754
+ ]>;
1662
1755
  /**
1663
1756
  * Dispatchable extrinsic that allows Providers to charge a payment stream from a User.
1664
1757
  *
@@ -1694,7 +1787,7 @@ declare module "@polkadot/api-base/types/submittable" {
1694
1787
  ]>;
1695
1788
  /**
1696
1789
  * Dispatchable extrinsic that allows a user flagged as without funds long ago enough to clear this flag from its account,
1697
- * allowing it to begin contracting and paying for services again. If there's any outstanding debt, it will be charged and cleared.
1790
+ * allowing it to begin contracting and paying for services again. It should have previously paid all its outstanding debt.
1698
1791
  *
1699
1792
  * The dispatch origin for this call must be Signed.
1700
1793
  * The origin must be the User that has been flagged as without funds.
@@ -1703,18 +1796,10 @@ declare module "@polkadot/api-base/types/submittable" {
1703
1796
  * 1. Check that the extrinsic was signed and get the signer.
1704
1797
  * 2. Check that the user has been flagged as without funds.
1705
1798
  * 3. Check that the cooldown period has passed since the user was flagged as without funds.
1706
- * 4. Check if there's any outstanding debt and charge it. This is done by:
1707
- * a. Releasing any remaining funds held as a deposit for each payment stream.
1708
- * b. Getting all payment streams of the user and charging them, paying the Providers for the services.
1709
- * c. Returning the User any remaining funds.
1710
- * d. Deleting all payment streams of the user.
1799
+ * 4. Check that there's no remaining outstanding debt.
1711
1800
  * 5. Unflag the user as without funds.
1712
1801
  *
1713
1802
  * Emits a 'UserSolvent' event when successful.
1714
- *
1715
- * Notes: this extrinsic iterates over all remaining payment streams of the user and charges them, so it can be expensive in terms of weight.
1716
- * The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
1717
- * finds more convenient to wait for Providers to get its deposits one by one instead.
1718
1803
  **/
1719
1804
  clearInsolventFlag: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1720
1805
  /**
@@ -1810,8 +1895,8 @@ declare module "@polkadot/api-base/types/submittable" {
1810
1895
  AccountId32
1811
1896
  ]>;
1812
1897
  /**
1813
- * Dispatchable extrinsic that allows a user flagged as without funds to pay all remaining payment streams to be able to recover
1814
- * its deposits.
1898
+ * Dispatchable extrinsic that allows a user flagged as without funds to pay the Providers that still have payment streams
1899
+ * with it, in order to recover as much of its deposits as possible.
1815
1900
  *
1816
1901
  * The dispatch origin for this call must be Signed.
1817
1902
  * The origin must be the User that has been flagged as without funds.
@@ -1819,17 +1904,22 @@ declare module "@polkadot/api-base/types/submittable" {
1819
1904
  * This extrinsic will perform the following checks and logic:
1820
1905
  * 1. Check that the extrinsic was signed and get the signer.
1821
1906
  * 2. Check that the user has been flagged as without funds.
1822
- * 3. Release the user's funds that were held as a deposit for each payment stream.
1823
- * 4. Get all payment streams of the user and charge them, paying the Providers for the services.
1824
- * 5. Delete all payment streams of the user.
1907
+ * 3. Release the user's funds that were held as a deposit for each payment stream to be paid.
1908
+ * 4. Get the payment streams that the user has with the provided list of Providers, and pay them for the services.
1909
+ * 5. Delete the charged payment streams of the user.
1825
1910
  *
1826
- * Emits a 'UserPaidDebts' event when successful.
1911
+ * Emits a 'UserPaidSomeDebts' event when successful if the user has remaining debts. If the user has successfully paid all its debts,
1912
+ * it emits a 'UserPaidAllDebts' event.
1827
1913
  *
1828
- * Notes: this extrinsic iterates over all payment streams of the user and charges them, so it can be expensive in terms of weight.
1829
- * The fee to execute it should be high enough to compensate for the weight of the extrinsic, without being too high that the user
1830
- * finds more convenient to wait for Providers to get its deposits one by one instead.
1914
+ * Notes: this extrinsic iterates over the provided list of Providers, getting the payment streams they have with the user and charging
1915
+ * them, so the execution could get expensive. It's recommended to provide a list of Providers that the user actually has payment streams with,
1916
+ * which can be obtained by calling the `get_providers_with_payment_streams_with_user` runtime API.
1917
+ * 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,
1918
+ * but the correct benchmarking of this extrinsic should be enough to avoid any potential abuse.
1831
1919
  **/
1832
- payOutstandingDebt: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
1920
+ payOutstandingDebt: AugmentedSubmittable<(providers: Vec<H256> | (H256 | string | Uint8Array)[]) => SubmittableExtrinsic<ApiType>, [
1921
+ Vec<H256>
1922
+ ]>;
1833
1923
  /**
1834
1924
  * Dispatchable extrinsic that allows root to update an existing dynamic-rate payment stream between a User and a Provider.
1835
1925
  *
@@ -1891,17 +1981,17 @@ declare module "@polkadot/api-base/types/submittable" {
1891
1981
  * - `beneficiary`: The location/account where the claimed assets will be deposited.
1892
1982
  **/
1893
1983
  claimAssets: AugmentedSubmittable<(assets: XcmVersionedAssets | {
1894
- V2: any;
1895
- } | {
1896
1984
  V3: any;
1897
1985
  } | {
1898
1986
  V4: any;
1899
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
1900
- V2: any;
1901
1987
  } | {
1988
+ V5: any;
1989
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
1902
1990
  V3: any;
1903
1991
  } | {
1904
1992
  V4: any;
1993
+ } | {
1994
+ V5: any;
1905
1995
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1906
1996
  XcmVersionedAssets,
1907
1997
  XcmVersionedLocation
@@ -1917,11 +2007,11 @@ declare module "@polkadot/api-base/types/submittable" {
1917
2007
  * execution attempt will be made.
1918
2008
  **/
1919
2009
  execute: AugmentedSubmittable<(message: XcmVersionedXcm | {
1920
- V2: any;
1921
- } | {
1922
2010
  V3: any;
1923
2011
  } | {
1924
2012
  V4: any;
2013
+ } | {
2014
+ V5: any;
1925
2015
  } | string | Uint8Array, maxWeight: SpWeightsWeightV2Weight | {
1926
2016
  refTime?: any;
1927
2017
  proofSize?: any;
@@ -1946,11 +2036,11 @@ declare module "@polkadot/api-base/types/submittable" {
1946
2036
  * - `location`: The location to which we should subscribe for XCM version notifications.
1947
2037
  **/
1948
2038
  forceSubscribeVersionNotify: AugmentedSubmittable<(location: XcmVersionedLocation | {
1949
- V2: any;
1950
- } | {
1951
2039
  V3: any;
1952
2040
  } | {
1953
2041
  V4: any;
2042
+ } | {
2043
+ V5: any;
1954
2044
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1955
2045
  XcmVersionedLocation
1956
2046
  ]>;
@@ -1972,11 +2062,11 @@ declare module "@polkadot/api-base/types/submittable" {
1972
2062
  * notifications which we no longer desire.
1973
2063
  **/
1974
2064
  forceUnsubscribeVersionNotify: AugmentedSubmittable<(location: XcmVersionedLocation | {
1975
- V2: any;
1976
- } | {
1977
2065
  V3: any;
1978
2066
  } | {
1979
2067
  V4: any;
2068
+ } | {
2069
+ V5: any;
1980
2070
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1981
2071
  XcmVersionedLocation
1982
2072
  ]>;
@@ -1988,11 +2078,11 @@ declare module "@polkadot/api-base/types/submittable" {
1988
2078
  * - `location`: The destination that is being described.
1989
2079
  * - `xcm_version`: The latest version of XCM that `location` supports.
1990
2080
  **/
1991
- forceXcmVersion: AugmentedSubmittable<(location: StagingXcmV4Location | {
2081
+ forceXcmVersion: AugmentedSubmittable<(location: StagingXcmV5Location | {
1992
2082
  parents?: any;
1993
2083
  interior?: any;
1994
2084
  } | string | Uint8Array, version: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
1995
- StagingXcmV4Location,
2085
+ StagingXcmV5Location,
1996
2086
  u32
1997
2087
  ]>;
1998
2088
  /**
@@ -2028,23 +2118,23 @@ declare module "@polkadot/api-base/types/submittable" {
2028
2118
  * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
2029
2119
  **/
2030
2120
  limitedReserveTransferAssets: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2031
- V2: any;
2032
- } | {
2033
2121
  V3: any;
2034
2122
  } | {
2035
2123
  V4: any;
2036
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2037
- V2: any;
2038
2124
  } | {
2125
+ V5: any;
2126
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2039
2127
  V3: any;
2040
2128
  } | {
2041
2129
  V4: any;
2042
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2043
- V2: any;
2044
2130
  } | {
2131
+ V5: any;
2132
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2045
2133
  V3: any;
2046
2134
  } | {
2047
2135
  V4: any;
2136
+ } | {
2137
+ V5: any;
2048
2138
  } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV3WeightLimit | {
2049
2139
  Unlimited: any;
2050
2140
  } | {
@@ -2077,23 +2167,23 @@ declare module "@polkadot/api-base/types/submittable" {
2077
2167
  * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
2078
2168
  **/
2079
2169
  limitedTeleportAssets: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2080
- V2: any;
2081
- } | {
2082
2170
  V3: any;
2083
2171
  } | {
2084
2172
  V4: any;
2085
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2086
- V2: any;
2087
2173
  } | {
2174
+ V5: any;
2175
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2088
2176
  V3: any;
2089
2177
  } | {
2090
2178
  V4: any;
2091
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2092
- V2: any;
2093
2179
  } | {
2180
+ V5: any;
2181
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2094
2182
  V3: any;
2095
2183
  } | {
2096
2184
  V4: any;
2185
+ } | {
2186
+ V5: any;
2097
2187
  } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV3WeightLimit | {
2098
2188
  Unlimited: any;
2099
2189
  } | {
@@ -2138,23 +2228,23 @@ declare module "@polkadot/api-base/types/submittable" {
2138
2228
  * fees.
2139
2229
  **/
2140
2230
  reserveTransferAssets: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2141
- V2: any;
2142
- } | {
2143
2231
  V3: any;
2144
2232
  } | {
2145
2233
  V4: any;
2146
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2147
- V2: any;
2148
2234
  } | {
2235
+ V5: any;
2236
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2149
2237
  V3: any;
2150
2238
  } | {
2151
2239
  V4: any;
2152
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2153
- V2: any;
2154
2240
  } | {
2241
+ V5: any;
2242
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2155
2243
  V3: any;
2156
2244
  } | {
2157
2245
  V4: any;
2246
+ } | {
2247
+ V5: any;
2158
2248
  } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2159
2249
  XcmVersionedLocation,
2160
2250
  XcmVersionedLocation,
@@ -2162,17 +2252,17 @@ declare module "@polkadot/api-base/types/submittable" {
2162
2252
  u32
2163
2253
  ]>;
2164
2254
  send: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2165
- V2: any;
2166
- } | {
2167
2255
  V3: any;
2168
2256
  } | {
2169
2257
  V4: any;
2170
- } | string | Uint8Array, message: XcmVersionedXcm | {
2171
- V2: any;
2172
2258
  } | {
2259
+ V5: any;
2260
+ } | string | Uint8Array, message: XcmVersionedXcm | {
2173
2261
  V3: any;
2174
2262
  } | {
2175
2263
  V4: any;
2264
+ } | {
2265
+ V5: any;
2176
2266
  } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2177
2267
  XcmVersionedLocation,
2178
2268
  XcmVersionedXcm
@@ -2198,23 +2288,23 @@ declare module "@polkadot/api-base/types/submittable" {
2198
2288
  * fees.
2199
2289
  **/
2200
2290
  teleportAssets: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2201
- V2: any;
2202
- } | {
2203
2291
  V3: any;
2204
2292
  } | {
2205
2293
  V4: any;
2206
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2207
- V2: any;
2208
2294
  } | {
2295
+ V5: any;
2296
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2209
2297
  V3: any;
2210
2298
  } | {
2211
2299
  V4: any;
2212
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2213
- V2: any;
2214
2300
  } | {
2301
+ V5: any;
2302
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2215
2303
  V3: any;
2216
2304
  } | {
2217
2305
  V4: any;
2306
+ } | {
2307
+ V5: any;
2218
2308
  } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2219
2309
  XcmVersionedLocation,
2220
2310
  XcmVersionedLocation,
@@ -2257,23 +2347,23 @@ declare module "@polkadot/api-base/types/submittable" {
2257
2347
  * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
2258
2348
  **/
2259
2349
  transferAssets: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2260
- V2: any;
2261
- } | {
2262
2350
  V3: any;
2263
2351
  } | {
2264
2352
  V4: any;
2265
- } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2266
- V2: any;
2267
2353
  } | {
2354
+ V5: any;
2355
+ } | string | Uint8Array, beneficiary: XcmVersionedLocation | {
2268
2356
  V3: any;
2269
2357
  } | {
2270
2358
  V4: any;
2271
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2272
- V2: any;
2273
2359
  } | {
2360
+ V5: any;
2361
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2274
2362
  V3: any;
2275
2363
  } | {
2276
2364
  V4: any;
2365
+ } | {
2366
+ V5: any;
2277
2367
  } | string | Uint8Array, feeAssetItem: u32 | AnyNumber | Uint8Array, weightLimit: XcmV3WeightLimit | {
2278
2368
  Unlimited: any;
2279
2369
  } | {
@@ -2336,17 +2426,17 @@ declare module "@polkadot/api-base/types/submittable" {
2336
2426
  * - `weight_limit`: The remote-side weight limit, if any, for the XCM fee purchase.
2337
2427
  **/
2338
2428
  transferAssetsUsingTypeAndThen: AugmentedSubmittable<(dest: XcmVersionedLocation | {
2339
- V2: any;
2340
- } | {
2341
2429
  V3: any;
2342
2430
  } | {
2343
2431
  V4: any;
2344
- } | string | Uint8Array, assets: XcmVersionedAssets | {
2345
- V2: any;
2346
2432
  } | {
2433
+ V5: any;
2434
+ } | string | Uint8Array, assets: XcmVersionedAssets | {
2347
2435
  V3: any;
2348
2436
  } | {
2349
2437
  V4: any;
2438
+ } | {
2439
+ V5: any;
2350
2440
  } | string | Uint8Array, assetsTransferType: StagingXcmExecutorAssetTransferTransferType | {
2351
2441
  Teleport: any;
2352
2442
  } | {
@@ -2359,6 +2449,8 @@ declare module "@polkadot/api-base/types/submittable" {
2359
2449
  V3: any;
2360
2450
  } | {
2361
2451
  V4: any;
2452
+ } | {
2453
+ V5: any;
2362
2454
  } | string | Uint8Array, feesTransferType: StagingXcmExecutorAssetTransferTransferType | {
2363
2455
  Teleport: any;
2364
2456
  } | {
@@ -2368,11 +2460,11 @@ declare module "@polkadot/api-base/types/submittable" {
2368
2460
  } | {
2369
2461
  RemoteReserve: any;
2370
2462
  } | string | Uint8Array, customXcmOnDest: XcmVersionedXcm | {
2371
- V2: any;
2372
- } | {
2373
2463
  V3: any;
2374
2464
  } | {
2375
2465
  V4: any;
2466
+ } | {
2467
+ V5: any;
2376
2468
  } | string | Uint8Array, weightLimit: XcmV3WeightLimit | {
2377
2469
  Unlimited: any;
2378
2470
  } | {
@@ -2395,7 +2487,7 @@ declare module "@polkadot/api-base/types/submittable" {
2395
2487
  /**
2396
2488
  * Introduce a new challenge.
2397
2489
  *
2398
- * This function allows anyone to add a new challenge to the `ChallengesQueue`.
2490
+ * This function allows authorized origins to add a new challenge to the `ChallengesQueue`.
2399
2491
  * The challenge will be dispatched in the coming blocks.
2400
2492
  * Users are charged a small fee for submitting a challenge, which
2401
2493
  * goes to the Treasury.
@@ -2414,6 +2506,10 @@ declare module "@polkadot/api-base/types/submittable" {
2414
2506
  forceInitialiseChallengeCycle: AugmentedSubmittable<(provider: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2415
2507
  H256
2416
2508
  ]>;
2509
+ priorityChallenge: AugmentedSubmittable<(key: H256 | string | Uint8Array, shouldRemoveKey: bool | boolean | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2510
+ H256,
2511
+ bool
2512
+ ]>;
2417
2513
  /**
2418
2514
  * Set the [`ChallengesTickerPaused`] to `true` or `false`.
2419
2515
  *
@@ -2429,19 +2525,23 @@ declare module "@polkadot/api-base/types/submittable" {
2429
2525
  * is provided, the proof submitter is considered to be the Provider.
2430
2526
  * Relies on a Providers pallet to get the root for the Provider.
2431
2527
  * Validates that the proof corresponds to a challenge that was made in the past,
2432
- * by checking the `TickToChallengesSeed` StorageMap. The challenge tick that the
2433
- * Provider should have submitted a proof is calculated based on the last tick they
2434
- * submitted a proof for ([`LastTickProviderSubmittedAProofFor`]), and the proving period for
2435
- * that Provider, which is a function of their stake.
2528
+ * by checking the [`TickToChallengesSeed`] StorageMap. The challenge tick that the
2529
+ * Provider should be submitting a proof for is retrieved from [`ProviderToProofSubmissionRecord`],
2530
+ * and it was calculated based on the last tick they submitted a proof for, and the challenge
2531
+ * period for that Provider, at the time of the previous proof submission or when it was
2532
+ * marked as slashable.
2533
+ *
2436
2534
  * This extrinsic also checks that there hasn't been a checkpoint challenge round
2437
2535
  * in between the last time the Provider submitted a proof for and the tick
2438
2536
  * for which the proof is being submitted. If there has been, the Provider is
2439
- * subject to slashing.
2537
+ * expected to include responses to the checkpoint challenges in the proof.
2440
2538
  *
2441
2539
  * If valid:
2442
2540
  * - Pushes forward the Provider in the [`TickToProvidersDeadlines`] StorageMap a number
2443
2541
  * of ticks corresponding to the stake of the Provider.
2444
- * - Registers this tick as the last tick in which the Provider submitted a proof.
2542
+ * - Registers the last tick for which the Provider submitted a proof for in
2543
+ * [`ProviderToProofSubmissionRecord`], as well as the next tick for which the Provider
2544
+ * should submit a proof for.
2445
2545
  *
2446
2546
  * Execution of this extrinsic should be refunded if the proof is valid.
2447
2547
  **/
@@ -2459,29 +2559,38 @@ declare module "@polkadot/api-base/types/submittable" {
2459
2559
  };
2460
2560
  providers: {
2461
2561
  /**
2462
- * Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
2562
+ * Dispatchable extrinsic that allows BSPs and MSPs to add a new multiaddress to their account.
2463
2563
  *
2464
2564
  * The dispatch origin for this call must be Signed.
2465
- * The origin must be the account that wants to add a value proposition.
2565
+ * The origin must be the account that wants to add a new multiaddress.
2466
2566
  *
2467
2567
  * Parameters:
2468
- * - `new_value_prop`: The value proposition that the MSP wants to add to its service.
2568
+ * - `new_multiaddress`: The new multiaddress that the signer wants to add to its account.
2469
2569
  *
2470
2570
  * This extrinsic will perform the following checks and logic:
2471
2571
  * 1. Check that the extrinsic was signed and get the signer.
2472
- * 2. Check that the signer is registered as a MSP
2473
- * 3. Check that the MSP has not reached the maximum amount of value propositions
2474
- * 4. Check that the value proposition is valid (size and any other relevant checks)
2475
- * 5. Update the MSPs storage to add the value proposition (with its identifier)
2572
+ * 2. Check that the signer is registered as a MSP or BSP.
2573
+ * 3. Check that the Provider has not reached the maximum amount of multiaddresses.
2574
+ * 4. Check that the multiaddress is valid (size and any other relevant checks). TODO: Implement this.
2575
+ * 5. Update the Provider's storage to add the multiaddress.
2576
+ *
2577
+ * Emits `MultiAddressAdded` event when successful.
2578
+ **/
2579
+ addMultiaddress: AugmentedSubmittable<(newMultiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2580
+ Bytes
2581
+ ]>;
2582
+ /**
2583
+ * Dispatchable extrinsic only callable by an MSP that allows it to add a value proposition to its service
2584
+ *
2585
+ * The dispatch origin for this call must be Signed.
2586
+ * The origin must be the account that wants to add a value proposition.
2476
2587
  *
2477
2588
  * Emits `ValuePropAdded` event when successful.
2478
2589
  **/
2479
- addValueProp: AugmentedSubmittable<(newValueProp: PalletStorageProvidersValueProposition | {
2480
- identifier?: any;
2481
- dataLimit?: any;
2482
- protocols?: any;
2483
- } | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2484
- PalletStorageProvidersValueProposition
2590
+ addValueProp: AugmentedSubmittable<(pricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, bucketDataLimit: u64 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2591
+ u128,
2592
+ Bytes,
2593
+ u64
2485
2594
  ]>;
2486
2595
  /**
2487
2596
  * Dispatchable extrinsic that allows users to sign off as a Backup Storage Provider.
@@ -2568,11 +2677,31 @@ declare module "@polkadot/api-base/types/submittable" {
2568
2677
  * Notes:
2569
2678
  * - This extrinsic could be called by the user itself or by a third party
2570
2679
  * - The deposit that the user has to pay to register as a SP is held when the user requests to register as a SP
2571
- * - If this extrinsic is successful, it will be free for the caller, to incentive state debloating
2680
+ * - If this extrinsic is successful, it will be free for the caller, to incentive state de-bloating
2572
2681
  **/
2573
2682
  confirmSignUp: AugmentedSubmittable<(providerAccount: Option<AccountId32> | null | Uint8Array | AccountId32 | string) => SubmittableExtrinsic<ApiType>, [
2574
2683
  Option<AccountId32>
2575
2684
  ]>;
2685
+ /**
2686
+ * Delete a provider from the system.
2687
+ *
2688
+ * This can only be done if the following conditions are met:
2689
+ * - The provider is insolvent.
2690
+ * - The provider has no active payment streams.
2691
+ *
2692
+ * This is a free operation and can be called by anyone with a signed transaction.
2693
+ *
2694
+ * You can utilize the runtime API `can_delete_provider` to check if a provider can be deleted
2695
+ * to automate the process.
2696
+ *
2697
+ * Emits `MspDeleted` or `BspDeleted` event when successful.
2698
+ *
2699
+ * This operation is free if successful to encourage the community to delete insolvent providers,
2700
+ * debloating the state.
2701
+ **/
2702
+ deleteProvider: AugmentedSubmittable<(providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2703
+ H256
2704
+ ]>;
2576
2705
  /**
2577
2706
  * Dispatchable extrinsic that allows to forcefully and automatically sing up a Backup Storage Provider.
2578
2707
  *
@@ -2603,7 +2732,7 @@ declare module "@polkadot/api-base/types/submittable" {
2603
2732
  Option<u32>
2604
2733
  ]>;
2605
2734
  /**
2606
- * Dispatchable extrinsic that allows to forcefully and automatically sing up a Main Storage Provider.
2735
+ * Dispatchable extrinsic that allows to forcefully and automatically sign up a Main Storage Provider.
2607
2736
  *
2608
2737
  * The dispatch origin for this call must be Root.
2609
2738
  * The `who` parameter is the account that wants to sign up as a Main Storage Provider.
@@ -2626,18 +2755,25 @@ declare module "@polkadot/api-base/types/submittable" {
2626
2755
  *
2627
2756
  * Emits `MspRequestSignUpSuccess` and `MspSignUpSuccess` events when successful.
2628
2757
  **/
2629
- forceMspSignUp: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, mspId: H256 | string | Uint8Array, capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valueProp: PalletStorageProvidersValueProposition | {
2630
- identifier?: any;
2631
- dataLimit?: any;
2632
- protocols?: any;
2633
- } | string | Uint8Array, paymentAccount: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2758
+ forceMspSignUp: AugmentedSubmittable<(who: AccountId32 | string | Uint8Array, mspId: H256 | string | Uint8Array, capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array, paymentAccount: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2634
2759
  AccountId32,
2635
2760
  H256,
2636
2761
  u64,
2637
2762
  Vec<Bytes>,
2638
- PalletStorageProvidersValueProposition,
2763
+ u128,
2764
+ Bytes,
2765
+ u64,
2639
2766
  AccountId32
2640
2767
  ]>;
2768
+ /**
2769
+ * Dispatchable extrinsic only callable by an MSP that allows it to make a value proposition unavailable.
2770
+ *
2771
+ * This operation cannot be reversed. You can only add new value propositions.
2772
+ * This will not affect existing buckets which are using this value proposition.
2773
+ **/
2774
+ makeValuePropUnavailable: AugmentedSubmittable<(valuePropId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2775
+ H256
2776
+ ]>;
2641
2777
  /**
2642
2778
  * Dispatchable extrinsic that allows users to sign off as a Main Storage Provider.
2643
2779
  *
@@ -2654,7 +2790,29 @@ declare module "@polkadot/api-base/types/submittable" {
2654
2790
  *
2655
2791
  * Emits `MspSignOffSuccess` event when successful.
2656
2792
  **/
2657
- mspSignOff: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
2793
+ mspSignOff: AugmentedSubmittable<(mspId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2794
+ H256
2795
+ ]>;
2796
+ /**
2797
+ * Dispatchable extrinsic that allows BSPs and MSPs to remove an existing multiaddress from their account.
2798
+ *
2799
+ * The dispatch origin for this call must be Signed.
2800
+ * The origin must be the account that wants to remove a multiaddress.
2801
+ *
2802
+ * Parameters:
2803
+ * - `multiaddress`: The multiaddress that the signer wants to remove from its account.
2804
+ *
2805
+ * This extrinsic will perform the following checks and logic:
2806
+ * 1. Check that the extrinsic was signed and get the signer.
2807
+ * 2. Check that the signer is registered as a MSP or BSP.
2808
+ * 3. Check that the multiaddress exists in the Provider's account.
2809
+ * 4. Update the Provider's storage to remove the multiaddress.
2810
+ *
2811
+ * Emits `MultiAddressRemoved` event when successful.
2812
+ **/
2813
+ removeMultiaddress: AugmentedSubmittable<(multiaddress: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2814
+ Bytes
2815
+ ]>;
2658
2816
  /**
2659
2817
  * Dispatchable extrinsic that allows users to sign up as a Backup Storage Provider.
2660
2818
  *
@@ -2713,14 +2871,12 @@ declare module "@polkadot/api-base/types/submittable" {
2713
2871
  *
2714
2872
  * Emits `MspRequestSignUpSuccess` event when successful.
2715
2873
  **/
2716
- requestMspSignUp: AugmentedSubmittable<(capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valueProp: PalletStorageProvidersValueProposition | {
2717
- identifier?: any;
2718
- dataLimit?: any;
2719
- protocols?: any;
2720
- } | string | Uint8Array, paymentAccount: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2874
+ requestMspSignUp: AugmentedSubmittable<(capacity: u64 | AnyNumber | Uint8Array, multiaddresses: Vec<Bytes> | (Bytes | string | Uint8Array)[], valuePropPricePerGigaUnitOfDataPerBlock: u128 | AnyNumber | Uint8Array, commitment: Bytes | string | Uint8Array, valuePropMaxDataLimit: u64 | AnyNumber | Uint8Array, paymentAccount: AccountId32 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2721
2875
  u64,
2722
2876
  Vec<Bytes>,
2723
- PalletStorageProvidersValueProposition,
2877
+ u128,
2878
+ Bytes,
2879
+ u64,
2724
2880
  AccountId32
2725
2881
  ]>;
2726
2882
  /**
@@ -2728,10 +2884,29 @@ declare module "@polkadot/api-base/types/submittable" {
2728
2884
  *
2729
2885
  * A Storage Provider is _slashable_ iff it has failed to respond to challenges for providing proofs of storage.
2730
2886
  * In the context of the StorageHub protocol, the proofs-dealer pallet marks a Storage Provider as _slashable_ when it fails to respond to challenges.
2887
+ *
2888
+ * This is a free operation to incentivise the community to slash misbehaving providers.
2731
2889
  **/
2732
2890
  slash: AugmentedSubmittable<(providerId: H256 | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2733
2891
  H256
2734
2892
  ]>;
2893
+ /**
2894
+ * BSP operation to stop all of your automatic cycles.
2895
+ *
2896
+ * This includes:
2897
+ *
2898
+ * - Commit reveal randomness cycle
2899
+ * - Proof challenge cycle
2900
+ *
2901
+ * If you are an BSP, the only requirement that must be met is that your root is the default one (an empty root).
2902
+ **/
2903
+ stopAllCycles: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
2904
+ /**
2905
+ * Dispatchable extrinsic to top-up the deposit of a Storage Provider.
2906
+ *
2907
+ * The dispatch origin for this call must be signed.
2908
+ **/
2909
+ topUpDeposit: AugmentedSubmittable<() => SubmittableExtrinsic<ApiType>, []>;
2735
2910
  /**
2736
2911
  * Generic tx
2737
2912
  **/
@@ -2776,10 +2951,10 @@ declare module "@polkadot/api-base/types/submittable" {
2776
2951
  * - `O(1)`. Actual cost depends on the number of length of `T::Keys::key_ids()` which is
2777
2952
  * fixed.
2778
2953
  **/
2779
- setKeys: AugmentedSubmittable<(keys: StorageHubRuntimeSessionKeys | {
2954
+ setKeys: AugmentedSubmittable<(keys: ShParachainRuntimeSessionKeys | {
2780
2955
  aura?: any;
2781
2956
  } | string | Uint8Array, proof: Bytes | string | Uint8Array) => SubmittableExtrinsic<ApiType>, [
2782
- StorageHubRuntimeSessionKeys,
2957
+ ShParachainRuntimeSessionKeys,
2783
2958
  Bytes
2784
2959
  ]>;
2785
2960
  /**