@calimero-network/mero-js 26.7.0 → 26.8.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
@@ -13433,8 +13433,9 @@ async function verifySignedAgentPolicy(policy, bundle, options = {}) {
13433
13433
  } catch {
13434
13434
  throw new Error("The signed agent policy is not JSON");
13435
13435
  }
13436
- if (parsed?.role !== "agent") {
13437
- throw new Error(`The signed file is a ${JSON.stringify(parsed?.role)} policy, not an agent one`);
13436
+ const role2 = options.role ?? "agent";
13437
+ if (parsed?.role !== role2) {
13438
+ throw new Error(`The signed file is a ${JSON.stringify(parsed?.role)} policy, not an ${role2} one`);
13438
13439
  }
13439
13440
  const profile = options.profile ?? PRODUCTION_PROFILE;
13440
13441
  if (parsed.profile !== profile) {