Practical overview
When it fits
Use it when building an application that needs to request Mayan swap quotes and construct cross-chain transactions, with the application handling wallet access and signing.
Who it is for
- TypeScript developers adding Mayan cross-chain swap flows to an application.
- Teams building wallet-connected swap interfaces that need quote retrieval and transaction construction.
Documented uses
- Request available routes for an input token, amount and destination token.
- Construct a swap transaction using a selected quote and wallet signer.
- Check whether a swap is in progress, completed or refunded.
Requirements & limits
The SDK is available from a public GitHub repository and npm; the repository displays an MIT license. The README specifies Node.js 20.19+ or 22.12+ for CommonJS require(), while ESM imports have no version floor.
- The README lists chain identifiers across Solana, EVM networks, Sui, HyperEVM and HyperCore, but supported flows can differ by source and destination.
- ERC-20 inputs need an allowance for the Mayan Forwarder.
- Version 15 Sui integration requires
@mysten/suiv2 and a Core API-compatible client; gRPC is recommended. - Some older Node.js and bundler setups cannot require the package as CommonJS because it is an ES module.
- The quickstart illustrates one signature on the source chain and a separate destination wallet address.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Request and build an EVM-to-Solana swap
Follow the documented quickstart stages to obtain a route quote and construct a swap transaction.
Before you start
- Install
@mayanfinance/swap-sdkwith npm. - Use an EVM signer, such as the ethers BrowserProvider signer in the example.
- Provide the source token and chain, destination token and chain, amount in base units, and destination wallet address.
- For an ERC-20 input, arrange an allowance for the Mayan Forwarder.
Steps
Call
fetchQuotewith the input amount, token identifiers,fromChain,toChainand slippage setting.Select a quote from the returned routes.
Obtain the source-chain signer and address, then call
swapFromEvmwith the quote and destination Solana address.Use the returned transaction hash or order hash with the documented explorer API to check swap status.
Expected outcome
A source-chain transaction is constructed for the selected quote, and its swap status can be queried as in progress, completed or refunded.
Guide limitations
- The example covers Arbitrum USDC to Solana USDC; it does not establish that every token and chain pairing is available.
- Execution requires the application to provide wallet signing and a destination address.
- ERC-20 inputs require an allowance for the Mayan Forwarder.
Compare options for DEX swap integration
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Mayan Cross-Chain Swap SDK | Request available routes for an input token, amount and destination token. | Server, Web | The SDK is available from a public GitHub repository and npm; the repository displays an MIT license. The README specifies Node.js 20.19+ or 22.12+ for CommonJS require(), while ESM imports have no version floor. |
| VIA SDK | Find swap or bridge routes using source and destination chains, token addresses, and an amount. | Web | The package is installed through npm and the documented client uses an API key. The README says the default key is limited to one request per second per IP and directs developers seeking higher limits to contact VIA. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 5 October 2026
- Original website title
- mayan-finance/swap-sdk · Official homepage title · retained in its source language

