-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
import { | ||
EdgeCorePluginOptions, | ||
EdgeSwapInfo, | ||
EdgeSwapPlugin | ||
} from 'edge-core-js/types' | ||
|
||
import { makeThorchainBasedPlugin } from './common' | ||
|
||
const swapInfo: EdgeSwapInfo = { | ||
pluginId: 'mayaprotocol', | ||
isDex: true, | ||
displayName: 'Maya Protocol', | ||
supportEmail: 'support@edge.app' | ||
} | ||
const orderUri = 'https://www.mayascan.org/tx/' | ||
|
||
const MIDGARD_SERVERS_DEFAULT = ['https://midgard.mayachain.info'] | ||
const THORNODE_SERVERS_DEFAULT = ['https://mayanode.mayachain.info/mayachain'] | ||
|
||
// Network names that don't match parent network currency code | ||
export const MAINNET_CODE_TRANSCRIPTION: { [cc: string]: string } = { | ||
arbitrum: 'ARB', | ||
bitcoin: 'BTC', | ||
dash: 'DASH', | ||
ethereum: 'ETH', | ||
litecoin: 'LTC', | ||
thorchainrune: 'THOR' | ||
} | ||
|
||
export const makeMayaProtocolPlugin = ( | ||
opts: EdgeCorePluginOptions | ||
): EdgeSwapPlugin => { | ||
return makeThorchainBasedPlugin(opts, { | ||
MAINNET_CODE_TRANSCRIPTION, | ||
MIDGARD_SERVERS_DEFAULT, | ||
THORNODE_SERVERS_DEFAULT, | ||
orderUri, | ||
swapInfo | ||
}) | ||
} |