Skip to content

Commit

Permalink
tyepscript API v0.3100.0 (#2896)
Browse files Browse the repository at this point in the history
  • Loading branch information
noandrea committed Aug 6, 2024
1 parent 5b13c81 commit 41ebb79
Show file tree
Hide file tree
Showing 30 changed files with 10,506 additions and 3,288 deletions.
4 changes: 2 additions & 2 deletions typescript-api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion typescript-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@moonbeam-network/api-augment",
"version": "0.3000.0",
"version": "0.3100.0",
"type": "module",
"private": true,
"description": "Moonbeam types augment for @polkadot/api",
Expand Down
37 changes: 31 additions & 6 deletions typescript-api/src/moonbase/interfaces/augment-api-consts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import "@polkadot/api-base/types/consts";

import type { ApiTypes, AugmentedConst } from "@polkadot/api-base/types";
import type { Bytes, Option, Vec, u128, u16, u32, u64, u8 } from "@polkadot/types-codec";
import type { Bytes, Null, Option, Vec, u128, u16, u32, u64, u8 } from "@polkadot/types-codec";
import type { Codec, ITuple } from "@polkadot/types-codec/types";
import type { Perbill, Permill } from "@polkadot/types/interfaces/runtime";
import type {
Expand Down Expand Up @@ -69,9 +69,17 @@ declare module "@polkadot/api-base/types/consts" {
/**
* The maximum number of locks that should exist on an account. Not strictly enforced, but
* used for weight estimation.
*
* Use of locks is deprecated in favour of freezes. See
* `https://github.com/paritytech/substrate/pull/12951/`
*/
maxLocks: u32 & AugmentedConst<ApiType>;
/** The maximum number of named reserves that can exist on an account. */
/**
* The maximum number of named reserves that can exist on an account.
*
* Use of reserves is deprecated in favour of holds. See
* `https://github.com/paritytech/substrate/pull/12951/`
*/
maxReserves: u32 & AugmentedConst<ApiType>;
/** Generic const */
[key: string]: Codec;
Expand Down Expand Up @@ -117,7 +125,7 @@ declare module "@polkadot/api-base/types/consts" {
/** The amount held on deposit per encoded byte for a registered identity. */
byteDeposit: u128 & AugmentedConst<ApiType>;
/**
* Maxmimum number of registrars allowed in the system. Needed to bound the complexity of,
* Maximum number of registrars allowed in the system. Needed to bound the complexity of,
* e.g., updating judgements.
*/
maxRegistrars: u32 & AugmentedConst<ApiType>;
Expand Down Expand Up @@ -147,6 +155,14 @@ declare module "@polkadot/api-base/types/consts" {
* is slightly lower than this as defined by [`MaxMessageLenOf`].
*/
heapSize: u32 & AugmentedConst<ApiType>;
/**
* The maximum amount of weight (if any) to be used from remaining weight `on_idle` which
* should be provided to the message queue for servicing enqueued items `on_idle`. Useful for
* parachains to process messages at the same block they are received.
*
* If `None`, it will not call `ServiceQueues::service_queues` in `on_idle`.
*/
idleMaxServiceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/**
* The maximum number of stale pages (i.e. of overweight messages) allowed before culling can
* happen. Once there are more stale pages than this, then historical pages may be dropped,
Expand All @@ -155,10 +171,11 @@ declare module "@polkadot/api-base/types/consts" {
maxStale: u32 & AugmentedConst<ApiType>;
/**
* The amount of weight (if any) which should be provided to the message queue for servicing
* enqueued items.
* enqueued items `on_initialize`.
*
* This may be legitimately `None` in the case that you will call
* `ServiceQueues::service_queues` manually.
* `ServiceQueues::service_queues` manually or set [`Self::IdleMaxServiceWeight`] to have it
* run in `on_idle`.
*/
serviceWeight: Option<SpWeightsWeightV2Weight> & AugmentedConst<ApiType>;
/** Generic const */
Expand Down Expand Up @@ -245,6 +262,12 @@ declare module "@polkadot/api-base/types/consts" {
/** Generic const */
[key: string]: Codec;
};
parachainSystem: {
/** Returns the parachain ID we are running with. */
selfParaId: u32 & AugmentedConst<ApiType>;
/** Generic const */
[key: string]: Codec;
};
proxy: {
/**
* The base amount of currency needed to reserve for creating an announcement.
Expand Down Expand Up @@ -365,7 +388,7 @@ declare module "@polkadot/api-base/types/consts" {
* runtime should know about the prefix in order to make use of it as an identifier of the chain.
*/
ss58Prefix: u16 & AugmentedConst<ApiType>;
/** Get the chain's current version. */
/** Get the chain's in-code version. */
version: SpVersionRuntimeVersion & AugmentedConst<ApiType>;
/** Generic const */
[key: string]: Codec;
Expand Down Expand Up @@ -475,6 +498,8 @@ declare module "@polkadot/api-base/types/consts" {
* The actually weight for an XCM message is `T::BaseXcmWeight + T::Weigher::weight(&msg)`.
*/
baseXcmWeight: SpWeightsWeightV2Weight & AugmentedConst<ApiType>;
/** The id of the RateLimiter. */
rateLimiterId: Null & AugmentedConst<ApiType>;
/** Self chain location. */
selfLocation: StagingXcmV4Location & AugmentedConst<ApiType>;
/** Generic const */
Expand Down
12 changes: 7 additions & 5 deletions typescript-api/src/moonbase/interfaces/augment-api-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ declare module "@polkadot/api-base/types/errors" {
AlreadyDelegating: AugmentedError<ApiType>;
/**
* The account currently has votes attached to it and the operation cannot succeed until these
* are removed, either through `unvote` or `reap_vote`.
* are removed through `remove_vote`.
*/
AlreadyVoting: AugmentedError<ApiType>;
/** The class ID supplied is invalid. */
Expand Down Expand Up @@ -247,8 +247,6 @@ declare module "@polkadot/api-base/types/errors" {
InvalidNonce: AugmentedError<ApiType>;
/** The signature is invalid. */
InvalidSignature: AugmentedError<ApiType>;
/** Invalid Transaction */
InvalidTransaction: AugmentedError<ApiType>;
/** Calculating total payment overflowed */
PaymentOverflow: AugmentedError<ApiType>;
/** EVM reentrancy */
Expand Down Expand Up @@ -566,8 +564,6 @@ declare module "@polkadot/api-base/types/errors" {
Filtered: AugmentedError<ApiType>;
/** The unlock operation cannot succeed because there are still consumers of the lock. */
InUse: AugmentedError<ApiType>;
/** Invalid non-concrete asset. */
InvalidAssetNotConcrete: AugmentedError<ApiType>;
/** Invalid asset, reserve chain could not be determined for it. */
InvalidAssetUnknownReserve: AugmentedError<ApiType>;
/** Invalid asset, do not support remote asset reserves with different fees reserves. */
Expand Down Expand Up @@ -684,6 +680,8 @@ declare module "@polkadot/api-base/types/errors" {
NoTrack: AugmentedError<ApiType>;
/** The preimage does not exist. */
PreimageNotExist: AugmentedError<ApiType>;
/** The preimage is stored with a different length than the one provided. */
PreimageStoredWithDifferentLength: AugmentedError<ApiType>;
/** The queue of the track is empty. */
QueueEmpty: AugmentedError<ApiType>;
/** Any deposit cannot be refunded until after the decision is over. */
Expand Down Expand Up @@ -722,6 +720,8 @@ declare module "@polkadot/api-base/types/errors" {
FailedToExtractRuntimeVersion: AugmentedError<ApiType>;
/** The name of specification does not match between the current runtime and the new runtime. */
InvalidSpecName: AugmentedError<ApiType>;
/** A multi-block migration is ongoing and prevents the current code from being replaced. */
MultiBlockMigrationsOngoing: AugmentedError<ApiType>;
/** Suicide called when the account has non-default composite data. */
NonDefaultComposite: AugmentedError<ApiType>;
/** There is a non-zero reference count preventing the account from being purged. */
Expand Down Expand Up @@ -879,6 +879,8 @@ declare module "@polkadot/api-base/types/errors" {
NotCrossChainTransferableCurrency: AugmentedError<ApiType>;
/** Not supported Location */
NotSupportedLocation: AugmentedError<ApiType>;
/** Asset transfer is limited by RateLimiter. */
RateLimited: AugmentedError<ApiType>;
/** The number of assets to be sent is over the maximum. */
TooManyAssetsBeingSent: AugmentedError<ApiType>;
/** The message's weight could not be determined. */
Expand Down
21 changes: 21 additions & 0 deletions typescript-api/src/moonbase/interfaces/augment-api-events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1719,6 +1719,27 @@ declare module "@polkadot/api-base/types/events" {
[task: ITuple<[u32, u32]>, id: Option<U8aFixed>],
{ task: ITuple<[u32, u32]>; id: Option<U8aFixed> }
>;
/** Cancel a retry configuration for some task. */
RetryCancelled: AugmentedEvent<
ApiType,
[task: ITuple<[u32, u32]>, id: Option<U8aFixed>],
{ task: ITuple<[u32, u32]>; id: Option<U8aFixed> }
>;
/**
* The given task was unable to be retried since the agenda is full at that block or there was
* not enough weight to reschedule it.
*/
RetryFailed: AugmentedEvent<
ApiType,
[task: ITuple<[u32, u32]>, id: Option<U8aFixed>],
{ task: ITuple<[u32, u32]>; id: Option<U8aFixed> }
>;
/** Set a retry configuration for some task. */
RetrySet: AugmentedEvent<
ApiType,
[task: ITuple<[u32, u32]>, id: Option<U8aFixed>, period: u32, retries: u8],
{ task: ITuple<[u32, u32]>; id: Option<U8aFixed>; period: u32; retries: u8 }
>;
/** Scheduled some task. */
Scheduled: AugmentedEvent<ApiType, [when: u32, index: u32], { when: u32; index: u32 }>;
/** Generic event */
Expand Down
43 changes: 32 additions & 11 deletions typescript-api/src/moonbase/interfaces/augment-api-query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ import type {
PalletRandomnessRequestState,
PalletRandomnessRequestType,
PalletReferendaReferendumInfo,
PalletSchedulerRetryConfig,
PalletSchedulerScheduled,
PalletTransactionPaymentReleases,
PalletTreasuryProposal,
Expand All @@ -104,10 +105,10 @@ import type {
PalletXcmTransactorRemoteTransactInfoWithMaxWeight,
PalletXcmVersionMigrationStage,
PolkadotCorePrimitivesOutboundHrmpMessage,
PolkadotPrimitivesV6AbridgedHostConfiguration,
PolkadotPrimitivesV6PersistedValidationData,
PolkadotPrimitivesV6UpgradeGoAhead,
PolkadotPrimitivesV6UpgradeRestriction,
PolkadotPrimitivesV7AbridgedHostConfiguration,
PolkadotPrimitivesV7PersistedValidationData,
PolkadotPrimitivesV7UpgradeGoAhead,
PolkadotPrimitivesV7UpgradeRestriction,
SpRuntimeDigest,
SpTrieStorageProof,
SpWeightsWeightV2Weight,
Expand Down Expand Up @@ -325,14 +326,22 @@ declare module "@polkadot/api-base/types/storage" {
/**
* Any liquidity locks on some account balances. NOTE: Should only be accessed when setting,
* changing and freeing a lock.
*
* Use of locks is deprecated in favour of freezes. See
* `https://github.com/paritytech/substrate/pull/12951/`
*/
locks: AugmentedQuery<
ApiType,
(arg: AccountId20 | string | Uint8Array) => Observable<Vec<PalletBalancesBalanceLock>>,
[AccountId20]
> &
QueryableStorageEntry<ApiType, [AccountId20]>;
/** Named reserves on some account balances. */
/**
* Named reserves on some account balances.
*
* Use of reserves is deprecated in favour of holds. See
* `https://github.com/paritytech/substrate/pull/12951/`
*/
reserves: AugmentedQuery<
ApiType,
(arg: AccountId20 | string | Uint8Array) => Observable<Vec<PalletBalancesReserveData>>,
Expand Down Expand Up @@ -757,7 +766,7 @@ declare module "@polkadot/api-base/types/storage" {
/** The current members of the collective. This is stored sorted (just by value). */
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> &
QueryableStorageEntry<ApiType, []>;
/** The prime member that helps determine the default vote behavior in case of absentations. */
/** The prime member that helps determine the default vote behavior in case of abstentions. */
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId20>>, []> &
QueryableStorageEntry<ApiType, []>;
/** Proposals so far. */
Expand Down Expand Up @@ -960,7 +969,7 @@ declare module "@polkadot/api-base/types/storage" {
*/
hostConfiguration: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6AbridgedHostConfiguration>>,
() => Observable<Option<PolkadotPrimitivesV7AbridgedHostConfiguration>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down Expand Up @@ -1101,7 +1110,7 @@ declare module "@polkadot/api-base/types/storage" {
*/
upgradeGoAhead: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6UpgradeGoAhead>>,
() => Observable<Option<PolkadotPrimitivesV7UpgradeGoAhead>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -1116,7 +1125,7 @@ declare module "@polkadot/api-base/types/storage" {
*/
upgradeRestrictionSignal: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6UpgradeRestriction>>,
() => Observable<Option<PolkadotPrimitivesV7UpgradeRestriction>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand All @@ -1136,7 +1145,7 @@ declare module "@polkadot/api-base/types/storage" {
*/
validationData: AugmentedQuery<
ApiType,
() => Observable<Option<PolkadotPrimitivesV6PersistedValidationData>>,
() => Observable<Option<PolkadotPrimitivesV7PersistedValidationData>>,
[]
> &
QueryableStorageEntry<ApiType, []>;
Expand Down Expand Up @@ -1434,6 +1443,15 @@ declare module "@polkadot/api-base/types/storage" {
[U8aFixed]
> &
QueryableStorageEntry<ApiType, [U8aFixed]>;
/** Retry configurations for items to be executed, indexed by task address. */
retries: AugmentedQuery<
ApiType,
(
arg: ITuple<[u32, u32]> | [u32 | AnyNumber | Uint8Array, u32 | AnyNumber | Uint8Array]
) => Observable<Option<PalletSchedulerRetryConfig>>,
[ITuple<[u32, u32]>]
> &
QueryableStorageEntry<ApiType, [ITuple<[u32, u32]>]>;
/** Generic query */
[key: string]: QueryableStorageEntry<ApiType>;
};
Expand Down Expand Up @@ -1524,6 +1542,9 @@ declare module "@polkadot/api-base/types/storage" {
[u32]
> &
QueryableStorageEntry<ApiType, [u32]>;
/** Whether all inherents have been applied. */
inherentsApplied: AugmentedQuery<ApiType, () => Observable<bool>, []> &
QueryableStorageEntry<ApiType, []>;
/** Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened. */
lastRuntimeUpgrade: AugmentedQuery<
ApiType,
Expand Down Expand Up @@ -1609,7 +1630,7 @@ declare module "@polkadot/api-base/types/storage" {
/** The current members of the collective. This is stored sorted (just by value). */
members: AugmentedQuery<ApiType, () => Observable<Vec<AccountId20>>, []> &
QueryableStorageEntry<ApiType, []>;
/** The prime member that helps determine the default vote behavior in case of absentations. */
/** The prime member that helps determine the default vote behavior in case of abstentions. */
prime: AugmentedQuery<ApiType, () => Observable<Option<AccountId20>>, []> &
QueryableStorageEntry<ApiType, []>;
/** Proposals so far. */
Expand Down
4 changes: 2 additions & 2 deletions typescript-api/src/moonbase/interfaces/augment-api-rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -614,12 +614,12 @@ declare module "@polkadot/rpc-core/types/jsonrpc" {
>;
};
moon: {
/** Returns the latest synced block from Frontier's backend */
getLatestSyncedBlock: AugmentedRpc<() => Observable<u32>>;
/** Returns whether an Ethereum block is finalized */
isBlockFinalized: AugmentedRpc<(blockHash: Hash | string | Uint8Array) => Observable<bool>>;
/** Returns whether an Ethereum transaction is finalized */
isTxFinalized: AugmentedRpc<(txHash: Hash | string | Uint8Array) => Observable<bool>>;
/** Returns the latest synced block from Frontier's backend */
getLatestSyncedBlock: AugmentedRpc<() => Observable<u32>>;
};
net: {
/** Returns true if client is actively listening for network connections. Otherwise false. */
Expand Down
5 changes: 3 additions & 2 deletions typescript-api/src/moonbase/interfaces/augment-api-runtime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import type {
AccountId,
Balance,
Block,
ExtrinsicInclusionMode,
H160,
H256,
Header,
Expand Down Expand Up @@ -134,7 +135,7 @@ declare module "@polkadot/api-base/types/calls" {
/** Generic call */
[key: string]: DecoratedCallBase<ApiType>;
};
/** 0xdf6acb689907609b/4 */
/** 0xdf6acb689907609b/5 */
core: {
/** Execute the given block. */
executeBlock: AugmentedCall<
Expand All @@ -158,7 +159,7 @@ declare module "@polkadot/api-base/types/calls" {
}
| string
| Uint8Array
) => Observable<Null>
) => Observable<ExtrinsicInclusionMode>
>;
/** Returns the version of the runtime. */
version: AugmentedCall<ApiType, () => Observable<RuntimeVersion>>;
Expand Down
Loading

0 comments on commit 41ebb79

Please sign in to comment.