@kiltprotocol/eddsa-jcs-2022
Advanced tools
Comparing version 0.1.0-rc.2 to 0.1.0-rc.3
@@ -29,3 +29,3 @@ "use strict"; | ||
else if ((0, jcs_data_integrity_proofs_common_1.isMultikeyVerificationMethod)(verificationMethod)) { | ||
const { prefix, publicKey } = (0, jcs_data_integrity_proofs_common_1.decodeMultikeyVerificationMethod)(verificationMethod); | ||
const { prefix, keyBytes: publicKey } = (0, jcs_data_integrity_proofs_common_1.decodeBase58BtcMultikey)(verificationMethod.publicKeyMultibase); | ||
if (prefix !== exports.ED25519_PUB_MULTICODEC_PREFIX) { | ||
@@ -32,0 +32,0 @@ throw new Error(`Decoded multicodec prefix "0x${prefix.toString(16)}" does not match the one for the expected key type "0x${exports.ED25519_PUB_MULTICODEC_PREFIX.toString(16)}".`); |
@@ -7,3 +7,3 @@ /** | ||
*/ | ||
import { jcsCanonicalize as canonize, decodeMultikeyVerificationMethod, isBase58VerificationMethod, isMultikeyVerificationMethod, } from "@kiltprotocol/jcs-data-integrity-proofs-common"; | ||
import { jcsCanonicalize as canonize, decodeBase58BtcMultikey, isBase58VerificationMethod, isMultikeyVerificationMethod, } from "@kiltprotocol/jcs-data-integrity-proofs-common"; | ||
import { createVerifyData, } from "@kiltprotocol/jcs-data-integrity-proofs-common"; | ||
@@ -27,3 +27,3 @@ import { ed25519 } from "@noble/curves/ed25519"; | ||
else if (isMultikeyVerificationMethod(verificationMethod)) { | ||
const { prefix, publicKey } = decodeMultikeyVerificationMethod(verificationMethod); | ||
const { prefix, keyBytes: publicKey } = decodeBase58BtcMultikey(verificationMethod.publicKeyMultibase); | ||
if (prefix !== ED25519_PUB_MULTICODEC_PREFIX) { | ||
@@ -30,0 +30,0 @@ throw new Error(`Decoded multicodec prefix "0x${prefix.toString(16)}" does not match the one for the expected key type "0x${ED25519_PUB_MULTICODEC_PREFIX.toString(16)}".`); |
{ | ||
"bugs": "https://github.com/KILTprotocol/jcs-data-integrity-proofs/issues", | ||
"dependencies": { | ||
"@kiltprotocol/jcs-data-integrity-proofs-common": "^0.1.0-rc.2", | ||
"@kiltprotocol/jcs-data-integrity-proofs-common": "^0.1.0-rc.3", | ||
"@noble/curves": "^1.0.0", | ||
@@ -35,4 +35,4 @@ "@scure/base": "^1.1.1" | ||
"types": "./cjs/index.d.ts", | ||
"version": "0.1.0-rc.2", | ||
"version": "0.1.0-rc.3", | ||
"stableVersion": "0.0.0" | ||
} |
17094