-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathconfig.example.js
More file actions
172 lines (145 loc) · 6.31 KB
/
Copy pathconfig.example.js
File metadata and controls
172 lines (145 loc) · 6.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
// H3 Aspis Configuration Template
// Copy this file to 'config.js' and fill in your actual values
// NEVER commit config.js to git!
//
// For environment variable reference, see ENV_TEMPLATE.md
const CONFIG = {
// ============================================================================
// RPC ENDPOINTS - Free Public RPCs (No API Keys Required!)
// ============================================================================
// These are production-ready public RPCs that work out of the box
// For higher rate limits, consider: Alchemy, Infura, QuickNode
rpc: {
ethereum: "https://cloudflare-eth.com",
// Alternative: "https://rpc.ankr.com/eth"
base: "https://mainnet.base.org",
// Alternative: "https://base.llamarpc.com"
polygon: "https://polygon-rpc.com"
// Alternative: "https://rpc.ankr.com/polygon"
},
// ============================================================================
// CHAIN CONFIGURATION
// ============================================================================
// Chain IDs and explorer URLs
chains: {
ethereum: {
id: 1,
name: 'Ethereum',
symbol: 'ETH',
decimals: 18,
explorerUrl: 'https://etherscan.io',
explorerApi: 'https://api.etherscan.io/api'
},
base: {
id: 8453,
name: 'Base',
symbol: 'ETH',
decimals: 18,
explorerUrl: 'https://basescan.org',
explorerApi: 'https://api.basescan.org/api'
},
polygon: {
id: 137,
name: 'Polygon',
symbol: 'MATIC',
decimals: 18,
explorerUrl: 'https://polygonscan.com',
explorerApi: 'https://api.polygonscan.com/api'
}
},
// ============================================================================
// BLOCKCHAIN EXPLORER API KEYS (Optional)
// ============================================================================
// Get free keys from:
// - Etherscan: https://etherscan.io/apis
// - Basescan: https://basescan.org/apis
// - Polygonscan: https://polygonscan.com/apis
// Benefits: Higher rate limits, contract source code access
explorers: {
etherscan: "", // Leave empty for basic access
basescan: "", // Leave empty for basic access
polygonscan: "" // Leave empty for basic access
},
// ============================================================================
// GOPLUS SECURITY API (Free - No API Key Required!)
// ============================================================================
// GoPlus provides free Web3 security analysis
// Documentation: https://docs.gopluslabs.io/
security: {
goplus: {
baseUrl: "https://api.gopluslabs.io/api/v1",
enabled: true,
timeout: 10000 // 10 seconds
}
},
// ============================================================================
// FEATURE FLAGS
// ============================================================================
features: {
// Core Features (all work without any API keys!)
enableSanctionsCheck: true, // Local database, instant
enableGoPlus: true, // Free API, no key needed
enableOnDeviceAI: true, // Chrome Gemini Nano
enableAutoScan: true, // Scan pages automatically
enableHistory: true, // Local history storage
// Optional Features
enableFirebase: false, // Set to true if you configured Firebase
enableNotifications: true, // Browser notifications
// Demo Mode (recommended for hackathons/testing)
demoMode: true // All features unlocked, no paywalls
},
// ============================================================================
// CACHE SETTINGS
// ============================================================================
cache: {
ttl: 3600000, // 1 hour in milliseconds
maxSize: 1000, // Maximum cached addresses
enableCaching: true
},
// ============================================================================
// DEFAULT USER SETTINGS
// ============================================================================
defaults: {
historyRetentionDays: 90, // Keep history for 90 days
autoScanEnabled: true, // Auto-scan pages on load
notificationsEnabled: true, // Show notifications for threats
theme: 'lilac' // UI theme
},
// ============================================================================
// STRIPE CONFIGURATION (Optional - For Future Premium Features)
// ============================================================================
// Only needed if you want to implement paid tiers
stripe: {
publishableKey: "", // Leave empty for free/demo mode
priceId: "" // Leave empty for free/demo mode
},
// ============================================================================
// FIREBASE CONFIGURATION (Optional - For Cloud Sync)
// ============================================================================
// Only needed if you want cloud history sync and cross-device settings
// If enableFirebase is false above, this is ignored
// Configure in firebase-config.js instead
firebase: {
// See firebase-config.example.js for setup instructions
configured: false // Set to true after configuring firebase-config.js
}
};
// ============================================================================
// VALIDATION & EXPORT
// ============================================================================
// Validate configuration on load
if (typeof window !== 'undefined') {
console.log('[H3 Aspis Config] Loaded configuration');
console.log('[H3 Aspis Config] Demo Mode:', CONFIG.features.demoMode);
console.log('[H3 Aspis Config] GoPlus Enabled:', CONFIG.features.enableGoPlus);
console.log('[H3 Aspis Config] Firebase Enabled:', CONFIG.features.enableFirebase);
console.log('[H3 Aspis Config] AI Enabled:', CONFIG.features.enableOnDeviceAI);
}
// Export for use in other files
if (typeof module !== 'undefined' && module.exports) {
module.exports = CONFIG;
}
// Make available globally in extension context
if (typeof window !== 'undefined') {
window.H3_ASPIS_CONFIG = CONFIG;
}