@polkadot/rpc-augment 6.12.2-20 → 6.12.2-21

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.
package/augment/index.cjs CHANGED
@@ -1,5 +1,3 @@
1
1
  "use strict";
2
2
 
3
- require("@polkadot/types-augment");
4
-
5
- require("./rpc.cjs");
3
+ require("./jsonrpc.cjs");
package/augment/index.js CHANGED
@@ -1,4 +1,3 @@
1
1
  // Copyright 2017-2021 @polkadot/rpc-augment authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
- import '@polkadot/types-augment';
4
- import "./rpc.js";
3
+ import "./jsonrpc.js";
File without changes
File without changes
package/bundle.cjs CHANGED
@@ -3,9 +3,6 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- var _exportNames = {
7
- packageInfo: true
8
- };
9
6
  Object.defineProperty(exports, "packageInfo", {
10
7
  enumerable: true,
11
8
  get: function () {
@@ -15,18 +12,4 @@ Object.defineProperty(exports, "packageInfo", {
15
12
 
16
13
  require("./augment/index.cjs");
17
14
 
18
- var _packageInfo = require("./packageInfo.cjs");
19
-
20
- var _rpc = require("@polkadot/rpc-augment/rpc");
21
-
22
- Object.keys(_rpc).forEach(function (key) {
23
- if (key === "default" || key === "__esModule") return;
24
- if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
25
- if (key in exports && exports[key] === _rpc[key]) return;
26
- Object.defineProperty(exports, key, {
27
- enumerable: true,
28
- get: function () {
29
- return _rpc[key];
30
- }
31
- });
32
- });
15
+ var _packageInfo = require("./packageInfo.cjs");
package/bundle.js CHANGED
@@ -1,5 +1,4 @@
1
1
  // Copyright 2017-2021 @polkadot/rpc-augment authors & contributors
2
2
  // SPDX-License-Identifier: Apache-2.0
3
3
  import "./augment/index.js";
4
- export { packageInfo } from "./packageInfo.js";
5
- export * from '@polkadot/rpc-augment/rpc';
4
+ export { packageInfo } from "./packageInfo.js";
package/package.json CHANGED
@@ -20,11 +20,11 @@
20
20
  "./detectPackage.cjs"
21
21
  ],
22
22
  "type": "module",
23
- "version": "6.12.2-20",
23
+ "version": "6.12.2-21",
24
24
  "main": "index.js",
25
25
  "dependencies": {
26
26
  "@babel/runtime": "^7.16.5",
27
- "@polkadot/types": "6.12.2-20",
27
+ "@polkadot/types": "6.12.2-21",
28
28
  "rxjs": "^7.4.0"
29
29
  },
30
30
  "exports": {
@@ -36,39 +36,23 @@
36
36
  "require": "./augment/index.cjs",
37
37
  "default": "./augment/index.js"
38
38
  },
39
- "./augment/index.d.ts": "./augment/index.d.ts",
40
- "./augment/rpc": {
41
- "require": "./augment/rpc.cjs",
42
- "default": "./augment/rpc.js"
39
+ "./augment/jsonrpc": {
40
+ "require": "./augment/jsonrpc.cjs",
41
+ "default": "./augment/jsonrpc.js"
43
42
  },
44
- "./augment/rpc.d.ts": "./augment/rpc.d.ts",
45
43
  "./bundle": {
46
44
  "require": "./bundle.cjs",
47
45
  "default": "./bundle.js"
48
46
  },
49
- "./bundle.d.ts": "./bundle.d.ts",
50
47
  "./detectPackage": {
51
48
  "require": "./detectPackage.cjs",
52
49
  "default": "./detectPackage.js"
53
50
  },
54
- "./detectPackage.d.ts": "./detectPackage.d.ts",
55
- "./index.d.ts": "./index.d.ts",
56
51
  "./package.json": "./package.json",
57
52
  "./packageInfo": {
58
53
  "require": "./packageInfo.cjs",
59
54
  "default": "./packageInfo.js"
60
55
  },
61
- "./packageInfo.d.ts": "./packageInfo.d.ts",
62
- "./README.md": "./README.md",
63
- "./rpc": {
64
- "require": "./rpc.cjs",
65
- "default": "./rpc.js"
66
- },
67
- "./rpc.d.ts": "./rpc.d.ts",
68
- "./types": {
69
- "require": "./types.cjs",
70
- "default": "./types.js"
71
- },
72
- "./types.d.ts": "./types.d.ts"
56
+ "./README.md": "./README.md"
73
57
  }
74
58
  }
package/packageInfo.cjs CHANGED
@@ -9,6 +9,6 @@ exports.packageInfo = void 0;
9
9
  // Auto-generated by @polkadot/dev, do not edit
10
10
  const packageInfo = {
11
11
  name: '@polkadot/rpc-augment',
12
- version: '6.12.2-20'
12
+ version: '6.12.2-21'
13
13
  };
14
14
  exports.packageInfo = packageInfo;
package/packageInfo.js CHANGED
@@ -3,5 +3,5 @@
3
3
  // Auto-generated by @polkadot/dev, do not edit
4
4
  export const packageInfo = {
5
5
  name: '@polkadot/rpc-augment',
6
- version: '6.12.2-20'
6
+ version: '6.12.2-21'
7
7
  };
@@ -1,2 +0,0 @@
1
- import '@polkadot/types-augment';
2
- import './rpc';
package/augment/rpc.d.ts DELETED
@@ -1,616 +0,0 @@
1
- import type { AugmentedRpc } from '@polkadot/rpc-augment/types';
2
- import type { Metadata, StorageKey } from '@polkadot/types';
3
- import type { Bytes, HashMap, Json, Null, Option, Text, U256, U64, Vec, bool, u32, u64 } from '@polkadot/types-codec';
4
- import type { AnyNumber, Codec } from '@polkadot/types-codec/types';
5
- import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
6
- import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
7
- import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
8
- import type { BlockHash } from '@polkadot/types/interfaces/chain';
9
- import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
10
- import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
11
- import type { ContractCallRequest, ContractExecResult, ContractInstantiateResult, InstantiateRequest } from '@polkadot/types/interfaces/contracts';
12
- import type { CreatedBlock } from '@polkadot/types/interfaces/engine';
13
- import type { EthAccount, EthCallRequest, EthFilter, EthFilterChanges, EthLog, EthReceipt, EthRichBlock, EthSubKind, EthSubParams, EthSyncStatus, EthTransaction, EthTransactionRequest, EthWork } from '@polkadot/types/interfaces/eth';
14
- import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
15
- import type { EncodedFinalityProofs, JustificationNotification, ReportedRoundStates } from '@polkadot/types/interfaces/grandpa';
16
- import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
17
- import type { StorageKind } from '@polkadot/types/interfaces/offchain';
18
- import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
19
- import type { RpcMethods } from '@polkadot/types/interfaces/rpc';
20
- import type { AccountId, BlockNumber, H160, H256, H64, Hash, Header, Index, Justification, KeyValue, SignedBlock, StorageData } from '@polkadot/types/interfaces/runtime';
21
- import type { ReadProof, RuntimeVersion, TraceBlockResponse } from '@polkadot/types/interfaces/state';
22
- import type { ApplyExtrinsicResult, ChainProperties, ChainType, Health, NetworkState, NodeRole, PeerInfo, SyncState } from '@polkadot/types/interfaces/system';
23
- import type { IExtrinsic, Observable } from '@polkadot/types/types';
24
- declare module '@polkadot/rpc-augment/rpc' {
25
- interface RpcInterface {
26
- author: {
27
- /**
28
- * Returns true if the keystore has private keys for the given public key and key type.
29
- **/
30
- hasKey: AugmentedRpc<(publicKey: Bytes | string | Uint8Array, keyType: Text | string) => Observable<bool>>;
31
- /**
32
- * Returns true if the keystore has private keys for the given session public keys.
33
- **/
34
- hasSessionKeys: AugmentedRpc<(sessionKeys: Bytes | string | Uint8Array) => Observable<bool>>;
35
- /**
36
- * Insert a key into the keystore.
37
- **/
38
- insertKey: AugmentedRpc<(keyType: Text | string, suri: Text | string, publicKey: Bytes | string | Uint8Array) => Observable<Bytes>>;
39
- /**
40
- * Returns all pending extrinsics, potentially grouped by sender
41
- **/
42
- pendingExtrinsics: AugmentedRpc<() => Observable<Vec<Extrinsic>>>;
43
- /**
44
- * Remove given extrinsic from the pool and temporarily ban it to prevent reimporting
45
- **/
46
- removeExtrinsic: AugmentedRpc<(bytesOrHash: Vec<ExtrinsicOrHash> | (ExtrinsicOrHash | {
47
- Hash: any;
48
- } | {
49
- Extrinsic: any;
50
- } | string | Uint8Array)[]) => Observable<Vec<Hash>>>;
51
- /**
52
- * Generate new session keys and returns the corresponding public keys
53
- **/
54
- rotateKeys: AugmentedRpc<() => Observable<Bytes>>;
55
- /**
56
- * Submit and subscribe to watch an extrinsic until unsubscribed
57
- **/
58
- submitAndWatchExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<ExtrinsicStatus>>;
59
- /**
60
- * Submit a fully formatted extrinsic for block inclusion
61
- **/
62
- submitExtrinsic: AugmentedRpc<(extrinsic: IExtrinsic) => Observable<Hash>>;
63
- };
64
- babe: {
65
- /**
66
- * Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore
67
- **/
68
- epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
69
- };
70
- beefy: {
71
- /**
72
- * Returns the block most recently finalized by BEEFY, alongside side its justification.
73
- **/
74
- subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;
75
- };
76
- chain: {
77
- /**
78
- * Get header and body of a relay chain block
79
- **/
80
- getBlock: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<SignedBlock>>;
81
- /**
82
- * Get the block hash for a specific block
83
- **/
84
- getBlockHash: AugmentedRpc<(blockNumber?: BlockNumber | AnyNumber | Uint8Array) => Observable<BlockHash>>;
85
- /**
86
- * Get hash of the last finalized block in the canon chain
87
- **/
88
- getFinalizedHead: AugmentedRpc<() => Observable<BlockHash>>;
89
- /**
90
- * Retrieves the header for a specific block
91
- **/
92
- getHeader: AugmentedRpc<(hash?: BlockHash | string | Uint8Array) => Observable<Header>>;
93
- /**
94
- * Retrieves the newest header via subscription
95
- **/
96
- subscribeAllHeads: AugmentedRpc<() => Observable<Header>>;
97
- /**
98
- * Retrieves the best finalized header via subscription
99
- **/
100
- subscribeFinalizedHeads: AugmentedRpc<() => Observable<Header>>;
101
- /**
102
- * Retrieves the best header via subscription
103
- **/
104
- subscribeNewHeads: AugmentedRpc<() => Observable<Header>>;
105
- };
106
- childstate: {
107
- /**
108
- * Returns the keys with prefix from a child storage, leave empty to get all the keys
109
- **/
110
- getKeys: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, prefix: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
111
- /**
112
- * Returns the keys with prefix from a child storage with pagination support
113
- **/
114
- 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>>>;
115
- /**
116
- * Returns a child storage entry at a specific block state
117
- **/
118
- getStorage: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<StorageData>>>;
119
- /**
120
- * Returns child storage entries for multiple keys at a specific block state
121
- **/
122
- getStorageEntries: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | string | Uint8Array) => Observable<Vec<Option<StorageData>>>>;
123
- /**
124
- * Returns the hash of a child storage entry at a block state
125
- **/
126
- getStorageHash: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<Hash>>>;
127
- /**
128
- * Returns the size of a child storage entry at a block state
129
- **/
130
- getStorageSize: AugmentedRpc<(childKey: PrefixedStorageKey | string | Uint8Array, key: StorageKey | string | Uint8Array | any, at?: Hash | string | Uint8Array) => Observable<Option<u64>>>;
131
- };
132
- contracts: {
133
- /**
134
- * Executes a call to a contract
135
- **/
136
- call: AugmentedRpc<(callRequest: ContractCallRequest | {
137
- origin?: any;
138
- dest?: any;
139
- value?: any;
140
- gasLimit?: any;
141
- inputData?: any;
142
- } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractExecResult>>;
143
- /**
144
- * Returns the value under a specified storage key in a contract
145
- **/
146
- getStorage: AugmentedRpc<(address: AccountId | string | Uint8Array, key: H256 | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<Bytes>>>;
147
- /**
148
- * Instantiate a new contract
149
- **/
150
- instantiate: AugmentedRpc<(request: InstantiateRequest | {
151
- origin?: any;
152
- value?: any;
153
- gasLimit?: any;
154
- code?: any;
155
- data?: any;
156
- salt?: any;
157
- } | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ContractInstantiateResult>>;
158
- /**
159
- * Returns the projected time a given contract will be able to sustain paying its rent
160
- **/
161
- rentProjection: AugmentedRpc<(address: AccountId | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Option<BlockNumber>>>;
162
- };
163
- engine: {
164
- /**
165
- * Instructs the manual-seal authorship task to create a new block
166
- **/
167
- createBlock: AugmentedRpc<(createEmpty: bool | boolean | Uint8Array, finalize: bool | boolean | Uint8Array, parentHash?: BlockHash | string | Uint8Array) => Observable<CreatedBlock>>;
168
- /**
169
- * Instructs the manual-seal authorship task to finalize a block
170
- **/
171
- finalizeBlock: AugmentedRpc<(hash: BlockHash | string | Uint8Array, justification?: Justification) => Observable<bool>>;
172
- };
173
- eth: {
174
- /**
175
- * Returns accounts list.
176
- **/
177
- accounts: AugmentedRpc<() => Observable<Vec<H160>>>;
178
- /**
179
- * Returns the blockNumber
180
- **/
181
- blockNumber: AugmentedRpc<() => Observable<U256>>;
182
- /**
183
- * Call contract, returning the output data.
184
- **/
185
- call: AugmentedRpc<(request: EthCallRequest | {
186
- from?: any;
187
- to?: any;
188
- gasPrice?: any;
189
- gas?: any;
190
- value?: any;
191
- data?: any;
192
- nonce?: any;
193
- } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;
194
- /**
195
- * Returns the chain ID used for transaction signing at the current best block. None is returned if not available.
196
- **/
197
- chainId: AugmentedRpc<() => Observable<U64>>;
198
- /**
199
- * Returns block author.
200
- **/
201
- coinbase: AugmentedRpc<() => Observable<H160>>;
202
- /**
203
- * Estimate gas needed for execution of given contract.
204
- **/
205
- estimateGas: AugmentedRpc<(request: EthCallRequest | {
206
- from?: any;
207
- to?: any;
208
- gasPrice?: any;
209
- gas?: any;
210
- value?: any;
211
- data?: any;
212
- nonce?: any;
213
- } | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
214
- /**
215
- * Returns current gas price.
216
- **/
217
- gasPrice: AugmentedRpc<() => Observable<U256>>;
218
- /**
219
- * Returns balance of the given account.
220
- **/
221
- getBalance: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
222
- /**
223
- * Returns block with given hash.
224
- **/
225
- getBlockByHash: AugmentedRpc<(hash: H256 | string | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;
226
- /**
227
- * Returns block with given number.
228
- **/
229
- getBlockByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array, full: bool | boolean | Uint8Array) => Observable<Option<EthRichBlock>>>;
230
- /**
231
- * Returns the number of transactions in a block with given hash.
232
- **/
233
- getBlockTransactionCountByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;
234
- /**
235
- * Returns the number of transactions in a block with given block number.
236
- **/
237
- getBlockTransactionCountByNumber: AugmentedRpc<(block: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
238
- /**
239
- * Returns the code at given address at given time (block number).
240
- **/
241
- getCode: AugmentedRpc<(address: H160 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<Bytes>>;
242
- /**
243
- * Returns filter changes since last poll.
244
- **/
245
- getFilterChanges: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<EthFilterChanges>>;
246
- /**
247
- * Returns all logs matching given filter (in a range 'from' - 'to').
248
- **/
249
- getFilterLogs: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<Vec<EthLog>>>;
250
- /**
251
- * Returns logs matching given filter object.
252
- **/
253
- getLogs: AugmentedRpc<(filter: EthFilter | {
254
- fromBlock?: any;
255
- toBlock?: any;
256
- blockHash?: any;
257
- address?: any;
258
- topics?: any;
259
- } | string | Uint8Array) => Observable<Vec<EthLog>>>;
260
- /**
261
- * Returns proof for account and storage.
262
- **/
263
- getProof: AugmentedRpc<(address: H160 | string | Uint8Array, storageKeys: Vec<H256> | (H256 | string | Uint8Array)[], number: BlockNumber | AnyNumber | Uint8Array) => Observable<EthAccount>>;
264
- /**
265
- * Returns content of the storage at given address.
266
- **/
267
- getStorageAt: AugmentedRpc<(address: H160 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<H256>>;
268
- /**
269
- * Returns transaction at given block hash and index.
270
- **/
271
- getTransactionByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
272
- /**
273
- * Returns transaction by given block number and index.
274
- **/
275
- getTransactionByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthTransaction>>;
276
- /**
277
- * Get transaction by its hash.
278
- **/
279
- getTransactionByHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthTransaction>>;
280
- /**
281
- * Returns the number of transactions sent from given address at given time (block number).
282
- **/
283
- getTransactionCount: AugmentedRpc<(hash: H256 | string | Uint8Array, number?: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
284
- /**
285
- * Returns transaction receipt by transaction hash.
286
- **/
287
- getTransactionReceipt: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<EthReceipt>>;
288
- /**
289
- * Returns an uncles at given block and index.
290
- **/
291
- getUncleByBlockHashAndIndex: AugmentedRpc<(hash: H256 | string | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;
292
- /**
293
- * Returns an uncles at given block and index.
294
- **/
295
- getUncleByBlockNumberAndIndex: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array, index: U256 | AnyNumber | Uint8Array) => Observable<EthRichBlock>>;
296
- /**
297
- * Returns the number of uncles in a block with given hash.
298
- **/
299
- getUncleCountByBlockHash: AugmentedRpc<(hash: H256 | string | Uint8Array) => Observable<U256>>;
300
- /**
301
- * Returns the number of uncles in a block with given block number.
302
- **/
303
- getUncleCountByBlockNumber: AugmentedRpc<(number: BlockNumber | AnyNumber | Uint8Array) => Observable<U256>>;
304
- /**
305
- * Returns the hash of the current block, the seedHash, and the boundary condition to be met.
306
- **/
307
- getWork: AugmentedRpc<() => Observable<EthWork>>;
308
- /**
309
- * Returns the number of hashes per second that the node is mining with.
310
- **/
311
- hashrate: AugmentedRpc<() => Observable<U256>>;
312
- /**
313
- * Returns true if client is actively mining new blocks.
314
- **/
315
- mining: AugmentedRpc<() => Observable<bool>>;
316
- /**
317
- * Returns id of new block filter.
318
- **/
319
- newBlockFilter: AugmentedRpc<() => Observable<U256>>;
320
- /**
321
- * Returns id of new filter.
322
- **/
323
- newFilter: AugmentedRpc<(filter: EthFilter | {
324
- fromBlock?: any;
325
- toBlock?: any;
326
- blockHash?: any;
327
- address?: any;
328
- topics?: any;
329
- } | string | Uint8Array) => Observable<U256>>;
330
- /**
331
- * Returns id of new block filter.
332
- **/
333
- newPendingTransactionFilter: AugmentedRpc<() => Observable<U256>>;
334
- /**
335
- * Returns protocol version encoded as a string (quotes are necessary).
336
- **/
337
- protocolVersion: AugmentedRpc<() => Observable<u64>>;
338
- /**
339
- * Sends signed transaction, returning its hash.
340
- **/
341
- sendRawTransaction: AugmentedRpc<(bytes: Bytes | string | Uint8Array) => Observable<H256>>;
342
- /**
343
- * Sends transaction; will block waiting for signer to return the transaction hash
344
- **/
345
- sendTransaction: AugmentedRpc<(tx: EthTransactionRequest | {
346
- from?: any;
347
- to?: any;
348
- gasPrice?: any;
349
- gas?: any;
350
- value?: any;
351
- data?: any;
352
- nonce?: any;
353
- } | string | Uint8Array) => Observable<H256>>;
354
- /**
355
- * Used for submitting mining hashrate.
356
- **/
357
- submitHashrate: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array, hash: H256 | string | Uint8Array) => Observable<bool>>;
358
- /**
359
- * Used for submitting a proof-of-work solution.
360
- **/
361
- submitWork: AugmentedRpc<(nonce: H64 | string | Uint8Array, headerHash: H256 | string | Uint8Array, mixDigest: H256 | string | Uint8Array) => Observable<bool>>;
362
- /**
363
- * Subscribe to Eth subscription.
364
- **/
365
- subscribe: AugmentedRpc<(kind: EthSubKind | 'newHeads' | 'logs' | 'newPendingTransactions' | 'syncing' | number | Uint8Array, params?: EthSubParams | {
366
- None: any;
367
- } | {
368
- Logs: any;
369
- } | string | Uint8Array) => Observable<Null>>;
370
- /**
371
- * Returns an object with data about the sync status or false.
372
- **/
373
- syncing: AugmentedRpc<() => Observable<EthSyncStatus>>;
374
- /**
375
- * Uninstalls filter.
376
- **/
377
- uninstallFilter: AugmentedRpc<(index: U256 | AnyNumber | Uint8Array) => Observable<bool>>;
378
- };
379
- grandpa: {
380
- /**
381
- * Prove finality for the range (begin; end] hash.
382
- **/
383
- proveFinality: AugmentedRpc<(begin: BlockHash | string | Uint8Array, end: BlockHash | string | Uint8Array, authoritiesSetId?: u64 | AnyNumber | Uint8Array) => Observable<Option<EncodedFinalityProofs>>>;
384
- /**
385
- * Returns the state of the current best round state as well as the ongoing background rounds
386
- **/
387
- roundState: AugmentedRpc<() => Observable<ReportedRoundStates>>;
388
- /**
389
- * Subscribes to grandpa justifications
390
- **/
391
- subscribeJustifications: AugmentedRpc<() => Observable<JustificationNotification>>;
392
- };
393
- mmr: {
394
- /**
395
- * Generate MMR proof for given leaf index.
396
- **/
397
- generateProof: AugmentedRpc<(leafIndex: u64 | AnyNumber | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<MmrLeafProof>>;
398
- };
399
- net: {
400
- /**
401
- * Returns true if client is actively listening for network connections. Otherwise false.
402
- **/
403
- listening: AugmentedRpc<() => Observable<bool>>;
404
- /**
405
- * Returns number of peers connected to node.
406
- **/
407
- peerCount: AugmentedRpc<() => Observable<Text>>;
408
- /**
409
- * Returns protocol version.
410
- **/
411
- version: AugmentedRpc<() => Observable<Text>>;
412
- };
413
- offchain: {
414
- /**
415
- * Get offchain local storage under given key and prefix
416
- **/
417
- localStorageGet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
418
- /**
419
- * Set offchain local storage under given key and prefix
420
- **/
421
- localStorageSet: AugmentedRpc<(kind: StorageKind | 'PERSISTENT' | 'LOCAL' | number | Uint8Array, key: Bytes | string | Uint8Array, value: Bytes | string | Uint8Array) => Observable<Null>>;
422
- };
423
- payment: {
424
- /**
425
- * Query the detailed fee of a given encoded extrinsic
426
- **/
427
- queryFeeDetails: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<FeeDetails>>;
428
- /**
429
- * Retrieves the fee information for an encoded extrinsic
430
- **/
431
- queryInfo: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<RuntimeDispatchInfo>>;
432
- };
433
- rpc: {
434
- /**
435
- * Retrieves the list of RPC methods that are exposed by the node
436
- **/
437
- methods: AugmentedRpc<() => Observable<RpcMethods>>;
438
- };
439
- state: {
440
- /**
441
- * Perform a call to a builtin on the chain
442
- **/
443
- call: AugmentedRpc<(method: Text | string, data: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<Bytes>>;
444
- /**
445
- * Retrieves the keys with prefix of a specific child storage
446
- **/
447
- 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>>>;
448
- /**
449
- * Returns proof of storage for child key entries at a specific block state.
450
- **/
451
- getChildReadProof: AugmentedRpc<(childStorageKey: PrefixedStorageKey | string | Uint8Array, keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;
452
- /**
453
- * Retrieves the child storage for a key
454
- **/
455
- 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>>;
456
- /**
457
- * Retrieves the child storage hash
458
- **/
459
- 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>>;
460
- /**
461
- * Retrieves the child storage size
462
- **/
463
- 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>>;
464
- /**
465
- * Retrieves the keys with a certain prefix
466
- **/
467
- getKeys: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
468
- /**
469
- * Returns the keys with prefix with pagination support.
470
- **/
471
- getKeysPaged: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, count: u32 | AnyNumber | Uint8Array, startKey?: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<StorageKey>>>;
472
- /**
473
- * Returns the runtime metadata
474
- **/
475
- getMetadata: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<Metadata>>;
476
- /**
477
- * Returns the keys with prefix, leave empty to get all the keys (deprecated: Use getKeysPaged)
478
- **/
479
- getPairs: AugmentedRpc<(prefix: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Vec<KeyValue>>>;
480
- /**
481
- * Returns proof of storage entries at a specific block state
482
- **/
483
- getReadProof: AugmentedRpc<(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: BlockHash | string | Uint8Array) => Observable<ReadProof>>;
484
- /**
485
- * Get the runtime version
486
- **/
487
- getRuntimeVersion: AugmentedRpc<(at?: BlockHash | string | Uint8Array) => Observable<RuntimeVersion>>;
488
- /**
489
- * Retrieves the storage for a key
490
- **/
491
- getStorage: AugmentedRpc<(<T = Codec>(key: StorageKey | string | Uint8Array | any, block?: Hash | Uint8Array | string) => Observable<T>)>;
492
- /**
493
- * Retrieves the storage hash
494
- **/
495
- getStorageHash: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<Hash>>;
496
- /**
497
- * Retrieves the storage size
498
- **/
499
- getStorageSize: AugmentedRpc<(key: StorageKey | string | Uint8Array | any, at?: BlockHash | string | Uint8Array) => Observable<u64>>;
500
- /**
501
- * Query historical storage entries (by key) starting from a start block
502
- **/
503
- queryStorage: AugmentedRpc<(<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], fromBlock?: Hash | Uint8Array | string, toBlock?: Hash | Uint8Array | string) => Observable<[Hash, T][]>)>;
504
- /**
505
- * Query storage entries (by key) starting at block hash given as the second parameter
506
- **/
507
- queryStorageAt: AugmentedRpc<(<T = Codec[]>(keys: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[], at?: Hash | Uint8Array | string) => Observable<T>)>;
508
- /**
509
- * Retrieves the runtime version via subscription
510
- **/
511
- subscribeRuntimeVersion: AugmentedRpc<() => Observable<RuntimeVersion>>;
512
- /**
513
- * Subscribes to storage changes for the provided keys
514
- **/
515
- subscribeStorage: AugmentedRpc<(<T = Codec[]>(keys?: Vec<StorageKey> | (StorageKey | string | Uint8Array | any)[]) => Observable<T>)>;
516
- /**
517
- * Provides a way to trace the re-execution of a single block
518
- **/
519
- traceBlock: AugmentedRpc<(block: Hash | string | Uint8Array, targets: Option<Text> | null | object | string | Uint8Array, storageKeys: Option<Text> | null | object | string | Uint8Array, methods: Option<Text> | null | object | string | Uint8Array) => Observable<TraceBlockResponse>>;
520
- };
521
- syncstate: {
522
- /**
523
- * Returns the json-serialized chainspec running the node, with a sync state.
524
- **/
525
- genSyncSpec: AugmentedRpc<(raw: bool | boolean | Uint8Array) => Observable<Json>>;
526
- };
527
- system: {
528
- /**
529
- * Retrieves the next accountIndex as available on the node
530
- **/
531
- accountNextIndex: AugmentedRpc<(accountId: AccountId | string | Uint8Array) => Observable<Index>>;
532
- /**
533
- * Adds the supplied directives to the current log filter
534
- **/
535
- addLogFilter: AugmentedRpc<(directives: Text | string) => Observable<Null>>;
536
- /**
537
- * Adds a reserved peer
538
- **/
539
- addReservedPeer: AugmentedRpc<(peer: Text | string) => Observable<Text>>;
540
- /**
541
- * Retrieves the chain
542
- **/
543
- chain: AugmentedRpc<() => Observable<Text>>;
544
- /**
545
- * Retrieves the chain type
546
- **/
547
- chainType: AugmentedRpc<() => Observable<ChainType>>;
548
- /**
549
- * Dry run an extrinsic at a given block
550
- **/
551
- dryRun: AugmentedRpc<(extrinsic: Bytes | string | Uint8Array, at?: BlockHash | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
552
- /**
553
- * Return health status of the node
554
- **/
555
- health: AugmentedRpc<() => Observable<Health>>;
556
- /**
557
- * 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
558
- **/
559
- localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;
560
- /**
561
- * Returns the base58-encoded PeerId of the node
562
- **/
563
- localPeerId: AugmentedRpc<() => Observable<Text>>;
564
- /**
565
- * Retrieves the node name
566
- **/
567
- name: AugmentedRpc<() => Observable<Text>>;
568
- /**
569
- * Returns current state of the network
570
- **/
571
- networkState: AugmentedRpc<() => Observable<NetworkState>>;
572
- /**
573
- * Returns the roles the node is running as
574
- **/
575
- nodeRoles: AugmentedRpc<() => Observable<Vec<NodeRole>>>;
576
- /**
577
- * Returns the currently connected peers
578
- **/
579
- peers: AugmentedRpc<() => Observable<Vec<PeerInfo>>>;
580
- /**
581
- * Get a custom set of properties as a JSON object, defined in the chain spec
582
- **/
583
- properties: AugmentedRpc<() => Observable<ChainProperties>>;
584
- /**
585
- * Remove a reserved peer
586
- **/
587
- removeReservedPeer: AugmentedRpc<(peerId: Text | string) => Observable<Text>>;
588
- /**
589
- * Returns the list of reserved peers
590
- **/
591
- reservedPeers: AugmentedRpc<() => Observable<Vec<Text>>>;
592
- /**
593
- * Resets the log filter to Substrate defaults
594
- **/
595
- resetLogFilter: AugmentedRpc<() => Observable<Null>>;
596
- /**
597
- * Returns the state of the syncing of the node
598
- **/
599
- syncState: AugmentedRpc<() => Observable<SyncState>>;
600
- /**
601
- * Retrieves the version of the node
602
- **/
603
- version: AugmentedRpc<() => Observable<Text>>;
604
- };
605
- web3: {
606
- /**
607
- * Returns current client version.
608
- **/
609
- clientVersion: AugmentedRpc<() => Observable<Text>>;
610
- /**
611
- * Returns sha3 of the given data
612
- **/
613
- sha3: AugmentedRpc<(data: Bytes | string | Uint8Array) => Observable<H256>>;
614
- };
615
- }
616
- }
package/bundle.d.ts DELETED
@@ -1,3 +0,0 @@
1
- import './augment';
2
- export { packageInfo } from './packageInfo';
3
- export * from '@polkadot/rpc-augment/rpc';
@@ -1 +0,0 @@
1
- export {};
package/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import './detectPackage';
2
- export * from './bundle';
package/packageInfo.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare const packageInfo: {
2
- name: string;
3
- version: string;
4
- };
package/rpc.cjs DELETED
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.__RPC_AUGMENT_RPC = void 0;
7
- // Copyright 2017-2021 @polkadot/rpc-augment authors & contributors
8
- // SPDX-License-Identifier: Apache-2.0
9
- // augmented
10
- const __RPC_AUGMENT_RPC = 'augmented';
11
- exports.__RPC_AUGMENT_RPC = __RPC_AUGMENT_RPC;
package/rpc.d.ts DELETED
@@ -1 +0,0 @@
1
- export declare const __RPC_AUGMENT_RPC = "augmented";
package/rpc.js DELETED
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2021 @polkadot/rpc-augment authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
- // augmented
4
- export const __RPC_AUGMENT_RPC = 'augmented';
package/types.cjs DELETED
@@ -1 +0,0 @@
1
- "use strict";
package/types.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { Observable } from 'rxjs';
2
- import type { AnyFunction, Codec, DefinitionRpc } from '@polkadot/types/types';
3
- export interface RpcInterfaceMethod {
4
- <T extends Codec>(...params: unknown[]): Observable<T>;
5
- raw(...params: unknown[]): Observable<unknown>;
6
- meta: DefinitionRpc;
7
- }
8
- export declare type AugmentedRpc<F extends AnyFunction> = F & {
9
- raw: <T>(...params: Parameters<F>) => Observable<T>;
10
- meta: DefinitionRpc;
11
- };
package/types.js DELETED
@@ -1 +0,0 @@
1
- export {};