decharge-scout 4.11.2 ā 4.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +4 -4
- package/index.js +1 -1
- package/package.json +1 -1
- package/src/smart-pricing.js +25 -25
package/.env.example
CHANGED
|
@@ -19,10 +19,10 @@ SOLANA_RPC_URL=https://api.devnet.solana.com
|
|
|
19
19
|
# Mock Oracle Escrow Address (Replace with your test wallet for demo)
|
|
20
20
|
ORACLE_ESCROW_ADDRESS=YourDevWalletPublicKeyHere
|
|
21
21
|
|
|
22
|
-
# Dashboard API (
|
|
23
|
-
DASHBOARD_API_URL=
|
|
24
|
-
DASHBOARD_FLEET_API_URL=
|
|
25
|
-
#
|
|
22
|
+
# Dashboard API (leave blank to use production defaults)
|
|
23
|
+
DASHBOARD_API_URL=https://decharge-scout.vercel.app/api/submit
|
|
24
|
+
DASHBOARD_FLEET_API_URL=https://decharge-scout.vercel.app/api/agentone/fleet-submit
|
|
25
|
+
# Local dev: http://localhost:3000/api/submit | http://localhost:3000/api/agentone/fleet-submit
|
|
26
26
|
|
|
27
27
|
# Stake Amount (in SOL)
|
|
28
28
|
STAKE_AMOUNT=0.01
|
package/index.js
CHANGED
|
@@ -511,7 +511,7 @@ async function runQueryCycle(wallet, agentName, location, options) {
|
|
|
511
511
|
// Submit to DeCharge Scout dashboard
|
|
512
512
|
try {
|
|
513
513
|
const dashboardSpinner = ora('Submitting to DeCharge Scout dashboard...').start();
|
|
514
|
-
const apiUrl =
|
|
514
|
+
const apiUrl = 'https://decharge-scout.vercel.app/api/submit';
|
|
515
515
|
|
|
516
516
|
console.log(chalk.blue(`\nš Dashboard API URL: ${apiUrl}`));
|
|
517
517
|
console.log(chalk.gray(`š¤ Submitting data...`));
|
package/package.json
CHANGED
package/src/smart-pricing.js
CHANGED
|
@@ -11,46 +11,46 @@
|
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Regional Base Pricing Map (USD/kWh)
|
|
14
|
-
*
|
|
14
|
+
* Commercial EV charging station prices ($/kWh) ā DC fast charging rates
|
|
15
15
|
*/
|
|
16
16
|
const REGIONAL_BASE_PRICES = {
|
|
17
17
|
// North America
|
|
18
|
-
US: { base: 0.
|
|
19
|
-
CA: { base: 0.
|
|
20
|
-
MX: { base: 0.
|
|
18
|
+
US: { base: 0.35, currency: 'USD', name: 'United States' },
|
|
19
|
+
CA: { base: 0.30, currency: 'CAD', name: 'Canada' },
|
|
20
|
+
MX: { base: 0.22, currency: 'MXN', name: 'Mexico' },
|
|
21
21
|
|
|
22
22
|
// Europe
|
|
23
|
-
DE: { base: 0.
|
|
24
|
-
FR: { base: 0.
|
|
25
|
-
GB: { base: 0.
|
|
26
|
-
ES: { base: 0.
|
|
27
|
-
IT: { base: 0.
|
|
28
|
-
PL: { base: 0.
|
|
29
|
-
NL: { base: 0.
|
|
23
|
+
DE: { base: 0.65, currency: 'EUR', name: 'Germany' },
|
|
24
|
+
FR: { base: 0.45, currency: 'EUR', name: 'France' },
|
|
25
|
+
GB: { base: 0.60, currency: 'GBP', name: 'United Kingdom' },
|
|
26
|
+
ES: { base: 0.50, currency: 'EUR', name: 'Spain' },
|
|
27
|
+
IT: { base: 0.55, currency: 'EUR', name: 'Italy' },
|
|
28
|
+
PL: { base: 0.38, currency: 'EUR', name: 'Poland' },
|
|
29
|
+
NL: { base: 0.58, currency: 'EUR', name: 'Netherlands' },
|
|
30
30
|
|
|
31
31
|
// Asia
|
|
32
|
-
IN: { base: 0.
|
|
33
|
-
CN: { base: 0.
|
|
34
|
-
JP: { base: 0.
|
|
35
|
-
KR: { base: 0.
|
|
36
|
-
SG: { base: 0.
|
|
32
|
+
IN: { base: 0.18, currency: 'INR', name: 'India' },
|
|
33
|
+
CN: { base: 0.20, currency: 'CNY', name: 'China' },
|
|
34
|
+
JP: { base: 0.55, currency: 'JPY', name: 'Japan' },
|
|
35
|
+
KR: { base: 0.28, currency: 'KRW', name: 'South Korea' },
|
|
36
|
+
SG: { base: 0.42, currency: 'SGD', name: 'Singapore' },
|
|
37
37
|
|
|
38
38
|
// South America
|
|
39
|
-
BR: { base: 0.
|
|
40
|
-
AR: { base: 0.
|
|
41
|
-
CL: { base: 0.
|
|
39
|
+
BR: { base: 0.25, currency: 'BRL', name: 'Brazil' },
|
|
40
|
+
AR: { base: 0.18, currency: 'ARS', name: 'Argentina' },
|
|
41
|
+
CL: { base: 0.30, currency: 'CLP', name: 'Chile' },
|
|
42
42
|
|
|
43
43
|
// Oceania
|
|
44
|
-
AU: { base: 0.
|
|
45
|
-
NZ: { base: 0.
|
|
44
|
+
AU: { base: 0.45, currency: 'AUD', name: 'Australia' },
|
|
45
|
+
NZ: { base: 0.40, currency: 'NZD', name: 'New Zealand' },
|
|
46
46
|
|
|
47
47
|
// Africa
|
|
48
|
-
ZA: { base: 0.
|
|
49
|
-
NG: { base: 0.
|
|
50
|
-
KE: { base: 0.
|
|
48
|
+
ZA: { base: 0.22, currency: 'ZAR', name: 'South Africa' },
|
|
49
|
+
NG: { base: 0.15, currency: 'NGN', name: 'Nigeria' },
|
|
50
|
+
KE: { base: 0.28, currency: 'KES', name: 'Kenya' },
|
|
51
51
|
|
|
52
52
|
// Default
|
|
53
|
-
DEFAULT: { base: 0.
|
|
53
|
+
DEFAULT: { base: 0.33, currency: 'USD', name: 'Global Average' }
|
|
54
54
|
};
|
|
55
55
|
|
|
56
56
|
/**
|