ghost-extension-wallet/src/constants.ts
Uncle Fatso 9e3e01fecf
update chainspec and populate with extra bootnodes
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2025-08-17 16:02:09 +03:00

46 lines
1.4 KiB
TypeScript

type Network = {
chainId: string
label: string
value: string
logo: string
prefix: number
decimals: number
}
export const networks: Network[] = [
{
chainId: "0xa217f4ee58a944470e9633ca5bd6d28a428ed64cd9b6f3e413565f359f89af90",
value: "casper_staging_testnet",
label: "CASPER",
logo: "https://cryptologos.cc/logos/ghostchain-logo.svg",
prefix: 1996,
decimals: 18,
}
]
export const wellKnownGenesisHashByChainId: Record<string, string> =
networks.reduce((wellKnownChainIds, { chainId, value }) => {
wellKnownChainIds[value] = chainId
return wellKnownChainIds
}, {})
export const wellKnownChainIdByGenesisHash: Record<string, string> =
networks.reduce((wellKnownChainName, { chainId, value }) => {
wellKnownChainName[chainId] = value
return wellKnownChainName
}, {})
export const wellKnownPrefixByGenesisHash: Record<string, number> =
networks.reduce((wellKnownPrefixes, { chainId, prefix }) => {
wellKnownPrefixes[chainId] = prefix
return wellKnownPrefixes
}, {})
export const wellKnownDecimalsByGenesisHash: Record<string, number> =
networks.reduce((wellKnownDecimals, { decimals, chainId }) => {
wellKnownDecimals[chainId] = decimals
return wellKnownDecimals
}, {})
export const CHANNEL_ID = "ghost-extension"