@polkadot/types
Version:
Implementation of the Parity codec
1,526 lines (1,497 loc) • 678 kB
JavaScript
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@polkadot/util'), require('@polkadot/util-crypto')) :
typeof define === 'function' && define.amd ? define(['exports', '@polkadot/util', '@polkadot/util-crypto'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.polkadotTypes = {}, global.polkadotUtil, global.polkadotUtilCrypto));
})(this, (function (exports, util, utilCrypto) { 'use strict';
const global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : window;
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
const AllHashers = {
Blake2_128: null,
Blake2_256: null,
Blake2_128Concat: null,
Twox128: null,
Twox256: null,
Twox64Concat: null,
Identity: null
};
const META_V1_TO_V2 = {
metadata: {
description: 'Returns the metadata of a runtime',
params: [],
type: 'OpaqueMetadata'
}
};
const runtime$z = {
Metadata: [
{
methods: {
metadata_at_version: {
description: 'Returns the metadata at a given version.',
params: [
{
name: 'version',
type: 'u32'
}
],
type: 'Option<OpaqueMetadata>'
},
metadata_versions: {
description: 'Returns the supported metadata versions.',
params: [],
type: 'Vec<u32>'
},
...META_V1_TO_V2
},
version: 2
},
{
methods: {
...META_V1_TO_V2
},
version: 1
}
]
};
const v9 = {
ErrorMetadataV9: {
name: 'Text',
docs: 'Vec<Text>'
},
EventMetadataV9: {
name: 'Text',
args: 'Vec<Type>',
docs: 'Vec<Text>'
},
FunctionArgumentMetadataV9: {
name: 'Text',
type: 'Type'
},
FunctionMetadataV9: {
name: 'Text',
args: 'Vec<FunctionArgumentMetadataV9>',
docs: 'Vec<Text>'
},
MetadataV9: {
modules: 'Vec<ModuleMetadataV9>'
},
ModuleConstantMetadataV9: {
name: 'Text',
type: 'Type',
value: 'Bytes',
docs: 'Vec<Text>'
},
ModuleMetadataV9: {
name: 'Text',
storage: 'Option<StorageMetadataV9>',
calls: 'Option<Vec<FunctionMetadataV9>>',
events: 'Option<Vec<EventMetadataV9>>',
constants: 'Vec<ModuleConstantMetadataV9>',
errors: 'Vec<ErrorMetadataV9>'
},
StorageEntryMetadataV9: {
name: 'Text',
modifier: 'StorageEntryModifierV9',
type: 'StorageEntryTypeV9',
fallback: 'Bytes',
docs: 'Vec<Text>'
},
StorageEntryModifierV9: {
_enum: ['Optional', 'Default', 'Required']
},
StorageEntryTypeV9: {
_enum: {
Plain: 'Type',
Map: {
hasher: 'StorageHasherV9',
key: 'Type',
value: 'Type',
linked: 'bool'
},
DoubleMap: {
hasher: 'StorageHasherV9',
key1: 'Type',
key2: 'Type',
value: 'Type',
key2Hasher: 'StorageHasherV9'
}
}
},
StorageHasherV9: {
_enum: {
Blake2_128: null,
Blake2_256: null,
Twox128: null,
Twox256: null,
Twox64Concat: null
}
},
StorageMetadataV9: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV9>'
}
};
const v10 = {
ErrorMetadataV10: 'ErrorMetadataV9',
EventMetadataV10: 'EventMetadataV9',
FunctionArgumentMetadataV10: 'FunctionArgumentMetadataV9',
FunctionMetadataV10: 'FunctionMetadataV9',
MetadataV10: {
modules: 'Vec<ModuleMetadataV10>'
},
ModuleConstantMetadataV10: 'ModuleConstantMetadataV9',
ModuleMetadataV10: {
name: 'Text',
storage: 'Option<StorageMetadataV10>',
calls: 'Option<Vec<FunctionMetadataV10>>',
events: 'Option<Vec<EventMetadataV10>>',
constants: 'Vec<ModuleConstantMetadataV10>',
errors: 'Vec<ErrorMetadataV10>'
},
StorageEntryModifierV10: 'StorageEntryModifierV9',
StorageEntryMetadataV10: {
name: 'Text',
modifier: 'StorageEntryModifierV10',
type: 'StorageEntryTypeV10',
fallback: 'Bytes',
docs: 'Vec<Text>'
},
StorageEntryTypeV10: {
_enum: {
Plain: 'Type',
Map: {
hasher: 'StorageHasherV10',
key: 'Type',
value: 'Type',
linked: 'bool'
},
DoubleMap: {
hasher: 'StorageHasherV10',
key1: 'Type',
key2: 'Type',
value: 'Type',
key2Hasher: 'StorageHasherV10'
}
}
},
StorageMetadataV10: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV10>'
},
StorageHasherV10: {
_enum: {
Blake2_128: null,
Blake2_256: null,
Blake2_128Concat: null,
Twox128: null,
Twox256: null,
Twox64Concat: null
}
}
};
const v11 = {
ErrorMetadataV11: 'ErrorMetadataV10',
EventMetadataV11: 'EventMetadataV10',
ExtrinsicMetadataV11: {
version: 'u8',
signedExtensions: 'Vec<Text>'
},
FunctionArgumentMetadataV11: 'FunctionArgumentMetadataV10',
FunctionMetadataV11: 'FunctionMetadataV10',
MetadataV11: {
modules: 'Vec<ModuleMetadataV11>',
extrinsic: 'ExtrinsicMetadataV11'
},
ModuleConstantMetadataV11: 'ModuleConstantMetadataV10',
ModuleMetadataV11: {
name: 'Text',
storage: 'Option<StorageMetadataV11>',
calls: 'Option<Vec<FunctionMetadataV11>>',
events: 'Option<Vec<EventMetadataV11>>',
constants: 'Vec<ModuleConstantMetadataV11>',
errors: 'Vec<ErrorMetadataV11>'
},
StorageEntryModifierV11: 'StorageEntryModifierV10',
StorageEntryMetadataV11: {
name: 'Text',
modifier: 'StorageEntryModifierV11',
type: 'StorageEntryTypeV11',
fallback: 'Bytes',
docs: 'Vec<Text>'
},
StorageEntryTypeV11: {
_enum: {
Plain: 'Type',
Map: {
hasher: 'StorageHasherV11',
key: 'Type',
value: 'Type',
linked: 'bool'
},
DoubleMap: {
hasher: 'StorageHasherV11',
key1: 'Type',
key2: 'Type',
value: 'Type',
key2Hasher: 'StorageHasherV11'
}
}
},
StorageMetadataV11: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV11>'
},
StorageHasherV11: {
_enum: AllHashers
}
};
const v12 = {
ErrorMetadataV12: 'ErrorMetadataV11',
EventMetadataV12: 'EventMetadataV11',
ExtrinsicMetadataV12: 'ExtrinsicMetadataV11',
FunctionArgumentMetadataV12: 'FunctionArgumentMetadataV11',
FunctionMetadataV12: 'FunctionMetadataV11',
MetadataV12: {
modules: 'Vec<ModuleMetadataV12>',
extrinsic: 'ExtrinsicMetadataV12'
},
ModuleConstantMetadataV12: 'ModuleConstantMetadataV11',
ModuleMetadataV12: {
name: 'Text',
storage: 'Option<StorageMetadataV12>',
calls: 'Option<Vec<FunctionMetadataV12>>',
events: 'Option<Vec<EventMetadataV12>>',
constants: 'Vec<ModuleConstantMetadataV12>',
errors: 'Vec<ErrorMetadataV12>',
index: 'u8'
},
StorageEntryModifierV12: 'StorageEntryModifierV11',
StorageEntryMetadataV12: 'StorageEntryMetadataV11',
StorageEntryTypeV12: 'StorageEntryTypeV11',
StorageMetadataV12: 'StorageMetadataV11',
StorageHasherV12: 'StorageHasherV11'
};
const v13 = {
ErrorMetadataV13: 'ErrorMetadataV12',
EventMetadataV13: 'EventMetadataV12',
ExtrinsicMetadataV13: 'ExtrinsicMetadataV12',
FunctionArgumentMetadataV13: 'FunctionArgumentMetadataV12',
FunctionMetadataV13: 'FunctionMetadataV12',
MetadataV13: {
modules: 'Vec<ModuleMetadataV13>',
extrinsic: 'ExtrinsicMetadataV13'
},
ModuleConstantMetadataV13: 'ModuleConstantMetadataV12',
ModuleMetadataV13: {
name: 'Text',
storage: 'Option<StorageMetadataV13>',
calls: 'Option<Vec<FunctionMetadataV13>>',
events: 'Option<Vec<EventMetadataV13>>',
constants: 'Vec<ModuleConstantMetadataV13>',
errors: 'Vec<ErrorMetadataV13>',
index: 'u8'
},
StorageEntryModifierV13: 'StorageEntryModifierV12',
StorageEntryMetadataV13: {
name: 'Text',
modifier: 'StorageEntryModifierV13',
type: 'StorageEntryTypeV13',
fallback: 'Bytes',
docs: 'Vec<Text>'
},
StorageEntryTypeV13: {
_enum: {
Plain: 'Type',
Map: {
hasher: 'StorageHasherV13',
key: 'Type',
value: 'Type',
linked: 'bool'
},
DoubleMap: {
hasher: 'StorageHasherV13',
key1: 'Type',
key2: 'Type',
value: 'Type',
key2Hasher: 'StorageHasherV13'
},
NMap: {
keyVec: 'Vec<Type>',
hashers: 'Vec<StorageHasherV13>',
value: 'Type'
}
}
},
StorageMetadataV13: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV13>'
},
StorageHasherV13: 'StorageHasherV12'
};
const Si1Variant = {
name: 'Text',
fields: 'Vec<Si1Field>',
index: 'u8',
docs: 'Vec<Text>'
};
const v1$1 = {
Si1Field: {
name: 'Option<Text>',
type: 'Si1LookupTypeId',
typeName: 'Option<Text>',
docs: 'Vec<Text>'
},
Si1LookupTypeId: 'Compact<u32>',
Si1Path: 'Si0Path',
Si1Type: {
path: 'Si1Path',
params: 'Vec<Si1TypeParameter>',
def: 'Si1TypeDef',
docs: 'Vec<Text>'
},
Si1TypeDef: {
_enum: {
Composite: 'Si1TypeDefComposite',
Variant: 'Si1TypeDefVariant',
Sequence: 'Si1TypeDefSequence',
Array: 'Si1TypeDefArray',
Tuple: 'Si1TypeDefTuple',
Primitive: 'Si1TypeDefPrimitive',
Compact: 'Si1TypeDefCompact',
BitSequence: 'Si1TypeDefBitSequence',
HistoricMetaCompat: 'Type'
}
},
Si1TypeDefArray: {
len: 'u32',
type: 'Si1LookupTypeId'
},
Si1TypeDefBitSequence: {
bitStoreType: 'Si1LookupTypeId',
bitOrderType: 'Si1LookupTypeId'
},
Si1TypeDefCompact: {
type: 'Si1LookupTypeId'
},
Si1TypeDefComposite: {
fields: 'Vec<Si1Field>'
},
Si1TypeDefPrimitive: 'Si0TypeDefPrimitive',
Si1TypeDefSequence: {
type: 'Si1LookupTypeId'
},
Si1TypeDefTuple: 'Vec<Si1LookupTypeId>',
Si1TypeParameter: {
name: 'Text',
type: 'Option<Si1LookupTypeId>'
},
Si1TypeDefVariant: {
variants: 'Vec<Si1Variant>'
},
Si1Variant
};
const v14 = {
PortableTypeV14: {
id: 'Si1LookupTypeId',
type: 'Si1Type'
},
ErrorMetadataV14: {
...Si1Variant,
args: 'Vec<Type>'
},
EventMetadataV14: {
...Si1Variant,
args: 'Vec<Type>'
},
FunctionArgumentMetadataV14: {
name: 'Text',
type: 'Type',
typeName: 'Option<Type>'
},
FunctionMetadataV14: {
...Si1Variant,
args: 'Vec<FunctionArgumentMetadataV14>'
},
ExtrinsicMetadataV14: {
type: 'SiLookupTypeId',
version: 'u8',
signedExtensions: 'Vec<SignedExtensionMetadataV14>'
},
MetadataV14: {
lookup: 'PortableRegistry',
pallets: 'Vec<PalletMetadataV14>',
extrinsic: 'ExtrinsicMetadataV14',
type: 'SiLookupTypeId'
},
PalletCallMetadataV14: {
type: 'SiLookupTypeId'
},
PalletConstantMetadataV14: {
name: 'Text',
type: 'SiLookupTypeId',
value: 'Bytes',
docs: 'Vec<Text>'
},
PalletErrorMetadataV14: {
type: 'SiLookupTypeId'
},
PalletEventMetadataV14: {
type: 'SiLookupTypeId'
},
PalletMetadataV14: {
name: 'Text',
storage: 'Option<PalletStorageMetadataV14>',
calls: 'Option<PalletCallMetadataV14>',
events: 'Option<PalletEventMetadataV14>',
constants: 'Vec<PalletConstantMetadataV14>',
errors: 'Option<PalletErrorMetadataV14>',
index: 'u8'
},
PalletStorageMetadataV14: {
prefix: 'Text',
items: 'Vec<StorageEntryMetadataV14>'
},
SignedExtensionMetadataV14: {
identifier: 'Text',
type: 'SiLookupTypeId',
additionalSigned: 'SiLookupTypeId'
},
StorageEntryMetadataV14: {
name: 'Text',
modifier: 'StorageEntryModifierV14',
type: 'StorageEntryTypeV14',
fallback: 'Bytes',
docs: 'Vec<Text>'
},
StorageEntryModifierV14: 'StorageEntryModifierV13',
StorageEntryTypeV14: {
_enum: {
Plain: 'SiLookupTypeId',
Map: {
hashers: 'Vec<StorageHasherV14>',
key: 'SiLookupTypeId',
value: 'SiLookupTypeId'
}
}
},
StorageHasherV14: 'StorageHasherV13'
};
const v15 = {
CustomMetadata15: {
map: 'BTreeMap<Text, CustomValueMetadata15>'
},
CustomValueMetadata15: {
type: 'SiLookupTypeId',
value: 'Bytes'
},
ExtrinsicMetadataV15: {
version: 'u8',
addressType: 'SiLookupTypeId',
callType: 'SiLookupTypeId',
signatureType: 'SiLookupTypeId',
extraType: 'SiLookupTypeId',
signedExtensions: 'Vec<SignedExtensionMetadataV14>'
},
OuterEnums15: {
callType: 'SiLookupTypeId',
eventType: 'SiLookupTypeId',
errorType: 'SiLookupTypeId'
},
PalletMetadataV15: {
name: 'Text',
storage: 'Option<PalletStorageMetadataV14>',
calls: 'Option<PalletCallMetadataV14>',
events: 'Option<PalletEventMetadataV14>',
constants: 'Vec<PalletConstantMetadataV14>',
errors: 'Option<PalletErrorMetadataV14>',
index: 'u8',
docs: 'Vec<Text>'
},
RuntimeApiMetadataV15: {
name: 'Text',
methods: 'Vec<RuntimeApiMethodMetadataV15>',
docs: 'Vec<Text>'
},
RuntimeApiMethodMetadataV15: {
name: 'Text',
inputs: 'Vec<RuntimeApiMethodParamMetadataV15>',
output: 'SiLookupTypeId',
docs: 'Vec<Text>'
},
RuntimeApiMethodParamMetadataV15: {
name: 'Text',
type: 'SiLookupTypeId'
},
MetadataV15: {
lookup: 'PortableRegistry',
pallets: 'Vec<PalletMetadataV15>',
extrinsic: 'ExtrinsicMetadataV15',
type: 'SiLookupTypeId',
apis: 'Vec<RuntimeApiMetadataV15>',
outerEnums: 'OuterEnums15',
custom: 'CustomMetadata15'
}
};
const definitions$1d = {
rpc: {},
runtime: runtime$z,
types: {
...v9,
...v10,
...v11,
...v12,
...v13,
...v14,
...v15,
ErrorMetadataLatest: 'ErrorMetadataV14',
EventMetadataLatest: 'EventMetadataV14',
ExtrinsicMetadataLatest: 'ExtrinsicMetadataV15',
FunctionArgumentMetadataLatest: 'FunctionArgumentMetadataV14',
FunctionMetadataLatest: 'FunctionMetadataV14',
MetadataLatest: 'MetadataV15',
PalletCallMetadataLatest: 'PalletCallMetadataV14',
PalletConstantMetadataLatest: 'PalletConstantMetadataV14',
PalletErrorMetadataLatest: 'PalletErrorMetadataV14',
PalletEventMetadataLatest: 'PalletEventMetadataV14',
PalletMetadataLatest: 'PalletMetadataV15',
PalletStorageMetadataLatest: 'PalletStorageMetadataV14',
PortableType: 'PortableTypeV14',
RuntimeApiMetadataLatest: 'RuntimeApiMetadataV15',
SignedExtensionMetadataLatest: 'SignedExtensionMetadataV14',
StorageEntryMetadataLatest: 'StorageEntryMetadataV14',
StorageEntryModifierLatest: 'StorageEntryModifierV14',
StorageEntryTypeLatest: 'StorageEntryTypeV14',
StorageHasher: 'StorageHasherV14',
OpaqueMetadata: 'Opaque<Bytes>',
MetadataAll: {
_enum: {
V0: 'DoNotConstruct<MetadataV0>',
V1: 'DoNotConstruct<MetadataV1>',
V2: 'DoNotConstruct<MetadataV2>',
V3: 'DoNotConstruct<MetadataV3>',
V4: 'DoNotConstruct<MetadataV4>',
V5: 'DoNotConstruct<MetadataV5>',
V6: 'DoNotConstruct<MetadataV6>',
V7: 'DoNotConstruct<MetadataV7>',
V8: 'DoNotConstruct<MetadataV8>',
V9: 'MetadataV9',
V10: 'MetadataV10',
V11: 'MetadataV11',
V12: 'MetadataV12',
V13: 'MetadataV13',
V14: 'MetadataV14',
V15: 'MetadataV15'
}
}
}
};
const CORE_V1_TO_V4 = {
execute_block: {
description: 'Execute the given block.',
params: [
{
name: 'block',
type: 'Block'
}
],
type: 'Null'
}
};
const CORE_V1_TO_V2 = {
version: {
description: 'Returns the version of the runtime.',
params: [],
type: 'RuntimeVersionPre3'
}
};
const CORE_V2_TO_V4 = {
initialize_block: {
description: 'Initialize a block with the given header.',
params: [
{
name: 'header',
type: 'Header'
}
],
type: 'Null'
}
};
const CORE_V4_VERSION = {
version: {
description: 'Returns the version of the runtime.',
params: [],
type: 'RuntimeVersion'
}
};
const CORE_V4_TO_V5 = {
...CORE_V1_TO_V4,
initialize_block: {
description: 'Initialize a block with the given header.',
params: [
{
name: 'header',
type: 'Header'
}
],
type: 'ExtrinsicInclusionMode'
}
};
const runtime$y = {
Core: [
{
methods: {
...CORE_V4_VERSION,
...CORE_V4_TO_V5
},
version: 5
},
{
methods: {
...CORE_V4_VERSION,
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 4
},
{
methods: {
version: {
description: 'Returns the version of the runtime.',
params: [],
type: 'RuntimeVersionPre4'
},
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 3
},
{
methods: {
...CORE_V1_TO_V2,
...CORE_V1_TO_V4,
...CORE_V2_TO_V4
},
version: 2
},
{
methods: {
initialise_block: {
description: 'Initialize a block with the given header.',
params: [
{
name: 'header',
type: 'Header'
}
],
type: 'Null'
},
...CORE_V1_TO_V2,
...CORE_V1_TO_V4
},
version: 1
}
]
};
const numberTypes = {
Fixed64: 'Int<64, Fixed64>',
FixedI64: 'Int<64, FixedI64>',
FixedU64: 'UInt<64, FixedU64>',
Fixed128: 'Int<128, Fixed128>',
FixedI128: 'Int<128, FixedI128>',
FixedU128: 'UInt<128, FixedU128>',
I32F32: 'Int<64, I32F32>',
U32F32: 'UInt<64, U32F32>',
PerU16: 'UInt<16, PerU16>',
Perbill: 'UInt<32, Perbill>',
Percent: 'UInt<8, Percent>',
Permill: 'UInt<32, Permill>',
Perquintill: 'UInt<64, Perquintill>'
};
const knownOrigins = {
Council: 'CollectiveOrigin',
System: 'SystemOrigin',
TechnicalCommittee: 'CollectiveOrigin',
Xcm: 'XcmOrigin',
XcmPallet: 'XcmOrigin',
Authority: 'AuthorityOrigin',
GeneralCouncil: 'CollectiveOrigin'
};
const definitions$1c = {
rpc: {},
runtime: runtime$y,
types: {
...numberTypes,
AccountId: 'AccountId32',
AccountId20: 'GenericEthereumAccountId',
AccountId32: 'GenericAccountId32',
AccountId33: 'GenericAccountId33',
AccountIdOf: 'AccountId',
AccountIndex: 'GenericAccountIndex',
Address: 'MultiAddress',
AssetId: 'u32',
Balance: 'UInt<128, Balance>',
BalanceOf: 'Balance',
Block: 'GenericBlock',
BlockNumber: 'u32',
BlockNumberFor: 'BlockNumber',
BlockNumberOf: 'BlockNumber',
Call: 'GenericCall',
CallHash: 'Hash',
CallHashOf: 'CallHash',
ChangesTrieConfiguration: {
digestInterval: 'u32',
digestLevels: 'u32'
},
ChangesTrieSignal: {
_enum: {
NewConfiguration: 'Option<ChangesTrieConfiguration>'
}
},
ConsensusEngineId: 'GenericConsensusEngineId',
CodecHash: 'Hash',
CrateVersion: {
major: 'u16',
minor: 'u8',
patch: 'u8'
},
Digest: {
logs: 'Vec<DigestItem>'
},
DigestItem: {
_enum: {
Other: 'Bytes',
AuthoritiesChange: 'Vec<AuthorityId>',
ChangesTrieRoot: 'Hash',
SealV0: 'SealV0',
Consensus: 'Consensus',
Seal: 'Seal',
PreRuntime: 'PreRuntime',
ChangesTrieSignal: 'ChangesTrieSignal',
RuntimeEnvironmentUpdated: 'Null'
}
},
ExtrinsicsWeight: {
normal: 'Weight',
operational: 'Weight'
},
H32: '[u8; 4; H32]',
H64: '[u8; 8; H64]',
H128: '[u8; 16; H128]',
H160: '[u8; 20; H160]',
H256: '[u8; 32; H256]',
H512: '[u8; 64; H512]',
H1024: '[u8; 128; H1024]',
H2048: '[u8; 256; H2048]',
Hash: 'H256',
Header: {
parentHash: 'Hash',
number: 'Compact<BlockNumber>',
stateRoot: 'Hash',
extrinsicsRoot: 'Hash',
digest: 'Digest'
},
HeaderPartial: {
parentHash: 'Hash',
number: 'BlockNumber'
},
IndicesLookupSource: 'GenericLookupSource',
Index: 'u32',
Justification: '(ConsensusEngineId, EncodedJustification)',
EncodedJustification: 'Bytes',
Justifications: 'Vec<Justification>',
KeyValue: '(StorageKey, StorageData)',
KeyTypeId: 'u32',
LockIdentifier: '[u8; 8]',
LookupSource: 'MultiAddress',
LookupTarget: 'AccountId',
ModuleId: 'LockIdentifier',
MultiAddress: 'GenericMultiAddress',
MultiSigner: {
_enum: {
Ed25519: '[u8; 32]',
Sr25519: '[u8; 32]',
Ecdsa: '[u8; 33]'
}
},
Moment: 'UInt<64, Moment>',
OpaqueCall: 'Bytes',
Origin: 'DoNotConstruct<Origin>',
OriginCaller: {
_enum: {
System: 'SystemOrigin'
}
},
PalletId: 'LockIdentifier',
PalletsOrigin: 'OriginCaller',
PalletVersion: {
major: 'u16',
minor: 'u8',
patch: 'u8'
},
Pays: {
_enum: ['Yes', 'No']
},
Phantom: 'Null',
PhantomData: 'Null',
Releases: {
_enum: ['V1', 'V2', 'V3', 'V4', 'V5', 'V6', 'V7', 'V8', 'V9', 'V10']
},
RuntimeCall: 'Call',
RuntimeEvent: 'Event',
RuntimeDbWeight: {
read: 'Weight',
write: 'Weight'
},
SignedBlock: 'SignedBlockWithJustifications',
SignedBlockWithJustification: {
block: 'Block',
justification: 'Option<EncodedJustification>'
},
SignedBlockWithJustifications: {
block: 'Block',
justifications: 'Option<Justifications>'
},
Slot: 'u64',
SlotDuration: 'u64',
StorageData: 'Bytes',
StorageInfo: {
palletName: 'Bytes',
storage_name: 'Bytes',
prefix: 'Bytes',
maxValues: 'Option<u32>',
maxSize: 'Option<u32>'
},
StorageProof: {
trieNodes: 'Vec<Bytes>'
},
TransactionPriority: 'u64',
TransactionLongevity: 'u64',
TransactionTag: 'Bytes',
TransactionInfo: {
_alias: {
dataSize: 'size'
},
chunkRoot: 'H256',
contentHash: 'H256',
dataSize: 'u32',
blockChunks: 'u32'
},
TransactionStorageProof: {
chunk: 'Vec<u8>',
proof: 'Vec<Vec<u8>>'
},
ValidatorId: 'AccountId',
ValidatorIdOf: 'ValidatorId',
WeightV0: 'u32',
WeightV1: 'u64',
WeightV2: {
refTime: 'Compact<u64>',
proofSize: 'Compact<u64>'
},
Weight: 'WeightV2',
WeightMultiplier: 'Fixed64',
PreRuntime: '(ConsensusEngineId, Bytes)',
SealV0: '(u64, Signature)',
Seal: '(ConsensusEngineId, Bytes)',
Consensus: '(ConsensusEngineId, Bytes)',
ExtrinsicInclusionMode: {
_enum: ['AllExtrinsics', 'OnlyInherents']
}
}
};
const v0$1 = {
Si0Field: {
name: 'Option<Text>',
type: 'Si0LookupTypeId',
typeName: 'Option<Text>',
docs: 'Vec<Text>'
},
Si0LookupTypeId: 'u32',
Si0Path: 'Vec<Text>',
Si0Type: {
path: 'Si0Path',
params: 'Vec<Si0LookupTypeId>',
def: 'Si0TypeDef'
},
Si0TypeDef: {
_enum: {
Composite: 'Si0TypeDefComposite',
Variant: 'Si0TypeDefVariant',
Sequence: 'Si0TypeDefSequence',
Array: 'Si0TypeDefArray',
Tuple: 'Si0TypeDefTuple',
Primitive: 'Si0TypeDefPrimitive',
Compact: 'Si0TypeDefCompact',
Phantom: 'Si0TypeDefPhantom',
BitSequence: 'Si0TypeDefBitSequence'
}
},
Si0TypeDefArray: {
len: 'u32',
type: 'Si0LookupTypeId'
},
Si0TypeDefBitSequence: {
bitStoreType: 'Si0LookupTypeId',
bitOrderType: 'Si0LookupTypeId'
},
Si0TypeDefCompact: {
type: 'Si0LookupTypeId'
},
Si0TypeDefComposite: {
fields: 'Vec<Si0Field>'
},
Si0TypeDefPhantom: 'Null',
Si0TypeDefVariant: {
variants: 'Vec<Si0Variant>'
},
Si0TypeDefPrimitive: {
_enum: ['Bool', 'Char', 'Str', 'U8', 'U16', 'U32', 'U64', 'U128', 'U256', 'I8', 'I16', 'I32', 'I64', 'I128', 'I256']
},
Si0TypeDefSequence: {
type: 'Si0LookupTypeId'
},
Si0TypeDefTuple: 'Vec<Si0LookupTypeId>',
Si0TypeParameter: {
name: 'Text',
type: 'Option<Si0LookupTypeId>'
},
Si0Variant: {
name: 'Text',
fields: 'Vec<Si0Field>',
index: 'Option<u8>',
discriminant: 'Option<u64>',
docs: 'Vec<Text>'
}
};
const definitions$1b = {
rpc: {},
types: {
...v0$1,
...v1$1,
SiField: 'Si1Field',
SiLookupTypeId: 'Si1LookupTypeId',
SiPath: 'Si1Path',
SiType: 'Si1Type',
SiTypeDef: 'Si1TypeDef',
SiTypeDefArray: 'Si1TypeDefArray',
SiTypeDefBitSequence: 'Si1TypeDefBitSequence',
SiTypeDefCompact: 'Si1TypeDefCompact',
SiTypeDefComposite: 'Si1TypeDefComposite',
SiTypeDefPrimitive: 'Si1TypeDefPrimitive',
SiTypeDefSequence: 'Si1TypeDefSequence',
SiTypeDefTuple: 'Si1TypeDefTuple',
SiTypeParameter: 'Si1TypeParameter',
SiTypeDefVariant: 'Si1TypeDefVariant',
SiVariant: 'Si1Variant'
}
};
const runtime$x = {
AssetConversionApi: [
{
methods: {
get_reserves: {
description: 'Get pool reserves',
params: [
{
name: 'asset1',
type: 'StagingXcmV3MultiLocation'
},
{
name: 'asset2',
type: 'StagingXcmV3MultiLocation'
}
],
type: 'Option<(Balance,Balance)>'
},
quote_price_exact_tokens_for_tokens: {
description: 'Quote price: exact tokens for tokens',
params: [
{
name: 'asset1',
type: 'StagingXcmV3MultiLocation'
},
{
name: 'asset2',
type: 'StagingXcmV3MultiLocation'
},
{
name: 'amount',
type: 'u128'
},
{
name: 'include_fee',
type: 'bool'
}
],
type: 'Option<(Balance)>'
},
quote_price_tokens_for_exact_tokens: {
description: 'Quote price: tokens for exact tokens',
params: [
{
name: 'asset1',
type: 'StagingXcmV3MultiLocation'
},
{
name: 'asset2',
type: 'StagingXcmV3MultiLocation'
},
{
name: 'amount',
type: 'u128'
},
{
name: 'include_fee',
type: 'bool'
}
],
type: 'Option<(Balance)>'
}
},
version: 1
}
]
};
const definitions$1a = {
rpc: {},
runtime: runtime$x,
types: {
TAssetConversion: 'Option<MultiLocation>'
}
};
const runtime$w = {
AssetsApi: [
{
methods: {
account_balances: {
description: 'Return the current set of authorities.',
params: [
{
name: 'account',
type: 'AccountId'
}
],
type: 'Vec<(u32, TAssetBalance)>'
}
},
version: 1
}
]
};
const definitions$19 = {
rpc: {},
runtime: runtime$w,
types: {
AssetApprovalKey: {
owner: 'AccountId',
delegate: 'AccountId'
},
AssetApproval: {
amount: 'TAssetBalance',
deposit: 'TAssetDepositBalance'
},
AssetBalance: {
balance: 'TAssetBalance',
isFrozen: 'bool',
isSufficient: 'bool'
},
AssetDestroyWitness: {
accounts: 'Compact<u32>',
sufficients: 'Compact<u32>',
approvals: 'Compact<u32>'
},
AssetDetails: {
owner: 'AccountId',
issuer: 'AccountId',
admin: 'AccountId',
freezer: 'AccountId',
supply: 'TAssetBalance',
deposit: 'TAssetDepositBalance',
minBalance: 'TAssetBalance',
isSufficient: 'bool',
accounts: 'u32',
sufficients: 'u32',
approvals: 'u32',
isFrozen: 'bool'
},
AssetMetadata: {
deposit: 'TAssetDepositBalance',
name: 'Vec<u8>',
symbol: 'Vec<u8>',
decimals: 'u8',
isFrozen: 'bool'
},
TAssetBalance: 'u64',
TAssetDepositBalance: 'BalanceOf'
}
};
const runtime$v = {
AuraApi: [
{
methods: {
authorities: {
description: 'Return the current set of authorities.',
params: [],
type: 'Vec<AuthorityId>'
},
slot_duration: {
description: 'Returns the slot duration for Aura.',
params: [],
type: 'SlotDuration'
}
},
version: 1
}
]
};
const definitions$18 = {
rpc: {},
runtime: runtime$v,
types: {
RawAuraPreDigest: {
slotNumber: 'u64'
}
}
};
const definitions$17 = {
rpc: {},
types: {
UncleEntryItem: {
_enum: {
InclusionHeight: 'BlockNumber',
Uncle: '(Hash, Option<AccountId>)'
}
}
}
};
const rpc$g = {
epochAuthorship: {
description: 'Returns data about which slots (primary or secondary) can be claimed in the current epoch with the keys in the keystore',
isUnsafe: true,
params: [],
type: 'HashMap<AuthorityId, EpochAuthorship>'
}
};
const V1_V2_SHARED = {
current_epoch: {
description: 'Returns information regarding the current epoch.',
params: [],
type: 'Epoch'
},
current_epoch_start: {
description: 'Returns the slot that started the current epoch.',
params: [],
type: 'Slot'
},
generate_key_ownership_proof: {
description: 'Generates a proof of key ownership for the given authority in the current epoch.',
params: [
{
name: 'slot',
type: 'Slot'
},
{
name: 'authorityId',
type: 'AuthorityId'
}
],
type: 'Option<OpaqueKeyOwnershipProof>'
},
next_epoch: {
description: 'Returns information regarding the next epoch (which was already previously announced).',
params: [],
type: 'Epoch'
},
submit_report_equivocation_unsigned_extrinsic: {
description: 'Submits an unsigned extrinsic to report an equivocation.',
params: [
{
name: 'equivocationProof',
type: 'BabeEquivocationProof'
},
{
name: 'keyOwnerProof',
type: 'OpaqueKeyOwnershipProof'
}
],
type: 'Option<Null>'
}
};
const runtime$u = {
BabeApi: [
{
methods: {
configuration: {
description: 'Return the genesis configuration for BABE. The configuration is only read on genesis.',
params: [],
type: 'BabeGenesisConfiguration'
},
...V1_V2_SHARED
},
version: 2
},
{
methods: {
configuration: {
description: 'Return the configuration for BABE. Version 1.',
params: [],
type: 'BabeGenesisConfigurationV1'
},
...V1_V2_SHARED
},
version: 1
}
]
};
const definitions$16 = {
rpc: rpc$g,
runtime: runtime$u,
types: {
AllowedSlots: {
_enum: ['PrimarySlots', 'PrimaryAndSecondaryPlainSlots', 'PrimaryAndSecondaryVRFSlots']
},
BabeAuthorityWeight: 'u64',
BabeEpochConfiguration: {
c: '(u64, u64)',
allowedSlots: 'AllowedSlots'
},
BabeBlockWeight: 'u32',
BabeEquivocationProof: {
offender: 'AuthorityId',
slotNumber: 'SlotNumber',
firstHeader: 'Header',
secondHeader: 'Header'
},
BabeGenesisConfiguration: {
slotDuration: 'u64',
epochLength: 'u64',
c: '(u64, u64)',
genesisAuthorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
randomness: 'Randomness',
allowedSlots: 'AllowedSlots'
},
BabeGenesisConfigurationV1: {
slotDuration: 'u64',
epochLength: 'u64',
c: '(u64, u64)',
genesisAuthorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
randomness: 'Randomness',
secondarySlots: 'bool'
},
BabeWeight: 'u64',
MaybeRandomness: 'Option<Randomness>',
MaybeVrf: 'Option<VrfData>',
Epoch: {
epochIndex: 'u64',
startSlot: 'Slot',
duration: 'u64',
authorities: 'Vec<(AuthorityId, BabeAuthorityWeight)>',
randomness: 'Hash',
config: 'BabeEpochConfiguration'
},
EpochAuthorship: {
primary: 'Vec<u64>',
secondary: 'Vec<u64>',
secondary_vrf: 'Vec<u64>'
},
NextConfigDescriptor: {
_enum: {
V0: 'Null',
V1: 'NextConfigDescriptorV1'
}
},
NextConfigDescriptorV1: {
c: '(u64, u64)',
allowedSlots: 'AllowedSlots'
},
OpaqueKeyOwnershipProof: 'Bytes',
Randomness: 'Hash',
RawBabePreDigest: {
_enum: {
Phantom: 'Null',
Primary: 'RawBabePreDigestPrimary',
SecondaryPlain: 'RawBabePreDigestSecondaryPlain',
SecondaryVRF: 'RawBabePreDigestSecondaryVRF'
}
},
RawBabePreDigestPrimary: {
authorityIndex: 'u32',
slotNumber: 'SlotNumber',
vrfOutput: 'VrfOutput',
vrfProof: 'VrfProof'
},
RawBabePreDigestSecondaryPlain: {
authorityIndex: 'u32',
slotNumber: 'SlotNumber'
},
RawBabePreDigestSecondaryVRF: {
authorityIndex: 'u32',
slotNumber: 'SlotNumber',
vrfOutput: 'VrfOutput',
vrfProof: 'VrfProof'
},
RawBabePreDigestTo159: {
_enum: {
Primary: 'RawBabePreDigestPrimaryTo159',
Secondary: 'RawBabePreDigestSecondaryTo159'
}
},
RawBabePreDigestPrimaryTo159: {
authorityIndex: 'u32',
slotNumber: 'SlotNumber',
weight: 'BabeBlockWeight',
vrfOutput: 'VrfOutput',
vrfProof: 'VrfProof'
},
RawBabePreDigestSecondaryTo159: {
authorityIndex: 'u32',
slotNumber: 'SlotNumber',
weight: 'BabeBlockWeight'
},
RawBabePreDigestCompat: {
_enum: {
Zero: 'u32',
One: 'u32',
Two: 'u32',
Three: 'u32'
}
},
SlotNumber: 'u64',
VrfData: '[u8; 32]',
VrfOutput: '[u8; 32]',
VrfProof: '[u8; 64]'
}
};
const definitions$15 = {
rpc: {},
types: {
AccountData: {
free: 'Balance',
reserved: 'Balance',
miscFrozen: 'Balance',
feeFrozen: 'Balance'
},
BalanceLockTo212: {
id: 'LockIdentifier',
amount: 'Balance',
until: 'BlockNumber',
reasons: 'WithdrawReasons'
},
BalanceLock: {
id: 'LockIdentifier',
amount: 'Balance',
reasons: 'Reasons'
},
BalanceStatus: {
_enum: ['Free', 'Reserved']
},
Reasons: {
_enum: ['Fee', 'Misc', 'All']
},
ReserveData: {
id: 'ReserveIdentifier',
amount: 'Balance'
},
ReserveIdentifier: '[u8; 8]',
VestingSchedule: {
offset: 'Balance',
perBlock: 'Balance',
startingBlock: 'BlockNumber'
},
WithdrawReasons: {
_set: {
TransactionPayment: 0b0000_0001,
Transfer: 0b0000_0010,
Reserve: 0b0000_0100,
Fee: 0b0000_1000,
Tip: 0b0001_0000
}
}
}
};
const rpc$f = {
getFinalizedHead: {
description: 'Returns hash of the latest BEEFY finalized block as seen by this client.',
params: [],
type: 'H256'
},
subscribeJustifications: {
description: 'Returns the block most recently finalized by BEEFY, alongside its justification.',
params: [],
pubsub: [
'justifications',
'subscribeJustifications',
'unsubscribeJustifications'
],
type: 'BeefyVersionedFinalityProof'
}
};
const BEEFY_V3 = {
beefy_genesis: {
description: 'Return the block number where BEEFY consensus is enabled/started',
params: [],
type: 'Option<BlockNumber>'
},
generate_key_ownership_proof: {
description: 'Generates a proof of key ownership for the given authority in the given set.',
params: [
{
name: 'setId',
type: 'ValidatorSetId'
},
{
name: 'authorityId',
type: 'AuthorityId'
}
],
type: 'Option<OpaqueKeyOwnershipProof>'
},
validator_set: {
description: 'Return the current active BEEFY validator set',
params: [],
type: 'Option<ValidatorSet>'
}
};
const BEEFY_V1_V3 = {
...BEEFY_V3,
submit_report_equivocation_unsigned_extrinsic: {
description: 'Submits an unsigned extrinsic to report an equivocation.',
params: [
{
name: 'equivocationProof',
type: 'BeefyEquivocationProof'
},
{
name: 'keyOwnerProof',
type: 'OpaqueKeyOwnershipProof'
}
],
type: 'Option<Null>'
}
};
const BEEFY_V4 = {
...BEEFY_V3,
submit_report_double_voting_unsigned_extrinsic: {
description: 'Submits an unsigned extrinsic to report a double voting equivocation.',
params: [
{
name: 'equivocationProof',
type: 'SpConsensusBeefyDoubleVotingProof'
},
{
name: 'keyOwnerProof',
type: 'OpaqueKeyOwnershipProof'
}
],
type: 'Option<Null>'
}
};
const BEEFY_MMR_V1 = {
authority_set_proof: {
description: 'Return the currently active BEEFY authority set proof.',
params: [],
type: 'BeefyAuthoritySet'
},
next_authority_set_proof: {
description: 'Return the next/queued BEEFY authority set proof.',
params: [],
type: 'BeefyNext