@argonprotocol/mainchain 1.4.3-dev.b97b3c4f → 1.4.3-dev.caca6309

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