Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
074e790bfc | ||
|
|
d561fc9dc7 | ||
|
|
8b37ed6dda | ||
|
|
d2a7df9e0b | ||
|
|
66ab71b29e | ||
|
|
8d2300ca3f | ||
|
|
b4bb6613b1 | ||
|
|
2389ea16e1 | ||
|
|
e33139919f | ||
|
|
4c8e7135de | ||
|
|
4115a93ed3 | ||
|
|
a7526ba5f3 |
@@ -1,5 +1,18 @@
|
||||
# CHANGELOG
|
||||
|
||||
## master
|
||||
|
||||
Contributed:
|
||||
|
||||
- Add support for Fungibles runtime api (Thanks to https://github.com/bkontur)
|
||||
- Update Nimbus Collator lookups (Thanks to https://github.com/grenade)
|
||||
|
||||
Changes:
|
||||
|
||||
- Update to latest Polkadot, Kusama & Substrate metadata
|
||||
- Minimal support for a `@tsconfig/stricter` setup
|
||||
|
||||
|
||||
## 10.3.2 Apr 10, 2023
|
||||
|
||||
Changes:
|
||||
|
||||
+3
-2
@@ -1,4 +1,4 @@
|
||||
3429 Jaco 10.3.2 (#5589)
|
||||
3433 Jaco 10.3.3 (#5596)
|
||||
83 Amaury Martiny StatementKind: Regular and Saft (#2303)
|
||||
37 Keith Ingram Update contract types and rpc (#4541)
|
||||
35 Stefanie Doll Updated child storage parameters (#1709)
|
||||
@@ -32,6 +32,7 @@
|
||||
3 YJ feat: Vote interface as U8a (#1061)
|
||||
2 Alexander Krupenkin Add [u8; 33] type width for U8aFixed type (#2391)
|
||||
2 Branan Riley Add proxy type for Centrifuge (#3940)
|
||||
2 Branislav Kontur Fungibles runtime api for statemine/statemint/westmint (#5592)
|
||||
2 Caio Add `Range` and `RangeInclusive` types (#3791)
|
||||
2 HackFisher Update maxExtrinsic definition (#4703)
|
||||
2 Jakub Pánik All heads subscription (#1899)
|
||||
@@ -39,6 +40,7 @@
|
||||
2 Keith Yeung Allow keyPrefix to accept an additional argument for double maps (#2230)
|
||||
2 MOZGIII Follow-up fix after #4665 (#4666)
|
||||
2 Paweł Nguyen Fix a minor typo in cookbook blocks docs (#2294)
|
||||
2 rob thijssen nimbus author mapping correction (#5590)
|
||||
2 sung wu Update tx.md (#2485)
|
||||
2 Veliko Abi constructor takes different parameters (#3347)
|
||||
2 Wei Tang Use /usr/bin/env bash instead of /bin/bash (#2053)
|
||||
@@ -99,7 +101,6 @@
|
||||
1 qiuhao update DeriveCustom type (#2581)
|
||||
1 r0t0r-r0t0r Fix memory leak on raw rpc call (#4505)
|
||||
1 Raphael Flechtner fix: typegen disconnect ws on success (#4901)
|
||||
1 rob thijssen support manta author lookup (#5561)
|
||||
1 Robert Hambrock update MMR API (#5479)
|
||||
1 Rocco Musolino remove broken link (#2671)
|
||||
1 sander2 fix: type generation for nested tuples (#5395)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# @polkadot/api
|
||||
|
||||
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the classes, interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
|
||||
This library provides a clean wrapper around all the methods exposed by a Polkadot/Substrate network client and defines all the types exposed by a node. For complete documentation around the interfaces and their use, visit the [documentation portal](https://polkadot.js.org/docs/api/).
|
||||
|
||||
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) and [UPGRADING](UPGRADING.md) guides when changing versions.
|
||||
If you are an existing user, please be sure to track the [CHANGELOG](CHANGELOG.md) when changing versions.
|
||||
|
||||
## tutorials
|
||||
|
||||
|
||||
-201
@@ -1,201 +0,0 @@
|
||||
# Upgrade guide
|
||||
|
||||
This is an upgrade guide for users of the API. It does not attempt to detail each version (the [CHANGELOG](CHANGELOG.md) has all the changes between versions), but rather tries to explain the rationale behind major breaking changes and how users of the API should handle this.
|
||||
|
||||
While we try to keep the user-facing interfaces as stable as possible, sometimes you just need to make additions to move forward and improve things down the road, as painful as they may be. Like you, we are also users of the API, and eat our own dog food - and as such, feel any pains introduced first.
|
||||
|
||||
|
||||
## 0.97.1 (and newer)
|
||||
|
||||
The 0.97 series lays the groundwork to allow type registration to be ties to a specific chain and a specific Api instance. In the past, 2 Api instances in the same process would share types, which mean that you could not connect to 2 independent chains with different types. This is very problematic for Polkadot chains, where the idea is to connect to multiple chains.
|
||||
|
||||
When using the Api, a new `Registry` will be created on using `new Api(...)` or `Api.create(...)` and this will be transparently passed when creating types. In the cases where you create type instances explicitly or create type classes for injection, you would need to make adjustments.
|
||||
|
||||
### Type classes
|
||||
|
||||
In a number of instances, developers are creating classes and making these available for interacting with their chains. For instance, an example of a custom type could be -
|
||||
|
||||
```js
|
||||
import { Struct, Text, u32 } from '@polkadot/types';
|
||||
|
||||
export class Preferences extends Struct {
|
||||
constructor (value?: ahy) {
|
||||
super({
|
||||
name: Text,
|
||||
id: u32
|
||||
}, value);
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
In the current iteration, the underlying `@polkadot/types` bases structures now require a `Registry` to be passed as the first parameter. This means that the above signature would be adjusted to -
|
||||
|
||||
```js
|
||||
// the next import is only required for TypeScript
|
||||
import { Registry } from '@polkadot/types/types';
|
||||
import { Struct, Text, u32 } from '@polkadot/types';
|
||||
|
||||
export class Preferences extends Struct {
|
||||
constructor (registry: Registry, value?: ahy) {
|
||||
super(registry, {
|
||||
name: Text,
|
||||
id: u32
|
||||
}, value);
|
||||
}
|
||||
|
||||
...
|
||||
}
|
||||
```
|
||||
|
||||
Where the type is used or returned from the API, the `Registry` will be automatically passed to class creation.
|
||||
|
||||
### createType
|
||||
|
||||
Previously, when creating a type instance such as `BlockNumber`, you would do `api.createType('BlockNumber', <initValue>)`, this is unchanged. In the cases where you directly import from `@polkadot/types`, the following pattern is required -
|
||||
|
||||
```js
|
||||
import { createType } from '@polkadot/types';
|
||||
|
||||
...
|
||||
const blockNumber = createType(api.registry, 'BlockNumber', 12345);
|
||||
```
|
||||
|
||||
In some cases, you would want to explicitly pass a `Registry` interface to the API, instead of relying on it explicitly. This is generally applicable in the cases where you want to use the `createType` independently from the API -
|
||||
|
||||
```js
|
||||
import { ApiPromise } from '@polkadot/api';
|
||||
import { TypeRegistry, createType } from '@polkadot/types';
|
||||
|
||||
...
|
||||
const registry = new TypeRegistry();
|
||||
const blockNumber = createType(registry, 'BlockNumber', 12345);
|
||||
const api = await ApiPromise.create({ registry });
|
||||
```
|
||||
|
||||
### Extrinsic metadata
|
||||
|
||||
In some applications, the undocumented `findFunction` has been used to determine the Api has the metadata for a specific extrinsic. The has been exposed on top of `GenericCall`, and it typically used in applications such as signers. Along with the compulsory registry, the above functions have been moved to the `Registry` itself, so if you previously had -
|
||||
|
||||
```js
|
||||
const { meta, method, section } = GenericCall.findFunction(extrinsic.callIndex);
|
||||
```
|
||||
|
||||
You need to change it to -
|
||||
|
||||
```js
|
||||
const { meta, method, section } = registry.findMetaCall(extrinsic.callIndex);
|
||||
```
|
||||
|
||||
## 0.90.1 (and newer), from 0.81.1 (and older)
|
||||
|
||||
The 0.90.1 release caters for the [Kusama network](https://kusama.network/) and pulls in all the changes to support [Substrate 2.x](https://github.com/paritytech/substrate), all while maintaining backwards compatibility to allow operation on networks such as [Polkadot's Alexander](https://polkadot.network/).
|
||||
|
||||
To support the network and the new transaction formats, a number of changes were made to how extrinsics are handled and signed. In addition, as support for ongoing work where type definitions are to be supplied by the actual node metadata, the foundation has been laid to move to type definitions as opposed to classes for runtime types.
|
||||
|
||||
### Modules
|
||||
|
||||
The first thing to be aware of is breakages when connecting to any new network, here older networks such as Alex are unaffected - the node metadata defines exactly what is available to the chain, so endpoints that worked yesterday still works today.
|
||||
|
||||
There will no doubt be breakages in using calls to now non-existent endpoints (as populated by the metadata) if you are upgrading your nodes to Substrate 2.x. Substrate 2.x has had a number of internal changes, where new modules and features are introduced (such as `babe` and `technicalCommittee`), some modules have been renamed (such as `contract` -> `contracts`) and modules such as `session` has been reworked to a large degree.
|
||||
|
||||
To cater for both 1.x and 2.x support, the [@polkadot/api-derive](packages/api-derive) endpoints, do feature detection for the node type and should continue working as-is. Additionally, a number of new derives have been added, specifically around elections.
|
||||
|
||||
### Type renames
|
||||
|
||||
To better align with the actual types from the metadata, and avoid (too much) context switching, some types from the `@polkadot/types` have been renamed. These include -
|
||||
|
||||
- `Vector` -> `Vec`
|
||||
- `U{8|16|32|64|128|256}` have been removed, only the lowercase version of these remain, i.e. `u32`.
|
||||
|
||||
### Type usage
|
||||
|
||||
The [@polkadot/api](packages/api) has always handled the conversion of types for parameters when making calls or queries. For example, when making a transfer to `BOB` (address), any of the following is valid -
|
||||
|
||||
- `api.tx.balances.transfer(BOB, 12345)` - value specified as a number
|
||||
- `api.tx.balances.transfer(BOB, '12345')` - value specified as a string
|
||||
- `api.tx.balances.transfer(BOB, '0x3039')` - value specified as a hex
|
||||
- `api.tx.balances.transfer(BOB, new BN(12345))` - value specified as a [BN](https://github.com/indutny/bn.js/)
|
||||
|
||||
Internally the API will take the input and convert the value into a `Balance`, serialize it using the SCALE codec and transfer it to the node. In some cases users would construct the `Balance` type manually, by importing the class and calling `new` on it. This last approach has now been removed, and where classes are still available (limited reach), discouraged.
|
||||
|
||||
First the rationale behind this - in all cases Substrate is very flexible, so while Polkadot (and the Substrate base), define `type Balance = u128`, this can be different between chains. (This also applies to the majority of built-in supported types). As such, type construction should be done via the actual registered types.
|
||||
|
||||
```js
|
||||
// this is applicable everywhere, import the type creator, using the registry
|
||||
import { createType } from '@polkadot/types';
|
||||
|
||||
// construct the Balance, of type Balance (type is inferred and available with TS)
|
||||
const value = createType('Balance', 12345);
|
||||
|
||||
// use value here as you normally would
|
||||
...
|
||||
```
|
||||
|
||||
The impact of this will be noticeable, if you have been importing the old-style type classes from `@polkadot/types`, those imports are not available anymore. For creation, just pass everything through the `createType`.
|
||||
|
||||
If a TypeScript user, you can find the updated type (it is a type definition only, not a class), under `@polkadot/types/interfaces`. To do type casting, using interfaces -
|
||||
|
||||
```js
|
||||
// import the TypeScript runtime interfaces we wish to use
|
||||
import { Balance, Hash } from '@polkadot/types/interfaces';
|
||||
|
||||
// import the primitives we wish to use
|
||||
import { createType, Compact, Vec, u32 } from '@polkadot/types';
|
||||
|
||||
// define an interface we want to use inside our code
|
||||
interface MyProps {
|
||||
balance: Compact<Balance>;
|
||||
changes: Vec<Hash>;
|
||||
counter?: u32;
|
||||
}
|
||||
|
||||
// assign something to this structure
|
||||
const props = {
|
||||
balance: createType('Compact<Balance>', 12345),
|
||||
changes: createType('Vec<Hash>', []) // empty for now
|
||||
};
|
||||
```
|
||||
|
||||
### Type definitions
|
||||
|
||||
One of the major pain points in working with a custom Substrate node is the definition of types to cater for chains. There are 2 approaches: defining types via a JSON format or extending your own classes in TypeScript (or JS) and injecting these. For the latter category, there are some impacts in the way you define these.
|
||||
|
||||
If using JSON definitions, nothing changes, your types are still defined as -
|
||||
|
||||
```json
|
||||
{
|
||||
"MyStruct": {
|
||||
"balance": "Compact<Balance>",
|
||||
"values": "Vec<AccountId>",
|
||||
"counter": "u32"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For the definition of any structures using the Substrate specific types as classes, some adjustments are needed. Since the base modules types are now not available in classes, however it is needed for definitions, the following approach is encouraged -
|
||||
|
||||
```js
|
||||
// import the ClassOf, it works the same as `createType` (along with type detection)
|
||||
// and acts as a replacement for the direct import and use of specific classes
|
||||
import { ClassOf, Struct, u32 } from '@polkadot/types';
|
||||
|
||||
export class MyStruct extends Struct {
|
||||
constructor (value?: any) {
|
||||
super({
|
||||
balance: ClassOf('Compact<Balance>'),
|
||||
values: ClassOf('Vec<AccountId>'),
|
||||
counter: u32
|
||||
}, value);
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
Internally the [@polkadot/types](packages/types) package now only defines classes where there are specific encoding logic applied. For all other types, the definitions are done via a JSON-like format and then the TypeScript definitions are generated from these. (In a world where nodes inject types and the type definitions are not needed, this functionality will be useful to allow TS developers to auto-generate type definitions based on what the node defines.)
|
||||
|
||||
### Signing transactions (Signer interface)
|
||||
|
||||
For users of the API signer interfaces (such as extensions and mobile signers), the interfaces have undergone some changes to cater for the extrinsic v2 format as defined by Substrate. If you are only supporting current chains (e.g. Alexander), no changes are required, however the old `sign` interface does not support chains such as Kusama, so all users are encouraged to upgrade to the new `signPayload` interface.
|
||||
|
||||
This has already been implemented in both the [polkadot-js extension](https://github.com/polkadot-js/extension/blob/5f22f67d558655c605eb6f6beecef6826ed6c159/packages/extension/src/page/Signer.ts#L16v) as well as the [simple single signer](https://github.com/polkadot-js/api/blob/d56905d1b566be6f17eb570ac01448378fc91b67/packages/api/test/util/SingleAccountSigner.ts#L37).
|
||||
+4
-4
@@ -14,10 +14,10 @@
|
||||
},
|
||||
"sideEffects": false,
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"versions": {
|
||||
"git": "10.3.2",
|
||||
"npm": "10.3.2"
|
||||
"git": "10.3.3",
|
||||
"npm": "10.3.3"
|
||||
},
|
||||
"workspaces": [
|
||||
"packages/*"
|
||||
@@ -40,7 +40,7 @@
|
||||
"test:one": "polkadot-dev-run-test --env node"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/dev": "^0.72.39",
|
||||
"@polkadot/dev": "^0.72.43",
|
||||
"@polkadot/typegen": "workspace:packages/typegen",
|
||||
"@types/node": "^18.15.11"
|
||||
},
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-base": "10.3.2",
|
||||
"@polkadot/rpc-augment": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-augment": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/api-base": "10.3.3",
|
||||
"@polkadot/rpc-augment": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-augment": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ 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 { Codec, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { Perbill, Permill, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, KusamaRuntimeHoldReason, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPalletId, FrameSystemLimitsBlockLength, FrameSystemLimitsBlockWeights, KusamaRuntimeRuntimeHoldReason, PalletReferendaTrackInfo, SpVersionRuntimeVersion, SpWeightsRuntimeDbWeight, SpWeightsWeightV2Weight } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedConst<ApiType extends ApiTypes> = AugmentedConst<ApiType>;
|
||||
|
||||
@@ -448,7 +448,7 @@ declare module '@polkadot/api-base/types/consts' {
|
||||
/**
|
||||
* The identifier of the hold reason.
|
||||
**/
|
||||
holdReason: KusamaRuntimeHoldReason & AugmentedConst<ApiType>;
|
||||
holdReason: KusamaRuntimeRuntimeHoldReason & AugmentedConst<ApiType>;
|
||||
/**
|
||||
* The number of blocks between consecutive attempts to dequeue bids and create receipts.
|
||||
*
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { BTreeSet, Bytes, Null, Option, Struct, U8aFixed, Vec, WrapperOpaqu
|
||||
import type { AnyNumber, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, H256, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportDispatchPerDispatchClassWeight, FrameSystemAccountInfo, FrameSystemEventRecord, FrameSystemLastRuntimeUpgradeInfo, FrameSystemPhase, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletBagsListListBag, PalletBagsListListNode, PalletBalancesAccountData, PalletBalancesBalanceLock, PalletBalancesIdAmount, PalletBalancesReserveData, PalletBountiesBounty, PalletChildBountiesChildBounty, PalletConvictionVotingVoteVoting, PalletElectionProviderMultiPhasePhase, PalletElectionProviderMultiPhaseReadySolution, PalletElectionProviderMultiPhaseRoundSnapshot, PalletElectionProviderMultiPhaseSignedSignedSubmission, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletFastUnstakeUnstakeRequest, PalletGrandpaStoredPendingChange, PalletGrandpaStoredState, PalletIdentityRegistrarInfo, PalletIdentityRegistration, PalletImOnlineBoundedOpaqueNetworkState, PalletImOnlineSr25519AppSr25519Public, PalletMultisigMultisig, PalletNisBid, PalletNisReceiptRecord, PalletNisSummaryRecord, PalletNominationPoolsBondedPoolInner, PalletNominationPoolsClaimPermission, PalletNominationPoolsPoolMember, PalletNominationPoolsRewardPool, PalletNominationPoolsSubPools, PalletPreimageRequestStatus, PalletProxyAnnouncement, PalletProxyProxyDefinition, PalletRankedCollectiveMemberRecord, PalletRankedCollectiveVoteRecord, PalletRecoveryActiveRecovery, PalletRecoveryRecoveryConfig, PalletReferendaReferendumInfoConvictionVotingTally, PalletReferendaReferendumInfoRankedCollectiveTally, PalletSchedulerScheduled, PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletSocietyVouchingStatus, PalletStakingActiveEraInfo, PalletStakingEraRewardPoints, PalletStakingExposure, PalletStakingForcing, PalletStakingNominations, PalletStakingRewardDestination, PalletStakingSlashingSlashingSpans, PalletStakingSlashingSpanRecord, PalletStakingStakingLedger, PalletStakingUnappliedSlash, PalletStakingValidatorPrefs, PalletTransactionPaymentReleases, PalletTreasuryProposal, PalletVestingReleases, PalletVestingVestingInfo, PalletXcmQueryStatus, PalletXcmRemoteLockedFungibleRecord, PalletXcmVersionMigrationStage, PolkadotCorePrimitivesInboundDownwardMessage, PolkadotCorePrimitivesInboundHrmpMessage, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4AssignmentAppPublic, PolkadotPrimitivesV4CandidateCommitments, PolkadotPrimitivesV4CoreOccupied, PolkadotPrimitivesV4DisputeState, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4ScrapedOnChainVotes, PolkadotPrimitivesV4SessionInfo, PolkadotPrimitivesV4UpgradeGoAhead, PolkadotPrimitivesV4UpgradeRestriction, PolkadotPrimitivesV4ValidatorAppPublic, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeCommonCrowdloanFundInfo, PolkadotRuntimeCommonParasRegistrarParaInfo, PolkadotRuntimeParachainsConfigurationHostConfiguration, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsHrmpHrmpChannel, PolkadotRuntimeParachainsHrmpHrmpOpenChannelRequest, PolkadotRuntimeParachainsInclusionAvailabilityBitfieldRecord, PolkadotRuntimeParachainsInclusionCandidatePendingAvailability, PolkadotRuntimeParachainsInitializerBufferedSessionChange, PolkadotRuntimeParachainsParasParaGenesisArgs, PolkadotRuntimeParachainsParasParaLifecycle, PolkadotRuntimeParachainsParasParaPastCodeMeta, PolkadotRuntimeParachainsParasPvfCheckActiveVoteState, PolkadotRuntimeParachainsSchedulerCoreAssignment, PolkadotRuntimeParachainsSchedulerParathreadClaimQueue, SpConsensusBabeAppPublic, SpConsensusBabeBabeEpochConfiguration, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusBabeDigestsPreDigest, SpCoreCryptoKeyTypeId, SpNposElectionsElectionScore, SpRuntimeDigest, SpStakingOffenceOffenceDetails, SpWeightsWeightV2Weight, XcmVersionedAssetId, XcmVersionedMultiLocation } from '@polkadot/types/lookup';
|
||||
import type { Observable } from '@polkadot/types/types';
|
||||
|
||||
export type __AugmentedQuery<ApiType extends ApiTypes> = AugmentedQuery<ApiType, () => unknown>;
|
||||
@@ -207,7 +207,7 @@ declare module '@polkadot/api-base/types/storage' {
|
||||
* Holds on account balances.
|
||||
**/
|
||||
holds: AugmentedQuery<ApiType, (arg: AccountId32 | string | Uint8Array) => Observable<Vec<{
|
||||
readonly id: KusamaRuntimeHoldReason;
|
||||
readonly id: KusamaRuntimeRuntimeHoldReason;
|
||||
readonly amount: u128;
|
||||
} & Struct>>, [AccountId32]> & QueryableStorageEntry<ApiType, [AccountId32]>;
|
||||
/**
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent, Perquintill } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeParachainsDisputesSlashingDisputeProof, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeSessionKeys, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletSocietyJudgement, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeParachainsDisputesSlashingDisputeProof, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
||||
@@ -589,6 +589,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the dispute post conclusion acceptance period.
|
||||
**/
|
||||
setDisputePostConclusionAcceptancePeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set PVF executor parameters.
|
||||
**/
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV4ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4ExecutorParams]>;
|
||||
/**
|
||||
* Set the parachain validator-group rotation frequency
|
||||
**/
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-augment', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -11,7 +11,7 @@ import type { Bytes, Compact, Option, U8aFixed, Vec, bool, u128, u16, u32, u64,
|
||||
import type { AnyNumber, IMethod, ITuple } from '@polkadot/types-codec/types';
|
||||
import type { EthereumAddress } from '@polkadot/types/interfaces/eth';
|
||||
import type { AccountId32, Call, H256, MultiAddress, Perbill, Percent } from '@polkadot/types/interfaces/runtime';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
import type { FrameSupportPreimagesBounded, FrameSupportScheduleDispatchTime, PalletConvictionVotingConviction, PalletConvictionVotingVoteAccountVote, PalletDemocracyConviction, PalletDemocracyMetadataOwner, PalletDemocracyVoteAccountVote, PalletElectionProviderMultiPhaseRawSolution, PalletElectionProviderMultiPhaseSolutionOrSnapshotSize, PalletElectionsPhragmenRenouncing, PalletIdentityBitFlags, PalletIdentityIdentityInfo, PalletIdentityJudgement, PalletImOnlineHeartbeat, PalletImOnlineSr25519AppSr25519Signature, PalletMultisigTimepoint, PalletNominationPoolsBondExtra, PalletNominationPoolsClaimPermission, PalletNominationPoolsCommissionChangeRate, PalletNominationPoolsConfigOpAccountId32, PalletNominationPoolsConfigOpPerbill, PalletNominationPoolsConfigOpU128, PalletNominationPoolsConfigOpU32, PalletNominationPoolsPoolState, PalletStakingPalletConfigOpPerbill, PalletStakingPalletConfigOpPercent, PalletStakingPalletConfigOpU128, PalletStakingPalletConfigOpU32, PalletStakingRewardDestination, PalletStakingValidatorPrefs, PalletVestingVestingInfo, PolkadotParachainPrimitivesHrmpChannelId, PolkadotPrimitivesV4ExecutorParams, PolkadotPrimitivesV4InherentData, PolkadotPrimitivesV4PvfCheckStatement, PolkadotPrimitivesV4ValidatorAppSignature, PolkadotPrimitivesVstagingAsyncBackingParams, PolkadotRuntimeCommonClaimsEcdsaSignature, PolkadotRuntimeCommonClaimsStatementKind, PolkadotRuntimeOriginCaller, PolkadotRuntimeProxyType, PolkadotRuntimeSessionKeys, SpConsensusBabeDigestsNextConfigDescriptor, SpConsensusGrandpaEquivocationProof, SpConsensusSlotsEquivocationProof, SpNposElectionsElectionScore, SpNposElectionsSupport, SpRuntimeMultiSignature, SpRuntimeMultiSigner, SpSessionMembershipProof, SpWeightsWeightV2Weight, XcmV3MultiLocation, XcmV3WeightLimit, XcmVersionedMultiAssets, XcmVersionedMultiLocation, XcmVersionedXcm } from '@polkadot/types/lookup';
|
||||
|
||||
export type __AugmentedSubmittable = AugmentedSubmittable<() => unknown>;
|
||||
export type __SubmittableExtrinsic<ApiType extends ApiTypes> = SubmittableExtrinsic<ApiType>;
|
||||
@@ -589,6 +589,10 @@ declare module '@polkadot/api-base/types/submittable' {
|
||||
* Set the dispute post conclusion acceptance period.
|
||||
**/
|
||||
setDisputePostConclusionAcceptancePeriod: AugmentedSubmittable<(updated: u32 | AnyNumber | Uint8Array) => SubmittableExtrinsic<ApiType>, [u32]>;
|
||||
/**
|
||||
* Set PVF executor parameters.
|
||||
**/
|
||||
setExecutorParams: AugmentedSubmittable<(updated: PolkadotPrimitivesV4ExecutorParams) => SubmittableExtrinsic<ApiType>, [PolkadotPrimitivesV4ExecutorParams]>;
|
||||
/**
|
||||
* Set the parachain validator-group rotation frequency
|
||||
**/
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/rpc-core": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-base', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -13,7 +13,7 @@ export interface ApiInterfaceRx {
|
||||
call: QueryableCalls<'rxjs'>;
|
||||
consts: QueryableConsts<'rxjs'>;
|
||||
extrinsicType: number;
|
||||
genesisHash?: Hash;
|
||||
genesisHash?: Hash | undefined;
|
||||
hasSubscriptions: boolean;
|
||||
registry: Registry;
|
||||
runtimeMetadata: Metadata;
|
||||
@@ -22,7 +22,7 @@ export interface ApiInterfaceRx {
|
||||
queryMulti: QueryableStorageMulti<'rxjs'>;
|
||||
rpc: DecoratedRpc<'rxjs', RpcInterface>;
|
||||
tx: SubmittableExtrinsics<'rxjs'>;
|
||||
signer?: Signer;
|
||||
signer?: Signer | undefined;
|
||||
|
||||
callAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableCalls<'rxjs'>>;
|
||||
queryAt: (blockHash: Uint8Array | string, knownVersion?: RuntimeVersion) => Observable<QueryableStorage<'rxjs'>>;
|
||||
|
||||
@@ -40,13 +40,13 @@ export type SubmittablePaymentResult<ApiType extends ApiTypes> =
|
||||
: Promise<RuntimeDispatchInfo>;
|
||||
|
||||
export interface SubmittableResultValue {
|
||||
dispatchError?: DispatchError;
|
||||
dispatchInfo?: DispatchInfo;
|
||||
dispatchError?: DispatchError | undefined;
|
||||
dispatchInfo?: DispatchInfo | undefined;
|
||||
events?: EventRecord[];
|
||||
internalError?: Error;
|
||||
internalError?: Error | undefined;
|
||||
status: ExtrinsicStatus;
|
||||
txHash: Hash;
|
||||
txIndex?: number;
|
||||
txIndex?: number | undefined;
|
||||
blockNumber?: BlockNumber;
|
||||
}
|
||||
|
||||
|
||||
@@ -18,20 +18,20 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-create": "10.3.2",
|
||||
"@polkadot/api": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/types-create": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/keyring": "^11.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface BlueprintConstructor<ApiType extends ApiTypes> {
|
||||
}
|
||||
|
||||
export class BlueprintSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly contract?: Contract<ApiType>;
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contract?: Contract<ApiType>) {
|
||||
super(result);
|
||||
|
||||
@@ -25,10 +25,10 @@ export interface CodeConstructor<ApiType extends ApiTypes> {
|
||||
}
|
||||
|
||||
export class CodeSubmittableResult<ApiType extends ApiTypes> extends SubmittableResult {
|
||||
readonly blueprint?: Blueprint<ApiType>;
|
||||
readonly contract?: Contract<ApiType>;
|
||||
readonly blueprint?: Blueprint<ApiType> | undefined;
|
||||
readonly contract?: Contract<ApiType> | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType>, contract?: Contract<ApiType>) {
|
||||
constructor (result: ISubmittableResult, blueprint?: Blueprint<ApiType> | undefined, contract?: Contract<ApiType> | undefined) {
|
||||
super(result);
|
||||
|
||||
this.blueprint = blueprint;
|
||||
@@ -77,14 +77,14 @@ export class Code<ApiType extends ApiTypes> extends Base<ApiType> {
|
||||
encodeSalt(salt)
|
||||
).withResultTransform((result: ISubmittableResult) =>
|
||||
new CodeSubmittableResult(result, ...(applyOnEvent(result, ['CodeStored', 'Instantiated'], (records: EventRecord[]) =>
|
||||
records.reduce<[Blueprint<ApiType>?, Contract<ApiType>?]>(([blueprint, contract], { event }) =>
|
||||
records.reduce<[Blueprint<ApiType> | undefined, Contract<ApiType> | undefined]>(([blueprint, contract], { event }) =>
|
||||
this.api.events.contracts.Instantiated.is(event)
|
||||
? [blueprint, new Contract<ApiType>(this.api, this.abi, (event as unknown as { data: [Codec, AccountId] }).data[1], this._decorateMethod)]
|
||||
: this.api.events.contracts.CodeStored.is(event)
|
||||
? [new Blueprint<ApiType>(this.api, this.abi, (event as unknown as { data: [AccountId] }).data[0], this._decorateMethod), contract]
|
||||
: [blueprint, contract],
|
||||
[])
|
||||
) || []))
|
||||
[undefined, undefined])
|
||||
) || [undefined, undefined]))
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ function createTx <ApiType extends ApiTypes> (meta: AbiMessage, fn: (options: Co
|
||||
}
|
||||
|
||||
export class ContractSubmittableResult extends SubmittableResult {
|
||||
readonly contractEvents?: DecodedEvent[];
|
||||
readonly contractEvents?: DecodedEvent[] | undefined;
|
||||
|
||||
constructor (result: ISubmittableResult, contractEvents?: DecodedEvent[]) {
|
||||
super(result);
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-contract', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -86,6 +86,6 @@ export interface WeightAll {
|
||||
v1Weight: BN;
|
||||
v2Weight: {
|
||||
refTime: BN;
|
||||
proofSize?: BN;
|
||||
proofSize?: BN | undefined;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -18,25 +18,25 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.3.2",
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/api-base": "10.3.2",
|
||||
"@polkadot/rpc-core": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/api": "10.3.3",
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/api-base": "10.3.3",
|
||||
"@polkadot/rpc-core": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "10.3.2",
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/rpc-augment": "10.3.2",
|
||||
"@polkadot/rpc-provider": "10.3.2",
|
||||
"@polkadot/types-support": "10.3.2"
|
||||
"@polkadot/api": "10.3.3",
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/rpc-augment": "10.3.3",
|
||||
"@polkadot/rpc-provider": "10.3.3",
|
||||
"@polkadot/types-support": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ function retrieveNick (api: DeriveApi, accountId?: AccountId): Observable<string
|
||||
export function info (instanceId: string, api: DeriveApi): (address?: AccountIndex | AccountId | Address | Uint8Array | string | null) => Observable<DeriveAccountInfo> {
|
||||
return memo(instanceId, (address?: AccountIndex | AccountId | Address | Uint8Array | string | null): Observable<DeriveAccountInfo> =>
|
||||
api.derive.accounts.idAndIndex(address).pipe(
|
||||
switchMap(([accountId, accountIndex]): Observable<[Partial<DeriveAccountInfo>, DeriveAccountRegistration, string?]> =>
|
||||
switchMap(([accountId, accountIndex]): Observable<[Partial<DeriveAccountInfo>, DeriveAccountRegistration, string | undefined]> =>
|
||||
combineLatest([
|
||||
of({ accountId, accountIndex }),
|
||||
api.derive.accounts.identity(accountId),
|
||||
|
||||
@@ -3,22 +3,22 @@
|
||||
|
||||
import type { AccountId, AccountIndex, RegistrationJudgement } from '@polkadot/types/interfaces';
|
||||
|
||||
export type AccountIdAndIndex = [AccountId?, AccountIndex?];
|
||||
export type AccountIdAndIndex = [AccountId | undefined, AccountIndex | undefined];
|
||||
|
||||
export type AccountIndexes = Record<string, AccountIndex>;
|
||||
|
||||
export interface DeriveAccountRegistration {
|
||||
display?: string;
|
||||
displayParent?: string;
|
||||
email?: string;
|
||||
image?: string;
|
||||
legal?: string;
|
||||
other?: Record<string, string>;
|
||||
parent?: AccountId;
|
||||
pgp?: string;
|
||||
riot?: string;
|
||||
twitter?: string;
|
||||
web?: string;
|
||||
display?: string | undefined;
|
||||
displayParent?: string | undefined;
|
||||
email?: string | undefined;
|
||||
image?: string | undefined;
|
||||
legal?: string | undefined;
|
||||
other?: Record<string, string> | undefined;
|
||||
parent?: AccountId | undefined;
|
||||
pgp?: string | undefined;
|
||||
riot?: string | undefined;
|
||||
twitter?: string | undefined;
|
||||
web?: string | undefined;
|
||||
judgements: RegistrationJudgement[];
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@ export interface DeriveAccountFlags {
|
||||
}
|
||||
|
||||
export interface DeriveAccountInfo {
|
||||
accountId?: AccountId;
|
||||
accountIndex?: AccountIndex;
|
||||
accountId?: AccountId | undefined;
|
||||
accountIndex?: AccountIndex | undefined;
|
||||
identity: DeriveAccountRegistration;
|
||||
nickname?: string;
|
||||
nickname?: string | undefined;
|
||||
}
|
||||
|
||||
export interface DeriveHasIdentity {
|
||||
display?: string;
|
||||
display?: string | undefined;
|
||||
hasIdentity: boolean;
|
||||
parentId?: string;
|
||||
parentId?: string | undefined;
|
||||
}
|
||||
|
||||
@@ -4,11 +4,12 @@
|
||||
import type { Observable } from 'rxjs';
|
||||
import type { QueryableStorage } from '@polkadot/api-base/types';
|
||||
import type { Compact, Vec } from '@polkadot/types';
|
||||
import type { AccountId, Address, BlockNumber, Header } from '@polkadot/types/interfaces';
|
||||
import type { AccountId, BlockNumber, Header } from '@polkadot/types/interfaces';
|
||||
import type { SpCoreSr25519Public } from '@polkadot/types/lookup';
|
||||
import type { Codec, IOption } from '@polkadot/types/types';
|
||||
import type { DeriveApi } from '../types.js';
|
||||
|
||||
import { combineLatest, map, of } from 'rxjs';
|
||||
import { combineLatest, map, mergeMap, of } from 'rxjs';
|
||||
|
||||
import { memo, unwrapBlockNumber } from '../util/index.js';
|
||||
|
||||
@@ -46,14 +47,19 @@ export function getAuthorDetails (header: Header, queryAt: QueryableStorage<'rxj
|
||||
]);
|
||||
}
|
||||
|
||||
// fall back to session pallet, if available (ie: manta, calamari), to map session (nimbus) key to author (collator/validator) key
|
||||
if (queryAt.session && queryAt.session.queuedKeys) {
|
||||
// fall back to session and parachain staking pallets, if available (ie: manta, calamari), to map session (nimbus) key to author (collator) key
|
||||
if (queryAt.parachainStaking && queryAt.parachainStaking.selectedCandidates && queryAt.session && queryAt.session.nextKeys && queryAt.session.nextKeys.multi) {
|
||||
return combineLatest([
|
||||
of(header),
|
||||
validators,
|
||||
queryAt.session.queuedKeys<[AccountId, { nimbus: Address }][]>().pipe(
|
||||
map((queuedKeys) => queuedKeys.find((sessionKey) => sessionKey[1].nimbus.toHex() === loggedAuthor.toHex())),
|
||||
map((sessionKey) => (sessionKey) ? sessionKey[0] : null)
|
||||
queryAt.parachainStaking.selectedCandidates<AccountId[]>().pipe(
|
||||
mergeMap((selectedCandidates) => combineLatest([
|
||||
of(selectedCandidates),
|
||||
queryAt.session.nextKeys.multi<IOption<{ nimbus: SpCoreSr25519Public } & Codec>>(selectedCandidates).pipe(
|
||||
map((nextKeys) => nextKeys.findIndex((option) => option.unwrapOrDefault().nimbus.toHex() === loggedAuthor.toHex()))
|
||||
)
|
||||
])),
|
||||
map(([selectedCandidates, index]) => selectedCandidates[index])
|
||||
)
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ export interface DeriveDemocracyLock {
|
||||
|
||||
export interface DeriveProposalImage extends AtBlock {
|
||||
balance: Balance;
|
||||
proposal?: Call;
|
||||
proposal?: Call | undefined;
|
||||
proposalHash?: HexString;
|
||||
proposalLen?: number;
|
||||
proposer: AccountId;
|
||||
@@ -32,27 +32,27 @@ export interface DeriveProposalImage extends AtBlock {
|
||||
export interface DeriveDispatch extends AtBlock {
|
||||
index: ReferendumIndex;
|
||||
imageHash: HexString;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
}
|
||||
|
||||
export interface DeriveProposal {
|
||||
balance?: Balance;
|
||||
index: PropIndex;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: Hash;
|
||||
proposer: AccountId;
|
||||
seconds: Vec<AccountId>;
|
||||
}
|
||||
|
||||
export interface DeriveProposalExternal {
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: HexString;
|
||||
threshold: PalletDemocracyVoteThreshold;
|
||||
}
|
||||
|
||||
export interface DeriveReferendum {
|
||||
index: ReferendumIndex;
|
||||
image?: DeriveProposalImage;
|
||||
image?: DeriveProposalImage | undefined;
|
||||
imageHash: HexString;
|
||||
status: PalletDemocracyReferendumStatus | ReferendumInfoTo239;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/api-derive', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -7,10 +7,10 @@ import type { PalletSocietyBid, PalletSocietyBidKind, PalletSocietyVote, PalletS
|
||||
|
||||
export interface DeriveSociety {
|
||||
bids: PalletSocietyBid[];
|
||||
defender?: AccountId;
|
||||
defender?: AccountId | undefined;
|
||||
hasDefender: boolean;
|
||||
head?: AccountId;
|
||||
founder?: AccountId;
|
||||
head?: AccountId | undefined;
|
||||
founder?: AccountId | undefined;
|
||||
maxMembers: u32;
|
||||
pot: BalanceOf;
|
||||
}
|
||||
@@ -28,6 +28,6 @@ export interface DeriveSocietyMember {
|
||||
isSuspended: boolean;
|
||||
payouts: [BlockNumber, Balance][];
|
||||
strikes: StrikeCount;
|
||||
vote?: PalletSocietyVote;
|
||||
vouching?: PalletSocietyVouchingStatus;
|
||||
vote?: PalletSocietyVote | undefined;
|
||||
vouching?: PalletSocietyVouchingStatus | undefined;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export function createHeaderExtended (registry: Registry, header?: Header, valid
|
||||
const HeaderBase = registry.createClass('Header');
|
||||
|
||||
class Implementation extends HeaderBase implements HeaderExtended {
|
||||
readonly #author?: AccountId;
|
||||
readonly #author?: AccountId | undefined;
|
||||
|
||||
constructor (registry: Registry, header?: Header, validators?: AccountId[] | null, author?: AccountId | null) {
|
||||
super(registry, header);
|
||||
|
||||
@@ -36,7 +36,7 @@ export function createSignedBlockExtended (registry: Registry, block?: SignedBlo
|
||||
const SignedBlockBase = registry.createClass('SignedBlock');
|
||||
|
||||
class Implementation extends SignedBlockBase implements SignedBlockExtended {
|
||||
readonly #author?: AccountId;
|
||||
readonly #author?: AccountId | undefined;
|
||||
readonly #events: EventRecord[];
|
||||
readonly #extrinsics: TxWithEvent[];
|
||||
|
||||
|
||||
@@ -14,8 +14,8 @@ export interface SignedBlockExtended extends SignedBlock {
|
||||
}
|
||||
|
||||
export interface TxWithEvent {
|
||||
dispatchError?: DispatchError;
|
||||
dispatchInfo?: DispatchInfo;
|
||||
dispatchError?: DispatchError | undefined;
|
||||
dispatchInfo?: DispatchInfo | undefined;
|
||||
events: Event[];
|
||||
extrinsic: Extrinsic;
|
||||
}
|
||||
|
||||
+14
-14
@@ -18,21 +18,21 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/api-base": "10.3.2",
|
||||
"@polkadot/api-derive": "10.3.2",
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/api-base": "10.3.3",
|
||||
"@polkadot/api-derive": "10.3.3",
|
||||
"@polkadot/keyring": "^11.1.3",
|
||||
"@polkadot/rpc-augment": "10.3.2",
|
||||
"@polkadot/rpc-core": "10.3.2",
|
||||
"@polkadot/rpc-provider": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-augment": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-create": "10.3.2",
|
||||
"@polkadot/types-known": "10.3.2",
|
||||
"@polkadot/rpc-augment": "10.3.3",
|
||||
"@polkadot/rpc-core": "10.3.3",
|
||||
"@polkadot/rpc-provider": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-augment": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/types-create": "10.3.3",
|
||||
"@polkadot/types-known": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"eventemitter3": "^5.0.0",
|
||||
@@ -40,7 +40,7 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/types-support": "10.3.2"
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/types-support": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ interface MetaDecoration {
|
||||
}
|
||||
|
||||
interface FullDecoration<ApiType extends ApiTypes> {
|
||||
createdAt?: Uint8Array;
|
||||
createdAt?: Uint8Array | undefined;
|
||||
decoratedApi: ApiDecoration<ApiType>;
|
||||
decoratedMeta: DecoratedMeta;
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/api', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -35,11 +35,11 @@ function extractInfo (events: EventRecord[] = []): DispatchInfo | undefined {
|
||||
}
|
||||
|
||||
export class SubmittableResult implements ISubmittableResult {
|
||||
readonly dispatchError?: DispatchError;
|
||||
readonly dispatchError?: DispatchError | undefined;
|
||||
|
||||
readonly dispatchInfo?: DispatchInfo;
|
||||
readonly dispatchInfo?: DispatchInfo | undefined;
|
||||
|
||||
readonly internalError?: Error;
|
||||
readonly internalError?: Error | undefined;
|
||||
|
||||
readonly events: EventRecord[];
|
||||
|
||||
@@ -47,9 +47,9 @@ export class SubmittableResult implements ISubmittableResult {
|
||||
|
||||
readonly txHash: Hash;
|
||||
|
||||
readonly txIndex?: number;
|
||||
readonly txIndex?: number | undefined;
|
||||
|
||||
readonly blockNumber?: BlockNumber;
|
||||
readonly blockNumber?: BlockNumber | undefined;
|
||||
|
||||
constructor ({ blockNumber, dispatchError, dispatchInfo, events, internalError, status, txHash, txIndex }: SubmittableResultValue) {
|
||||
this.dispatchError = dispatchError || extractError(events);
|
||||
|
||||
@@ -21,7 +21,7 @@ import { SubmittableResult } from './Result.js';
|
||||
interface SubmittableOptions<ApiType extends ApiTypes> {
|
||||
api: ApiInterfaceRx;
|
||||
apiType: ApiTypes;
|
||||
blockHash?: Uint8Array;
|
||||
blockHash?: Uint8Array | undefined;
|
||||
decorateMethod: ApiBase<ApiType>['_decorateMethod'];
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@ function makeEraOptions (api: ApiInterfaceRx, registry: Registry, partialOptions
|
||||
});
|
||||
}
|
||||
|
||||
function makeSignAndSendOptions (partialOptions?: Partial<SignerOptions> | Callback<ISubmittableResult>, statusCb?: Callback<ISubmittableResult>): [Partial<SignerOptions>, Callback<ISubmittableResult>?] {
|
||||
function makeSignAndSendOptions (partialOptions?: Partial<SignerOptions> | Callback<ISubmittableResult>, statusCb?: Callback<ISubmittableResult>): [Partial<SignerOptions>, Callback<ISubmittableResult> | undefined] {
|
||||
let options: Partial<SignerOptions> = {};
|
||||
|
||||
if (isFunction(partialOptions)) {
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-core": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/rpc-core": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-augment', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -18,18 +18,18 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/rpc-augment": "10.3.2",
|
||||
"@polkadot/rpc-provider": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/rpc-augment": "10.3.3",
|
||||
"@polkadot/rpc-provider": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"rxjs": "^7.8.0",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^11.1.3",
|
||||
"@polkadot/rpc-augment": "10.3.2"
|
||||
"@polkadot/rpc-augment": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-core', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^11.1.3",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-support": "10.3.2",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-support": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"@polkadot/x-fetch": "^11.1.3",
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/rpc-provider', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -130,7 +130,7 @@ class InnerChecker {
|
||||
let parsedResponse: {id: string, result?: SmoldotHealth, params?: { subscription: string }};
|
||||
|
||||
try {
|
||||
parsedResponse = JSON.parse(jsonRpcResponse) as { id: string, result: undefined | SmoldotHealth };
|
||||
parsedResponse = JSON.parse(jsonRpcResponse) as { id: string, result?: SmoldotHealth };
|
||||
} catch {
|
||||
return jsonRpcResponse;
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ export class ScProvider implements ProviderInterface {
|
||||
readonly #Sc: SubstrateConnect;
|
||||
readonly #coder: RpcCoder = new RpcCoder();
|
||||
readonly #spec: string | ScType.WellKnownChain;
|
||||
readonly #sharedSandbox?: ScProvider;
|
||||
readonly #sharedSandbox?: ScProvider | undefined;
|
||||
readonly #subscriptions: Map<string, [ResponseCallback, { unsubscribeMethod: string; id: string | number }]> = new Map();
|
||||
readonly #resubscribeMethods: Map<string, ActiveSubs> = new Map();
|
||||
readonly #requests: Map<number, ResponseCallback> = new Map();
|
||||
|
||||
@@ -26,7 +26,7 @@ interface WsStateAwaiting {
|
||||
method: string;
|
||||
params: unknown[];
|
||||
start: number;
|
||||
subscription?: SubscriptionHandler;
|
||||
subscription?: SubscriptionHandler | undefined;
|
||||
}
|
||||
|
||||
interface WsStateSubscription extends SubscriptionHandler {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"bin": {
|
||||
"polkadot-types-chain-info": "./scripts/polkadot-types-chain-info.mjs",
|
||||
@@ -28,15 +28,15 @@
|
||||
"polkadot-types-internal-metadata": "./scripts/polkadot-types-internal-metadata.mjs"
|
||||
},
|
||||
"dependencies": {
|
||||
"@polkadot/api": "10.3.2",
|
||||
"@polkadot/api-augment": "10.3.2",
|
||||
"@polkadot/rpc-augment": "10.3.2",
|
||||
"@polkadot/rpc-provider": "10.3.2",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-augment": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-create": "10.3.2",
|
||||
"@polkadot/types-support": "10.3.2",
|
||||
"@polkadot/api": "10.3.3",
|
||||
"@polkadot/api-augment": "10.3.3",
|
||||
"@polkadot/rpc-augment": "10.3.3",
|
||||
"@polkadot/rpc-provider": "10.3.3",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-augment": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/types-create": "10.3.3",
|
||||
"@polkadot/types-support": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"@polkadot/x-ws": "^11.1.3",
|
||||
|
||||
@@ -12,7 +12,7 @@ import type { ExtraTypes } from './types.js';
|
||||
import Handlebars from 'handlebars';
|
||||
|
||||
import * as defaultDefs from '@polkadot/types/interfaces/definitions';
|
||||
import { unwrapStorageSi } from '@polkadot/types/primitive/StorageKey';
|
||||
import { unwrapStorageSi } from '@polkadot/types/util';
|
||||
import lookupDefinitions from '@polkadot/types-augment/lookup/definitions';
|
||||
import { stringCamelCase } from '@polkadot/util';
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ import { Metadata, TypeRegistry, Vec } from '@polkadot/types';
|
||||
import * as definitions from '@polkadot/types/interfaces/definitions';
|
||||
import { getStorage as getSubstrateStorage } from '@polkadot/types/metadata/decorate/storage/getStorage';
|
||||
import { Text } from '@polkadot/types/primitive';
|
||||
import { unwrapStorageType } from '@polkadot/types/primitive/StorageKey';
|
||||
import { unwrapStorageType } from '@polkadot/types/util';
|
||||
import kusamaMeta, { rpc as kusamaRpc, version as kusamaVer } from '@polkadot/types-support/metadata/static-kusama';
|
||||
import polkadotMeta, { rpc as polkadotRpc, version as polkadotVer } from '@polkadot/types-support/metadata/static-polkadot';
|
||||
import substrateMeta from '@polkadot/types-support/metadata/static-substrate';
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/typegen', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"tslib": "^2.5.0"
|
||||
}
|
||||
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
votes24: 'Vec<(Compact<u32>,[(Compact<u16>,Compact<PerU16>);23],Compact<u16>)>'
|
||||
},
|
||||
/**
|
||||
* Lookup364: polkadot_runtime_parachains::disputes::slashing::pallet::Call<T>
|
||||
* Lookup369: polkadot_runtime_parachains::disputes::slashing::pallet::Call<T>
|
||||
**/
|
||||
PolkadotRuntimeParachainsDisputesSlashingPalletCall: {
|
||||
_enum: {
|
||||
@@ -175,7 +175,7 @@ export default {
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup365: polkadot_runtime_parachains::disputes::slashing::DisputeProof
|
||||
* Lookup370: polkadot_runtime_parachains::disputes::slashing::DisputeProof
|
||||
**/
|
||||
PolkadotRuntimeParachainsDisputesSlashingDisputeProof: {
|
||||
timeSlot: 'PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot',
|
||||
@@ -184,22 +184,22 @@ export default {
|
||||
validatorId: 'PolkadotPrimitivesV4ValidatorAppPublic'
|
||||
},
|
||||
/**
|
||||
* Lookup366: polkadot_runtime_parachains::disputes::slashing::DisputesTimeSlot
|
||||
* Lookup371: polkadot_runtime_parachains::disputes::slashing::DisputesTimeSlot
|
||||
**/
|
||||
PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot: {
|
||||
sessionIndex: 'u32',
|
||||
candidateHash: 'H256'
|
||||
},
|
||||
/**
|
||||
* Lookup367: polkadot_runtime_parachains::disputes::slashing::SlashingOffenceKind
|
||||
* Lookup372: polkadot_runtime_parachains::disputes::slashing::SlashingOffenceKind
|
||||
**/
|
||||
PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind: {
|
||||
_enum: ['ForInvalid', 'AgainstValid']
|
||||
},
|
||||
/**
|
||||
* Lookup535: kusama_runtime::HoldReason
|
||||
* Lookup540: kusama_runtime::RuntimeHoldReason
|
||||
**/
|
||||
KusamaRuntimeHoldReason: {
|
||||
KusamaRuntimeRuntimeHoldReason: {
|
||||
_enum: {
|
||||
__Unused0: 'Null',
|
||||
__Unused1: 'Null',
|
||||
@@ -239,13 +239,13 @@ export default {
|
||||
__Unused35: 'Null',
|
||||
__Unused36: 'Null',
|
||||
__Unused37: 'Null',
|
||||
Nis: 'KusamaRuntimeHoldReasonNis'
|
||||
Nis: 'PalletNisHoldReason'
|
||||
}
|
||||
},
|
||||
/**
|
||||
* Lookup536: kusama_runtime::HoldReasonNis
|
||||
* Lookup541: pallet_nis::pallet::HoldReason
|
||||
**/
|
||||
KusamaRuntimeHoldReasonNis: {
|
||||
PalletNisHoldReason: {
|
||||
_enum: ['NftReceipt']
|
||||
},
|
||||
/**
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -5656,6 +5656,8 @@ export default {
|
||||
hashBlake2128PerByte: 'SpWeightsWeightV2Weight',
|
||||
ecdsaRecover: 'SpWeightsWeightV2Weight',
|
||||
ecdsaToEthAddress: 'SpWeightsWeightV2Weight',
|
||||
sr25519Verify: 'SpWeightsWeightV2Weight',
|
||||
sr25519VerifyPerByte: 'SpWeightsWeightV2Weight',
|
||||
reentranceCount: 'SpWeightsWeightV2Weight',
|
||||
accountReentranceCount: 'SpWeightsWeightV2Weight',
|
||||
instantiationNonce: 'SpWeightsWeightV2Weight'
|
||||
|
||||
@@ -108,7 +108,7 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly votes24: Vec<ITuple<[Compact<u32>, Vec<ITuple<[Compact<u16>, Compact<PerU16>]>>, Compact<u16>]>>;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (364) */
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingPalletCall (369) */
|
||||
interface PolkadotRuntimeParachainsDisputesSlashingPalletCall extends Enum {
|
||||
readonly isReportDisputeLostUnsigned: boolean;
|
||||
readonly asReportDisputeLostUnsigned: {
|
||||
@@ -118,7 +118,7 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly type: 'ReportDisputeLostUnsigned';
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingDisputeProof (365) */
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingDisputeProof (370) */
|
||||
interface PolkadotRuntimeParachainsDisputesSlashingDisputeProof extends Struct {
|
||||
readonly timeSlot: PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot;
|
||||
readonly kind: PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind;
|
||||
@@ -126,28 +126,28 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly validatorId: PolkadotPrimitivesV4ValidatorAppPublic;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot (366) */
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot (371) */
|
||||
interface PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot extends Struct {
|
||||
readonly sessionIndex: u32;
|
||||
readonly candidateHash: H256;
|
||||
}
|
||||
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind (367) */
|
||||
/** @name PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind (372) */
|
||||
interface PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind extends Enum {
|
||||
readonly isForInvalid: boolean;
|
||||
readonly isAgainstValid: boolean;
|
||||
readonly type: 'ForInvalid' | 'AgainstValid';
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeHoldReason (535) */
|
||||
interface KusamaRuntimeHoldReason extends Enum {
|
||||
/** @name KusamaRuntimeRuntimeHoldReason (540) */
|
||||
interface KusamaRuntimeRuntimeHoldReason extends Enum {
|
||||
readonly isNis: boolean;
|
||||
readonly asNis: KusamaRuntimeHoldReasonNis;
|
||||
readonly asNis: PalletNisHoldReason;
|
||||
readonly type: 'Nis';
|
||||
}
|
||||
|
||||
/** @name KusamaRuntimeHoldReasonNis (536) */
|
||||
interface KusamaRuntimeHoldReasonNis extends Enum {
|
||||
/** @name PalletNisHoldReason (541) */
|
||||
interface PalletNisHoldReason extends Enum {
|
||||
readonly isNftReceipt: boolean;
|
||||
readonly type: 'NftReceipt';
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6113,6 +6113,8 @@ declare module '@polkadot/types/lookup' {
|
||||
readonly hashBlake2128PerByte: SpWeightsWeightV2Weight;
|
||||
readonly ecdsaRecover: SpWeightsWeightV2Weight;
|
||||
readonly ecdsaToEthAddress: SpWeightsWeightV2Weight;
|
||||
readonly sr25519Verify: SpWeightsWeightV2Weight;
|
||||
readonly sr25519VerifyPerByte: SpWeightsWeightV2Weight;
|
||||
readonly reentranceCount: SpWeightsWeightV2Weight;
|
||||
readonly accountReentranceCount: SpWeightsWeightV2Weight;
|
||||
readonly instantiationNonce: SpWeightsWeightV2Weight;
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-augment', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -34,6 +34,7 @@ import type { CreatedBlock, ImportedAux } from '@polkadot/types/interfaces/engin
|
||||
import type { BlockV0, BlockV1, BlockV2, EIP1559Transaction, EIP2930Transaction, EthAccessList, EthAccessListItem, EthAccount, EthAddress, EthBlock, EthBloom, EthCallRequest, EthFeeHistory, EthFilter, EthFilterAddress, EthFilterChanges, EthFilterTopic, EthFilterTopicEntry, EthFilterTopicInner, EthHeader, EthLog, EthReceipt, EthReceiptV0, EthReceiptV3, EthRichBlock, EthRichHeader, EthStorageProof, EthSubKind, EthSubParams, EthSubResult, EthSyncInfo, EthSyncStatus, EthTransaction, EthTransactionAction, EthTransactionCondition, EthTransactionRequest, EthTransactionSignature, EthTransactionStatus, EthWork, EthereumAccountId, EthereumAddress, EthereumLookupSource, EthereumSignature, LegacyTransaction, TransactionV0, TransactionV1, TransactionV2 } from '@polkadot/types/interfaces/eth';
|
||||
import type { EvmAccount, EvmCallInfo, EvmCreateInfo, EvmLog, EvmVicinity, ExitError, ExitFatal, ExitReason, ExitRevert, ExitSucceed } from '@polkadot/types/interfaces/evm';
|
||||
import type { AnySignature, EcdsaSignature, Ed25519Signature, Era, Extrinsic, ExtrinsicEra, ExtrinsicPayload, ExtrinsicPayloadUnknown, ExtrinsicPayloadV4, ExtrinsicSignature, ExtrinsicSignatureV4, ExtrinsicUnknown, ExtrinsicV4, ImmortalEra, MortalEra, MultiSignature, Signature, SignerPayload, Sr25519Signature } from '@polkadot/types/interfaces/extrinsics';
|
||||
import type { FungiblesAccessError } from '@polkadot/types/interfaces/fungibles';
|
||||
import type { AssetOptions, Owner, PermissionLatest, PermissionVersions, PermissionsV1 } from '@polkadot/types/interfaces/genericAsset';
|
||||
import type { ActiveGilt, ActiveGiltsTotal, ActiveIndex, GiltBid } from '@polkadot/types/interfaces/gilt';
|
||||
import type { AuthorityIndex, AuthorityList, AuthoritySet, AuthoritySetChange, AuthoritySetChanges, AuthorityWeight, DelayKind, DelayKindBest, EncodedFinalityProofs, ForkTreePendingChange, ForkTreePendingChangeNode, GrandpaCommit, GrandpaEquivocation, GrandpaEquivocationProof, GrandpaEquivocationValue, GrandpaJustification, GrandpaPrecommit, GrandpaPrevote, GrandpaSignedPrecommit, JustificationNotification, KeyOwnerProof, NextAuthority, PendingChange, PendingPause, PendingResume, Precommits, Prevotes, ReportedRoundStates, RoundState, SetId, StoredPendingChange, StoredState } from '@polkadot/types/interfaces/grandpa';
|
||||
@@ -504,6 +505,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
FungibilityV0: FungibilityV0;
|
||||
FungibilityV1: FungibilityV1;
|
||||
FungibilityV2: FungibilityV2;
|
||||
FungiblesAccessError: FungiblesAccessError;
|
||||
Gas: Gas;
|
||||
GiltBid: GiltBid;
|
||||
GlobalValidationData: GlobalValidationData;
|
||||
|
||||
@@ -5,18 +5,18 @@
|
||||
// this is required to allow for ambient/previous definitions
|
||||
import '@polkadot/types/types/registry';
|
||||
|
||||
import type { KusamaRuntimeGovernanceOriginsPalletCustomOriginsOrigin, KusamaRuntimeHoldReason, KusamaRuntimeHoldReasonNis, KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeSessionKeys, PolkadotRuntimeParachainsDisputesSlashingDisputeProof, PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot, PolkadotRuntimeParachainsDisputesSlashingPalletCall, PolkadotRuntimeParachainsDisputesSlashingPalletError, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind } from '@polkadot/types/lookup';
|
||||
import type { KusamaRuntimeGovernanceOriginsPalletCustomOriginsOrigin, KusamaRuntimeNposCompactSolution24, KusamaRuntimeOriginCaller, KusamaRuntimeProxyType, KusamaRuntimeRuntime, KusamaRuntimeRuntimeHoldReason, KusamaRuntimeSessionKeys, PalletNisHoldReason, PolkadotRuntimeParachainsDisputesSlashingDisputeProof, PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot, PolkadotRuntimeParachainsDisputesSlashingPalletCall, PolkadotRuntimeParachainsDisputesSlashingPalletError, PolkadotRuntimeParachainsDisputesSlashingPendingSlashes, PolkadotRuntimeParachainsDisputesSlashingSlashingOffenceKind } from '@polkadot/types/lookup';
|
||||
|
||||
declare module '@polkadot/types/types/registry' {
|
||||
interface InterfaceTypes {
|
||||
KusamaRuntimeGovernanceOriginsPalletCustomOriginsOrigin: KusamaRuntimeGovernanceOriginsPalletCustomOriginsOrigin;
|
||||
KusamaRuntimeHoldReason: KusamaRuntimeHoldReason;
|
||||
KusamaRuntimeHoldReasonNis: KusamaRuntimeHoldReasonNis;
|
||||
KusamaRuntimeNposCompactSolution24: KusamaRuntimeNposCompactSolution24;
|
||||
KusamaRuntimeOriginCaller: KusamaRuntimeOriginCaller;
|
||||
KusamaRuntimeProxyType: KusamaRuntimeProxyType;
|
||||
KusamaRuntimeRuntime: KusamaRuntimeRuntime;
|
||||
KusamaRuntimeRuntimeHoldReason: KusamaRuntimeRuntimeHoldReason;
|
||||
KusamaRuntimeSessionKeys: KusamaRuntimeSessionKeys;
|
||||
PalletNisHoldReason: PalletNisHoldReason;
|
||||
PolkadotRuntimeParachainsDisputesSlashingDisputeProof: PolkadotRuntimeParachainsDisputesSlashingDisputeProof;
|
||||
PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot: PolkadotRuntimeParachainsDisputesSlashingDisputesTimeSlot;
|
||||
PolkadotRuntimeParachainsDisputesSlashingPalletCall: PolkadotRuntimeParachainsDisputesSlashingPalletCall;
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^11.1.3",
|
||||
@@ -26,9 +26,9 @@
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-augment": "10.3.2",
|
||||
"@polkadot/types-support": "10.3.2",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-augment": "10.3.3",
|
||||
"@polkadot/types-support": "10.3.3",
|
||||
"@polkadot/util-crypto": "^11.1.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@ import type { AnyJson, BareOpts, Codec, Inspect, IU8a, Registry } from '../types
|
||||
export abstract class AbstractBase<T extends Codec> implements Codec {
|
||||
readonly registry: Registry;
|
||||
|
||||
public createdAtHash?: IU8a;
|
||||
public initialU8aLength?: number;
|
||||
public createdAtHash?: IU8a | undefined;
|
||||
public initialU8aLength?: number | undefined;
|
||||
public isStorageFallback?: boolean;
|
||||
|
||||
readonly #raw: T;
|
||||
|
||||
@@ -12,7 +12,7 @@ export abstract class AbstractObject<T extends ToString> implements CodecObject<
|
||||
readonly registry: Registry;
|
||||
|
||||
public createdAtHash?: IU8a;
|
||||
public initialU8aLength?: number;
|
||||
public initialU8aLength?: number | undefined;
|
||||
public isStorageFallback?: boolean;
|
||||
|
||||
readonly $: T;
|
||||
|
||||
@@ -3,17 +3,12 @@
|
||||
|
||||
import type { BN } from '@polkadot/util';
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { AnyJson, AnyNumber, CodecClass, ICompact, Inspect, INumber, IU8a, Registry } from '../types/index.js';
|
||||
import type { AnyJson, AnyNumber, CodecClass, DefinitionSetter, ICompact, Inspect, INumber, IU8a, Registry } from '../types/index.js';
|
||||
|
||||
import { compactFromU8a, compactFromU8aLim, compactToU8a, isU8a } from '@polkadot/util';
|
||||
|
||||
import { typeToConstructor } from '../utils/index.js';
|
||||
|
||||
interface Options<T> {
|
||||
definition?: CodecClass<T>;
|
||||
setDefinition?: (d: CodecClass<T>) => CodecClass<T>;
|
||||
}
|
||||
|
||||
function noopSetDefinition <T> (d: CodecClass<T>): CodecClass<T> {
|
||||
return d;
|
||||
}
|
||||
@@ -56,7 +51,7 @@ export class Compact<T extends INumber> implements ICompact<T> {
|
||||
readonly #Type: CodecClass<T>;
|
||||
readonly #raw: T;
|
||||
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, value: Compact<T> | AnyNumber = 0, { definition, setDefinition = noopSetDefinition }: Options<T> = {}) {
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, value: Compact<T> | AnyNumber = 0, { definition, setDefinition = noopSetDefinition }: DefinitionSetter<CodecClass<T>> = {}) {
|
||||
this.registry = registry;
|
||||
this.#Type = definition || setDefinition(typeToConstructor(registry, Type));
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { AnyJson, Codec, CodecClass, IEnum, Inspect, IU8a, Registry } from '../types/index.js';
|
||||
import type { AnyJson, Codec, CodecClass, DefinitionSetter, IEnum, Inspect, IU8a, Registry } from '../types/index.js';
|
||||
|
||||
import { isHex, isNumber, isObject, isString, isU8a, objectProperties, stringCamelCase, stringify, stringPascalCase, u8aConcatStrict, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -32,11 +32,6 @@ interface Decoded {
|
||||
value: Codec;
|
||||
}
|
||||
|
||||
interface Options {
|
||||
definition?: Definition;
|
||||
setDefinition?: (d: Definition) => Definition;
|
||||
}
|
||||
|
||||
function noopSetDefinition (d: Definition): Definition {
|
||||
return d;
|
||||
}
|
||||
@@ -196,7 +191,7 @@ export class Enum implements IEnum {
|
||||
readonly #isIndexed: boolean;
|
||||
readonly #raw: Codec;
|
||||
|
||||
constructor (registry: Registry, Types: Record<string, string | CodecClass> | Record<string, number> | string[], value?: unknown, index?: number, { definition, setDefinition = noopSetDefinition }: Options = {}) {
|
||||
constructor (registry: Registry, Types: Record<string, string | CodecClass> | Record<string, number> | string[], value?: unknown, index?: number, { definition, setDefinition = noopSetDefinition }: DefinitionSetter<Definition> = {}) {
|
||||
const { def, isBasic, isIndexed } = definition || setDefinition(extractDef(registry, Types));
|
||||
|
||||
// shortcut isU8a as used in SCALE decoding
|
||||
|
||||
@@ -2,18 +2,13 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { AnyJson, Codec, CodecClass, Inspect, IOption, IU8a, Registry } from '../types/index.js';
|
||||
import type { AnyJson, Codec, CodecClass, DefinitionSetter, Inspect, IOption, IU8a, Registry } from '../types/index.js';
|
||||
|
||||
import { isCodec, isNull, isU8a, isUndefined, u8aToHex } from '@polkadot/util';
|
||||
|
||||
import { typeToConstructor } from '../utils/index.js';
|
||||
import { Null } from './Null.js';
|
||||
|
||||
interface Options<T> {
|
||||
definition?: CodecClass<T>;
|
||||
setDefinition?: (d: CodecClass<T>) => CodecClass<T>;
|
||||
}
|
||||
|
||||
function noopSetDefinition <T extends Codec> (d: CodecClass<T>): CodecClass<T> {
|
||||
return d;
|
||||
}
|
||||
@@ -75,7 +70,7 @@ export class Option<T extends Codec> implements IOption<T> {
|
||||
readonly #Type: CodecClass<T>;
|
||||
readonly #raw: T;
|
||||
|
||||
constructor (registry: Registry, typeName: CodecClass<T> | string, value?: unknown, { definition, setDefinition = noopSetDefinition }: Options<T> = {}) {
|
||||
constructor (registry: Registry, typeName: CodecClass<T> | string, value?: unknown, { definition, setDefinition = noopSetDefinition }: DefinitionSetter<CodecClass<T>> = {}) {
|
||||
const Type = definition || setDefinition(typeToConstructor(registry, typeName));
|
||||
const decoded = isU8a(value) && value.length && !isCodec(value)
|
||||
? value[0] === 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// Copyright 2017-2023 @polkadot/types-codec authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { AnyTupleValue, Codec, CodecClass, Inspect, ITuple, Registry } from '../types/index.js';
|
||||
import type { AnyTupleValue, Codec, CodecClass, DefinitionSetter, Inspect, ITuple, Registry } from '../types/index.js';
|
||||
|
||||
import { isFunction, isHex, isString, isU8a, stringify, u8aConcatStrict, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -16,11 +16,6 @@ type TupleTypes = TupleType[] | {
|
||||
|
||||
type Definition = [CodecClass[], string[]];
|
||||
|
||||
interface Options {
|
||||
definition?: Definition;
|
||||
setDefinition?: (d: Definition) => Definition;
|
||||
}
|
||||
|
||||
function noopSetDefinition (d: Definition): Definition {
|
||||
return d;
|
||||
}
|
||||
@@ -67,7 +62,7 @@ function decodeTuple (registry: Registry, result: Codec[], value: Exclude<AnyTup
|
||||
export class Tuple extends AbstractArray<Codec> implements ITuple<Codec[]> {
|
||||
#Types: Definition;
|
||||
|
||||
constructor (registry: Registry, Types: TupleTypes | TupleType, value?: AnyTupleValue, { definition, setDefinition = noopSetDefinition }: Options = {}) {
|
||||
constructor (registry: Registry, Types: TupleTypes | TupleType, value?: AnyTupleValue, { definition, setDefinition = noopSetDefinition }: DefinitionSetter<Definition> = {}) {
|
||||
const Classes = definition || setDefinition(
|
||||
Array.isArray(Types)
|
||||
? [Types.map((t) => typeToConstructor(registry, t)), []]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { Codec, CodecClass, Registry } from '../types/index.js';
|
||||
import type { Codec, CodecClass, DefinitionSetter, Registry } from '../types/index.js';
|
||||
|
||||
import { compactFromU8aLim, isHex, isU8a, logger, stringify, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -13,11 +13,6 @@ const MAX_LENGTH = 64 * 1024;
|
||||
|
||||
const l = logger('Vec');
|
||||
|
||||
interface Options<T> {
|
||||
definition?: CodecClass<T>;
|
||||
setDefinition?: (d: CodecClass<T>) => CodecClass<T>;
|
||||
}
|
||||
|
||||
function noopSetDefinition <T extends Codec> (d: CodecClass<T>): CodecClass<T> {
|
||||
return d;
|
||||
}
|
||||
@@ -80,7 +75,7 @@ export function decodeVec<T extends Codec> (registry: Registry, result: T[], val
|
||||
export class Vec<T extends Codec> extends AbstractArray<T> {
|
||||
#Type: CodecClass<T>;
|
||||
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, value: Uint8Array | HexString | unknown[] = [], { definition, setDefinition = noopSetDefinition }: Options<T> = {}) {
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, value: Uint8Array | HexString | unknown[] = [], { definition, setDefinition = noopSetDefinition }: DefinitionSetter<CodecClass<T>> = {}) {
|
||||
const [decodeFrom, length, startAt] = decodeVecLength(value);
|
||||
|
||||
super(registry, length);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { Codec, CodecClass, Inspect, Registry } from '../types/index.js';
|
||||
import type { Codec, CodecClass, DefinitionSetter, Inspect, Registry } from '../types/index.js';
|
||||
|
||||
import { isU8a, u8aConcatStrict } from '@polkadot/util';
|
||||
|
||||
@@ -10,11 +10,6 @@ import { AbstractArray } from '../abstract/Array.js';
|
||||
import { decodeU8aVec, typeToConstructor } from '../utils/index.js';
|
||||
import { decodeVec } from './Vec.js';
|
||||
|
||||
interface Options<T> {
|
||||
definition?: CodecClass<T>;
|
||||
setDefinition?: (d: CodecClass<T>) => CodecClass<T>;
|
||||
}
|
||||
|
||||
function noopSetDefinition <T extends Codec> (d: CodecClass<T>): CodecClass<T> {
|
||||
return d;
|
||||
}
|
||||
@@ -27,7 +22,7 @@ function noopSetDefinition <T extends Codec> (d: CodecClass<T>): CodecClass<T> {
|
||||
export class VecFixed<T extends Codec> extends AbstractArray<T> {
|
||||
#Type: CodecClass<T>;
|
||||
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, length: number, value: Uint8Array | HexString | unknown[] = [] as unknown[], { definition, setDefinition = noopSetDefinition }: Options<T> = {}) {
|
||||
constructor (registry: Registry, Type: CodecClass<T> | string, length: number, value: Uint8Array | HexString | unknown[] = [] as unknown[], { definition, setDefinition = noopSetDefinition }: DefinitionSetter<CodecClass<T>> = {}) {
|
||||
super(registry, length);
|
||||
|
||||
this.#Type = definition || setDefinition(typeToConstructor<T>(registry, Type));
|
||||
|
||||
@@ -18,8 +18,8 @@ import { isAscii, isUndefined, isUtf8, u8aToHex, u8aToString, u8aToU8a } from '@
|
||||
export class Raw extends Uint8Array implements IU8a {
|
||||
readonly registry: Registry;
|
||||
|
||||
public createdAtHash?: IU8a;
|
||||
public initialU8aLength?: number;
|
||||
public createdAtHash?: IU8a | undefined;
|
||||
public initialU8aLength?: number | undefined;
|
||||
public isStorageFallback?: boolean;
|
||||
|
||||
/**
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { HexString } from '@polkadot/util/types';
|
||||
import type { AnyJson, BareOpts, Codec, CodecClass, Inspect, IStruct, IU8a, Registry } from '../types/index.js';
|
||||
import type { AnyJson, BareOpts, Codec, CodecClass, DefinitionSetter, Inspect, IStruct, IU8a, Registry } from '../types/index.js';
|
||||
|
||||
import { isBoolean, isHex, isObject, isU8a, isUndefined, objectProperties, stringCamelCase, stringify, u8aConcatStrict, u8aToHex, u8aToU8a } from '@polkadot/util';
|
||||
|
||||
@@ -12,11 +12,6 @@ type TypesDef<T = Codec> = Record<string, string | CodecClass<T>>;
|
||||
|
||||
type Definition = [CodecClass[], string[]];
|
||||
|
||||
interface Options {
|
||||
definition?: Definition;
|
||||
setDefinition?: (d: Definition) => Definition;
|
||||
}
|
||||
|
||||
function noopSetDefinition (d: Definition): Definition {
|
||||
return d;
|
||||
}
|
||||
@@ -105,14 +100,14 @@ export class Struct<
|
||||
E extends { [K in keyof S]: string } = { [K in keyof S]: string }> extends Map<keyof S, Codec> implements IStruct<keyof S> {
|
||||
readonly registry: Registry;
|
||||
|
||||
public createdAtHash?: IU8a;
|
||||
public createdAtHash?: IU8a | undefined;
|
||||
public initialU8aLength?: number;
|
||||
public isStorageFallback?: boolean;
|
||||
|
||||
readonly #jsonMap: Map<keyof S, string>;
|
||||
readonly #Types: Definition;
|
||||
|
||||
constructor (registry: Registry, Types: S, value?: V | Map<unknown, unknown> | unknown[] | HexString | null, jsonMap = new Map<string, string>(), { definition, setDefinition = noopSetDefinition }: Options = {}) {
|
||||
constructor (registry: Registry, Types: S, value?: V | Map<unknown, unknown> | unknown[] | HexString | null, jsonMap = new Map<string, string>(), { definition, setDefinition = noopSetDefinition }: DefinitionSetter<Definition> = {}) {
|
||||
const typeMap = definition || setDefinition(mapToTypeMap(registry, Types));
|
||||
const [decoded, decodedLength] = isU8a(value) || isHex(value)
|
||||
? decodeU8aStruct(registry, new Array<[string, Codec]>(typeMap[0].length), u8aToU8a(value), typeMap)
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-codec', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -9,7 +9,7 @@ import type { Registry } from './registry.js';
|
||||
export type BareOpts = boolean | Record<string, boolean>;
|
||||
|
||||
export interface Inspect {
|
||||
inner?: Inspect[];
|
||||
inner?: Inspect[] | undefined;
|
||||
name?: string;
|
||||
outer?: Uint8Array[];
|
||||
}
|
||||
@@ -28,14 +28,14 @@ export interface Codec {
|
||||
* The block at which this value was retrieved/created (set to non-empty when
|
||||
* retrieved from storage)
|
||||
*/
|
||||
createdAtHash?: IU8a;
|
||||
createdAtHash?: IU8a | undefined;
|
||||
|
||||
/**
|
||||
* @description
|
||||
* The length of the initial encoded value (Only available when the value was
|
||||
* constructed from a Uint8Array input)
|
||||
*/
|
||||
initialU8aLength?: number;
|
||||
initialU8aLength?: number | undefined;
|
||||
|
||||
/**
|
||||
* @description
|
||||
|
||||
@@ -42,4 +42,9 @@ export interface ToBn {
|
||||
toBn: () => BN;
|
||||
}
|
||||
|
||||
export interface DefinitionSetter <T> {
|
||||
definition?: T | undefined;
|
||||
setDefinition?: (d: T) => T;
|
||||
}
|
||||
|
||||
export type LookupString = `Lookup${number}`;
|
||||
|
||||
@@ -31,7 +31,7 @@ export type RegistryTypes =
|
||||
{ _set: Record<string, number> }>;
|
||||
|
||||
export interface CodecCreateOptions {
|
||||
blockHash?: Uint8Array | string | null;
|
||||
blockHash?: Uint8Array | string | null | undefined;
|
||||
isFallback?: boolean;
|
||||
isOptional?: boolean;
|
||||
isPedantic?: boolean;
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/types": "10.3.2"
|
||||
"@polkadot/types": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-create', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -28,20 +28,20 @@ export enum TypeDefInfo {
|
||||
}
|
||||
|
||||
export interface TypeDef {
|
||||
alias?: Map<string, string>;
|
||||
displayName?: string;
|
||||
docs?: string[];
|
||||
fallbackType?: string;
|
||||
alias?: Map<string, string> | undefined;
|
||||
displayName?: string | undefined;
|
||||
docs?: string[] | undefined;
|
||||
fallbackType?: string | undefined;
|
||||
info: TypeDefInfo;
|
||||
index?: number;
|
||||
isFromSi?: boolean;
|
||||
length?: number;
|
||||
lookupIndex?: number;
|
||||
lookupName?: string;
|
||||
lookupNameRoot?: string;
|
||||
name?: string;
|
||||
namespace?: string;
|
||||
lookupName?: string | undefined;
|
||||
lookupNameRoot?: string | undefined;
|
||||
name?: string | undefined;
|
||||
namespace?: string | undefined;
|
||||
sub?: TypeDef | TypeDef[];
|
||||
type: string;
|
||||
typeName?: string;
|
||||
typeName?: string | undefined;
|
||||
}
|
||||
|
||||
@@ -18,17 +18,17 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/networks": "^11.1.3",
|
||||
"@polkadot/types": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-create": "10.3.2",
|
||||
"@polkadot/types": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/types-create": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"tslib": "^2.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/api": "10.3.2"
|
||||
"@polkadot/api": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-known', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/util": "^11.1.3",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -236,7 +236,7 @@
|
||||
{
|
||||
"name": "BlockWeights",
|
||||
"type": 419,
|
||||
"value": "0x829a6962000b00204aa9d10113ffffffffffffffff02955a1a00010bc02273a72e011366666666666666a6010b0098f73e5d0113ffffffffffffffbf01000002955a1a00010bc0aac511a3011366666666666666e6010b00204aa9d10113ffffffffffffffff01070088526a7413000000000000004002955a1a00000000",
|
||||
"value": "0x0203815d000b00204aa9d10113ffffffffffffffffc2e9171b00010b90cd43a72e011366666666666666a6010b0098f73e5d0113ffffffffffffffbf010000c2e9171b00010b90559611a3011366666666666666e6010b00204aa9d10113ffffffffffffffff01070088526a74130000000000000040c2e9171b00000000",
|
||||
"docs": [
|
||||
" Block & extrinsics weights: base values and limits."
|
||||
]
|
||||
@@ -1218,7 +1218,7 @@
|
||||
{
|
||||
"name": "SignedMaxWeight",
|
||||
"type": 9,
|
||||
"value": "0x0b20bcd88e2e011366666666666666a6",
|
||||
"value": "0x0bd08ce38f2e011366666666666666a6",
|
||||
"docs": [
|
||||
" Maximum weight of a signed solution.",
|
||||
"",
|
||||
@@ -1305,7 +1305,7 @@
|
||||
{
|
||||
"name": "MinerMaxWeight",
|
||||
"type": 9,
|
||||
"value": "0x0b20bcd88e2e011366666666666666a6",
|
||||
"value": "0x0bd08ce38f2e011366666666666666a6",
|
||||
"docs": []
|
||||
},
|
||||
{
|
||||
@@ -3290,7 +3290,7 @@
|
||||
{
|
||||
"name": "Schedule",
|
||||
"type": 546,
|
||||
"value": "0x0400000000010000000400008000000010000000001000000001000020000000004000000400000000000000dc050000120d0000b50b00007f070000c418000021060000ee0d0000ca1300009d0300002c3a00004b4d0000e1040000ed03000045080000d0030000491a0000931c0000ef090000f47acb0014040000ff020000f202000098020000c103000041030000e90200008705000025060000de050000ca0500002305000065060000ea050000320600009a050000e505000079040000b8060000c7040000721c00007d170000d81c0000f0170000940400000f0500008f050000a10400006e06000059050000db0500003f050000fa8814007816dbc2066d393addf206bd397e4319007872d109003cce15140078c2d8130078ce0d5a00784e291500783a0a140078fae11300788ee2130078cacd4f00f09a13080000deec1000783509008ab1be008503c5020066d2c9fe81f83ad46e00f04a37d800c802fc611e41295d0900d6880e008cc10b00ee48411f9504610900410204e258d64661b4ba98371f8504090204667c160785048d0204eac92407a5049109047ab9461fa504210b04aa829626312af2ac186e6d61364b3d55e56256cc8643495d6509009204caedee030100620a653911384d1200091500fe522300a05d3d0026c12d00a07931004e2c1a00a0510e00d6af1900a0710e003acbff080506429b390249037ae609003c6efc0f0021038ec9080048",
|
||||
"value": "0x0400000000010000000400008000000010000000001000000001000020000000004000000400000000000000bc050000490d0000050c0000f1070000e1170000350600007f090000be1200002a0000006f3e0000594f0000db040000d40300005d0800008b030000f31a0000bf1c0000e7080000bb20c900760300001e0300001d030000d40200009603000068030000fe02000012060000fc0500001d0600001c060000a10500008a060000220600007a0600000606000026060000a50500009f06000049050000111d000044180000c81e0000c0180000dc04000040050000c0050000a2050000aa060000a805000032060000a705000026bf140018163cc1066d2ab210f2067d2a0e05190018fe1e0a000c0e481400180e13140018fe79580018de2214001856d1130018a206150018ae08140018d6a45100289e270800009a501000182d0900f6c86900b4c502004a96e7fc9579861c6c00282ad1d300282e72511e31271d0900360e0e001c6d0b000eec3b1f95046906006c04c2bfad464930c2bf321f85042901047ac6130785048d0104d6e12307a504350b0422cf451fa5046d0a04eac62e266127feb6886db12ad6f0ca54312892f3e24389503d0900b6f65fec55516a1347392929e511008d140022ee220020d13c00deca2c0020dd30007e3a190020310e0006091900203d0e00c209c2083501a2a93002a8f2dc540bc101554904aec109000c96de0f00a03a7208000c",
|
||||
"docs": [
|
||||
" Cost schedule and limits."
|
||||
]
|
||||
|
||||
@@ -41859,6 +41859,18 @@
|
||||
"typeName": "Weight",
|
||||
"docs": []
|
||||
},
|
||||
{
|
||||
"name": "sr25519_verify",
|
||||
"type": 9,
|
||||
"typeName": "Weight",
|
||||
"docs": []
|
||||
},
|
||||
{
|
||||
"name": "sr25519_verify_per_byte",
|
||||
"type": 9,
|
||||
"typeName": "Weight",
|
||||
"docs": []
|
||||
},
|
||||
{
|
||||
"name": "reentrance_count",
|
||||
"type": 9,
|
||||
|
||||
@@ -3,4 +3,4 @@
|
||||
|
||||
// Do not edit, auto-generated by @polkadot/dev
|
||||
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '10.3.2' };
|
||||
export const packageInfo = { name: '@polkadot/types-support', path: 'auto', type: 'auto', version: '10.3.3' };
|
||||
|
||||
@@ -18,13 +18,13 @@
|
||||
"./detectPackage.cjs"
|
||||
],
|
||||
"type": "module",
|
||||
"version": "10.3.2",
|
||||
"version": "10.3.3",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"@polkadot/keyring": "^11.1.3",
|
||||
"@polkadot/types-augment": "10.3.2",
|
||||
"@polkadot/types-codec": "10.3.2",
|
||||
"@polkadot/types-create": "10.3.2",
|
||||
"@polkadot/types-augment": "10.3.3",
|
||||
"@polkadot/types-codec": "10.3.3",
|
||||
"@polkadot/types-create": "10.3.3",
|
||||
"@polkadot/util": "^11.1.3",
|
||||
"@polkadot/util-crypto": "^11.1.3",
|
||||
"rxjs": "^7.8.0",
|
||||
@@ -32,6 +32,6 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@polkadot/keyring": "^11.1.3",
|
||||
"@polkadot/types-support": "10.3.2"
|
||||
"@polkadot/types-support": "10.3.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@ export * from './metadata/index.js';
|
||||
export { TypeDefInfo } from '@polkadot/types-create';
|
||||
|
||||
export { convertSiV0toV1 } from './metadata/PortableRegistry/index.js';
|
||||
export { unwrapStorageType } from './util/index.js';
|
||||
export { packageInfo } from './packageInfo.js';
|
||||
export { unwrapStorageType } from './primitive/StorageKey.js';
|
||||
|
||||
export { typeDefinitions, rpcDefinitions };
|
||||
|
||||
@@ -177,7 +177,7 @@ export class TypeRegistry implements Registry {
|
||||
#metadataVersion = 0;
|
||||
#signedExtensions: string[] = fallbackExtensions;
|
||||
#unknownTypes = new Map<string, boolean>();
|
||||
#userExtensions?: ExtDef;
|
||||
#userExtensions?: ExtDef | undefined;
|
||||
|
||||
readonly #knownDefaults: Record<string, CodecClass>;
|
||||
readonly #knownDefinitions: Record<string, Definitions>;
|
||||
|
||||
@@ -234,7 +234,7 @@ abstract class ExtrinsicBase<A extends AnyTuple> extends AbstractBase<ExtrinsicV
|
||||
* - left as is, to create an inherent
|
||||
*/
|
||||
export class GenericExtrinsic<A extends AnyTuple = AnyTuple> extends ExtrinsicBase<A> implements IExtrinsic<A> {
|
||||
#hashCache?: CodecHash;
|
||||
#hashCache?: CodecHash | undefined;
|
||||
|
||||
static LATEST_EXTRINSIC_VERSION = LATEST_EXTRINSIC_VERSION;
|
||||
|
||||
|
||||
@@ -125,9 +125,12 @@ describe('runtime definitions', (): void => {
|
||||
|
||||
for (const [key, { params, type }] of methodsEntries) {
|
||||
describe(key, (): void => {
|
||||
it(`output ${type} is known`, (): void => {
|
||||
expect(() => inspectType(type)).not.toThrow();
|
||||
});
|
||||
// Applied from runtime, used in Funglibles
|
||||
if (type !== 'Result<Vec<XcmV3MultiAsset>, FungiblesAccessError>') {
|
||||
it(`output ${type} is known`, (): void => {
|
||||
expect(() => inspectType(type)).not.toThrow();
|
||||
});
|
||||
}
|
||||
|
||||
if (params.length) {
|
||||
describe('params', (): void => {
|
||||
|
||||
@@ -22,6 +22,7 @@ export { default as elections } from './elections/definitions.js';
|
||||
export { default as engine } from './engine/definitions.js';
|
||||
export { default as evm } from './evm/definitions.js';
|
||||
export { default as extrinsics } from './extrinsics/definitions.js';
|
||||
export { default as fungibles } from './fungibles/definitions.js';
|
||||
export { default as genericAsset } from './genericAsset/definitions.js';
|
||||
export { default as gilt } from './gilt/definitions.js';
|
||||
export { default as grandpa } from './grandpa/definitions.js';
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// order important in structs... :)
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { Definitions } from '../../types/index.js';
|
||||
|
||||
import { runtime } from './runtime.js';
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
runtime,
|
||||
types: {
|
||||
FungiblesAccessError: {
|
||||
_enum: ['AssetIdConversionFailed', 'AmountToBalanceConversionFailed']
|
||||
}
|
||||
}
|
||||
} as Definitions;
|
||||
@@ -0,0 +1,4 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
export * from './types.js';
|
||||
@@ -0,0 +1,24 @@
|
||||
// Copyright 2017-2023 @polkadot/types authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import type { DefinitionsCall } from '../../types/index.js';
|
||||
|
||||
export const runtime: DefinitionsCall = {
|
||||
FungiblesApi: [
|
||||
{
|
||||
methods: {
|
||||
query_account_balances: {
|
||||
description: 'Returns the list of all `MultiAsset` that an `AccountId` has',
|
||||
params: [
|
||||
{
|
||||
name: 'account',
|
||||
type: 'AccountId'
|
||||
}
|
||||
],
|
||||
type: 'Result<Vec<XcmV3MultiAsset>, FungiblesAccessError>'
|
||||
}
|
||||
},
|
||||
version: 1
|
||||
}
|
||||
]
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
|
||||
/* eslint-disable */
|
||||
|
||||
import type { Enum } from '@polkadot/types-codec';
|
||||
|
||||
/** @name FungiblesAccessError */
|
||||
export interface FungiblesAccessError extends Enum {
|
||||
readonly isAssetIdConversionFailed: boolean;
|
||||
readonly isAmountToBalanceConversionFailed: boolean;
|
||||
readonly type: 'AssetIdConversionFailed' | 'AmountToBalanceConversionFailed';
|
||||
}
|
||||
|
||||
export type PHANTOM_FUNGIBLES = 'fungibles';
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user