Network: Bitcoin Cash Chipnet | CashTokens | CashScript covenants
A non-custodial NFT marketplace on Bitcoin Cash. Listings, auctions, royalties and related trades are enforced with CashScript covenants. Keys stay with the user. The public demo runs on BCH Chipnet, not mainnet.
Live demo: bazaar-three-gamma.vercel.app
Developed with the BCH-1 Hackcelerator.
- Fixed-price listings: NFT and BCH payment settle in a single atomic swap
- English auctions: time-locked bidding with automatic refunds for outbid bidders
- Creator royalties encoded in the covenant (configurable, including a 0-25% range in the original marketplace contract)
- NFT minting, collections and scheduled drops
- Fractionalised NFTs (
fractional-vault.cashandfractional-claims.cash) - Instant sell, which tries collection bids first and can fall back to a pool offer
- Floor sweep, so a collector can buy several of the cheapest listings in one flow
- BCMR metadata badges when a collection publishes a registry URL
- Activity feed and address-based profile pages
- Nexus / Bazaar SDK for floor prices, listings, instant sell, bids and related market data
- In-app HD wallet (BIP39 / BIP32), with WalletConnect support when a project id is set
- Non-custodial signing in the browser
- IPFS metadata storage via Pinata
- Blockchain: Bitcoin Cash Chipnet
- Token standard: CashTokens (CHIP-2022-02)
- Contracts: CashScript (cashc / cashscript)
- Frontend: Next.js 15 (App Router), React 19, TypeScript
- Styling: Tailwind CSS, Framer Motion
- State: Zustand
- IPFS: Pinata
- Wallet:
@scure/bip39,@scure/bip32,@bch-wc2/web3modal-connector - Network: Electrum (Chipnet)
npm install
cp .env.example .env.local
# Fill PINATA_JWT and any other values you need. Variable names only; do not commit secrets.
npm run devThen open http://localhost:3000.
- Create a wallet in the app.
- Copy the address.
- Use the Chipnet faucet at tbch.googol.cash for tBCH.
Copy .env.example (and, if you use it, .env.local.example) to .env.local. Names used in those files:
PINATA_JWTNEXT_PUBLIC_PINATA_GATEWAYNEXT_PUBLIC_PINATA_UPLOAD_TIMEOUT_MSPINATA_TIMEOUT_MSNEXT_PUBLIC_ELECTRUM_HOSTNEXT_PUBLIC_ELECTRUM_PORTNEXT_PUBLIC_ELECTRUM_SCHEMENEXT_PUBLIC_ELECTRUM_SERVERSNEXT_PUBLIC_ELECTRUM_TIMEOUT_MSNEXT_PUBLIC_ELECTRUM_PING_MSNEXT_PUBLIC_NETWORKMARKETPLACE_INDEX_CACHE_MSWALLET_CACHE_MSWALLET_TIMEOUT_MSWALLET_MAX_RETRIESNEXT_PUBLIC_MARKETPLACE_FEE_PERCENTNEXT_PUBLIC_DEFAULT_ROYALTY_PERCENTNEXT_PUBLIC_LISTING_INDEX_ADDRESSNEXT_PUBLIC_LISTING_INDEX_PKHNEXT_PUBLIC_WALLETCONNECT_PROJECT_ID
Do not commit filled env files or API tokens.
src/
├── app/ # Next.js App Router pages
│ ├── page.tsx # Landing page
│ ├── explore/ # Marketplace gallery
│ ├── create/ # Mint and list
│ ├── collections/ # Collections
│ ├── drops/ # Scheduled drops
│ ├── nft/[id]/ # NFT detail and buy
│ ├── auction/[id]/ # Live auction and bidding
│ ├── fractionalized/ # Fractionalised NFTs
│ ├── activity/ # Activity feed
│ ├── profile/[address]/ # Address profile
│ └── api/ # Server routes (wallet, marketplace, instant-sell, and others)
├── components/
├── lib/
│ ├── bch/ # Wallet, Electrum, contracts, indexer
│ ├── nexus-sdk/ # Marketplace SDK
│ ├── ipfs/
│ └── store/ # Zustand stores
contracts/
├── marketplace.cash
├── marketplace-v2.cash
├── auction.cash
├── auction-state.cash
├── instant-sell.cash
├── collection-bid.cash
├── fractional-vault.cash
├── fractional-claims.cash
└── p2pkh.cash
nexus-sdk/ # Zero-dependency TypeScript client sources
More detail is in docs/features.md and BAZAAR_FEATURES.md.
Marketplace(sellerPkh, price, creatorPkh, royaltyBasisPoints)
├── buy() → Atomic swap: NFT to buyer, BCH to seller, royalty to creator
└── cancel() → Seller reclaims the NFT (requires signature)
Auction(sellerPkh, minBid, endTime, creatorPkh, royaltyBasisPoints, minBidIncrement)
├── bid() → Place a higher bid and refund the previous bidder
├── claim() → Winner claims the NFT after timeout (pays seller and royalty)
└── reclaim() → Seller reclaims if there are no bids after timeout
- Network: Bitcoin Cash Chipnet (testnet)
- Electrum: chipnet.imaginary.cash:50004
- Explorer: chipnet.chaingraph.cash
- Faucet: tbch.googol.cash
- Address format:
bchtest:... - Mainnet launch is not claimed here
npm run dev # Development server
npm run build # Production build
npm run start # Production server
npm test # Jest testsMIT