UNPKG

@smartinvoicexyz/hooks

Version:

Unified source for React hooks used across the Smart Invoice protocol.

14 lines (13 loc) 507 B
import { FormInvoice, UseToastReturn } from '@smartinvoicexyz/types'; import { UseFormReturn } from 'react-hook-form'; import { Address, Hex } from 'viem'; export declare const useInstantCreate: ({ invoiceForm, toast, onTxSuccess, }: { invoiceForm: UseFormReturn<Partial<FormInvoice>>; toast: UseToastReturn; onTxSuccess?: (result: Address) => void; }) => { prepareError: Error | null; writeAsync: () => Promise<Hex | undefined>; writeError: Error | null; isLoading: boolean; };