pubky / pkarr

Public Key Addressable Resource Records (sovereign TLDs)
https://app.pkarr.org
MIT License
153 stars 17 forks source link

denormalize names #22

Closed dvc94ch closed 11 months ago

dvc94ch commented 11 months ago

there must be some public api to denormalize the names. when creating a dns packet, pkarr currently makes changes to it and it breaks any user code that does not expect this.

Nuhvi commented 11 months ago

Absolutely, can you suggest an API for that? would signed_packet.packet_with_relative_names() work for example?

I need the normalized to be the default data for DNS reasons, so maybe I can just make signed_packet.relative_records() that returns records directly instead?

dvc94ch commented 11 months ago

think resource_records(&self, name: &str) -> impl Iterator<Item = ResourceRecord> should work. will open a PR shortly

Nuhvi commented 11 months ago

Really appreciate that, are you aware that Pkarr is crate now? I will try to update often as we merge stuff.

Nuhvi commented 11 months ago

@dvc94ch should it be resource_records(&self, name:&str, type: ...)

dvc94ch commented 11 months ago

users can filter for type and convert it. we could add resource_records_txt, resource_records_ip, but not sure if it's worth it

Nuhvi commented 11 months ago

Now in Main and v0.1.3