import type { AttestationInput } from "./vrp-receipt.js"; export declare const VRP_MCP_PROFILE_VERSION = "1.0"; export declare const VRP_MCP_TRANSPORT_LAYER = "transport"; export declare const VRP_MCP_ASSERTION_TYPE = "vrp.mcp.transport.1"; export interface McpTransportAssertionInput { /** MCP tool name, e.g. "get_verified_stay_offer". */ tool: string; /** The tool-call arguments object (hashed canonically, never stored raw). */ arguments: Record; /** ISO-8601 instant the node served the response. */ served_at: string; /** The node identity that served (and will sign) the interaction. */ issuer: string; /** Correlator to the offer attestation this transport wraps (e.g. offer id / JWS thumbprint). */ offer_ref?: string; /** Optional MCP session correlator. */ session_id?: string; } export interface McpTransportAssertion { vrp_mcp_profile_version: string; type: typeof VRP_MCP_ASSERTION_TYPE; tool: string; /** Hex SHA-256 of the JCS-style canonical arguments (see `canonicalJson`). */ arguments_sha256: string; served_at: string; issuer: string; offer_ref?: string; session_id?: string; } /** * JCS-style (RFC 8785) canonical JSON: object keys sorted recursively, array * order preserved. Used ONLY to derive `arguments_sha256` (content inside the * signed payload) — it is not used to re-derive the JWS signing input, which * per ADR 0010 D5 is always the JWS bytes as received. Numbers use JSON's * default formatting; tool-call arguments in practice are strings/ints/bools, * for which this is stable. A full RFC 8785 number serialization is the v2 * hardening if float-valued arguments ever appear. */ export declare function canonicalJson(value: unknown): string; /** Hex SHA-256 of the canonical arguments. */ export declare function hashArguments(args: Record): string; /** * Build the canonical transport assertion (the object the node will sign). * Deterministic: optional fields are omitted when absent so the signed bytes * are stable for identical interactions. */ export declare function buildMcpTransportAssertion(input: McpTransportAssertionInput): McpTransportAssertion; export interface McpTransportAttestationInput { /** Compact JWS the node produced over `buildMcpTransportAssertion(...)`. */ signature: string; /** JWKS source for the node's signing key (same key as VRP offers). */ source: string; valid_from: string; valid_until: string; ref?: string; } /** * Wrap a node-signed transport assertion as a VRP receipt `attestations[]` * entry (`layer: "transport"`). The result plugs straight into `verifyReceipt`. */ export declare function mcpTransportAttestation(input: McpTransportAttestationInput): AttestationInput; /** * Verifier-side check: confirm a (signature-verified) transport assertion * actually describes an observed tool call — i.e. the same tool and the same * arguments (by canonical hash). Signature validity is the receipt verifier's * job; this binds the verified assertion to what the agent claims happened. */ export declare function assertionMatchesToolCall(assertion: Pick, observed: { tool: string; arguments: Record; }): boolean;