dimo_rust_sdk/environments/
mod.rs1pub mod dimo_environment {
2 use std::fmt::Debug;
3
4 #[derive(Debug)]
5 pub struct Routes {
6 pub attestation: &'static str,
7 pub auth: &'static str,
8 pub identity: &'static str,
9 pub devices: &'static str,
10 pub device_definitions: &'static str,
11 pub events: &'static str,
12 pub telemetry: &'static str,
13 pub token_exchange: &'static str,
14 pub trips: &'static str,
15 pub valuations: &'static str,
16 }
17
18 pub struct Constants {
19 pub nft_address: &'static str,
20 pub rpc_provider: &'static str,
21 pub dlx_address: &'static str,
22 pub vehicle_address: &'static str,
23 }
24
25 pub struct Environment {
26 pub routes: Routes,
27 pub constants: Constants,
28 }
29
30 pub const PRODUCTION: Environment = Environment {
31 routes: Routes {
32 attestation: "https://attestation-api.dimo.zone",
33 auth: "https://auth.dimo.zone",
34 identity: "https://identity-api.dimo.zone/query",
35 devices: "https://devices-api.dimo.zone",
36 device_definitions: "https://device-definitions-api.dimo.zone",
37 events: "https://events-api.dimo.zone",
38 telemetry: "https://telemetry-api.dimo.zone/query",
39 token_exchange: "https://token-exchange-api.dimo.zone",
40 trips: "https://trips-api.dimo.zone",
41 valuations: "https://valuations-api.dimo.zone",
42 },
43 constants: Constants {
44 nft_address: "0xbA5738a18d83D41847dfFbDC6101d37C69c9B0cF",
45 rpc_provider: "https://eth.llamarpc.com",
46 dlx_address: "0x9A9D2E717bB005B240094ba761Ff074d392C7C85",
47 vehicle_address: "0xba5738a18d83d41847dffbdc6101d37c69c9b0cf",
48 },
49 };
50
51 pub const DEV: Environment = Environment {
52 routes: Routes {
53 attestation: "https://attestation-api.dev.dimo.zone",
54 auth: "https://auth.dev.dimo.zone",
55 identity: "https://identity-api.dev.dimo.zone/query",
56 devices: "https://devices-api.dev.dimo.zone",
57 device_definitions: "https://device-definitions-api.dev.dimo.zone",
58 events: "https://events-api.dev.dimo.zone",
59 telemetry: "https://telemetry-api.dev.dimo.zone/query",
60 token_exchange: "https://token-exchange-api.dev.dimo.zone",
61 trips: "https://trips-api.dev.dimo.zone",
62 valuations: "https://valuations-api.dev.dimo.zone",
63 },
64 constants: Constants {
65 nft_address: "0x45fbCD3ef7361d156e8b16F5538AE36DEdf61Da8",
66 rpc_provider: "https://eth.llamarpc.com",
67 dlx_address: "",
68 vehicle_address: "0x45fbCD3ef7361d156e8b16F5538AE36DEdf61Da8",
69 },
70 };
71}