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.
Usage
Parameters
syncTransfers / syncTransfersAsync accept an object with:
| Parameter | Type | Required | Description |
|---|---|---|---|
walletAddress | string | Yes | Wallet public key to sync transfers for |
bearerToken | string | Yes | Bearer token for authentication |
Return Value
| Property | Type | Description |
|---|---|---|
syncTransfers | (input) => void | Trigger sync (fire-and-forget) |
syncTransfersAsync | (input) => Promise<SyncOnChainTransfersResponse> | Promise-based sync |
data | SyncOnChainTransfersResponse | undefined | Sync result |
isLoading | boolean | Whether sync is in progress |
isError | boolean | Whether an error occurred |
error | Error | null | Error from last sync attempt |
isSuccess | boolean | Whether last sync succeeded |
reset | () => void | Reset mutation state |
SyncOnChainTransfersResponse
| Field | Type | Description |
|---|---|---|
synced | number | New transactions discovered and saved to DB |
total | number | Total transfers found on-chain for this wallet |
Example Implementation
How It Works
- Calls
POST /transactions/sync-on-chainon the backend - Backend queries Voyager API for all token transfers for the wallet
- Compares with existing DB records by transaction hash
- Saves new transfers to the
Transactiontable (read-through cache) - Returns
{ synced, total } - Invalidates
useGetTransactionListcache so new transfers appear immediately
useGetTransactionList returns both SDK-initiated transfers AND external receives.
When to Use
- On wallet load: Sync once when user opens their wallet to discover any external receives
- Pull-to-refresh: Let users manually trigger sync
- After receiving funds: If user expects incoming funds from an external wallet
Synced transfers are cached in the database. Subsequent
useGetTransactionList calls return them
without re-querying Voyager.Limitations
- Only discovers token transfers (ERC-20). Contract interactions without transfers are not synced.
- Voyager API rate limits apply. Avoid calling sync on every render.
- First sync for a wallet with many transfers may take a few seconds (paginated, max 500 transfers per sync).
Related
- useGetTransactionList — Read the transaction list (includes synced transfers)
- useGetTransaction — Get a single transaction by hash
- useGetTransactionStatus — Poll transaction status
