Compare commits

...
21 Commits
Author SHA1 Message Date
Github Actions 282b39d27a [CI Skip] release/stable 4.6.1
skip-checks: true
2021-04-19 06:07:35 +00:00
Jaco f21e3d317a 4.6.1 (#3407) 2021-04-19 07:56:46 +02:00
Github Actions c2af7cf8f2 [CI Skip] release/beta 4.5.2-8
skip-checks: true
2021-04-18 09:29:51 +00:00
Jaco 0958a4c693 Bump common (#3405)
* Bump common

* Bumps
2021-04-18 11:19:47 +02:00
Github Actions c687181130 [CI Skip] release/beta 4.5.2-7
skip-checks: true
2021-04-16 16:03:07 +00:00
Jaco 685f1ec0b6 Update .123trigger 2021-04-16 17:53:22 +02:00
Jaco e0069b6f7d statemint known-types (#3404) 2021-04-16 17:39:21 +02:00
Github Actions cf48762ff2 [CI Skip] release/beta 4.5.2-6
skip-checks: true
2021-04-15 12:27:19 +00:00
Jaco 31a7545a19 Bump common (#3403) 2021-04-15 14:18:06 +02:00
Github Actions 5cd8e8fb97 [CI Skip] release/beta 4.5.2-5
skip-checks: true
2021-04-14 07:15:18 +00:00
Jaco 96e4090174 Simplify/harden session derives (#3401) 2021-04-14 09:05:35 +02:00
Github Actions 0bbebab90b [CI Skip] release/beta 4.5.2-4
skip-checks: true
2021-04-14 06:26:22 +00:00
Jaco 57dac0ef47 Assert keypair validity in signing operations (#3400) 2021-04-14 08:17:10 +02:00
Github Actions 6c3d24551b [CI Skip] release/beta 4.5.2-3
skip-checks: true
2021-04-13 18:44:11 +00:00
Jaco e7dc6d7a5a Expose internalError on submittables (#3399) 2021-04-13 20:33:59 +02:00
Github Actions a63b7f611e [CI Skip] release/beta 4.5.2-2
skip-checks: true
2021-04-13 10:33:28 +00:00
Jaco 82e15dc36d Explicitly handle isReadyOrError (when only using isReady) (#3395) 2021-04-13 12:24:26 +02:00
Github Actions 6f96037cb5 [CI Skip] release/beta 4.5.2-1
skip-checks: true
2021-04-13 09:08:55 +00:00
Jaco b6da84b8b2 Beefy subscribeJustifications (#3393)
* Beefy subscribeJustifications

* Add payload info

* Update RPC description
2021-04-13 10:59:23 +02:00
Github Actions 41209f074c [CI Skip] release/beta 4.5.2-0
skip-checks: true
2021-04-12 13:17:40 +00:00
Jaco Greeff c47964c942 Updated xcm types (#3391)
* Updated xcm types

* Move NetworkId

* Update DoubleEncodedCall

* trigger

* Xcm is an enum
2021-04-12 15:09:33 +02:00
46 changed files with 1440 additions and 1140 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
27
29
1.4.2
1.6.2
1.11.2
+17 -1
View File
@@ -1,5 +1,21 @@
# CHANGELOG
## 4.6.1 Apr 19, 2021
Upgrade priority: Low. Recommended if used in a Node.js 15.x environment.
Changes:
- Assert keypair validity in signing operations
- Expose `internalError` on submittable results (e.g. event decoding errors)
- Simplify session derives for old/new
- Add statemint to known types
- Add support for `rpc.beefy.subscribeJustifications`
- Update Xcm types
- Explicitly handle `isReadyOrError` with `Api.create`
- Add Kusama upgrade block for 2030
## 4.5.1 Apr 12, 2021
Upgrade priority: Low. Recommended with usage with the Rococo testnet.
@@ -9,7 +25,7 @@ Changes:
- Update parachain types as per latest Polkadot
- Cater for `Keys` with `BEEFY` session keys
- Update `Keys` injection to allow for on-chain type detection
- Update `Westend` known upgrade points for runtime 50
- Add `Westend` known upgrade block for runtime 50
- Align types with latest Substrate master
- Adjust keepalive `system_health` timer
+2 -2
View File
@@ -28,11 +28,11 @@
"@babel/core": "^7.13.15",
"@babel/register": "^7.13.14",
"@babel/runtime": "^7.13.10",
"@polkadot/dev": "^0.62.7",
"@polkadot/dev": "^0.62.8",
"@polkadot/ts": "^0.3.62",
"@polkadot/typegen": "workspace:packages/typegen",
"@types/jest": "^26.0.22",
"copyfiles": "^2.4.1"
},
"version": "4.5.1"
"version": "4.6.1"
}
+5 -5
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-contract",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Interfaces for interacting with contracts and contract ABIs",
"main": "index.js",
@@ -17,10 +17,10 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-contract#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"@polkadot/api": "4.6.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/x-rxjs": "^6.2.1",
"bn.js": "^4.11.9"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-contract', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/api-contract', version: '4.6.1' };
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api-derive",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Common functions used across Polkadot, derived from RPC calls and storage queries.",
"main": "index.js",
@@ -17,16 +17,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api-derive#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/rpc-core": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"@polkadot/api": "4.6.1",
"@polkadot/rpc-core": "4.6.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/util-crypto": "^6.2.1",
"@polkadot/x-rxjs": "^6.2.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.1.1",
"@polkadot/rpc-provider": "4.5.1"
"@polkadot/keyring": "^6.2.1",
"@polkadot/rpc-provider": "4.6.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api-derive', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/api-derive', version: '4.6.1' };
+15 -55
View File
@@ -2,71 +2,31 @@
// SPDX-License-Identifier: Apache-2.0
import type { ApiInterfaceRx } from '@polkadot/api/types';
import type { u64 } from '@polkadot/types';
import type { SessionIndex } from '@polkadot/types/interfaces';
import type { Observable } from '@polkadot/x-rxjs';
import type { DeriveSessionIndexes, DeriveSessionInfo } from '../types';
import type { DeriveSessionInfo } from '../types';
import { map } from '@polkadot/x-rxjs/operators';
import { memo } from '../util';
type ResultType = [boolean, u64, SessionIndex];
type Result = [ResultType, DeriveSessionIndexes];
function createDerive (api: ApiInterfaceRx, [[hasBabe, epochDuration, sessionsPerEra], { activeEra, activeEraStart, currentEra, currentIndex, validatorCount }]: Result): DeriveSessionInfo {
return {
activeEra,
activeEraStart,
currentEra,
currentIndex,
eraLength: api.registry.createType('BlockNumber', sessionsPerEra.mul(epochDuration)),
isEpoch: hasBabe,
sessionLength: epochDuration,
sessionsPerEra,
validatorCount
};
}
function queryAura (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
return api.derive.session.indexes().pipe(
map((indexes): DeriveSessionInfo =>
createDerive(api, [
[
false,
api.registry.createType('u64', 1),
// we may have aura without staking (permissioned)
api.consts.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1)
],
indexes
])
)
);
}
function queryBabe (api: ApiInterfaceRx): Observable<DeriveSessionInfo> {
return api.derive.session.indexes().pipe(
map((indexes) =>
createDerive(api, [
[
true,
api.consts.babe.epochDuration,
// we may have babe without staking (permissioned)
api.consts.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1)
],
indexes
])
)
);
}
/**
* @description Retrieves all the session and era query and calculates specific values on it as the length of the session and eras
*/
export function info (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveSessionInfo> {
return memo(instanceId, (): Observable<DeriveSessionInfo> =>
api.consts.babe
? queryBabe(api)
: queryAura(api)
api.derive.session.indexes().pipe(
map((indexes) => {
const sessionLength = api.consts?.babe?.epochDuration || api.registry.createType('u64', 1);
const sessionsPerEra = api.consts?.staking?.sessionsPerEra || api.registry.createType('SessionIndex', 1);
return {
...indexes,
eraLength: api.registry.createType('BlockNumber', sessionsPerEra.mul(sessionLength)),
isEpoch: !!api.query.babe,
sessionLength,
sessionsPerEra
};
})
)
);
}
+2 -2
View File
@@ -44,7 +44,7 @@ function queryBabe (api: ApiInterfaceRx): Observable<[DeriveSessionInfo, ResultS
combineLatest([
of(info),
// we may have no staking, but have babe (permissioned)
api.query.staking
api.query.staking?.erasStartSessionIndex
? api.queryMulti<ResultSlots>([
api.query.babe.currentSlot,
api.query.babe.epochIndex,
@@ -69,7 +69,7 @@ function queryBabe (api: ApiInterfaceRx): Observable<[DeriveSessionInfo, ResultS
*/
export function progress (instanceId: string, api: ApiInterfaceRx): () => Observable<DeriveSessionProgress> {
return memo(instanceId, (): Observable<DeriveSessionProgress> =>
api.consts.babe
api.query.babe
? queryBabe(api).pipe(
map(([info, slots]: [DeriveSessionInfo, ResultSlotsFlat]): DeriveSessionProgress =>
createDerive(api, info, slots)
+11 -11
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/api",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Promise and RxJS wrappers around the Polkadot JS RPC",
"main": "index.js",
@@ -17,16 +17,16 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/api#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/api-derive": "4.5.1",
"@polkadot/keyring": "^6.1.1",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-core": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/types-known": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"@polkadot/api-derive": "4.6.1",
"@polkadot/keyring": "^6.2.1",
"@polkadot/metadata": "4.6.1",
"@polkadot/rpc-core": "4.6.1",
"@polkadot/rpc-provider": "4.6.1",
"@polkadot/types": "4.6.1",
"@polkadot/types-known": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/util-crypto": "^6.2.1",
"@polkadot/x-rxjs": "^6.2.1",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
}
+7
View File
@@ -6,6 +6,7 @@ import type { Bytes, HashMap, Json, Null, Option, StorageKey, Text, U256, U64, V
import type { AnyNumber, Codec, IExtrinsic, Observable } from '@polkadot/types/types';
import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interfaces/author';
import type { EpochAuthorship } from '@polkadot/types/interfaces/babe';
import type { BeefySignedCommitment } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { AuthorityId } from '@polkadot/types/interfaces/consensus';
@@ -64,6 +65,12 @@ declare module '@polkadot/rpc-core/types.jsonrpc' {
**/
epochAuthorship: AugmentedRpc<() => Observable<HashMap<AuthorityId, EpochAuthorship>>>;
};
beefy: {
/**
* Returns the block most recently finalized by BEEFY, alongside side its justification.
**/
subscribeJustifications: AugmentedRpc<() => Observable<BeefySignedCommitment>>;
};
chain: {
/**
* Get header and body of a relay chain block
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/api', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/api', version: '4.6.1' };
+18 -10
View File
@@ -211,7 +211,19 @@ export class ApiPromise extends ApiBase<'promise'> {
* ```
*/
public static create (options?: ApiOptions): Promise<ApiPromise> {
return new ApiPromise(options).isReady;
const instance = new ApiPromise(options);
if (options && options.throwOnConnect) {
return instance.isReadyOrError;
}
// Swallow any rejections on isReadyOrError
// (in Node 15.x this creates issues, when not being looked at)
instance.isReadyOrError.catch(() => {
// ignore
});
return instance.isReady;
}
/**
@@ -235,18 +247,14 @@ export class ApiPromise extends ApiBase<'promise'> {
super(options, 'promise', decorateMethod);
this.#isReadyPromise = new Promise((resolve): void => {
super.once('ready', (): void => {
resolve(this);
});
super.once('ready', () => resolve(this));
});
this.#isReadyOrErrorPromise = new Promise((resolve, reject): void => {
super.once('ready', (): void => {
resolve(this);
});
super.once('error', (e): void => {
reject(e);
});
const tracker = promiseTracker(resolve, reject);
super.once('ready', () => tracker.resolve(this));
super.once('error', (e) => tracker.reject(e));
});
}
+5 -1
View File
@@ -32,14 +32,17 @@ export class SubmittableResult implements ISubmittableResult {
public readonly dispatchInfo?: DispatchInfo;
public readonly internalError?: Error;
public readonly events: EventRecord[];
public readonly status: ExtrinsicStatus;
constructor ({ dispatchError, dispatchInfo, events, status }: SubmittableResultValue) {
constructor ({ dispatchError, dispatchInfo, events, internalError, status }: SubmittableResultValue) {
this.dispatchError = dispatchError || extractError(events);
this.dispatchInfo = dispatchInfo || extractInfo(events);
this.events = events || [];
this.internalError = internalError;
this.status = status;
}
@@ -85,6 +88,7 @@ export class SubmittableResult implements ISubmittableResult {
dispatchError: this.dispatchError?.toHuman(),
dispatchInfo: this.dispatchInfo?.toHuman(),
events: this.events.map((event) => event.toHuman(isExtended)),
internalError: this.internalError?.message.toString(),
status: this.status.toHuman(isExtended)
};
}
+4 -1
View File
@@ -11,7 +11,7 @@ import type { AddressOrPair, SignerOptions, SubmittableDryRunResult, Submittable
import { assert, isBn, isFunction, isNumber, isString, isU8a } from '@polkadot/util';
import { of } from '@polkadot/x-rxjs';
import { first, map, mapTo, mergeMap, switchMap, tap } from '@polkadot/x-rxjs/operators';
import { catchError, first, map, mapTo, mergeMap, switchMap, tap } from '@polkadot/x-rxjs/operators';
import { ApiBase } from '../base';
import { filterEvents, isKeyringPair } from '../util';
@@ -242,6 +242,9 @@ export function createClass <ApiType extends ApiTypes> ({ api, apiType, decorate
events: filterEvents(hash, block, events, status),
status
}))
),
catchError((internalError: Error) =>
of(this.#transformResult(new SubmittableResult({ internalError, status })))
)
);
}
+1
View File
@@ -10,6 +10,7 @@ export interface SubmittableResultValue {
dispatchError?: DispatchError;
dispatchInfo?: DispatchInfo;
events?: EventRecord[];
internalError?: Error;
status: ExtrinsicStatus;
}
+4
View File
@@ -69,6 +69,10 @@ export interface ApiOptions extends RegisteredTypes {
* @description The source object to use for runtime information (only used when cloning)
*/
source?: ApiBase<any>;
/**
* @description Throws an error when the initial connection fails (same as isReadyOrError)
*/
throwOnConnect?: boolean;
}
// A smaller interface of ApiRx, used in derive and in SubmittableExtrinsic
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/metadata",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Helpers to extract information from runtime metadata",
"main": "index.js",
@@ -17,13 +17,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/type-metadata#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/types": "4.5.1",
"@polkadot/types-known": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/types": "4.6.1",
"@polkadot/types-known": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/util-crypto": "^6.2.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.1.1"
"@polkadot/keyring": "^6.2.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/metadata', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/metadata', version: '4.6.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-core",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -17,13 +17,13 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-core#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1"
"@polkadot/metadata": "4.6.1",
"@polkadot/rpc-provider": "4.6.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/x-rxjs": "^6.2.1"
},
"devDependencies": {
"@polkadot/keyring": "^6.1.1"
"@polkadot/keyring": "^6.2.1"
}
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/rpc-core', version: '4.6.1' };
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/rpc-provider",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Transport providers for the API",
"main": "index.js",
@@ -17,18 +17,18 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/rpc-provider#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-fetch": "^6.1.1",
"@polkadot/x-global": "^6.1.1",
"@polkadot/x-ws": "^6.1.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/util-crypto": "^6.2.1",
"@polkadot/x-fetch": "^6.2.1",
"@polkadot/x-global": "^6.2.1",
"@polkadot/x-ws": "^6.2.1",
"bn.js": "^4.11.9",
"eventemitter3": "^4.0.7"
},
"devDependencies": {
"@polkadot/keyring": "^6.1.1",
"@polkadot/metadata": "4.5.1",
"@polkadot/keyring": "^6.2.1",
"@polkadot/metadata": "4.6.1",
"mock-socket": "^9.0.3",
"nock": "^13.0.11"
}
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/rpc-provider', version: '4.6.1' };
+7 -7
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/typegen",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Type generation scripts",
"main": "index.js",
@@ -26,13 +26,13 @@
"@babel/core": "^7.13.15",
"@babel/register": "^7.13.14",
"@babel/runtime": "^7.13.10",
"@polkadot/api": "4.5.1",
"@polkadot/metadata": "4.5.1",
"@polkadot/rpc-provider": "4.5.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/api": "4.6.1",
"@polkadot/metadata": "4.6.1",
"@polkadot/rpc-provider": "4.6.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"handlebars": "^4.7.7",
"websocket": "^1.0.33",
"websocket": "^1.0.34",
"yargs": "^16.2.0"
},
"devDependencies": {
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/typegen', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/typegen', version: '4.6.1' };
+4 -4
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types-known",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "A JavaScript wrapper for the Polkadot JsonRPC interface",
"main": "index.js",
@@ -17,9 +17,9 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types-known#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/networks": "^6.1.1",
"@polkadot/types": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/networks": "^6.2.1",
"@polkadot/types": "4.6.1",
"@polkadot/util": "^6.2.1",
"bn.js": "^4.11.9"
},
"devDependencies": {
+6
View File
@@ -72,6 +72,12 @@ const typesModules: Record<string, OverrideModuleType> = {
},
treasury: {
Proposal: 'TreasuryProposal'
},
xcm: {
Outcome: 'XcmOutcome'
},
xcmPallet: {
Outcome: 'XcmOutcome'
}
};
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types-known', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/types-known', version: '4.6.1' };
+2
View File
@@ -9,6 +9,7 @@ import node from './node';
import nodeTemplate from './node-template';
import polkadot from './polkadot';
import rococo from './rococo';
import statemint from './statemint';
import westend from './westend';
// Type overrides for specific spec types & versions as given in runtimeVersion
@@ -19,6 +20,7 @@ const typesSpec: Record<string, OverrideVersionedType[]> = {
'node-template': nodeTemplate,
polkadot,
rococo,
statemint,
westend
};
@@ -0,0 +1,28 @@
// Copyright 2017-2021 @polkadot/types-known authors & contributors
// SPDX-License-Identifier: Apache-2.0
/* eslint-disable sort-keys */
import type { OverrideVersionedType } from '@polkadot/types/types';
// these are override types for Polkadot
const versioned: OverrideVersionedType[] = [
{
minmax: [0, undefined],
types: {
TAssetBalance: 'u128',
ProxyType: {
_enum: {
Any: 0,
NonTransfer: 1,
CancelProxy: 2,
Assets: 3,
AssetOwner: 4,
AssetManager: 5
}
}
}
}
];
export default versioned;
+1 -1
View File
@@ -12,7 +12,7 @@ const upgrades: ChainUpgradesRaw = [
[2201991, 1062], [2671528, 2005], [2704202, 2007], [2728002, 2008], [2832534, 2011],
[2962294, 2012], [3240000, 2013], [3274408, 2015], [3323565, 2019], [3534175, 2022],
[3860281, 2023], [4143129, 2024], [4401242, 2025], [4841367, 2026], [5961600, 2027],
[6137912, 2028], [6561855, 2029]
[6137912, 2028], [6561855, 2029], [7100891, 2030]
];
export default upgrades;
+6 -6
View File
@@ -1,6 +1,6 @@
{
"name": "@polkadot/types",
"version": "4.5.1",
"version": "4.6.1",
"type": "module",
"description": "Implementation of the Parity codec",
"main": "index.js",
@@ -17,14 +17,14 @@
"homepage": "https://github.com/polkadot-js/api/tree/master/packages/types#readme",
"dependencies": {
"@babel/runtime": "^7.13.10",
"@polkadot/metadata": "4.5.1",
"@polkadot/util": "^6.1.1",
"@polkadot/util-crypto": "^6.1.1",
"@polkadot/x-rxjs": "^6.1.1",
"@polkadot/metadata": "4.6.1",
"@polkadot/util": "^6.2.1",
"@polkadot/util-crypto": "^6.2.1",
"@polkadot/x-rxjs": "^6.2.1",
"@types/bn.js": "^4.11.6",
"bn.js": "^4.11.9"
},
"devDependencies": {
"@polkadot/keyring": "^6.1.1"
"@polkadot/keyring": "^6.2.1"
}
}
+99 -62
View File
@@ -9,7 +9,7 @@ import type { ExtrinsicOrHash, ExtrinsicStatus } from '@polkadot/types/interface
import type { UncleEntryItem } from '@polkadot/types/interfaces/authorship';
import type { AllowedSlots, BabeAuthorityWeight, BabeBlockWeight, BabeEpochConfiguration, BabeEquivocationProof, BabeWeight, EpochAuthorship, MaybeRandomness, MaybeVrf, NextConfigDescriptor, NextConfigDescriptorV1, Randomness, RawBabePreDigest, RawBabePreDigestCompat, RawBabePreDigestPrimary, RawBabePreDigestPrimaryTo159, RawBabePreDigestSecondaryPlain, RawBabePreDigestSecondaryTo159, RawBabePreDigestSecondaryVRF, RawBabePreDigestTo159, SlotNumber, VrfData, VrfOutput, VrfProof } from '@polkadot/types/interfaces/babe';
import type { AccountData, BalanceLock, BalanceLockTo212, BalanceStatus, Reasons, VestingSchedule, WithdrawReasons } from '@polkadot/types/interfaces/balances';
import type { BeefyNextAuthoritySet, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { BeefyCommitment, BeefyNextAuthoritySet, BeefyPayload, BeefySignedCommitment, MmrRootHash, ValidatorSetId } from '@polkadot/types/interfaces/beefy';
import type { BlockHash } from '@polkadot/types/interfaces/chain';
import type { PrefixedStorageKey } from '@polkadot/types/interfaces/childstate';
import type { EthereumAddress, StatementKind } from '@polkadot/types/interfaces/claims';
@@ -34,7 +34,7 @@ import type { DoubleMapTypeLatest, DoubleMapTypeV10, DoubleMapTypeV11, DoubleMap
import type { MmrLeafProof } from '@polkadot/types/interfaces/mmr';
import type { StorageKind } from '@polkadot/types/interfaces/offchain';
import type { DeferredOffenceOf, Kind, OffenceDetails, Offender, OpaqueTimeSlot, ReportIdOf, Reporter } from '@polkadot/types/interfaces/offences';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AbstractFungible, AbstractNonFungible, AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Balances, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, ConcreteFungible, ConcreteNonFungible, CoreAssignment, CoreIndex, CoreOccupied, DepositAsset, DepositReserveAsset, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExchangeAsset, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InitiateReserveWithdraw, InitiateTeleport, InvalidDisputeStatementKind, Junction, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiAsset, MultiDisputeStatementSet, MultiLocation, NetworkId, NewBidder, Order, OriginKind, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueryHolding, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayChainHash, RelayTo, RelayedFrom, Remark, ReserveAssetDeposit, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TeleportAsset, Transact, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry, WithdrawAsset, Xcm, XcmError, XcmResult } from '@polkadot/types/interfaces/parachains';
import type { AbridgedCandidateReceipt, AbridgedHostConfiguration, AbridgedHrmpChannel, AssignmentId, AssignmentKind, AttestedCandidate, AuctionIndex, AuthorityDiscoveryId, AvailabilityBitfield, AvailabilityBitfieldRecord, BackedCandidate, Bidder, BufferedSessionChange, CandidateCommitments, CandidateDescriptor, CandidateHash, CandidatePendingAvailability, CandidateReceipt, CollatorId, CollatorSignature, CommittedCandidateReceipt, CoreAssignment, CoreIndex, CoreOccupied, DisputeStatement, DisputeStatementSet, DoubleVoteReport, DownwardMessage, ExplicitDisputeStatement, GlobalValidationData, GlobalValidationSchedule, GroupIndex, HeadData, HostConfiguration, HrmpChannel, HrmpChannelId, HrmpOpenChannelRequest, InboundDownwardMessage, InboundHrmpMessage, InboundHrmpMessages, IncomingParachain, IncomingParachainDeploy, IncomingParachainFixed, InvalidDisputeStatementKind, LeasePeriod, LeasePeriodOf, LocalValidationData, MessageIngestionType, MessageQueueChain, MessagingStateSnapshot, MessagingStateSnapshotEgressEntry, MultiDisputeStatementSet, NewBidder, OutboundHrmpMessage, ParaGenesisArgs, ParaId, ParaInfo, ParaLifecycle, ParaPastCodeMeta, ParaScheduling, ParaValidatorIndex, ParachainDispatchOrigin, ParachainInherentData, ParachainProposal, ParachainsInherentData, ParathreadClaim, ParathreadClaimQueue, ParathreadEntry, PersistedValidationData, QueuedParathread, RegisteredParachainInfo, RelayChainBlockNumber, RelayChainHash, Remark, Retriable, Scheduling, ServiceQuality, SessionInfo, SessionInfoValidatorGroup, SignedAvailabilityBitfield, SignedAvailabilityBitfields, SigningContext, SlotRange, Statement, SubId, SystemInherentData, TransientValidationData, UpwardMessage, ValidDisputeStatementKind, ValidationCode, ValidationData, ValidationDataType, ValidationFunctionParams, ValidatorSignature, ValidityAttestation, VecInboundHrmpMessage, WinnersData, WinnersDataTuple, WinningData, WinningDataEntry } from '@polkadot/types/interfaces/parachains';
import type { FeeDetails, InclusionFee, RuntimeDispatchInfo } from '@polkadot/types/interfaces/payment';
import type { Approvals } from '@polkadot/types/interfaces/poll';
import type { ProxyAnnouncement, ProxyDefinition, ProxyType } from '@polkadot/types/interfaces/proxy';
@@ -54,6 +54,7 @@ import type { Bounty, BountyIndex, BountyStatus, BountyStatusActive, BountyStatu
import type { Multiplier } from '@polkadot/types/interfaces/txpayment';
import type { Multisig, Timepoint } from '@polkadot/types/interfaces/utility';
import type { VestingInfo } from '@polkadot/types/interfaces/vesting';
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, DoubleEncodedCall, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, VersionedMultiAsset, VersionedMultiLocation, VersionedXcm, Xcm, XcmAssetEffects, XcmError, XcmHrmpChannelAccepted, XcmHrmpChannelClosing, XcmHrmpNewChannelOpenRequest, XcmOrder, XcmOrderBuyExecution, XcmOrderDepositAsset, XcmOrderDepositReserveAsset, XcmOrderExchangeAsset, XcmOrderInitiateReserveWithdraw, XcmOrderInitiateTeleport, XcmOrderQueryHolding, XcmOriginKind, XcmOutcome, XcmQueryResponse, XcmRelayedFrom, XcmReserveAssetDeposit, XcmResponse, XcmTeleportAsset, XcmTransact, XcmTransferAsset, XcmTransferReserveAsset, XcmWithdrawAsset } from '@polkadot/types/interfaces/xcm';
declare module '@polkadot/types/types/registry' {
export interface InterfaceTypes {
@@ -147,8 +148,6 @@ declare module '@polkadot/types/types/registry' {
'Option<AbridgedCandidateReceipt>': Option<AbridgedCandidateReceipt>;
'Option<AbridgedHostConfiguration>': Option<AbridgedHostConfiguration>;
'Option<AbridgedHrmpChannel>': Option<AbridgedHrmpChannel>;
'Option<AbstractFungible>': Option<AbstractFungible>;
'Option<AbstractNonFungible>': Option<AbstractNonFungible>;
'Option<AccountData>': Option<AccountData>;
'Option<AccountId>': Option<AccountId>;
'Option<AccountId32Junction>': Option<AccountId32Junction>;
@@ -211,10 +210,12 @@ declare module '@polkadot/types/types/registry' {
'Option<BalanceLock>': Option<BalanceLock>;
'Option<BalanceLockTo212>': Option<BalanceLockTo212>;
'Option<BalanceOf>': Option<BalanceOf>;
'Option<Balances>': Option<Balances>;
'Option<BalanceStatus>': Option<BalanceStatus>;
'Option<BeefyCommitment>': Option<BeefyCommitment>;
'Option<BeefyKey>': Option<BeefyKey>;
'Option<BeefyNextAuthoritySet>': Option<BeefyNextAuthoritySet>;
'Option<BeefyPayload>': Option<BeefyPayload>;
'Option<BeefySignedCommitment>': Option<BeefySignedCommitment>;
'Option<Bid>': Option<Bid>;
'Option<Bidder>': Option<Bidder>;
'Option<BidKind>': Option<BidKind>;
@@ -257,8 +258,6 @@ declare module '@polkadot/types/types/registry' {
'Option<CompactAssignmentsTo257>': Option<CompactAssignmentsTo257>;
'Option<CompactScore>': Option<CompactScore>;
'Option<CompactScoreCompact>': Option<CompactScoreCompact>;
'Option<ConcreteFungible>': Option<ConcreteFungible>;
'Option<ConcreteNonFungible>': Option<ConcreteNonFungible>;
'Option<Consensus>': Option<Consensus>;
'Option<ConsensusEngineId>': Option<ConsensusEngineId>;
'Option<ConsumedWeight>': Option<ConsumedWeight>;
@@ -307,8 +306,6 @@ declare module '@polkadot/types/types/registry' {
'Option<DefunctVoter>': Option<DefunctVoter>;
'Option<Delegations>': Option<Delegations>;
'Option<DeletedContract>': Option<DeletedContract>;
'Option<DepositAsset>': Option<DepositAsset>;
'Option<DepositReserveAsset>': Option<DepositReserveAsset>;
'Option<Digest>': Option<Digest>;
'Option<DigestItem>': Option<DigestItem>;
'Option<DigestOf>': Option<DigestOf>;
@@ -326,6 +323,7 @@ declare module '@polkadot/types/types/registry' {
'Option<DisputeStatement>': Option<DisputeStatement>;
'Option<DisputeStatementSet>': Option<DisputeStatementSet>;
'Option<DoNotConstruct>': Option<DoNotConstruct>;
'Option<DoubleEncodedCall>': Option<DoubleEncodedCall>;
'Option<DoubleMapTypeLatest>': Option<DoubleMapTypeLatest>;
'Option<DoubleMapTypeV10>': Option<DoubleMapTypeV10>;
'Option<DoubleMapTypeV11>': Option<DoubleMapTypeV11>;
@@ -396,7 +394,6 @@ declare module '@polkadot/types/types/registry' {
'Option<EvmAccount>': Option<EvmAccount>;
'Option<EvmLog>': Option<EvmLog>;
'Option<EvmVicinity>': Option<EvmVicinity>;
'Option<ExchangeAsset>': Option<ExchangeAsset>;
'Option<ExitError>': Option<ExitError>;
'Option<ExitFatal>': Option<ExitFatal>;
'Option<ExitReason>': Option<ExitReason>;
@@ -500,8 +497,6 @@ declare module '@polkadot/types/types/registry' {
'Option<Index>': Option<Index>;
'Option<IndicesLookupSource>': Option<IndicesLookupSource>;
'Option<IndividualExposure>': Option<IndividualExposure>;
'Option<InitiateReserveWithdraw>': Option<InitiateReserveWithdraw>;
'Option<InitiateTeleport>': Option<InitiateTeleport>;
'Option<InstructionWeights>': Option<InstructionWeights>;
'Option<InvalidDisputeStatementKind>': Option<InvalidDisputeStatementKind>;
'Option<InvalidTransaction>': Option<InvalidTransaction>;
@@ -549,6 +544,7 @@ declare module '@polkadot/types/types/registry' {
'Option<MetadataV12>': Option<MetadataV12>;
'Option<MetadataV9>': Option<MetadataV9>;
'Option<MmrLeafProof>': Option<MmrLeafProof>;
'Option<MmrRootHash>': Option<MmrRootHash>;
'Option<ModuleConstantMetadataLatest>': Option<ModuleConstantMetadataLatest>;
'Option<ModuleConstantMetadataV10>': Option<ModuleConstantMetadataV10>;
'Option<ModuleConstantMetadataV11>': Option<ModuleConstantMetadataV11>;
@@ -566,6 +562,10 @@ declare module '@polkadot/types/types/registry' {
'Option<MortalEra>': Option<MortalEra>;
'Option<MultiAddress>': Option<MultiAddress>;
'Option<MultiAsset>': Option<MultiAsset>;
'Option<MultiAssetAbstractFungible>': Option<MultiAssetAbstractFungible>;
'Option<MultiAssetAbstractNonFungible>': Option<MultiAssetAbstractNonFungible>;
'Option<MultiAssetConcreteFungible>': Option<MultiAssetConcreteFungible>;
'Option<MultiAssetConcreteNonFungible>': Option<MultiAssetConcreteNonFungible>;
'Option<MultiDisputeStatementSet>': Option<MultiDisputeStatementSet>;
'Option<MultiLocation>': Option<MultiLocation>;
'Option<Multiplier>': Option<Multiplier>;
@@ -599,10 +599,8 @@ declare module '@polkadot/types/types/registry' {
'Option<OpenTipFinderTo225>': Option<OpenTipFinderTo225>;
'Option<OpenTipTip>': Option<OpenTipTip>;
'Option<OpenTipTo225>': Option<OpenTipTo225>;
'Option<Order>': Option<Order>;
'Option<Origin>': Option<Origin>;
'Option<OriginCaller>': Option<OriginCaller>;
'Option<OriginKind>': Option<OriginKind>;
'Option<OutboundHrmpMessage>': Option<OutboundHrmpMessage>;
'Option<Owner>': Option<Owner>;
'Option<PalletId>': Option<PalletId>;
@@ -664,7 +662,6 @@ declare module '@polkadot/types/types/registry' {
'Option<ProxyDefinition>': Option<ProxyDefinition>;
'Option<ProxyState>': Option<ProxyState>;
'Option<ProxyType>': Option<ProxyType>;
'Option<QueryHolding>': Option<QueryHolding>;
'Option<QueuedParathread>': Option<QueuedParathread>;
'Option<Randomness>': Option<Randomness>;
'Option<Raw>': Option<Raw>;
@@ -698,15 +695,12 @@ declare module '@polkadot/types/types/registry' {
'Option<RegistrationJudgement>': Option<RegistrationJudgement>;
'Option<RelayChainBlockNumber>': Option<RelayChainBlockNumber>;
'Option<RelayChainHash>': Option<RelayChainHash>;
'Option<RelayedFrom>': Option<RelayedFrom>;
'Option<RelayTo>': Option<RelayTo>;
'Option<Releases>': Option<Releases>;
'Option<Remark>': Option<Remark>;
'Option<Renouncing>': Option<Renouncing>;
'Option<ReportedRoundStates>': Option<ReportedRoundStates>;
'Option<Reporter>': Option<Reporter>;
'Option<ReportIdOf>': Option<ReportIdOf>;
'Option<ReserveAssetDeposit>': Option<ReserveAssetDeposit>;
'Option<Retriable>': Option<Retriable>;
'Option<RewardDestination>': Option<RewardDestination>;
'Option<RewardPoint>': Option<RewardPoint>;
@@ -831,11 +825,9 @@ declare module '@polkadot/types/types/registry' {
'Option<TaskAddress>': Option<TaskAddress>;
'Option<TAssetBalance>': Option<TAssetBalance>;
'Option<TAssetDepositBalance>': Option<TAssetDepositBalance>;
'Option<TeleportAsset>': Option<TeleportAsset>;
'Option<Text>': Option<Text>;
'Option<Timepoint>': Option<Timepoint>;
'Option<TombstoneContractInfo>': Option<TombstoneContractInfo>;
'Option<Transact>': Option<Transact>;
'Option<TransactionPriority>': Option<TransactionPriority>;
'Option<TransactionValidityError>': Option<TransactionValidityError>;
'Option<TransientValidationData>': Option<TransientValidationData>;
@@ -912,16 +904,35 @@ declare module '@polkadot/types/types/registry' {
'Option<WinnersDataTuple>': Option<WinnersDataTuple>;
'Option<WinningData>': Option<WinningData>;
'Option<WinningDataEntry>': Option<WinningDataEntry>;
'Option<WithdrawAsset>': Option<WithdrawAsset>;
'Option<WithdrawReasons>': Option<WithdrawReasons>;
'Option<Xcm>': Option<Xcm>;
'Option<XcmAssetEffects>': Option<XcmAssetEffects>;
'Option<XcmError>': Option<XcmError>;
'Option<XcmResult>': Option<XcmResult>;
'Option<XcmHrmpChannelAccepted>': Option<XcmHrmpChannelAccepted>;
'Option<XcmHrmpChannelClosing>': Option<XcmHrmpChannelClosing>;
'Option<XcmHrmpNewChannelOpenRequest>': Option<XcmHrmpNewChannelOpenRequest>;
'Option<XcmOrder>': Option<XcmOrder>;
'Option<XcmOrderBuyExecution>': Option<XcmOrderBuyExecution>;
'Option<XcmOrderDepositAsset>': Option<XcmOrderDepositAsset>;
'Option<XcmOrderDepositReserveAsset>': Option<XcmOrderDepositReserveAsset>;
'Option<XcmOrderExchangeAsset>': Option<XcmOrderExchangeAsset>;
'Option<XcmOrderInitiateReserveWithdraw>': Option<XcmOrderInitiateReserveWithdraw>;
'Option<XcmOrderInitiateTeleport>': Option<XcmOrderInitiateTeleport>;
'Option<XcmOrderQueryHolding>': Option<XcmOrderQueryHolding>;
'Option<XcmOriginKind>': Option<XcmOriginKind>;
'Option<XcmOutcome>': Option<XcmOutcome>;
'Option<XcmQueryResponse>': Option<XcmQueryResponse>;
'Option<XcmRelayedFrom>': Option<XcmRelayedFrom>;
'Option<XcmReserveAssetDeposit>': Option<XcmReserveAssetDeposit>;
'Option<XcmResponse>': Option<XcmResponse>;
'Option<XcmTeleportAsset>': Option<XcmTeleportAsset>;
'Option<XcmTransact>': Option<XcmTransact>;
'Option<XcmTransferAsset>': Option<XcmTransferAsset>;
'Option<XcmTransferReserveAsset>': Option<XcmTransferReserveAsset>;
'Option<XcmWithdrawAsset>': Option<XcmWithdrawAsset>;
'Vec<AbridgedCandidateReceipt>': Vec<AbridgedCandidateReceipt>;
'Vec<AbridgedHostConfiguration>': Vec<AbridgedHostConfiguration>;
'Vec<AbridgedHrmpChannel>': Vec<AbridgedHrmpChannel>;
'Vec<AbstractFungible>': Vec<AbstractFungible>;
'Vec<AbstractNonFungible>': Vec<AbstractNonFungible>;
'Vec<AccountData>': Vec<AccountData>;
'Vec<AccountId>': Vec<AccountId>;
'Vec<AccountId32Junction>': Vec<AccountId32Junction>;
@@ -984,10 +995,12 @@ declare module '@polkadot/types/types/registry' {
'Vec<BalanceLock>': Vec<BalanceLock>;
'Vec<BalanceLockTo212>': Vec<BalanceLockTo212>;
'Vec<BalanceOf>': Vec<BalanceOf>;
'Vec<Balances>': Vec<Balances>;
'Vec<BalanceStatus>': Vec<BalanceStatus>;
'Vec<BeefyCommitment>': Vec<BeefyCommitment>;
'Vec<BeefyKey>': Vec<BeefyKey>;
'Vec<BeefyNextAuthoritySet>': Vec<BeefyNextAuthoritySet>;
'Vec<BeefyPayload>': Vec<BeefyPayload>;
'Vec<BeefySignedCommitment>': Vec<BeefySignedCommitment>;
'Vec<Bid>': Vec<Bid>;
'Vec<Bidder>': Vec<Bidder>;
'Vec<BidKind>': Vec<BidKind>;
@@ -1030,8 +1043,6 @@ declare module '@polkadot/types/types/registry' {
'Vec<CompactAssignmentsTo257>': Vec<CompactAssignmentsTo257>;
'Vec<CompactScore>': Vec<CompactScore>;
'Vec<CompactScoreCompact>': Vec<CompactScoreCompact>;
'Vec<ConcreteFungible>': Vec<ConcreteFungible>;
'Vec<ConcreteNonFungible>': Vec<ConcreteNonFungible>;
'Vec<Consensus>': Vec<Consensus>;
'Vec<ConsensusEngineId>': Vec<ConsensusEngineId>;
'Vec<ConsumedWeight>': Vec<ConsumedWeight>;
@@ -1080,8 +1091,6 @@ declare module '@polkadot/types/types/registry' {
'Vec<DefunctVoter>': Vec<DefunctVoter>;
'Vec<Delegations>': Vec<Delegations>;
'Vec<DeletedContract>': Vec<DeletedContract>;
'Vec<DepositAsset>': Vec<DepositAsset>;
'Vec<DepositReserveAsset>': Vec<DepositReserveAsset>;
'Vec<Digest>': Vec<Digest>;
'Vec<DigestItem>': Vec<DigestItem>;
'Vec<DigestOf>': Vec<DigestOf>;
@@ -1099,6 +1108,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<DisputeStatement>': Vec<DisputeStatement>;
'Vec<DisputeStatementSet>': Vec<DisputeStatementSet>;
'Vec<DoNotConstruct>': Vec<DoNotConstruct>;
'Vec<DoubleEncodedCall>': Vec<DoubleEncodedCall>;
'Vec<DoubleMapTypeLatest>': Vec<DoubleMapTypeLatest>;
'Vec<DoubleMapTypeV10>': Vec<DoubleMapTypeV10>;
'Vec<DoubleMapTypeV11>': Vec<DoubleMapTypeV11>;
@@ -1169,7 +1179,6 @@ declare module '@polkadot/types/types/registry' {
'Vec<EvmAccount>': Vec<EvmAccount>;
'Vec<EvmLog>': Vec<EvmLog>;
'Vec<EvmVicinity>': Vec<EvmVicinity>;
'Vec<ExchangeAsset>': Vec<ExchangeAsset>;
'Vec<ExitError>': Vec<ExitError>;
'Vec<ExitFatal>': Vec<ExitFatal>;
'Vec<ExitReason>': Vec<ExitReason>;
@@ -1273,8 +1282,6 @@ declare module '@polkadot/types/types/registry' {
'Vec<Index>': Vec<Index>;
'Vec<IndicesLookupSource>': Vec<IndicesLookupSource>;
'Vec<IndividualExposure>': Vec<IndividualExposure>;
'Vec<InitiateReserveWithdraw>': Vec<InitiateReserveWithdraw>;
'Vec<InitiateTeleport>': Vec<InitiateTeleport>;
'Vec<InstructionWeights>': Vec<InstructionWeights>;
'Vec<InvalidDisputeStatementKind>': Vec<InvalidDisputeStatementKind>;
'Vec<InvalidTransaction>': Vec<InvalidTransaction>;
@@ -1322,6 +1329,7 @@ declare module '@polkadot/types/types/registry' {
'Vec<MetadataV12>': Vec<MetadataV12>;
'Vec<MetadataV9>': Vec<MetadataV9>;
'Vec<MmrLeafProof>': Vec<MmrLeafProof>;
'Vec<MmrRootHash>': Vec<MmrRootHash>;
'Vec<ModuleConstantMetadataLatest>': Vec<ModuleConstantMetadataLatest>;
'Vec<ModuleConstantMetadataV10>': Vec<ModuleConstantMetadataV10>;
'Vec<ModuleConstantMetadataV11>': Vec<ModuleConstantMetadataV11>;
@@ -1339,6 +1347,10 @@ declare module '@polkadot/types/types/registry' {
'Vec<MortalEra>': Vec<MortalEra>;
'Vec<MultiAddress>': Vec<MultiAddress>;
'Vec<MultiAsset>': Vec<MultiAsset>;
'Vec<MultiAssetAbstractFungible>': Vec<MultiAssetAbstractFungible>;
'Vec<MultiAssetAbstractNonFungible>': Vec<MultiAssetAbstractNonFungible>;
'Vec<MultiAssetConcreteFungible>': Vec<MultiAssetConcreteFungible>;
'Vec<MultiAssetConcreteNonFungible>': Vec<MultiAssetConcreteNonFungible>;
'Vec<MultiDisputeStatementSet>': Vec<MultiDisputeStatementSet>;
'Vec<MultiLocation>': Vec<MultiLocation>;
'Vec<Multiplier>': Vec<Multiplier>;
@@ -1372,10 +1384,8 @@ declare module '@polkadot/types/types/registry' {
'Vec<OpenTipFinderTo225>': Vec<OpenTipFinderTo225>;
'Vec<OpenTipTip>': Vec<OpenTipTip>;
'Vec<OpenTipTo225>': Vec<OpenTipTo225>;
'Vec<Order>': Vec<Order>;
'Vec<Origin>': Vec<Origin>;
'Vec<OriginCaller>': Vec<OriginCaller>;
'Vec<OriginKind>': Vec<OriginKind>;
'Vec<OutboundHrmpMessage>': Vec<OutboundHrmpMessage>;
'Vec<Owner>': Vec<Owner>;
'Vec<PalletId>': Vec<PalletId>;
@@ -1437,7 +1447,6 @@ declare module '@polkadot/types/types/registry' {
'Vec<ProxyDefinition>': Vec<ProxyDefinition>;
'Vec<ProxyState>': Vec<ProxyState>;
'Vec<ProxyType>': Vec<ProxyType>;
'Vec<QueryHolding>': Vec<QueryHolding>;
'Vec<QueuedParathread>': Vec<QueuedParathread>;
'Vec<Randomness>': Vec<Randomness>;
'Vec<Raw>': Vec<Raw>;
@@ -1471,15 +1480,12 @@ declare module '@polkadot/types/types/registry' {
'Vec<RegistrationJudgement>': Vec<RegistrationJudgement>;
'Vec<RelayChainBlockNumber>': Vec<RelayChainBlockNumber>;
'Vec<RelayChainHash>': Vec<RelayChainHash>;
'Vec<RelayedFrom>': Vec<RelayedFrom>;
'Vec<RelayTo>': Vec<RelayTo>;
'Vec<Releases>': Vec<Releases>;
'Vec<Remark>': Vec<Remark>;
'Vec<Renouncing>': Vec<Renouncing>;
'Vec<ReportedRoundStates>': Vec<ReportedRoundStates>;
'Vec<Reporter>': Vec<Reporter>;
'Vec<ReportIdOf>': Vec<ReportIdOf>;
'Vec<ReserveAssetDeposit>': Vec<ReserveAssetDeposit>;
'Vec<Retriable>': Vec<Retriable>;
'Vec<RewardDestination>': Vec<RewardDestination>;
'Vec<RewardPoint>': Vec<RewardPoint>;
@@ -1604,11 +1610,9 @@ declare module '@polkadot/types/types/registry' {
'Vec<TaskAddress>': Vec<TaskAddress>;
'Vec<TAssetBalance>': Vec<TAssetBalance>;
'Vec<TAssetDepositBalance>': Vec<TAssetDepositBalance>;
'Vec<TeleportAsset>': Vec<TeleportAsset>;
'Vec<Text>': Vec<Text>;
'Vec<Timepoint>': Vec<Timepoint>;
'Vec<TombstoneContractInfo>': Vec<TombstoneContractInfo>;
'Vec<Transact>': Vec<Transact>;
'Vec<TransactionPriority>': Vec<TransactionPriority>;
'Vec<TransactionValidityError>': Vec<TransactionValidityError>;
'Vec<TransientValidationData>': Vec<TransientValidationData>;
@@ -1685,16 +1689,35 @@ declare module '@polkadot/types/types/registry' {
'Vec<WinnersDataTuple>': Vec<WinnersDataTuple>;
'Vec<WinningData>': Vec<WinningData>;
'Vec<WinningDataEntry>': Vec<WinningDataEntry>;
'Vec<WithdrawAsset>': Vec<WithdrawAsset>;
'Vec<WithdrawReasons>': Vec<WithdrawReasons>;
'Vec<Xcm>': Vec<Xcm>;
'Vec<XcmAssetEffects>': Vec<XcmAssetEffects>;
'Vec<XcmError>': Vec<XcmError>;
'Vec<XcmResult>': Vec<XcmResult>;
'Vec<XcmHrmpChannelAccepted>': Vec<XcmHrmpChannelAccepted>;
'Vec<XcmHrmpChannelClosing>': Vec<XcmHrmpChannelClosing>;
'Vec<XcmHrmpNewChannelOpenRequest>': Vec<XcmHrmpNewChannelOpenRequest>;
'Vec<XcmOrder>': Vec<XcmOrder>;
'Vec<XcmOrderBuyExecution>': Vec<XcmOrderBuyExecution>;
'Vec<XcmOrderDepositAsset>': Vec<XcmOrderDepositAsset>;
'Vec<XcmOrderDepositReserveAsset>': Vec<XcmOrderDepositReserveAsset>;
'Vec<XcmOrderExchangeAsset>': Vec<XcmOrderExchangeAsset>;
'Vec<XcmOrderInitiateReserveWithdraw>': Vec<XcmOrderInitiateReserveWithdraw>;
'Vec<XcmOrderInitiateTeleport>': Vec<XcmOrderInitiateTeleport>;
'Vec<XcmOrderQueryHolding>': Vec<XcmOrderQueryHolding>;
'Vec<XcmOriginKind>': Vec<XcmOriginKind>;
'Vec<XcmOutcome>': Vec<XcmOutcome>;
'Vec<XcmQueryResponse>': Vec<XcmQueryResponse>;
'Vec<XcmRelayedFrom>': Vec<XcmRelayedFrom>;
'Vec<XcmReserveAssetDeposit>': Vec<XcmReserveAssetDeposit>;
'Vec<XcmResponse>': Vec<XcmResponse>;
'Vec<XcmTeleportAsset>': Vec<XcmTeleportAsset>;
'Vec<XcmTransact>': Vec<XcmTransact>;
'Vec<XcmTransferAsset>': Vec<XcmTransferAsset>;
'Vec<XcmTransferReserveAsset>': Vec<XcmTransferReserveAsset>;
'Vec<XcmWithdrawAsset>': Vec<XcmWithdrawAsset>;
AbridgedCandidateReceipt: AbridgedCandidateReceipt;
AbridgedHostConfiguration: AbridgedHostConfiguration;
AbridgedHrmpChannel: AbridgedHrmpChannel;
AbstractFungible: AbstractFungible;
AbstractNonFungible: AbstractNonFungible;
AccountData: AccountData;
AccountId: AccountId;
AccountId32Junction: AccountId32Junction;
@@ -1757,10 +1780,12 @@ declare module '@polkadot/types/types/registry' {
BalanceLock: BalanceLock;
BalanceLockTo212: BalanceLockTo212;
BalanceOf: BalanceOf;
Balances: Balances;
BalanceStatus: BalanceStatus;
BeefyCommitment: BeefyCommitment;
BeefyKey: BeefyKey;
BeefyNextAuthoritySet: BeefyNextAuthoritySet;
BeefyPayload: BeefyPayload;
BeefySignedCommitment: BeefySignedCommitment;
Bid: Bid;
Bidder: Bidder;
BidKind: BidKind;
@@ -1803,8 +1828,6 @@ declare module '@polkadot/types/types/registry' {
CompactAssignmentsTo257: CompactAssignmentsTo257;
CompactScore: CompactScore;
CompactScoreCompact: CompactScoreCompact;
ConcreteFungible: ConcreteFungible;
ConcreteNonFungible: ConcreteNonFungible;
Consensus: Consensus;
ConsensusEngineId: ConsensusEngineId;
ConsumedWeight: ConsumedWeight;
@@ -1853,8 +1876,6 @@ declare module '@polkadot/types/types/registry' {
DefunctVoter: DefunctVoter;
Delegations: Delegations;
DeletedContract: DeletedContract;
DepositAsset: DepositAsset;
DepositReserveAsset: DepositReserveAsset;
Digest: Digest;
DigestItem: DigestItem;
DigestOf: DigestOf;
@@ -1872,6 +1893,7 @@ declare module '@polkadot/types/types/registry' {
DisputeStatement: DisputeStatement;
DisputeStatementSet: DisputeStatementSet;
DoNotConstruct: DoNotConstruct;
DoubleEncodedCall: DoubleEncodedCall;
DoubleMapTypeLatest: DoubleMapTypeLatest;
DoubleMapTypeV10: DoubleMapTypeV10;
DoubleMapTypeV11: DoubleMapTypeV11;
@@ -1942,7 +1964,6 @@ declare module '@polkadot/types/types/registry' {
EvmAccount: EvmAccount;
EvmLog: EvmLog;
EvmVicinity: EvmVicinity;
ExchangeAsset: ExchangeAsset;
ExitError: ExitError;
ExitFatal: ExitFatal;
ExitReason: ExitReason;
@@ -2046,8 +2067,6 @@ declare module '@polkadot/types/types/registry' {
Index: Index;
IndicesLookupSource: IndicesLookupSource;
IndividualExposure: IndividualExposure;
InitiateReserveWithdraw: InitiateReserveWithdraw;
InitiateTeleport: InitiateTeleport;
InstructionWeights: InstructionWeights;
InvalidDisputeStatementKind: InvalidDisputeStatementKind;
InvalidTransaction: InvalidTransaction;
@@ -2095,6 +2114,7 @@ declare module '@polkadot/types/types/registry' {
MetadataV12: MetadataV12;
MetadataV9: MetadataV9;
MmrLeafProof: MmrLeafProof;
MmrRootHash: MmrRootHash;
ModuleConstantMetadataLatest: ModuleConstantMetadataLatest;
ModuleConstantMetadataV10: ModuleConstantMetadataV10;
ModuleConstantMetadataV11: ModuleConstantMetadataV11;
@@ -2112,6 +2132,10 @@ declare module '@polkadot/types/types/registry' {
MortalEra: MortalEra;
MultiAddress: MultiAddress;
MultiAsset: MultiAsset;
MultiAssetAbstractFungible: MultiAssetAbstractFungible;
MultiAssetAbstractNonFungible: MultiAssetAbstractNonFungible;
MultiAssetConcreteFungible: MultiAssetConcreteFungible;
MultiAssetConcreteNonFungible: MultiAssetConcreteNonFungible;
MultiDisputeStatementSet: MultiDisputeStatementSet;
MultiLocation: MultiLocation;
Multiplier: Multiplier;
@@ -2145,10 +2169,8 @@ declare module '@polkadot/types/types/registry' {
OpenTipFinderTo225: OpenTipFinderTo225;
OpenTipTip: OpenTipTip;
OpenTipTo225: OpenTipTo225;
Order: Order;
Origin: Origin;
OriginCaller: OriginCaller;
OriginKind: OriginKind;
OutboundHrmpMessage: OutboundHrmpMessage;
Owner: Owner;
PalletId: PalletId;
@@ -2210,7 +2232,6 @@ declare module '@polkadot/types/types/registry' {
ProxyDefinition: ProxyDefinition;
ProxyState: ProxyState;
ProxyType: ProxyType;
QueryHolding: QueryHolding;
QueuedParathread: QueuedParathread;
Randomness: Randomness;
Raw: Raw;
@@ -2244,15 +2265,12 @@ declare module '@polkadot/types/types/registry' {
RegistrationJudgement: RegistrationJudgement;
RelayChainBlockNumber: RelayChainBlockNumber;
RelayChainHash: RelayChainHash;
RelayedFrom: RelayedFrom;
RelayTo: RelayTo;
Releases: Releases;
Remark: Remark;
Renouncing: Renouncing;
ReportedRoundStates: ReportedRoundStates;
Reporter: Reporter;
ReportIdOf: ReportIdOf;
ReserveAssetDeposit: ReserveAssetDeposit;
Retriable: Retriable;
RewardDestination: RewardDestination;
RewardPoint: RewardPoint;
@@ -2377,11 +2395,9 @@ declare module '@polkadot/types/types/registry' {
TaskAddress: TaskAddress;
TAssetBalance: TAssetBalance;
TAssetDepositBalance: TAssetDepositBalance;
TeleportAsset: TeleportAsset;
Text: Text;
Timepoint: Timepoint;
TombstoneContractInfo: TombstoneContractInfo;
Transact: Transact;
TransactionPriority: TransactionPriority;
TransactionValidityError: TransactionValidityError;
TransientValidationData: TransientValidationData;
@@ -2458,10 +2474,31 @@ declare module '@polkadot/types/types/registry' {
WinnersDataTuple: WinnersDataTuple;
WinningData: WinningData;
WinningDataEntry: WinningDataEntry;
WithdrawAsset: WithdrawAsset;
WithdrawReasons: WithdrawReasons;
Xcm: Xcm;
XcmAssetEffects: XcmAssetEffects;
XcmError: XcmError;
XcmResult: XcmResult;
XcmHrmpChannelAccepted: XcmHrmpChannelAccepted;
XcmHrmpChannelClosing: XcmHrmpChannelClosing;
XcmHrmpNewChannelOpenRequest: XcmHrmpNewChannelOpenRequest;
XcmOrder: XcmOrder;
XcmOrderBuyExecution: XcmOrderBuyExecution;
XcmOrderDepositAsset: XcmOrderDepositAsset;
XcmOrderDepositReserveAsset: XcmOrderDepositReserveAsset;
XcmOrderExchangeAsset: XcmOrderExchangeAsset;
XcmOrderInitiateReserveWithdraw: XcmOrderInitiateReserveWithdraw;
XcmOrderInitiateTeleport: XcmOrderInitiateTeleport;
XcmOrderQueryHolding: XcmOrderQueryHolding;
XcmOriginKind: XcmOriginKind;
XcmOutcome: XcmOutcome;
XcmQueryResponse: XcmQueryResponse;
XcmRelayedFrom: XcmRelayedFrom;
XcmReserveAssetDeposit: XcmReserveAssetDeposit;
XcmResponse: XcmResponse;
XcmTeleportAsset: XcmTeleportAsset;
XcmTransact: XcmTransact;
XcmTransferAsset: XcmTransferAsset;
XcmTransferReserveAsset: XcmTransferReserveAsset;
XcmWithdrawAsset: XcmWithdrawAsset;
}
}
@@ -6,7 +6,7 @@ import type { Address, Balance, Call, Index } from '../../interfaces/runtime';
import type { ExtrinsicPayloadValue, IExtrinsicSignature, IKeyringPair, Registry, SignatureOptions } from '../../types';
import type { ExtrinsicSignatureOptions } from '../types';
import { isU8a, u8aConcat, u8aToHex } from '@polkadot/util';
import { assert, isU8a, u8aConcat, u8aToHex } from '@polkadot/util';
import { Compact } from '../../codec/Compact';
import { Enum } from '../../codec/Enum';
@@ -155,6 +155,8 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
* @description Generate a payload and applies the signature from a keypair
*/
public sign (method: Call, account: IKeyringPair, options: SignatureOptions): IExtrinsicSignature {
assert(account && account.addressRaw, `Expected a valid keypair for signing, found ${JSON.stringify(account)}`);
const signer = toAddress(this.registry, account.addressRaw);
const payload = this.createPayload(method, options);
const signature = this.registry.createType('ExtrinsicSignature', payload.sign(account));
@@ -166,6 +168,8 @@ export class GenericExtrinsicSignatureV4 extends Struct implements IExtrinsicSig
* @description Generate a payload and applies a fake signature
*/
public signFake (method: Call, address: Address | Uint8Array | string, options: SignatureOptions): IExtrinsicSignature {
assert(address, `Expected a valid address for signing, found ${JSON.stringify(address)}`);
const signer = toAddress(this.registry, address);
const payload = this.createPayload(method, options);
const signature = this.registry.createType('ExtrinsicSignature', u8aConcat(this.#fakePrefix, new Uint8Array(64).fill(0x42)));
@@ -7,13 +7,35 @@
import type { Definitions } from '../../types';
export default {
rpc: {},
rpc: {
subscribeJustifications: {
description: 'Returns the block most recently finalized by BEEFY, alongside side its justification.',
params: [],
pubsub: [
'justifications',
'subscribeJustifications',
'unsubscribeJustifications'
],
type: 'BeefySignedCommitment'
}
},
types: {
BeefyCommitment: {
payload: 'BeefyPayload',
blockNumber: 'BlockNumber',
validatorSetId: 'ValidatorSetId'
},
BeefySignedCommitment: {
commitment: 'BeefyCommitment',
signatures: 'Vec<Option<Signature>>'
},
BeefyNextAuthoritySet: {
id: 'u64',
len: 'u32',
root: 'H256'
},
BeefyPayload: 'MmrRootHash',
MmrRootHash: 'H256',
ValidatorSetId: 'u64'
}
} as Definitions;
+22 -2
View File
@@ -1,8 +1,16 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Struct, u32, u64 } from '@polkadot/types';
import type { H256 } from '@polkadot/types/interfaces/runtime';
import type { Option, Struct, Vec, u32, u64 } from '@polkadot/types';
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
import type { BlockNumber, H256 } from '@polkadot/types/interfaces/runtime';
/** @name BeefyCommitment */
export interface BeefyCommitment extends Struct {
readonly payload: BeefyPayload;
readonly blockNumber: BlockNumber;
readonly validatorSetId: ValidatorSetId;
}
/** @name BeefyNextAuthoritySet */
export interface BeefyNextAuthoritySet extends Struct {
@@ -11,6 +19,18 @@ export interface BeefyNextAuthoritySet extends Struct {
readonly root: H256;
}
/** @name BeefyPayload */
export interface BeefyPayload extends MmrRootHash {}
/** @name BeefySignedCommitment */
export interface BeefySignedCommitment extends Struct {
readonly commitment: BeefyCommitment;
readonly signatures: Vec<Option<Signature>>;
}
/** @name MmrRootHash */
export interface MmrRootHash extends H256 {}
/** @name ValidatorSetId */
export interface ValidatorSetId extends u64 {}
@@ -48,6 +48,7 @@ export { default as crowdloan } from './crowdloan/definitions';
export { default as parachains } from './parachains/definitions';
export { default as poll } from './poll/definitions';
export { default as purchase } from './purchase/definitions';
export { default as xcm } from './xcm/definitions';
// scale-info & contracts
export { default as contractsAbi } from './contractsAbi/definitions';
@@ -387,204 +387,6 @@ export default {
Explicit: 'ValidatorSignature'
}
},
VersionedXcm: {
_enum: {
V0: 'Xcm'
}
},
WithdrawAsset: {
assets: 'Vec<MultiAsset>',
effects: 'Vec<Order>'
},
ReserveAssetDeposit: {
assets: 'Vec<MultiAsset>',
effects: 'Vec<Order>'
},
TeleportAsset: {
assets: 'Vec<MultiAsset>',
effects: 'Vec<Order>'
},
Balances: {
queryId: 'Compact<u64>',
assets: 'Vec<MultiAsset>'
},
Transact: {
originType: 'OriginKind',
call: 'Vec<u8>'
},
RelayTo: {
dest: 'MultiLocation',
inner: 'VersionedXcm'
},
RelayedFrom: {
superorigin: 'MultiLocation',
inner: 'VersionedXcm'
},
Xcm: {
_enum: {
WithdrawAsset: 'WithdrawAsset',
ReserveAssetDeposit: 'ReserveAssetDeposit',
TeleportAsset: 'TeleportAsset',
Balances: 'Balances',
Transact: 'Transact',
RelayTo: 'RelayTo',
RelayedFrom: 'RelayedFrom'
}
},
XcmError: {
_enum: ['Undefined', 'Unimplemented', 'UnhandledXcmVersion', 'UnhandledXcmMessage', 'UnhandledEffect', 'EscalationOfPrivilege', 'UntrustedReserveLocation', 'UntrustedTeleportLocation', 'DestinationBufferOverflow', 'CannotReachDestination', 'MultiLocationFull', 'FailedToDecode', 'BadOrigin']
},
XcmResult: {
_enum: {
Ok: '()',
Err: 'XcmError'
}
},
OriginKind: {
_enum: ['Native', 'SovereignAccount', 'Superuser']
},
NetworkId: {
_enum: {
Any: 'Null',
Named: 'Vec<u8>',
Polkadot: 'Null',
Kusama: 'Null'
}
},
MultiLocation: {
_enum: {
Null: 'Null',
X1: 'Junction',
X2: '(Junction, Junction)',
X3: '(Junction, Junction, Junction)',
X4: '(Junction, Junction, Junction, Junction)',
X5: '(Junction, Junction, Junction, Junction, Junction)',
X6: '(Junction, Junction, Junction, Junction, Junction, Junction)',
X7: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction)',
X8: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction)'
}
},
AccountId32Junction: {
network: 'NetworkId',
id: 'AccountId'
},
AccountIndex64Junction: {
network: 'NetworkId',
index: 'Compact<u64>'
},
AccountKey20Junction: {
network: 'NetworkId',
index: '[u8; 20]'
},
Junction: {
_enum: {
Parent: 'Null',
Parachain: 'Compact<u32>',
AccountId32: 'AccountId32Junction',
AccountIndex64: 'AccountIndex64Junction',
AccountKey20: 'AccountKey20Junction',
PalletInstance: 'u8',
GeneralIndex: 'Compact<u128>',
GeneralKey: 'Vec<u8>',
OnlyChild: 'Null'
}
},
VersionedMultiLocation: {
_enum: {
V0: 'MultiLocation'
}
},
AssetInstance: {
_enum: {
Undefined: 'Null',
Index8: 'u8',
Index16: 'Compact<u16>',
Index32: 'Compact<u32>',
Index64: 'Compact<u64>',
Index128: 'Compact<u128>',
Array4: '[u8; 4]',
Array8: '[u8; 8]',
Array16: '[u8; 16]',
Array32: '[u8; 32]',
Blob: 'Vec<u8>'
}
},
AbstractFungible: {
id: 'Vec<u8>',
instance: 'Compact<u128>'
},
AbstractNonFungible: {
class: 'Vec<u8>',
instance: 'AssetInstance'
},
ConcreteFungible: {
id: 'MultiLocation',
amount: 'Compact<u128>'
},
ConcreteNonFungible: {
class: 'MultiLocation',
instance: 'AssetInstance'
},
MultiAsset: {
_enum: {
None: 'Null',
All: 'Null',
AllFungible: 'Null',
AllNonFungible: 'Null',
AllAbstractFungible: 'Vec<u8>',
AllAbstractNonFungible: 'Vec<u8>',
AllConcreteFungible: 'MultiLocation',
AllConcreteNonFungible: 'MultiLocation',
AbstractFungible: 'AbstractFungible',
AbstractNonFungible: 'AbstractNonFungible',
ConcreteFungible: 'ConcreteFungible',
ConcreteNonFungible: 'ConcreteNonFungible'
}
},
VersionedMultiAsset: {
_enum: {
V0: 'MultiAsset'
}
},
DepositAsset: {
assets: 'Vec<MultiAsset>',
dest: 'MultiLocation'
},
DepositReserveAsset: {
assets: 'Vec<MultiAsset>',
dest: 'MultiLocation',
effects: 'Vec<Order>'
},
ExchangeAsset: {
give: 'Vec<MultiAsset>',
receive: 'Vec<MultiAsset>'
},
InitiateReserveWithdraw: {
assets: 'Vec<MultiAsset>',
reserve: 'MultiLocation',
effects: 'Vec<Order>'
},
InitiateTeleport: {
assets: 'Vec<MultiAsset>',
dest: 'MultiLocation',
effects: 'Vec<Order>'
},
QueryHolding: {
queryId: 'Compact<u64>',
dest: 'MultiLocation',
assets: 'Vec<MultiAsset>'
},
Order: {
_enum: {
Null: 'Null',
DepositAsset: 'DepositAsset',
DepositReserveAsset: 'DepositReserveAsset',
ExchangeAsset: 'ExchangeAsset',
InitiateReserveWithdraw: 'InitiateReserveWithdraw',
InitiateTeleport: 'InitiateTeleport',
QueryHolding: 'QueryHolding'
}
},
MessagingStateSnapshot: {
relayDispatchQueueSize: '(u32, u32)',
egressChannels: 'Vec<MessagingStateSnapshotEgressEntry>'
@@ -1,7 +1,7 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { BTreeMap, BitVec, Bytes, Compact, Enum, Option, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
import type { BTreeMap, BitVec, Bytes, Enum, Option, Struct, U8aFixed, Vec, bool, u32 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { Signature } from '@polkadot/types/interfaces/extrinsics';
import type { AccountId, Balance, BalanceOf, BlockNumber, H256, Hash, Header, StorageProof, ValidatorId, Weight } from '@polkadot/types/interfaces/runtime';
@@ -42,61 +42,6 @@ export interface AbridgedHrmpChannel extends Struct {
readonly mqcHead: Option<Hash>;
}
/** @name AbstractFungible */
export interface AbstractFungible extends Struct {
readonly id: Bytes;
readonly instance: Compact<u128>;
}
/** @name AbstractNonFungible */
export interface AbstractNonFungible extends Struct {
readonly class: Bytes;
readonly instance: AssetInstance;
}
/** @name AccountId32Junction */
export interface AccountId32Junction extends Struct {
readonly network: NetworkId;
readonly id: AccountId;
}
/** @name AccountIndex64Junction */
export interface AccountIndex64Junction extends Struct {
readonly network: NetworkId;
readonly index: Compact<u64>;
}
/** @name AccountKey20Junction */
export interface AccountKey20Junction extends Struct {
readonly network: NetworkId;
readonly index: U8aFixed;
}
/** @name AssetInstance */
export interface AssetInstance extends Enum {
readonly isUndefined: boolean;
readonly isIndex8: boolean;
readonly asIndex8: u8;
readonly isIndex16: boolean;
readonly asIndex16: Compact<u16>;
readonly isIndex32: boolean;
readonly asIndex32: Compact<u32>;
readonly isIndex64: boolean;
readonly asIndex64: Compact<u64>;
readonly isIndex128: boolean;
readonly asIndex128: Compact<u128>;
readonly isArray4: boolean;
readonly asArray4: U8aFixed;
readonly isArray8: boolean;
readonly asArray8: U8aFixed;
readonly isArray16: boolean;
readonly asArray16: U8aFixed;
readonly isArray32: boolean;
readonly asArray32: U8aFixed;
readonly isBlob: boolean;
readonly asBlob: Bytes;
}
/** @name AssignmentId */
export interface AssignmentId extends AccountId {}
@@ -136,12 +81,6 @@ export interface BackedCandidate extends Struct {
readonly validatorIndices: BitVec;
}
/** @name Balances */
export interface Balances extends Struct {
readonly queryId: Compact<u64>;
readonly assets: Vec<MultiAsset>;
}
/** @name Bidder */
export interface Bidder extends Enum {
readonly isNew: boolean;
@@ -213,18 +152,6 @@ export interface CommittedCandidateReceipt extends Struct {
readonly commitments: CandidateCommitments;
}
/** @name ConcreteFungible */
export interface ConcreteFungible extends Struct {
readonly id: MultiLocation;
readonly amount: Compact<u128>;
}
/** @name ConcreteNonFungible */
export interface ConcreteNonFungible extends Struct {
readonly class: MultiLocation;
readonly instance: AssetInstance;
}
/** @name CoreAssignment */
export interface CoreAssignment extends Struct {
readonly core: CoreIndex;
@@ -243,19 +170,6 @@ export interface CoreOccupied extends Enum {
readonly isParachain: boolean;
}
/** @name DepositAsset */
export interface DepositAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
}
/** @name DepositReserveAsset */
export interface DepositReserveAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
readonly effects: Vec<Order>;
}
/** @name DisputeStatement */
export interface DisputeStatement extends Enum {
readonly isValid: boolean;
@@ -283,12 +197,6 @@ export interface DoubleVoteReport extends Struct {
/** @name DownwardMessage */
export interface DownwardMessage extends Bytes {}
/** @name ExchangeAsset */
export interface ExchangeAsset extends Struct {
readonly give: Vec<MultiAsset>;
readonly receive: Vec<MultiAsset>;
}
/** @name ExplicitDisputeStatement */
export interface ExplicitDisputeStatement extends Struct {
readonly valid: bool;
@@ -423,45 +331,11 @@ export interface IncomingParachainFixed extends Struct {
readonly initialHeadData: HeadData;
}
/** @name InitiateReserveWithdraw */
export interface InitiateReserveWithdraw extends Struct {
readonly assets: Vec<MultiAsset>;
readonly reserve: MultiLocation;
readonly effects: Vec<Order>;
}
/** @name InitiateTeleport */
export interface InitiateTeleport extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
readonly effects: Vec<Order>;
}
/** @name InvalidDisputeStatementKind */
export interface InvalidDisputeStatementKind extends Enum {
readonly isExplicit: boolean;
}
/** @name Junction */
export interface Junction extends Enum {
readonly isParent: boolean;
readonly isParachain: boolean;
readonly asParachain: Compact<u32>;
readonly isAccountId32: boolean;
readonly asAccountId32: AccountId32Junction;
readonly isAccountIndex64: boolean;
readonly asAccountIndex64: AccountIndex64Junction;
readonly isAccountKey20: boolean;
readonly asAccountKey20: AccountKey20Junction;
readonly isPalletInstance: boolean;
readonly asPalletInstance: u8;
readonly isGeneralIndex: boolean;
readonly asGeneralIndex: Compact<u128>;
readonly isGeneralKey: boolean;
readonly asGeneralKey: Bytes;
readonly isOnlyChild: boolean;
}
/** @name LeasePeriod */
export interface LeasePeriod extends BlockNumber {}
@@ -493,93 +367,15 @@ export interface MessagingStateSnapshot extends Struct {
/** @name MessagingStateSnapshotEgressEntry */
export interface MessagingStateSnapshotEgressEntry extends ITuple<[ParaId, AbridgedHrmpChannel]> {}
/** @name MultiAsset */
export interface MultiAsset extends Enum {
readonly isNone: boolean;
readonly isAll: boolean;
readonly isAllFungible: boolean;
readonly isAllNonFungible: boolean;
readonly isAllAbstractFungible: boolean;
readonly asAllAbstractFungible: Bytes;
readonly isAllAbstractNonFungible: boolean;
readonly asAllAbstractNonFungible: Bytes;
readonly isAllConcreteFungible: boolean;
readonly asAllConcreteFungible: MultiLocation;
readonly isAllConcreteNonFungible: boolean;
readonly asAllConcreteNonFungible: MultiLocation;
readonly isAbstractFungible: boolean;
readonly asAbstractFungible: AbstractFungible;
readonly isAbstractNonFungible: boolean;
readonly asAbstractNonFungible: AbstractNonFungible;
readonly isConcreteFungible: boolean;
readonly asConcreteFungible: ConcreteFungible;
readonly isConcreteNonFungible: boolean;
readonly asConcreteNonFungible: ConcreteNonFungible;
}
/** @name MultiDisputeStatementSet */
export interface MultiDisputeStatementSet extends Vec<DisputeStatementSet> {}
/** @name MultiLocation */
export interface MultiLocation extends Enum {
readonly isNull: boolean;
readonly isX1: boolean;
readonly asX1: Junction;
readonly isX2: boolean;
readonly asX2: ITuple<[Junction, Junction]>;
readonly isX3: boolean;
readonly asX3: ITuple<[Junction, Junction, Junction]>;
readonly isX4: boolean;
readonly asX4: ITuple<[Junction, Junction, Junction, Junction]>;
readonly isX5: boolean;
readonly asX5: ITuple<[Junction, Junction, Junction, Junction, Junction]>;
readonly isX6: boolean;
readonly asX6: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX7: boolean;
readonly asX7: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX8: boolean;
readonly asX8: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
}
/** @name NetworkId */
export interface NetworkId extends Enum {
readonly isAny: boolean;
readonly isNamed: boolean;
readonly asNamed: Bytes;
readonly isPolkadot: boolean;
readonly isKusama: boolean;
}
/** @name NewBidder */
export interface NewBidder extends Struct {
readonly who: AccountId;
readonly sub: SubId;
}
/** @name Order */
export interface Order extends Enum {
readonly isNull: boolean;
readonly isDepositAsset: boolean;
readonly asDepositAsset: DepositAsset;
readonly isDepositReserveAsset: boolean;
readonly asDepositReserveAsset: DepositReserveAsset;
readonly isExchangeAsset: boolean;
readonly asExchangeAsset: ExchangeAsset;
readonly isInitiateReserveWithdraw: boolean;
readonly asInitiateReserveWithdraw: InitiateReserveWithdraw;
readonly isInitiateTeleport: boolean;
readonly asInitiateTeleport: InitiateTeleport;
readonly isQueryHolding: boolean;
readonly asQueryHolding: QueryHolding;
}
/** @name OriginKind */
export interface OriginKind extends Enum {
readonly isNative: boolean;
readonly isSovereignAccount: boolean;
readonly isSuperuser: boolean;
}
/** @name OutboundHrmpMessage */
export interface OutboundHrmpMessage extends Struct {
readonly recipient: u32;
@@ -684,13 +480,6 @@ export interface PersistedValidationData extends Struct {
readonly maxPovSize: u32;
}
/** @name QueryHolding */
export interface QueryHolding extends Struct {
readonly queryId: Compact<u64>;
readonly dest: MultiLocation;
readonly assets: Vec<MultiAsset>;
}
/** @name QueuedParathread */
export interface QueuedParathread extends Struct {
readonly claim: ParathreadEntry;
@@ -709,27 +498,9 @@ export interface RelayChainBlockNumber extends u32 {}
/** @name RelayChainHash */
export interface RelayChainHash extends Hash {}
/** @name RelayedFrom */
export interface RelayedFrom extends Struct {
readonly superorigin: MultiLocation;
readonly inner: VersionedXcm;
}
/** @name RelayTo */
export interface RelayTo extends Struct {
readonly dest: MultiLocation;
readonly inner: VersionedXcm;
}
/** @name Remark */
export interface Remark extends U8aFixed {}
/** @name ReserveAssetDeposit */
export interface ReserveAssetDeposit extends Struct {
readonly assets: Vec<MultiAsset>;
readonly effects: Vec<Order>;
}
/** @name Retriable */
export interface Retriable extends Enum {
readonly isNever: boolean;
@@ -813,18 +584,6 @@ export interface SubId extends u32 {}
/** @name SystemInherentData */
export interface SystemInherentData extends ParachainInherentData {}
/** @name TeleportAsset */
export interface TeleportAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly effects: Vec<Order>;
}
/** @name Transact */
export interface Transact extends Struct {
readonly originType: OriginKind;
readonly call: Bytes;
}
/** @name TransientValidationData */
export interface TransientValidationData extends Struct {
readonly maxCodeSize: u32;
@@ -882,24 +641,6 @@ export interface ValidityAttestation extends Enum {
/** @name VecInboundHrmpMessage */
export interface VecInboundHrmpMessage extends Vec<InboundHrmpMessage> {}
/** @name VersionedMultiAsset */
export interface VersionedMultiAsset extends Enum {
readonly isV0: boolean;
readonly asV0: MultiAsset;
}
/** @name VersionedMultiLocation */
export interface VersionedMultiLocation extends Enum {
readonly isV0: boolean;
readonly asV0: MultiLocation;
}
/** @name VersionedXcm */
export interface VersionedXcm extends Enum {
readonly isV0: boolean;
readonly asV0: Xcm;
}
/** @name WinnersData */
export interface WinnersData extends Vec<WinnersDataTuple> {}
@@ -912,53 +653,4 @@ export interface WinningData extends Vec<WinningDataEntry> {}
/** @name WinningDataEntry */
export interface WinningDataEntry extends Option<ITuple<[AccountId, ParaId, BalanceOf]>> {}
/** @name WithdrawAsset */
export interface WithdrawAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly effects: Vec<Order>;
}
/** @name Xcm */
export interface Xcm extends Enum {
readonly isWithdrawAsset: boolean;
readonly asWithdrawAsset: WithdrawAsset;
readonly isReserveAssetDeposit: boolean;
readonly asReserveAssetDeposit: ReserveAssetDeposit;
readonly isTeleportAsset: boolean;
readonly asTeleportAsset: TeleportAsset;
readonly isBalances: boolean;
readonly asBalances: Balances;
readonly isTransact: boolean;
readonly asTransact: Transact;
readonly isRelayTo: boolean;
readonly asRelayTo: RelayTo;
readonly isRelayedFrom: boolean;
readonly asRelayedFrom: RelayedFrom;
}
/** @name XcmError */
export interface XcmError extends Enum {
readonly isUndefined: boolean;
readonly isUnimplemented: boolean;
readonly isUnhandledXcmVersion: boolean;
readonly isUnhandledXcmMessage: boolean;
readonly isUnhandledEffect: boolean;
readonly isEscalationOfPrivilege: boolean;
readonly isUntrustedReserveLocation: boolean;
readonly isUntrustedTeleportLocation: boolean;
readonly isDestinationBufferOverflow: boolean;
readonly isCannotReachDestination: boolean;
readonly isMultiLocationFull: boolean;
readonly isFailedToDecode: boolean;
readonly isBadOrigin: boolean;
}
/** @name XcmResult */
export interface XcmResult extends Enum {
readonly isOk: boolean;
readonly asOk: ITuple<[]>;
readonly isErr: boolean;
readonly asErr: XcmError;
}
export type PHANTOM_PARACHAINS = 'parachains';
+1
View File
@@ -43,6 +43,7 @@ export * from './crowdloan/types';
export * from './parachains/types';
export * from './poll/types';
export * from './purchase/types';
export * from './xcm/types';
export * from './contractsAbi/types';
export * from './scaleInfo/types';
export * from './eth/types';
@@ -0,0 +1,227 @@
// Copyright 2017-2021 @polkadot/types authors & contributors
// SPDX-License-Identifier: Apache-2.0
// order important in structs... :)
/* eslint-disable sort-keys */
import type { Definitions } from '../../types';
const xcm = {
XcmAssetEffects: {
assets: 'Vec<MultiAsset>',
effects: 'Vec<XcmOrder>'
},
XcmWithdrawAsset: 'XcmAssetEffects',
XcmReserveAssetDeposit: 'XcmAssetEffects',
XcmTeleportAsset: 'XcmAssetEffects',
XcmQueryResponse: { queryId: 'Compact<u64>', response: 'XcmResponse' },
XcmTransferAsset: { assets: 'Vec<MultiAsset>', dest: 'MultiLocation' },
XcmTransferReserveAsset: { assets: 'Vec<MultiAsset>', dest: 'MultiLocation', effects: 'Vec<XcmOrder>' },
XcmTransact: { originType: 'XcmOriginKind', requireWeightAtMost: 'u64', call: 'DoubleEncodedCall' },
XcmHrmpNewChannelOpenRequest: { sender: 'Compact<u32>', maxMessageSize: 'Compact<u32>', maxCapacity: 'Compact<u32>' },
XcmHrmpChannelAccepted: { recipient: 'Compact<u32>' },
XcmHrmpChannelClosing: { initiator: 'Compact<u32>', sender: 'Compact<u32>', recipient: 'Compact<u32>' },
XcmRelayedFrom: { who: 'MultiLocation', message: 'Xcm' },
Xcm: {
_enum: {
WithdrawAsset: 'XcmWithdrawAsset',
ReserveAssetDeposit: 'XcmReserveAssetDeposit',
TeleportAsset: 'XcmTeleportAsset',
QueryResponse: 'XcmQueryResponse',
TransferAsset: 'XcmTransferAsset',
TransferReserveAsset: 'XcmTransferReserveAsset',
Transact: 'XcmTransact',
HrmpNewChannelOpenRequest: 'XcmHrmpNewChannelOpenRequest',
HrmpChannelAccepted: 'XcmHrmpChannelAccepted',
HrmpChannelClosing: 'XcmHrmpChannelClosing',
RelayedFrom: 'XcmRelayedFrom'
}
},
VersionedXcm: {
_enum: {
V0: 'Xcm'
}
}
};
const xmcOrder = {
XcmOrderDepositAsset: { assets: 'Vec<MultiAsset>', dest: 'MultiLocation' },
XcmOrderDepositReserveAsset: { assets: 'Vec<MultiAsset>', dest: 'MultiLocation', effects: 'Vec<XcmOrder>' },
XcmOrderExchangeAsset: { give: 'Vec<MultiAsset>', receive: 'Vec<MultiAsset>' },
XcmOrderInitiateReserveWithdraw: { assets: 'Vec<MultiAsset>', reserve: 'MultiLocation', effects: 'Vec<XcmOrder>' },
XcmOrderInitiateTeleport: { assets: 'Vec<MultiAsset>', dest: 'MultiLocation', effects: 'Vec<XcmOrder>' },
XcmOrderQueryHolding: { queryId: 'Compact<u64>', dest: 'MultiLocation', assets: 'Vec<MultiAsset>' },
XcmOrderBuyExecution: { fees: 'MultiAsset', weight: 'u64', debt: 'u64', haltOnError: 'bool', xcm: 'Vec<Xcm>' },
XcmOrder: {
_enum: {
Null: 'Null',
DepositAsset: 'XcmOrderDepositAsset',
DepositReserveAsset: 'XcmOrderDepositReserveAsset',
ExchangeAsset: 'XcmOrderExchangeAsset',
InitiateReserveWithdraw: 'XcmOrderInitiateReserveWithdraw',
InitiateTeleport: 'XcmOrderInitiateTeleport',
QueryHolding: 'XcmOrderQueryHolding',
BuyExecution: 'XcmOrderBuyExecution'
}
}
};
const multiAsset = {
MultiAssetAbstractFungible: {
id: 'Vec<u8>',
instance: 'Compact<u128>'
},
MultiAssetAbstractNonFungible: {
class: 'Vec<u8>',
instance: 'AssetInstance'
},
MultiAssetConcreteFungible: {
id: 'MultiLocation',
amount: 'Compact<u128>'
},
MultiAssetConcreteNonFungible: {
class: 'MultiLocation',
instance: 'AssetInstance'
},
MultiAsset: {
_enum: {
None: 'Null',
All: 'Null',
AllFungible: 'Null',
AllNonFungible: 'Null',
AllAbstractFungible: 'Vec<u8>',
AllAbstractNonFungible: 'Vec<u8>',
AllConcreteFungible: 'MultiLocation',
AllConcreteNonFungible: 'MultiLocation',
AbstractFungible: 'MultiAssetAbstractFungible',
AbstractNonFungible: 'MultiAssetAbstractNonFungible',
ConcreteFungible: 'MultiAssetConcreteFungible',
ConcreteNonFungible: 'MultiAssetConcreteNonFungible'
}
},
VersionedMultiAsset: {
_enum: {
V0: 'MultiAsset'
}
}
};
export default {
rpc: {},
types: {
...multiAsset,
...xcm,
...xmcOrder,
DoubleEncodedCall: { encoded: 'Vec<u8>' },
NetworkId: {
_enum: {
Any: 'Null',
Named: 'Vec<u8>',
Polkadot: 'Null',
Kusama: 'Null'
}
},
XcmOriginKind: {
_enum: ['Native', 'SovereignAccount', 'Superuser']
},
XcmResponse: {
_enum: {
Assets: 'Vec<MultiAsset>'
}
},
XcmError: {
_enum: {
Undefined: 'Null',
Overflow: 'Null',
Unimplemented: 'Null',
UnhandledXcmVersion: 'Null',
UnhandledXcmMessage: 'Null',
UnhandledEffect: 'Null',
EscalationOfPrivilege: 'Null',
UntrustedReserveLocation: 'Null',
UntrustedTeleportLocation: 'Null',
DestinationBufferOverflow: 'Null',
SendFailed: 'Null', // (#[codec(skip)] &'static str),
CannotReachDestination: '(MultiLocation, Xcm)',
MultiLocationFull: 'Null',
FailedToDecode: 'Null',
BadOrigin: 'Null',
ExceedsMaxMessageSize: 'Null',
FailedToTransactAsset: 'Null', // (#[codec(skip)] &'static str),
WeightLimitReached: 'Null',
Wildcard: 'Null',
TooMuchWeightRequired: 'Null',
NotHoldingFees: 'Null',
WeightNotComputable: 'Null',
Barrier: 'Null',
NotWithdrawable: 'Null',
LocationCannotHold: 'Null'
}
},
XcmOutcome: {
_enum: {
Complete: 'Weight',
Incomplete: '(Weight, XcmError)',
Error: 'XcmError'
}
},
MultiLocation: {
_enum: {
Null: 'Null',
X1: 'Junction',
X2: '(Junction, Junction)',
X3: '(Junction, Junction, Junction)',
X4: '(Junction, Junction, Junction, Junction)',
X5: '(Junction, Junction, Junction, Junction, Junction)',
X6: '(Junction, Junction, Junction, Junction, Junction, Junction)',
X7: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction)',
X8: '(Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction)'
}
},
AccountId32Junction: {
network: 'NetworkId',
id: 'AccountId'
},
AccountIndex64Junction: {
network: 'NetworkId',
index: 'Compact<u64>'
},
AccountKey20Junction: {
network: 'NetworkId',
index: '[u8; 20]'
},
Junction: {
_enum: {
Parent: 'Null',
Parachain: 'Compact<u32>',
AccountId32: 'AccountId32Junction',
AccountIndex64: 'AccountIndex64Junction',
AccountKey20: 'AccountKey20Junction',
PalletInstance: 'u8',
GeneralIndex: 'Compact<u128>',
GeneralKey: 'Vec<u8>',
OnlyChild: 'Null'
}
},
VersionedMultiLocation: {
_enum: {
V0: 'MultiLocation'
}
},
AssetInstance: {
_enum: {
Undefined: 'Null',
Index8: 'u8',
Index16: 'Compact<u16>',
Index32: 'Compact<u32>',
Index64: 'Compact<u64>',
Index128: 'Compact<u128>',
Array4: '[u8; 4]',
Array8: '[u8; 8]',
Array16: '[u8; 16]',
Array32: '[u8; 32]',
Blob: 'Vec<u8>'
}
}
}
} as Definitions;
@@ -0,0 +1,4 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
export * from './types';
+385
View File
@@ -0,0 +1,385 @@
// Auto-generated via `yarn polkadot-types-from-defs`, do not edit
/* eslint-disable */
import type { Bytes, Compact, Enum, Struct, U8aFixed, Vec, bool, u128, u16, u32, u64, u8 } from '@polkadot/types';
import type { ITuple } from '@polkadot/types/types';
import type { AccountId, Weight } from '@polkadot/types/interfaces/runtime';
/** @name AccountId32Junction */
export interface AccountId32Junction extends Struct {
readonly network: NetworkId;
readonly id: AccountId;
}
/** @name AccountIndex64Junction */
export interface AccountIndex64Junction extends Struct {
readonly network: NetworkId;
readonly index: Compact<u64>;
}
/** @name AccountKey20Junction */
export interface AccountKey20Junction extends Struct {
readonly network: NetworkId;
readonly index: U8aFixed;
}
/** @name AssetInstance */
export interface AssetInstance extends Enum {
readonly isUndefined: boolean;
readonly isIndex8: boolean;
readonly asIndex8: u8;
readonly isIndex16: boolean;
readonly asIndex16: Compact<u16>;
readonly isIndex32: boolean;
readonly asIndex32: Compact<u32>;
readonly isIndex64: boolean;
readonly asIndex64: Compact<u64>;
readonly isIndex128: boolean;
readonly asIndex128: Compact<u128>;
readonly isArray4: boolean;
readonly asArray4: U8aFixed;
readonly isArray8: boolean;
readonly asArray8: U8aFixed;
readonly isArray16: boolean;
readonly asArray16: U8aFixed;
readonly isArray32: boolean;
readonly asArray32: U8aFixed;
readonly isBlob: boolean;
readonly asBlob: Bytes;
}
/** @name DoubleEncodedCall */
export interface DoubleEncodedCall extends Struct {
readonly encoded: Bytes;
}
/** @name Junction */
export interface Junction extends Enum {
readonly isParent: boolean;
readonly isParachain: boolean;
readonly asParachain: Compact<u32>;
readonly isAccountId32: boolean;
readonly asAccountId32: AccountId32Junction;
readonly isAccountIndex64: boolean;
readonly asAccountIndex64: AccountIndex64Junction;
readonly isAccountKey20: boolean;
readonly asAccountKey20: AccountKey20Junction;
readonly isPalletInstance: boolean;
readonly asPalletInstance: u8;
readonly isGeneralIndex: boolean;
readonly asGeneralIndex: Compact<u128>;
readonly isGeneralKey: boolean;
readonly asGeneralKey: Bytes;
readonly isOnlyChild: boolean;
}
/** @name MultiAsset */
export interface MultiAsset extends Enum {
readonly isNone: boolean;
readonly isAll: boolean;
readonly isAllFungible: boolean;
readonly isAllNonFungible: boolean;
readonly isAllAbstractFungible: boolean;
readonly asAllAbstractFungible: Bytes;
readonly isAllAbstractNonFungible: boolean;
readonly asAllAbstractNonFungible: Bytes;
readonly isAllConcreteFungible: boolean;
readonly asAllConcreteFungible: MultiLocation;
readonly isAllConcreteNonFungible: boolean;
readonly asAllConcreteNonFungible: MultiLocation;
readonly isAbstractFungible: boolean;
readonly asAbstractFungible: MultiAssetAbstractFungible;
readonly isAbstractNonFungible: boolean;
readonly asAbstractNonFungible: MultiAssetAbstractNonFungible;
readonly isConcreteFungible: boolean;
readonly asConcreteFungible: MultiAssetConcreteFungible;
readonly isConcreteNonFungible: boolean;
readonly asConcreteNonFungible: MultiAssetConcreteNonFungible;
}
/** @name MultiAssetAbstractFungible */
export interface MultiAssetAbstractFungible extends Struct {
readonly id: Bytes;
readonly instance: Compact<u128>;
}
/** @name MultiAssetAbstractNonFungible */
export interface MultiAssetAbstractNonFungible extends Struct {
readonly class: Bytes;
readonly instance: AssetInstance;
}
/** @name MultiAssetConcreteFungible */
export interface MultiAssetConcreteFungible extends Struct {
readonly id: MultiLocation;
readonly amount: Compact<u128>;
}
/** @name MultiAssetConcreteNonFungible */
export interface MultiAssetConcreteNonFungible extends Struct {
readonly class: MultiLocation;
readonly instance: AssetInstance;
}
/** @name MultiLocation */
export interface MultiLocation extends Enum {
readonly isNull: boolean;
readonly isX1: boolean;
readonly asX1: Junction;
readonly isX2: boolean;
readonly asX2: ITuple<[Junction, Junction]>;
readonly isX3: boolean;
readonly asX3: ITuple<[Junction, Junction, Junction]>;
readonly isX4: boolean;
readonly asX4: ITuple<[Junction, Junction, Junction, Junction]>;
readonly isX5: boolean;
readonly asX5: ITuple<[Junction, Junction, Junction, Junction, Junction]>;
readonly isX6: boolean;
readonly asX6: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX7: boolean;
readonly asX7: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
readonly isX8: boolean;
readonly asX8: ITuple<[Junction, Junction, Junction, Junction, Junction, Junction, Junction, Junction]>;
}
/** @name NetworkId */
export interface NetworkId extends Enum {
readonly isAny: boolean;
readonly isNamed: boolean;
readonly asNamed: Bytes;
readonly isPolkadot: boolean;
readonly isKusama: boolean;
}
/** @name VersionedMultiAsset */
export interface VersionedMultiAsset extends Enum {
readonly isV0: boolean;
readonly asV0: MultiAsset;
}
/** @name VersionedMultiLocation */
export interface VersionedMultiLocation extends Enum {
readonly isV0: boolean;
readonly asV0: MultiLocation;
}
/** @name VersionedXcm */
export interface VersionedXcm extends Enum {
readonly isV0: boolean;
readonly asV0: Xcm;
}
/** @name Xcm */
export interface Xcm extends Enum {
readonly isWithdrawAsset: boolean;
readonly asWithdrawAsset: XcmWithdrawAsset;
readonly isReserveAssetDeposit: boolean;
readonly asReserveAssetDeposit: XcmReserveAssetDeposit;
readonly isTeleportAsset: boolean;
readonly asTeleportAsset: XcmTeleportAsset;
readonly isQueryResponse: boolean;
readonly asQueryResponse: XcmQueryResponse;
readonly isTransferAsset: boolean;
readonly asTransferAsset: XcmTransferAsset;
readonly isTransferReserveAsset: boolean;
readonly asTransferReserveAsset: XcmTransferReserveAsset;
readonly isTransact: boolean;
readonly asTransact: XcmTransact;
readonly isHrmpNewChannelOpenRequest: boolean;
readonly asHrmpNewChannelOpenRequest: XcmHrmpNewChannelOpenRequest;
readonly isHrmpChannelAccepted: boolean;
readonly asHrmpChannelAccepted: XcmHrmpChannelAccepted;
readonly isHrmpChannelClosing: boolean;
readonly asHrmpChannelClosing: XcmHrmpChannelClosing;
readonly isRelayedFrom: boolean;
readonly asRelayedFrom: XcmRelayedFrom;
}
/** @name XcmAssetEffects */
export interface XcmAssetEffects extends Struct {
readonly assets: Vec<MultiAsset>;
readonly effects: Vec<XcmOrder>;
}
/** @name XcmError */
export interface XcmError extends Enum {
readonly isUndefined: boolean;
readonly isOverflow: boolean;
readonly isUnimplemented: boolean;
readonly isUnhandledXcmVersion: boolean;
readonly isUnhandledXcmMessage: boolean;
readonly isUnhandledEffect: boolean;
readonly isEscalationOfPrivilege: boolean;
readonly isUntrustedReserveLocation: boolean;
readonly isUntrustedTeleportLocation: boolean;
readonly isDestinationBufferOverflow: boolean;
readonly isSendFailed: boolean;
readonly isCannotReachDestination: boolean;
readonly asCannotReachDestination: ITuple<[MultiLocation, Xcm]>;
readonly isMultiLocationFull: boolean;
readonly isFailedToDecode: boolean;
readonly isBadOrigin: boolean;
readonly isExceedsMaxMessageSize: boolean;
readonly isFailedToTransactAsset: boolean;
readonly isWeightLimitReached: boolean;
readonly isWildcard: boolean;
readonly isTooMuchWeightRequired: boolean;
readonly isNotHoldingFees: boolean;
readonly isWeightNotComputable: boolean;
readonly isBarrier: boolean;
readonly isNotWithdrawable: boolean;
readonly isLocationCannotHold: boolean;
}
/** @name XcmHrmpChannelAccepted */
export interface XcmHrmpChannelAccepted extends Struct {
readonly recipient: Compact<u32>;
}
/** @name XcmHrmpChannelClosing */
export interface XcmHrmpChannelClosing extends Struct {
readonly initiator: Compact<u32>;
readonly sender: Compact<u32>;
readonly recipient: Compact<u32>;
}
/** @name XcmHrmpNewChannelOpenRequest */
export interface XcmHrmpNewChannelOpenRequest extends Struct {
readonly sender: Compact<u32>;
readonly maxMessageSize: Compact<u32>;
readonly maxCapacity: Compact<u32>;
}
/** @name XcmOrder */
export interface XcmOrder extends Enum {
readonly isNull: boolean;
readonly isDepositAsset: boolean;
readonly asDepositAsset: XcmOrderDepositAsset;
readonly isDepositReserveAsset: boolean;
readonly asDepositReserveAsset: XcmOrderDepositReserveAsset;
readonly isExchangeAsset: boolean;
readonly asExchangeAsset: XcmOrderExchangeAsset;
readonly isInitiateReserveWithdraw: boolean;
readonly asInitiateReserveWithdraw: XcmOrderInitiateReserveWithdraw;
readonly isInitiateTeleport: boolean;
readonly asInitiateTeleport: XcmOrderInitiateTeleport;
readonly isQueryHolding: boolean;
readonly asQueryHolding: XcmOrderQueryHolding;
readonly isBuyExecution: boolean;
readonly asBuyExecution: XcmOrderBuyExecution;
}
/** @name XcmOrderBuyExecution */
export interface XcmOrderBuyExecution extends Struct {
readonly fees: MultiAsset;
readonly weight: u64;
readonly debt: u64;
readonly haltOnError: bool;
readonly xcm: Vec<Xcm>;
}
/** @name XcmOrderDepositAsset */
export interface XcmOrderDepositAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
}
/** @name XcmOrderDepositReserveAsset */
export interface XcmOrderDepositReserveAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
readonly effects: Vec<XcmOrder>;
}
/** @name XcmOrderExchangeAsset */
export interface XcmOrderExchangeAsset extends Struct {
readonly give: Vec<MultiAsset>;
readonly receive: Vec<MultiAsset>;
}
/** @name XcmOrderInitiateReserveWithdraw */
export interface XcmOrderInitiateReserveWithdraw extends Struct {
readonly assets: Vec<MultiAsset>;
readonly reserve: MultiLocation;
readonly effects: Vec<XcmOrder>;
}
/** @name XcmOrderInitiateTeleport */
export interface XcmOrderInitiateTeleport extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
readonly effects: Vec<XcmOrder>;
}
/** @name XcmOrderQueryHolding */
export interface XcmOrderQueryHolding extends Struct {
readonly queryId: Compact<u64>;
readonly dest: MultiLocation;
readonly assets: Vec<MultiAsset>;
}
/** @name XcmOriginKind */
export interface XcmOriginKind extends Enum {
readonly isNative: boolean;
readonly isSovereignAccount: boolean;
readonly isSuperuser: boolean;
}
/** @name XcmOutcome */
export interface XcmOutcome extends Enum {
readonly isComplete: boolean;
readonly asComplete: Weight;
readonly isIncomplete: boolean;
readonly asIncomplete: ITuple<[Weight, XcmError]>;
readonly isError: boolean;
readonly asError: XcmError;
}
/** @name XcmQueryResponse */
export interface XcmQueryResponse extends Struct {
readonly queryId: Compact<u64>;
readonly response: XcmResponse;
}
/** @name XcmRelayedFrom */
export interface XcmRelayedFrom extends Struct {
readonly who: MultiLocation;
readonly message: Xcm;
}
/** @name XcmReserveAssetDeposit */
export interface XcmReserveAssetDeposit extends XcmAssetEffects {}
/** @name XcmResponse */
export interface XcmResponse extends Enum {
readonly isAssets: boolean;
readonly asAssets: Vec<MultiAsset>;
}
/** @name XcmTeleportAsset */
export interface XcmTeleportAsset extends XcmAssetEffects {}
/** @name XcmTransact */
export interface XcmTransact extends Struct {
readonly originType: XcmOriginKind;
readonly requireWeightAtMost: u64;
readonly call: DoubleEncodedCall;
}
/** @name XcmTransferAsset */
export interface XcmTransferAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
}
/** @name XcmTransferReserveAsset */
export interface XcmTransferReserveAsset extends Struct {
readonly assets: Vec<MultiAsset>;
readonly dest: MultiLocation;
readonly effects: Vec<XcmOrder>;
}
/** @name XcmWithdrawAsset */
export interface XcmWithdrawAsset extends XcmAssetEffects {}
export type PHANTOM_XCM = 'xcm';
+1 -1
View File
@@ -3,4 +3,4 @@
// Auto-generated by @polkadot/dev, do not edit
export const packageInfo = { name: '@polkadot/types', version: '4.5.1' };
export const packageInfo = { name: '@polkadot/types', version: '4.6.1' };
+1
View File
@@ -12,6 +12,7 @@ export interface ISubmittableResult {
readonly dispatchError?: DispatchError;
readonly dispatchInfo?: DispatchInfo;
readonly events: EventRecord[];
readonly internalError?: Error;
readonly status: ExtrinsicStatus;
readonly isCompleted: boolean;
readonly isError: boolean;
+485 -420
View File
File diff suppressed because it is too large Load Diff