Zcash Integration Guide

Summary

Zcash is based on Bitcoin, and has a superset of functionality, both in the protocol and the RPC interface. This document describes Zcash integration into services and products. For help building and testing Zcash, see the User Guide.

Address Types

Zcash transparent addresses, aka T-addrs, are very similar to Bitcoin addresses. Zcash also provides Z-addrs which are used for sending and receiving private funds, with transactions cryptographically protected with Zero-Knowledge proofs. T-addrs all begin with a t… prefix whereas Z-addrs always begin with a z… prefix.

Bitcoin API

The zcash daemon, zcashd, presents the same kind of RPC interface as Bitcoin Core, and this interface (see Bitcoin RPC reference) provides a very similar Bitcoin API calls, which we call the Bitcoin API. Transactions which do not involve Z-addrs (and thus the zeroknowledge privacy layer) can be created with this API just as for Bitcoin.

This API can be used for advanced Bitcoin transactions, just as in Bitcoin Core, such as multisig transactions.

Zcash Payment API

In addition, zcashd adds the Payment API (see Zcash Payment API reference), which is documented in our repository along with each release. This is a high-level API that simplifies the common use cases of transfers. This API can send from or to (some) T-addrs and Z-addrs through the z_sendmany call.

This API does not yet support advanced Bitcoin transaction types, such as multisig.

Integration Path

There are two approaches to integrating a service or product with Zcash: the Bitcoin-compatible approach, and the Zcash API approach. The Bitcoin-compatible approach is convenient for deployments that already use Bitcoin Core, because the API is (almost) identical. Alternatively, if new integrations are being developed, using the Zcash API may be simpler for most use-cases.

Services that use the Zcash API can send to- and receive from- both Z-addrs and T-addrs. One current drawback is that this API does not support multisig transactions. Services that use the Bitcoin-compatibility approach can only send or receive to/from T-addrs. Users can still maintain privacy even in this case, so the primary drawback is one of usability.

A service that supports both Z-addrs and multisig will use the Zcash API for all transactions except multisig, in which case it will use the Bitcoin API.

Contact Us

A low-level JSON-RPC API to support Zcash primitives is expected in Q1 2017. If you currently use the Bitcoin transaction or blockchain formats/protocol directly instead of bitcoind, or if you use a different bitcoin node/library such as Bitcore, please contact our engineering team for technical assistance.