All Projects → project-serum → swap-ui

project-serum / swap-ui

Licence: Apache-2.0 license
React Component for Swapping on the Serum DEX

Programming Languages

typescript
32286 projects
HTML
75241 projects
CSS
56736 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to swap-ui

serum-price-api
An easy to use API to know SPL Tokens price.
Stars: ✭ 23 (-78.5%)
Mutual labels:  serum, solana
metaplex-cli
Command line interface for Solana Metaplex programs.
Stars: ✭ 16 (-85.05%)
Mutual labels:  solana
raydium-sdk
An SDK for building applications on top of Raydium.
Stars: ✭ 66 (-38.32%)
Mutual labels:  solana
solana-web3-demo
a quick demo for solana web3
Stars: ✭ 93 (-13.08%)
Mutual labels:  solana
guild
Guild - Build Your Guild and award employees with Crypto 💰
Stars: ✭ 3 (-97.2%)
Mutual labels:  solana
nina
a self-publishing protocol for musicians - on solana
Stars: ✭ 27 (-74.77%)
Mutual labels:  solana
wallet-adapter
Modular TypeScript wallet adapters and components for Solana applications.
Stars: ✭ 964 (+800.93%)
Mutual labels:  solana
Solana.Swift
This is a open source library on pure swift for Solana protocol.
Stars: ✭ 107 (+0%)
Mutual labels:  solana
dex-v4
Orderbook-based on-chain SPL token swap market
Stars: ✭ 36 (-66.36%)
Mutual labels:  solana
solana-py
Solana Python SDK
Stars: ✭ 445 (+315.89%)
Mutual labels:  solana
bonfida-utils
Collection of different utilities in use across various Bonfida projects
Stars: ✭ 22 (-79.44%)
Mutual labels:  solana
fetch-nft
🖼🎑🌠 A utility to fetch and easily display Ethereum & Solana NFTs in a common format given any wallet
Stars: ✭ 83 (-22.43%)
Mutual labels:  solana
kyve
KYVE - A protocol for verified data-streams
Stars: ✭ 51 (-52.34%)
Mutual labels:  solana
solana-go-sdk
Solana Golang SDK
Stars: ✭ 162 (+51.4%)
Mutual labels:  solana
spl-token-ui
Interface for creating and managing SPL Tokens
Stars: ✭ 130 (+21.5%)
Mutual labels:  solana
serum-vial
Real-time WebSocket market data API for Serum
Stars: ✭ 154 (+43.93%)
Mutual labels:  solana
expo-solana-wallet
Cross-Platform Solana Wallet built with Expo and Solana/web3.js
Stars: ✭ 122 (+14.02%)
Mutual labels:  solana
timelock-crate
Streamflow Community program (inaptly named) deployed on Solana mainnet.
Stars: ✭ 26 (-75.7%)
Mutual labels:  solana
mmb
Trading bot implemented in Rust, with market making and strategy automation for any exchange or blockchain.
Stars: ✭ 359 (+235.51%)
Mutual labels:  serum
air-support
Airdrop automation tools for Solana from The Skeleton Crew
Stars: ✭ 112 (+4.67%)
Mutual labels:  solana

@project-serum/swap-ui

Build Status npm

A reusable React component for swapping on the Serum DEX. The Solana program can be found here.

Usage

Install

First install the required peer dependencies into your React project.

yarn add @material-ui/core @material-ui/icons @material-ui/lab @project-serum/anchor @solana/spl-token-registry @solana/web3.js material-ui-popup-state react-async-hook

Then install the package.

yarn add @project-serum/swap-ui

Add the Swap Component

To embed the Swap component into your application, one can minimally provide an Anchor Provider and TokenListContainer. For example,

<Swap provider={provider} tokenList={tokenList} />

All of the complexity of communicating with the Serum DEX and managing its data is handled internally by the component.

Referral Fees

To earn referral fees, one can also pass in a referral property, which is the PublicKey of the Solana wallet that owns the associated token accounts in which referral fees are paid (i.e., USDC and USDT).

Developing

Install dependencies

yarn

Build

yarn build

Run the example app

For local development and educational purposes, a minimal React app is provided in the example/ subdirectory.

To run, change directories via cd example/ and start the app.

Start the app

yarn start
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].