@polkadot/api-augment 10.1.3 → 10.2.1

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.
@@ -11,11 +11,11 @@ import type { CodeSource, CodeUploadResult, ContractExecResult, ContractInstanti
11
11
  import type { Extrinsic } from '@polkadot/types/interfaces/extrinsics';
12
12
  import type { AuthorityList, GrandpaEquivocationProof, SetId } from '@polkadot/types/interfaces/grandpa';
13
13
  import type { OpaqueMetadata } from '@polkadot/types/interfaces/metadata';
14
- import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError, MmrLeafIndex, MmrProof } from '@polkadot/types/interfaces/mmr';
14
+ import type { MmrBatchProof, MmrEncodableOpaqueLeaf, MmrError } from '@polkadot/types/interfaces/mmr';
15
15
  import type { NftCollectionId, NftItemId } from '@polkadot/types/interfaces/nfts';
16
16
  import type { NpPoolId } from '@polkadot/types/interfaces/nompools';
17
17
  import type { FeeDetails, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
18
- import type { AccountId, Balance, Block, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
18
+ import type { AccountId, Balance, Block, BlockNumber, Call, Hash, Header, Index, KeyTypeId, Slot, Weight, WeightV2 } from '@polkadot/types/interfaces/runtime';
19
19
  import type { RuntimeVersion } from '@polkadot/types/interfaces/state';
20
20
  import type { ApplyExtrinsicResult } from '@polkadot/types/interfaces/system';
21
21
  import type { TransactionSource, TransactionValidity } from '@polkadot/types/interfaces/txqueue';
@@ -210,12 +210,20 @@ declare module '@polkadot/api-base/types/calls' {
210
210
  **/
211
211
  [key: string]: DecoratedCallBase<ApiType>;
212
212
  };
213
- /** 0x37e397fc7c91f5e4/1 */
213
+ /** 0x37e397fc7c91f5e4/2 */
214
214
  metadata: {
215
215
  /**
216
216
  * Returns the metadata of a runtime
217
217
  **/
218
218
  metadata: AugmentedCall<ApiType, () => Observable<OpaqueMetadata>>;
219
+ /**
220
+ * Returns the metadata at a given version.
221
+ **/
222
+ metadataAtVersion: AugmentedCall<ApiType, (version: u32 | AnyNumber | Uint8Array) => Observable<Option<OpaqueMetadata>>>;
223
+ /**
224
+ * Returns the supported metadata versions.
225
+ **/
226
+ metadataVersions: AugmentedCall<ApiType, () => Observable<Vec<u32>>>;
219
227
  /**
220
228
  * Generic call
221
229
  **/
@@ -224,46 +232,26 @@ declare module '@polkadot/api-base/types/calls' {
224
232
  /** 0x91d5df18b0d2cf58/2 */
225
233
  mmrApi: {
226
234
  /**
227
- * Generate MMR proof for a series of leaves under given indices.
228
- **/
229
- generateBatchProof: AugmentedCall<ApiType, (leafIndices: Vec<MmrLeafIndex> | (MmrLeafIndex | AnyNumber | Uint8Array)[]) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
230
- /**
231
- * Generate MMR proof for a leaf under given index.
235
+ * Generate MMR proof for the given block numbers.
232
236
  **/
233
- generateProof: AugmentedCall<ApiType, (leafIndex: MmrLeafIndex | AnyNumber | Uint8Array) => Observable<Result<ITuple<[MmrEncodableOpaqueLeaf, MmrProof]>, MmrError>>>;
237
+ generateProof: AugmentedCall<ApiType, (blockNumbers: Vec<BlockNumber> | (BlockNumber | AnyNumber | Uint8Array)[], bestKnownBlockNumber: Option<BlockNumber> | null | Uint8Array | BlockNumber | AnyNumber) => Observable<Result<ITuple<[Vec<MmrEncodableOpaqueLeaf>, MmrBatchProof]>, MmrError>>>;
234
238
  /**
235
239
  * Return the on-chain MMR root hash.
236
240
  **/
237
- mmrRoot: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
238
- /**
239
- * Verify MMR proof against on-chain MMR for a batch of leaves.
240
- **/
241
- verifyBatchProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
242
- leafIndices?: any;
243
- leafCount?: any;
244
- items?: any;
245
- } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
246
- /**
247
- * Verify MMR proof against given root hash or a batch of leaves.
248
- **/
249
- verifyBatchProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
250
- leafIndices?: any;
251
- leafCount?: any;
252
- items?: any;
253
- } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
241
+ root: AugmentedCall<ApiType, () => Observable<Result<Hash, MmrError>>>;
254
242
  /**
255
243
  * Verify MMR proof against on-chain MMR.
256
244
  **/
257
- verifyProof: AugmentedCall<ApiType, (leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | {
258
- leafIndex?: any;
245
+ verifyProof: AugmentedCall<ApiType, (leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
246
+ leafIndices?: any;
259
247
  leafCount?: any;
260
248
  items?: any;
261
249
  } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;
262
250
  /**
263
251
  * Verify MMR proof against given root hash.
264
252
  **/
265
- verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaf: MmrEncodableOpaqueLeaf | string | Uint8Array, proof: MmrProof | {
266
- leafIndex?: any;
253
+ verifyProofStateless: AugmentedCall<ApiType, (root: Hash | string | Uint8Array, leaves: Vec<MmrEncodableOpaqueLeaf> | (MmrEncodableOpaqueLeaf | string | Uint8Array)[], proof: MmrBatchProof | {
254
+ leafIndices?: any;
267
255
  leafCount?: any;
268
256
  items?: any;
269
257
  } | string | Uint8Array) => Observable<Result<ITuple<[]>, MmrError>>>;