dApp connections & deep links

The connection and signature sheets put the casa first: its color, its house, its name, its address. Casa remembers, on this device, which casa connected to which site. It suggests the right casa but never switches on its own, and it picks the right Bitcoin address. The same sheet answers the in-app browser, WalletConnect and apps that log in through a casatookan:// link.

Flow

Example wallet: three casas in two estates, plus imported keys. “Casa Yodark” owns the Farcaster account @yodark and has already connected to Velocimon. The active casa is “Ma Casa”.

1First connection of this casa
9:41●●● 5G
V
Velocimon
farcaster.velocimon.com

Connect to Velocimon?

Sign withChange
Ma Casa
My primary estate · Ethereum
0x3fA2…91c0
First time on this site
Casa Yodark already uses VelocimonLast used 3 days ago
✓See this casa's Ethereum address
✓Ask you before every signature or transaction

The casa is the hero of the sheet. Nothing changes without the user: the active casa stays selected, and Casa offers, in one tap, the casa that already knows the site.

2Picking another casa
9:41●●● 5G
‹ BackSign with

Velocimon will see the address of the casa you choose.

My primary estate
Ma Casa0x3fA2…91c0
✓
Casa Art0x77b1…0e2d
Farcaster estate
Casa Yodark0x1614…1313
✓ Connected here@yodark
Imported keys
EVM 10x9858…Ea94
BTC 1Bitcoin only. Velocimon asks for Ethereum.

The choice happens in the same sheet (‹ Back), without losing the request. Each row says what is special about it here. An incompatible casa stays visible with the reason, instead of disappearing.

3Known casa · Farcaster sign-in
9:41●●● 5G
Now signing with Casa YodarkUndo
V
Velocimon
farcaster.velocimon.com

Sign in to Velocimon

Y
@yodarkShaban Shaame · Farcaster ID 399250
Signed byChange
Casa Yodark
Farcaster estate · owns @yodark
0x1614…1313
✓ Connected here since 5 Oct
What you sign · free, no network fee›

After “Use it”, a toast confirms the switch and lets the user undo it. The button names the identity (@yodark), not a vague action such as “Approve”.

4This casa has no Farcaster account
9:41●●● 5G
V
Velocimon
farcaster.velocimon.com

Sign in to Velocimon

Velocimon signs you in with a Farcaster account.

Sign withChange
Ma Casa
My primary estate
0x3fA2…91c0
No Farcaster account
Casa Yodark owns @yodark. Use it to sign in, or pick another casa.

No disabled button without an explanation: the primary action becomes the fix. When no casa owns a Farcaster account, it becomes “Import your Farcaster account” (recovery phrase).

5Bitcoin · first connection
9:41●●● 5G
O
ORBital
orbital.market

Connect to ORBital?

Sign withChange
Casa Art
My primary estate · Bitcoin
First time on this site
Address to share
SegWit · recommended
bc1q9h7…kx4z
Lower fees, works with most sites
Legacy
1BvBM…NVN2
Older sites and Counterparty
Taproot
bc1p5d…8x2q
Ordinals and inscriptions

With no history, SegWit is preselected. Each type shows the start of its address (bc1q, 1, bc1p), so the user can compare it with what the site displays.

6Bitcoin · Legacy already in use
9:41●●● 5G
O
ORBital
orbital.market

Connect to ORBital?

Sign withChange
Ma Casa
My primary estate · Bitcoin
First time on this site
Address to share
Legacy · your assets are here
1Ca5a…T00k
12 cards · 0.0042 BTC
SegWit
bc1qx2…7mnp
Empty
Taproot
bc1pw8…q0lz
Empty

When Legacy holds coins or Counterparty assets and SegWit is empty, Legacy is preselected, with the reason in plain sight (“12 cards · 0.0042 BTC”). The user can always change it.

7Message signature, casa already connected
9:41●●● 5G
farcaster.velocimon.com
Casa Yodark
V
Velocimon
farcaster.velocimon.com

Signature request

Casa Yodark0x1614…1313
🔒 Connected
Velocimon wants to record your presence in Oris. Nonce: 8f2c41d9
Signing proves you own this casa. It sends nothing and costs nothing.

Signatures and transactions come from a site that already knows an address: the casa is locked, there is no “Change”. To switch account, tap the casa pill in the address bar.

