Skip to main content
StartRequest represents a request to create a new subject in the TAPLE network. This is the first operation in a subject’s lifecycle and establishes its initial configuration.

Fields

governance_id
DigestIdentifier
required
The identifier of the governance contract that will control this subject. The governance defines the rules, schemas, and policies that the subject must follow.
schema_id
String
required
The identifier of the schema used to validate events for this subject. This determines the structure and validation rules for the subject’s state.
namespace
String
required
The namespace of the subject. Namespaces are used to organize and categorize subjects within the network.
name
String
required
The name of the subject. This is a human-readable identifier for the subject within its namespace.
public_key
KeyIdentifier
required
The identifier of the public key of the subject owner. This key will have control over the subject and can authorize operations on it.

Usage Example

use taple_core::{
    EventRequest, StartRequest,
    DigestIdentifier, KeyIdentifier
};

// Create a governance subject
let create_governance = EventRequest::Create(StartRequest {
    governance_id: DigestIdentifier::default(),
    schema_id: "governance".to_string(),
    namespace: "".to_string(),
    name: "".to_string(),
    public_key: governance_key,
});

// Create a regular subject under a governance
let create_subject = EventRequest::Create(StartRequest {
    governance_id: governance_id.clone(),
    schema_id: "sensor_data".to_string(),
    namespace: "industrial".to_string(),
    name: "temperature_sensor_01".to_string(),
    public_key: owner_key,
});

Notes

  • StartRequest is wrapped in the EventRequest::Create variant
  • The governance must exist before creating subjects under it (except for the initial governance creation)
  • The schema specified must be defined in the governance contract
  • The subject’s identifier will be generated based on the request parameters
  • This request does not require evaluation and approval (unlike FactRequest)

Build docs developers (and LLMs) love