My Summer of Bitcoin Journey

A Developer's Path into Bitcoin Open Source Development

Who Am I

I am Gautam Manchandani, currently a CS sophomore student at BITS Pilani, India. I've been exploring the open source world for about 8 months now, diving deep into various technologies and contributing to different projects.

My journey in open source began with participating in events like Hacktoberfest and Winter of Blockchain, which fueled my passion for collaborative development and blockchain technology.

What is Summer of Bitcoin?

Summer of Bitcoin (SoB) is a global program focused on bringing more student developers into open source software development within the Bitcoin community. Students work with an open-source organization on a 12-week programming project during their summer break from school.

The program provides a unique opportunity to learn from experienced Bitcoin developers while contributing meaningfully to the Bitcoin ecosystem. It's similar to Google Summer of Code but specifically focused on Bitcoin development.

How I Got to Know About SoB

After my enriching experiences with Hacktoberfest and Winter of Blockchain during my first year of college, I was eager to find more open source programs similar to GSoC. That's when I discovered Summer of Bitcoin - a perfect blend of my interests in open source contribution and blockchain technology.

The program immediately caught my attention due to its focus on Bitcoin development and the opportunity to work with experienced mentors in the field. The possibility of diving deep into Bitcoin's technical aspects while contributing to real-world projects was exactly what I was looking for.

Application Process and Challenges

The application process for Summer of Bitcoin was intensive, spanning approximately 2.5 months with three distinct rounds:

Round 1: Initial Application

This round involved submitting basic details like college name, open source experience, and motivation for joining the program. Generally, applicants with basic experience get selected in this round.

Round 2: Technical Challenges

This round was particularly demanding compared to previous years. Instead of a single month-long challenge, we faced four weekly challenges with increasing difficulty. These challenges required studying the Grokking Bitcoin book and applying Bitcoin development concepts.

Round 3: Organization Selection & Proposals

After clearing the technical challenges, we had to select organizations, make contributions, and submit project proposals. This round tested both our technical abilities and our communication skills with mentors.

Weekly Challenges Overview

Week 1: Interacting with a Bitcoin Node

Learning to use Bitcoin Core's RPC to interact with a running Bitcoin node, creating and broadcasting transactions.

Week 2: Building a P2SH-P2WSH Multisig Transaction

Creating signed P2SH-P2WSH multisig transactions, calculating sighashes, and computing ECDSA signatures.

Week 3: Mining First Block

Simulating the mining process, validating transactions, and successfully mining them into a block.

Week 4: Parsing a Descriptor

Generating addresses from descriptors and calculating total balances by fetching transaction data from Esplora.

Fun fact: While simultaneously preparing for GSoC, I managed to complete all four challenges in just 3 days! It was a mix of hard work, luck, and assistance from LLMs (as I was new to Bitcoin development).

Organization Selection and Proposal Process

After completing the challenges, the proposal round began. This year featured more organizations than previous years, which made the selection process both exciting and challenging.

It took me about 4-5 days to thoroughly review all available projects before making my decision. I ultimately chose Shopstr - a Nostr-based marketplace client designed to enable private, peer-to-peer transactions using Bitcoin.

Why I Chose Shopstr:

  • The mentor, calvadev, was exceptionally helpful and responsive
  • I was able to establish a strong connection with the team
  • The mentor patiently answered my questions and provided valuable resources
  • The project aligned well with my technical interests and skill set

During the proposal period (approximately one month), I focused on making meaningful contributions to the project. I submitted around 4 pull requests for website enhancements, all of which were merged before the proposal deadline. This demonstrated my commitment and ability to contribute effectively to the project.

For the proposal itself, I thoroughly studied all available resources and the codebase. I also completed a competency test for the project, going beyond the required tasks after discussing with my mentor. Before final submission, I sent my proposal to the mentor for a quick review. He liked my approach and suggested a minor change, which I implemented before submission.

"May 5th was the date results were announced, and boom! My proposal got accepted!"

Final Results and Looking Ahead

I'm thrilled to announce that my proposal for the Summer of Bitcoin program was accepted! This marks the beginning of an exciting 12-week journey where I'll be working closely with the Shopstr team to develop and enhance their Nostr-based marketplace client.

Summer of Bitcoin Acceptance Email

My Summer of Bitcoin acceptance email

My Project: Payment Escrow and Processing

I'll be working on improving Shopstr's payment and order processing system. Currently, Shopstr handles payments and orders manually, requiring buyers to trust merchants and merchants to be online to handle orders. My project aims to reduce risks associated with transacting with pseudonymous merchants while streamlining order processing.

Expected Outcomes

  • Implementing P2PK time-locked Cashu tokens or HODL invoices to hold funds until each party confirms the necessary spending conditions
  • Creating a new UI to allow for the opening of disputes to be handled between the merchant and seller and an optional third-party
  • Developing an automated processor acting on behalf of the merchant to confirm payments and process confirmation and shipping messages

Skills Required

  • Next.js and TypeScript (preferred for type safety)
  • Nostr (knowledge of event structure and relay communication)
  • Cashu (understanding of minting and claiming)
  • Lightning (generating and handling invoices)

