|
1 | 1 | // @flow |
| 2 | +import { |
| 3 | + MAINNET, |
| 4 | + TESTNET, |
| 5 | + STAGING, |
| 6 | + SHELLEY_QA, |
| 7 | + ALONZO_PURPLE, |
| 8 | + SELFNODE, |
| 9 | +} from './environment.types'; |
| 10 | + |
2 | 11 | export type TlsConfig = { |
3 | 12 | hostname: string, |
4 | 13 | port: number, |
@@ -142,17 +151,26 @@ export type CardanoStatus = { |
142 | 151 | cardanoWalletPID: number, |
143 | 152 | }; |
144 | 153 |
|
145 | | -// Cardano Mainet network magic |
146 | | -export const MAINNET_MAGIC = [1, null]; |
147 | | - |
148 | | -// Cardano Byron Testnet network magic |
149 | | -export const TESTNET_MAGIC = [1097911063, 0]; |
150 | | - |
151 | | -// Cardano Staging network magic |
152 | | -export const STAGING_MAGIC = [633343913, 1]; |
| 154 | +export type NetworkMagicType = Array<?number>; |
153 | 155 |
|
154 | | -// Cardano Alonzo Purple network magic |
155 | | -export const ALONZO_PURPLE_MAGIC = [8, 0]; |
156 | | - |
157 | | -// Cardano Selfnode network magic |
158 | | -export const SELFNODE_MAGIC = MAINNET_MAGIC; |
| 156 | +export const NetworkMagics: { |
| 157 | + mainnet: NetworkMagicType, |
| 158 | + testnet: NetworkMagicType, |
| 159 | + staging: NetworkMagicType, |
| 160 | + alonzo_purple: NetworkMagicType, |
| 161 | + shelley_qa: NetworkMagicType, |
| 162 | + selfnode: NetworkMagicType, |
| 163 | +} = { |
| 164 | + // Cardano Mainet network magic |
| 165 | + [MAINNET]: [1, null], |
| 166 | + // Cardano Staging network magic |
| 167 | + [STAGING]: [633343913, 1], |
| 168 | + // Cardano Byron Testnet network magic |
| 169 | + [TESTNET]: [1097911063, 0], |
| 170 | + // Cardano Alonzo Purple network magic |
| 171 | + [ALONZO_PURPLE]: [8, 0], |
| 172 | + // Cardano Shelley QA network magic |
| 173 | + [SHELLEY_QA]: [3, 0], |
| 174 | + // Cardano Selfnode network magic |
| 175 | + [SELFNODE]: [1, null], |
| 176 | +}; |
0 commit comments