How to use the ipns.extractPublicKey function in ipns

To help you get started, we’ve selected a few ipns 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 ipfs / js-ipfs / src / core / ipns / resolver.js View on Github external
async _validateRecord (peerId, ipnsEntry) {
    const pubKey = await ipns.extractPublicKey(peerId, ipnsEntry)

    // IPNS entry validation
    await ipns.validate(pubKey, ipnsEntry)

    return ipnsEntry.value.toString()
  }
}