Repository navigation
feat: add Aptos chain support with NEAR Intents routing #12348
Copy link
Copy link
Open
Description
tl;dr
Add Aptos blockchain as a supported chain in ShapeShift Web, with NEAR Intents routing for cross-chain swaps into/out of APT and Aptos-native assets. Aptos is non-EVM (Move VM, BCS-signed transactions, Ed25519 + SHA3-256), so it follows the non-EVM chain integration pattern established by Solana, Sui, Near, Ton.
User-facing capabilities
- Connect a Native wallet that derives Aptos accounts at BIP44
m/44'/637'/0'/0'/0' - View APT balance + Aptos-native asset balances in the portfolio
- Receive APT and any Aptos token (via address derivation + QR)
- Send APT and Aptos tokens (BCS-signed
0x1::aptos_account::transfer_coins) - Swap into/out of APT and Aptos-native assets via NEAR Intents — cross-chain solver model (no APT needed on destination for incoming swaps; solver pays Aptos gas)
Scope (in this initial PR)
- HDWallet (Native):
hdwallet-coreAptos interfaces + SLIP-44 637,hdwallet-nativeEd25519 + SHA3-256AptosAdapter(with mixins +native.tsinit/wipe/describePath wiring) - CAIP / chain adapter: full
AptosChainAdapter(account discovery, balances, BCS signing, broadcast, fee estimation, 19 unit tests) - App wire-up: Aptos plugin, feature flag
VITE_FEATURE_APTOS, CSP headers, portfolio account derivation, send modal, trade execution dispatch, RFOX bridge integration, state migrations bump v334 - Asset data: ~80 Aptos tokens via the Panora token list, CoinGecko market data adapter, treasury / base assets
- NEAR Intents Aptos route: solver routing wired into
NearIntentsSwapperfor USDC / ETH / etc. ↔ APT and Aptos-native assets - qabot fixture:
e2e/fixtures/aptos-chain-integration.yamlfor future automated regression - Bug fix: Aptos fee estimation now uses
sim.gas_used * 1.5(Aptos CLI safety factor) instead ofsim.max_gas_amount, which the node returns as the sender's affordability ceiling — fixes a 100-300× fee inflation on the trade preview
Not in scope (separate follow-up PRs)
- PanoraSwapper (Aptos-native DEX aggregator) — deferred to a stacked PR to keep this one reviewable
- External blockers (yield.xyz Aptos support, watchlists, etc.)
Risk
HIGH-RISK — introduces:
- A brand-new on-chain transaction type (BCS-signed Aptos
SimpleTransaction.submit.simple) - A new HDWallet implementation (Ed25519 + SHA3-256, SLIP-44 637) across
hdwallet-core+hdwallet-native - A new
ChainAdapter(no code reuse from existing adapters) - A new trade execution path + Send modal path
- NEAR Intents Aptos routing (extension of existing swapper — type ripple to
AptosSwapperDepsrequires updates in unrelated swapper test mocks, e.g. ButterSwap) - State migrations bump (v334)
Risk is contained by feature flag: VITE_FEATURE_APTOS=false in .env.production. Operations testing follows the flag flip.
References
.claude/contracts/second-class-evm-chain.md(contract — used as analog for non-EVM chain integration points)- Aptos system integrators guide: https://aptos.dev/build/guides/system-integrators-guide
- Aptos TS SDK: https://aptos.dev/build/sdks/ts-sdk
- NEAR Intents documentation: https://docs.near-intents.org/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
- StatusShow more project fieldsBacklog
Activity
Hobie1Kenobi commentedon May 24, 2026
Okay, here's a draft GitHub comment based on your provided information:
Would you like me to refine this comment in any way (e.g., adjust the tone, add specific details)?