How to use the bns.util.trimFQDN 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
getJSON() {
    return {
      service: util.trimFQDN(this.service),
      protocol: util.trimFQDN(this.protocol),
      priority: this.priority,
      weight: this.weight,
      target: this.target.toJSON(),
      port: this.port
    };
  }
github handshake-org / hsd / lib / dns / records.js View on Github external
toString() {
    const nid = util.trimFQDN(this.nid);
    return `magnet:?xt=urn:${nid.toLowerCase()}:${this.nin}`;
  }
github handshake-org / hsd / lib / dns / records.js View on Github external
getJSON() {
    const protocol = util.trimFQDN(this.protocol);
    return {
      protocol: protocol.toLowerCase(),
      port: this.port,
      usage: this.usage,
      selector: this.selector,
      matchingType: this.matchingType,
      certificate: this.certificate.toString('hex')
    };
  }
github handshake-org / hsd / lib / dns / records.js View on Github external
getJSON() {
    return {
      service: util.trimFQDN(this.service),
      protocol: util.trimFQDN(this.protocol),
      priority: this.priority,
      weight: this.weight,
      target: this.target.toJSON(),
      port: this.port
    };
  }
github handshake-org / hsd / lib / dns / records.js View on Github external
toString() {
    const currency = util.trimFQDN(this.currency);
    return `${currency.toLowerCase()}:${this.address}`;
  }