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

# calculatePoints

> Estimate DZap loyalty points for a completed swap/bridge.

Estimates DZap loyalty points for a completed swap/bridge, used by partners surfacing rewards in their UI.

```ts theme={null}
const { points } = await dzap.calculatePoints({
  chainId: 1,
  account: '0xUser',
  txType: 'swap', // 'swap' | 'bridge'
  srcTokens: [{ address: '0xaf88...', amount: '1000000', decimals: 6 }],
  destTokens: [{ address: '0x4200...', amount: '300000000000000', decimals: 18 }],
  providers: ['across'],
});
```
