hashgraph / hashgraph/hedera-agent-kit-js
Implement Swap a Token Pair (DEX)
- Dominant language
- TypeScript
- Stars
- 67
- Forks
- 78
- PR merge metrics
- No merged PRs in 30d
Description
**Description:**
Introduce high-level functionality to swap tokens on a Hedera-based DEX (e.g., swapping HBAR for a newly created fungible token). Keep the interface minimal for now.
**Roadmap Reference:** [ROADMAP.md > Swapping on DEXs > Swap a token pair](../ROADMAP.md)
**Proposed Implementation/Tasks:**
- Research an existing DEX or standard swap interface on Hedera.
- Provide a function like `swapTokens(inputTokenId, outputTokenId, amountIn)`.
- Return a transaction receipt or relevant swap outcome data.
**Checklist:**
- [ ] Implement DEX swap logic using Hedera SDK or contract calls.
- [ ] Simple test coverage (e.g., a mock environment if available).
- [ ] Document usage and known limitations.
**Additional Context/Notes:**
- This is a minimal “proof of concept” for swaps. Future expansions: better slippage controls, liquidity pool interactions, etc.
**Milestone:** v0.3 - DEX Swaps
**DCO Requirement:**
All commits must be DCO-signed. Please run `git commit -s`.
**Assignees:** tbc
Contributor guide
Research direction
Start with ROADMAP.md under “Swapping on DEXs” and inspect the repository’s existing Hedera SDK or contract-call entry points. Research a Hedera-compatible DEX interface before choosing the swap path; done means a minimal token-pair swap, receipt or outcome data, simple test coverage, and usage documentation with limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- blockchain
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100