Skip to content

f0i/btcgiftcards

Repository files navigation

Bitcoin Gift Cards

Create gift cards on btc-gift-cards.com!

Banner

🎁 A Simple Way to Gift Bitcoin

Bitcoin Gift Cards is a project designed to make gifting Bitcoin easy and accessible, serving as an introduction to ckBTC on the Internet Computer and the broader ICP ecosystem. Whether it’s for Christmas, a birthday, or any special occasion, this project provides a seamless way to share Bitcoin with others.

🚀 Key Features

  • No Wallet Required: Recipients can claim their gift cards using Google Sign-In, simplifying the process for newcomers.
  • Powered by ckBTC: Leverages the Internet Computer's ckBTC for secure and efficient transactions.
  • Easy Onboarding: Perfect for introducing new users to Bitcoin and the ICP ecosystem.

⚠️ Disclaimer: This project is under active development. Please avoid loading large amounts onto the gift cards.

🌐 Links

Features

  • Show account balances
  • Create gift cards
    • Assign an amount of ckBTC to be send with it
    • Specify recipient
    • Add custom message
    • Select gift card design
  • Verify email ownership
    • Show instructions how to log in with an email that is not associated with a google account
  • Show tips on what to do with the ckBTC
  • Custom domain
  • Preload images
  • Auto verify email address
  • Toast messages for success and error notifications
  • Lock submit buttons if requests are pending
  • Copy button to copy both html and text content of gift cards, to paste it to email or messanging apps

Local setup

Init toolchain:

mops toolchain init

Create and deploy canisters:

# create all canisters
dfx canister create --all`
# deploy ledger canisters
(cd external/ && ./setup_ledger.sh)
# build and deploy remaining canisters
dfx deploy

For frontend development run the vite server:

npm start

Now you should be to access the application and sign in.

To get some funds for testing, call the transfer function on the ledger and specify the deposit address shown on the account page.

# when prompted, input principal and subaccount as show inside the app
dfx canister call ckbtc_ledger icrc1_transfer

Run the following command to execute all tests:

npm run test

Architecture

C4 Diagrams

Roadmap

The following outlines the next features that are considered for implementation. All of those are subject to change based on user feedback, or changes in development resources.

March 2025 (completed)

During the Encode Culb Hackathon, BTC Gift Cards received a developer grant which also covered development of the following features.

  • Implement new design
  • Simplify account management
  • Automated testing
  • Documentation

Further plans

  • Automate sending emails (most likeley needed at some point, currently still manual)
  • Add redeem by code (without email verification)
  • Lightning integration to deposit/withdraw ckBTC

Obsolete

  • Shortcut to transfer gift card balance to main account
    • Not relevant as there is only one account for both gift cards and deposits.
  • Progress indicator for ckBTC minter
    • Minting ckBTC has been removed. Users should use the NNS to convert between ckBTC and Bitcoin.
  • Secure account by creating an II (To introduce new users to Internet Identity, which is widely used by apps on the IC)
    • Does not add much value for the app and makes it more confusing for new users. Users can learn about II by getting introduced to the NNS and other dApps on the IC.

About

Bitcoin Gift Cards: onboard users by sending Bitcoin to their email address.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors