From 373d6eedf6f0b14ea4ca71988fe572241e477500 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Mon, 19 Apr 2021 11:07:18 +0200 Subject: [PATCH] Remove obsolete method --- src/claim.js | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/src/claim.js b/src/claim.js index fd47bfb..0c55962 100644 --- a/src/claim.js +++ b/src/claim.js @@ -17,7 +17,6 @@ const openpgp = require('openpgp') const validator = require('validator') const validUrl = require('valid-url') const mergeOptions = require('merge-options') -const keys = require('./keys') const proofs = require('./proofs') const verifications = require('./verifications') const claimDefinitions = require('./claimDefinitions') @@ -73,32 +72,6 @@ class Claim { VERIFIED: 'verified', } - /** - * Generate an array of claim objects from an OpenPGP key's notations - * @static - * @async - * @function - * @param {Key} key - Public key - * @returns {Claim} - */ - static async fromKey(key) { - if (!(key instanceof openpgp.key.Key)) { - throw new Error('Input is not an OpenPGP key') - } - const fingerprintFromKey = await keys.getFingerprint(key) - const userData = await keys.getUserData(key) - - let claims = [] - userData.forEach((user, i) => { - let userClaims = [] - user.notations.forEach((notation, j) => { - userClaims.push(new Claim(notation, fingerprintFromKey)) - }) - claims.push(userClaims) - }) - return claims - } - /** * Generate a claim object from a JSON object * @static