@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.cjs CHANGED
@@ -3929,6 +3929,12 @@ async function verifyDeviceCredential(credential) {
3929
3929
  `this credential names account ${parsed.account}, but its root key derives ${derived} \u2014 the certificate was re-pointed at another account`
3930
3930
  );
3931
3931
  }
3932
+ const nonce2 = fromHex(parsed.device, "device", 32).subarray(0, 16);
3933
+ if (await mintDeviceId(parsed.account, nonce2) !== parsed.device) {
3934
+ throw new Error(
3935
+ `this credential names device ${parsed.device}, which was not minted for account ${parsed.account}; core refuses it`
3936
+ );
3937
+ }
3932
3938
  const signed = await verifySignature(
3933
3939
  parsed.rootPublicKey,
3934
3940
  fromHex(parsed.signature, "signature", 64),
@@ -10475,7 +10481,7 @@ function bytes32(value, label2) {
10475
10481
  }
10476
10482
 
10477
10483
  // src/namespace-op/namespace-op.ts
10478
- var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 23;
10484
+ var SIGNED_NAMESPACE_OP_SCHEMA_VERSION = 24;
10479
10485
  var NAMESPACE_SIGN_DOMAIN = new TextEncoder().encode("calimero.namespace.v1");
10480
10486
  var NAMESPACE_OP_ROOT = 0;
10481
10487
  var ROOT_OP2 = {