Go to file
gibbz00 8158a80633 feat!: add `InfoType` enum for PostalInfo.info_type 2024-10-19 07:56:06 +00:00
.github Add FUNDING metadata 2024-10-10 12:59:58 +00:00
src feat!: add `InfoType` enum for PostalInfo.info_type 2024-10-19 07:56:06 +00:00
tests Add support for rgp-poll extension 2024-05-27 11:38:32 +02:00
.gitignore update doc and release 0.4 2022-07-26 14:49:37 +08:00
Cargo.toml Upgrade to rustls-native-certs 0.8 2024-09-03 10:21:34 +02:00
LICENSE added MIT licence 2021-07-27 01:51:28 +08:00
README.md Update README.md 2024-10-10 13:00:14 +00:00
cover.svg Add cover image (#34) 2024-02-28 11:13:52 -08:00
deny.toml Add GitHub Actions configuration 2023-02-28 17:04:58 +01:00

README.md

Cover logo

EPP client library for async Rust

Documentation Crates.io Build status License: MIT

Description

instant-epp is a client library written in Rust for Internet domain registration and management for domain registrars. We have implemented support for the following standards:

This library is used in production at Instant Domain Search.

History

instant-epp was originally created by @masalachai as epp-client in the summer of 2021. By fall, Instant Domains employees started contributing to the project. In February of 2023, after most of the contributions to epp-client had come from Instant Domains for the intervening years, we decided to fork the project, replacing its dependency on quick-xml with instant-xml in the process. Many thanks to @masalachai for starting epp-client!

Getting started

You can create a mut variable of type EppClient with the domain registry config.

use std::collections::HashMap;
use std::net::ToSocketAddrs;
use std::time::Duration;

use instant_epp::EppClient;
use instant_epp::domain::DomainCheck;
use instant_epp::common::NoExtension;

#[tokio::main]
async fn main() {
    // Create an instance of EppClient
    let timeout = Duration::from_secs(5);
    let mut client = match EppClient::connect("registry_name".to_string(), ("example.com".to_owned(), 7000), None, timeout).await {
        Ok(client) => client,
        Err(e) => panic!("Failed to create EppClient: {}",  e)
    };

    // Make a EPP Hello call to the registry
    let greeting = client.hello().await.unwrap();
    println!("{:?}", greeting);

    // Execute an EPP Command against the registry with distinct request and response objects
    let domain_check = DomainCheck { domains: &["eppdev.com", "eppdev.net"] };
    let response = client.transact(&domain_check, "transaction-id").await.unwrap();
    response
        .res_data()
        .unwrap()
        .list
        .iter()
        .for_each(|chk| println!("Domain: {}, Available: {}", chk.inner.id, chk.inner.available));
}

The output would look like this:

Domain: eppdev.com, Available: 1
Domain: eppdev.net, Available: 1