{
  "name": "forge-wasm",
  "language": "rust",
  "version": "0.2.0",
  "description": "WASM/WASI component exports for the Forge SDK \u2014 cross-language consumption",
  "manifest": "forge-rs/crates/forge-wasm/Cargo.toml",
  "manifestSha256": "306c930f34f77ea969142a5953c984c9816746c1c058e742eb7e83ce0a9b1afd",
  "status": "source-reference",
  "registryPublicationVerified": false,
  "route": "/libraries/rust/forge-wasm",
  "features": {},
  "files": [
    {
      "path": "forge-rs/crates/forge-wasm/src/error.rs",
      "sha256": "5741229b505f64d84b42c9d803deea4a71010c86c578dc8143b5583cf7d2cbd0",
      "artifactSha256": "b6b99df50091b762264e0eee11811df45e186a70fd5d21965d437f037ad6ff21",
      "url": "/reference/source/forge-rs/crates/forge-wasm/src/error.rs.txt",
      "declarations": [
        {
          "name": "::ForgeWasmError",
          "line": 35,
          "signature": "#[derive(Debug, Error)]\npub enum ForgeWasmError {\n    /// JSON serialization failed when converting a Rust type to JSON output.\n    ///\n    /// This indicates a bug in the WASM export layer if it occurs, since\n    /// all output types derive `Serialize`.\n    #[error(\"JSON serialization error: {0}\")]\n    Serialization(String),\n\n    /// JSON deserialization failed when parsing input from the calling language.\n    ///\n    /// The calling SDK sent malformed JSON. The error message includes the\n    /// serde parse error for debugging.\n    #[error(\"JSON deserialization error: {0}\")]\n    Deserialization(String),\n\n    /// An identity operation failed in the underlying `forge-identity` or `oas-sdk` layer.\n    ///\n    /// This wraps errors from HMR creation, agent derivation, and related\n    /// identity workflows.\n    #[error(\"identity operation failed: {0}\")]\n    Identity(String),\n\n    /// An authorization operation failed in the underlying `forge-auth` layer.\n    ///\n    /// This wraps errors from Arsenal ACT verification and capability checks.\n    #[error(\"auth operation failed: {0}\")]\n    Auth(String),\n\n    /// The input provided to a WASM export function is structurally invalid.\n    ///\n    /// Examples: empty namespace, invalid hex string, wrong key length.\n    #[error(\"invalid input: {0}\")]\n    InvalidInput(String),\n}",
          "documentation": "Errors that can occur during Forge WASM export operations.\n\nEvery variant provides actionable context for the calling language SDK.\nThese errors are designed to be serialized to JSON for consumption by\nTypeScript, Go, Python, Swift, and Kotlin callers.\n\n# ANVIL Spec References\n\n- ANVIL Spec \u00a714.2 \u2014 Error Handling"
        },
        {
          "name": "::ForgeWasmResult",
          "line": 81,
          "signature": "pub type ForgeWasmResult<T> = Result<T, ForgeWasmError>;",
          "documentation": "A specialized `Result` type for forge-wasm operations.\n\n# Examples\n\n```\nuse forge_wasm::error::ForgeWasmResult;\n\nfn example() -> ForgeWasmResult<String> {\n    Ok(\"success\".to_string())\n}\n```"
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-wasm/src/exports.rs",
      "sha256": "8f4f004956304ec31697841839e798df476b09eb9bc8ab564f192ebdaece6d71",
      "artifactSha256": "73a52c7ce6a26df483fabca1daf6df1a82091c464a27bbfdce1cdc9f1a68ba42",
      "url": "/reference/source/forge-rs/crates/forge-wasm/src/exports.rs.txt",
      "declarations": [
        {
          "name": "::create_hmr_identity",
          "line": 174,
          "signature": "pub fn create_hmr_identity(request_json: &str) -> ForgeWasmResult<String>;",
          "documentation": "Creates a new HMR (Human Root) identity via JSON input/output.\n\nThis is the primary WASM export for creating root identities. It generates\na fresh Ed25519 keypair, constructs a `did:oas:<namespace>:hmr:<identifier>`\nDID, builds and signs the OAS Identity Document, and returns everything as JSON.\n\nSee ANVIL Spec \u00a711.1 \u2014 OAS Identity Binding.\n\n# Arguments\n\n* `request_json` - A JSON string conforming to [`WasmCreateHmrRequest`]:\n  ```json\n  {\"namespace\": \"l1fe\", \"identifier\": \"alice\"}\n  ```\n\n# Returns\n\nA JSON string conforming to [`WasmCreateHmrResult`], containing the identity\ninfo (DID, kind, lineage depth, public key hex), the signing key hex, and\nthe signed OAS document JSON.\n\n# Errors\n\nReturns [`ForgeWasmError::Deserialization`] if the input JSON is malformed.\n\nReturns [`ForgeWasmError::InvalidInput`] if `namespace` or `identifier` is empty.\n\nReturns [`ForgeWasmError::Identity`] if the OAS SDK fails to create the identity.\n\nReturns [`ForgeWasmError::Serialization`] if the result cannot be serialized to JSON.\n\n# Examples\n\n```\nuse forge_wasm::exports::create_hmr_identity;\n\nlet request = r#\"{\"namespace\":\"test\",\"identifier\":\"alice\"}\"#;\nlet result = create_hmr_identity(request);\nassert!(result.is_ok());\n\nlet json = result.unwrap();\nassert!(json.contains(\"did:oas:test:hmr:alice\"));\nassert!(json.contains(\"signing_key_hex\"));\n```"
        },
        {
          "name": "::derive_agent_identity",
          "line": 282,
          "signature": "pub fn derive_agent_identity(request_json: &str) -> ForgeWasmResult<String>;",
          "documentation": "Derives a child agent identity from a parent via JSON input/output.\n\nThis is the primary WASM export for agent derivation. It reconstructs the\nparent keypair from hex bytes, parses the parent document from JSON, performs\nHKDF-SHA256 key derivation, generates a lineage proof, and returns the child\nidentity as JSON.\n\nSee ANVIL Spec \u00a711.2 \u2014 Lineage Propagation.\n\n# Arguments\n\n* `request_json` - A JSON string conforming to [`WasmDeriveAgentRequest`]:\n  ```json\n  {\n    \"parent_signing_key_hex\": \"9d61b19d...\",\n    \"parent_document_json\": \"{\\\"id\\\":\\\"did:oas:test:hmr:alice\\\",...}\",\n    \"child_name\": \"analyzer\",\n    \"child_namespace\": \"test\"\n  }\n  ```\n\n# Returns\n\nA JSON string conforming to [`WasmDeriveAgentResult`], containing the child\nidentity info, derived signing key hex, and signed child document JSON.\n\n# Errors\n\nReturns [`ForgeWasmError::Deserialization`] if the input JSON is malformed.\n\nReturns [`ForgeWasmError::InvalidInput`] if any required field is empty or\nthe parent signing key hex is not a valid 32-byte hex string.\n\nReturns [`ForgeWasmError::Identity`] if key derivation, document building,\nor signing fails.\n\nReturns [`ForgeWasmError::Serialization`] if the result cannot be serialized.\n\n# Examples\n\n```\nuse forge_wasm::exports::{create_hmr_identity, derive_agent_identity};\n\n// First create a parent\nlet hmr_json = create_hmr_identity(r#\"{\"namespace\":\"test\",\"identifier\":\"alice\"}\"#).unwrap();\nlet hmr: serde_json::Value = serde_json::from_str(&hmr_json).unwrap();\n\n// Then derive a child\nlet derive_req = format!(\n    r#\"{{\"parent_signing_key_hex\":\"{}\",\"parent_document_json\":\"{}\",\"child_name\":\"bot\",\"child_namespace\":\"test\"}}\"#,\n    hmr[\"signing_key_hex\"].as_str().unwrap(),\n    hmr[\"document_json\"].as_str().unwrap().replace('\"', \"\\\\\\\"\"),\n);\n// Note: in practice, build JSON with serde_json to avoid escaping issues\n```"
        },
        {
          "name": "::sign_message",
          "line": 422,
          "signature": "pub fn sign_message(request_json: &str) -> ForgeWasmResult<String>;",
          "documentation": "Signs a message with an Ed25519 key via JSON input/output.\n\nReconstructs the signing key from hex, decodes the message from hex,\nproduces a 64-byte Ed25519 signature, and returns it as hex in JSON.\n\n# Arguments\n\n* `request_json` - A JSON string conforming to [`WasmSignRequest`]:\n  ```json\n  {\"signing_key_hex\": \"9d61b19d...\", \"message_hex\": \"48656c6c6f\"}\n  ```\n\n# Returns\n\nA JSON string conforming to [`WasmSignResult`]:\n  ```json\n  {\"signature_hex\": \"e5564300...\"}\n  ```\n\n# Errors\n\nReturns [`ForgeWasmError::Deserialization`] if the input JSON is malformed.\n\nReturns [`ForgeWasmError::InvalidInput`] if the signing key hex is invalid\nor the message hex contains non-hex characters.\n\nReturns [`ForgeWasmError::Serialization`] if the result cannot be serialized.\n\n# Examples\n\n```\nuse forge_wasm::exports::sign_message;\n\n// Use a known test key (32 bytes, hex-encoded)\nuse forge_wasm::exports::create_hmr_identity;\n\nlet hmr = create_hmr_identity(r#\"{\"namespace\":\"test\",\"identifier\":\"signer\"}\"#).unwrap();\nlet hmr_val: serde_json::Value = serde_json::from_str(&hmr).unwrap();\nlet key_hex = hmr_val[\"signing_key_hex\"].as_str().unwrap();\n\nlet req = format!(r#\"{{\"signing_key_hex\":\"{}\",\"message_hex\":\"48656c6c6f\"}}\"#, key_hex);\nlet result = sign_message(&req);\nassert!(result.is_ok());\n\nlet result_val: serde_json::Value = serde_json::from_str(&result.unwrap()).unwrap();\n// Ed25519 signatures are 64 bytes = 128 hex chars\nassert_eq!(result_val[\"signature_hex\"].as_str().unwrap().len(), 128);\n```"
        },
        {
          "name": "::verify_signature",
          "line": 511,
          "signature": "pub fn verify_signature(request_json: &str) -> ForgeWasmResult<String>;",
          "documentation": "Verifies an Ed25519 signature via JSON input/output.\n\nDecodes the public key, message, and signature from hex, and verifies\nthe signature using constant-time comparison (provided by `ed25519-dalek`).\n\n# Arguments\n\n* `request_json` - A JSON string conforming to [`WasmVerifyRequest`]:\n  ```json\n  {\n    \"public_key_hex\": \"d75a980...\",\n    \"message_hex\": \"48656c6c6f\",\n    \"signature_hex\": \"e5564300...\"\n  }\n  ```\n\n# Returns\n\nA JSON string conforming to [`WasmVerifyResult`]:\n  ```json\n  {\"valid\": true}\n  ```\n\n# Errors\n\nReturns [`ForgeWasmError::Deserialization`] if the input JSON is malformed.\n\nReturns [`ForgeWasmError::InvalidInput`] if any hex string is invalid.\n\nReturns [`ForgeWasmError::Serialization`] if the result cannot be serialized.\n\n# Examples\n\n```\nuse forge_wasm::exports::{create_hmr_identity, sign_message, verify_signature};\n\n// Create identity and sign a message\nlet hmr = create_hmr_identity(r#\"{\"namespace\":\"test\",\"identifier\":\"verifier\"}\"#).unwrap();\nlet hmr_val: serde_json::Value = serde_json::from_str(&hmr).unwrap();\nlet key_hex = hmr_val[\"signing_key_hex\"].as_str().unwrap();\nlet pub_hex = hmr_val[\"identity\"][\"public_key_hex\"].as_str().unwrap();\n\nlet sign_req = format!(r#\"{{\"signing_key_hex\":\"{}\",\"message_hex\":\"cafe\"}}\"#, key_hex);\nlet sign_res = sign_message(&sign_req).unwrap();\nlet sign_val: serde_json::Value = serde_json::from_str(&sign_res).unwrap();\nlet sig_hex = sign_val[\"signature_hex\"].as_str().unwrap();\n\n// Verify the signature\nlet verify_req = format!(\n    r#\"{{\"public_key_hex\":\"{}\",\"message_hex\":\"cafe\",\"signature_hex\":\"{}\"}}\"#,\n    pub_hex, sig_hex,\n);\nlet verify_res = verify_signature(&verify_req).unwrap();\nlet verify_val: serde_json::Value = serde_json::from_str(&verify_res).unwrap();\nassert_eq!(verify_val[\"valid\"], true);\n```"
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-wasm/src/lib.rs",
      "sha256": "1bb8dd034cbb51a6ae762c1b373390f0a5e44c656be415e4eb84a7edd8633565",
      "artifactSha256": "5333c9f08c20bd706b5b63f6922e556d0dcaef2fcbac70ab6cc5721ec400d93e",
      "url": "/reference/source/forge-rs/crates/forge-wasm/src/lib.rs.txt",
      "declarations": [
        {
          "name": "error",
          "line": 112,
          "signature": "pub mod error;",
          "documentation": "# forge-wasm\n\nWASM/WASI component exports for the Forge SDK, enabling cross-language\nconsumption of Rust cryptographic operations.\n\nThis crate provides serializable types and synchronous functions suitable\nfor WASM export. It is used by non-Rust language SDKs (TypeScript, Go,\nPython, Swift, Kotlin) to call into the Rust crypto implementation,\nguaranteeing identical key derivation, signing, and verification behavior\nacross all six Forge language SDKs.\n\n# Architecture\n\n```text\n\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n\u2502                    forge-wasm                          \u2502\n\u2502                                                       \u2502\n\u2502  \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510    \u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510   \u2502\n\u2502  \u2502 exports   \u2502    \u2502  types   \u2502    \u2502     error      \u2502   \u2502\n\u2502  \u2502           \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 create_   \u2502    \u2502 Wasm*    \u2502    \u2502 ForgeWasmError  \u2502   \u2502\n\u2502  \u2502 hmr_      \u2502    \u2502 Request  \u2502    \u2502 ForgeWasmResult \u2502   \u2502\n\u2502  \u2502 identity  \u2502    \u2502 / Result \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502           \u2502    \u2502 types    \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 derive_   \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 agent_    \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 identity  \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502           \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 sign_     \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 message   \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502           \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 verify_   \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2502 signature \u2502    \u2502          \u2502    \u2502                 \u2502   \u2502\n\u2502  \u2514\u2500\u2500\u2500\u2500\u2500\u252c\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518    \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518   \u2502\n\u2502        \u2502                                               \u2502\n\u2502   \u250c\u2500\u2500\u2500\u2500\u25bc\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510                  \u2502\n\u2502   \u2502  oas-sdk / oas-crypto           \u2502                  \u2502\n\u2502   \u2502  (Ed25519, HKDF, document ops)  \u2502                  \u2502\n\u2502   \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518                  \u2502\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n# Design Principles\n\n- **All functions are synchronous.** WASM builds do not use async runtimes.\n- **All I/O is via JSON strings.** WASM boundary crossing uses JSON-encoded\n  request and response types.\n- **Private keys are hex-encoded.** Callers (non-Rust SDKs) handle secure storage.\n- **No lifetimes, no `Arc`, no `dyn Trait`.** Only plain owned types cross the boundary.\n- **Single source of truth for crypto.** All language SDKs use this WASM module\n  for Ed25519 operations, guaranteeing cross-language parity per ANVIL \u00a78.3.\n\n# Modules\n\n- **[`exports`]** \u2014 The public WASM export functions: identity creation,\n  derivation, signing, and verification.\n- **[`types`]** \u2014 Serializable wrapper types for the WASM boundary\n  (`WasmIdentityInfo`, `WasmCreateHmrRequest`, etc.).\n- **[`error`]** \u2014 WASM-specific error types (`ForgeWasmError`, `ForgeWasmResult`).\n\n# Quick Start\n\n```\nuse forge_wasm::exports::{create_hmr_identity, sign_message, verify_signature};\n\n// 1. Create a Human Root identity\nlet hmr_json = create_hmr_identity(\n    r#\"{\"namespace\":\"test\",\"identifier\":\"alice\"}\"#,\n).unwrap();\n\n// 2. Parse the result\nlet hmr: serde_json::Value = serde_json::from_str(&hmr_json).unwrap();\nlet signing_key = hmr[\"signing_key_hex\"].as_str().unwrap();\nlet public_key = hmr[\"identity\"][\"public_key_hex\"].as_str().unwrap();\n\n// 3. Sign a message\nlet sign_req = format!(\n    r#\"{{\"signing_key_hex\":\"{}\",\"message_hex\":\"48656c6c6f\"}}\"#,\n    signing_key,\n);\nlet sig_json = sign_message(&sign_req).unwrap();\nlet sig: serde_json::Value = serde_json::from_str(&sig_json).unwrap();\n\n// 4. Verify the signature\nlet verify_req = format!(\n    r#\"{{\"public_key_hex\":\"{}\",\"message_hex\":\"48656c6c6f\",\"signature_hex\":\"{}\"}}\"#,\n    public_key,\n    sig[\"signature_hex\"].as_str().unwrap(),\n);\nlet result_json = verify_signature(&verify_req).unwrap();\nlet result: serde_json::Value = serde_json::from_str(&result_json).unwrap();\nassert_eq!(result[\"valid\"], true);\n```\n\n# Security\n\n- Signing keys are passed as hex strings. The calling SDK is responsible\n  for secure storage (encryption at rest, zeroization after use).\n- No private key material is ever logged by this crate.\n- Signature verification uses constant-time comparison (via `ed25519-dalek`).\n- No `unsafe` code \u2014 `#![forbid(unsafe_code)]` is enforced workspace-wide.\n\n# ANVIL Spec References\n\n- ANVIL Spec \u00a78.3 \u2014 Cross-Language Parity\n- ANVIL Spec \u00a711.1 \u2014 OAS Identity Binding\n- ANVIL Spec \u00a711.2 \u2014 Lineage Propagation"
        },
        {
          "name": "exports",
          "line": 113,
          "signature": "pub mod exports;",
          "documentation": ""
        },
        {
          "name": "types",
          "line": 114,
          "signature": "pub mod types;",
          "documentation": ""
        }
      ]
    },
    {
      "path": "forge-rs/crates/forge-wasm/src/types.rs",
      "sha256": "7d3a37ce75fe27a0c6056b6840b58f302d1b4749cdec8108618f7105fed28ead",
      "artifactSha256": "a0f912e2d2290fb1a2595ce5740d3cb1e08629a4b1c2bdf15f6314a6c84fca7c",
      "url": "/reference/source/forge-rs/crates/forge-wasm/src/types.rs.txt",
      "declarations": [
        {
          "name": "::WasmIdentityInfo",
          "line": 48,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq, Zeroize)]\npub struct WasmIdentityInfo {\n/// The `did:oas` identifier string (e.g., `\"did:oas:test:hmr:alice\"`).\n\npub did: String,\n/// The entity kind (e.g., `\"hmr\"`, `\"mhr\"`, `\"agent\"`, `\"tool\"`).\n\npub kind: String,\n/// The number of derivation steps from the human root (0 for root entities).\n\npub lineage_depth: u32,\n/// Hex-encoded 32-byte Ed25519 public (verifying) key.\n\npub public_key_hex: String\n}",
          "documentation": "Serializable identity information for WASM boundary crossing.\n\nContains the public identity metadata for an OAS entity: the DID string,\nentity kind, lineage depth, and hex-encoded public key. This is the\n\"safe to share\" portion of an agent's identity.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmIdentityInfo;\n\nlet info = WasmIdentityInfo {\n    did: \"did:oas:test:hmr:alice\".to_string(),\n    kind: \"hmr\".to_string(),\n    lineage_depth: 0,\n    public_key_hex: \"ab\".repeat(32),\n};\nlet json = serde_json::to_string(&info).unwrap();\nassert!(json.contains(\"did:oas:test:hmr:alice\"));\n```"
        },
        {
          "name": "::WasmCreateHmrRequest",
          "line": 74,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\npub struct WasmCreateHmrRequest {\n/// The OAS namespace (e.g., `\"l1fe\"`, `\"test\"`).\n\npub namespace: String,\n/// The unique identifier within the namespace (e.g., `\"alice\"`).\n\npub identifier: String\n}",
          "documentation": "Request to create a new HMR (Human Root) identity.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmCreateHmrRequest;\n\nlet req = WasmCreateHmrRequest {\n    namespace: \"l1fe\".to_string(),\n    identifier: \"alice\".to_string(),\n};\nlet json = serde_json::to_string(&req).unwrap();\nassert!(json.contains(\"l1fe\"));\n```"
        },
        {
          "name": "::WasmCreateHmrResult",
          "line": 109,
          "signature": "#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Zeroize, ZeroizeOnDrop)]\npub struct WasmCreateHmrResult {\n/// Public identity info (DID, kind, depth, public key).\n\npub identity: WasmIdentityInfo,\n/// Hex-encoded 32-byte Ed25519 signing (private) key. SENSITIVE.\n\npub signing_key_hex: String,\n/// The signed OAS Identity Document serialized as JSON.\n\npub document_json: String\n}",
          "documentation": "Result of creating a new HMR identity.\n\nContains both the public identity info and the signing key. The signing\nkey is hex-encoded and MUST be handled securely by the calling SDK.\n\n# Security\n\nThe `signing_key_hex` field contains sensitive key material. Never log,\ntransmit in cleartext, or store unencrypted.\n\n# Examples\n\n```\nuse forge_wasm::types::{WasmCreateHmrResult, WasmIdentityInfo};\n\nlet result = WasmCreateHmrResult {\n    identity: WasmIdentityInfo {\n        did: \"did:oas:test:hmr:alice\".to_string(),\n        kind: \"hmr\".to_string(),\n        lineage_depth: 0,\n        public_key_hex: \"ab\".repeat(32),\n    },\n    signing_key_hex: \"cd\".repeat(32),\n    document_json: \"{}\".to_string(),\n};\nassert_eq!(result.identity.lineage_depth, 0);\n```"
        },
        {
          "name": "::WasmDeriveAgentRequest",
          "line": 151,
          "signature": "#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Zeroize, ZeroizeOnDrop)]\npub struct WasmDeriveAgentRequest {\n/// Hex-encoded 32-byte Ed25519 signing key of the parent. SENSITIVE.\n\npub parent_signing_key_hex: String,\n/// The parent's signed OAS Identity Document as a JSON string.\n\npub parent_document_json: String,\n/// The child agent's identifier (e.g., `\"analyzer\"`, `\"scraper\"`).\n\npub child_name: String,\n/// The child agent's OAS namespace (e.g., `\"l1fe\"`, `\"test\"`).\n\npub child_namespace: String\n}",
          "documentation": "Request to derive a child agent identity from a parent.\n\nRequires the parent's signing key (hex) and document (JSON) to perform\nHKDF-SHA256 key derivation and lineage proof generation.\n\n# Security\n\nThe `parent_signing_key_hex` field contains sensitive key material.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmDeriveAgentRequest;\n\nlet req = WasmDeriveAgentRequest {\n    parent_signing_key_hex: \"ab\".repeat(32),\n    parent_document_json: \"{}\".to_string(),\n    child_name: \"analyzer\".to_string(),\n    child_namespace: \"test\".to_string(),\n};\nassert_eq!(req.child_name, \"analyzer\");\n```"
        },
        {
          "name": "::WasmDeriveAgentResult",
          "line": 200,
          "signature": "#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Zeroize, ZeroizeOnDrop)]\npub struct WasmDeriveAgentResult {\n/// Public identity info for the derived child agent.\n\npub identity: WasmIdentityInfo,\n/// Hex-encoded 32-byte Ed25519 signing (private) key of the child. SENSITIVE.\n\npub signing_key_hex: String,\n/// The signed child OAS Identity Document (with lineage section) as JSON.\n\npub document_json: String\n}",
          "documentation": "Result of deriving a child agent identity.\n\nContains the child's public identity info and derived signing key.\n\n# Security\n\nThe `signing_key_hex` field contains sensitive key material. Handle\nwith the same care as the parent's signing key.\n\n# Examples\n\n```\nuse forge_wasm::types::{WasmDeriveAgentResult, WasmIdentityInfo};\n\nlet result = WasmDeriveAgentResult {\n    identity: WasmIdentityInfo {\n        did: \"did:oas:test:agent:analyzer\".to_string(),\n        kind: \"agent\".to_string(),\n        lineage_depth: 1,\n        public_key_hex: \"ab\".repeat(32),\n    },\n    signing_key_hex: \"cd\".repeat(32),\n    document_json: \"{}\".to_string(),\n};\nassert_eq!(result.identity.lineage_depth, 1);\n```"
        },
        {
          "name": "::WasmSignRequest",
          "line": 237,
          "signature": "#[derive(Clone, Serialize, Deserialize, PartialEq, Eq, Zeroize, ZeroizeOnDrop)]\npub struct WasmSignRequest {\n/// Hex-encoded 32-byte Ed25519 signing key. SENSITIVE.\n\npub signing_key_hex: String,\n/// Hex-encoded message bytes to sign.\n\npub message_hex: String\n}",
          "documentation": "Request to sign a message with an Ed25519 key.\n\n# Security\n\nThe `signing_key_hex` field contains sensitive key material.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmSignRequest;\n\nlet req = WasmSignRequest {\n    signing_key_hex: \"ab\".repeat(32),\n    message_hex: \"deadbeef\".to_string(),\n};\nassert_eq!(req.message_hex, \"deadbeef\");\n```"
        },
        {
          "name": "::WasmSignResult",
          "line": 266,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\npub struct WasmSignResult {\n/// Hex-encoded 64-byte Ed25519 signature.\n\npub signature_hex: String\n}",
          "documentation": "Result of signing a message.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmSignResult;\n\nlet result = WasmSignResult {\n    signature_hex: \"ab\".repeat(64),\n};\nassert_eq!(result.signature_hex.len(), 128);\n```"
        },
        {
          "name": "::WasmVerifyRequest",
          "line": 286,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\npub struct WasmVerifyRequest {\n/// Hex-encoded 32-byte Ed25519 public (verifying) key.\n\npub public_key_hex: String,\n/// Hex-encoded message bytes that were signed.\n\npub message_hex: String,\n/// Hex-encoded 64-byte Ed25519 signature to verify.\n\npub signature_hex: String\n}",
          "documentation": "Request to verify an Ed25519 signature.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmVerifyRequest;\n\nlet req = WasmVerifyRequest {\n    public_key_hex: \"ab\".repeat(32),\n    message_hex: \"deadbeef\".to_string(),\n    signature_hex: \"cd\".repeat(64),\n};\nassert_eq!(req.message_hex, \"deadbeef\");\n```"
        },
        {
          "name": "::WasmVerifyResult",
          "line": 306,
          "signature": "#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]\npub struct WasmVerifyResult {\n/// Whether the signature is valid for the given message and public key.\n\npub valid: bool\n}",
          "documentation": "Result of verifying an Ed25519 signature.\n\n# Examples\n\n```\nuse forge_wasm::types::WasmVerifyResult;\n\nlet result = WasmVerifyResult { valid: true };\nassert!(result.valid);\n```"
        }
      ]
    }
  ]
}
