Maya Integration Guide
A small guide to show what you would need to integrate Maya.
Maya Protocol can perform an action when a specific instruction is sent to Mayaโs address for a particular chain.
If you want to swap BTC to KUJI, you send a BTC transaction to Mayaโs vault for Bitcoin, along with the memo: e.g. =:KUJI.KUJI:kujira1q6g84pxu4tpr26dwp39fdrrwtpcnak44sf0x7f
This memo specifies the asset you want to swap to, and the destination address. You donโt have to manually look for these vaults, we have an endpoint, from which you can fetch the inbound vaults for Maya, and the memoโs you need. An example. You want to swap 0.001 BTC to KUJI. Your Kujira address is: kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw
.
Entering this in the quoting endpoint: https://mayanode.mayachain.info/mayachain/quote/swap?from_asset=BTC.BTC&to_asset=KUJI.KUJI&amount=100000&destination=kujira1cd5kzygxfzylez8q4vak55pwj2z7a6hweat0zw
Gives:
You find the expected amount of KUJI youโll get in 1e8 (in this case 23.52 KUJI), the address (inbound_address
) you need to send your BTC to, and the memo you need to attack to the BTC transaction. That is everything you need, to swap using Maya Protocol.
You can add limits, affiliate fees and more to this endpoint as well.
You can find all available and active pools in the Pools endpoint: https://mayanode.mayachain.info/mayachain/pools.
Bitcoin is BTC.BTC
, USK is KUJI.USK
(KUJI is the chain, USK the asset).
Exceptions: It can happen that a chain is halted.
This can be checked by looking at the Mimir endpoint: https://mayanode.mayachain.info/mayachain/mimir
If HALTBTCTRADING = 1
, trading is halted. Trading is not halted when the parameter is set to 0. Currently we have the following chains: BTC
, ETH
, THOR
, DASH
& KUJI
.
You can find all endpoints here: https://mayanode.mayachain.info/mayachain/doc Hopefully this explains well how you can swap and integrate Mayaโs cross-chain swaps! (edited)
Last updated