[][src]Function openalias::addresses

pub fn addresses(address: &str) -> Result<Vec<CryptoAddress>, Error>

Ask a DNS server for addresses for the specified OpenAlias.

Examples

assert_eq!(addresses("donate@getmonero.org").unwrap().sorted(),
           vec![CryptoAddress {
                    cryptocurrency: "btc".to_string(),
                    address: "1KTexdemPdxSBcG55heUuTjDRYqbC5ZL8H".to_string(),

                    recipient_name: Some("Monero Development".to_string()),
                    tx_description: Some("Donation to Monero Core Team".to_string()),
                    tx_amount: None,
                    tx_payment_id: None,
                    address_signature: None,
                    checksum: None,

                    additional_values: BTreeMap::new(),
                },
                CryptoAddress {
                    cryptocurrency: "xmr".to_string(),
                    address: "44AFFq5kSiGBoZ4NMDwYtN18obc8AemS33DBLWs3H7otXft\
                              3XjrpDtQGv7SqSsaBYBb98uNbr2VBBEt7f2wfn3RVGQBEP3A".to_string(),

                    recipient_name: Some("Monero Development".to_string()),
                    tx_description: Some("Donation to Monero Core Team".to_string()),
                    tx_amount: None,
                    tx_payment_id: None,
                    address_signature: None,
                    checksum: None,

                    additional_values: BTreeMap::new(),
                }]);