@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
@@ -0,0 +1,1319 @@
1
+ // Auto-generated via `yarn polkadot-types-from-chain`, do not edit
2
+ /* eslint-disable */
3
+
4
+ // import type lookup before we augment - in some environments
5
+ // this is required to allow for ambient/previous definitions
6
+ import "@polkadot/rpc-core/types/jsonrpc";
7
+
8
+ import type { AugmentedRpc } from "@polkadot/rpc-core/types";
9
+ import type { Metadata, StorageKey } from "@polkadot/types";
10
+ import type {
11
+ Bytes,
12
+ HashMap,
13
+ Json,
14
+ Null,
15
+ Option,
16
+ Text,
17
+ U256,
18
+ U64,
19
+ Vec,
20
+ bool,
21
+ f64,
22
+ u32,
23
+ u64
24
+ } from "@polkadot/types-codec";
25
+ import type { AnyNumber, Codec, ITuple } from "@polkadot/types-codec/types";
26
+ import type { ExtrinsicOrHash, ExtrinsicStatus } from "@polkadot/types/interfaces/author";
27
+ import type { EpochAuthorship } from "@polkadot/types/interfaces/babe";
28
+ import type { BeefyVersionedFinalityProof } from "@polkadot/types/interfaces/beefy";
29
+ import type { BlockHash } from "@polkadot/types/interfaces/chain";
30
+ import type { PrefixedStorageKey } from "@polkadot/types/interfaces/childstate";
31
+ import type { AuthorityId } from "@polkadot/types/interfaces/consensus";
32
+ import type {
33
+ CodeUploadRequest,
34
+ CodeUploadResult,
35
+ ContractCallRequest,
36
+ ContractExecResult,
37
+ ContractInstantiateResult,
38
+ InstantiateRequestV1
39
+ } from "@polkadot/types/interfaces/contracts";
40
+ import type { BlockStats } from "@polkadot/types/interfaces/dev";
41
+ import type { CreatedBlock } from "@polkadot/types/interfaces/engine";
42
+ import type {
43
+ EthAccount,
44
+ EthCallRequest,
45
+ EthFeeHistory,
46
+ EthFilter,
47
+ EthFilterChanges,
48
+ EthLog,
49
+ EthReceipt,
50
+ EthRichBlock,
51
+ EthSubKind,
52
+ EthSubParams,
53
+ EthSyncStatus,
54
+ EthTransaction,
55
+ EthTransactionRequest,
56
+ EthWork
57
+ } from "@polkadot/types/interfaces/eth";
58
+ import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics";
59
+ import type {
60
+ EncodedFinalityProofs,
61
+ JustificationNotification,
62
+ ReportedRoundStates
63
+ } from "@polkadot/types/interfaces/grandpa";
64
+ import type { MmrHash, MmrLeafBatchProof } from "@polkadot/types/interfaces/mmr";
65
+ import type { StorageKind } from "@polkadot/types/interfaces/offchain";
66
+ import type { FeeDetails, RuntimeDispatchInfoV1 } from "@polkadot/types/interfaces/payment";
67
+ import type { RpcMethods } from "@polkadot/types/interfaces/rpc";
68
+ import type {
69
+ AccountId,
70
+ BlockNumber,
71
+ H160,
72
+ H256,
73
+ H64,
74
+ Hash,
75
+ Header,
76
+ Index,
77
+ Justification,
78
+ KeyValue,
79
+ SignedBlock,
80
+ StorageData
81
+ } from "@polkadot/types/interfaces/runtime";
82
+ import type {
83
+ MigrationStatusResult,
84
+ ReadProof,
85
+ RuntimeVersion,
86
+ TraceBlockResponse
87
+ } from "@polkadot/types/interfaces/state";
88
+ import type {
89
+ ApplyExtrinsicResult,
90
+ ChainProperties,
91
+ ChainType,
92
+ Health,
93
+ NetworkState,
94
+ NodeRole,
95
+ PeerInfo,
96
+ SyncState
97
+ } from "@polkadot/types/interfaces/system";
98
+ import type { IExtrinsic, Observable } from "@polkadot/types/types";
99
+ import type {
100
+ AddFilesToForestStorageResult,
101
+ CheckpointChallenge,
102
+ FileMetadata,
103
+ GetFileFromFileStorageResult,
104
+ LoadFileInStorageResult,
105
+ RemoveFilesFromForestStorageResult,
106
+ SaveFileToDisk
107
+ } from "@storagehub/api-augment/solochain-evm/interfaces/storagehubclient";
108
+
109
+ export type __AugmentedRpc = AugmentedRpc<() => unknown>;
110
+
111
+ declare module "@polkadot/rpc-core/types/jsonrpc" {
112
+ interface RpcInterface {
113
+ author: {
114
+ /**
115
+ * Returns true if the keystore has private keys for the given public key and key type.
116
+ **/
117
+ hasKey: AugmentedRpc<
118
+ (publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>
119
+ >;
120
+ /**
121
+ * Returns true if the keystore has private keys for the given session public keys.
122
+ **/
123
+ hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;
124
+ /**
125
+ * Insert a key into the keystore.
126
+ **/
127
+ insertKey: AugmentedRpc<
128
+ (
129
+ keyType: Text | string,
130
+ suri: Text | string,
131
+ publicKey: Bytes | string | Uint8Array
132
+ ) => Observable<Bytes>
133
+ >;
134
+ /**
135
+ * Returns all pending extrinsics, potentially grouped by sender
136
+ **/
137
+ pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;
138
+ /**
139
+ * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
140
+ **/
141
+ removeExtrinsic: AugmentedRpc<
142
+ (
143
+ bytesOrHash:
144
+ | Vec<ExtrinsicOrHash>
145
+ | (ExtrinsicOrHash | { Hash: any } | { Extrinsic: any } | string | Uint8Array)[]
146
+ ) => Observable<Vec<Hash>>
147
+ >;
148
+ /**
149
+ * Generate new session keys and returns the corresponding public keys
150
+ **/
151
+ rotateKeys: AugmentedRpc<() => Observable<Bytes>>;
152
+ /**
153
+ * Submit and subscribe to watch an extrinsic until unsubscribed
154
+ **/
155
+ submitAndWatchExtrinsic: AugmentedRpc<
156
+ (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>
157
+ >;
158
+ /**
159
+ * Submit a fully formatted extrinsic for block inclusion
160
+ **/
161
+ submitExtrinsic: AugmentedRpc<
162
+ (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>
163
+ >;
164
+ };
165
+ babe: {
166
+ /**
167
+ * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore
168
+ **/
169
+ epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
170
+ };
171
+ beefy: {
172
+ /**
173
+ * Returns hash of the latest BEEFY finalized block as seen by this client.
174
+ **/
175
+ getFinalizedHead: AugmentedRpc<() => Observable<H256>>;
176
+ /**
177
+ * Returns the block most recently finalized by BEEFY, alongside its justification.
178
+ **/
179
+ subscribeJustifications: AugmentedRpc<() => Observable<BeefyVersionedFinalityProof>>;
180
+ };
181
+ chain: {
182
+ /**
183
+ * Get header and body of a relay chain block
184
+ **/
185
+ getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;
186
+ /**
187
+ * Get the block hash for a specific block
188
+ **/
189
+ getBlockHash: AugmentedRpc<
190
+ (blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>
191
+ >;
192
+ /**
193
+ * Get hash of the last finalized block in the canon chain
194
+ **/
195
+ getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;
196
+ /**
197
+ * Retrieves the header for a specific block
198
+ **/
199
+ getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;
200
+ /**
201
+ * Retrieves the newest header via subscription
202
+ **/
203
+ subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;
204
+ /**
205
+ * Retrieves the best finalized header via subscription
206
+ **/
207
+ subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;
208
+ /**
209
+ * Retrieves the best header via subscription
210
+ **/
211
+ subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;
212
+ };
213
+ childstate: {
214
+ /**
215
+ * Returns the keys with prefix from a child storage, leave empty to get all the keys
216
+ **/
217
+ getKeys: AugmentedRpc<
218
+ (
219
+ childKey: PrefixedStorageKey | string | Uint8Array,
220
+ prefix: StorageKey | string | Uint8Array | any,
221
+ at?: Hash | string | Uint8Array
222
+ ) => Observable<Vec<StorageKey>>
223
+ >;
224
+ /**
225
+ * Returns the keys with prefix from a child storage with pagination support
226
+ **/
227
+ getKeysPaged: AugmentedRpc<
228
+ (
229
+ childKey: PrefixedStorageKey | string | Uint8Array,
230
+ prefix: StorageKey | string | Uint8Array | any,
231
+ count: u32 | AnyNumber | Uint8Array,
232
+ startKey?: StorageKey | string | Uint8Array | any,
233
+ at?: Hash | string | Uint8Array
234
+ ) => Observable<Vec<StorageKey>>
235
+ >;
236
+ /**
237
+ * Returns a child storage entry at a specific block state
238
+ **/
239
+ getStorage: AugmentedRpc<
240
+ (
241
+ childKey: PrefixedStorageKey | string | Uint8Array,
242
+ key: StorageKey | string | Uint8Array | any,
243
+ at?: Hash | string | Uint8Array
244
+ ) => Observable<Option<StorageData>>
245
+ >;
246
+ /**
247
+ * Returns child storage entries for multiple keys at a specific block state
248
+ **/
249
+ getStorageEntries: AugmentedRpc<
250
+ (
251
+ childKey: PrefixedStorageKey | string | Uint8Array,
252
+ keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],
253
+ at?: Hash | string | Uint8Array
254
+ ) => Observable<Vec<Option<StorageData>>>
255
+ >;
256
+ /**
257
+ * Returns the hash of a child storage entry at a block state
258
+ **/
259
+ getStorageHash: AugmentedRpc<
260
+ (
261
+ childKey: PrefixedStorageKey | string | Uint8Array,
262
+ key: StorageKey | string | Uint8Array | any,
263
+ at?: Hash | string | Uint8Array
264
+ ) => Observable<Option<Hash>>
265
+ >;
266
+ /**
267
+ * Returns the size of a child storage entry at a block state
268
+ **/
269
+ getStorageSize: AugmentedRpc<
270
+ (
271
+ childKey: PrefixedStorageKey | string | Uint8Array,
272
+ key: StorageKey | string | Uint8Array | any,
273
+ at?: Hash | string | Uint8Array
274
+ ) => Observable<Option<u64>>
275
+ >;
276
+ };
277
+ contracts: {
278
+ /**
279
+ * @deprecated Use the runtime interface `api.call.contractsApi.call` instead
280
+ * Executes a call to a contract
281
+ **/
282
+ call: AugmentedRpc<
283
+ (
284
+ callRequest:
285
+ | ContractCallRequest
286
+ | {
287
+ origin?: any;
288
+ dest?: any;
289
+ value?: any;
290
+ gasLimit?: any;
291
+ storageDepositLimit?: any;
292
+ inputData?: any;
293
+ }
294
+ | string
295
+ | Uint8Array,
296
+ at?: BlockHash | string | Uint8Array
297
+ ) => Observable<ContractExecResult>
298
+ >;
299
+ /**
300
+ * @deprecated Use the runtime interface `api.call.contractsApi.getStorage` instead
301
+ * Returns the value under a specified storage key in a contract
302
+ **/
303
+ getStorage: AugmentedRpc<
304
+ (
305
+ address: AccountId | string | Uint8Array,
306
+ key: H256 | string | Uint8Array,
307
+ at?: BlockHash | string | Uint8Array
308
+ ) => Observable<Option<Bytes>>
309
+ >;
310
+ /**
311
+ * @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead
312
+ * Instantiate a new contract
313
+ **/
314
+ instantiate: AugmentedRpc<
315
+ (
316
+ request:
317
+ | InstantiateRequestV1
318
+ | { origin?: any; value?: any; gasLimit?: any; code?: any; data?: any; salt?: any }
319
+ | string
320
+ | Uint8Array,
321
+ at?: BlockHash | string | Uint8Array
322
+ ) => Observable<ContractInstantiateResult>
323
+ >;
324
+ /**
325
+ * @deprecated Not available in newer versions of the contracts interfaces
326
+ * Returns the projected time a given contract will be able to sustain paying its rent
327
+ **/
328
+ rentProjection: AugmentedRpc<
329
+ (
330
+ address: AccountId | string | Uint8Array,
331
+ at?: BlockHash | string | Uint8Array
332
+ ) => Observable<Option<BlockNumber>>
333
+ >;
334
+ /**
335
+ * @deprecated Use the runtime interface `api.call.contractsApi.uploadCode` instead
336
+ * Upload new code without instantiating a contract from it
337
+ **/
338
+ uploadCode: AugmentedRpc<
339
+ (
340
+ uploadRequest:
341
+ | CodeUploadRequest
342
+ | { origin?: any; code?: any; storageDepositLimit?: any }
343
+ | string
344
+ | Uint8Array,
345
+ at?: BlockHash | string | Uint8Array
346
+ ) => Observable<CodeUploadResult>
347
+ >;
348
+ };
349
+ dev: {
350
+ /**
351
+ * Reexecute the specified `block_hash` and gather statistics while doing so
352
+ **/
353
+ getBlockStats: AugmentedRpc<
354
+ (at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>
355
+ >;
356
+ };
357
+ engine: {
358
+ /**
359
+ * Instructs the manual-seal authorship task to create a new block
360
+ **/
361
+ createBlock: AugmentedRpc<
362
+ (
363
+ createEmpty: bool | boolean | Uint8Array,
364
+ finalize: bool | boolean | Uint8Array,
365
+ parentHash?: BlockHash | string | Uint8Array
366
+ ) => Observable<CreatedBlock>
367
+ >;
368
+ /**
369
+ * Instructs the manual-seal authorship task to finalize a block
370
+ **/
371
+ finalizeBlock: AugmentedRpc<
372
+ (hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>
373
+ >;
374
+ };
375
+ eth: {
376
+ /**
377
+ * Returns accounts list.
378
+ **/
379
+ accounts: AugmentedRpc<() => Observable<Vec<H160>>>;
380
+ /**
381
+ * Returns the blockNumber
382
+ **/
383
+ blockNumber: AugmentedRpc<() => Observable<U256>>;
384
+ /**
385
+ * Call contract, returning the output data.
386
+ **/
387
+ call: AugmentedRpc<
388
+ (
389
+ request:
390
+ | EthCallRequest
391
+ | {
392
+ from?: any;
393
+ to?: any;
394
+ gasPrice?: any;
395
+ gas?: any;
396
+ value?: any;
397
+ data?: any;
398
+ nonce?: any;
399
+ }
400
+ | string
401
+ | Uint8Array,
402
+ number?: BlockNumber | AnyNumber | Uint8Array
403
+ ) => Observable<Bytes>
404
+ >;
405
+ /**
406
+ * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
407
+ **/
408
+ chainId: AugmentedRpc<() => Observable<U64>>;
409
+ /**
410
+ * Returns block author.
411
+ **/
412
+ coinbase: AugmentedRpc<() => Observable<H160>>;
413
+ /**
414
+ * Estimate gas needed for execution of given contract.
415
+ **/
416
+ estimateGas: AugmentedRpc<
417
+ (
418
+ request:
419
+ | EthCallRequest
420
+ | {
421
+ from?: any;
422
+ to?: any;
423
+ gasPrice?: any;
424
+ gas?: any;
425
+ value?: any;
426
+ data?: any;
427
+ nonce?: any;
428
+ }
429
+ | string
430
+ | Uint8Array,
431
+ number?: BlockNumber | AnyNumber | Uint8Array
432
+ ) => Observable<U256>
433
+ >;
434
+ /**
435
+ * Returns fee history for given block count & reward percentiles
436
+ **/
437
+ feeHistory: AugmentedRpc<
438
+ (
439
+ blockCount: U256 | AnyNumber | Uint8Array,
440
+ newestBlock: BlockNumber | AnyNumber | Uint8Array,
441
+ rewardPercentiles: Option<Vec<f64>> | null | Uint8Array | Vec<f64> | f64[]
442
+ ) => Observable<EthFeeHistory>
443
+ >;
444
+ /**
445
+ * Returns current gas price.
446
+ **/
447
+ gasPrice: AugmentedRpc<() => Observable<U256>>;
448
+ /**
449
+ * Returns balance of the given account.
450
+ **/
451
+ getBalance: AugmentedRpc<
452
+ (
453
+ address: H160 | string | Uint8Array,
454
+ number?: BlockNumber | AnyNumber | Uint8Array
455
+ ) => Observable<U256>
456
+ >;
457
+ /**
458
+ * Returns block with given hash.
459
+ **/
460
+ getBlockByHash: AugmentedRpc<
461
+ (
462
+ hash: H256 | string | Uint8Array,
463
+ full: bool | boolean | Uint8Array
464
+ ) => Observable<Option<EthRichBlock>>
465
+ >;
466
+ /**
467
+ * Returns block with given number.
468
+ **/
469
+ getBlockByNumber: AugmentedRpc<
470
+ (
471
+ block: BlockNumber | AnyNumber | Uint8Array,
472
+ full: bool | boolean | Uint8Array
473
+ ) => Observable<Option<EthRichBlock>>
474
+ >;
475
+ /**
476
+ * Returns the number of transactions in a block with given hash.
477
+ **/
478
+ getBlockTransactionCountByHash: AugmentedRpc<
479
+ (hash: H256 | string | Uint8Array) => Observable<U256>
480
+ >;
481
+ /**
482
+ * Returns the number of transactions in a block with given block number.
483
+ **/
484
+ getBlockTransactionCountByNumber: AugmentedRpc<
485
+ (block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>
486
+ >;
487
+ /**
488
+ * Returns the code at given address at given time (block number).
489
+ **/
490
+ getCode: AugmentedRpc<
491
+ (
492
+ address: H160 | string | Uint8Array,
493
+ number?: BlockNumber | AnyNumber | Uint8Array
494
+ ) => Observable<Bytes>
495
+ >;
496
+ /**
497
+ * Returns filter changes since last poll.
498
+ **/
499
+ getFilterChanges: AugmentedRpc<
500
+ (index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>
501
+ >;
502
+ /**
503
+ * Returns all logs matching given filter (in a range 'from' - 'to').
504
+ **/
505
+ getFilterLogs: AugmentedRpc<
506
+ (index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>
507
+ >;
508
+ /**
509
+ * Returns logs matching given filter object.
510
+ **/
511
+ getLogs: AugmentedRpc<
512
+ (
513
+ filter:
514
+ | EthFilter
515
+ | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any }
516
+ | string
517
+ | Uint8Array
518
+ ) => Observable<Vec<EthLog>>
519
+ >;
520
+ /**
521
+ * Returns proof for account and storage.
522
+ **/
523
+ getProof: AugmentedRpc<
524
+ (
525
+ address: H160 | string | Uint8Array,
526
+ storageKeys: Vec<H256> | (H256 | string | Uint8Array)[],
527
+ number: BlockNumber | AnyNumber | Uint8Array
528
+ ) => Observable<EthAccount>
529
+ >;
530
+ /**
531
+ * Returns content of the storage at given address.
532
+ **/
533
+ getStorageAt: AugmentedRpc<
534
+ (
535
+ address: H160 | string | Uint8Array,
536
+ index: U256 | AnyNumber | Uint8Array,
537
+ number?: BlockNumber | AnyNumber | Uint8Array
538
+ ) => Observable<H256>
539
+ >;
540
+ /**
541
+ * Returns transaction at given block hash and index.
542
+ **/
543
+ getTransactionByBlockHashAndIndex: AugmentedRpc<
544
+ (
545
+ hash: H256 | string | Uint8Array,
546
+ index: U256 | AnyNumber | Uint8Array
547
+ ) => Observable<EthTransaction>
548
+ >;
549
+ /**
550
+ * Returns transaction by given block number and index.
551
+ **/
552
+ getTransactionByBlockNumberAndIndex: AugmentedRpc<
553
+ (
554
+ number: BlockNumber | AnyNumber | Uint8Array,
555
+ index: U256 | AnyNumber | Uint8Array
556
+ ) => Observable<EthTransaction>
557
+ >;
558
+ /**
559
+ * Get transaction by its hash.
560
+ **/
561
+ getTransactionByHash: AugmentedRpc<
562
+ (hash: H256 | string | Uint8Array) => Observable<EthTransaction>
563
+ >;
564
+ /**
565
+ * Returns the number of transactions sent from given address at given time (block number).
566
+ **/
567
+ getTransactionCount: AugmentedRpc<
568
+ (
569
+ address: H160 | string | Uint8Array,
570
+ number?: BlockNumber | AnyNumber | Uint8Array
571
+ ) => Observable<U256>
572
+ >;
573
+ /**
574
+ * Returns transaction receipt by transaction hash.
575
+ **/
576
+ getTransactionReceipt: AugmentedRpc<
577
+ (hash: H256 | string | Uint8Array) => Observable<EthReceipt>
578
+ >;
579
+ /**
580
+ * Returns an uncles at given block and index.
581
+ **/
582
+ getUncleByBlockHashAndIndex: AugmentedRpc<
583
+ (
584
+ hash: H256 | string | Uint8Array,
585
+ index: U256 | AnyNumber | Uint8Array
586
+ ) => Observable<EthRichBlock>
587
+ >;
588
+ /**
589
+ * Returns an uncles at given block and index.
590
+ **/
591
+ getUncleByBlockNumberAndIndex: AugmentedRpc<
592
+ (
593
+ number: BlockNumber | AnyNumber | Uint8Array,
594
+ index: U256 | AnyNumber | Uint8Array
595
+ ) => Observable<EthRichBlock>
596
+ >;
597
+ /**
598
+ * Returns the number of uncles in a block with given hash.
599
+ **/
600
+ getUncleCountByBlockHash: AugmentedRpc<
601
+ (hash: H256 | string | Uint8Array) => Observable<U256>
602
+ >;
603
+ /**
604
+ * Returns the number of uncles in a block with given block number.
605
+ **/
606
+ getUncleCountByBlockNumber: AugmentedRpc<
607
+ (number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>
608
+ >;
609
+ /**
610
+ * Returns the hash of the current block, the seedHash, and the boundary condition to be met.
611
+ **/
612
+ getWork: AugmentedRpc<() => Observable<EthWork>>;
613
+ /**
614
+ * Returns the number of hashes per second that the node is mining with.
615
+ **/
616
+ hashrate: AugmentedRpc<() => Observable<U256>>;
617
+ /**
618
+ * Returns max priority fee per gas
619
+ **/
620
+ maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;
621
+ /**
622
+ * Returns true if client is actively mining new blocks.
623
+ **/
624
+ mining: AugmentedRpc<() => Observable<bool>>;
625
+ /**
626
+ * Returns id of new block filter.
627
+ **/
628
+ newBlockFilter: AugmentedRpc<() => Observable<U256>>;
629
+ /**
630
+ * Returns id of new filter.
631
+ **/
632
+ newFilter: AugmentedRpc<
633
+ (
634
+ filter:
635
+ | EthFilter
636
+ | { fromBlock?: any; toBlock?: any; blockHash?: any; address?: any; topics?: any }
637
+ | string
638
+ | Uint8Array
639
+ ) => Observable<U256>
640
+ >;
641
+ /**
642
+ * Returns id of new block filter.
643
+ **/
644
+ newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;
645
+ /**
646
+ * Returns protocol version encoded as a string (quotes are necessary).
647
+ **/
648
+ protocolVersion: AugmentedRpc<() => Observable<u64>>;
649
+ /**
650
+ * Sends signed transaction, returning its hash.
651
+ **/
652
+ sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;
653
+ /**
654
+ * Sends transaction; will block waiting for signer to return the transaction hash
655
+ **/
656
+ sendTransaction: AugmentedRpc<
657
+ (
658
+ tx:
659
+ | EthTransactionRequest
660
+ | {
661
+ from?: any;
662
+ to?: any;
663
+ gasPrice?: any;
664
+ gas?: any;
665
+ value?: any;
666
+ data?: any;
667
+ nonce?: any;
668
+ }
669
+ | string
670
+ | Uint8Array
671
+ ) => Observable<H256>
672
+ >;
673
+ /**
674
+ * Used for submitting mining hashrate.
675
+ **/
676
+ submitHashrate: AugmentedRpc<
677
+ (index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>
678
+ >;
679
+ /**
680
+ * Used for submitting a proof-of-work solution.
681
+ **/
682
+ submitWork: AugmentedRpc<
683
+ (
684
+ nonce: H64 | string | Uint8Array,
685
+ headerHash: H256 | string | Uint8Array,
686
+ mixDigest: H256 | string | Uint8Array
687
+ ) => Observable<bool>
688
+ >;
689
+ /**
690
+ * Subscribe to Eth subscription.
691
+ **/
692
+ subscribe: AugmentedRpc<
693
+ (
694
+ kind:
695
+ | EthSubKind
696
+ | "newHeads"
697
+ | "logs"
698
+ | "newPendingTransactions"
699
+ | "syncing"
700
+ | number
701
+ | Uint8Array,
702
+ params?: EthSubParams | { None: any } | { Logs: any } | string | Uint8Array
703
+ ) => Observable<Null>
704
+ >;
705
+ /**
706
+ * Returns an object with data about the sync status or false.
707
+ **/
708
+ syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;
709
+ /**
710
+ * Uninstalls filter.
711
+ **/
712
+ uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;
713
+ };
714
+ grandpa: {
715
+ /**
716
+ * Prove finality for the given block number, returning the Justification for the last block in the set.
717
+ **/
718
+ proveFinality: AugmentedRpc<
719
+ (
720
+ blockNumber: BlockNumber | AnyNumber | Uint8Array
721
+ ) => Observable<Option<EncodedFinalityProofs>>
722
+ >;
723
+ /**
724
+ * Returns the state of the current best round state as well as the ongoing background rounds
725
+ **/
726
+ roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;
727
+ /**
728
+ * Subscribes to grandpa justifications
729
+ **/
730
+ subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
731
+ };
732
+ mmr: {
733
+ /**
734
+ * Generate MMR proof for the given block numbers.
735
+ **/
736
+ generateProof: AugmentedRpc<
737
+ (
738
+ blockNumbers: Vec<u64> | (u64 | AnyNumber | Uint8Array)[],
739
+ bestKnownBlockNumber?: u64 | AnyNumber | Uint8Array,
740
+ at?: BlockHash | string | Uint8Array
741
+ ) => Observable<MmrLeafBatchProof>
742
+ >;
743
+ /**
744
+ * Get the MMR root hash for the current best block.
745
+ **/
746
+ root: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>;
747
+ /**
748
+ * Verify an MMR proof
749
+ **/
750
+ verifyProof: AugmentedRpc<
751
+ (
752
+ proof:
753
+ | MmrLeafBatchProof
754
+ | { blockHash?: any; leaves?: any; proof?: any }
755
+ | string
756
+ | Uint8Array
757
+ ) => Observable<bool>
758
+ >;
759
+ /**
760
+ * Verify an MMR proof statelessly given an mmr_root
761
+ **/
762
+ verifyProofStateless: AugmentedRpc<
763
+ (
764
+ root: MmrHash | string | Uint8Array,
765
+ proof:
766
+ | MmrLeafBatchProof
767
+ | { blockHash?: any; leaves?: any; proof?: any }
768
+ | string
769
+ | Uint8Array
770
+ ) => Observable<bool>
771
+ >;
772
+ };
773
+ net: {
774
+ /**
775
+ * Returns true if client is actively listening for network connections. Otherwise false.
776
+ **/
777
+ listening: AugmentedRpc<() => Observable<bool>>;
778
+ /**
779
+ * Returns number of peers connected to node.
780
+ **/
781
+ peerCount: AugmentedRpc<() => Observable<Text>>;
782
+ /**
783
+ * Returns protocol version.
784
+ **/
785
+ version: AugmentedRpc<() => Observable<Text>>;
786
+ };
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
+ >;
797
+ /**
798
+ * Get offchain local storage under given key and prefix
799
+ **/
800
+ localStorageGet: AugmentedRpc<
801
+ (
802
+ kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array,
803
+ key: Bytes | string | Uint8Array
804
+ ) => Observable<Option<Bytes>>
805
+ >;
806
+ /**
807
+ * Set offchain local storage under given key and prefix
808
+ **/
809
+ localStorageSet: AugmentedRpc<
810
+ (
811
+ kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array,
812
+ key: Bytes | string | Uint8Array,
813
+ value: Bytes | string | Uint8Array
814
+ ) => Observable<Null>
815
+ >;
816
+ };
817
+ payment: {
818
+ /**
819
+ * @deprecated Use `api.call.transactionPaymentApi.queryFeeDetails` instead
820
+ * Query the detailed fee of a given encoded extrinsic
821
+ **/
822
+ queryFeeDetails: AugmentedRpc<
823
+ (
824
+ extrinsic: Bytes | string | Uint8Array,
825
+ at?: BlockHash | string | Uint8Array
826
+ ) => Observable<FeeDetails>
827
+ >;
828
+ /**
829
+ * @deprecated Use `api.call.transactionPaymentApi.queryInfo` instead
830
+ * Retrieves the fee information for an encoded extrinsic
831
+ **/
832
+ queryInfo: AugmentedRpc<
833
+ (
834
+ extrinsic: Bytes | string | Uint8Array,
835
+ at?: BlockHash | string | Uint8Array
836
+ ) => Observable<RuntimeDispatchInfoV1>
837
+ >;
838
+ };
839
+ rpc: {
840
+ /**
841
+ * Retrieves the list of RPC methods that are exposed by the node
842
+ **/
843
+ methods: AugmentedRpc<() => Observable<RpcMethods>>;
844
+ };
845
+ state: {
846
+ /**
847
+ * Perform a call to a builtin on the chain
848
+ **/
849
+ call: AugmentedRpc<
850
+ (
851
+ method: Text | string,
852
+ data: Bytes | string | Uint8Array,
853
+ at?: BlockHash | string | Uint8Array
854
+ ) => Observable<Bytes>
855
+ >;
856
+ /**
857
+ * Retrieves the keys with prefix of a specific child storage
858
+ **/
859
+ getChildKeys: AugmentedRpc<
860
+ (
861
+ childStorageKey: StorageKey | string | Uint8Array | any,
862
+ childDefinition: StorageKey | string | Uint8Array | any,
863
+ childType: u32 | AnyNumber | Uint8Array,
864
+ key: StorageKey | string | Uint8Array | any,
865
+ at?: BlockHash | string | Uint8Array
866
+ ) => Observable<Vec<StorageKey>>
867
+ >;
868
+ /**
869
+ * Returns proof of storage for child key entries at a specific block state.
870
+ **/
871
+ getChildReadProof: AugmentedRpc<
872
+ (
873
+ childStorageKey: PrefixedStorageKey | string | Uint8Array,
874
+ keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],
875
+ at?: BlockHash | string | Uint8Array
876
+ ) => Observable<ReadProof>
877
+ >;
878
+ /**
879
+ * Retrieves the child storage for a key
880
+ **/
881
+ getChildStorage: AugmentedRpc<
882
+ (
883
+ childStorageKey: StorageKey | string | Uint8Array | any,
884
+ childDefinition: StorageKey | string | Uint8Array | any,
885
+ childType: u32 | AnyNumber | Uint8Array,
886
+ key: StorageKey | string | Uint8Array | any,
887
+ at?: BlockHash | string | Uint8Array
888
+ ) => Observable<StorageData>
889
+ >;
890
+ /**
891
+ * Retrieves the child storage hash
892
+ **/
893
+ getChildStorageHash: AugmentedRpc<
894
+ (
895
+ childStorageKey: StorageKey | string | Uint8Array | any,
896
+ childDefinition: StorageKey | string | Uint8Array | any,
897
+ childType: u32 | AnyNumber | Uint8Array,
898
+ key: StorageKey | string | Uint8Array | any,
899
+ at?: BlockHash | string | Uint8Array
900
+ ) => Observable<Hash>
901
+ >;
902
+ /**
903
+ * Retrieves the child storage size
904
+ **/
905
+ getChildStorageSize: AugmentedRpc<
906
+ (
907
+ childStorageKey: StorageKey | string | Uint8Array | any,
908
+ childDefinition: StorageKey | string | Uint8Array | any,
909
+ childType: u32 | AnyNumber | Uint8Array,
910
+ key: StorageKey | string | Uint8Array | any,
911
+ at?: BlockHash | string | Uint8Array
912
+ ) => Observable<u64>
913
+ >;
914
+ /**
915
+ * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
916
+ * Retrieves the keys with a certain prefix
917
+ **/
918
+ getKeys: AugmentedRpc<
919
+ (
920
+ key: StorageKey | string | Uint8Array | any,
921
+ at?: BlockHash | string | Uint8Array
922
+ ) => Observable<Vec<StorageKey>>
923
+ >;
924
+ /**
925
+ * Returns the keys with prefix with pagination support.
926
+ **/
927
+ getKeysPaged: AugmentedRpc<
928
+ (
929
+ key: StorageKey | string | Uint8Array | any,
930
+ count: u32 | AnyNumber | Uint8Array,
931
+ startKey?: StorageKey | string | Uint8Array | any,
932
+ at?: BlockHash | string | Uint8Array
933
+ ) => Observable<Vec<StorageKey>>
934
+ >;
935
+ /**
936
+ * Returns the runtime metadata
937
+ **/
938
+ getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
939
+ /**
940
+ * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
941
+ * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
942
+ **/
943
+ getPairs: AugmentedRpc<
944
+ (
945
+ prefix: StorageKey | string | Uint8Array | any,
946
+ at?: BlockHash | string | Uint8Array
947
+ ) => Observable<Vec<KeyValue>>
948
+ >;
949
+ /**
950
+ * Returns proof of storage entries at a specific block state
951
+ **/
952
+ getReadProof: AugmentedRpc<
953
+ (
954
+ keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],
955
+ at?: BlockHash | string | Uint8Array
956
+ ) => Observable<ReadProof>
957
+ >;
958
+ /**
959
+ * Get the runtime version
960
+ **/
961
+ getRuntimeVersion: AugmentedRpc<
962
+ (at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>
963
+ >;
964
+ /**
965
+ * Retrieves the storage for a key
966
+ **/
967
+ getStorage: AugmentedRpc<
968
+ <T = Codec>(
969
+ key: StorageKey | string | Uint8Array | any,
970
+ block?: Hash | Uint8Array | string
971
+ ) => Observable<T>
972
+ >;
973
+ /**
974
+ * Retrieves the storage hash
975
+ **/
976
+ getStorageHash: AugmentedRpc<
977
+ (
978
+ key: StorageKey | string | Uint8Array | any,
979
+ at?: BlockHash | string | Uint8Array
980
+ ) => Observable<Hash>
981
+ >;
982
+ /**
983
+ * Retrieves the storage size
984
+ **/
985
+ getStorageSize: AugmentedRpc<
986
+ (
987
+ key: StorageKey | string | Uint8Array | any,
988
+ at?: BlockHash | string | Uint8Array
989
+ ) => Observable<u64>
990
+ >;
991
+ /**
992
+ * Query historical storage entries (by key) starting from a start block
993
+ **/
994
+ queryStorage: AugmentedRpc<
995
+ <T = Codec[]>(
996
+ keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],
997
+ fromBlock?: Hash | Uint8Array | string,
998
+ toBlock?: Hash | Uint8Array | string
999
+ ) => Observable<[Hash, T][]>
1000
+ >;
1001
+ /**
1002
+ * Query storage entries (by key) starting at block hash given as the second parameter
1003
+ **/
1004
+ queryStorageAt: AugmentedRpc<
1005
+ <T = Codec[]>(
1006
+ keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[],
1007
+ at?: Hash | Uint8Array | string
1008
+ ) => Observable<T>
1009
+ >;
1010
+ /**
1011
+ * Retrieves the runtime version via subscription
1012
+ **/
1013
+ subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;
1014
+ /**
1015
+ * Subscribes to storage changes for the provided keys
1016
+ **/
1017
+ subscribeStorage: AugmentedRpc<
1018
+ <T = Codec[]>(
1019
+ keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]
1020
+ ) => Observable<T>
1021
+ >;
1022
+ /**
1023
+ * Provides a way to trace the re-execution of a single block
1024
+ **/
1025
+ traceBlock: AugmentedRpc<
1026
+ (
1027
+ block: Hash | string | Uint8Array,
1028
+ targets: Option<Text> | null | Uint8Array | Text | string,
1029
+ storageKeys: Option<Text> | null | Uint8Array | Text | string,
1030
+ methods: Option<Text> | null | Uint8Array | Text | string
1031
+ ) => Observable<TraceBlockResponse>
1032
+ >;
1033
+ /**
1034
+ * Check current migration state
1035
+ **/
1036
+ trieMigrationStatus: AugmentedRpc<
1037
+ (at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>
1038
+ >;
1039
+ };
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
+ >;
1087
+ /**
1088
+ * Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest.
1089
+ **/
1090
+ generateForestProof: AugmentedRpc<
1091
+ (
1092
+ forest_key: Option<H256> | null | Uint8Array | H256 | string,
1093
+ challenged_file_keys: Vec<H256> | (H256 | string | Uint8Array)[]
1094
+ ) => Observable<Bytes>
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
+ >;
1116
+ /**
1117
+ * Get the metadata of a file from the Forest storage.
1118
+ **/
1119
+ getFileMetadata: AugmentedRpc<
1120
+ (
1121
+ forest_key: Option<H256> | null | Uint8Array | H256 | string,
1122
+ file_key: H256 | string | Uint8Array
1123
+ ) => Observable<Option<FileMetadata>>
1124
+ >;
1125
+ /**
1126
+ * Get the root of the forest trie.
1127
+ **/
1128
+ getForestRoot: AugmentedRpc<
1129
+ (forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<Option<H256>>
1130
+ >;
1131
+ /**
1132
+ * Generate and insert new keys of type BCSV into the keystore.
1133
+ **/
1134
+ insertBcsvKeys: AugmentedRpc<
1135
+ (seed: Option<Text> | null | Uint8Array | Text | string) => Observable<Text>
1136
+ >;
1137
+ /**
1138
+ * Check if a file is in the file storage.
1139
+ **/
1140
+ isFileInFileStorage: AugmentedRpc<
1141
+ (file_key: H256 | string | Uint8Array) => Observable<GetFileFromFileStorageResult>
1142
+ >;
1143
+ /**
1144
+ * Check if a file is in the forest.
1145
+ **/
1146
+ isFileInForest: AugmentedRpc<
1147
+ (
1148
+ forest_key: Option<H256> | null | Uint8Array | H256 | string,
1149
+ file_key: H256 | string | Uint8Array
1150
+ ) => Observable<bool>
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>>;
1156
+ /**
1157
+ * Load a file in the local storage. This is the first step when uploading a file.
1158
+ **/
1159
+ loadFileInStorage: AugmentedRpc<
1160
+ (
1161
+ file_path: Text | string,
1162
+ location: Text | string,
1163
+ owner_account_id_hex: Text | string,
1164
+ bucket_id: H256 | string | Uint8Array
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>
1175
+ >;
1176
+ /**
1177
+ * Remove keys of BCSV type for the Blockchain Service.
1178
+ **/
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
+ >;
1207
+ /**
1208
+ * Save a file from the local storage to the disk.
1209
+ **/
1210
+ saveFileToDisk: AugmentedRpc<
1211
+ (
1212
+ file_key: H256 | string | Uint8Array,
1213
+ file_path: Text | string
1214
+ ) => Observable<SaveFileToDisk>
1215
+ >;
1216
+ };
1217
+ syncstate: {
1218
+ /**
1219
+ * Returns the json-serialized chainspec running the node, with a sync state.
1220
+ **/
1221
+ genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;
1222
+ };
1223
+ system: {
1224
+ /**
1225
+ * Retrieves the next accountIndex as available on the node
1226
+ **/
1227
+ accountNextIndex: AugmentedRpc<
1228
+ (accountId: AccountId | string | Uint8Array) => Observable<Index>
1229
+ >;
1230
+ /**
1231
+ * Adds the supplied directives to the current log filter
1232
+ **/
1233
+ addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;
1234
+ /**
1235
+ * Adds a reserved peer
1236
+ **/
1237
+ addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;
1238
+ /**
1239
+ * Retrieves the chain
1240
+ **/
1241
+ chain: AugmentedRpc<() => Observable<Text>>;
1242
+ /**
1243
+ * Retrieves the chain type
1244
+ **/
1245
+ chainType: AugmentedRpc<() => Observable<ChainType>>;
1246
+ /**
1247
+ * Dry run an extrinsic at a given block
1248
+ **/
1249
+ dryRun: AugmentedRpc<
1250
+ (
1251
+ extrinsic: Bytes | string | Uint8Array,
1252
+ at?: BlockHash | string | Uint8Array
1253
+ ) => Observable<ApplyExtrinsicResult>
1254
+ >;
1255
+ /**
1256
+ * Return health status of the node
1257
+ **/
1258
+ health: AugmentedRpc<() => Observable<Health>>;
1259
+ /**
1260
+ * The addresses include a trailing /p2p/ with the local PeerId, and are thus suitable to be passed to addReservedPeer or as a bootnode address for example
1261
+ **/
1262
+ localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;
1263
+ /**
1264
+ * Returns the base58-encoded PeerId of the node
1265
+ **/
1266
+ localPeerId: AugmentedRpc<() => Observable<Text>>;
1267
+ /**
1268
+ * Retrieves the node name
1269
+ **/
1270
+ name: AugmentedRpc<() => Observable<Text>>;
1271
+ /**
1272
+ * Returns current state of the network
1273
+ **/
1274
+ networkState: AugmentedRpc<() => Observable<NetworkState>>;
1275
+ /**
1276
+ * Returns the roles the node is running as
1277
+ **/
1278
+ nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;
1279
+ /**
1280
+ * Returns the currently connected peers
1281
+ **/
1282
+ peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;
1283
+ /**
1284
+ * Get a custom set of properties as a JSON object, defined in the chain spec
1285
+ **/
1286
+ properties: AugmentedRpc<() => Observable<ChainProperties>>;
1287
+ /**
1288
+ * Remove a reserved peer
1289
+ **/
1290
+ removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;
1291
+ /**
1292
+ * Returns the list of reserved peers
1293
+ **/
1294
+ reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;
1295
+ /**
1296
+ * Resets the log filter to Substrate defaults
1297
+ **/
1298
+ resetLogFilter: AugmentedRpc<() => Observable<Null>>;
1299
+ /**
1300
+ * Returns the state of the syncing of the node
1301
+ **/
1302
+ syncState: AugmentedRpc<() => Observable<SyncState>>;
1303
+ /**
1304
+ * Retrieves the version of the node
1305
+ **/
1306
+ version: AugmentedRpc<() => Observable<Text>>;
1307
+ };
1308
+ web3: {
1309
+ /**
1310
+ * Returns current client version.
1311
+ **/
1312
+ clientVersion: AugmentedRpc<() => Observable<Text>>;
1313
+ /**
1314
+ * Returns sha3 of the given data
1315
+ **/
1316
+ sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;
1317
+ };
1318
+ } // RpcInterface
1319
+ } // declare module