Skip to content

officialcmg/uniport

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Uniport

npm version License: MIT

Cross-chain payment SDK. Accept crypto payments from any blockchain with one line of code.

GitHub Repository

Installation

npm install uniport-sdk

Quick Start

import { UniportButton } from 'uniport-sdk'

// That's it — no initialization needed!
<UniportButton
  recipient="0x..." // Your Sui wallet address
  onSuccess={(result) => console.log('Paid!', result.txHash)}
/>

That's it! No API keys, no initialization. Users can now pay you from 21+ blockchains. The token received is USDC on Sui by default.

UniportButton Props

Prop Type Required Default Description
recipient string - Recipient wallet address
destinationToken - 'suiUSDC' Token to receive on Sui
amount string - Fixed amount (user selects if omitted)
refundAddress string - Refund address if payment fails*
label string 'Pay with Crypto' Button text
variant 'default' | 'compact' | 'outline' 'default' Button style
disabled boolean false Disable the button
className string - Custom CSS class
onSuccess (result) => void - Called when payment completes
onError (error) => void - Called when payment fails
onOpenChange (open) => void - Called when modal opens/closes

*Note: In a future version, refund address input will be added directly in the modal UI, removing the need to pass it as a prop.

Button Variants

  • default - Gradient purple button with shadow (recommended)
  • compact - Smaller version for tight spaces
  • outline - Transparent with purple border

Supported Chains & Tokens

Chain Tokens
Sui (destination) SUI, USDC
Ethereum ETH, USDC, USDT, WBTC, DAI, AAVE, UNI, LINK, SHIB, PEPE, TURBO, SAFE
Solana SOL, USDC, USDT, TRUMP, WIF, MELANIA
Bitcoin BTC
Optimism ETH, USDC, USDT, OP
Base ETH, USDC, cbBTC, BRETT
Polygon POL, USDC, USDT
Arbitrum ETH, USDC, USDT, ARB, GMX
Avalanche AVAX, USDC, USDT
BSC BNB, USDC, USDT
TON TON, USDT
Tron TRX, USDT
NEAR wNEAR, USDC, USDT
Cardano ADA
XRP Ledger XRP
Dogecoin DOGE
Litecoin LTC
Bitcoin Cash BCH
Aptos APT
Starknet STRK
Berachain BERA
Zcash ZEC

Features

  • 🌐 Accept payments from 21+ blockchains
  • ⚡ Sub-minute settlement via NEAR Intents
  • 💎 Premium glassmorphism UI
  • 📱 Mobile-responsive modal
  • 🔧 Zero wallet connection required from payers

Advanced Usage

For custom implementations, the SDK also exports UniportModal, useUniportPayment hook, and core functions like getQuote and getExecutionStatus. See the source code for details.

License

MIT

About

Plug into any ecosystem from anywhere

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors