---
title: SWOP Scan
description: Using a phone camera to read QR codes into SWOP, and the encryption that keeps the relay from seeing what passes through it.
---

SWOP Scan turns any phone into a scanner for the desktop app. Press a QR button in SWOP, point your phone at the code that appears, and from then on whatever your phone scans lands in the field SWOP is waiting on.

It exists because the values SWOP works with are long and typing them is where mistakes happen. A private key is 64 hexadecimal characters. A contract address is 40. A WalletConnect URI is longer still. Reading them off a printed card with a camera removes a real source of error.

There is nothing to install. The phone opens a page in its browser.

## What it can fill

- **Private key** — from a printed paper wallet
- **Destination address** — in Send
- **Token contract** — when adding a token by hand
- **WalletConnect QR** — from a site you are connecting to

SWOP tells you which field the next scan will go to, so a scan never lands somewhere you did not intend.

## Using it

1. In SWOP, press the **QR** button next to the field you want to fill.
2. A QR appears on your computer screen.
3. Point your phone's camera at it. It opens `siadewhales.com/scan` in the phone's browser.
4. The phone is now linked. Scan the code you actually want to read — the private key on your card, an address, a contract.
5. The value appears in SWOP.

The link stays open while SWOP does, so you can scan several things in a row. Closing SWOP closes the session on the phone too.

## What the server can see

Nothing. The relay passes encrypted envelopes and cannot read them.

The mechanism, since it involves a private key crossing a network and that deserves to be described rather than asserted:

**The key never reaches the server.** When SWOP starts a session it generates a random room identifier and a fresh AES-256 key, and puts both in the QR as a URL fragment: `https://siadewhales.com/scan#v1.<room>.<key>`. Everything after the `#` is a fragment, and browsers never send fragments to the server. The phone reads the key; `siadewhales.com` receives only the path. The page then removes the fragment from the address bar as soon as it loads.

**Every message is encrypted end to end.** Only SWOP and your phone can read what passes between them; the relay in the middle receives scrambled data and forwards it.

**Nothing is stored.** Envelopes are held in memory for at most five minutes, messages older than five minutes are ignored, and rooms expire after fifteen.

The relay's entire function is to forward a blob between two devices that already share a key it was never given.

> [!NOTE]
> The desktop side is in `client/src/services/phoneScan.js` in the [public repository](https://github.com/siadewhales/swop), and the phone page at `siadewhales.com/scan` can be opened and inspected in any browser. Both are readable, which is the only reason to believe any of the above.

## The page on your phone

The page the QR opens is at `siadewhales.com/scan`, and it is the only page on the site that uses a camera.

It asks your phone's browser for camera permission, because reading a QR requires seeing one. Nothing else is requested, and the page is not indexed by search engines.

It is not a sign-in. There is no account involved, nothing to enter and nothing stored. If you open the address without a code — or after the session has ended — the page has nothing to connect to and says so.

You can open it in any browser and read its source. That is the intention: the page handling a private key on your phone should be one you can inspect.

## Practical cautions

**Your phone is in the chain.** The encryption protects the data in transit; it does nothing about a compromised phone. Scanning a private key means that key passes through the phone's camera and browser. For a wallet holding meaningful value, typing the key on an offline computer is stronger, and slower, and that trade is yours to make.

**It needs a connection.** SWOP Scan is unavailable offline, since the relay is what links the two devices.

**Check what arrived.** SWOP validates the format of what it receives — it rejects a QR that does not contain a valid key or address — but format is not intent. Look at the value that landed before you use it.

## Cancelling

Either side can end it. Closing the page on the phone cancels the scan, and SWOP says so. Closing SWOP ends the session.
