I wanted to make a case to start implementing the BNS to resolve into App URI/URL’s via the name’s zone file (i.e. a zonefile for helloblockstack.app that would point to https://helloblockstack.com/), but I’m not familiar with the DNS file standard RFC1035, nor the schema, and the github repo provides no help either.
I also don’t understand how this zonefile (which is currently stored in names) “fits” that RFC1035, as from my understanding URI isn’t even in the original spec, much less is the spec a JSON file…
So, I guess my question is, what is the schema in the first place? And if so, is there a way to make a zonefile that resolves into an application’s location? Or if not, could we make that?
Having an id resolve into https://domain.com, ipfs://address/index.html, https://123.456.789.101:7070/, or even data:text/html,<h1>hello world</h1>(it works, try it!) would be super awesome and a huge step forward (imo) for the blockstack app landscape.
The Blockstack explorer will parse the zone file into a JSON blob to make it easier to query (using this library).
If you wanted to use BNS zone files to resolve names via DNS, you should be able to point your favorite DNS resolver to zone files you fetch from Blockstack. For example, I created a prototype Blockstack/Tor integration a while back that can be found here.
Thanks for the sample repository and showing how they are not just JSON!
So basically this would mean that a BNS zonefile that would resolve into an app’s location would be something along the lines of
$ORIGIN helloblockstack.app
$TTL 3600
_http._tcp URI 10 1 "https://helloblockstack.com"
?
I was perusing the standard again and saw that the line should be similar to NAME TYPE CLASS TTL RDLENGTH RDATA
Does this make the last line of the zone file
Name: _http._tcp URI
Type: 10 == NULL
TTL: I assume is set by $TTL
RDLENGTH: 1? What does this mean (as it is surely not the size of the URI in “octets”)?
RDATA: The URI
Are there types other than URI that should be used (such as IPFS), or should those all be relegated to the TEXT type as it is in your repository instead of the NULL type which (I assume) is used here?
Sorry if this is too many questions, if you can point me to a place where I can learn about this otherwise then please do - I’ve perused the RFC file and it doesn’t have too many example or specifics, and neither does the Wikipedia page. (I had to look up why _http._tcp is used here, but that site relates it to the SRV type and not the NULL type used in Blockstack profile-zonefiles).