@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.js
CHANGED
|
@@ -1434,8 +1434,9 @@ var OpenPGPUtils = class {
|
|
|
1434
1434
|
* @throws - Error if the specified subkey fingerprint is not found
|
|
1435
1435
|
*/
|
|
1436
1436
|
static async sanitizeSubkey(key, fingerprint) {
|
|
1437
|
+
const clonedKey = await openpgp2__namespace.readKey({ binaryKey: key.toPublic().write() });
|
|
1437
1438
|
const targetFingerprint = toBytes32(to0x(fingerprint));
|
|
1438
|
-
const publicKey =
|
|
1439
|
+
const publicKey = clonedKey.toPublic();
|
|
1439
1440
|
const targetSubkey = publicKey.subkeys.find(
|
|
1440
1441
|
(sub) => toBytes32(to0x(sub.getFingerprint())) === targetFingerprint
|
|
1441
1442
|
);
|
|
@@ -2370,13 +2371,13 @@ var Web3PGPService = class {
|
|
|
2370
2371
|
if (skipCryptographicVerifications !== true) {
|
|
2371
2372
|
await OpenPGPUtils.verifyKey(pk, log.blockTimestamp);
|
|
2372
2373
|
}
|
|
2373
|
-
console.debug(`[Web3PGP - Service] Successfully extracted
|
|
2374
|
+
console.debug(`[Web3PGP - Service] Successfully extracted key certification for ${pk.getFingerprint()} from KeyCertifiedLog event`);
|
|
2374
2375
|
return pk.toPublic();
|
|
2375
2376
|
} catch (err) {
|
|
2376
2377
|
if (err instanceof Web3PGPServiceValidationError) {
|
|
2377
2378
|
throw err;
|
|
2378
2379
|
}
|
|
2379
|
-
throw new Web3PGPServiceValidationError(`Failed to extract the
|
|
2380
|
+
throw new Web3PGPServiceValidationError(`Failed to extract the key certification form the OpenPGP message in the KeyCertifiedLog event: ${err}`);
|
|
2380
2381
|
}
|
|
2381
2382
|
}
|
|
2382
2383
|
/**
|
|
@@ -2430,13 +2431,13 @@ var Web3PGPService = class {
|
|
|
2430
2431
|
if (skipCryptographicVerifications !== true) {
|
|
2431
2432
|
await OpenPGPUtils.verifyKey(pk, log.blockTimestamp);
|
|
2432
2433
|
}
|
|
2433
|
-
console.debug(`[Web3PGP - Service] Successfully extracted
|
|
2434
|
+
console.debug(`[Web3PGP - Service] Successfully extracted the key certification revocation for ${pk.getFingerprint()} from KeyCertificationRevokedLog event`);
|
|
2434
2435
|
return pk.toPublic();
|
|
2435
2436
|
} catch (err) {
|
|
2436
2437
|
if (err instanceof Web3PGPServiceValidationError) {
|
|
2437
2438
|
throw err;
|
|
2438
2439
|
}
|
|
2439
|
-
throw new Web3PGPServiceValidationError(`Failed to extract the
|
|
2440
|
+
throw new Web3PGPServiceValidationError(`Failed to extract the key certification revocation form the OpenPGP message in the KeyCertificationRevokedLog event: ${err}`);
|
|
2440
2441
|
}
|
|
2441
2442
|
}
|
|
2442
2443
|
/**
|