32 lines
1.3 KiB
TypeScript
32 lines
1.3 KiB
TypeScript
export const APP_CONFIG = {
|
|
// --- Cryptographie & Limites ---
|
|
U32_MAX: 4294967295,
|
|
EMPTY_32_BYTES: String('').padStart(64, '0'),
|
|
|
|
// --- Économie ---
|
|
DEFAULT_AMOUNT: 1000n,
|
|
FEE_RATE: 1, // Sat/vByte ou unité arbitraire selon le SDK
|
|
|
|
// --- Délais & Timeouts (ms) ---
|
|
TIMEOUTS: {
|
|
POLLING_INTERVAL: 100, // Vérification rapide (ex: handshake)
|
|
API_DELAY: 500, // Petit délai pour laisser respirer le réseau (hack)
|
|
RETRY_DELAY: 1000, // Délai avant de réessayer une action
|
|
FAUCET_WAIT: 2000, // Attente après appel faucet
|
|
WORKER_CHECK: 5000, // Vérification périodique du worker
|
|
HANDSHAKE: 10000, // Timeout max pour le handshake
|
|
KEY_REQUEST: 15000, // Timeout pour recevoir une clé d'un pair
|
|
WS_RECONNECT_MAX: 30000, // Délai max entre deux tentatives de reco WS
|
|
WS_HEARTBEAT: 30000, // Ping WebSocket
|
|
},
|
|
|
|
// --- URLs (Environnement) ---
|
|
URLS: {
|
|
BASE: import.meta.env.VITE_BASEURL || 'http://localhost',
|
|
BOOTSTRAP: [import.meta.env.VITE_BOOTSTRAPURL || `${import.meta.env.VITE_BASEURL || 'http://localhost'}:8090`],
|
|
STORAGE: import.meta.env.VITE_STORAGEURL || `${import.meta.env.VITE_BASEURL || 'http://localhost'}:8081`,
|
|
BLINDBIT: import.meta.env.VITE_BLINDBITURL || `${import.meta.env.VITE_BASEURL || 'http://localhost'}:8000`,
|
|
},
|
|
};
|
|
|