@storagehub/api-augment 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. package/README.md +54 -0
  2. package/biome.json +10 -0
  3. package/dist/index.js +4 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/interfaces/augment-api-consts.js +6 -0
  6. package/dist/interfaces/augment-api-consts.js.map +1 -0
  7. package/dist/interfaces/augment-api-errors.js +6 -0
  8. package/dist/interfaces/augment-api-errors.js.map +1 -0
  9. package/dist/interfaces/augment-api-events.js +6 -0
  10. package/dist/interfaces/augment-api-events.js.map +1 -0
  11. package/dist/interfaces/augment-api-query.js +6 -0
  12. package/dist/interfaces/augment-api-query.js.map +1 -0
  13. package/dist/interfaces/augment-api-rpc.js +6 -0
  14. package/dist/interfaces/augment-api-rpc.js.map +1 -0
  15. package/dist/interfaces/augment-api-runtime.js +6 -0
  16. package/dist/interfaces/augment-api-runtime.js.map +1 -0
  17. package/dist/interfaces/augment-api-tx.js +6 -0
  18. package/dist/interfaces/augment-api-tx.js.map +1 -0
  19. package/dist/interfaces/augment-api.js +10 -0
  20. package/dist/interfaces/augment-api.js.map +1 -0
  21. package/dist/interfaces/augment-types.js +6 -0
  22. package/dist/interfaces/augment-types.js.map +1 -0
  23. package/dist/interfaces/definitions.js +2 -0
  24. package/dist/interfaces/definitions.js.map +1 -0
  25. package/dist/interfaces/index.js +4 -0
  26. package/dist/interfaces/index.js.map +1 -0
  27. package/dist/interfaces/lookup.js +4504 -0
  28. package/dist/interfaces/lookup.js.map +1 -0
  29. package/dist/interfaces/registry.js +6 -0
  30. package/dist/interfaces/registry.js.map +1 -0
  31. package/dist/interfaces/storagehubclient/definitions.js +7 -0
  32. package/dist/interfaces/storagehubclient/definitions.js.map +1 -0
  33. package/dist/interfaces/storagehubclient/index.js +4 -0
  34. package/dist/interfaces/storagehubclient/index.js.map +1 -0
  35. package/dist/interfaces/storagehubclient/runtime.js +152 -0
  36. package/dist/interfaces/storagehubclient/runtime.js.map +1 -0
  37. package/dist/interfaces/storagehubclient/types.js +4 -0
  38. package/dist/interfaces/storagehubclient/types.js.map +1 -0
  39. package/dist/interfaces/types-lookup.js +6 -0
  40. package/dist/interfaces/types-lookup.js.map +1 -0
  41. package/dist/interfaces/types.js +4 -0
  42. package/dist/interfaces/types.js.map +1 -0
  43. package/dist/types/index.d.ts +3 -0
  44. package/dist/types/interfaces/augment-api-consts.d.ts +556 -0
  45. package/dist/types/interfaces/augment-api-errors.d.ts +1195 -0
  46. package/dist/types/interfaces/augment-api-events.d.ts +2070 -0
  47. package/dist/types/interfaces/augment-api-query.d.ts +1439 -0
  48. package/dist/types/interfaces/augment-api-rpc.d.ts +718 -0
  49. package/dist/types/interfaces/augment-api-runtime.d.ts +441 -0
  50. package/dist/types/interfaces/augment-api-tx.d.ts +3039 -0
  51. package/dist/types/interfaces/augment-api.d.ts +7 -0
  52. package/dist/types/interfaces/augment-types.d.ts +1285 -0
  53. package/dist/types/interfaces/definitions.d.ts +1 -0
  54. package/dist/types/interfaces/index.d.ts +1 -0
  55. package/dist/types/interfaces/lookup.d.ts +4179 -0
  56. package/dist/types/interfaces/registry.d.ts +272 -0
  57. package/dist/types/interfaces/storagehubclient/definitions.d.ts +6 -0
  58. package/dist/types/interfaces/storagehubclient/index.d.ts +1 -0
  59. package/dist/types/interfaces/storagehubclient/runtime.d.ts +2 -0
  60. package/dist/types/interfaces/storagehubclient/types.d.ts +198 -0
  61. package/dist/types/interfaces/types-lookup.d.ts +4457 -0
  62. package/dist/types/interfaces/types.d.ts +1 -0
  63. package/package.json +38 -0
  64. package/scripts/scrapeMetadata.ts +77 -0
  65. package/src/index.ts +3 -0
  66. package/src/interfaces/augment-api-consts.ts +570 -0
  67. package/src/interfaces/augment-api-errors.ts +1203 -0
  68. package/src/interfaces/augment-api-events.ts +1836 -0
  69. package/src/interfaces/augment-api-query.ts +1975 -0
  70. package/src/interfaces/augment-api-rpc.ts +1201 -0
  71. package/src/interfaces/augment-api-runtime.ts +707 -0
  72. package/src/interfaces/augment-api-tx.ts +3418 -0
  73. package/src/interfaces/augment-api.ts +10 -0
  74. package/src/interfaces/augment-types.ts +2508 -0
  75. package/src/interfaces/definitions.ts +1 -0
  76. package/src/interfaces/index.ts +4 -0
  77. package/src/interfaces/lookup.ts +4511 -0
  78. package/src/interfaces/registry.ts +546 -0
  79. package/src/interfaces/storagehubclient/definitions.ts +7 -0
  80. package/src/interfaces/storagehubclient/index.ts +4 -0
  81. package/src/interfaces/storagehubclient/runtime.ts +156 -0
  82. package/src/interfaces/storagehubclient/types.ts +241 -0
  83. package/src/interfaces/types-lookup.ts +5623 -0
  84. package/src/interfaces/types.ts +4 -0
  85. package/storagehub.json +1 -0
  86. package/tsconfig.json +22 -0
