import * as z from 'zod/mini'; /** Stable MPP relay failure codes. */ export declare const relayErrorCode: { /** Credential or transaction already used. */ readonly alreadyUsed: 'already_used'; /** Transaction broadcast or confirmation failed. */ readonly broadcastFailed: 'broadcast_failed'; /** Challenge or payment authorization expired. */ readonly expired: 'expired'; /** Payload, signature, parties, or payment requirements are invalid. */ readonly invalidPayment: 'invalid_payment'; /** Sender lacks funds. */ readonly insufficientFunds: 'insufficient_funds'; /** Payment violates relay or account policy. */ readonly policyDenied: 'policy_denied'; /** Originator or recipient failed screening. */ readonly screenRejected: 'screen_rejected'; /** Transaction simulation failed before broadcast. */ readonly simulationFailed: 'simulation_failed'; /** Retry may succeed. */ readonly temporarilyUnavailable: 'temporarily_unavailable'; /** Method, intent, network, or asset is unsupported. */ readonly unsupported: 'unsupported'; /** Unexpected relay failure. */ readonly unknown: 'unknown'; }; /** Stable MPP relay failure code. */ export type RelayErrorCode = (typeof relayErrorCode)[keyof typeof relayErrorCode]; /** MPP relay error response. */ export type RelayError = { /** Stable machine-readable reason the relay rejected the credential. */ code: RelayErrorCode; /** Human-readable explanation of the relay result. */ message?: string | undefined; }; /** MPP challenge accepted with a relay credential payload. */ export type Challenge = { /** Additional MPP challenge metadata, preserved verbatim for validation. */ [key: string]: unknown; /** Human-readable payment description. */ description?: string | undefined; /** When the payment challenge expires, as an ISO-8601 timestamp. */ expires?: string | undefined; /** Payment challenge identifier. */ id: string; /** MPP payment intent. */ intent: string; /** MPP payment method. */ method: string; /** Opaque data bound to the challenge by its issuer. */ opaque?: string | undefined; /** MPP realm that issued the challenge. */ realm: string; /** Payment request bound to the challenge. */ request: Record; }; /** MPP challenge and credential payload accepted by the relay. */ export type RelayInput = { /** Payment challenge supplied with the credential. */ challenge: Challenge; /** Method-specific MPP credential payload. */ payload: unknown; /** Optional payer identifier supplied with the credential. */ source?: string | undefined; }; /** Broadcast MPP payment receipt. */ export type Receipt = { /** Optional caller-provided payment reference. */ externalId?: string | undefined; /** Payment method that settled the credential. */ method: string; /** On-chain or payment-system settlement reference. */ reference: string; /** When the payment settled, as an ISO-8601 timestamp. */ timestamp: string; }; /** MPP credential validation response. */ export type VerifyResponse = { success: true; } | { error: RelayError; success: false; }; /** MPP credential broadcast response. */ export type BroadcastResponse = { receipt: Receipt; success: true; } | { error: RelayError; success: false; }; /** MPP relay schemas. */ export declare namespace schema { /** Stable MPP relay failure codes. */ const ErrorCode: z.ZodMiniUnion, z.ZodMiniLiteral<"policy_denied">, z.ZodMiniLiteral<"invalid_payment">, z.ZodMiniLiteral<"insufficient_funds">, z.ZodMiniLiteral<"expired">, z.ZodMiniLiteral<"already_used">, z.ZodMiniLiteral<"screen_rejected">, z.ZodMiniLiteral<"simulation_failed">, z.ZodMiniLiteral<"broadcast_failed">, z.ZodMiniLiteral<"temporarily_unavailable">, z.ZodMiniLiteral<"unknown">]>; /** Error returned by the MPP relay. */ const RelayError: z.ZodMiniObject<{ code: z.ZodMiniUnion, z.ZodMiniLiteral<"policy_denied">, z.ZodMiniLiteral<"invalid_payment">, z.ZodMiniLiteral<"insufficient_funds">, z.ZodMiniLiteral<"expired">, z.ZodMiniLiteral<"already_used">, z.ZodMiniLiteral<"screen_rejected">, z.ZodMiniLiteral<"simulation_failed">, z.ZodMiniLiteral<"broadcast_failed">, z.ZodMiniLiteral<"temporarily_unavailable">, z.ZodMiniLiteral<"unknown">]>; message: z.ZodMiniOptional>; }, z.core.$strip>; /** MPP challenge accepted with a relay credential payload. */ const Challenge: z.ZodMiniObject<{ description: z.ZodMiniOptional>; expires: z.ZodMiniOptional>; id: z.ZodMiniString; intent: z.ZodMiniString; method: z.ZodMiniString; opaque: z.ZodMiniOptional>; realm: z.ZodMiniString; request: z.ZodMiniRecord, z.ZodMiniUnknown>; }, z.core.$loose>; /** Request accepted by MPP relay verification and broadcast routes. */ const RelayInput: z.ZodMiniObject<{ challenge: z.ZodMiniObject<{ description: z.ZodMiniOptional>; expires: z.ZodMiniOptional>; id: z.ZodMiniString; intent: z.ZodMiniString; method: z.ZodMiniString; opaque: z.ZodMiniOptional>; realm: z.ZodMiniString; request: z.ZodMiniRecord, z.ZodMiniUnknown>; }, z.core.$loose>; payload: z.ZodMiniCustom; source: z.ZodMiniOptional>; }, z.core.$strip>; /** Receipt returned after the relay broadcasts a payment. */ const Receipt: z.ZodMiniObject<{ externalId: z.ZodMiniOptional>; method: z.ZodMiniString; reference: z.ZodMiniString; timestamp: z.ZodMiniString; }, z.core.$strip>; /** Read-only MPP credential validation result. */ const VerifyResponse: z.ZodMiniUnion; }, z.core.$strip>, z.ZodMiniObject<{ error: z.ZodMiniObject<{ code: z.ZodMiniUnion, z.ZodMiniLiteral<"policy_denied">, z.ZodMiniLiteral<"invalid_payment">, z.ZodMiniLiteral<"insufficient_funds">, z.ZodMiniLiteral<"expired">, z.ZodMiniLiteral<"already_used">, z.ZodMiniLiteral<"screen_rejected">, z.ZodMiniLiteral<"simulation_failed">, z.ZodMiniLiteral<"broadcast_failed">, z.ZodMiniLiteral<"temporarily_unavailable">, z.ZodMiniLiteral<"unknown">]>; message: z.ZodMiniOptional>; }, z.core.$strip>; success: z.ZodMiniLiteral; }, z.core.$strip>]>; /** MPP credential broadcast result. */ const BroadcastResponse: z.ZodMiniUnion>; method: z.ZodMiniString; reference: z.ZodMiniString; timestamp: z.ZodMiniString; }, z.core.$strip>; success: z.ZodMiniLiteral; }, z.core.$strip>, z.ZodMiniObject<{ error: z.ZodMiniObject<{ code: z.ZodMiniUnion, z.ZodMiniLiteral<"policy_denied">, z.ZodMiniLiteral<"invalid_payment">, z.ZodMiniLiteral<"insufficient_funds">, z.ZodMiniLiteral<"expired">, z.ZodMiniLiteral<"already_used">, z.ZodMiniLiteral<"screen_rejected">, z.ZodMiniLiteral<"simulation_failed">, z.ZodMiniLiteral<"broadcast_failed">, z.ZodMiniLiteral<"temporarily_unavailable">, z.ZodMiniLiteral<"unknown">]>; message: z.ZodMiniOptional>; }, z.core.$strip>; success: z.ZodMiniLiteral; }, z.core.$strip>]>; } //# sourceMappingURL=Mpp.d.ts.map