Files
pwap/pezkuwi-sdk-ui/packages/apps-config/src/api/derives.ts
T
Claude c71ddb6e0d Add Pezkuwi SDK UI - Polkadot.js Apps clone
- Clone Polkadot.js Apps repository
- Update package.json with Pezkuwi branding
- Add Pezkuwi endpoint to production chains (wss://pezkuwichain.app:9944)
- Create comprehensive README for SDK UI
- Set up project structure with all packages

Next steps:
- Apply Kurdistan colors (Kesk, Sor, Zer, Spi + Black) to UI theme
- Replace logos with Pezkuwi branding
- Test build and deployment
2025-11-14 00:55:17 +00:00

44 lines
1.4 KiB
TypeScript

// Copyright 2017-2025 @polkadot/apps-config authors & contributors
// SPDX-License-Identifier: Apache-2.0
import type { OverrideBundleDefinition, OverrideBundleType } from '@polkadot/types/types';
import equilibrium from './spec/equilibrium.js';
import genshiro from './spec/genshiro.js';
import hyperbridge from './spec/hyperbridge.js';
import interbtc from './spec/interbtc.js';
import mangata from './spec/mangata.js';
import subspace from './spec/subspace.js';
const mapping: [OverrideBundleDefinition, string[]][] = [
[equilibrium, ['Equilibrium', 'Equilibrium-parachain']],
[genshiro, ['Genshiro', 'Gens-parachain']],
[interbtc, ['interbtc-parachain', 'interbtc-standalone', 'interlay-parachain', 'kintsugi-parachain', 'testnet-kintsugi', 'testnet-interlay']],
[subspace, ['subspace']],
[mangata, ['mangata', 'mangata-parachain']]
];
const specMappings: [OverrideBundleDefinition, string[]][] = [
[hyperbridge, ['nexus', 'messier', 'gargantua']]
];
export function applyDerives (typesBundle: OverrideBundleType): OverrideBundleType {
mapping.forEach(([{ derives }, chains]): void => {
chains.forEach((chain): void => {
if (typesBundle.spec?.[chain]) {
typesBundle.spec[chain].derives = derives;
}
});
});
specMappings.forEach(([spec, chains]): void => {
chains.forEach((chain): void => {
if (typesBundle.spec?.[chain]) {
typesBundle.spec[chain] = spec;
}
});
});
return typesBundle;
}