> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chipipay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# useCctpDepositStatus

> Follow a registered cross-chain deposit until Chipi mints it on Starknet; resumes on any device from the burn hash.

## Usage

```typescript theme={null}
const { data, isLoading, isError, error, refetch } = useCctpDepositStatus({
  burnTxHash,
  getBearerToken,
});
```

### Parameters

* `burnTxHash` (string | null | undefined): the source-chain burn to follow. The query is idle without one.
* `getBearerToken` (`() => Promise<string | null | undefined>`): asked on every refetch.
* `pollIntervalMs` (optional, default 15000): how often to ask while the deposit is `PENDING`. Polling stops once it is `MINTED`, `FAILED` or `UNREGISTERED`.
* `queryOptions` (optional): extra TanStack Query options.

### Return Value

A TanStack `UseQueryResult<CctpDepositStatus>`. `data.status` is `PENDING` while Circle attests and Chipi's delivery runs, `MINTED` with `data.mintTx` (the Starknet `receive_message` transaction), `FAILED` (support can finish it; the burn is safe), or `UNREGISTERED` (call `registerCctpDeposit`).

## Example Implementation

```typescript theme={null}
import { useCctpDepositStatus } from "@chipi-stack/nextjs";

export function DepositProgress({ burnTxHash, getToken }: { burnTxHash: string; getToken: () => Promise<string | null> }) {
  const { data } = useCctpDepositStatus({ burnTxHash, getBearerToken: getToken });
  if (!data || data.status === "PENDING") return <p>On its way: you can close this page.</p>;
  if (data.status === "MINTED") return <p>Arrived: {data.mintTx}</p>;
  return <p>Status: {data.status}</p>;
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.