@calimero-network/mero-js 24.3.0 → 24.4.1
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/admin-api/admin-types.d.ts +19 -0
- package/dist/cloud/enrol-redirect.d.ts +3 -3
- package/dist/cloud/enrol-redirect.js +3 -3
- package/dist/device-cert/device-cert.d.ts +6 -4
- package/dist/device-cert/device-cert.js +11 -4
- package/dist/index.browser.mjs +2 -2
- package/dist/index.browser.mjs.map +2 -2
- package/dist/index.cjs +6 -0
- package/dist/index.cjs.map +2 -2
- package/dist/index.mjs +6 -0
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3647,6 +3647,12 @@ async function verifyDeviceCredential(credential) {
|
|
|
3647
3647
|
`this credential names account ${parsed.account}, but its root key derives ${derived} \u2014 the certificate was re-pointed at another account`
|
|
3648
3648
|
);
|
|
3649
3649
|
}
|
|
3650
|
+
const nonce2 = fromHex(parsed.device, "device", 32).subarray(0, 16);
|
|
3651
|
+
if (await mintDeviceId(parsed.account, nonce2) !== parsed.device) {
|
|
3652
|
+
throw new Error(
|
|
3653
|
+
`this credential names device ${parsed.device}, which was not minted for account ${parsed.account}; core refuses it`
|
|
3654
|
+
);
|
|
3655
|
+
}
|
|
3650
3656
|
const signed = await verifySignature(
|
|
3651
3657
|
parsed.rootPublicKey,
|
|
3652
3658
|
fromHex(parsed.signature, "signature", 64),
|