Documentation

Getting started

View as Markdown

Introduction

What Paralock is, who it is for, and what ships in the repository today.

Paralock lets you swap shielded ZEC for stablecoins, or pay someone an exact dollar amount from shielded ZEC, with no bridge, custodian or wrapped token in between. Settlement happens on the two native chains: Zcash on one side and an EVM chain on the other.

ChainStablecoin
TempoOUSD
Base, Ethereum, Arbitrum, HyperEVMUSDC
Robinhood ChainUSDC on the devnet; a 6-decimal MockUSD test token on Robinhood Chain Testnet, which has no USDC

Where Paralock works lists every network, Zcash backend and wallet in detail.

Two locks, one key

A swap has two parties. The taker has ZEC and wants dollars. The maker holds stablecoins, quotes a price and earns a spread. Each of them locks funds on their own chain, and one secret opens both locks:

  1. The taker picks a secret and keeps it to itself.
  2. The taker locks ZEC on Zcash. Only the maker can take it, and only with the secret. If nobody takes it by block N, the taker gets it back.
  3. The maker checks that lock, then locks stablecoins on the EVM chain. The taker can take them with the secret before time T. After T, the maker gets them back. T comes well before block N.
  4. The taker claims the stablecoins. Claiming makes the secret public.
  5. The maker uses the now-public secret to claim the ZEC.

Either both sides settle or both refund. The Zcash script and the EVM contract enforce this, not a person or a company. How it works walks through every step, both modes and every failure case.

Paralock has two modes:

  • htlc (hash time-locked contract): the secret is a 32-byte preimage, and the same sha256 hash locks both chains.
  • adaptor (private mode, experimental): the ZEC sits in an ordinary 2-of-2 multisig, the EVM escrow releases on a signature, and the secret is hidden inside ECDSA adaptor signatures. No hash or other shared value appears on either chain.

Who it is for

  • Wallets: add "pay in dollars" to a Zcash wallet. Users spend shielded savings anywhere stablecoins work, without an exchange account.
  • Apps and shops: accept payment from ZEC holders and receive exact dollars through a payment link. You never touch ZEC.
  • Agents: an AI agent that holds ZEC can buy dollars just in time to pay for an API. See For AI agents.
  • Makers: run the other side of the swap, provide stablecoin liquidity and earn the spread. See Run a maker.

The SDK is a public good under the MIT license. The business model is running the maker: it quotes the price and earns the spread on every swap it fills. The protocol is symmetric, so anyone running the SDK can be a maker, including peer to peer.

What's in the box

ComponentWhat it isStatus
@paralock/sdkcreateTaker and createMaker, both swap modes, crash-safe persistence, recovery, quote validation, maker limits, an HTTP maker APIShipped (0.2.0)
@paralock/zcashZcash HTLCs and 2-of-2 locks, v5 transactions, ZIP 244 signing, ZIP 317 fees, a Zebra RPC client. Browser-safeShipped (0.2.0)
@paralock/adaptorECDSA adaptor signatures on secp256k1 with DLEQ proofs. Browser-safeExperimental (0.1.1)
@paralock/evmviem clients for both escrows and a verified network registryShipped (0.2.0)
@paralock/lightwalletdA Zcash backend over a lightwalletd or Zaino server, so you don't run a full nodeShipped (0.1.0)
ContractsParalockHTLC and ParalockAdaptorEscrow, deployed on Tempo Moderato, Base Sepolia, Sepolia, Arbitrum Sepolia, Robinhood Chain Testnet and HyperEVM TestnetShipped (testnets only)
CLIparalock doctor, dev, devnet, maker, swap, pay, swaps, resume, refund: a one-command local devnet with Zcash regtest and up to six EVM chainsShipped
Examplesquickstart, payroll, sell-a-secret on the devnet, and testnet on public testnetsShipped
Web appPay with payment links, and Swap, at /appShipped
Agent docsA skill, llms.txt, Markdown pages and an MCP serverShipped

All five packages are on npm, ESM-only and need Node.js 20 or newer. @paralock/zcash, @paralock/adaptor and @paralock/evm also run in browsers.

Shell
npm install @paralock/sdk   # pulls in @paralock/zcash, @paralock/evm and @paralock/adaptor

Status

FeatureStatus
htlc mode, end to end on the devnetShipped
Private mode (adaptor signatures)Experimental
Privacy hygiene: shield before and after, fresh recipient, relayed claim, standard amounts, jitterShipped
Fully shielded Zcash leg (FROST)In research
Testnet deployments on six EVM testnetsShipped
MainnetNot supported

Swaps currently run in one direction: the taker sells ZEC for stablecoins. Refunds pay a transparent Zcash address. The roadmap adds the reverse direction, refunds straight to a shielded address, Solana, a network of competing makers, and a hosted testnet maker before any mainnet launch.

Where to go next