@calimero-network/mero-js 24.4.0 → 24.5.0

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.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),
@@ -10193,7 +10199,7 @@ function bytes32(value, label2) {
10193
10199
  }
10194
10200
 
10195
10201
  // src/namespace-op/namespace-op.ts
10196
- var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 23;
10202
+ var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 24;
10197
10203
  var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
10198
10204
  var NAMESPACE_OP_ROOT = 0;
10199
10205
  var ROOT_OP2 = {