UNPKG

@smartinvoicexyz/utils

Version:

Unified source for utility functions used across the Smart Invoice protocol.

11 lines (10 loc) 864 B
import { LOG_TYPE, SMART_INVOICE_FACTORY_ABI, SMART_INVOICE_INSTANT_ABI, SMART_INVOICE_SPLIT_ESCROW_ABI, SMART_INVOICE_UPDATABLE_ABI } from '@smartinvoicexyz/constants'; import { ValueOf } from '@smartinvoicexyz/types'; import { DecodeEventLogReturnType, Log, TransactionReceipt, WaitForTransactionReceiptReturnType } from 'viem'; type KnownAbi = typeof SMART_INVOICE_FACTORY_ABI | typeof SMART_INVOICE_INSTANT_ABI | typeof SMART_INVOICE_SPLIT_ESCROW_ABI | typeof SMART_INVOICE_UPDATABLE_ABI; type LogParserFunction = (_log: Log) => DecodeEventLogReturnType<KnownAbi> | undefined; export declare const logParser: { [key: ValueOf<typeof LOG_TYPE>]: LogParserFunction; }; export declare const parseTxLogs: (type: ValueOf<typeof LOG_TYPE>, txData: TransactionReceipt | WaitForTransactionReceiptReturnType, eventName: string, key: string) => undefined; export {};