import std.security;
import std.audit;

robot SecureRover {
  trust trusted;

  permissions [
    audit.write,
    audit.read,
    identity.sign,
    identity.verify
  ];

  secret signing_key from "dev-signing-key";

  identity RobotIdentity {
    id: "secure-rover-001";
    public_key: "pub-key-secure-001";
  }

  audit MissionAudit {
    record robot.pose;
  }

  topic cmd: Velocity publish on "/cmd" secure {
    signed = true;
    min_trust = trusted;
    requires = [ identity.verify, identity.sign ];
  };

  behavior run() {
    audit.record("mission_start", "signed telemetry");
  }
}
