import type { JsonValue } from "../../foundation/schema-core"; import { type TypedActionCommitmentAuthorityBoundary, type TypedActionCommitmentDomain, type TypedActionCommitmentProfile, type TypedActionCommitmentPurpose, type TypedActionCommitmentReplayPosture, type TypedActionCommitmentSafetyPosture, type TypedActionCommitmentSignerOrVerifier, type TypedActionCommitmentSummary, type TypedActionCommitmentTypedPayload, type TypedActionCommitmentVerificationStatus } from "./types"; export declare const typedActionCommitmentProfiles: ("handshake_jcs_typed" | "eip712")[]; export type TypedActionCommitmentProfileMaterial = { profile: TypedActionCommitmentProfile; material: JsonValue; }; export type TypedActionCommitmentProfileNormalization = { profile: TypedActionCommitmentProfile; normalizedMaterial: JsonValue; authorityBoundary: TypedActionCommitmentAuthorityBoundary; }; export declare function baseTypedActionCommitmentProfileNormalization(material: TypedActionCommitmentProfileMaterial): TypedActionCommitmentProfileNormalization; export type HandshakeJcsTypedCommitmentInput = { profile: "handshake_jcs_typed"; typedActionCommitmentId?: string; purpose?: TypedActionCommitmentPurpose; method: string; route: string; endpointId: string; tenantId: string; organizationId: string; deliveryNonce: string; keyId: string; timestamp: string; rawBodyDigest: `sha256:${string}`; direction: "cloud_to_customer_edge" | "customer_edge_to_cloud"; configRevision: string; configEtag?: string; rotationStatus: "active" | "previous" | "revoked" | "unknown"; signatureScheme?: "hmac-sha256" | "ed25519"; hmacShape?: "agentic_endpoint_access_route_context" | "legacy_timestamp_body"; sharedPackageVersionDigest: `sha256:${string}`; sharedPackageVersion?: string; subjectDigest: `sha256:${string}`; subjectRef?: string; gatewayId?: string; actionClass?: string; providerEnvironmentRef?: string; signatureRef?: string; signatureDigest?: `sha256:${string}`; verificationStatus?: TypedActionCommitmentVerificationStatus; lifecycleRefs?: Record; }; export type NormalizedHandshakeJcsTypedCommitment = { profile: "handshake_jcs_typed"; typedActionCommitmentId: string; purpose: TypedActionCommitmentPurpose; commitmentDigest: `sha256:${string}`; domain: TypedActionCommitmentDomain; typedPayload: TypedActionCommitmentTypedPayload; replayPosture: TypedActionCommitmentReplayPosture; signerOrVerifier: TypedActionCommitmentSignerOrVerifier; safetyPosture: TypedActionCommitmentSafetyPosture; refusalRefs: string[]; proofGapRefs: string[]; evidenceRefs: string[]; summary: TypedActionCommitmentSummary; normalizedMaterial: JsonValue; authorityBoundary: TypedActionCommitmentAuthorityBoundary; }; export declare function normalizeHandshakeJcsTypedCommitment(input: HandshakeJcsTypedCommitmentInput): Promise; export type HandshakeJcsTypedFailureState = "timestamp_expired" | "nonce_replayed" | "wrong_route" | "wrong_endpoint" | "wrong_tenant" | "wrong_organization" | "wrong_nonce" | "revoked_key" | "signature_mismatch" | "legacy_timestamp_body_downgrade" | "missing_rotation_state" | "cloud_readback_unavailable" | "shared_package_digest_unreconstructable" | "payload_digest_mismatch" | "domain_mismatch" | "missing_key_registry" | "verifier_unavailable" | "profile_unsupported" | "ed25519_requested"; export declare function classifyHandshakeJcsTypedCommitmentFailure(state: HandshakeJcsTypedFailureState): { result: "refusal" | "proof_gap"; reasonCode: string; }; export type ReadbackContextTypedCommitmentInput = { typedActionCommitmentId?: string; admissionDigest: `sha256:${string}`; contextHandleDigest: `sha256:${string}`; endpointAccessSurfaceBindingDigest: `sha256:${string}`; subjectRef?: string; allowedActionClasses: string[]; readinessPosture: string; readbackRefs: string[]; freshActionContractRequiredForDownstreamAction: true; }; export type ReadbackContextTypedCommitment = { profile: "handshake_jcs_typed"; purpose: "service_workflow_readback"; typedActionCommitmentId: string; commitmentDigest: `sha256:${string}`; summary: TypedActionCommitmentSummary; normalizedMaterial: JsonValue; authorityBoundary: TypedActionCommitmentAuthorityBoundary; freshActionContractRequiredForDownstreamAction: true; }; export type Eip712TypedCommitmentInput = { profile: "eip712"; typedActionCommitmentId?: string; purpose?: TypedActionCommitmentPurpose; actionContractId: string; actionContractDigest: `sha256:${string}`; expectedActionContractDigest?: `sha256:${string}`; paramsDigest: `sha256:${string}`; expectedParamsDigest?: `sha256:${string}`; idempotencyKey: string; expectedIdempotencyKey?: string; gatewayId?: string; greenlightId?: string; gateAttemptId?: string; mutationAttemptId?: string; credentialResolutionEvidenceId?: string; credentialResolutionEvidenceDigest?: `sha256:${string}`; domain: { name?: string; version?: string; chainId: string; expectedChainId?: string; verifyingContract: string; expectedVerifyingContract?: string; salt?: string | null; }; primaryType: string; typeGraphDigest?: `sha256:${string}`; messageDigest?: `sha256:${string}`; domainSeparator?: string; structHash?: string; eip712Digest?: string; signingMethod: "eth_signTypedData_v4" | "eth_signTypedData" | "personal_sign" | "blind_sign" | "unknown"; signerKind: "eoa" | "erc1271" | "erc6492_counterfactual" | "erc4337_account" | "eip7702_delegated_eoa" | "unknown"; signerRef?: string; verifierContextRef?: string; verifierContextDigest?: `sha256:${string}`; expectedVerifierContextDigest?: `sha256:${string}`; signatureRef?: string | null; signatureDigest?: `sha256:${string}` | null; replayStatus?: "fresh" | "stale" | "replayed" | "missing"; nonceRef?: string | null; nonceDigest?: `sha256:${string}` | null; validAfter?: string | null; validBefore?: string | null; consumedStateRef?: string | null; paymentRequirementsDigest: `sha256:${string}`; selectedPaymentRequirementIndex: number; expectedSelectedPaymentRequirementIndex?: number; selectedPaymentRequirementDigest: `sha256:${string}`; expectedSelectedPaymentRequirementDigest?: `sha256:${string}`; paymentIdentifierDigest?: `sha256:${string}` | null; payTo: string; network: string; token: string; asset?: string | null; atomicAmount: string; intendedHttpMethod?: string | null; intendedRequestUrl?: string | null; intendedRequestBodyPosture?: "no_body" | "digest_bound" | "omitted" | "unsupported"; intendedRequestBodyDigest?: `sha256:${string}` | null; selectedHeadersDigest?: `sha256:${string}` | null; providerEnvironmentPosture: "local_reference_sandbox" | "external_sandbox" | "live" | "unknown"; providerEnvironmentRef?: string | null; blockRef?: string | null; stateRef?: string | null; smartAccountVerifierContextDigest?: `sha256:${string}` | null; downstreamStatus?: "succeeded" | "unknown" | "failed" | "not_observed"; }; export type NormalizedEip712TypedCommitment = { profile: "eip712"; typedActionCommitmentId: string; purpose: TypedActionCommitmentPurpose; commitmentDigest: `sha256:${string}`; subject: { kind: "x402_payment"; ref: string; digest: `sha256:${string}`; }; domain: TypedActionCommitmentDomain; typedPayload: TypedActionCommitmentTypedPayload; replayPosture: TypedActionCommitmentReplayPosture; signerOrVerifier: TypedActionCommitmentSignerOrVerifier; safetyPosture: TypedActionCommitmentSafetyPosture; refusalRefs: string[]; proofGapRefs: string[]; evidenceRefs: string[]; summary: TypedActionCommitmentSummary; normalizedMaterial: JsonValue; authorityBoundary: TypedActionCommitmentAuthorityBoundary; }; export declare function normalizeEip712TypedCommitment(input: Eip712TypedCommitmentInput): Promise; export declare function buildReadbackContextTypedCommitment(input: ReadbackContextTypedCommitmentInput): Promise; export declare const x402Eip712HostileMatrixCases: readonly ["domain_mismatch", "chain_mismatch", "verifying_contract_mismatch", "selected_payment_requirement_mismatch", "params_digest_mismatch", "idempotency_key_mismatch", "nonce_or_validity_stale", "smart_account_verifier_context_drift", "provider_fallback_downgrade", "raw_signer_bypass", "signed_retry_ambiguity", "settlement_ambiguity", "downstream_unknown_status"]; export type X402Eip712HostileMatrixCase = (typeof x402Eip712HostileMatrixCases)[number]; export declare function classifyEip712TypedCommitmentFailure(state: X402Eip712HostileMatrixCase): { result: "refusal" | "proof_gap"; reasonCode: string; };