Skip to main content

stellar_baselib/
network.rs

1//! Contains passphrases for common networks
2/// - `Networks::PUBLIC`: `Public Global Stellar Network ; September 2015`
3/// - `Networks::TESTNET`: `Test SDF Network ; September 2015`
4pub trait NetworkPassphrase {
5    fn public() -> &'static str;
6    fn testnet() -> &'static str;
7    fn futurenet() -> &'static str;
8    fn sandbox() -> &'static str;
9    fn standalone() -> &'static str;
10}
11
12#[derive(Debug)]
13pub struct Networks;
14impl NetworkPassphrase for Networks {
15    /// Passphrase for the Public Global Stellar Network, created in September 2015.
16    fn public() -> &'static str {
17        "Public Global Stellar Network ; September 2015"
18    }
19
20    /// Passphrase for the Test SDF Network, created in September 2015.
21    fn testnet() -> &'static str {
22        "Test SDF Network ; September 2015"
23    }
24
25    fn futurenet() -> &'static str {
26        "Test SDF Future Network ; October 2022"
27    }
28
29    fn sandbox() -> &'static str {
30        "Local Sandbox Stellar Network ; September 2022"
31    }
32
33    fn standalone() -> &'static str {
34        "Standalone Network ; February 2017"
35    }
36}