@polkadot/api-augment 8.9.2-9 → 8.11.2

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.
@@ -0,0 +1,307 @@
1
+ import type { ApiTypes } from '@polkadot/api-base/types';
2
+ import type { Bytes, Null, Option, Result, Vec, u32, u64 } from '@polkadot/types-codec';
3
+ import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
4
+ import type { BabeEquivocationProof, BabeGenesisConfiguration, Epoch, OpaqueKeyOwnershipProof } from '@polkadot/types/interfaces/babe';
5
+ import type { CheckInherentsResult, InherentData } from '@polkadot/types/interfaces/blockbuilder';
6
+ import type { BlockHash } from '@polkadot/types/interfaces/chain';
7
+ import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
8
+ import type { CodeUploadResult, ContractExecResult, ContractInstantiateResult } from '@polkadot/types/interfaces/contracts';
9
+ import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
10
+ import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
11
+ import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
12
+ import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
13
+ import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
14
+ import type { AccountId, Balance, Block, Hash, Header, Index, KeyTypeId, Slot } from '@polkadot/types/interfaces/runtime';
15
+ import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
16
+ import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
17
+ import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
18
+ import type { IExtrinsic, Observable } from '@polkadot/types/types';
19
+ declare module '@polkadot/api-base/types/calls' {
20
+ interface AugmentedCalls<ApiType extends ApiTypes> {
21
+ /** 0xbc9d89904f5b923f/1 */
22
+ accountNonceApi: {
23
+ /**
24
+ * The API to query account nonce (aka transaction index)
25
+ **/
26
+ accountNonce: AugmentedCall<ApiType, (accountId: AccountId | string | Uint8Array) => Observable<Index>>;
27
+ /**
28
+ * Generic call
29
+ **/
30
+ [key: string]: DecoratedCallBase<ApiType>;
31
+ };
32
+ /** 0x687ad44ad37f03c2/1 */
33
+ authorityDiscoveryApi: {
34
+ /**
35
+ * Retrieve authority identifiers of the current and next authority set.
36
+ **/
37
+ authorities: AugmentedCall<ApiType, () => Observable<Vec<AuthorityId>>>;
38
+ /**
39
+ * Generic call
40
+ **/
41
+ [key: string]: DecoratedCallBase<ApiType>;
42
+ };
43
+ /** 0xcbca25e39f142387/2 */
44
+ babeApi: {
45
+ /**
46
+ * Return the genesis configuration for BABE. The configuration is only read on genesis.
47
+ **/
48
+ configuration: AugmentedCall<ApiType, () => Observable<BabeGenesisConfiguration>>;
49
+ /**
50
+ * Returns information regarding the current epoch.
51
+ **/
52
+ currentEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
53
+ /**
54
+ * Returns the slot that started the current epoch.
55
+ **/
56
+ currentEpochStart: AugmentedCall<ApiType, () => Observable<Slot>>;
57
+ /**
58
+ * Generates a proof of key ownership for the given authority in the current epoch.
59
+ **/
60
+ generateKeyOwnershipProof: AugmentedCall<ApiType, (slot: Slot | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
61
+ /**
62
+ * Returns information regarding the next epoch (which was already previously announced).
63
+ **/
64
+ nextEpoch: AugmentedCall<ApiType, () => Observable<Epoch>>;
65
+ /**
66
+ * Submits an unsigned extrinsic to report an equivocation.
67
+ **/
68
+ submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: BabeEquivocationProof | {
69
+ offender?: any;
70
+ slotNumber?: any;
71
+ firstHeader?: any;
72
+ secondHeader?: any;
73
+ } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
74
+ /**
75
+ * Generic call
76
+ **/
77
+ [key: string]: DecoratedCallBase<ApiType>;
78
+ };
79
+ /** 0x40fe3ad401f8959a/6 */
80
+ blockBuilder: {
81
+ /**
82
+ * Apply the given extrinsic.
83
+ **/
84
+ applyExtrinsic: AugmentedCall<ApiType, (extrinsic: Extrinsic | IExtrinsic | string | Uint8Array) => Observable<ApplyExtrinsicResult>>;
85
+ /**
86
+ * Check that the inherents are valid.
87
+ **/
88
+ checkInherents: AugmentedCall<ApiType, (block: Block | {
89
+ header?: any;
90
+ extrinsics?: any;
91
+ } | string | Uint8Array, data: InherentData | {
92
+ data?: any;
93
+ } | string | Uint8Array) => Observable<CheckInherentsResult>>;
94
+ /**
95
+ * Finish the current block.
96
+ **/
97
+ finalizeBlock: AugmentedCall<ApiType, () => Observable<Header>>;
98
+ /**
99
+ * Generate inherent extrinsics.
100
+ **/
101
+ inherentExtrinsics: AugmentedCall<ApiType, (inherent: InherentData | {
102
+ data?: any;
103
+ } | string | Uint8Array) => Observable<Vec<Extrinsic>>>;
104
+ /**
105
+ * Generic call
106
+ **/
107
+ [key: string]: DecoratedCallBase<ApiType>;
108
+ };
109
+ /** 0x68b66ba122c93fa7/1 */
110
+ contractsApi: {
111
+ /**
112
+ * Perform a call from a specified account to a given contract.
113
+ **/
114
+ call: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, dest: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, inputData: Bytes | string | Uint8Array) => Observable<ContractExecResult>>;
115
+ /**
116
+ * Query a given storage key in a given contract.
117
+ **/
118
+ getStorage: AugmentedCall<ApiType, (address: AccountId | string | Uint8Array, key: Bytes | string | Uint8Array) => Observable<Option<Bytes>>>;
119
+ /**
120
+ * Instantiate a new contract.
121
+ **/
122
+ instantiate: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, value: Balance | AnyNumber | Uint8Array, gasLimit: u64 | AnyNumber | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array, code: Bytes | string | Uint8Array, data: Bytes | string | Uint8Array, salt: Bytes | string | Uint8Array) => Observable<ContractInstantiateResult>>;
123
+ /**
124
+ * Upload new code without instantiating a contract from it.
125
+ **/
126
+ uploadCode: AugmentedCall<ApiType, (origin: AccountId | string | Uint8Array, code: Bytes | string | Uint8Array, storageDepositLimit: Option<Balance> | null | object | string | Uint8Array) => Observable<CodeUploadResult>>;
127
+ /**
128
+ * Generic call
129
+ **/
130
+ [key: string]: DecoratedCallBase<ApiType>;
131
+ };
132
+ /** 0xdf6acb689907609b/4 */
133
+ core: {
134
+ /**
135
+ * Execute the given block.
136
+ **/
137
+ executeBlock: AugmentedCall<ApiType, (block: Block | {
138
+ header?: any;
139
+ extrinsics?: any;
140
+ } | string | Uint8Array) => Observable<Null>>;
141
+ /**
142
+ * Initialize a block with the given header.
143
+ **/
144
+ initializeBlock: AugmentedCall<ApiType, (header: Header | {
145
+ parentHash?: any;
146
+ number?: any;
147
+ stateRoot?: any;
148
+ extrinsicsRoot?: any;
149
+ digest?: any;
150
+ } | string | Uint8Array) => Observable<Null>>;
151
+ /**
152
+ * Returns the version of the runtime.
153
+ **/
154
+ version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
155
+ /**
156
+ * Generic call
157
+ **/
158
+ [key: string]: DecoratedCallBase<ApiType>;
159
+ };
160
+ /** 0xed99c5acb25eedf5/3 */
161
+ grandpaApi: {
162
+ /**
163
+ * Get current GRANDPA authority set id.
164
+ **/
165
+ currentSetId: AugmentedCall<ApiType, () => Observable<SetId>>;
166
+ /**
167
+ * Generates a proof of key ownership for the given authority in the given set.
168
+ **/
169
+ generateKeyOwnershipProof: AugmentedCall<ApiType, (setId: SetId | AnyNumber | Uint8Array, authorityId: AuthorityId | string | Uint8Array) => Observable<Option<OpaqueKeyOwnershipProof>>>;
170
+ /**
171
+ * Get the current GRANDPA authorities and weights. This should not change except for when changes are scheduled and the corresponding delay has passed.
172
+ **/
173
+ grandpaAuthorities: AugmentedCall<ApiType, () => Observable<AuthorityList>>;
174
+ /**
175
+ * Submits an unsigned extrinsic to report an equivocation.
176
+ **/
177
+ submitReportEquivocationUnsignedExtrinsic: AugmentedCall<ApiType, (equivocationProof: GrandpaEquivocationProof | {
178
+ setId?: any;
179
+ equivocation?: any;
180
+ } | string | Uint8Array, keyOwnerProof: OpaqueKeyOwnershipProof | string | Uint8Array) => Observable<Option<Null>>>;
181
+ /**
182
+ * Generic call
183
+ **/
184
+ [key: string]: DecoratedCallBase<ApiType>;
185
+ };
186
+ /** 0x37e397fc7c91f5e4/1 */
187
+ metadata: {
188
+ /**
189
+ * Returns the metadata of a runtime
190
+ **/
191
+ metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
192
+ /**
193
+ * Generic call
194
+ **/
195
+ [key: string]: DecoratedCallBase<ApiType>;
196
+ };
197
+ /** 0x91d5df18b0d2cf58/1 */
198
+ mmrApi: {
199
+ /**
200
+ * Generate MMR proof for a series of leaves under given indices.
201
+ **/
202
+ generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
203
+ /**
204
+ * Generate MMR proof for a leaf under given index.
205
+ **/
206
+ generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
207
+ /**
208
+ * Return the on-chain MMR root hash.
209
+ **/
210
+ mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
211
+ /**
212
+ * Verify MMR proof against on-chain MMR for a batch of leaves.
213
+ **/
214
+ verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
215
+ leafIndices?: any;
216
+ leafCount?: any;
217
+ items?: any;
218
+ } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
219
+ /**
220
+ * Verify MMR proof against given root hash or a batch of leaves.
221
+ **/
222
+ verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
223
+ leafIndices?: any;
224
+ leafCount?: any;
225
+ items?: any;
226
+ } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
227
+ /**
228
+ * Verify MMR proof against on-chain MMR.
229
+ **/
230
+ verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | {
231
+ leafIndex?: any;
232
+ leafCount?: any;
233
+ items?: any;
234
+ } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
235
+ /**
236
+ * Verify MMR proof against given root hash.
237
+ **/
238
+ verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | {
239
+ leafIndex?: any;
240
+ leafCount?: any;
241
+ items?: any;
242
+ } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
243
+ /**
244
+ * Generic call
245
+ **/
246
+ [key: string]: DecoratedCallBase<ApiType>;
247
+ };
248
+ /** 0xf78b278be53f454c/2 */
249
+ offchainWorkerApi: {
250
+ /**
251
+ * Starts the off-chain task for given block header.
252
+ **/
253
+ offchainWorker: AugmentedCall<ApiType, (header: Header | {
254
+ parentHash?: any;
255
+ number?: any;
256
+ stateRoot?: any;
257
+ extrinsicsRoot?: any;
258
+ digest?: any;
259
+ } | string | Uint8Array) => Observable<Null>>;
260
+ /**
261
+ * Generic call
262
+ **/
263
+ [key: string]: DecoratedCallBase<ApiType>;
264
+ };
265
+ /** 0xab3c0572291feb8b/1 */
266
+ sessionKeys: {
267
+ /**
268
+ * Decode the given public session keys.
269
+ **/
270
+ decodeSessionKeys: AugmentedCall<ApiType, (encoded: Bytes | string | Uint8Array) => Observable<Option<Vec<ITuple<[Bytes, KeyTypeId]>>>>>;
271
+ /**
272
+ * Generate a set of session keys with optionally using the given seed.
273
+ **/
274
+ generateSessionKeys: AugmentedCall<ApiType, (seed: Option<Bytes> | null | object | string | Uint8Array) => Observable<Bytes>>;
275
+ /**
276
+ * Generic call
277
+ **/
278
+ [key: string]: DecoratedCallBase<ApiType>;
279
+ };
280
+ /** 0xd2bc9897eed08f15/3 */
281
+ taggedTransactionQueue: {
282
+ /**
283
+ * Validate the transaction.
284
+ **/
285
+ validateTransaction: AugmentedCall<ApiType, (source: TransactionSource | 'InBlock' | 'Local' | 'External' | number | Uint8Array, tx: Extrinsic | IExtrinsic | string | Uint8Array, blockHash: BlockHash | string | Uint8Array) => Observable<TransactionValidity>>;
286
+ /**
287
+ * Generic call
288
+ **/
289
+ [key: string]: DecoratedCallBase<ApiType>;
290
+ };
291
+ /** 0x37c8bb1350a9a2a8/1 */
292
+ transactionPaymentApi: {
293
+ /**
294
+ * The transaction fee details
295
+ **/
296
+ queryFeeDetails: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<FeeDetails>>;
297
+ /**
298
+ * The transaction info
299
+ **/
300
+ queryInfo: AugmentedCall<ApiType, (uxt: Extrinsic | IExtrinsic | string | Uint8Array, len: u32 | AnyNumber | Uint8Array) => Observable<RuntimeDispatchInfo>>;
301
+ /**
302
+ * Generic call
303
+ **/
304
+ [key: string]: DecoratedCallBase<ApiType>;
305
+ };
306
+ }
307
+ }
@@ -0,0 +1 @@
1
+ export {};
package/substrate/tx.d.ts CHANGED
@@ -2105,8 +2105,9 @@ declare module '@polkadot/api-base/types/submittable' {
2105
2105
  * The dispatch of this call must be `FastTrackOrigin`.
2106
2106
  *
2107
2107
  * - `proposal_hash`: The hash of the current external proposal.
2108
- * - `voting_period`: The period that is allowed for voting on this proposal. Increased to
2109
- * `FastTrackVotingPeriod` if too low.
2108
+ * - `voting_period`: The period that is allowed for voting on this proposal.
2109
+ * Must be always greater than zero.
2110
+ * For `FastTrackOrigin` must be equal or greater than `FastTrackVotingPeriod`.
2110
2111
  * - `delay`: The number of block after voting has ended in approval and this should be
2111
2112
  * enacted. This doesn't have a minimum amount.
2112
2113
  *
package/mod.ts DELETED
@@ -1,4 +0,0 @@
1
- // Copyright 2017-2022 @polkadot/api-augment authors & contributors
2
- // SPDX-License-Identifier: Apache-2.0
3
-
4
- export * from './index';