Add Xcm Plurality types (#3411)
This commit is contained in:
@@ -54,7 +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';
|
||||
import type { AccountId32Junction, AccountIndex64Junction, AccountKey20Junction, AssetInstance, BodyId, BodyPart, BodyPartAtLeastProportion, BodyPartFraction, BodyPartMoreThanProportion, DoubleEncodedCall, Junction, MultiAsset, MultiAssetAbstractFungible, MultiAssetAbstractNonFungible, MultiAssetConcreteFungible, MultiAssetConcreteNonFungible, MultiLocation, NetworkId, PluralityJunction, 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 {
|
||||
@@ -226,6 +226,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<BlockLength>': Option<BlockLength>;
|
||||
'Option<BlockNumber>': Option<BlockNumber>;
|
||||
'Option<BlockWeights>': Option<BlockWeights>;
|
||||
'Option<BodyId>': Option<BodyId>;
|
||||
'Option<BodyPart>': Option<BodyPart>;
|
||||
'Option<BodyPartAtLeastProportion>': Option<BodyPartAtLeastProportion>;
|
||||
'Option<BodyPartFraction>': Option<BodyPartFraction>;
|
||||
'Option<BodyPartMoreThanProportion>': Option<BodyPartMoreThanProportion>;
|
||||
'Option<bool>': Option<bool>;
|
||||
'Option<Bool>': Option<Bool>;
|
||||
'Option<Bounty>': Option<Bounty>;
|
||||
@@ -645,6 +650,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Option<PhantomData>': Option<PhantomData>;
|
||||
'Option<Phase>': Option<Phase>;
|
||||
'Option<PhragmenScore>': Option<PhragmenScore>;
|
||||
'Option<PluralityJunction>': Option<PluralityJunction>;
|
||||
'Option<Points>': Option<Points>;
|
||||
'Option<Precommits>': Option<Precommits>;
|
||||
'Option<PrefabWasmModule>': Option<PrefabWasmModule>;
|
||||
@@ -1011,6 +1017,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<BlockLength>': Vec<BlockLength>;
|
||||
'Vec<BlockNumber>': Vec<BlockNumber>;
|
||||
'Vec<BlockWeights>': Vec<BlockWeights>;
|
||||
'Vec<BodyId>': Vec<BodyId>;
|
||||
'Vec<BodyPart>': Vec<BodyPart>;
|
||||
'Vec<BodyPartAtLeastProportion>': Vec<BodyPartAtLeastProportion>;
|
||||
'Vec<BodyPartFraction>': Vec<BodyPartFraction>;
|
||||
'Vec<BodyPartMoreThanProportion>': Vec<BodyPartMoreThanProportion>;
|
||||
'Vec<bool>': Vec<bool>;
|
||||
'Vec<Bool>': Vec<Bool>;
|
||||
'Vec<Bounty>': Vec<Bounty>;
|
||||
@@ -1430,6 +1441,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
'Vec<PhantomData>': Vec<PhantomData>;
|
||||
'Vec<Phase>': Vec<Phase>;
|
||||
'Vec<PhragmenScore>': Vec<PhragmenScore>;
|
||||
'Vec<PluralityJunction>': Vec<PluralityJunction>;
|
||||
'Vec<Points>': Vec<Points>;
|
||||
'Vec<Precommits>': Vec<Precommits>;
|
||||
'Vec<PrefabWasmModule>': Vec<PrefabWasmModule>;
|
||||
@@ -1796,6 +1808,11 @@ declare module '@polkadot/types/types/registry' {
|
||||
BlockLength: BlockLength;
|
||||
BlockNumber: BlockNumber;
|
||||
BlockWeights: BlockWeights;
|
||||
BodyId: BodyId;
|
||||
BodyPart: BodyPart;
|
||||
BodyPartAtLeastProportion: BodyPartAtLeastProportion;
|
||||
BodyPartFraction: BodyPartFraction;
|
||||
BodyPartMoreThanProportion: BodyPartMoreThanProportion;
|
||||
bool: bool;
|
||||
Bool: Bool;
|
||||
Bounty: Bounty;
|
||||
@@ -2215,6 +2232,7 @@ declare module '@polkadot/types/types/registry' {
|
||||
PhantomData: PhantomData;
|
||||
Phase: Phase;
|
||||
PhragmenScore: PhragmenScore;
|
||||
PluralityJunction: PluralityJunction;
|
||||
Points: Points;
|
||||
Precommits: Precommits;
|
||||
PrefabWasmModule: PrefabWasmModule;
|
||||
|
||||
@@ -106,21 +106,78 @@ const multiAsset = {
|
||||
}
|
||||
};
|
||||
|
||||
const junction = {
|
||||
BodyId: {
|
||||
_enum: {
|
||||
Unit: 'Null',
|
||||
Named: 'Vec<u8>',
|
||||
Index: 'Compact<u32>',
|
||||
Executive: 'Null',
|
||||
Technical: 'Null',
|
||||
Legislative: 'Null',
|
||||
Judicial: 'Null'
|
||||
}
|
||||
},
|
||||
BodyPart: {
|
||||
_enum: {
|
||||
Voice: 'Null',
|
||||
Members: 'Compact<u32>',
|
||||
Fraction: 'BodyPartFraction',
|
||||
AtLeastProportion: 'BodyPartAtLeastProportion',
|
||||
MoreThanProportion: 'BodyPartMoreThanProportion'
|
||||
}
|
||||
},
|
||||
BodyPartFraction: { nom: 'Compact<u32>', denom: 'Compact<u32>' },
|
||||
BodyPartAtLeastProportion: { nom: 'Compact<u32>', denom: 'Compact<u32>' },
|
||||
BodyPartMoreThanProportion: { nom: 'Compact<u32>', denom: 'Compact<u32>' },
|
||||
AccountId32Junction: {
|
||||
network: 'NetworkId',
|
||||
id: 'AccountId'
|
||||
},
|
||||
AccountIndex64Junction: {
|
||||
network: 'NetworkId',
|
||||
index: 'Compact<u64>'
|
||||
},
|
||||
AccountKey20Junction: {
|
||||
network: 'NetworkId',
|
||||
index: '[u8; 20]'
|
||||
},
|
||||
PluralityJunction: {
|
||||
id: 'BodyId',
|
||||
part: 'BodyPart'
|
||||
},
|
||||
Junction: {
|
||||
_enum: {
|
||||
Parent: 'Null',
|
||||
Parachain: 'Compact<u32>',
|
||||
AccountId32: 'AccountId32Junction',
|
||||
AccountIndex64: 'AccountIndex64Junction',
|
||||
AccountKey20: 'AccountKey20Junction',
|
||||
PalletInstance: 'u8',
|
||||
GeneralIndex: 'Compact<u128>',
|
||||
GeneralKey: 'Vec<u8>',
|
||||
OnlyChild: 'Null',
|
||||
Plurality: 'PluralityJunction'
|
||||
}
|
||||
},
|
||||
NetworkId: {
|
||||
_enum: {
|
||||
Any: 'Null',
|
||||
Named: 'Vec<u8>',
|
||||
Polkadot: 'Null',
|
||||
Kusama: 'Null'
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export default {
|
||||
rpc: {},
|
||||
types: {
|
||||
...junction,
|
||||
...multiAsset,
|
||||
...xcm,
|
||||
...xmcOrder,
|
||||
DoubleEncodedCall: { encoded: 'Vec<u8>' },
|
||||
NetworkId: {
|
||||
_enum: {
|
||||
Any: 'Null',
|
||||
Named: 'Vec<u8>',
|
||||
Polkadot: 'Null',
|
||||
Kusama: 'Null'
|
||||
}
|
||||
},
|
||||
XcmOriginKind: {
|
||||
_enum: ['Native', 'SovereignAccount', 'Superuser']
|
||||
},
|
||||
@@ -178,31 +235,6 @@ export default {
|
||||
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'
|
||||
|
||||
@@ -48,6 +48,50 @@ export interface AssetInstance extends Enum {
|
||||
readonly asBlob: Bytes;
|
||||
}
|
||||
|
||||
/** @name BodyId */
|
||||
export interface BodyId extends Enum {
|
||||
readonly isUnit: boolean;
|
||||
readonly isNamed: boolean;
|
||||
readonly asNamed: Bytes;
|
||||
readonly isIndex: boolean;
|
||||
readonly asIndex: Compact<u32>;
|
||||
readonly isExecutive: boolean;
|
||||
readonly isTechnical: boolean;
|
||||
readonly isLegislative: boolean;
|
||||
readonly isJudicial: boolean;
|
||||
}
|
||||
|
||||
/** @name BodyPart */
|
||||
export interface BodyPart extends Enum {
|
||||
readonly isVoice: boolean;
|
||||
readonly isMembers: boolean;
|
||||
readonly asMembers: Compact<u32>;
|
||||
readonly isFraction: boolean;
|
||||
readonly asFraction: BodyPartFraction;
|
||||
readonly isAtLeastProportion: boolean;
|
||||
readonly asAtLeastProportion: BodyPartAtLeastProportion;
|
||||
readonly isMoreThanProportion: boolean;
|
||||
readonly asMoreThanProportion: BodyPartMoreThanProportion;
|
||||
}
|
||||
|
||||
/** @name BodyPartAtLeastProportion */
|
||||
export interface BodyPartAtLeastProportion extends Struct {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
}
|
||||
|
||||
/** @name BodyPartFraction */
|
||||
export interface BodyPartFraction extends Struct {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
}
|
||||
|
||||
/** @name BodyPartMoreThanProportion */
|
||||
export interface BodyPartMoreThanProportion extends Struct {
|
||||
readonly nom: Compact<u32>;
|
||||
readonly denom: Compact<u32>;
|
||||
}
|
||||
|
||||
/** @name DoubleEncodedCall */
|
||||
export interface DoubleEncodedCall extends Struct {
|
||||
readonly encoded: Bytes;
|
||||
@@ -71,6 +115,8 @@ export interface Junction extends Enum {
|
||||
readonly isGeneralKey: boolean;
|
||||
readonly asGeneralKey: Bytes;
|
||||
readonly isOnlyChild: boolean;
|
||||
readonly isPlurality: boolean;
|
||||
readonly asPlurality: PluralityJunction;
|
||||
}
|
||||
|
||||
/** @name MultiAsset */
|
||||
@@ -151,6 +197,12 @@ export interface NetworkId extends Enum {
|
||||
readonly isKusama: boolean;
|
||||
}
|
||||
|
||||
/** @name PluralityJunction */
|
||||
export interface PluralityJunction extends Struct {
|
||||
readonly id: BodyId;
|
||||
readonly part: BodyPart;
|
||||
}
|
||||
|
||||
/** @name VersionedMultiAsset */
|
||||
export interface VersionedMultiAsset extends Enum {
|
||||
readonly isV0: boolean;
|
||||
|
||||
Reference in New Issue
Block a user