ghost-extension-wallet/src/constants.ts
Uncle Fatso 8f7d040fe6
fix signing process based on the PAPI library
Signed-off-by: Uncle Fatso <uncle.fatso@ghostchain.io>
2026-11-20 16:08:21 +03:00

46 lines
1.4 KiB
TypeScript

export type NetworkType = {
chainId: string
label: string
value: string
prefix: number
decimals: number
symbol: string
}
export const networks: NetworkType[] = [
{
chainId: "0xcaf9c5ddccc7ba6f96149a6b8a81c26a3641742795cd5e7e0aee79bf3f4e77b7",
value: "casper_staging_testnet",
label: "CASPER Testnet",
symbol: "CSPR",
prefix: 1996,
decimals: 18,
}
]
export const wellKnownGenesisHashByChainId: Record<string, string> =
networks.reduce<Record<string, string>>((wellKnownChainIds, { chainId, value }) => {
wellKnownChainIds[value] = chainId
return wellKnownChainIds
}, {})
export const wellKnownChainIdByGenesisHash: Record<string, string> =
networks.reduce<Record<string, string>>((wellKnownChainName, { chainId, value }) => {
wellKnownChainName[chainId] = value
return wellKnownChainName
}, {})
export const wellKnownPrefixByGenesisHash: Record<string, number> =
networks.reduce<Record<string, number>>((wellKnownPrefixes, { chainId, prefix }) => {
wellKnownPrefixes[chainId] = prefix
return wellKnownPrefixes
}, {})
export const wellKnownDecimalsByGenesisHash: Record<string, number> =
networks.reduce<Record<string, number>>((wellKnownDecimals, { decimals, chainId }) => {
wellKnownDecimals[chainId] = decimals
return wellKnownDecimals
}, {})
export const CHANNEL_ID = "ghost-extension"