Skip to content

Complete Near Intents Tracker #1235

@premiumjibles

Description

@premiumjibles

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.

Repository: shapeshift/unchained
Location: node/proxy/api/src/affiliateRevenue/nearIntents.ts

Current Problem: The Near Intents tracker has placeholder code and TODO comments for:

  1. Parsing asset IDs from the API response
  2. Determining which transaction hash to use

Acceptance Criteria

  • Review the Near Intents API response structure
  • Implement proper parsing of originAsset and destinationAsset to extract chainId and assetId
  • Determine appropriate txHash to use (origin or destination chain)
  • Ensure NEAR_INTENTS_API_KEY environment 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.ts
  • node/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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions