SPB Git

Repository Public

smoke-swap-maya.mts 1.2 KB 19 lines typescript

1// Live READ-ONLY check of the Maya Protocol swap adapter (price discovery). Nothing is built, signed or broadcast.2//   npx tsx scripts/smoke-swap-maya.mts3// See scripts/lib/smoke-native-swap.mts for what is verified.4import { MAYA_API_VERSION, MAYA_CONFIG } from '../packages/swap/src/providers/maya.ts';5import { native, smokeNativeSwap, token } from './lib/smoke-native-swap.mts';67await smokeNativeSwap(MAYA_CONFIG, MAYA_API_VERSION, [8  { from: native('bitcoin'), to: native('ethereum') },9  { from: native('ethereum'), to: native('bitcoin') },10  { from: native('bitcoin'), to: token('ethereum', 'USDC') },11  { from: token('ethereum', 'USDT'), to: native('bitcoin') },12  { from: native('ethereum'), to: token('arbitrum', 'USDC') },13  { from: native('arbitrum'), to: native('bitcoin') },14  { from: native('bitcoin'), to: native('arbitrum') },15  { from: native('bitcoin'), to: native('ethereum'), units: 2, slippageBps: 300, note: 'large: streaming expected' },16  { from: native('ethereum'), to: native('bitcoin'), usd: 1, expect: 'no_route', note: '(cannot pay the BTC outbound fee)' },17  { from: native('dogecoin'), to: native('bitcoin'), expect: 'unsupported', note: '(Maya has no DOGE pool)' },18]);19
Files main
Menu

Theme