some marketplace changes

This commit is contained in:
Alexander Medvedev 2026-08-18 15:45:15 +02:00
parent 4edc9b5409
commit 8339cbf6ec
3 changed files with 28 additions and 7 deletions

View File

@ -5,6 +5,30 @@ interface context {
use command.{command};
use permission.{permission};
/// Verified marketplace metadata for signed plugins.
record marketplace-metadata {
/// The marketplace base URL where this plugin is registered.
marketplace-url: string,
/// The unique plugin ID on the marketplace.
plugin-id: s64,
/// The canonical plugin name.
plugin-name: string,
/// The semver version string of the plugin.
version: string,
/// Developer ID.
dev-id: s64,
/// Developer display name or username.
dev-name: string,
/// Whether this is a paid marketplace plugin.
is-paid: bool,
/// The buyer / licensee user ID (0 for free/open-source).
user-id: s64,
/// Unique license key issued to the buyer, if paid.
license-key: option<string>,
/// ISO-8601 timestamp of when this binary/license was issued.
issued-at: string,
}
/// A contextual handle for plugin-related operations.
resource context {
/// Registers a handler for a specific event.
@ -29,5 +53,9 @@ interface context {
/// Returns the global server instance.
get-server: func() -> server;
/// Returns verified marketplace metadata if this plugin binary is signed, or none if unsigned.
get-marketplace-metadata: func() -> option<marketplace-metadata>;
}
}

View File

@ -1,5 +0,0 @@
/// Interface for querying marketplace details and public keys from the host.
interface marketplace {
/// Returns the active Pumpkin Marketplace Ed25519 public key in hex format (if available/cached).
get-public-key: func() -> option<string>;
}

View File

@ -67,8 +67,6 @@ world plugin {
import display;
/// Provides game rules definitions and queries.
import game-rules;
/// Provides marketplace public key access for signature verification.
import marketplace;
// --- Plugin-provided exports ---