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.
24 lines • 1.43 kB
TypeScript
export interface OnChainBalances {
/** USDC on Base mainnet, USD micros. */
base_mainnet_usd_micros: number | null;
/** USDC on Base Sepolia (test money), USD micros. */
base_sepolia_usd_micros: number | null;
/** pathUSD on Tempo mainnet, USD micros. */
tempo_mainnet_pathusd_micros: number | null;
/** pathUSD on Tempo Moderato (test money), USD micros. */
tempo_moderato_pathusd_micros: number | null;
}
export type OnChainBalanceKey = keyof OnChainBalances;
export declare const ALL_ON_CHAIN_BALANCE_KEYS: readonly OnChainBalanceKey[];
/**
* The networks a rail pays on: Tempo for `mpp`; Base for `x402` and for
* `lightning`, whose fallback is x402.
*/
export declare function railBalanceKeys(rail: string | null | undefined): OnChainBalanceKey[];
/** Reads one network's balance in USD micros; throws when the read fails. */
export type BalanceReader = (key: OnChainBalanceKey, address: string) => Promise<number>;
/** Read the given networks in parallel; a failed read is `null`. */
export declare function readOnChainBalances(address: string, keys?: readonly OnChainBalanceKey[], reader?: BalanceReader): Promise<Partial<OnChainBalances>>;
/** The sum over `keys`, or null when every one of them is unknown. */
export declare function sumOnChainBalances(balances: Partial<OnChainBalances>, keys: readonly OnChainBalanceKey[]): number | null;
//# sourceMappingURL=onchain-balances.d.ts.map