dotASAP is a blockchain service that enables seamless token swaps, bridging across multiple blockchains and offramping to fiat right from your Sui wallet - you do not have to leave your send interface to do more. The system consists of three main components:
- Backend Engine: Monitors and processes blockchain transactions
- Web Service: Provides a user interface and API endpoints
- Demo Wallet: A demonstration wallet for testing transactions
Built on top of memo-protocol, a standardized protocol for encoding emitting Sui memos.
- 🔄 Cross-chain token swaps
- 🌉 Bridge transactions between chains
- 💱 Offramp to fiat currency
- 🔍 Real-time transaction monitoring
- 🔒 Secure wallet integration
- Node.js (v18 or higher)
- MongoDB
- Mysten/Sui
- Paystack account (for offramping)
-
Clone the repository:
git clone https://github.com/dotasap/asap-engine cd asap-engine -
Install root dependencies:
npm install
-
Install dependencies for all services:
npm run install:all
-
Set up environment variables:
# Backend Engine cp backend-engine/.env.example backend-engine/.env # Web Service cp web-service/.env.example web-service/.env # Demo Wallet cp demo-wallet/.env.example demo-wallet/.env
-
Update the environment variables with your configuration:
- Add your Sui keys
- Add your Paystack API keys
- Configure MongoDB connection
- Set up JWT secret
- Add your ASAP domain address (this is just for demo)
-
Start all services in development mode:
npm run dev
The services will be available at:
- Web Service: http://localhost:3000
- Backend Engine: http://localhost:3001
- Demo Wallet: http://localhost:5173
asap-engine/
├── backend-engine/ # Transaction monitoring and processing
├── web-service/ # Web interface and API endpoints
├── demo-wallet/ # Demo wallet for testing
└── package.json # Root package.json for managing all services
The backend engine is responsible for:
- Monitoring Sui transactions
- Processing swaps, bridges, and offramps
- Managing refunds
- Interfacing with external services
Key features:
- Bridge support (Sui, Sol)
- Transaction monitoring
- Automatic refund handling
- Offramp integration with Paystack by Stripe
Environment Variables:
PORT: Server port (default: 3001)MAX_RETRIES: Maximum retry attempts (default: 3)RETRY_DELAY_MS: Retry delay in milliseconds (default: 1000)SUI_NETWORK: Sui network (testnet/mainnet)SUI_RPC_URL: Sui RPC endpointWALLET_ADDRESS: Sui wallet address for monitoringSUI_SECRET_KEY: Sui wallet private keySUI_MNEMONIC: Sui wallet mnemonicSOL_PRIVATE_KEY: Solana wallet private keyETH_PRIVATE_KEY: Ethereum wallet private keyBRIDGED_SUI_TOKEN_MINT: Bridged SUI token addressBRIDGED_SUI_TOKEN_DECIMALS: Token decimalsWEB_SERVICE_URL: Web service URLSERVICE_TOKEN: Service authentication tokenPAYSTACK_SECRET_KEY: Paystack API keyPAYSTACK_BASE_URL: Paystack API URL
The web service provides:
- User interface for managing swap and bridge preferences
- API endpoints for the backend engine
- User authentication and profile management
- Bank details management
Key features:
- Next.js frontend
- MongoDB database
- JWT authentication
- Paystack integration
Environment Variables:
MONGODB_URI: MongoDB connection stringJWT_SECRET: JWT signing keySERVICE_TOKEN: Service authentication tokenPAYSTACK_SECRET_KEY: Paystack API keyASAP_DOMAIN: ASAP domain address
A demonstration wallet that supports:
- Creating and managing wallets
- Sending and receiving tokens
- Viewing token balances
Key features:
- React + Vite
- Sui wallet integration
- Token balance tracking
- Network switching
Environment Variables:
VITE_ASAP_DOMAIN: ASAP domain address
# Backend Engine
cd backend-engine
npm run dev
# Web Service
cd web-service
npm run dev
# Demo Wallet
cd demo-wallet
npm run devnpm run build