8Settings · Connected sites
9:41●●● 5G
V
VelocimonUsed 3 days ago
Casa YodarkOld Casa
›
O
ORBitalUsed today
Ma Casa · Legacy
›
W
WakweliUsed 2 weeks ago
Casa Art
›

Saved on this iPhone only. Kept when you remove an estate, so you can still see which address a site knows.

The index is local to the device and survives the removal of an estate: a vanished casa stays listed in grey, with its last known name.

9Site detail
9:41●●● 5G
Casa Yodark0x1614…1313
Ethereum · @yodark
Connected 5 Oct · used 3 days ago
Disconnect
From a removed estate
Old Casa0xa41c…77e0
Ethereum · estate removed 1 Oct
Connected 12 Aug
Forget

Disconnecting stops Casa from answering this site with that address. The site may still remember it on its own servers.

The user sees exactly which address the site knows. “Disconnect” ends the connection, “Forget” erases the row of a vanished casa.

10Login from another app · casatookan:// link
9:41●●● 5G
C
ctserver.everdreamsoft.com
https://ctserver.everdreamsoft.com

Sign in to ctserver.everdreamsoft.com

Sign withChange
Ma Casa
My primary estate · Bitcoin + Ethereum
First time on this site
✓Shares your Bitcoin and Ethereum addresses and signs this message.
Login to ctserver.everdreamsoft.com 3f9a1c07

An app or a web page asks for the casa’s addresses with getaddress. Same sheet, same rules: the requester is named by its callback (an app scheme, or the host of an https page), the casa can be changed, and the answer is remembered in Connected sites.

Rules

What Casa preselects in each situation. It never switches casa without a tap from the user.

SituationPreselected casaWhat the user sees
The active casa is already connected to the siteThe active casaGreen chip “Connected here since…”. No suggestion.
The active casa is new to the site, another casa knows itThe active casaChip “First time on this site” and a single suggestion: the casa used most recently on this site, with “Use it”. The others are marked in the picker.
No casa knows the siteThe active casaChip “First time on this site”, no suggestion.
The known casa belongs to a removed estateThe active casaNo suggestion (it can no longer sign). It stays visible in Settings › Connected sites.
Farcaster sign-in, the casa does not own the accountThe active casaA warning, and the primary button “Use <casa that owns the account>”. When no casa owns one: “Import your Farcaster account”.
The site asks for Ethereum and the casa is a Bitcoin-only key (or the reverse)—The row stays in the picker, disabled, with the reason.
Signature or transaction from a connected siteThe connected casa, lockedNo “Change”: the site expects this address. The account is switched from the casa pill in the address bar, and the site then receives accountsChanged.
Bitcoin address already chosen for this site and this casaThe same typeThe remembered choice, which can be changed.
Bitcoin address, first timeLegacy when it holds BTC or Counterparty assets and SegWit is empty. SegWit otherwise.The reason under the choice (“12 cards · 0.0042 BTC”). Taproot is never preselected.

Where it applies

One sheet and one connection index serve every way a site or an app can reach the wallet.

In-app browser

  • The injected providers (EIP-1193, sats-connect, web3XCP) open the sheet for every connection, signature and transaction.
  • Casa pill: always shown at the right of the address bar with the active casa’s house; a green dot marks a casa connected to the open site. Tapping it switches the casa this site sees.

WalletConnect

  • Sessions use the same sheet and the same index. The site is identified by the metadata of the pairing (origin, name, icon).
  • Recorded with via: "walletconnect".

