import { z } from "zod"; import type { ActionContract, ProposeActionContractInput } from "../../protocol/areas/action-contract"; import type { CompileIntentInput, IntentCompilationRecord } from "../../protocol/areas/intent-compilation"; import type { X402PaymentRequiredEvidence } from "./upstream-evidence"; export declare const X402PaymentAttemptSchema: z.ZodObject<{ principalIntentRef: z.ZodString; generatedCodeOrSpecRef: z.ZodString; runtimeExecutionId: z.ZodDefault>; generatedExecutionGraphId: z.ZodDefault>; generatedExecutionNodeId: z.ZodDefault>; toolCallDraftId: z.ZodDefault>; endpointUrl: z.ZodString; payee: z.ZodString; network: z.ZodString; token: z.ZodString; atomicAmount: z.ZodString; x402EvidenceProfile: z.ZodDefault>; paymentRequirementsDigest: z.ZodString; paymentRequiredEvidenceRef: z.ZodOptional; facilitatorRef: z.ZodDefault>; intendedHttpMethod: z.ZodDefault>; intendedRequestUrl: z.ZodDefault>; intendedRequestBodyPosture: z.ZodDefault>; intendedRequestBodyDigest: z.ZodDefault>; selectedHeadersDigest: z.ZodDefault>; providerEnvironmentPosture: z.ZodDefault>; providerEnvironmentRef: z.ZodDefault>; x402Version: z.ZodDefault>; x402Scheme: z.ZodDefault>; asset: z.ZodDefault>; payTo: z.ZodDefault>; maxTimeoutSeconds: z.ZodDefault>; selectedPaymentRequirementIndex: z.ZodDefault>; selectedPaymentRequirementDigest: z.ZodDefault>; paymentIdentifier: z.ZodDefault>; paymentIdentifierRef: z.ZodDefault>; paymentIdentifierPosture: z.ZodDefault>; sdkPackageVersions: z.ZodDefault>; extensionKeys: z.ZodDefault>; sequenceNumber: z.ZodDefault; requiredPriorActionContractIds: z.ZodDefault>; clearingEvidenceRefs: z.ZodDefault; obligationRef: z.ZodOptional; counterpartyRef: z.ZodOptional; }, z.core.$strict>>>; }, z.core.$strict>; export type X402PaymentAttempt = z.input; export type BuildX402PaymentAttemptFromRequiredEvidenceInput = { evidence: X402PaymentRequiredEvidence; principalIntentRef: string; generatedCodeOrSpecRef: string; runtimeExecutionId?: string | null; generatedExecutionGraphId?: string | null; generatedExecutionNodeId?: string | null; toolCallDraftId?: string | null; facilitatorRef?: string | null; paymentIdentifier?: string | null; paymentIdentifierRef?: string | null; sequenceNumber?: number; requiredPriorActionContractIds?: string[]; }; export declare const X402PaymentRuntimeConfigSchema: z.ZodObject<{ tenantId: z.ZodString; organizationId: z.ZodString; principalId: z.ZodString; agentId: z.ZodString; runId: z.ZodString; runtimeAdapterId: z.ZodString; operatingEnvelopeId: z.ZodString; toolCatalogRef: z.ZodString; actionCatalogRef: z.ZodString; gatewayRegistryRef: z.ZodString; gatewayReadinessRef: z.ZodString; gatewayReadinessDigest: z.ZodString; policyVersionRef: z.ZodString; policyVersionDigest: z.ZodString; toolCapabilityId: z.ZodString; actionTypeId: z.ZodString; gatewayRegistryEntryId: z.ZodString; gatewayId: z.ZodString; gatewayCredentialBinding: z.ZodObject<{ credentialUseName: z.ZodString; gatewayCredentialRefId: z.ZodString; gatewayCredentialRefDigest: z.ZodString; providerRegistryRef: z.ZodString; providerRegistryDigest: z.ZodDefault>; requiredCredentialCustodyStatus: z.ZodEnum<{ unknown: "unknown"; gateway_held: "gateway_held"; fixture_gateway_held: "fixture_gateway_held"; gateway_resolved_from_vault: "gateway_resolved_from_vault"; provider_gateway_held: "provider_gateway_held"; unsafe_agent_visible: "unsafe_agent_visible"; unsafe_runtime_visible: "unsafe_runtime_visible"; agent_has_raw_credential: "agent_has_raw_credential"; shared_or_unknown: "shared_or_unknown"; no_mutation_credential: "no_mutation_credential"; }>; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; delegatedAuthorityBinding: z.ZodObject<{ authorityUseName: z.ZodString; delegatedAuthorityRefId: z.ZodString; delegatedAuthorityRefDigest: z.ZodString; requiredGrantStatus: z.ZodDefault>; authorityKind: z.ZodEnum<{ mutation: "mutation"; spend: "spend"; api_call: "api_call"; }>; policyPackRef: z.ZodString; policyPackVersion: z.ZodString; evidenceExpectationRefs: z.ZodDefault>; }, z.core.$strict>; maxAtomicAmountPerCall: z.ZodString; contractExpiresAt: z.ZodString; signingSecret: z.ZodOptional; }, z.core.$strict>; export type X402PaymentRuntimeConfig = z.input; export type X402PaymentRuntimeProtocol = { compileIntent(input: CompileIntentInput): Promise; proposeActionContract(input: ProposeActionContractInput): Promise; }; export type X402PaymentRuntimeResult = { outcome: "action_contract_proposed"; intentCompilation: IntentCompilationRecord; actionContract: ActionContract; } | { outcome: "intent_compilation_refused"; intentCompilation: IntentCompilationRecord; actionContract: null; refusalReasonCodes: string[]; } | { outcome: "payment_attempt_refused"; intentCompilation: null; actionContract: null; refusalReasonCodes: string[]; }; export declare function proposeX402PaymentActionContract(protocol: X402PaymentRuntimeProtocol, config: X402PaymentRuntimeConfig, attemptValue: X402PaymentAttempt): Promise; export declare function buildX402PaymentAttemptFromRequiredEvidence(input: BuildX402PaymentAttemptFromRequiredEvidenceInput): Promise; export declare function compileX402PaymentIntent(protocol: Pick, config: X402PaymentRuntimeConfig, attemptValue: X402PaymentAttempt): Promise; export declare function buildX402PaymentCompileIntentInput(config: X402PaymentRuntimeConfig, attemptValue: X402PaymentAttempt): Promise; export declare function buildX402PaymentCompileIntentInputForRuntimeRefusal(config: X402PaymentRuntimeConfig, attemptValue: X402PaymentAttempt): Promise; export declare function refusalReasonCodesForCompilation(intentCompilation: IntentCompilationRecord): string[]; export declare function x402PaymentAttemptRefusalReasonCodes(configValue: X402PaymentRuntimeConfig, attemptValue: X402PaymentAttempt): string[];