mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-04-22 03:17:56 +00:00
31467f90d4
- @pezkuwi/papi-utils (rebrand of @polkadot-api/utils) - @pezkuwi/bizinikiwi-bindings (rebrand of @polkadot-api/substrate-bindings) - @pezkuwi/metadata-builders (rebrand of @polkadot-api/metadata-builders) - @pezkuwi/merkleize-metadata (rebrand of @polkadot-api/merkleize-metadata) All @polkadot-api references replaced with @pezkuwi equivalents.
111 lines
2.3 KiB
JavaScript
111 lines
2.3 KiB
JavaScript
import { Enum, _void, Vector, Struct, Option, str, u8 } from 'scale-ts';
|
|
import '../../utils/ss58-util.mjs';
|
|
import '../scale/Binary.mjs';
|
|
import '../scale/bitSequence.mjs';
|
|
import '../scale/char.mjs';
|
|
import { compactNumber } from '../scale/compact.mjs';
|
|
import { Hex } from '../scale/Hex.mjs';
|
|
import '../scale/fixed-str.mjs';
|
|
import '../scale/Variant.mjs';
|
|
import '../scale/ethAccount.mjs';
|
|
import '../scale/shaped.mjs';
|
|
import '../scale/BitSeq.mjs';
|
|
import { docs } from './docs.mjs';
|
|
import { variantDeprecation, itemDeprecation } from './deprecation.mjs';
|
|
import { viewFunction } from './runtime-api.mjs';
|
|
|
|
const hashType = Enum({
|
|
Blake2128: _void,
|
|
Blake2256: _void,
|
|
Blake2128Concat: _void,
|
|
Twox128: _void,
|
|
Twox256: _void,
|
|
Twox64Concat: _void,
|
|
Identity: _void
|
|
});
|
|
const hashers$1 = Vector(hashType);
|
|
const storageMap = Struct({
|
|
hashers: hashers$1,
|
|
key: compactNumber,
|
|
value: compactNumber
|
|
});
|
|
const storageItem = {
|
|
name: str,
|
|
modifier: u8,
|
|
type: Enum({
|
|
plain: compactNumber,
|
|
map: storageMap
|
|
}),
|
|
fallback: Hex(),
|
|
docs
|
|
};
|
|
const enumRefV14 = Option(compactNumber);
|
|
const v14Pallet = {
|
|
name: str,
|
|
storage: Option(
|
|
Struct({
|
|
prefix: str,
|
|
items: Vector(Struct(storageItem))
|
|
})
|
|
),
|
|
calls: enumRefV14,
|
|
events: enumRefV14,
|
|
constants: Vector(
|
|
Struct({
|
|
name: str,
|
|
type: compactNumber,
|
|
value: Hex(),
|
|
docs
|
|
})
|
|
),
|
|
errors: enumRefV14,
|
|
index: u8
|
|
};
|
|
const v15Pallet = {
|
|
...v14Pallet,
|
|
docs
|
|
};
|
|
const enumRef = Option(
|
|
Struct({ type: compactNumber, deprecationInfo: variantDeprecation })
|
|
);
|
|
const v16Pallet = {
|
|
name: str,
|
|
storage: Option(
|
|
Struct({
|
|
prefix: str,
|
|
items: Vector(
|
|
Struct({
|
|
...storageItem,
|
|
deprecationInfo: itemDeprecation
|
|
})
|
|
)
|
|
})
|
|
),
|
|
calls: enumRef,
|
|
events: enumRef,
|
|
constants: Vector(
|
|
Struct({
|
|
name: str,
|
|
type: compactNumber,
|
|
value: Hex(),
|
|
docs,
|
|
deprecationInfo: itemDeprecation
|
|
})
|
|
),
|
|
errors: enumRef,
|
|
associatedTypes: Vector(
|
|
Struct({
|
|
name: str,
|
|
type: compactNumber,
|
|
docs
|
|
})
|
|
),
|
|
viewFns: Vector(viewFunction),
|
|
index: u8,
|
|
docs,
|
|
deprecationInfo: itemDeprecation
|
|
};
|
|
|
|
export { storageMap, v14Pallet, v15Pallet, v16Pallet };
|
|
//# sourceMappingURL=pallets.mjs.map
|