Complete guide to retrieve claimable positions and claim fees using the Bags API with TypeScript and Node.js
.env
file:
claim-fees.ts
.
This script uses the Bags SDK’s fee
service to get all claimable positions, filter them for a specific token mint, and generate claim transactions.
claimFeesForToken()
function call. You can change the token mint address by modifying the last line of the script.