ICANN RDAP Common
This is a common component library for the Registration Data Access Protocol (RDAP) written and sponsored by the Internet Corporation for Assigned Names and Numbers (ICANN). RDAP is standard of the IETF, and extensions to RDAP are a current work activity of the IETF's REGEXT working group. More information on ICANN's role in RDAP can be found here.
Installation
Add the library to your Cargo.toml: cargo add icann-rdap-common.
This library can be compiled for WASM targets.
Usage
Create some RDAP objects:
// create an entity
use Entity;
let holder = basic.handle.build;
// create an RDAP domain
use Domain;
let domain = basic.ldh_name.entity.build;
// create an IP network
use Network;
let net = basic.cidr.entity.build.unwrap;
// create a nameserver
use Nameserver;
let ns = basic.ldh_name.entity.build.unwrap;
// create an autnum
use Autnum;
let autnum = basic.autnum_range.entity.build;
Parse RDAP JSON:
use RdapResponse;
let json = r#"
{
"objectClassName": "ip network",
"links": [
{
"value": "http://localhost:3000/rdap/ip/10.0.0.0/16",
"rel": "self",
"href": "http://localhost:3000/rdap/ip/10.0.0.0/16",
"type": "application/rdap+json"
}
],
"events": [
{
"eventAction": "registration",
"eventDate": "2023-06-16T22:56:49.594173356+00:00"
},
{
"eventAction": "last changed",
"eventDate": "2023-06-16T22:56:49.594189140+00:00"
}
],
"startAddress": "10.0.0.0",
"endAddress": "10.0.255.255",
"ipVersion": "v4"
}
"#;
let rdap: RdapResponse = from_str.unwrap;
assert!;
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT) at your option.
Contribution
Unless you explicitly state otherwise, any contribution, as defined in the Apache-2.0 license, intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed pursuant to the Apache License, Version 2.0 or the MIT License referenced as above, at ICANN’s option, without any additional terms or conditions.