Overview
The SDK provides methods for developers to manage their accounts, check fee balances, and claim fees:getDevAccountInfo- Get your dev account configuration and settingsgetDevAccountFees- Check fee balances for your dev accountgetDevFeeClaimHistory- View history of completed fee claimsgetFeeClaimAuthorization- Get an authorization signature to claim feesclaimDevFees- High-level method that handles authorization and transaction submission
To avoid ambiguity, we denote the smallest possible multiple of USDC (0.000001 USDC) as one
uusdc,
which stands for µUSDC (micro-USDC), and denote the smallest possible multiple of a contract (0.01 contract)
as one ccontract (centicontract).User-facing USDC balances are specified as fixed-point strings (e.g. "1.2625" for USDC). Contract quantities
in the API and SDK are specified as integer ccontracts strings (e.g. "1050" for 10.50 contracts at precision 2).Configuration
Developer fee methods require configuringdevFlags when creating the client. This enables EIP-712 signature-based authentication with the API.
Getting Account Info
Retrieve your dev account configuration and settings.getDevAccountInfo
Returns
Example
Checking Fee Balances
Query your dev account’s accumulated fees across different states.getDevAccountFees
devFlags for authentication.
Returns
Example
Fee Claim History
View your past fee claim withdrawals.getDevFeeClaimHistory
Parameters
Returns
Example
Claiming Fees
Claim accumulated fees from the vault contract to your signer address.claimDevFees
This high-level method handles getting the authorization signature and submitting the claim transaction.
Parameters
Returns
Transaction hash of the fee claim transaction.Example
Low-Level Authorization
For advanced use cases, you can get the authorization signature directly.getFeeClaimAuthorization
Example
Fee States
Fees progress through the following states:
Only unclaimed fees can be claimed. Pending and locked fees will become claimable after the settlement process completes.
Error Handling
Important Notes
- All fee amounts are in µUSDC (6 decimal places: 1 USDC = 1,000,000 µUSDC)
- Fee claim authorizations expire after 30 seconds
- You can only have one pending claim authorization at a time
- Fees are paid out to the signer address configured for your dev account
- Use
getDevAccountFeesto check your balance before attempting to claim - The SDK automatically handles EIP-712 authentication when
devFlagsis configured