@storagehub/api-augment 0.1.0 → 0.2.2

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 +105 -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 +145 -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 +135 -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 +543 -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 +1419 -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 +325 -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 +202 -8
  103. package/src/{interfaces → parachain/interfaces}/augment-api-tx.ts +374 -182
  104. package/src/{interfaces → parachain/interfaces}/augment-types.ts +280 -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 +165 -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 +977 -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 +2776 -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 +398 -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
@@ -67,7 +67,6 @@ import type { FeeDetails, RuntimeDispatchInfoV1 } from "@polkadot/types/interfac
67
67
  import type { RpcMethods } from "@polkadot/types/interfaces/rpc";
68
68
  import type {
69
69
  AccountId,
70
- AccountId32,
71
70
  BlockNumber,
72
71
  H160,
73
72
  H256,
@@ -98,10 +97,14 @@ import type {
98
97
  } from "@polkadot/types/interfaces/system";
99
98
  import type { IExtrinsic, Observable } from "@polkadot/types/types";
100
99
  import type {
100
+ AddFilesToForestStorageResult,
101
+ CheckpointChallenge,
101
102
  FileMetadata,
102
103
  GetFileFromFileStorageResult,
104
+ LoadFileInStorageResult,
105
+ RemoveFilesFromForestStorageResult,
103
106
  SaveFileToDisk
104
- } from "@storagehub/api-augment/interfaces/storagehubclient";
107
+ } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
105
108
 
106
109
  export type __AugmentedRpc = AugmentedRpc<() => unknown>;
107
110
 
@@ -782,6 +785,15 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
782
785
  version: AugmentedRpc<() => Observable<Text>>;
783
786
  };
784
787
  offchain: {
788
+ /**
789
+ * Clear offchain local storage under given key and prefix
790
+ **/
791
+ localStorageClear: AugmentedRpc<
792
+ (
793
+ kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array,
794
+ key: Bytes | string | Uint8Array
795
+ ) => Observable<Null>
796
+ >;
785
797
  /**
786
798
  * Get offchain local storage under given key and prefix
787
799
  **/
@@ -1026,6 +1038,52 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
1026
1038
  >;
1027
1039
  };
1028
1040
  storagehubclient: {
1041
+ /**
1042
+ * Add files to the forest storage. Useful when doing manual maintenance.
1043
+ **/
1044
+ addFilesToForestStorage: AugmentedRpc<
1045
+ (
1046
+ forest_key: Option<H256> | null | Uint8Array | H256 | string,
1047
+ metadata_of_files_to_add:
1048
+ | Vec<FileMetadata>
1049
+ | (
1050
+ | FileMetadata
1051
+ | {
1052
+ owner?: any;
1053
+ bucket_id?: any;
1054
+ location?: any;
1055
+ file_size?: any;
1056
+ fingerprint?: any;
1057
+ }
1058
+ | string
1059
+ | Uint8Array
1060
+ )[]
1061
+ ) => Observable<AddFilesToForestStorageResult>
1062
+ >;
1063
+ /**
1064
+ * Add key to exclude list. Exclude type can be `file`, `user`, `bucket` and `fingerprint`.
1065
+ **/
1066
+ addToExcludeList: AugmentedRpc<
1067
+ (key: H256 | string | Uint8Array, exclude_type: Text | string) => Observable<ITuple<[]>>
1068
+ >;
1069
+ /**
1070
+ * Generate a SCALE-encoded proof for a file key to allow a BSP to confirm storing it.
1071
+ **/
1072
+ generateFileKeyProofBspConfirm: AugmentedRpc<
1073
+ (
1074
+ bsp_id: H256 | string | Uint8Array,
1075
+ file_key: H256 | string | Uint8Array
1076
+ ) => Observable<Bytes>
1077
+ >;
1078
+ /**
1079
+ * Generate a SCALE-encoded proof for a file key to allow a MSP to accept storing it.
1080
+ **/
1081
+ generateFileKeyProofMspAccept: AugmentedRpc<
1082
+ (
1083
+ msp_id: H256 | string | Uint8Array,
1084
+ file_key: H256 | string | Uint8Array
1085
+ ) => Observable<Bytes>
1086
+ >;
1029
1087
  /**
1030
1088
  * Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest.
1031
1089
  **/
@@ -1035,6 +1093,26 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
1035
1093
  challenged_file_keys: Vec<H256> | (H256 | string | Uint8Array)[]
1036
1094
  ) => Observable<Bytes>
