-
Notifications
You must be signed in to change notification settings - Fork 49
Closed
Description
Context
The ShapeShift affiliate revenue API aggregates fee data from multiple swap providers. Near Intents is a cross-chain swap provider that ShapeShift integrates with. A tracker file exists but has incomplete implementation with TODO comments that need to be resolved.
Current Problem: The Near Intents tracker (nearIntents.ts) has placeholder code and TODO comments for:
- Parsing asset IDs from the API response
- Determining which transaction hash to use
Current Implementation
Location: node/proxy/api/src/affiliateRevenue/nearIntents.ts
The file exists but has incomplete sections around lines 66-73:
// TODO: Figure out parsing of originAsset/destinationAsset
const chainId = ''
const assetId = `${chainId}/`
// TODO: determine if origin or destination chain tx hash...
txHash: '',Acceptance Criteria
- Review the Near Intents API response structure
- Implement proper parsing of
originAssetanddestinationAssetto extract chainId and assetId - Determine appropriate txHash to use (origin or destination chain)
- Ensure
NEAR_INTENTS_API_KEYenvironment variable is documented - Verify tracker returns valid data with real API calls
- Ensure 'nearintents' is in the services array in
models.ts
Files to Modify
node/proxy/api/src/affiliateRevenue/nearIntents.tsnode/proxy/api/src/models.ts(verify service is listed)node/proxy/sample.env(document the API key)
Reference
The main ShapeShift app has a Near Intents swapper integration that may provide insight into the API response format:
- Path:
packages/swapper/src/swappers/NearIntentsSwapper/(in the shapeshift/web repo)
Environment Variables
NEAR_INTENTS_API_KEY- Required for API authentication (needs to be added to CircleCI for deployment)
coderabbitai
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done