This opportunity will allow me to:

  • Gain hands-on experience with Bitcoin development
  • Contribute to a real-world project with real users
  • Work closely with experienced mentors like calvadev
  • Further develop my technical and collaboration skills

For those interested in learning more about my project or seeking guidance for future applications, check out these resources:

Advice for Future Applicants:

If you're considering applying to Summer of Bitcoin in the future,Jimmy here are a few tips from my experience:

  • Start early and familiarize yourself with Bitcoin concepts
  • Be proactive in making contributions to your chosen organization
  • Establish clear communication with potential mentors
  • Focus on quality rather than quantity in your contributions
  • Craft a detailed and well-thought-out proposal

Diving into the Internship: Mid-Term Reflections

With the acceptance email still fresh in my inbox, I embarked on my 12-week adventure with Shopstr. The first half was a whirlwind of learning, coding, and overcoming hurdles in Bitcoin's intricate world. Under the guidance of my mentor calvadev, I focused on building the foundation for secure, trustless payments—starting with P2PK time-locked Cashu tokens and an automated processor for payment and shipping confirmations.

The project kicked off smoothly, but as a newcomer to Cashu and Nostr protocols, I faced my share of struggles. Debugging mint support for NUT-11 extensions and ensuring seamless integration with Next.js took late nights and plenty of trial-and-error. Yet, these challenges were rewarding, teaching me the nuances of cryptographic escrow and real-time event handling.

Implementing P2PK Time-Locked Cashu Escrow

The core security upgrade in Shopstr’s new payment flow centers on leveraging Cashu’s P2PK (Pay-to-PubKey) time-locked tokens. Previously, buyers had to trust that sellers would deliver after payment, with no cryptographic guarantees. My implementation adds a 2-of-3 multisig escrow, using Cashu’s NUT-11 extension, to hold funds securely until transaction conditions are met.

To implement P2PK time-locked Cashu tokens as payment escrow in Shopstr, I focused on enabling both trustless order processing and automated dispute resolution. Traditionally, Shopstr required buyers to trust merchants directly, but my approach leverages Cashu’s P2PK (Pay-to-Pubkey) time-lock feature (NUT-11) to enforce escrow at the protocol level.

First, I extended merchant profiles with a P2PK configuration—adding fields like enabled, pubkey, locktime, and refund pubkeys. This allows each shop to opt-in to time-locked payments, specifying a lock period and refund recipients.

In the payment flow, when a buyer checks out, the app dynamically detects if the seller supports P2PK. If enabled, it builds the payment with the merchant’s public key, locktime, and refund keys. The Cashu mint’s info is checked for NUT-11 support (“Mint does not support P2PK (NUT-11)”), and payments are sent using the wallet’s send function with a p2pk parameter.

How it Works:

  • When a buyer pays, the app checks if the selected mint supports NUT-11 (P2PK). If not, the transaction is rejected (if (!mintInfo.nuts?.["11"]?.supported) { throw new Error("Cashu mint does not support P2PK escrow (NUT-11)"); }).
  • The payment splits tokens using the wallet.send call and attaches P2PK options:
    • pubkey: Seller’s pubkey.
    • locktime: Optional time-lock, so funds can be refunded if stuck.
    • refundKeys: Includes both the buyer’s and any fallback pubkeys.
    • pubkeys: Always includes the buyer, seller, and a designated arbiter (from environment: ARBITER_PUBKEY).
    • nSigs: Set to 2, requiring any two signatures to spend, enforcing “2-of-3” multisig.

Code example:

const p2pkOptions = {
  pubkey: p2pk.pubkey,
  locktime: p2pk.locktime,
  refundKeys: [...(p2pk.refund || []), buyerPubkey],
  sigflag: tags.find((t) => t[0] === "sigflag")?.[1] || "SIG_ALL",
  nSigs: 2,
  pubkeys: [buyerPubkey, ARBITER_PUBKEY]
}

This ensures that the funds can only be unlocked with signatures from two of the three parties, drastically reducing risk for both buyer and seller. If the seller is unresponsive, buyer and arbiter can refund; if the buyer is malicious, seller and arbiter can release; and after timeout, the buyer alone may reclaim.

UI updates provide clear “ Locked for X days” indicators for buyers, and a refund button is available if the lock expires and funds are not claimed, automating buyer protection.

This approach minimizes trust requirements, automates order handling, and sets the groundwork for dispute resolution by holding funds securely until conditions are met or refunds are triggered.

Automated Payment and Shipping Confirmation Processor

For my Summer of Bitcoin internship, I implemented an Automated Payment and Shipping Confirmation Processor for Shopstr to address manual order processing and trust issues between buyers and pseudonymous merchants. Traditionally, payments and order updates required merchant intervention, introducing risk and delays.

Approach: I introduced automation by leveraging the Nostr protocol for encrypted direct messaging. Upon successful payment, Shopstr now triggers a function (sendPaymentConfirmationMessage) that sends a digitally signed payment confirmation DM directly to the buyer’s Nostr pubkey, using the merchant’s key for authenticity. This function is invoked automatically after invoice or Cashu payment success, looping through each product in a cart or single product order, and includes vital details like order ID and payment amount.

