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.

Use these docs from your AI tools

  • Index/llms.txt lists every page with a one-line summary
  • Everything/llms-full.txt has every page in one file
  • Any pageappend .md to its URL, or ask for it with Accept: text/markdown
  • Skillnpx skills add bitfalt/paralock teaches a coding agent the SDK and its safety rules
  • MCP serverhttps://paralock.xyz/mcp is read-only and keyless, with list_docs, read_doc, search_docs and get_deployments
claude mcp add --transport http paralock https://paralock.xyz/mcp
codex mcp add paralock --url https://paralock.xyz/mcp
.cursor/mcp.jsonJSON
{
  "mcpServers": {
    "paralock": { "url": "https://paralock.xyz/mcp" }
  }
}
.mcp.jsonJSON
{
  "mcpServers": {
    "paralock": { "type": "http", "url": "https://paralock.xyz/mcp" }
  }
}
gemini mcp add --transport http --scope user paralock https://paralock.xyz/mcp
pi mcp add paralock --url https://paralock.xyz/mcp

Claude Desktop and claude.ai, OpenCode, Windsurf (now Devin Desktop), Zed, Cline and the details for each: For AI agents.

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 isVersionStatus
@paralock/sdkcreateTaker and createMaker, both swap modes, crash-safe persistence, recovery, quote validation, maker limits, an HTTP maker API0.3.2Shipped
@paralock/zcashZcash HTLCs and 2-of-2 locks, v5 transactions, ZIP 244 signing, ZIP 317 fees, a Zebra RPC client. Browser-safe0.3.2Shipped
@paralock/adaptorECDSA adaptor signatures on secp256k1 with DLEQ proofs. Browser-safe0.1.4Experimental
@paralock/evmviem clients for both escrows and a verified network registry0.3.2Shipped
@paralock/lightwalletdA Zcash backend over a lightwalletd or Zaino server, so you don't run a full node0.1.3Shipped
paralock CLInpx paralock: doctor, dev, devnet, maker, swap, pay, swaps, resume, refund. A one-command local devnet with Zcash regtest and up to six EVM chains0.3.2Shipped
Rust SDKparalock on crates.io: taker and maker engines, Zcash RPC and lightwalletd backends, durable stores, the maker HTTP server and client. Built on paralock-core (the protocol core, also for wasm32) and paralock-evm (alloy clients). Wire-compatible with @paralock/sdk0.1.1Shipped
Rust CLIparalock-cli: a standalone paralock binary for swaps, payments, recovery and a maker on any network, configured by paralock.toml. Prebuilt for macOS and Linux0.1.1Shipped
ContractsParalockHTLC and ParalockAdaptorEscrow, deployed and source-verified on Tempo Moderato, Base Sepolia, Sepolia, Arbitrum Sepolia, Robinhood Chain Testnet and HyperEVM TestnetTestnets only
Protocol specThe wire protocol, both flows and the safety rules, with cross-language test vectors in spec/vectorsv1.1Draft
ExamplesTypeScript: quickstart, payroll, sell-a-secret on the devnet, and testnet on public testnets. Rust: six in examples/rustShipped
Web appPay with payment links, and Swap, at /appShipped
Agent docsA skill, llms.txt, Markdown pages and an MCP serverShipped

The npm packages are at 0.3.2 (0.3.0 was the CLI's first npm release), and features this site marks "in 0.3.0" need 0.3.0 or newer. They are ESM-only and need Node.js 20 or newer; @paralock/zcash, @paralock/adaptor and @paralock/evm also run in browsers. The Rust crates are published on crates.io at 0.1.1.

Shell
npm install @paralock/sdk     # also installs @paralock/zcash, /evm and /adaptor
npx paralock dev              # a local devnet and a maker
npx paralock swap --zec 1     # your first swap on it

Rust

The same protocol is published in Rust, as four crates on crates.io:

  • paralock: the Rust SDK. Embed a taker or a maker (served with axum) in a Rust service, with no Node.js process. It interoperates with the TypeScript SDK on the wire.
  • paralock-core: the protocol core. Pure and synchronous (no I/O), byte-for-byte equal to the TypeScript packages on the shared vectors in spec/vectors, and it builds for wasm32.
  • paralock-evm: alloy clients for both escrows, Tempo fee tokens and the verified network registry.
  • paralock-cli: the standalone paralock binary.
Shell
cargo add paralock --features evm,price-feed        # the SDK, with the builders that connect to RPC URLs
curl -fsSL https://paralock.xyz/install | sh        # or the binary: cargo install paralock-cli

See Rust SDK and Rust CLI.

Status

FeatureStatus
htlc mode, end to end on the devnet and on public testnets (first runs)Shipped
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
Rust SDK, protocol core and paralock binary on crates.ioShipped
MainnetNot supported; only after an audit

Swaps currently run in one direction: the taker sells ZEC for stablecoins. Refunds pay a transparent Zcash address. The roadmap lists what is shipped, in progress, next and in research, with the reason for each.

Where to go next