UNPKG

@0xsequence/anypay-sdk

Version:

SDK for Anypay functionality

70 lines 1.76 kB
import React from "react"; import { type Account, type WalletClient } from "viem"; import { type TransactionState } from "../../anypay.js"; interface Token { id: number; name: string; symbol: string; balance: string; imageUrl: string; chainId: number; contractAddress: string; tokenPriceUsd?: number; contractInfo?: { decimals: number; symbol: string; name: string; }; } interface SendFormProps { selectedToken: Token; onSend: (amount: string, recipient: string) => void; onBack: () => void; onConfirm: () => void; onComplete: (data: any) => void; account: Account; sequenceApiKey: string; apiUrl?: string; env?: "local" | "cors-anywhere" | "dev" | "prod"; toRecipient?: string; toAmount?: string; toChainId?: number; toToken?: string; toCalldata?: string; walletClient: WalletClient; theme?: "light" | "dark"; onTransactionStateChange: (transactionStates: TransactionState[]) => void; useSourceTokenForButtonText?: boolean; onError: (error: Error) => void; onWaitingForWalletConfirm: (intentAddress?: string, originAmount?: string) => void; } export declare const SUPPORTED_TO_CHAINS: ({ id: number; name: string; icon: 1; } | { id: number; name: string; icon: 8453; } | { id: number; name: string; icon: 10; } | { id: number; name: string; icon: 42161; } | { id: number; name: string; icon: 137; })[]; export declare const SUPPORTED_TO_TOKENS: { symbol: string; name: string; imageUrl: string; decimals: number; }[]; export declare const SendForm: React.FC<SendFormProps>; export default SendForm; //# sourceMappingURL=SendForm.d.ts.map