Skip to content

peepsx/ddns-query

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

@ddns/query

This module is used for querying a dWebTrie, within a NameDrive, for dDNS records, per the dDNS Specification.

Example Usage

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

API

q = new Query(dbLocation, recordName);

Create a new Query instance.

q.record

Returns the full record, as follows:

[
  {rdata: <dweb-key>},
  {ttl: <record-ttl>},
  {class: <record-class>},
  {type: <record-type>}
]

q.rdata

Returns the RDATA (dWeb Discovery Key) for the recordName.

q.ttl

Returns the TTL for the recordName.

q.class

Returns the Class for the recordName.

q.type

Returns the type for the recordName.

LICENSE

MIT

Copyright

Copyright 2020 Peeps Labs. All rights reserved.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published