Terms and Conditions
- I agree to the Grant Agreement terms if funded
- I agree to Provide KYC information if funded above $50,000 USD
- I agree to disclose conflicts of interest
- I understand that this grant program is only eligible for completed work, as it is a retroactive grant program. Applications for planned or partially completed work will not be considered. All completed work will be verified and accepted by its intended users or their representatives, who will confirm that the outputs meet the required quality, functionality, and usability before the work is listed as an option for Coinholder voting.
- I agree that for any new open-source software, I will create a CONTRIBUTING.md file that reflects the high standards of Zcash development, using the
librustzcashstyle guides as a primary reference. - I understand when contributing to existing Zcash code, I am required to adhere to the project specific contribution guidelines, paying close attention to any merge, branch, pull request, and commit guidelines as exemplified in the librustzcash repository.
- I understand all grants are valued in USD but will be disbursed in Shielded ZEC. I acknowledge and accept that disbursement amounts may fluctuate based on the ZEC/USD exchange rate at the time of payment.
Application Owners (@octocat, @octocat1)
@mikemoulder
Organization or Individual Name
Michael
Additional Team Members
None
How did you learn about the Lockbox: Coinholder Retroactive Grants Program?
I saw it on X (Twitter)
Requested Grant Amount (USD)
$13326
Category
Infrastructure
Project Summary
ZecPy is an open-source Python SDK that enables developers to integrate Zcash shielded payments and privacy-preserving financial functionality into new and existing Python applications without having to rewrite their systems in another language or independently implement complex cryptographic infrastructure. It combines an accessible Python API with a native Rust core built on the Zcash ecosystem, providing reusable infrastructure for payment systems, merchant platforms, financial applications, automation tools and AI agents.
Project Description
ZecPy is an open-source Python SDK designed to make Zcash privacy infrastructure accessible to developers building applications in Python.
Python has an enormous ecosystem of existing software, including financial applications, payment systems, merchant platforms, automation tools, AI agents, backend services and data applications. Many of these applications already have functioning foundations. They should not need to abandon those foundations, rewrite their systems in another language or become cryptography experts just to introduce private payments.
ZecPy addresses this gap by providing a reusable Python interface to Zcash shielded payment functionality. Its goal is to make privacy-preserving transactions accessible through familiar Python workflows while relying on established components of the Zcash ecosystem for the underlying cryptographic operations.
The implementation combines a Python-facing SDK with a native Rust core built using PyO3 and the Zcash Rust ecosystem, including librustzcash. This approach keeps the developer experience accessible while delegating cryptographic and protocol-level operations to native components rather than attempting to reimplement them in Python.
The completed implementation provides functionality for creating, restoring, opening and managing wallets; synchronising wallet state; retrieving balances, addresses and transaction information; constructing and managing payment proposals; sending shielded transactions, including batch payments; and working with ZIP-321 payment requests. It also includes invoice functionality, watch-only wallet capabilities and support for cold-signing workflows using Partially Created Zcash Transactions (PCZTs).
Privacy is a central design consideration rather than an optional feature added after implementation. ZecPy incorporates controls around transparent payments and pool crossings, requiring explicit user opt-in rather than silently introducing potentially privacy-reducing behaviour. Its networking and synchronisation design also seeks to minimise unnecessary identifying information disclosed to remote infrastructure. This includes a custom synchronisation approach, Tor-based connectivity, isolated circuits for selected network operations and a fail-closed request classification mechanism for identifying lightwalletd requests.
The work also included testing and practical validation beyond simply exposing API methods. This involved automated tests, local-chain and development-network testing, privacy-oriented request analysis, documentation and a working demonstration of merchant payment workflows. These exercises helped evaluate how the SDK behaves in realistic application scenarios, including watch-only merchant wallets, offline signing, invoice payments, confirmation handling and controlled memo retrieval.
The project has been published as an open-source Python package, with a public source repository, developer documentation, release artifacts and a live demonstration. The completed implementation is an early-stage release and has not undergone an independent security audit. It is intended to establish a functional foundation that Python developers can experiment with, integrate and build upon.
The broader objective behind ZecPy is to provide a dependable privacy infrastructure layer for the Python ecosystem. By reducing the technical barriers to integrating Zcash, the project aims to make shielded payments and privacy-preserving financial functionality practical for a much wider range of existing applications and developers.
Technical Approach (how you did it)
ZecPy was developed using an incremental engineering approach, beginning with research into the Zcash protocol, its existing Rust infrastructure and the requirements for exposing shielded payment functionality through a Python interface.
The initial research and experimentation began on October 10, 2026. Public repository development began on October 24, 2026, with the implementation progressing through October 28, 2026. The work was carried out independently by a single developer.
- Research and architectural design
The first stage involved examining the existing Zcash developer ecosystem, particularly librustzcash, lightwalletd and the available transaction-construction and wallet-management interfaces. The objective was to identify which existing components could be safely reused and how they could be exposed through a Python SDK without duplicating cryptographic implementations.
The resulting architecture separates the developer-facing Python interface from the native Rust implementation. This allows Python applications to interact with Zcash functionality through familiar methods while native components handle protocol-level and cryptographic operations.
- Native Rust integration
The native layer was implemented in Rust and connected to Python using PyO3. It integrates with the existing Zcash Rust ecosystem, including librustzcash, for operations requiring native protocol and cryptographic functionality.
This approach was selected to reuse established Zcash infrastructure rather than create independent implementations of sensitive cryptographic operations.
- Python SDK and wallet functionality
A Python-facing API was developed to expose wallet creation, restoration, opening and watch-only functionality. Additional methods were implemented for wallet synchronisation, balance retrieval, address management, transaction queries, payment proposals, batch payments and transaction broadcasting.
The SDK also incorporates ZIP-321 payment request parsing and payment workflows, invoice management, memo retrieval and sweep functionality.
- Transaction construction and signing
The transaction workflow was designed to support both ordinary application-driven payments and more controlled signing environments.
PCZT-based workflows were implemented to support offline signing, allowing transaction preparation and signing to be separated. Signed transactions can subsequently be broadcast through the SDK.
- Privacy-oriented networking and synchronisation
Privacy was treated as an architectural requirement throughout development.
The synchronisation implementation uses a custom approach designed to avoid unnecessary identifying queries, including reliance on GetAddressUtxos and GetTaddressTxids. Synchronisation also incorporates saved tree-state information to support incremental progress, with block birthday alignment to 10,000-block boundaries.
Tor-based connectivity was incorporated for network operations, with isolated circuits used for synchronisation and transaction broadcasting. The implementation avoids silently falling back to direct connections when Tor connectivity is unavailable.
A request-classification mechanism was also implemented around lightwalletd communication. It classifies requests as public, coarse, broadcast or identifying. Unknown methods are treated as identifying by default, providing a fail-closed approach to privacy classification.
- Testing and validation
Testing was conducted through automated tests, local-chain testing and development-network exercises.
A privacy-oriented report was produced from Regtest experiments conducted on October 24, 2026. It compared request behaviour across ZecPy, zcash-devtool and zingo-cli under five test scenarios. ZecPy generated zero requests classified as identifying in those scenarios. This result is limited to the tested configurations and does not independently establish network-level anonymity or prove the effectiveness of Tor protection.
A separate testnet exercise conducted on October 25, 2026, documented a merchant payment workflow involving a watch-only shop wallet, offline signer, invoice creation, payment confirmation, opt-in memo retrieval and cold-signed refund. It also tested an AI-agent payment workflow with a maximum spending cap.
- Packaging, documentation and release
The implementation was packaged as a Python library and published to PyPI. Developer documentation, architecture documentation, testing evidence and a live demonstration were also made available.
The public repository records the initial commit on October 24, 2026, and the latest commit in the completed work period on October 28, 2026. The project reached version 0.1.1 during this period.
The resulting implementation provides a working foundation for Python developers to experiment with and integrate Zcash shielded payment functionality. It remains an early-stage release and has not undergone an independent security audit.
Time Period of Work Completion
October 10, 2026 – October 28, 2026
Total Budget (USD)
$13326
Budget Breakdown
Compensation: $13,300
Justification: Compensation for the project lead's independent engineering and research contribution, covering approximately 342 hours of work between October 10 and October 28, 2026. This includes architectural design, Rust and Python development, Zcash integration, privacy-oriented networking, testing, documentation, packaging and release.
Technology/Software: $20
Justification: Claude subscription costs attributable to the development process, used as an AI-assisted software development tool.
Infrastructure/Hosting: $6
Justification: VPS hosting costs used to support the development and testing process.
Services/Contractors: $0
Justification: All project work was completed independently without external contractors or paid engineering services.
Other: $0
Total Budget: $13,326
Previous Funding
No
Previous Funding Details
No response
Other Funding Sources
Yes
Other Funding Sources Details
ZecPy has a separate pending funding application with Zcash Community Grants (ZCG), requesting $43,650 to support a proposed three-month development phase scheduled for January 10 to April 10, 2027.
The ZCG application covers future development activities, including expanding the SDK, improving reliability, strengthening privacy and security testing, and improving developer readiness.
This retroactive grant request is separate and covers the engineering and research work already completed between October 10 and October 28, 2026. The two applications cover distinct work periods, deliverables and budget items. No expenses or completed work are being claimed twice.
Success Metrics
ZecPy has delivered an initial, publicly accessible Python SDK that makes Zcash shielded payment functionality available through a familiar Python development interface.
The completed work provides measurable value to the Zcash ecosystem in the following areas:
-
Developer accessibility: Published an installable Python package on PyPI, with version 0.1.1, enabling Python developers to experiment with Zcash functionality without building their own Rust integrations or cryptographic implementations.
-
Functional coverage: Implemented wallet creation and restoration, synchronisation, balance and transaction queries, payment proposals, batch payments, ZIP-321 payment requests, invoices, memo retrieval, transaction broadcasting and PCZT-based offline signing workflows.
-
Privacy-oriented networking: Implemented request classification for lightwalletd communication, with unknown methods treated as identifying by default. The synchronisation design also avoids certain unnecessary identifying queries.
-
Privacy testing: A Regtest comparison conducted on October 24, 2026, tested ZecPy, zcash-devtool and zingo-cli across five scenarios. ZecPy produced zero requests classified as identifying in those scenarios, compared with seven for zcash-devtool and 71 for zingo-cli. These results reflect the tested configurations and do not establish complete network anonymity or independently verify Tor protection.
-
Practical payment validation: A testnet exercise on October 25, 2026, demonstrated a merchant payment workflow involving a watch-only wallet, offline signer, invoice generation, payment confirmation, opt-in memo retrieval and cold-signed refund. It also demonstrated an AI-agent payment workflow with a maximum spending cap.
-
Testing and reliability: Established an automated test suite with 78 tests against local-chain and development-network environments, providing a foundation for continued validation and improvement.
-
Public availability and documentation: Released the source code publicly under open-source licences, published developer documentation and architecture notes, and made a live demonstration available for evaluation.
The broader ecosystem impact is the creation of reusable Python infrastructure that can lower the barrier for new and existing payment systems, merchant platforms, financial applications, backend services and AI agents to experiment with Zcash shielded payments. Rather than requiring every application developer to independently understand and integrate the underlying Rust cryptographic stack, ZecPy provides a common starting point that other developers can inspect, test and extend.
Proof of completion
Repository / Source Code: https://github.com/mikemoulder/zecpy
Release / Published Package: https://pypi.org/project/zecpy/
Developer Documentation: https://zecpy.pages.dev/docs/
Architecture Documentation: https://github.com/mikemoulder/zecpy/blob/main/docs/architecture.md
Privacy Testing Report: https://github.com/mikemoulder/zecpy/blob/main/docs/privacy-report.md
Testnet Demonstration Report: https://github.com/mikemoulder/zecpy/blob/main/docs/testnet-run.md
Live Demonstration: https://zecpy-live.pages.dev/
Initial Public Commit: https://github.com/mikemoulder/zecpy/commit/0d208df741477263e430f7fcbee9550024b16283
Latest Commit During Completed Work Period: https://github.com/mikemoulder/zecpy/commit/f0b79c9289ff59f0b93007d4e2040ce88bf9bbfa
Conflict of Interest Disclosure
I am the sole developer, project lead and primary contributor to ZecPy. I am therefore directly interested in the outcome of this funding request, as the requested compensation is intended to recognise my own engineering and research contributions.
I have no known financial or organisational conflicts involving the grant reviewers, decision-makers or other parties responsible for evaluating this application.
A separate Zcash Community Grants application for future ZecPy development is currently pending. This has been disclosed in the funding sources section. The two applications cover distinct work periods and deliverables, and I am not requesting duplicate funding for the same work or expenses.
Community Forum Posting
- I understand it is my responsibility to post a link to this issue on the Zcash Community Forums after this application has been submitted so the community can give input. I understand this is required in order for the community to discuss and vote on this grant application. Note: If you are unable to post on the forum (for example, due to new user restrictions), please leave a comment below, and we will adjust your posting permissions.