/** * @module plugin/magicblock/pricing * @description Per-tool pricing map for the MagicBlock plugin. * * Two tiers: * - READ = $0.01/call — read-only queries (ER Router, balances, health, quotes) * - WRITE = $0.05/call — transaction-building + submission (deposits, transfers, swaps, VRF) * * Prices are expressed in **USDC base units** (6 decimals): * $0.01 = 10_000 micro-USDC * $0.05 = 50_000 micro-USDC * * The pricing map is consumed by the `PayPerCallHook` to settle * SAP escrow or x402 payments after each tool invocation. * * @category Plugin * @since v0.1.0 */ /** USDC has 6 decimals. $1.00 = 1_000_000 base units. */ export declare const USDC_DECIMALS = 6; /** $0.01 in USDC base units (10_000). */ export declare const READ_PRICE_USDC = 10000n; /** $0.05 in USDC base units (50_000). */ export declare const WRITE_PRICE_USDC = 50000n; /** * Pricing tier for a MagicBlock tool. * * @enum {string} * @category Plugin * @since v0.1.0 */ export declare enum PricingTier { /** $0.01/call — read-only queries. */ READ = "read", /** $0.05/call — transaction-building + submission. */ WRITE = "write" } /** * Per-tool pricing classification. * * @name TOOL_PRICING * @description Maps every MagicBlock tool name to its pricing tier. * READ tools cost $0.01/call. WRITE tools cost $0.05/call. * * Classification logic: * - READ ($0.01): ER Router queries, health, challenge, login, * balance, private-balance, swap-quote, is-mint-initialized, * VRF result retrieval * - WRITE ($0.05): deposit, transfer, withdraw, swap, * initialize-mint, VRF randomness request * * @category Plugin * @since v0.1.0 */ export declare const TOOL_PRICING: Readonly>; /** * Resolve the price for a given tool in USDC base units. * * @name getPriceForTool * @param toolName - The tool method name (e.g. `"deposit"`) * @returns Price in USDC base units (bigint) — 10_000 for READ, 50_000 for WRITE * @throws {Error} If the tool name is not in the pricing map * @category Plugin * @since v0.1.0 */ export declare function getPriceForTool(toolName: string): bigint; /** * Resolve the pricing tier for a given tool. * * @name getTierForTool * @param toolName - The tool method name * @returns The {@link PricingTier} enum value * @throws {Error} If the tool name is not in the pricing map * @category Plugin * @since v0.1.0 */ export declare function getTierForTool(toolName: string): PricingTier; /** * Human-readable price string for a tool (e.g. `"$0.01"`). * * @name formatPrice * @param toolName - The tool method name * @returns Dollar-formatted price string * @category Plugin * @since v0.1.0 */ export declare function formatPrice(toolName: string): string; /** * Entry in the full pricing table. * * @interface PricingEntry * @category Plugin * @since v0.1.0 */ export interface PricingEntry { readonly tool: string; readonly tier: PricingTier; readonly priceUsd: string; readonly priceBaseUnits: bigint; } /** * Complete pricing table for all 20 MagicBlock tools. * * @name PRICING_TABLE * @description Ordered array of {@link PricingEntry} objects — one per * tool. Useful for display, docs generation, or escrow setup. * @category Plugin * @since v0.1.0 */ export declare const PRICING_TABLE: readonly PricingEntry[]; //# sourceMappingURL=pricing.d.ts.map