bigblocks
Version:
Complete Bitcoin UI component library - authentication, social, wallet, market, inscriptions, and blockchain interactions for React
29 lines • 1.19 kB
TypeScript
import type { FollowTransaction, UnfollowTransaction } from "bmap-api-types";
import { ApiError } from "../../../lib/api-error.js";
export type SocialTransaction = FollowTransaction | UnfollowTransaction;
interface UseFetchTransactionOptions {
txid: string;
enabled?: boolean;
type?: "follow" | "unfollow" | "auto";
}
interface UseFetchTransactionResult {
transaction: SocialTransaction | null;
isLoading: boolean;
error: ApiError | null;
refetch: () => void;
}
/**
* Generic hook for fetching any BSV transaction with social protocol data
* Useful for getting full transaction details after performing social actions
*/
export declare function useFetchTransaction({ txid, enabled, type, }: UseFetchTransactionOptions): UseFetchTransactionResult;
/**
* Hook specifically for fetching follow transactions
*/
export declare function useFetchFollowTransaction(txid: string, enabled?: boolean): UseFetchTransactionResult;
/**
* Hook specifically for fetching unfollow transactions
*/
export declare function useFetchUnfollowTransaction(txid: string, enabled?: boolean): UseFetchTransactionResult;
export {};
//# sourceMappingURL=useFetchTransaction.d.ts.map