@smartinvoicexyz/hooks
Version:
Unified source for React hooks used across the Smart Invoice protocol.
14 lines (13 loc) • 525 B
TypeScript
import { InvoiceDetails, UseToastReturn } from '@smartinvoicexyz/types';
import { Hex } from 'viem';
import { SimulateContractErrorType, WriteContractErrorType } from './types';
export declare const useWithdraw: ({ invoice, onTxSuccess, toast, }: {
invoice: Partial<InvoiceDetails>;
onTxSuccess: () => void;
toast: UseToastReturn;
}) => {
writeAsync: () => Promise<Hex | undefined>;
isLoading: boolean;
prepareError: SimulateContractErrorType | null;
writeError: WriteContractErrorType | null;
};