How to use the bns.util.isFQDN function in bns

To help you get started, we’ve selected a few bns examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github handshake-org / hsd / lib / dns / records.js View on Github external
toPointer(name) {
    assert(typeof name === 'string');

    const ip = IP.toBuffer(;
    const data = ipPack(ip);
    const hash = base32.encodeHex(data);
    const labels = util.split(name);
    const tld = util.label(name, labels, -1);

    return `_${hash}.${tld}.`;