← Back to Cuadre

Guide · updated November 25, 2026

Xpub: get paid in crypto without handing over your keys

Getting paid in crypto has one awkward requirement: somebody has to know the money arrived. There are two ways to solve it — hand your keys, or your seed, to a service that moves funds for you, or hand over only a public key that is good for watching. The second one is called an xpub, an extended public key, and it is what Cuadre uses. This guide explains what it actually is, what it can and cannot do with your money, what it reveals if it leaks, and how it ends up giving every invoice its own address while your private keys stay in your wallet.

What an xpub is, in one sentence

A wallet does not store addresses: it computes them. The seed produces private keys, each private key produces its public key, and the public key produces the address. That computation has a property that everything else here rests on: there is a level —the account— where the public half of that chain can be stored and, from there, every child address computed without holding a single private key. That piece is the xpub.

It is called «extended» because it is not just a public key: it carries the chain code that allows child keys to be derived by index. That is why one xpub replaces a thousand addresses copied by hand, and why the same pair —xpub and index— always yields the same address: it is deterministic math, not a list stored somewhere.

The format is easy to spot: it starts with xpub, ypub, zpub or tpub followed by a long base58 block. The equivalent extended private key starts with xprv, and that one does sign: two similar-looking strings that do radically different things.

What an xpub can and cannot do

An xpub lets youAn xpub does NOT let you
Derive any child address of that account, by indexSign a transfer: that needs the private key
Read the balance of each of those addressesMove, sweep or consolidate funds
Tell that a payment arrived, when and how muchChange the destination of a payment or redirect it
Reproduce the same address later, on another machineRecover the seed or any private key

The asymmetry is the whole argument: an xpub lets you see and does not let you touch. A service that asks for the seed or the private key does not need it to reconcile deposits; if it asks, it is because it wants to be able to move funds, and that is custody under another name.

How Cuadre uses it, line by line

It is worth taking this down to the code, because «we are non-custodial» is a sentence anyone can put on a landing page. In the engine the sequence is this:

The cost of this design is that the system is read-only: it cannot refund an overpayment, cannot sweep the addresses into your main wallet and cannot convert anything. That is the price of not holding keys, and it is paid in manual work, not in risk.

What an xpub does reveal, and why it is not published

Here is the part almost nobody explains. An xpub cannot steal, but it can spy: with it you compute every address of that account —the ones you already used and the ones you will use— and read the balance of each. Anyone holding your xpub can rebuild how much you collected, when, and to which addresses, without asking permission.

Three practical rules follow. First: the xpub is not published and not committed anywhere; in Cuadre it lives in a protected local file and never travels in an API response —/health reports whether it is loaded, the path and the contract, never the key itself—. Second: a dedicated account for collecting, separate from savings, keeps the xpub of the tool from exposing the history of your other addresses. Third: if you share an xpub to test something, do it with an account you can rotate, because that history cannot be un-seen.

How it gets loaded, and what is checked

Loading is not a web form: on the operator's installation you run ./scripts/load-xpub.sh evm xpub6…, which validates the base58 format, backs up the previous master.json with a timestamp, writes the xpub, turns demo mode off, recreates the container and checks that /health answers 200 and that derivation returns an address. For Tron it is the same idea with tron and the m/44'/195'/0'/0 path, stored in the TRON_XPUB variable.

On EVM the reference path is m/44'/60'/0'/0: the account xpub, and from there children by index. If you export an xpub from a different level, the addresses you get are not the ones your wallet will show when the money arrives, so the path matters more than it looks.

And if the Tron rail has no xpub loaded, creating an invoice with chain=trc20 answers 503 with trc20 sin configurar: it refuses to issue rather than send money to an address with no owner. It is the same logic as demo mode, applied rail by rail.

The four questions to ask any service that wants an xpub

This is as useful for evaluating Cuadre as for evaluating anyone else: if a service wants access to your wallet, these four answers separate watch-only from custody with better branding.

  1. What exactly am I handing over? If the answer includes a seed phrase of twelve or twenty-four words, or a private key, there is no way around it: that service can move your money.
  2. At what level is the xpub? It has to be the account (m/44'/60'/0'/0 on EVM), not the wallet root and not a single address. A single address derives nothing, and the root exposes more than needed.
  3. Can it sign with what I gave it? The right answer is no, and it can be checked: with no signing function in the code, there is no way for it to move funds.
  4. Where does that xpub live and what does it show? A local file with permissions, or someone else's database; and the full history of that account, which is what the xpub reveals.

When an xpub is not enough

An xpub solves collection, not the whole operation. These are the real limits, stated plainly:

Checklist before connecting a wallet

Reserve a founding seat · US$24 See the four plans

Frequently asked questions

Can someone move my money with my xpub?

No. An xpub is an extended public key: it derives deposit addresses and reads balances, it does not sign. Signing a transfer requires the private key, which never exists on the server. Cuadre has no signer at all: the engine reads the balance of the invoice address with usdcBalance and nothing else.

What does an xpub reveal if it leaks?

Every address of that account, past and future, and with them the history and balance of each one. It is not a theft risk —without the private key nobody can sign— it is a privacy risk: whoever holds the xpub sees how much you collect and to which addresses. That is why it lives in data/master.json with 0600 permissions and not in a public repo.

What happens if I change wallet or xpub?

Old invoices keep being read: each one stores its address in the database, and the sweep reads that address, not the xpub of the moment. New invoices come from the new xpub and their indices continue from the last one used, which is never reused. What you cannot do is put two xpubs in the same EVM installation: one per installation.

Do I need a new wallet or can I use the one I have?

You can use the one you have if it exports the extended public key at account level (m/44'/60'/0'/0 on EVM) and if you accept that whoever holds that xpub sees every address of that account. The cleanest setup is a separate account used only for collecting, not your savings: that way the privacy of your other addresses is not tied to an invoicing tool.

Keep reading: one deposit address per invoice, explained · accepting crypto payments as a freelancer · how to reconcile USDC payments against your invoices · the client paid on the wrong network · all the guides.