pub struct SkillDefinition {Show 18 fields
pub skill_id: String,
pub name: String,
pub version: String,
pub creator_did: String,
pub creator_wallet: Option<Address>,
pub description: String,
pub input_schema: Value,
pub output_schema: Value,
pub price_per_call: u128,
pub tags: Vec<String>,
pub required_capabilities: Vec<String>,
pub endpoint: Option<String>,
pub created_at: u64,
pub status: SkillStatus,
pub category: String,
pub invocation_count: u64,
pub rating: u8,
pub last_seen_at: u64,
}Expand description
A callable skill published to the Tenzro Network skills registry
Skills are atomic, reusable capabilities that agents can discover and invoke autonomously. Each skill specifies its interface (input/output schemas), pricing, and the endpoint to call.
Fields§
§skill_id: StringUnique skill identifier (UUID v4)
name: StringHuman-readable skill name (e.g., “web-search”, “code-review”)
version: StringSemantic version string (e.g., “1.0.0”)
creator_did: StringDID of the agent or human who registered this skill
creator_wallet: Option<Address>Payout wallet for the creator’s share of paid invocations.
Mandatory for any non-zero price_per_call; registration
fails (SkillError::MissingCreatorWallet) if omitted for a
paid skill. Free skills (price_per_call == 0) may leave this
None.
description: StringDescription of what this skill does
input_schema: ValueJSON Schema describing the expected input payload
output_schema: ValueJSON Schema describing the output payload
price_per_call: u128Price per invocation in TNZO atto-tokens (1 TNZO = 10^18 atto)
Discoverability tags (e.g., [“search”, “web”, “retrieval”])
required_capabilities: Vec<String>Required agent capabilities to invoke this skill
endpoint: Option<String>Optional HTTP/RPC endpoint for remote invocation If None, the skill is executed locally by the registered agent
created_at: u64Unix timestamp (seconds) when the skill was registered
status: SkillStatusCurrent status of the skill
category: StringCategory for organization (e.g., “ai”, “defi”, “data”, “general”)
invocation_count: u64Number of times this skill has been invoked
rating: u8Average rating (0–100, weighted by stake of raters)
last_seen_at: u64Unix timestamp (seconds) of the last liveness signal (registration,
invocation, or explicit tenzro_heartbeatSkill call). The liveness
sweeper uses this to flip status to Inactive once the skill goes
silent past the configured TTL, and eventually purges rows that stay
inactive past the purge window. Existing rows without this field
hydrate as “seen now” via the default_last_seen serde default —
stale entries surface only after they actually go silent post-upgrade.
Implementations§
Source§impl SkillDefinition
impl SkillDefinition
Sourcepub fn new(
name: String,
version: String,
creator_did: String,
description: String,
price_per_call: u128,
) -> Self
pub fn new( name: String, version: String, creator_did: String, description: String, price_per_call: u128, ) -> Self
Creates a new skill definition with default values
Sourcepub fn is_available(&self) -> bool
pub fn is_available(&self) -> bool
Returns true if the skill is available for invocation
Sourcepub fn touch(&mut self)
pub fn touch(&mut self)
Bumps last_seen_at to the current wall-clock time. Called by the
heartbeat RPC and by any successful invocation path that wants to
keep the skill from being swept as stale.
Sourcepub fn validate_for_registration(&self) -> Result<(), &'static str>
pub fn validate_for_registration(&self) -> Result<(), &'static str>
Validate registration invariants. Any paid skill must declare a
creator_wallet to receive the creator share of each invocation;
otherwise the creator share would have no destination and the
network commission would have nothing to split against. Free
skills (price_per_call == 0) may omit creator_wallet.
Trait Implementations§
Source§impl Clone for SkillDefinition
impl Clone for SkillDefinition
Source§fn clone(&self) -> SkillDefinition
fn clone(&self) -> SkillDefinition
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more