UNPKG

run402-mcp

Version:

MCP server for Run402 — full-stack backend infrastructure for AI agents: Postgres, auth, storage, serverless functions and atomic deploys. Paid with x402/MPP. Includes $0.03 image generation.

62 lines • 2.71 kB
/** * `r.wallets.send` (spec `wallet-signers`, "Wallets Send USDC From Themselves * Or From An Owned Smart Account"; `mpp-tempo-client-surface`, "Sending * pathUSD On Tempo"). Moves a stablecoin from the selected wallet, which may * be key-backed or KMS-backed: * * - `base` / `base-sepolia`: USDC, from the wallet itself, or `from` a * CoinbaseSmartWallet the wallet owns (one transaction from the wallet * calling the smart account's `execute`); gas in ETH. * - `tempo` / `tempo-moderato`: pathUSD from the wallet itself; Tempo has no * gas token, so the fee is paid in pathUSD too. * * Without `confirm: true` it checks everything and returns a preview without * signing. A send reports success only once the transaction is mined * successfully; a revert is a failure carrying its hash. */ import type { LocalAccount, Transport } from "viem"; export type SendNetwork = "base" | "base-sepolia" | "tempo" | "tempo-moderato"; export declare const SEND_NETWORKS: readonly SendNetwork[]; export interface SendOptions { /** Decimal amount of the network's stablecoin, at most 6 decimal places (e.g. "10", "0.5"). */ amount: string; to: string; /** A CoinbaseSmartWallet the wallet owns, to send from instead of the wallet itself (Base only). */ from?: string; network?: SendNetwork; /** Sign and send. Without it, the checks run and a preview is returned. */ confirm?: boolean; } export interface SendPreview { preview: true; network: SendNetwork; asset: "USDC" | "pathUSD"; amount_usd_micros: number; /** The address the money leaves. */ from: string; to: string; /** The address that signs and pays the fee. */ sender: string; balance_usd_micros: number; /** Gas units the send is estimated to use; null when the node could not estimate. */ estimated_gas: number | null; } export interface SendResult { tx_hash: string; from: string; to: string; amount_usd_micros: number; network: SendNetwork; asset: "USDC" | "pathUSD"; explorer_url: string; } /** "10.5" → 10_500_000n; refuses anything that is not a positive amount with at most 6 decimals. */ export declare function parseStablecoinAmount(amount: string): bigint; /** The CLI command for these options, as the sandbox refusal names it. */ export declare function sendCommand(opts: Partial<SendOptions>): string; export interface SendDeps { /** Test seam: the RPC transport (default: the chain's public RPC). */ transport?: Transport; } export declare function sendFromWallet(account: LocalAccount, opts: SendOptions, deps?: SendDeps): Promise<SendPreview | SendResult>; //# sourceMappingURL=wallets-send.d.ts.map