UNPKG

@coinbase/agentkit

Version:

Coinbase AgentKit core primitives

125 lines (124 loc) 4.86 kB
import { z } from "zod"; /** * Resolves a facilitator name or URL to the actual URL. * * @param facilitator - Either a known facilitator name ('cdp', 'payai') or a custom URL * @returns The facilitator URL */ export declare function resolveFacilitatorUrl(facilitator: string): string; export declare const ListX402ServicesSchema: z.ZodObject<{ facilitator: z.ZodDefault<z.ZodUnion<[z.ZodEnum<["cdp", "payai"]>, z.ZodString]>>; maxUsdcPrice: z.ZodOptional<z.ZodNumber>; x402Versions: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodLiteral<1>, z.ZodLiteral<2>]>, "many">>; keyword: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { facilitator: string; x402Versions: (1 | 2)[]; maxUsdcPrice?: number | undefined; keyword?: string | undefined; }, { facilitator?: string | undefined; maxUsdcPrice?: number | undefined; x402Versions?: (1 | 2)[] | undefined; keyword?: string | undefined; }>; export declare const HttpRequestSchema: z.ZodObject<{ url: z.ZodString; method: z.ZodDefault<z.ZodNullable<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>>; headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>; queryParams: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>; body: z.ZodNullable<z.ZodOptional<z.ZodAny>>; }, "strip", z.ZodTypeAny, { method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null; url: string; body?: any; headers?: Record<string, string> | null | undefined; queryParams?: Record<string, string> | null | undefined; }, { url: string; method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null | undefined; body?: any; headers?: Record<string, string> | null | undefined; queryParams?: Record<string, string> | null | undefined; }>; export declare const RetryWithX402Schema: z.ZodObject<{ url: z.ZodString; method: z.ZodDefault<z.ZodNullable<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>>; headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; queryParams: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>; body: z.ZodOptional<z.ZodAny>; selectedPaymentOption: z.ZodObject<{ scheme: z.ZodString; network: z.ZodString; asset: z.ZodString; maxAmountRequired: z.ZodOptional<z.ZodString>; amount: z.ZodOptional<z.ZodString>; price: z.ZodOptional<z.ZodString>; payTo: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { scheme: string; network: string; asset: string; amount?: string | undefined; price?: string | undefined; maxAmountRequired?: string | undefined; payTo?: string | undefined; }, { scheme: string; network: string; asset: string; amount?: string | undefined; price?: string | undefined; maxAmountRequired?: string | undefined; payTo?: string | undefined; }>; }, "strip", z.ZodTypeAny, { method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null; url: string; selectedPaymentOption: { scheme: string; network: string; asset: string; amount?: string | undefined; price?: string | undefined; maxAmountRequired?: string | undefined; payTo?: string | undefined; }; body?: any; headers?: Record<string, string> | undefined; queryParams?: Record<string, string> | null | undefined; }, { url: string; selectedPaymentOption: { scheme: string; network: string; asset: string; amount?: string | undefined; price?: string | undefined; maxAmountRequired?: string | undefined; payTo?: string | undefined; }; method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null | undefined; body?: any; headers?: Record<string, string> | undefined; queryParams?: Record<string, string> | null | undefined; }>; export declare const DirectX402RequestSchema: z.ZodObject<{ url: z.ZodString; method: z.ZodDefault<z.ZodNullable<z.ZodEnum<["GET", "POST", "PUT", "DELETE", "PATCH"]>>>; headers: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>; queryParams: z.ZodNullable<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>; body: z.ZodNullable<z.ZodOptional<z.ZodAny>>; }, "strip", z.ZodTypeAny, { method: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null; url: string; body?: any; headers?: Record<string, string> | null | undefined; queryParams?: Record<string, string> | null | undefined; }, { url: string; method?: "POST" | "GET" | "PUT" | "DELETE" | "PATCH" | null | undefined; body?: any; headers?: Record<string, string> | null | undefined; queryParams?: Record<string, string> | null | undefined; }>;