navcoin / navcoin-core

bitcoin-core 0.13 fork ported for NavCoin
MIT License
123 stars 92 forks source link

[DOTNAV] Add resolve subdomains option to resolvename #911

Closed aguycalled closed 2 years ago

aguycalled commented 2 years ago

Add a boolean option to resolvename so it also shows the different subdomains of a name.

Example:

resolvename navcoin.nav Output:

{
  "_expiry": "6978256",
  "_key": "acce5028f8e7c95a4e3f676e76b3fddb21db12b42de9182aa0cd047d282e35ff7f64b4cf12d02897d79f558e94c6cb14",
  "ip": "127.0.0.1"
}

resolvename Navcoin.nav true Output:

{
  "_expiry": "6978256",
  "_key": "acce5028f8e7c95a4e3f676e76b3fddb21db12b42de9182aa0cd047d282e35ff7f64b4cf12d02897d79f558e94c6cb14",
  ".": {
    "ip": "127.0.0.1"
  },
  "www": {
    "ip": "8.8.8.8"
  }
}
mxaddict commented 2 years ago

@aguycalled I'm working on this now

mxaddict commented 2 years ago

@aguycalled I think maybe something like this would be easier to use?

{
  "_expiry": "6978256",
  "_key": "acce5028f8e7c95a4e3f676e76b3fddb21db12b42de9182aa0cd047d282e35ff7f64b4cf12d02897d79f558e94c6cb14",
  "_subdomains": {
    ".": "127.0.0.1",
    "www": "8.8.8.8"
  }
}