UNPKG

@smartinvoicexyz/hooks

Version:

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

41 lines (40 loc) 1.23 kB
import { Hex } from 'viem'; import { SimulateContractErrorType, WriteContractErrorType } from './types'; type OwnerAndAllocation = { address: string; percent: number; }; export declare const useEscrowZap: ({ ownersAndAllocations, provider, milestones, client, threshold, arbitration, projectTeamSplit, daoSplit, safetyValveDate, details, enabled, networkConfig, onSuccess, }: UseEscrowZapProps) => { writeAsync: () => Promise<Hex | undefined>; isLoading: boolean; prepareError: SimulateContractErrorType | null; writeError: WriteContractErrorType | null; }; interface UseEscrowZapProps { ownersAndAllocations: OwnerAndAllocation[]; provider: Hex | undefined; milestones: { value?: string; }[]; client: string; threshold?: number; arbitration?: number; projectTeamSplit?: boolean; daoSplit?: boolean; token: { value?: string; label?: string; }; safetyValveDate: Date; details?: `0x${string}` | null; enabled?: boolean; networkConfig: { tokenAddress: Hex; tokenDecimals: number; zapAddress: Hex; resolver: Hex; daoAddress: Hex; }; onSuccess?: (hash: Hex) => void; } export {};