mirror of
https://github.com/pezkuwichain/pezkuwi-apps.git
synced 2026-10-20 18:56:30 +00:00
apps-config: keep logion and digitalnative type bundles as data
@logion/node-api (Apache-2.0) and @digitalnative/type-definitions (MIT) were imported only for their type definitions, and each brought an old @polkadot/api tree with it (util-crypto 6/7, elliptic, uuid). The definitions are now in the spec files, with their source and license. Checked by serialising each resulting bundle with key order and undefined preserved: byte-identical to what the packages produced (logion 27715 bytes, standard and opportunity 1778 each). RegistryTypes does not model a struct's `_alias` map, which the registry accepts; the merged latest logion types are cast at that one point.
This commit is contained in:
1 parent
09f16d3549
commit
0fd88403bd
4 files changed
+658
-11
No files matched your search
@@ -21,7 +21,6 @@
|
||||
"@crustio/type-definitions": "1.3.0",
|
||||
"@darwinia/types": "2.8.10",
|
||||
"@darwinia/types-known": "2.8.10",
|
||||
"@digitalnative/type-definitions": "1.1.27",
|
||||
"@docknetwork/node-types": "0.16.0",
|
||||
"@edgeware/node-types": "3.6.2-wako",
|
||||
"@equilab/definitions": "1.4.18",
|
||||
@@ -31,7 +30,6 @@
|
||||
"@jamton/teyrchain-ts-interfaces": "npm:@jamton/parachain-ts-interfaces@1.10.4",
|
||||
"@kiltprotocol/type-definitions": "^1.11502.1",
|
||||
"@laminar/type-definitions": "0.3.1",
|
||||
"@logion/node-api": "0.27.0-4",
|
||||
"@mangata-finance/type-definitions": "^2.1.2",
|
||||
"@metaverse-network-sdk/type-definitions": "0.0.1-16",
|
||||
"@moonbeam-network/types-bundle": "1.0.2",
|
||||
|
||||
@@ -4,9 +4,492 @@
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { OverrideBundleDefinition } from '@pezkuwi/types/types';
|
||||
import type { DefinitionsTypes, OverrideBundleDefinition, RegistryTypes } from '@pezkuwi/types/types';
|
||||
|
||||
import logionDefault, { runtime as logionRuntime, session as logionSession } from '@logion/node-api/interfaces/definitions';
|
||||
// The type definitions @logion/node-api 0.27.0-4 (Apache-2.0, logion-network/logion-api)
|
||||
// exports from interfaces/definitions, kept here as data: the package itself depends on
|
||||
// an old @polkadot/api tree.
|
||||
// RegistryTypes does not model a struct's `_alias` map (TransactionInfo), which the
|
||||
// registry accepts; the package's own declarations hid that by typing these narrowly.
|
||||
const logionDefault: { types: DefinitionsTypes } = { types: {
|
||||
OpaquePeerId: 'Vec<u8>',
|
||||
AccountInfo: 'AccountInfoWithDualRefCount',
|
||||
TAssetBalance: 'u128',
|
||||
AssetDetails: {
|
||||
owner: 'AccountId',
|
||||
issuer: 'AccountId',
|
||||
admin: 'AccountId',
|
||||
freezer: 'AccountId',
|
||||
supply: 'Balance',
|
||||
deposit: 'DepositBalance',
|
||||
max_zombies: 'u32',
|
||||
min_balance: 'Balance',
|
||||
zombies: 'u32',
|
||||
accounts: 'u32',
|
||||
is_frozen: 'bool'
|
||||
},
|
||||
AssetMetadata: {
|
||||
deposit: 'DepositBalance',
|
||||
name: 'Vec<u8>',
|
||||
symbol: 'Vec<u8>',
|
||||
decimals: 'u8'
|
||||
},
|
||||
LocId: 'u128',
|
||||
LegalOfficerCaseOf: {
|
||||
owner: 'AccountId',
|
||||
requester: 'Requester',
|
||||
metadata: 'Vec<MetadataItem>',
|
||||
files: 'Vec<File>',
|
||||
closed: 'bool',
|
||||
loc_type: 'LocType',
|
||||
links: 'Vec<LocLink>',
|
||||
void_info: 'Option<LocVoidInfo<LocId>>',
|
||||
replacer_of: 'Option<LocId>',
|
||||
collection_last_block_submission: 'Option<BlockNumber>',
|
||||
collection_max_size: 'Option<CollectionSize>',
|
||||
collection_can_upload: 'bool',
|
||||
seal: 'Option<Hash>',
|
||||
sponsorship_id: 'Option<SponsorshipId>',
|
||||
value_fee: 'Balance',
|
||||
legal_fee: 'Balance',
|
||||
collection_item_fee: 'Balance',
|
||||
tokens_record_fee: 'Balance'
|
||||
},
|
||||
MetadataItemParams: {
|
||||
name: 'Hash',
|
||||
value: 'Hash',
|
||||
submitter: 'SupportedAccountId'
|
||||
},
|
||||
MetadataItem: {
|
||||
name: 'Hash',
|
||||
value: 'Hash',
|
||||
submitter: 'SupportedAccountId',
|
||||
acknowledgedByOwner: 'bool',
|
||||
acknowledgedByVerifiedIssuer: 'bool'
|
||||
},
|
||||
LocType: {
|
||||
_enum: [
|
||||
'Transaction',
|
||||
'Identity',
|
||||
'Collection'
|
||||
]
|
||||
},
|
||||
LocLinkParams: {
|
||||
id: 'LocId',
|
||||
nature: 'Hash',
|
||||
submitter: 'SupportedAccountId'
|
||||
},
|
||||
LocLink: {
|
||||
id: 'LocId',
|
||||
nature: 'Hash',
|
||||
submitter: 'SupportedAccountId',
|
||||
acknowledgedByOwner: 'bool',
|
||||
acknowledgedByVerifiedIssuer: 'bool'
|
||||
},
|
||||
FileParams: {
|
||||
hash: 'Hash',
|
||||
nature: 'Hash',
|
||||
submitter: 'SupportedAccountId'
|
||||
},
|
||||
File: {
|
||||
hash: 'Hash',
|
||||
nature: 'Hash',
|
||||
submitter: 'SupportedAccountId',
|
||||
acknowledgedByOwner: 'bool',
|
||||
acknowledgedByVerifiedIssuer: 'bool'
|
||||
},
|
||||
LocVoidInfo: {
|
||||
replacer: 'Option<LocId>'
|
||||
},
|
||||
StorageVersion: {
|
||||
_enum: [
|
||||
'V1',
|
||||
'V2MakeLocVoid',
|
||||
'V3RequesterEnum',
|
||||
'V4ItemSubmitter',
|
||||
'V5Collection',
|
||||
'V6ItemUpload',
|
||||
'V7ItemToken',
|
||||
'V8AddSeal',
|
||||
'V9TermsAndConditions',
|
||||
'V10AddLocFileSize',
|
||||
'V11EnableEthereumSubmitter',
|
||||
'V12Sponsorship',
|
||||
'V13AcknowledgeItems',
|
||||
'V14HashLocPublicData',
|
||||
'V15AddTokenIssuance',
|
||||
'V16MoveTokenIssuance',
|
||||
'V17HashItemRecordPublicData',
|
||||
'V18AddValueFee',
|
||||
'V19AcknowledgeItemsByIssuer',
|
||||
'V20AddCustomLegalFee',
|
||||
'V21EnableRequesterLinks',
|
||||
'V22AddRecurrentFees'
|
||||
]
|
||||
},
|
||||
Requester: {
|
||||
_enum: {
|
||||
None: null,
|
||||
Account: 'AccountId',
|
||||
Loc: 'LocId',
|
||||
OtherAccount: 'OtherAccountId'
|
||||
}
|
||||
},
|
||||
CollectionSize: 'u32',
|
||||
CollectionItemId: 'Hash',
|
||||
CollectionItem: {
|
||||
description: 'Hash',
|
||||
files: 'Vec<CollectionItemFile>',
|
||||
token: 'Option<CollectionItemToken>',
|
||||
restricted_delivery: 'bool',
|
||||
terms_and_conditions: 'Vec<TermsAndConditionsElement>'
|
||||
},
|
||||
TokenIssuance: 'u64',
|
||||
CollectionItemFile: {
|
||||
name: 'Hash',
|
||||
content_type: 'Hash',
|
||||
fileSize: 'u32',
|
||||
hash: 'Hash'
|
||||
},
|
||||
CollectionItemToken: {
|
||||
token_type: 'Hash',
|
||||
token_id: 'Hash',
|
||||
token_issuance: 'TokenIssuance'
|
||||
},
|
||||
LegalOfficerData: {
|
||||
_enum: {
|
||||
Host: 'HostData',
|
||||
Guest: 'AccountId'
|
||||
}
|
||||
},
|
||||
HostData: {
|
||||
node_id: 'Option<OpaquePeerId>',
|
||||
base_url: 'Option<Vec<u8>>',
|
||||
region: 'Region'
|
||||
},
|
||||
Region: {
|
||||
_enum: [
|
||||
'Europe'
|
||||
]
|
||||
},
|
||||
LoAuthorityListStorageVersion: {
|
||||
_enum: [
|
||||
'V1',
|
||||
'V2AddOnchainSettings',
|
||||
'V3GuestLegalOfficers',
|
||||
'V4Region'
|
||||
]
|
||||
},
|
||||
TermsAndConditionsElement: {
|
||||
tcType: 'Hash',
|
||||
tcLoc: 'LocId',
|
||||
details: 'Hash'
|
||||
},
|
||||
LogionVote: {
|
||||
locId: 'LocId',
|
||||
ballots: 'Vec<Ballot>'
|
||||
},
|
||||
Ballot: {
|
||||
voter: 'LocId',
|
||||
status: 'AccountId'
|
||||
},
|
||||
BallotStatus: {
|
||||
_enum: [
|
||||
'NotVoted',
|
||||
'VotedYes',
|
||||
'VotedNo'
|
||||
]
|
||||
},
|
||||
VoteId: 'u64',
|
||||
VoteClosed: 'bool',
|
||||
VoteApproved: 'bool',
|
||||
LegalOfficerCaseSummary: {
|
||||
owner: 'AccountId',
|
||||
requester: 'Option<AccountId>'
|
||||
},
|
||||
TokensRecord: {
|
||||
description: 'Hash',
|
||||
files: 'Vec<TokensRecordFile>',
|
||||
submitter: 'AccountId'
|
||||
},
|
||||
TokensRecordFile: {
|
||||
name: 'Hash',
|
||||
contentType: 'Hash',
|
||||
file_size: 'u32',
|
||||
hash: 'Hash'
|
||||
},
|
||||
VerifiedIssuer: {
|
||||
identityLoc: 'LocId'
|
||||
},
|
||||
OtherAccountId: {
|
||||
_enum: {
|
||||
Ethereum: 'H160'
|
||||
}
|
||||
},
|
||||
SupportedAccountId: {
|
||||
_enum: {
|
||||
None: null,
|
||||
Polkadot: 'AccountId',
|
||||
Other: 'OtherAccountId'
|
||||
}
|
||||
},
|
||||
SponsorshipId: 'u128',
|
||||
Sponsorship: {
|
||||
sponsor: 'AccountId',
|
||||
sponsored_account: 'SupportedAccountId',
|
||||
legal_officer: 'AccountId',
|
||||
loc_id: 'Option<LocId>'
|
||||
},
|
||||
Beneficiary: {
|
||||
_enum: {
|
||||
Other: null,
|
||||
LegalOfficer: 'AccountId'
|
||||
}
|
||||
},
|
||||
ItemsParams: {
|
||||
metadata: 'Vec<MetadataItemParams>',
|
||||
files: 'Vec<FileParams>',
|
||||
links: 'Vec<LocLinkParams>'
|
||||
}
|
||||
} };
|
||||
|
||||
const logionRuntime: { types: DefinitionsTypes } = { types: {
|
||||
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>',
|
||||
AccountId: 'AccountId32',
|
||||
AccountId20: 'GenericEthereumAccountId',
|
||||
AccountId32: 'GenericAccountId32',
|
||||
AccountId33: 'GenericAccountId33',
|
||||
AccountIdOf: 'AccountId',
|
||||
AccountIndex: 'GenericAccountIndex',
|
||||
Address: 'MultiAddress',
|
||||
AssetId: 'u64',
|
||||
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 logionSession: { types: DefinitionsTypes } = { types: {
|
||||
BeefyKey: '[u8; 33]',
|
||||
Keys: 'SessionKeys2',
|
||||
SessionKeys1: '(AccountId)',
|
||||
SessionKeys2: '(AccountId, AccountId)',
|
||||
SessionKeys3: '(AccountId, AccountId, AccountId)',
|
||||
SessionKeys4: '(AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys5: '(AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys6: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys6B: '(AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
|
||||
SessionKeys7: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys7B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
|
||||
SessionKeys8: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys8B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
|
||||
SessionKeys9: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys9B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
|
||||
SessionKeys10: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId)',
|
||||
SessionKeys10B: '(AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, AccountId, BeefyKey)',
|
||||
FullIdentification: 'Exposure',
|
||||
IdentificationTuple: '(ValidatorId, FullIdentification)',
|
||||
MembershipProof: {
|
||||
session: 'SessionIndex',
|
||||
trieNodes: 'Vec<Bytes>',
|
||||
validatorCount: 'ValidatorCount'
|
||||
},
|
||||
SessionIndex: 'u32',
|
||||
ValidatorCount: 'u32'
|
||||
} };
|
||||
|
||||
const defaultTypesUpTo109 = {
|
||||
Address: 'MultiAddress',
|
||||
@@ -329,7 +812,7 @@ const definitions: OverrideBundleDefinition = {
|
||||
...logionDefault.types,
|
||||
...logionRuntime.types,
|
||||
...logionSession.types
|
||||
}
|
||||
} as RegistryTypes
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
@@ -1,9 +1,92 @@
|
||||
// Copyright 2017-2026 @pezkuwi/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { OverrideBundleDefinition } from '@pezkuwi/types/types';
|
||||
|
||||
// @ts-expect-error No definitions provided in package
|
||||
import { opportunityTypes } from '@digitalnative/type-definitions';
|
||||
// The opportunityTypes bundle of @digitalnative/type-definitions 1.1.27 (MIT, Digital Native),
|
||||
// kept here as data: the package depends on an old @polkadot/api tree.
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
minmax: [
|
||||
0,
|
||||
undefined
|
||||
],
|
||||
types: {
|
||||
AccountInfo: 'AccountInfoWithTripleRefCount',
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress',
|
||||
Account: {
|
||||
nonce: 'U256',
|
||||
balance: 'U256'
|
||||
},
|
||||
Transaction: {
|
||||
nonce: 'U256',
|
||||
action: 'String',
|
||||
gas_price: 'u64',
|
||||
gas_limit: 'u64',
|
||||
value: 'U256',
|
||||
input: 'Vec<u8>',
|
||||
signature: 'Signature'
|
||||
},
|
||||
Signature: {
|
||||
v: 'u64',
|
||||
r: 'H256',
|
||||
s: 'H256'
|
||||
},
|
||||
XCurrencyId: {
|
||||
chain_id: 'ChainId',
|
||||
currency_id: 'Bytes'
|
||||
},
|
||||
CurrencyIdOf: 'CurrencyId',
|
||||
CurrencyId: {
|
||||
_enum: {
|
||||
Token: 'TokenSymbol'
|
||||
}
|
||||
},
|
||||
TokenSymbol: {
|
||||
_enum: [
|
||||
'ACA',
|
||||
'AUSD',
|
||||
'DOT',
|
||||
'XBTC',
|
||||
'LDOT',
|
||||
'RENBTC',
|
||||
'SDN',
|
||||
'PLM'
|
||||
]
|
||||
},
|
||||
AmountOf: 'Amount',
|
||||
Amount: 'i128',
|
||||
DataVersion: 'u64',
|
||||
RequestIdentifier: 'u64',
|
||||
SpecIndex: 'Vec<u8>',
|
||||
CDP: {
|
||||
liquidation_fee: 'Balance',
|
||||
max_collateraization_rate: 'U256',
|
||||
stability_fee: 'Balance'
|
||||
},
|
||||
SocketIndex: 'i32',
|
||||
Currency: 'Balances',
|
||||
BridgeChainId: 'u8',
|
||||
ResourceId: '[u8; 32]',
|
||||
DepositNonce: 'u64',
|
||||
ProposalVotes: {
|
||||
votes_for: 'Vec<AccountId>',
|
||||
votes_against: 'Vec<AccountId>',
|
||||
status: 'enum'
|
||||
},
|
||||
Erc721Token: {
|
||||
id: 'TokenId',
|
||||
metadata: 'Vec<u8>'
|
||||
},
|
||||
TokenId: 'U256'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default opportunityTypes as OverrideBundleDefinition;
|
||||
export default definitions;
|
||||
@@ -1,9 +1,92 @@
|
||||
// Copyright 2017-2026 @pezkuwi/apps-config authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// structs need to be in order
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import type { OverrideBundleDefinition } from '@pezkuwi/types/types';
|
||||
|
||||
// @ts-expect-error No definitions provided in package
|
||||
import { standardTypes } from '@digitalnative/type-definitions';
|
||||
// The standardTypes bundle of @digitalnative/type-definitions 1.1.27 (MIT, Digital Native),
|
||||
// kept here as data: the package depends on an old @polkadot/api tree.
|
||||
const definitions: OverrideBundleDefinition = {
|
||||
types: [
|
||||
{
|
||||
minmax: [
|
||||
0,
|
||||
undefined
|
||||
],
|
||||
types: {
|
||||
AccountInfo: 'AccountInfoWithTripleRefCount',
|
||||
Address: 'MultiAddress',
|
||||
LookupSource: 'MultiAddress',
|
||||
Account: {
|
||||
nonce: 'U256',
|
||||
balance: 'U256'
|
||||
},
|
||||
Transaction: {
|
||||
nonce: 'U256',
|
||||
action: 'String',
|
||||
gas_price: 'u64',
|
||||
gas_limit: 'u64',
|
||||
value: 'U256',
|
||||
input: 'Vec<u8>',
|
||||
signature: 'Signature'
|
||||
},
|
||||
Signature: {
|
||||
v: 'u64',
|
||||
r: 'H256',
|
||||
s: 'H256'
|
||||
},
|
||||
XCurrencyId: {
|
||||
chain_id: 'ChainId',
|
||||
currency_id: 'Bytes'
|
||||
},
|
||||
CurrencyIdOf: 'CurrencyId',
|
||||
CurrencyId: {
|
||||
_enum: {
|
||||
Token: 'TokenSymbol'
|
||||
}
|
||||
},
|
||||
TokenSymbol: {
|
||||
_enum: [
|
||||
'ACA',
|
||||
'AUSD',
|
||||
'DOT',
|
||||
'XBTC',
|
||||
'LDOT',
|
||||
'RENBTC',
|
||||
'SDN',
|
||||
'PLM'
|
||||
]
|
||||
},
|
||||
AmountOf: 'Amount',
|
||||
Amount: 'i128',
|
||||
DataVersion: 'u64',
|
||||
RequestIdentifier: 'u64',
|
||||
SpecIndex: 'Vec<u8>',
|
||||
CDP: {
|
||||
liquidation_fee: 'Balance',
|
||||
max_collateraization_rate: 'U256',
|
||||
stability_fee: 'Balance'
|
||||
},
|
||||
SocketIndex: 'i32',
|
||||
Currency: 'Balances',
|
||||
BridgeChainId: 'u8',
|
||||
ResourceId: '[u8; 32]',
|
||||
DepositNonce: 'u64',
|
||||
ProposalVotes: {
|
||||
votes_for: 'Vec<AccountId>',
|
||||
votes_against: 'Vec<AccountId>',
|
||||
status: 'enum'
|
||||
},
|
||||
Erc721Token: {
|
||||
id: 'TokenId',
|
||||
metadata: 'Vec<u8>'
|
||||
},
|
||||
TokenId: 'U256'
|
||||
}
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
export default standardTypes as OverrideBundleDefinition;
|
||||
export default definitions;
|
||||
Reference in new issue
Block a user