casatookan:// links

  • Web3 logins from other apps and web pages (getaddress, signForAddress) use the same sheet. See Deep links.
  • Recorded with via: "deeplink", under the app’s scheme (sogapp://) or the page’s origin.
  • Signing with another casa does not change the active casa: the app gets that casa’s addresses, the wallet stays put.

Connection index

Stored on the device (AsyncStorage), outside the vault and the estates. A casa is identified by its address, never by its index, which moves when an estate is removed. Its name, color and estate are copied at connection time, so a vanished casa can still be shown. The index starts empty: connections made before it existed are not migrated, so each casa is “First time” once per site.

// key: "dappConnections.v1"
{
  "https://farcaster.velocimon.com": {
    "origin": "https://farcaster.velocimon.com",
    "name": "Velocimon",
    "icon": "https://farcaster.velocimon.com/…/icon.png",
    "via": "browser",                // "browser" | "walletconnect" | "deeplink"
    "connections": [{
      "chain": "evm",                  // "evm" | "bitcoin"
      "address": "0x1614…1313",        // stable identity
      "btcPurpose": null,              // "segwit" | "legacy" | "taproot"
      "farcasterFid": 399250,
      "casa": {                        // copied at connection time
        "name": "Casa Yodark",
        "color": "#9B59B6",
        "estateName": "Farcaster estate",
        "ghost": false                 // imported key
      },
      "connectedAt": "2026-10-05T18:12:00Z",
      "lastUsedAt":  "2026-10-05T19:40:00Z",
      "disconnectedAt": null
    }]
  }
}

How it is used

  • When a site loads: the connections of its origin are looked up. When the active casa has one, the bridge answers eth_accounts and getAddresses directly, without asking again.
  • Live or vanished casa: the address is matched against the accounts of the estates present. No match = “From a removed estate”.
  • Update: every approved connection, signature or transaction refreshes lastUsedAt and the casa snapshot (name, color).
  • Erasing: “Disconnect” sets disconnectedAt, “Forget” removes the row. Deleting the wallet erases the whole index.
  • Never in the index: keys or balances. Only what is needed to recognise a casa.

Casa registers the casatookan:// scheme on iOS and Android. Other apps and web pages use it to open a dApp in the wallet or to log a user in with a signed challenge (the web3XCP x-callback-url protocol of the original Casa Tookan). The wallet must be unlocked: while it is locked, browse and getaddress links are ignored and not queued.

LinkParametersEffect
casatookan://browse/{url}url: the page to open, URL-encoded.Opens the page in the in-app dApp browser.
casatookan://x-callback-url/getaddress?x-success={callback}&msg={message}x-success: where the answer goes (see below).
msg: the challenge to sign, URL-encoded.
Web3 login on Bitcoin + Ethereum: the signer sheet asks the user, then Casa signs msg with the chosen casa and calls the callback.
casatookan://x-callback-url/signForAddress?chain={chains}&x-success={callback}&msg={message}chain: comma-separated chain ids, e.g. bitcoin,base. bitcoin or any EVM chain enabled in the wallet (ethereum, base, polygon…).Same as getaddress, on the chains listed, in that order.

Where the answer goes: x-success

An app scheme

  • x-success=myapp (letters, digits, + . -).
  • Casa opens myapp://sendaddress?address=…&msg=…&sig=….
  • Values are written raw, not URL-encoded, exactly like the original Casa Tookan, so existing web3XCP apps keep working. Split the query on &address=, &msg=, &sig= rather than with a URL parser.

A web page

  • x-success=https://example.com/login, URL-encoded in the link.
  • Casa opens https://example.com/login?address=…&msg=…&sig=… in the browser. An existing query string is kept (& is used), and so is a #fragment.
  • Each value is URL-encoded (base64 signatures contain + and /): read them with URLSearchParams.
  • https only. http:// and any other target are refused: the signature would travel in clear.

The answer

address = chain:bitcoin;1Ca5a…T00k;;separator;;chain:ethereum;0x1614…1313
msg     = the challenge, unchanged
sig     = chain:bitcoin;H8k2…=;;separator;;chain:ethereum;0x5f1c…1b

Format

  • One chain:{id};{value} entry per chain, in the requested order, joined by ;;separator;;. The address and sig entries line up.
  • The addresses are those of the casa the user approved in the sheet, which may differ from the active casa.

Bitcoin signature

  • BIP-137 signed message, base64.
  • Signed by the casa’s Legacy (P2PKH) address, the one that holds Counterparty assets, path m/0'/0/{casa}. Verify it with any BIP-137 verifier against the returned address.

EVM signature

  • Raw secp256k1 signature of keccak256(utf8(msg)), serialized 0x{r}{s}{v} with v = 27 + recid. It is not EIP-191: personal_sign verifiers will reject it.
  • Recover the signer from the keccak digest directly (e.g. ethers SigningKey.recoverPublicKey(keccak256(toUtf8Bytes(msg)), sig)) and compare with the returned address, path m/44'/60'/0'/0/{casa}.

Approval and history

Tester

Open the deep link tester on the phone where Casa is installed. It builds every link above, returns to itself with Casa’s answer (x-success = its own URL), decodes it and verifies the Ethereum signature.