|
| 1 | +/** |
| 2 | + * Network Configuration |
| 3 | + * Contains all network-related constants and configurations |
| 4 | + */ |
| 5 | +export declare const GITHUB_API_BASE = "https://api.github.com/repos"; |
| 6 | +export declare const USERNAME = "LIT-Protocol"; |
| 7 | +export declare const NETWORKS_REPO = "networks"; |
| 8 | +export declare const LIT_ASSETS_REPO = "lit-assets"; |
| 9 | +export declare const PROD_PATH_BY_NETWORK: { |
| 10 | + readonly datil: "datil-prod"; |
| 11 | + readonly 'datil-dev': "datil-dev"; |
| 12 | + readonly 'datil-test': "datil-test"; |
| 13 | + readonly 'naga-dev': "naga-dev"; |
| 14 | + readonly 'naga-test': "naga-test"; |
| 15 | + readonly 'naga-staging': "naga-staging"; |
| 16 | +}; |
| 17 | +export declare const DEV_PATH_BY_NETWORK: { |
| 18 | + readonly develop: "develop"; |
| 19 | +}; |
| 20 | +export type ProdNetworkName = keyof typeof PROD_PATH_BY_NETWORK; |
| 21 | +export type DevNetworkName = keyof typeof DEV_PATH_BY_NETWORK; |
| 22 | +export type NetworkName = ProdNetworkName | DevNetworkName; |
| 23 | +export type NetworkPath = (typeof PROD_PATH_BY_NETWORK)[ProdNetworkName] | (typeof DEV_PATH_BY_NETWORK)[DevNetworkName]; |
| 24 | +/** |
| 25 | + * Network path configuration for GitHub API requests |
| 26 | + * |
| 27 | + * Production: |
| 28 | + * - Uses network-specific subdirectories (e.g., "datil-prod/abis" for datil network) |
| 29 | + * - Special case: "datil" network uses "datil-prod" directory |
| 30 | + * |
| 31 | + * Development: |
| 32 | + * - Uses a flat structure without network subdirectories |
| 33 | + * - All files are in the same directory (e.g., "rust/lit-core/blockchain/abis") |
| 34 | + */ |
| 35 | +export declare const NETWORK_PATHS: { |
| 36 | + readonly prod: { |
| 37 | + /** |
| 38 | + * Maps network names to their directory names |
| 39 | + * Example: "datil" -> "datil-prod", "datil-dev" -> "datil-dev" |
| 40 | + */ |
| 41 | + readonly networkToPath: { |
| 42 | + readonly datil: "datil-prod"; |
| 43 | + readonly 'datil-dev': "datil-dev"; |
| 44 | + readonly 'datil-test': "datil-test"; |
| 45 | + readonly 'naga-dev': "naga-dev"; |
| 46 | + readonly 'naga-test': "naga-test"; |
| 47 | + readonly 'naga-staging': "naga-staging"; |
| 48 | + }; |
| 49 | + /** |
| 50 | + * Constructs the full path for production networks |
| 51 | + * Format: <network-directory>/<content-path> |
| 52 | + * Example: "datil-prod/abis" |
| 53 | + */ |
| 54 | + readonly getContentPath: (network: ProdNetworkName, contentPath: string) => string; |
| 55 | + }; |
| 56 | + readonly dev: { |
| 57 | + /** |
| 58 | + * Maps network names to their directory names |
| 59 | + * Example: "develop" -> "develop" |
| 60 | + */ |
| 61 | + readonly networkToPath: { |
| 62 | + readonly develop: "develop"; |
| 63 | + }; |
| 64 | + /** |
| 65 | + * Constructs the full path for development |
| 66 | + * Uses the content path directly without network subdirectory |
| 67 | + * Example: "rust/lit-core/blockchain/abis" |
| 68 | + */ |
| 69 | + readonly getContentPath: (network: DevNetworkName, contentPath: string) => string; |
| 70 | + }; |
| 71 | +}; |
| 72 | +export declare const NETWORKS: { |
| 73 | + readonly prod: { |
| 74 | + readonly networks: ProdNetworkName[]; |
| 75 | + readonly deployedContracts: { |
| 76 | + readonly 'datil-dev': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/datil-dev/deployed-lit-node-contracts-temp.json"; |
| 77 | + readonly 'datil-test': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/datil-test/deployed-lit-node-contracts-temp.json"; |
| 78 | + readonly datil: "https://raw.githubusercontent.com/LIT-Protocol/networks/main/datil-prod/deployed-lit-node-contracts-temp.json"; |
| 79 | + readonly 'naga-dev': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/naga-dev/deployed-lit-node-contracts-temp.json"; |
| 80 | + readonly 'naga-staging': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/naga-staging/deployed-lit-node-contracts-temp.json"; |
| 81 | + readonly 'naga-test': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/naga-test/deployed-lit-node-contracts-temp.json"; |
| 82 | + }; |
| 83 | + }; |
| 84 | + readonly dev: { |
| 85 | + readonly networks: DevNetworkName[]; |
| 86 | + readonly deployedContracts: { |
| 87 | + readonly develop: "https://raw.githubusercontent.com/LIT-Protocol/networks/main/naga-dev/deployed-lit-node-contracts-temp.json"; |
| 88 | + readonly 'datil-clone': "https://raw.githubusercontent.com/LIT-Protocol/networks/main/datil-clone/deployed-lit-node-contracts-temp.json"; |
| 89 | + }; |
| 90 | + }; |
| 91 | +}; |
| 92 | +export declare const CONTRACT_NAME_MAP: { |
| 93 | + readonly litTokenContractAddress: "LITToken"; |
| 94 | + readonly pkpNftContractAddress: "PKPNFT"; |
| 95 | + readonly pkpHelperContractAddress: "PKPHelper"; |
| 96 | + readonly pkpPermissionsContractAddress: "PKPPermissions"; |
| 97 | + readonly pkpNftMetadataContractAddress: "PKPNFTMetadata"; |
| 98 | + readonly pubkeyRouterContractAddress: "PubkeyRouter"; |
| 99 | + readonly rateLimitNftContractAddress: "RateLimitNFT"; |
| 100 | + readonly stakingBalancesContractAddress: "StakingBalances"; |
| 101 | + readonly stakingContractAddress: "Staking"; |
| 102 | + readonly multisenderContractAddress: "Multisender"; |
| 103 | + readonly allowlistContractAddress: "Allowlist"; |
| 104 | + readonly paymentDelegationContractAddress: "PaymentDelegation"; |
| 105 | + readonly priceFeedContractAddress: "PriceFeed"; |
| 106 | + readonly cloneNetContractAddress: "CloneNet"; |
| 107 | + readonly ledgerContractAddress: "Ledger"; |
| 108 | +}; |
| 109 | +export declare const ENV_CONFIG: { |
| 110 | + readonly prod: { |
| 111 | + readonly repoName: "networks"; |
| 112 | + readonly path: "abis"; |
| 113 | + readonly fileExtensionToRemove: ".abi"; |
| 114 | + readonly abiSourceInJson: readonly []; |
| 115 | + }; |
| 116 | + readonly dev: { |
| 117 | + readonly repoName: "lit-assets"; |
| 118 | + readonly path: "rust/lit-core/lit-blockchain/abis"; |
| 119 | + readonly fileExtensionToRemove: ".json"; |
| 120 | + readonly abiSourceInJson: readonly ["abi"]; |
| 121 | + }; |
| 122 | +}; |
0 commit comments