@@ -0,0 +1,718 @@
1
+ import "@polkadot/rpc-core/types/jsonrpc";
2
+ import type { AugmentedRpc } from "@polkadot/rpc-core/types";
3
+ import type { Metadata, StorageKey } from "@polkadot/types";
4
+ import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, f64, u32, u64 } from "@polkadot/types-codec";
5
+ import type { AnyNumber, Codec, ITuple } from "@polkadot/types-codec/types";
6
+ import type { ExtrinsicOrHash, ExtrinsicStatus } from "@polkadot/types/interfaces/author";
7
+ import type { EpochAuthorship } from "@polkadot/types/interfaces/babe";
8
+ import type { BeefyVersionedFinalityProof } from "@polkadot/types/interfaces/beefy";
9
+ import type { BlockHash } from "@polkadot/types/interfaces/chain";
10
+ import type { PrefixedStorageKey } from "@polkadot/types/interfaces/childstate";
11
+ import type { AuthorityId } from "@polkadot/types/interfaces/consensus";
12
+ import type { CodeUploadRequest, CodeUploadResult, ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequestV1 } from "@polkadot/types/interfaces/contracts";
13
+ import type { BlockStats } from "@polkadot/types/interfaces/dev";
14
+ import type { CreatedBlock } from "@polkadot/types/interfaces/engine";
15
+ import type { EthAccount, EthCallRequest, EthFeeHistory, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from "@polkadot/types/interfaces/eth";
16
+ import type { Extrinsic } from "@polkadot/types/interfaces/extrinsics";
17
+ import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from "@polkadot/types/interfaces/grandpa";
18
+ import type { MmrHash, MmrLeafBatchProof } from "@polkadot/types/interfaces/mmr";
19
+ import type { StorageKind } from "@polkadot/types/interfaces/offchain";
20
+ import type { FeeDetails, RuntimeDispatchInfoV1 } from "@polkadot/types/interfaces/payment";
21
+ import type { RpcMethods } from "@polkadot/types/interfaces/rpc";
22
+ import type { AccountId, AccountId32, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from "@polkadot/types/interfaces/runtime";
23
+ import type { MigrationStatusResult, ReadProof, RuntimeVersion, TraceBlockResponse } from "@polkadot/types/interfaces/state";
24
+ import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from "@polkadot/types/interfaces/system";
25
+ import type { IExtrinsic, Observable } from "@polkadot/types/types";
26
+ import type { FileMetadata, GetFileFromFileStorageResult, SaveFileToDisk } from "@storagehub/api-augment/interfaces/storagehubclient";
27
+ export type __AugmentedRpc = AugmentedRpc<() => unknown>;
28
+ declare module "@polkadot/rpc-core/types/jsonrpc" {
29
+ interface RpcInterface {
30
+ author: {
31
+ /**
32
+ * Returns true if the keystore has private keys for the given public key and key type.
33
+ **/
34
+ hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;
35
+ /**
36
+ * Returns true if the keystore has private keys for the given session public keys.
37
+ **/
38
+ hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;
39
+ /**
40
+ * Insert a key into the keystore.
41
+ **/
42
+ insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;
43
+ /**
44
+ * Returns all pending extrinsics, potentially grouped by sender
45
+ **/
46
+ pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;
47
+ /**
48
+ * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
49
+ **/
50
+ removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | {
51
+ Hash: any;
52
+ } | {
53
+ Extrinsic: any;
54
+ } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;
55
+ /**
56
+ * Generate new session keys and returns the corresponding public keys
57
+ **/
58
+ rotateKeys: AugmentedRpc<() => Observable<Bytes>>;
59
+ /**
60
+ * Submit and subscribe to watch an extrinsic until unsubscribed
61
+ **/
62
+ submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ExtrinsicStatus>>;
63
+ /**
64
+ * Submit a fully formatted extrinsic for block inclusion
65
+ **/
66
+ submitExtrinsic: AugmentedRpc<(extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<Hash>>;
67
+ };
68
+ babe: {
69
+ /**
70
+ * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore
71
+ **/
72
+ epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
73
+ };
74
+ beefy: {
75
+ /**
76
+ * Returns hash of the latest BEEFY finalized block as seen by this client.
77
+ **/
78
+ getFinalizedHead: AugmentedRpc<() => Observable<H256>>;
79
+ /**
80
+ * Returns the block most recently finalized by BEEFY, alongside its justification.
81
+ **/
82
+ subscribeJustifications: AugmentedRpc<() => Observable<BeefyVersionedFinalityProof>>;
83
+ };
84
+ chain: {
85
+ /**
86
+ * Get header and body of a relay chain block
87
+ **/
88
+ getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;
89
+ /**
90
+ * Get the block hash for a specific block
91
+ **/
92
+ getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;
93
+ /**
94
+ * Get hash of the last finalized block in the canon chain
95
+ **/
96
+ getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;
97
+ /**
98
+ * Retrieves the header for a specific block
99
+ **/
100
+ getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;
101
+ /**
102
+ * Retrieves the newest header via subscription
103
+ **/
104
+ subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;
105
+ /**
106
+ * Retrieves the best finalized header via subscription
107
+ **/
108
+ subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;
109
+ /**
110
+ * Retrieves the best header via subscription
111
+ **/
112
+ subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;
113
+ };
114
+ childstate: {
115
+ /**
116
+ * Returns the keys with prefix from a child storage, leave empty to get all the keys
117
+ **/
118
+ getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
119
+ /**
120
+ * Returns the keys with prefix from a child storage with pagination support
121
+ **/
122
+ getKeysPaged: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
123
+ /**
124
+ * Returns a child storage entry at a specific block state
125
+ **/
126
+ getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;
127
+ /**
128
+ * Returns child storage entries for multiple keys at a specific block state
129
+ **/
130
+ getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;
131
+ /**
132
+ * Returns the hash of a child storage entry at a block state
133
+ **/
134
+ getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;
135
+ /**
136
+ * Returns the size of a child storage entry at a block state
137
+ **/
138
+ getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;
139
+ };
140
+ contracts: {
141
+ /**
142
+ * @deprecated Use the runtime interface `api.call.contractsApi.call` instead
143
+ * Executes a call to a contract
144
+ **/
145
+ call: AugmentedRpc<(callRequest: ContractCallRequest | {
146
+ origin?: any;
147
+ dest?: any;
148
+ value?: any;
149
+ gasLimit?: any;
150
+ storageDepositLimit?: any;
151
+ inputData?: any;
152
+ } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
153
+ /**
154
+ * @deprecated Use the runtime interface `api.call.contractsApi.getStorage` instead
155
+ * Returns the value under a specified storage key in a contract
156
+ **/
157
+ getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
158
+ /**
159
+ * @deprecated Use the runtime interface `api.call.contractsApi.instantiate` instead
160
+ * Instantiate a new contract
161
+ **/
162
+ instantiate: AugmentedRpc<(request: InstantiateRequestV1 | {
163
+ origin?: any;
164
+ value?: any;
165
+ gasLimit?: any;
166
+ code?: any;
167
+ data?: any;
168
+ salt?: any;
169
+ } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
170
+ /**
171
+ * @deprecated Not available in newer versions of the contracts interfaces
172
+ * Returns the projected time a given contract will be able to sustain paying its rent
173
+ **/
174
+ rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
175
+ /**
176
+ * @deprecated Use the runtime interface `api.call.contractsApi.uploadCode` instead
177
+ * Upload new code without instantiating a contract from it
178
+ **/
179
+ uploadCode: AugmentedRpc<(uploadRequest: CodeUploadRequest | {
180
+ origin?: any;
181
+ code?: any;
182
+ storageDepositLimit?: any;
183
+ } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<CodeUploadResult>>;
184
+ };
185
+ dev: {
186
+ /**
187
+ * Reexecute the specified `block_hash` and gather statistics while doing so
188
+ **/
189
+ getBlockStats: AugmentedRpc<(at: Hash | string | Uint8Array) => Observable<Option<BlockStats>>>;
190
+ };
191
+ engine: {
192
+ /**
193
+ * Instructs the manual-seal authorship task to create a new block
194
+ **/
195
+ createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;
196
+ /**
197
+ * Instructs the manual-seal authorship task to finalize a block
198
+ **/
199
+ finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;
200
+ };
201
+ eth: {
202
+ /**
203
+ * Returns accounts list.
204
+ **/
205
+ accounts: AugmentedRpc<() => Observable<Vec<H160>>>;
206
+ /**
207
+ * Returns the blockNumber
208
+ **/
209
+ blockNumber: AugmentedRpc<() => Observable<U256>>;
210
+ /**
211
+ * Call contract, returning the output data.
212
+ **/
213
+ call: AugmentedRpc<(request: EthCallRequest | {
214
+ from?: any;
215
+ to?: any;
216
+ gasPrice?: any;
217
+ gas?: any;
218
+ value?: any;
219
+ data?: any;
220
+ nonce?: any;
221
+ } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;
222
+ /**
223
+ * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
224
+ **/
225
+ chainId: AugmentedRpc<() => Observable<U64>>;
226
+ /**
227
+ * Returns block author.
228
+ **/
229
+ coinbase: AugmentedRpc<() => Observable<H160>>;
230
+ /**
231
+ * Estimate gas needed for execution of given contract.
232
+ **/
233
+ estimateGas: AugmentedRpc<(request: EthCallRequest | {
234
+ from?: any;
235
+ to?: any;
236
+ gasPrice?: any;
237
+ gas?: any;
238
+ value?: any;
239
+ data?: any;
240
+ nonce?: any;
241
+ } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
242
+ /**
243
+ * Returns fee history for given block count & reward percentiles
244
+ **/
245
+ feeHistory: AugmentedRpc<(blockCount: U256 | AnyNumber | Uint8Array, newestBlock: BlockNumber | AnyNumber | Uint8Array, rewardPercentiles: Option<Vec<f64>> | null | Uint8Array | Vec<f64> | f64[]) => Observable<EthFeeHistory>>;
246
+ /**
247
+ * Returns current gas price.
248
+ **/
249
+ gasPrice: AugmentedRpc<() => Observable<U256>>;
250
+ /**
251
+ * Returns balance of the given account.
252
+ **/
253
+ getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
254
+ /**
255
+ * Returns block with given hash.
256
+ **/
257
+ getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;
258
+ /**
259
+ * Returns block with given number.
260
+ **/
261
+ getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;
262
+ /**
263
+ * Returns the number of transactions in a block with given hash.
264
+ **/
265
+ getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;
266
+ /**
267
+ * Returns the number of transactions in a block with given block number.
268
+ **/
269
+ getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
270
+ /**
271
+ * Returns the code at given address at given time (block number).
272
+ **/
273
+ getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;
274
+ /**
275
+ * Returns filter changes since last poll.
276
+ **/
277
+ getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;
278
+ /**
279
+ * Returns all logs matching given filter (in a range 'from' - 'to').
280
+ **/
281
+ getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;
282
+ /**
283
+ * Returns logs matching given filter object.
284
+ **/
285
+ getLogs: AugmentedRpc<(filter: EthFilter | {
286
+ fromBlock?: any;
287
+ toBlock?: any;
288
+ blockHash?: any;
289
+ address?: any;
290
+ topics?: any;
291
+ } | string | Uint8Array) => Observable<Vec<EthLog>>>;
292
+ /**
293
+ * Returns proof for account and storage.
294
+ **/
295
+ getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;
296
+ /**
297
+ * Returns content of the storage at given address.
298
+ **/
299
+ getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;
300
+ /**
301
+ * Returns transaction at given block hash and index.
302
+ **/
303
+ getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
304
+ /**
305
+ * Returns transaction by given block number and index.
306
+ **/
307
+ getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
308
+ /**
309
+ * Get transaction by its hash.
310
+ **/
311
+ getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;
312
+ /**
313
+ * Returns the number of transactions sent from given address at given time (block number).
314
+ **/
315
+ getTransactionCount: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
316
+ /**
317
+ * Returns transaction receipt by transaction hash.
318
+ **/
319
+ getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;
320
+ /**
321
+ * Returns an uncles at given block and index.
322
+ **/
323
+ getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;
324
+ /**
325
+ * Returns an uncles at given block and index.
326
+ **/
327
+ getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;
328
+ /**
329
+ * Returns the number of uncles in a block with given hash.
330
+ **/
331
+ getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;
332
+ /**
333
+ * Returns the number of uncles in a block with given block number.
334
+ **/
335
+ getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
336
+ /**
337
+ * Returns the hash of the current block, the seedHash, and the boundary condition to be met.
338
+ **/
339
+ getWork: AugmentedRpc<() => Observable<EthWork>>;
340
+ /**
341
+ * Returns the number of hashes per second that the node is mining with.
342
+ **/
343
+ hashrate: AugmentedRpc<() => Observable<U256>>;
344
+ /**
345
+ * Returns max priority fee per gas
346
+ **/
347
+ maxPriorityFeePerGas: AugmentedRpc<() => Observable<U256>>;
348
+ /**
349
+ * Returns true if client is actively mining new blocks.
350
+ **/
351
+ mining: AugmentedRpc<() => Observable<bool>>;
352
+ /**
353
+ * Returns id of new block filter.
354
+ **/
355
+ newBlockFilter: AugmentedRpc<() => Observable<U256>>;
356
+ /**
357
+ * Returns id of new filter.
358
+ **/
359
+ newFilter: AugmentedRpc<(filter: EthFilter | {
360
+ fromBlock?: any;
361
+ toBlock?: any;
362
+ blockHash?: any;
363
+ address?: any;
364
+ topics?: any;
365
+ } | string | Uint8Array) => Observable<U256>>;
366
+ /**
367
+ * Returns id of new block filter.
368
+ **/
369
+ newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;
370
+ /**
371
+ * Returns protocol version encoded as a string (quotes are necessary).
372
+ **/
373
+ protocolVersion: AugmentedRpc<() => Observable<u64>>;
374
+ /**
375
+ * Sends signed transaction, returning its hash.
376
+ **/
377
+ sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;
378
+ /**
379
+ * Sends transaction; will block waiting for signer to return the transaction hash
380
+ **/
381
+ sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | {
382
+ from?: any;
383
+ to?: any;
384
+ gasPrice?: any;
385
+ gas?: any;
386
+ value?: any;
387
+ data?: any;
388
+ nonce?: any;
389
+ } | string | Uint8Array) => Observable<H256>>;
390
+ /**
391
+ * Used for submitting mining hashrate.
392
+ **/
393
+ submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;
394
+ /**
395
+ * Used for submitting a proof-of-work solution.
396
+ **/
397
+ submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;
398
+ /**
399
+ * Subscribe to Eth subscription.
400
+ **/
401
+ subscribe: AugmentedRpc<(kind: EthSubKind | "newHeads" | "logs" | "newPendingTransactions" | "syncing" | number | Uint8Array, params?: EthSubParams | {
402
+ None: any;
403
+ } | {
404
+ Logs: any;
405
+ } | string | Uint8Array) => Observable<Null>>;
406
+ /**
407
+ * Returns an object with data about the sync status or false.
408
+ **/
409
+ syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;
410
+ /**
411
+ * Uninstalls filter.
412
+ **/
413
+ uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;
414
+ };
415
+ grandpa: {
416
+ /**
417
+ * Prove finality for the given block number, returning the Justification for the last block in the set.
418
+ **/
419
+ proveFinality: AugmentedRpc<(blockNumber: BlockNumber | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;
420
+ /**
421
+ * Returns the state of the current best round state as well as the ongoing background rounds
422
+ **/
423
+ roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;
424
+ /**
425
+ * Subscribes to grandpa justifications
426
+ **/
427
+ subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
428
+ };
429
+ mmr: {
430
+ /**
431
+ * Generate MMR proof for the given block numbers.
432
+ **/
433
+ generateProof: AugmentedRpc<(blockNumbers: Vec<u64> | (u64 | AnyNumber | Uint8Array)[], bestKnownBlockNumber?: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafBatchProof>>;
434
+ /**
435
+ * Get the MMR root hash for the current best block.
436
+ **/
437
+ root: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MmrHash>>;
438
+ /**
439
+ * Verify an MMR proof
440
+ **/
441
+ verifyProof: AugmentedRpc<(proof: MmrLeafBatchProof | {
442
+ blockHash?: any;
443
+ leaves?: any;
444
+ proof?: any;
445
+ } | string | Uint8Array) => Observable<bool>>;
446
+ /**
447
+ * Verify an MMR proof statelessly given an mmr_root
448
+ **/
449
+ verifyProofStateless: AugmentedRpc<(root: MmrHash | string | Uint8Array, proof: MmrLeafBatchProof | {
450
+ blockHash?: any;
451
+ leaves?: any;
452
+ proof?: any;
453
+ } | string | Uint8Array) => Observable<bool>>;
454
+ };
455
+ net: {
456
+ /**
457
+ * Returns true if client is actively listening for network connections. Otherwise false.
458
+ **/
459
+ listening: AugmentedRpc<() => Observable<bool>>;
460
+ /**
461
+ * Returns number of peers connected to node.
462
+ **/
463
+ peerCount: AugmentedRpc<() => Observable<Text>>;
464
+ /**
465
+ * Returns protocol version.
466
+ **/
467
+ version: AugmentedRpc<() => Observable<Text>>;
468
+ };
469
+ offchain: {
470
+ /**
471
+ * Get offchain local storage under given key and prefix
472
+ **/
473
+ localStorageGet: AugmentedRpc<(kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
474
+ /**
475
+ * Set offchain local storage under given key and prefix
476
+ **/
477
+ localStorageSet: AugmentedRpc<(kind: StorageKind | "PERSISTENT" | "LOCAL" | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;
478
+ };
479
+ payment: {
480
+ /**
481
+ * @deprecated Use `api.call.transactionPaymentApi.queryFeeDetails` instead
482
+ * Query the detailed fee of a given encoded extrinsic
483
+ **/
484
+ queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;
485
+ /**
486
+ * @deprecated Use `api.call.transactionPaymentApi.queryInfo` instead
487
+ * Retrieves the fee information for an encoded extrinsic
488
+ **/
489
+ queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfoV1>>;
490
+ };
491
+ rpc: {
492
+ /**
493
+ * Retrieves the list of RPC methods that are exposed by the node
494
+ **/
495
+ methods: AugmentedRpc<() => Observable<RpcMethods>>;
496
+ };
497
+ state: {
498
+ /**
499
+ * Perform a call to a builtin on the chain
500
+ **/
501
+ call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;
502
+ /**
503
+ * Retrieves the keys with prefix of a specific child storage
504
+ **/
505
+ getChildKeys: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
506
+ /**
507
+ * Returns proof of storage for child key entries at a specific block state.
508
+ **/
509
+ getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;
510
+ /**
511
+ * Retrieves the child storage for a key
512
+ **/
513
+ getChildStorage: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<StorageData>>;
514
+ /**
515
+ * Retrieves the child storage hash
516
+ **/
517
+ getChildStorageHash: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;
518
+ /**
519
+ * Retrieves the child storage size
520
+ **/
521
+ getChildStorageSize: AugmentedRpc<(childStorageKey: StorageKey | string | Uint8Array | any, childDefinition: StorageKey | string | Uint8Array | any, childType: u32 | AnyNumber | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
522
+ /**
523
+ * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
524
+ * Retrieves the keys with a certain prefix
525
+ **/
526
+ getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
527
+ /**
528
+ * Returns the keys with prefix with pagination support.
529
+ **/
530
+ getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
531
+ /**
532
+ * Returns the runtime metadata
533
+ **/
534
+ getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
535
+ /**
536
+ * @deprecated Use `api.rpc.state.getKeysPaged` to retrieve keys
537
+ * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
538
+ **/
539
+ getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;
540
+ /**
541
+ * Returns proof of storage entries at a specific block state
542
+ **/
543
+ getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;
544
+ /**
545
+ * Get the runtime version
546
+ **/
547
+ getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;
548
+ /**
549
+ * Retrieves the storage for a key
550
+ **/
551
+ getStorage: AugmentedRpc<(<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>)>;
552
+ /**
553
+ * Retrieves the storage hash
554
+ **/
555
+ getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;
556
+ /**
557
+ * Retrieves the storage size
558
+ **/
559
+ getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
560
+ /**
561
+ * Query historical storage entries (by key) starting from a start block
562
+ **/
563
+ queryStorage: AugmentedRpc<(<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>)>;
564
+ /**
565
+ * Query storage entries (by key) starting at block hash given as the second parameter
566
+ **/
567
+ queryStorageAt: AugmentedRpc<(<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>)>;
568
+ /**
569
+ * Retrieves the runtime version via subscription
570
+ **/
571
+ subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;
572
+ /**
573
+ * Subscribes to storage changes for the provided keys
574
+ **/
575
+ subscribeStorage: AugmentedRpc<(<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>)>;
576
+ /**
577
+ * Provides a way to trace the re-execution of a single block
578
+ **/
579
+ traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | Uint8Array | Text | string, storageKeys: Option<Text> | null | Uint8Array | Text | string, methods: Option<Text> | null | Uint8Array | Text | string) => Observable<TraceBlockResponse>>;
580
+ /**
581
+ * Check current migration state
582
+ **/
583
+ trieMigrationStatus: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<MigrationStatusResult>>;
584
+ };
585
+ storagehubclient: {
586
+ /**
587
+ * Generate a SCALE-encoded proof for a group of file keys that might or might not be in the forest.
588
+ **/
589
+ generateForestProof: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, challenged_file_keys: Vec<H256> | (H256 | string | Uint8Array)[]) => Observable<Bytes>>;
590
+ /**
591
+ * Get the metadata of a file from the Forest storage.
592
+ **/
593
+ getFileMetadata: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, file_key: H256 | string | Uint8Array) => Observable<Option<FileMetadata>>>;
594
+ /**
595
+ * Get the root of the forest trie.
596
+ **/
597
+ getForestRoot: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string) => Observable<H256>>;
598
+ /**
599
+ * Generate and insert new keys of type BCSV into the keystore.
600
+ **/
601
+ insertBcsvKeys: AugmentedRpc<(seed: Option<Text> | null | Uint8Array | Text | string) => Observable<Text>>;
602
+ /**
603
+ * Check if a file is in the file storage.
604
+ **/
605
+ isFileInFileStorage: AugmentedRpc<(file_key: H256 | string | Uint8Array) => Observable<GetFileFromFileStorageResult>>;
606
+ /**
607
+ * Check if a file is in the forest.
608
+ **/
609
+ isFileInForest: AugmentedRpc<(forest_key: Option<H256> | null | Uint8Array | H256 | string, file_key: H256 | string | Uint8Array) => Observable<bool>>;
610
+ /**
611
+ * Load a file in the local storage. This is the first step when uploading a file.
612
+ **/
613
+ loadFileInStorage: AugmentedRpc<(file_path: Text | string, location: Text | string, owner: AccountId32 | string | Uint8Array, bucket_id: H256 | string | Uint8Array) => Observable<FileMetadata>>;
614
+ /**
615
+ * Remove keys of BCSV type for the Blockchain Service.
616
+ **/
617
+ removeBcsvKeys: AugmentedRpc<(keystore_path: Text | string) => Observable<ITuple<[]>>>;
618
+ /**
619
+ * Save a file from the local storage to the disk.
620
+ **/
621
+ saveFileToDisk: AugmentedRpc<(file_key: H256 | string | Uint8Array, file_path: Text | string) => Observable<SaveFileToDisk>>;
622
+ };
623
+ syncstate: {
624
+ /**
625
+ * Returns the json-serialized chainspec running the node, with a sync state.
626
+ **/
627
+ genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;
628
+ };
629
+ system: {
630
+ /**
631
+ * Retrieves the next accountIndex as available on the node
632
+ **/
633
+ accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;
634
+ /**
635
+ * Adds the supplied directives to the current log filter
636
+ **/
637
+ addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;
638
+ /**
639
+ * Adds a reserved peer
640
+ **/
641
+ addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;
642
+ /**
643
+ * Retrieves the chain
644
+ **/
645
+ chain: AugmentedRpc<() => Observable<Text>>;
646
+ /**
647
+ * Retrieves the chain type
648
+ **/
649
+ chainType: AugmentedRpc<() => Observable<ChainType>>;
650
+ /**
651
+ * Dry run an extrinsic at a given block
652
+ **/
653
+ dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
654
+ /**
655
+ * Return health status of the node
656
+ **/
657
+ health: AugmentedRpc<() => Observable<Health>>;
658
+ /**
659
+ * 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
660
+ **/
661
+ localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;
662
+ /**
663
+ * Returns the base58-encoded PeerId of the node
664
+ **/
665
+ localPeerId: AugmentedRpc<() => Observable<Text>>;
666
+ /**
667
+ * Retrieves the node name
668
+ **/
669
+ name: AugmentedRpc<() => Observable<Text>>;
670
+ /**
671
+ * Returns current state of the network
672
+ **/
673
+ networkState: AugmentedRpc<() => Observable<NetworkState>>;
674
+ /**
675
+ * Returns the roles the node is running as
676
+ **/
677
+ nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;
678
+ /**
679
+ * Returns the currently connected peers
680
+ **/
681
+ peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;
682
+ /**
683
+ * Get a custom set of properties as a JSON object, defined in the chain spec
684
+ **/
685
+ properties: AugmentedRpc<() => Observable<ChainProperties>>;
686
+ /**
687
+ * Remove a reserved peer
688
+ **/
689
+ removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;
690
+ /**
691
+ * Returns the list of reserved peers
692
+ **/
693
+ reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;
694
+ /**
695
+ * Resets the log filter to Substrate defaults
696
+ **/
697
+ resetLogFilter: AugmentedRpc<() => Observable<Null>>;
698
+ /**
699
+ * Returns the state of the syncing of the node
700
+ **/
701
+ syncState: AugmentedRpc<() => Observable<SyncState>>;
702
+ /**
703
+ * Retrieves the version of the node
704
+ **/
705
+ version: AugmentedRpc<() => Observable<Text>>;
706
+ };
707
+ web3: {
708
+ /**
709
+ * Returns current client version.
710
+ **/
711
+ clientVersion: AugmentedRpc<() => Observable<Text>>;
712
+ /**
713
+ * Returns sha3 of the given data
714
+ **/
715
+ sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;
716
+ };
717
+ }
718
+ }