1037
1095
  >;
1096
+ /**
1097
+ * Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest, alongside their key proofs.
1098
+ **/
1099
+ generateProof: AugmentedRpc<
1100
+ (
1101
+ provider_id: H256 | string | Uint8Array,
1102
+ seed: H256 | string | Uint8Array,
1103
+ checkpoint_challenges:
1104
+ | Option<Vec<CheckpointChallenge>>
1105
+ | null
1106
+ | Uint8Array
1107
+ | Vec<CheckpointChallenge>
1108
+ | (
1109
+ | CheckpointChallenge
1110
+ | { file_key?: any; should_remove_file?: any }
1111
+ | string
1112
+ | Uint8Array
1113
+ )[]
1114
+ ) => Observable<Bytes>
1115
+ >;
1038
1116
  /**
1039
1117
  * Get the metadata of a file from the Forest storage.
1040
1118
  **/
@@ -1048,7 +1126,7 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
1048
1126
  * Get the root of the forest trie.
1049
1127
  **/
1050
1128
  getForestRoot: AugmentedRpc<
1051
- (forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<H256>
1129
+ (forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>
1052
1130
  >;
1053
1131
  /**
1054
1132
  * Generate and insert new keys of type BCSV into the keystore.
@@ -1071,6 +1149,10 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
1071
1149
  file_key: H256 | string | Uint8Array
1072
1150
  ) => Observable<bool>
1073
1151
  >;
1152
+ /**
1153
+ * Check whether this node is currently expecting to receive the given file key
1154
+ **/
1155
+ isFileKeyExpected: AugmentedRpc<(file_key: H256 | string | Uint8Array) => Observable<bool>>;
1074
1156
  /**
1075
1157
  * Load a file in the local storage. This is the first step when uploading a file.
1076
1158
  **/
@@ -1078,14 +1160,50 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
1078
1160
  (
1079
1161
  file_path: Text | string,
1080
1162
  location: Text | string,
1081
- owner: AccountId32 | string | Uint8Array,
1163
+ owner_account_id_hex: Text | string,
1082
1164
  bucket_id: H256 | string | Uint8Array
1083
- ) => Observable<FileMetadata>
1165
+ ) => Observable<LoadFileInStorageResult>
1166
+ >;
1167
+ /**
1168
+ * Send a FileKeyProof with one or more chunks to be processed locally by the node
1169
+ **/
1170
+ receiveBackendFileChunks: AugmentedRpc<
1171
+ (
1172
+ file_key: H256 | string | Uint8Array,
1173
+ file_key_proof: Bytes | string | Uint8Array
1174
+ ) => Observable<Bytes>
1084
1175
  >;
1085
1176
  /**
1086
1177
  * Remove keys of BCSV type for the Blockchain Service.
1087
1178
  **/
1088
1179
  removeBcsvKeys: AugmentedRpc<(keystore_path: Text | string) => Observable<ITuple<[]>>>;
1180
+ /**
1181
+ * Remove a list of files from the file storage. Useful when doing manual maintenance.
1182
+ **/
1183
+ removeFilesFromFileStorage: AugmentedRpc<
1184
+ (file_keys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<ITuple<[]>>
1185
+ >;
1186
+ /**
1187
+ * Remove files from the forest storage. Useful when doing manual maintenance.
1188
+ **/
1189
+ removeFilesFromForestStorage: AugmentedRpc<
1190
+ (
1191
+ forest_key: Option<H256> | null | Uint8Array | H256 | string,
1192
+ file_keys: Vec<H256> | (H256 | string | Uint8Array)[]
1193
+ ) => Observable<RemoveFilesFromForestStorageResult>
1194
+ >;
1195
+ /**
1196
+ * Remove all files under a prefix from the file storage. Useful when doing manual maintenance.
1197
+ **/
1198
+ removeFilesWithPrefixFromFileStorage: AugmentedRpc<
1199
+ (prefix: H256 | string | Uint8Array) => Observable<ITuple<[]>>
1200
+ >;
1201
+ /**
1202
+ * Remove key from exclude list
1203
+ **/
1204
+ removeFromExcludeList: AugmentedRpc<
1205
+ (key: H256 | string | Uint8Array, exclude_type: Text | string) => Observable<ITuple<[]>>
1206
+ >;
1089
1207
  /**
1090
1208
  * Save a file from the local storage to the disk.
1091
1209
  **/
@@ -6,12 +6,27 @@
6
6
  import "@polkadot/api-base/types/calls";
7
7
 
8
8
  import type { ApiTypes, AugmentedCall, DecoratedCallBase } from "@polkadot/api-base/types";
9
- import type { Bytes, Null, Option, Result, Vec, bool, u128, u32 } from "@polkadot/types-codec";
9
+ import type {
10
+ BTreeMap,
11
+ Bytes,
12
+ Null,
13
+ Option,
14
+ Result,
15
+ Vec,
16
+ bool,
17
+ u128,
18
+ u32
19
+ } from "@polkadot/types-codec";
10
20
  import type { AnyNumber, IMethod, ITuple } from "@polkadot/types-codec/types";
11
21
  import type { CheckInherentsResult, InherentData } from "@polkadot/types/interfaces/blockbuilder";
12
22
  import type { BlockHash } from "@polkadot/types/interfaces/chain";
13
23
  import type { AuthorityId } from "@polkadot/types/interfaces/consensus";
14
24
  import type { CollationInfo } from "@polkadot/types/interfaces/cumulus";
25
+ import type {
26
+ CallDryRunEffects,
27
+ XcmDryRunApiError,
28
+ XcmDryRunEffects
29
+ } from "@polkadot/types/interfaces/dryRunApi";
15
30
  import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics";
16
31
  import type { GenesisBuildErr } from "@polkadot/types/interfaces/genesisBuilder";
17
32
  import type { OpaqueMetadata } from "@polkadot/types/interfaces/metadata";
@@ -27,6 +42,8 @@ import type {
27
42
  Header,
28
43
  Index,
29
44
  KeyTypeId,
45
+ OriginCaller,
46
+ RuntimeCall,
30
47
  Slot,
31
48
  SlotDuration,
32
49
  Weight,
@@ -35,6 +52,7 @@ import type {
35
52
  import type { RuntimeVersion } from "@polkadot/types/interfaces/state";
36
53
  import type { ApplyExtrinsicResult, Key } from "@polkadot/types/interfaces/system";
37
54
  import type { TransactionSource, TransactionValidity } from "@polkadot/types/interfaces/txqueue";
55
+ import type { VersionedMultiLocation, VersionedXcm } from "@polkadot/types/interfaces/xcm";
38
56
  import type { XcmPaymentApiError } from "@polkadot/types/interfaces/xcmPaymentApi";
39
57
  import type { Error } from "@polkadot/types/interfaces/xcmRuntimeApi";
40
58
  import type {
@@ -46,21 +64,30 @@ import type { IExtrinsic, Observable } from "@polkadot/types/types";
46
64
  import type {
47
65
  BackupStorageProvider,
48
66
  BackupStorageProviderId,
67
+ BucketId,
49
68
  ChunkId,
69
+ GenericApplyDeltaEventInfoError,
50
70
  GetBspInfoError,
51
71
  GetChallengePeriodError,
52
72
  GetChallengeSeedError,
53
73
  GetCheckpointChallengesError,
54
- GetLastTickProviderSubmittedProofError,
55
74
  GetNextDeadlineTickError,
75
+ GetProofSubmissionRecordError,
76
+ GetStakeError,
56
77
  GetUsersWithDebtOverThresholdError,
78
+ IncompleteStorageRequestMetadataResponse,
79
+ IsStorageRequestOpenToVolunteersError,
57
80
  MainStorageProviderId,
58
81
  Multiaddresses,
59
82
  ProviderId,
60
83
  QueryAvailableStorageCapacityError,
61
84
  QueryBspConfirmChunksToProveForFileError,
85
+ QueryBspsVolunteeredForFileError,
86
+ QueryBucketsForMspError,
87
+ QueryBucketsOfUserStoredByMspError,
62
88
  QueryEarliestChangeCapacityBlockError,
63
89
  QueryFileEarliestVolunteerBlockError,
90
+ QueryIncompleteStorageRequestMetadataError,
64
91
  QueryMspConfirmChunksToProveForFileError,
65
92
  QueryMspIdOfBucketIdError,
66
93
  QueryProviderMultiaddressesError,
@@ -68,8 +95,10 @@ import type {
68
95
  RandomnessOutput,
69
96
  StorageDataUnit,
70
97
  StorageProviderId,
71
- TrieRemoveMutation
72
- } from "@storagehub/api-augment/interfaces/storagehubclient";
98
+ StorageRequestMetadata,
99
+ TrieRemoveMutation,
100
+ ValuePropositionWithId
101
+ } from "@storagehub/api-augment/parachain/interfaces/storagehubclient";
73
102
 
74
103
  export type __AugmentedCall<ApiType extends ApiTypes> = AugmentedCall<ApiType>;
75
104
  export type __DecoratedCallBase<ApiType extends ApiTypes> = DecoratedCallBase<ApiType>;
@@ -226,8 +255,81 @@ declare module "@polkadot/api-base/types/calls" {
226
255
  **/
227
256
  [key: string]: DecoratedCallBase<ApiType>;
228
257
  };
258
+ /** 0x91b1c8b16328eb92/2 */
259
+ dryRunApi: {
260
+ /**
261
+ * Dry run call
262
+ **/
263
+ dryRunCall: AugmentedCall<
264
+ ApiType,
265
+ (
266
+ origin: OriginCaller | { System: any } | string | Uint8Array,
267
+ call: RuntimeCall | IMethod | string | Uint8Array,
268
+ resultXcmsVersion: u32 | AnyNumber | Uint8Array
269
+ ) => Observable<Result<CallDryRunEffects, XcmDryRunApiError>>
270
+ >;
271
+ /**
272
+ * Dry run XCM program
273
+ **/
274
+ dryRunXcm: AugmentedCall<
275
+ ApiType,
276
+ (
277
+ originLocation:
278
+ | VersionedMultiLocation
279
+ | { V0: any }
280
+ | { V1: any }
281
+ | { V2: any }
282
+ | { V3: any }
283
+ | { V4: any }
284
+ | { v5: any }
285
+ | string
286
+ | Uint8Array,
287
+ xcm:
288
+ | VersionedXcm
289
+ | { V0: any }
290
+ | { V1: any }
291
+ | { V2: any }
292
+ | { V3: any }
293
+ | { V4: any }
294
+ | { V5: any }
295
+ | string
296
+ | Uint8Array
297
+ ) => Observable<Result<XcmDryRunEffects, XcmDryRunApiError>>
298
+ >;
299
+ /**
300
+ * Generic call
301
+ **/
302
+ [key: string]: DecoratedCallBase<ApiType>;
303
+ };
229
304
  /** 0xb9e7717ace5b45cd/1 */
230
305
  fileSystemApi: {
306
+ /**
307
+ * Decodes the BucketId expected to be found in the event info of a generic apply delta.
308
+ **/
309
+ decodeGenericApplyDeltaEventInfo: AugmentedCall<
310
+ ApiType,
311
+ (
312
+ encodedEventInfo: Bytes | string | Uint8Array
313
+ ) => Observable<Result<BucketId, GenericApplyDeltaEventInfoError>>
314
+ >;
315
+ /**
316
+ * Check if a storage request is open to volunteers.
317
+ **/
318
+ isStorageRequestOpenToVolunteers: AugmentedCall<
319
+ ApiType,
320
+ (
321
+ fileKey: H256 | string | Uint8Array
322
+ ) => Observable<Result<bool, IsStorageRequestOpenToVolunteersError>>
323
+ >;
324
+ /**
325
+ * Get pending storage requests for a Main Storage Provider.
326
+ **/
327
+ pendingStorageRequestsByMsp: AugmentedCall<
328
+ ApiType,
329
+ (
330
+ mspId: MainStorageProviderId | string | Uint8Array
331
+ ) => Observable<BTreeMap<H256, StorageRequestMetadata>>
332
+ >;
231
333
  /**
232
334
  * Query the chunks that a BSP needs to prove to confirm that it is storing a file.
233
335
  **/
@@ -238,6 +340,15 @@ declare module "@polkadot/api-base/types/calls" {
238
340
  fileKey: H256 | string | Uint8Array
239
341
  ) => Observable<Result<Vec<ChunkId>, QueryBspConfirmChunksToProveForFileError>>
240
342
  >;
343
+ /**
344
+ * Query the BSPs that volunteered for a file.
345
+ **/
346
+ queryBspsVolunteeredForFile: AugmentedCall<
347
+ ApiType,
348
+ (
349
+ fileKey: H256 | string | Uint8Array
350
+ ) => Observable<Result<Vec<BackupStorageProviderId>, QueryBspsVolunteeredForFileError>>
351
+ >;
241
352
  /**
242
353
  * Query the earliest tick number that a BSP can volunteer for a file.
243
354
  **/
@@ -248,6 +359,20 @@ declare module "@polkadot/api-base/types/calls" {
248
359
  fileKey: H256 | string | Uint8Array
249
360
  ) => Observable<Result<BlockNumber, QueryFileEarliestVolunteerBlockError>>
250
361
  >;
362
+ /**
363
+ * Query incomplete storage request metadata for a file key.
364
+ **/
365
+ queryIncompleteStorageRequestMetadata: AugmentedCall<
366
+ ApiType,
367
+ (
368
+ fileKey: H256 | string | Uint8Array
369
+ ) => Observable<
370
+ Result<
371
+ IncompleteStorageRequestMetadataResponse,
372
+ QueryIncompleteStorageRequestMetadataError
373
+ >
374
+ >
375
+ >;
251
376
  /**
252
377
  * Query the chunks that a MSP needs to prove to confirm that it is storing a file.
253
378
  **/
@@ -258,6 +383,15 @@ declare module "@polkadot/api-base/types/calls" {
258
383
  fileKey: H256 | string | Uint8Array
259
384
  ) => Observable<Result<Vec<ChunkId>, QueryMspConfirmChunksToProveForFileError>>
260
385
  >;
386
+ /**
387
+ * Get the storage requests for a given MSP.
388
+ **/
389
+ storageRequestsByMsp: AugmentedCall<
390
+ ApiType,
391
+ (
392
+ mspId: MainStorageProviderId | string | Uint8Array
393
+ ) => Observable<BTreeMap<H256, StorageRequestMetadata>>
394
+ >;
261
395
  /**
262
396
  * Generic call
263
397
  **/
@@ -291,9 +425,9 @@ declare module "@polkadot/api-base/types/calls" {
291
425
  (
292
426
  location:
293
427
  | XcmVersionedLocation
294
- | { V2: any }
295
428
  | { V3: any }
296
429
  | { V4: any }
430
+ | { V5: any }
297
431
  | string
298
432
  | Uint8Array
299
433
  ) => Observable<Result<AccountId, Error>>
@@ -353,6 +487,13 @@ declare module "@polkadot/api-base/types/calls" {
353
487
  };
354
488
  /** 0x1078d7ac24a07b0e/1 */
355
489
  paymentStreamsApi: {
490
+ /**
491
+ * Get the Providers that have at least one payment stream with a specific user.
492
+ **/
493
+ getProvidersWithPaymentStreamsWithUser: AugmentedCall<
494
+ ApiType,
495
+ (userAccount: AccountId | string | Uint8Array) => Observable<Vec<ProviderId>>
496
+ >;
356
497
  /**
357
498
  * Get the payment streams of a provider.
358
499
  **/
@@ -446,7 +587,7 @@ declare module "@polkadot/api-base/types/calls" {
446
587
  ApiType,
447
588
  (
448
589
  providerId: ProviderId | string | Uint8Array
449
- ) => Observable<Result<BlockNumber, GetLastTickProviderSubmittedProofError>>
590
+ ) => Observable<Result<BlockNumber, GetProofSubmissionRecordError>>
450
591
  >;
451
592
  /**
452
593
  * Get the next deadline tick.
@@ -457,6 +598,15 @@ declare module "@polkadot/api-base/types/calls" {
457
598
  providerId: ProviderId | string | Uint8Array
458
599
  ) => Observable<Result<BlockNumber, GetNextDeadlineTickError>>
459
600
  >;
601
+ /**
602
+ * Get the next tick for which the submitter should submit a proof.
603
+ **/
604
+ getNextTickToSubmitProofFor: AugmentedCall<
605
+ ApiType,
606
+ (
607
+ providerId: ProviderId | string | Uint8Array
608
+ ) => Observable<Result<BlockNumber, GetProofSubmissionRecordError>>
609
+ >;
460
610
  /**
461
611
  * Generic call
462
612
  **/
@@ -487,6 +637,13 @@ declare module "@polkadot/api-base/types/calls" {
487
637
  };
488
638
  /** 0x966604ffe78eb092/1 */
489
639
  storageProvidersApi: {
640
+ /**
641
+ * Check if a provider can be deleted.
642
+ **/
643
+ canDeleteProvider: AugmentedCall<
644
+ ApiType,
645
+ (providerId: ProviderId | string | Uint8Array) => Observable<bool>
646
+ >;
490
647
  /**
491
648
  * Get the BSP info for a given BSP ID.
492
649
  **/
@@ -496,6 +653,15 @@ declare module "@polkadot/api-base/types/calls" {
496
653
  bspId: BackupStorageProviderId | string | Uint8Array
497
654
  ) => Observable<Result<BackupStorageProvider, GetBspInfoError>>
498
655
  >;
656
+ /**
657
+ * Get the stake of a BSP.
658
+ **/
659
+ getBspStake: AugmentedCall<
660
+ ApiType,
661
+ (
662
+ bspId: BackupStorageProviderId | string | Uint8Array
663
+ ) => Observable<Result<Balance, GetStakeError>>
664
+ >;
499
665
  /**
500
666
  * Get the slashable amount corresponding to the configured max file size.
501
667
  **/
@@ -523,6 +689,25 @@ declare module "@polkadot/api-base/types/calls" {
523
689
  providerId: ProviderId | string | Uint8Array
524
690
  ) => Observable<Result<StorageDataUnit, QueryAvailableStorageCapacityError>>
525
691
  >;
692
+ /**
693
+ * Get the Buckets that an MSP is storing.
694
+ **/
695
+ queryBucketsForMsp: AugmentedCall<
696
+ ApiType,
697
+ (
698
+ mspId: MainStorageProviderId | string | Uint8Array
699
+ ) => Observable<Result<Vec<BucketId>, QueryBucketsForMspError>>
700
+ >;
701
+ /**
702
+ * Query the buckets stored by an MSP that belong to a specific user.
703
+ **/
704
+ queryBucketsOfUserStoredByMsp: AugmentedCall<
705
+ ApiType,
706
+ (
707
+ mspId: ProviderId | string | Uint8Array,
708
+ user: AccountId | string | Uint8Array
709
+ ) => Observable<Result<Vec<H256>, QueryBucketsOfUserStoredByMspError>>
710
+ >;
526
711
  /**
527
712
  * Query the earliest block number that a BSP can change its capacity.
528
713
  **/
@@ -559,6 +744,15 @@ declare module "@polkadot/api-base/types/calls" {
559
744
  providerId: ProviderId | string | Uint8Array
560
745
  ) => Observable<Result<StorageDataUnit, QueryStorageProviderCapacityError>>
561
746
  >;
747
+ /**
748
+ * Query the value propositions for a MSP.
749
+ **/
750
+ queryValuePropositionsForMsp: AugmentedCall<
751
+ ApiType,
752
+ (
753
+ mspId: MainStorageProviderId | string | Uint8Array
754
+ ) => Observable<Vec<ValuePropositionWithId>>
755
+ >;
562
756
  /**
563
757
  * Generic call
564
758
  **/
@@ -686,7 +880,7 @@ declare module "@polkadot/api-base/types/calls" {
686
880
  ApiType,
687
881
  (
688
882
  weight: WeightV2 | { refTime?: any; proofSize?: any } | string | Uint8Array,
689
- asset: XcmVersionedAssetId | { V3: any } | { V4: any } | string | Uint8Array
883
+ asset: XcmVersionedAssetId | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array
690
884
  ) => Observable<Result<u128, XcmPaymentApiError>>
691
885
  >;
692
886
  /**
@@ -695,7 +889,7 @@ declare module "@polkadot/api-base/types/calls" {
695
889
  queryXcmWeight: AugmentedCall<
696
890
  ApiType,
697
891
  (
698
- message: XcmVersionedXcm | { V2: any } | { V3: any } | { V4: any } | string | Uint8Array
892
+ message: XcmVersionedXcm | { V3: any } | { V4: any } | { V5: any } | string | Uint8Array
699
893
  ) => Observable<Result<WeightV2, XcmPaymentApiError>>
700
894
  >;
701
895
  /**