Add system_{localPeerId, localListenAddresses} RPCs (#2185)

* Add system_{localPeerId, localListenAddresses} RPCs

* CHANGELOG
This commit is contained in:
Jaco Greeff
2020-04-16 16:21:40 +02:00
committed by GitHub
parent 1968c878f5
commit 00490116dd
3 changed files with 19 additions and 0 deletions
+1
View File
@@ -4,6 +4,7 @@
- Align augmented generation with camelCase (Thanks to https://github.com/monitz87)
- Fix bitfield endian encoding (Thanks to investigation by https://github.com/xlc)
- Fix entries decoding for `Option<Number>` (& simplify, decoding correctly on rpc layer)
- Add `rpc.system.{localPeerId, localListenAddresses}`
- Ensure proper propagation of `api.runtimeVersion` (used for signing) after upgrade
- Field ordering fix for deprecated `Linkage` (used in linked maps)
- `derive.account.info` now returns all field types (not only raw)
+8
View File
@@ -250,6 +250,14 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
* Return health status of the node
**/
health: AugmentedRpc<() => Observable<Health>>;
/**
* 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
**/
localListenAddresses: AugmentedRpc<() => Observable<Vec<Text>>>;
/**
* Returns the base58-encoded PeerId of the node
**/
localPeerId: AugmentedRpc<() => Observable<Text>>;
/**
* Retrieves the node name
**/
@@ -39,6 +39,16 @@ export default {
params: [],
type: 'Health'
},
localPeerId: {
description: 'Returns the base58-encoded PeerId of the node',
params: [],
type: 'Text'
},
localListenAddresses: {
description: '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',
params: [],
type: 'Vec<Text>'
},
peers: {
description: 'Returns the currently connected peers',
params: [],