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