export interface ActionReferenceInputV2 { profile: 'aps-action-ref-v2'; agent_id: string; action_type: string; target: string; payload_ref: string; scope_required: string[]; issued_at: string; nonce: string; } export declare function createActionReferenceInputV2(input: { agent_id: string; action_type: string; target: string; payload_ref: string; scope_required: readonly string[]; issued_at: string; nonce: string; }): ActionReferenceInputV2; export declare function computeActionRefV2(input: ActionReferenceInputV2, profileContext?: ActionReferenceProfileContextV2): string; export declare function computePayloadRefV1(payload: unknown): string; /** Profile context a caller supplies alongside a generic action reference. * * Draft line 799 reads: "All string fields MUST be non-empty except that a profile MAY * permit an empty scope_required array." The permission belongs to a profile, so the * generic computation cannot grant it to itself, and a caller who holds the applicable * profile says so here. Without it, an empty array is refused. */ export interface ActionReferenceProfileContextV2 { /** True only when the applicable profile explicitly permits an empty scope_required. */ emptyScopeRequiredPermitted?: boolean; } export declare function validateActionReferenceInputV2(candidate: unknown, profileContext?: ActionReferenceProfileContextV2): asserts candidate is ActionReferenceInputV2; /** Serialized-input entry path for an action reference document. * * WHY THIS EXISTS, and why validation could never have covered it. Rejecting a * duplicate object member is a property of PARSING, not of validation. By the * time raw JSON has become a JavaScript object the second `agent_id` has already * overwritten the first and the evidence is gone, so no check added to * computeActionRefV2 or validateActionReferenceInputV2, both of which receive an * already-parsed value, can ever satisfy the duplicate-member requirement. The * only place the fact still exists is the byte stream. * * So this entry point takes the raw document and parses it with the strict * parser that already lives in receipt-core, which rejects a duplicate member * name after JSON string decoding, meaning "a" and "\u0061" collide as the same * name. The result is then handed to the EXISTING validator unchanged: nothing * here weakens or bypasses validateActionReferenceInputV2, it runs in full. */ export declare function parseActionReferenceInputV2(raw: string, profileContext?: ActionReferenceProfileContextV2): ActionReferenceInputV2; /** Compute an action_ref straight from the serialized document. * * The composed form of parseActionReferenceInputV2 and computeActionRefV2, for * callers holding wire bytes rather than a constructed input. Identical digest * to the parsed path for any document that parses, because it IS the parsed * path once the bytes have been read. */ export declare function computeActionRefV2FromJson(raw: string, profileContext?: ActionReferenceProfileContextV2): string; //# sourceMappingURL=v2.d.ts.map