<?php

declare(strict_types=1);

namespace Drupal\flowdrop;

use Drupal\Core\Config\Entity\ConfigEntityInterface;

/**
 * Defines a trusted workflow-bundle publisher.
 *
 * A trusted publisher pairs a key id (the entity id, matched against a bundle
 * signature's key_id) with the publisher's Ed25519 public key. Only enabled
 * publishers grant trust. The module ships none — a site adds a publisher by
 * pasting its key id and base64 public key.
 *
 * @internal
 *   This class is not part of the public API and may change without notice.
 */
interface FlowDropTrustedPublisherInterface extends ConfigEntityInterface {

  /**
   * Gets the base64-encoded Ed25519 public key.
   *
   * @return string
   *   The base64 public key.
   */
  public function getPublicKey(): string;

  /**
   * Whether this publisher is enabled (grants trust).
   *
   * @return bool
   *   TRUE when enabled.
   */
  public function isEnabled(): bool;

}
