@jibidieuw/dexes 0.0.0 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -1409,8 +1409,9 @@ var OpenPGPUtils = class {
|
|
|
1409
1409
|
* @throws - Error if the specified subkey fingerprint is not found
|
|
1410
1410
|
*/
|
|
1411
1411
|
static async sanitizeSubkey(key, fingerprint) {
|
|
1412
|
+
const clonedKey = await openpgp2.readKey({ binaryKey: key.toPublic().write() });
|
|
1412
1413
|
const targetFingerprint = toBytes32(to0x(fingerprint));
|
|
1413
|
-
const publicKey =
|
|
1414
|
+
const publicKey = clonedKey.toPublic();
|
|
1414
1415
|
const targetSubkey = publicKey.subkeys.find(
|
|
1415
1416
|
(sub) => toBytes32(to0x(sub.getFingerprint())) === targetFingerprint
|
|
1416
1417
|
);
|
|
@@ -2345,13 +2346,13 @@ var Web3PGPService = class {
|
|
|
2345
2346
|
if (skipCryptographicVerifications !== true) {
|
|
2346
2347
|
await OpenPGPUtils.verifyKey(pk, log.blockTimestamp);
|
|
2347
2348
|
}
|
|
2348
|
-
console.debug(`[Web3PGP - Service] Successfully extracted
|
|
2349
|
+
console.debug(`[Web3PGP - Service] Successfully extracted key certification for ${pk.getFingerprint()} from KeyCertifiedLog event`);
|
|
2349
2350
|
return pk.toPublic();
|
|
2350
2351
|
} catch (err) {
|
|
2351
2352
|
if (err instanceof Web3PGPServiceValidationError) {
|
|
2352
2353
|
throw err;
|
|
2353
2354
|
}
|
|
2354
|
-
throw new Web3PGPServiceValidationError(`Failed to extract the
|
|
2355
|
+
throw new Web3PGPServiceValidationError(`Failed to extract the key certification form the OpenPGP message in the KeyCertifiedLog event: ${err}`);
|
|
2355
2356
|
}
|
|
2356
2357
|
}
|
|
2357
2358
|
/**
|
|
@@ -2405,13 +2406,13 @@ var Web3PGPService = class {
|
|
|
2405
2406
|
if (skipCryptographicVerifications !== true) {
|
|
2406
2407
|
await OpenPGPUtils.verifyKey(pk, log.blockTimestamp);
|
|
2407
2408
|
}
|
|
2408
|
-
console.debug(`[Web3PGP - Service] Successfully extracted
|
|
2409
|
+
console.debug(`[Web3PGP - Service] Successfully extracted the key certification revocation for ${pk.getFingerprint()} from KeyCertificationRevokedLog event`);
|
|
2409
2410
|
return pk.toPublic();
|
|
2410
2411
|
} catch (err) {
|
|
2411
2412
|
if (err instanceof Web3PGPServiceValidationError) {
|
|
2412
2413
|
throw err;
|
|
2413
2414
|
}
|
|
2414
|
-
throw new Web3PGPServiceValidationError(`Failed to extract the
|
|
2415
|
+
throw new Web3PGPServiceValidationError(`Failed to extract the key certification revocation form the OpenPGP message in the KeyCertificationRevokedLog event: ${err}`);
|
|
2415
2416
|
}
|
|
2416
2417
|
}
|
|
2417
2418
|
/**
|