This module is used for querying a dWebTrie, within a NameDrive, for dDNS records, per the dDNS Specification.
const { Query } = require('@ddns/query');
const dbLocation = "/root/DDrive/nd1/peeps.dcom.db"
const q = new Query(dbLocation, test);
let recordKey = q.rdata(); // returns just the dWeb key associated with the "test" record
let fullRecord = q.record(); // returns key, ttl, class and type for "test" record
Create a new Query instance.
Returns the full record, as follows:
[
{rdata: <dweb-key>},
{ttl: <record-ttl>},
{class: <record-class>},
{type: <record-type>}
]
Returns the RDATA (dWeb Discovery Key) for the recordName
.
Returns the TTL for the recordName
.
Returns the Class for the recordName
.
Returns the type for the recordName
.
Copyright 2020 Peeps Labs. All rights reserved.