Similarly, after the merchant ships the order, a separate function (sendShippingConfirmationMessage) automatically notifies the buyer with shipping confirmation over Nostr DM. Both functions wrap the event securely using ephemeral keys and encrypt the message before dispatch, ensuring privacy.

React components (CartInvoiceCard, ProductInvoiceCard, and Listing) handle state and trigger these messages automatically based on payment or shipping status, removing the need for manual merchant involvement.

Outcome: This approach automates order communication, reduces buyer risk, and sets the stage for integrating P2PK time-locked tokens or HODL invoices for escrow. It also lays the groundwork for future dispute resolution UIs, making Shopstr safer and more efficient for Bitcoin commerce.

Mid-Term Milestone and Learnings

Passing the mid-term evaluation was a huge boost! It validated my progress and motivated me for the second half. I learned invaluable lessons in Bitcoin-native commerce, from minimizing trust with cryptography to automating workflows in decentralized apps.

Summer of Bitcoin Mid-Term Evaluation Email

My mid-term evaluation congratulations email

Knock Knock BTC Here Email

Knock knock, BTC here!

Check out my contributions:

"Halfway through, and Shopstr is already more secure—excited for disputes and testing ahead!"

Wrapping Up: Final Evaluation and Reflections

As the internship entered its final stretch, the momentum from mid-term propelled me forward. The momentum from escrow and automation carried into building user-facing resolution tools and ensuring code reliability. Struggles persisted—like handling encrypted chat sorting and edge-case testing—but collaboration with calvadev turned them into triumphs.

This phase deepened my appreciation for Bitcoin's potential in e-commerce, blending cryptography with intuitive UIs for a seamless experience.

Dispute UI and Workflow

To complement cryptographic escrow, I built a full-featured Dispute UI to provide both transparency and recourse in the case of issues like non-delivery or fraud.

Key Features and Flow:

  • Opening Disputes: After purchase, buyers see an “Open a Dispute” button. Triggering this posts a Nostr event tagged to buyer, seller, and arbiter, with the order ID and reason.
  • Tracking Disputes: A dedicated “Disputes” tab in the UI lists all disputes involving the user. Each entry shows the order, parties, status, and the latest message.
  • Dispute Chat: Clicking a dispute opens a secure chat, implemented using NIP-59 (gift-wrap) encrypted Nostr messages. All parties can communicate, with messages sorted and decrypted in the client.
  • Arbiter Controls: If a case can’t be resolved amicably, the arbiter can “Rule for Buyer” or “Rule for Seller.” This triggers the partial signing of the escrowed tokens (using the arbiter’s Schnorr signature) and delivers the result to the winner for redemption. The UI disables further actions and updates the status.
  • Status Publishing: Each resolution is posted as a Nostr event (kind: 30007), so all clients update the dispute’s status in real time.

Code Example for Dispute Activation:

await activateDispute(nostr, signer, productData.d!, reason, userPubkey, productData.pubkey)

Code Example for Arbiter Ruling:

const { inputs, signatures } = await createPartialRedemption(dispute.escrowToken, signer)

Summary: By combining P2PK time-locked multisig with a rich Nostr-based dispute system, I built a workflow that minimizes trust, gives users clear recourse, and keeps all interactions cryptographically verifiable and censorship-resistant. This approach strengthens Shopstr’s security and user experience for Bitcoin-native commerce.

Boosting Codebase Reliability with Test Coverage

For my Summer of Bitcoin internship, I boosted our codebase’s reliability by setting up test coverage using Jest and React Testing Library. I configured Jest for Next.js, added essential test scripts, and wrote unit tests for our custom hooks like useNavigation and useTabs. These tests ensured our navigation and tab logic worked correctly across different scenarios. This process made our codebase more robust and maintainable for future development.

Journey's End: Outcomes and Gratitude

Completing the final evaluation felt surreal—a complainant to growth from Bitcoin novice to contributor. Shopstr now boasts trustless payments, automated processes, and dispute handling, all while being more reliable thanks to tests. This internship honed my skills in Next.js, Nostr, Cashu, and Lightning, and taught me the power of open-source collaboration.

сию
Stipend Payment Email

Stipend confirmation email

Explore my final contributions:

"From selection to stipend, this journey was transformative—grateful to Summer of Bitcoin and Shopstr!"

Internship Goodies: A Bitcoin Surprise!

Woohoo! As a delightful bonus for my Summer of Bitcoin internship, I received an awesome hardware wallet and some cool Bitcoin-themed goodies, all for free! This thoughtful gesture from the SoB team made the journey even more rewarding, giving me tools to securely dive deeper into the Bitcoin ecosystem.

Summer of Bitcoin Hardware Wallet

My Summer of Bitcoin Hardware Wallet

See Hardware Wallet Post on X
Bitcoin-Themed Goodies

Bitcoin-Themed Goodies from Summer of Bitcoin

See Goodies Post on X