UNPKG

@agentdao/core

Version:

Core functionality, skills, and ready-made UI components for AgentDAO - Web3 subscriptions, content generation, social media, help support, live chat, RSS fetching, web search, and agent pricing integration

40 lines (39 loc) 1.25 kB
type Token = { symbol: string; address?: `0x${string}`; decimals: number; isNative?: boolean; }; /** * FlawlessWeb3Subscription (Multi-Token + Native ETH/BNB) * * Usage: * 1. Install dependencies: * pnpm add @agentdao/core wagmi viem ethers * 2. Add <FlawlessWeb3Subscription /> to your app. * 3. Set up a backend endpoint at /api/agent/verify-payment (see docs). * * Props: * - agentId: string * - planId: string * - billingPeriod: 'monthly' | 'quarterly' | 'annually' * - amount: string (in token units, e.g. '1') * - recipient: string (platform or contract address) * - tokens: array of { symbol, address, decimals, isNative? } * - onSuccess: (subscription) => void * - onError: (error) => void * - plans: any */ export declare function FlawlessWeb3Subscription({ agentId, planId, billingPeriod, amount, recipient, tokens, onSuccess, onError, plans, ...props }: { agentId: string; planId: string; billingPeriod: 'monthly' | 'quarterly' | 'annually'; amount: string; recipient: string; tokens?: Token[]; onSuccess?: (subscription: any) => void; onError?: (error: any) => void; plans: any; [key: string]: any; }): import("react/jsx-runtime").JSX.Element; export {};