Skip to content

Commit 33165e9

Browse files
authored
Add state_getReadProof (#2196)
1 parent 39a38a6 commit 33165e9

File tree

3 files changed

+24
-3
lines changed

3 files changed

+24
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,13 @@
44
- Allow user type augmentation to work with different versions of rxjs (Thanks to https://github.com/monitz87)
55
- Align augmented generation with camelCase (Thanks to https://github.com/monitz87)
66
- Fix bitfield endian encoding (Thanks to investigation by https://github.com/xlc)
7+
- Add account flag derives via `accounts.flags(accountId)` (Thanks to https://github.com/kwingram25)
78
- Fix entries decoding for `Option<Number>` (& simplify, decoding correctly on rpc layer)
8-
- Add `rpc.system.{localPeerId, localListenAddresses}`
9+
- Add `system.{localPeerId, localListenAddresses}` & `state.getReadProof` RPCs
910
- Ensure proper propagation of `api.runtimeVersion` (used for signing) after upgrade
1011
- Field ordering fix for deprecated `Linkage` (used in linked maps)
11-
- `derive.account.info` now returns all field types (not only raw)
12+
- `derive.account.info` now returns all field enum types decoded (not only raw)
13+
- Add banner with FAQ entries for node-template to aid with common issues
1214
- `Digest` has been moved to definitions, removal of `GenericDigest` type
1315
- Support `Fixed128` type
1416
- Add `transactionVersion` to `RuntimeVersion` struct

packages/api/src/base/Decorate.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ export default abstract class Decorate<ApiType extends ApiTypes> extends Events
235235
const unknown = exposed.filter((key) => !allKeys.includes(key));
236236

237237
if (unknown.length) {
238-
l.warn(`RPC methods not decorated: ${unknown.join(', ')}}`);
238+
l.warn(`RPC methods not decorated: ${unknown.join(', ')}`);
239239
}
240240

241241
// loop through all entries we have (populated in decorate) and filter as required

packages/types/src/interfaces/state/definitions.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,21 @@ export default {
297297
],
298298
type: 'Vec<StorageChangeSet>'
299299
},
300+
getReadProof: {
301+
description: 'Returns proof of storage entries at a specific block state',
302+
params: [
303+
{
304+
name: 'keys',
305+
type: 'Vec<StorageKey>'
306+
},
307+
{
308+
name: 'at',
309+
type: 'BlockHash',
310+
isOptional: true
311+
}
312+
],
313+
type: 'ReadProof'
314+
},
300315
subscribeRuntimeVersion: {
301316
alias: ['chain_subscribeRuntimeVersion', 'chain_unsubscribeRuntimeVersion'],
302317
description: 'Retrieves the runtime version via subscription',
@@ -327,6 +342,10 @@ export default {
327342
types: {
328343
ApiId: '[u8; 8]',
329344
KeyValueOption: '(StorageKey, Option<StorageData>)',
345+
ReadProof: {
346+
at: 'Hash',
347+
proof: 'Vec<Bytes>'
348+
},
330349
RuntimeVersionApi: '(ApiId, u32)',
331350
RuntimeVersion: {
332351
specName: 'Text',

0 commit comments

Comments
 (0)