UNPKG

2.56 kBJavaScriptView Raw
1// Copyright 2017-2022 @polkadot/types authors & contributors
2// SPDX-License-Identifier: Apache-2.0
3// order important in structs... :)
4
5/* eslint-disable sort-keys */
6export default {
7 rpc: {
8 hasKey: {
9 description: 'Returns true if the keystore has private keys for the given public key and key type.',
10 params: [{
11 name: 'publicKey',
12 type: 'Bytes'
13 }, {
14 name: 'keyType',
15 type: 'Text'
16 }],
17 type: 'bool'
18 },
19 hasSessionKeys: {
20 description: 'Returns true if the keystore has private keys for the given session public keys.',
21 params: [{
22 name: 'sessionKeys',
23 type: 'Bytes'
24 }],
25 type: 'bool'
26 },
27 removeExtrinsic: {
28 description: 'Remove given extrinsic from the pool and temporarily ban it to prevent reimporting',
29 params: [{
30 name: 'bytesOrHash',
31 type: 'Vec<ExtrinsicOrHash>'
32 }],
33 type: 'Vec<Hash>'
34 },
35 insertKey: {
36 description: 'Insert a key into the keystore.',
37 params: [{
38 name: 'keyType',
39 type: 'Text'
40 }, {
41 name: 'suri',
42 type: 'Text'
43 }, {
44 name: 'publicKey',
45 type: 'Bytes'
46 }],
47 type: 'Bytes'
48 },
49 rotateKeys: {
50 description: 'Generate new session keys and returns the corresponding public keys',
51 params: [],
52 type: 'Bytes'
53 },
54 pendingExtrinsics: {
55 description: 'Returns all pending extrinsics, potentially grouped by sender',
56 params: [],
57 type: 'Vec<Extrinsic>'
58 },
59 submitExtrinsic: {
60 isSigned: true,
61 description: 'Submit a fully formatted extrinsic for block inclusion',
62 params: [{
63 name: 'extrinsic',
64 type: 'Extrinsic'
65 }],
66 type: 'Hash'
67 },
68 submitAndWatchExtrinsic: {
69 description: 'Submit and subscribe to watch an extrinsic until unsubscribed',
70 isSigned: true,
71 params: [{
72 name: 'extrinsic',
73 type: 'Extrinsic'
74 }],
75 pubsub: ['extrinsicUpdate', 'submitAndWatchExtrinsic', 'unwatchExtrinsic'],
76 type: 'ExtrinsicStatus'
77 }
78 },
79 types: {
80 ExtrinsicOrHash: {
81 _enum: {
82 Hash: 'Hash',
83 Extrinsic: 'Bytes'
84 }
85 },
86 ExtrinsicStatus: {
87 _enum: {
88 Future: 'Null',
89 Ready: 'Null',
90 Broadcast: 'Vec<Text>',
91 InBlock: 'Hash',
92 Retracted: 'Hash',
93 FinalityTimeout: 'Hash',
94 Finalized: 'Hash',
95 Usurped: 'Hash',
96 Dropped: 'Null',
97 Invalid: 'Null'
98 }
99 }
100 }
101};
\No newline at end of file