Add author_{hasKey, hasSessionKeys} RPCs (#1837)

* Add author_{hasKey, hasSessionKeys} RPCs

* yarn docs

* Revert "yarn docs"

This reverts commit c23624e1d844fcd8821ccf4bd73f0175a3a10526.
This commit is contained in:
Axel Chalon
2020-02-13 22:24:11 +01:00
committed by GitHub
parent ca7fe86089
commit 66c8e5b4e8
2 changed files with 28 additions and 1 deletions
+9 -1
View File
@@ -3,7 +3,7 @@
import { AnyNumber, Codec, IExtrinsic } from '@polkadot/types/types';
import { Option, Vec } from '@polkadot/types/codec';
import { Bytes, H256, StorageData, StorageKey, Text, u32, u64 } from '@polkadot/types/primitive';
import { Bytes, H256, StorageData, StorageKey, Text, bool, u32, u64 } from '@polkadot/types/primitive';
import { Metadata } from '@polkadot/types';
import { AccountId, BlockNumber, Extrinsic, Hash, Header, Index, SignedBlock } from '@polkadot/types/interfaces/runtime';
import { ContractCallRequest, ContractExecResult } from '@polkadot/types/interfaces/contracts';
@@ -19,6 +19,14 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
nextIndex(accountId: AccountId | string | Uint8Array): Observable<Index>;
};
author: {
/**
* Returns true if the keystore has private keys for the given public key and key type.
**/
hasKey(publicKey: Bytes | string | Uint8Array, keyType: Text | string): Observable<bool>;
/**
* Returns true if the keystore has private keys for the given session public keys.
**/
hasSessionKeys(sessionKeys: Bytes | string | Uint8Array): Observable<bool>;
/**
* Insert a key into the keystore.
**/