Skip to content

feat(wallets): add Noir Wallet connector for Zcash#1634

Open
harry1115 wants to merge 3 commits into
swapkit:developfrom
NoirWallet:feat/noir-wallet-zcash
Open

feat(wallets): add Noir Wallet connector for Zcash#1634
harry1115 wants to merge 3 commits into
swapkit:developfrom
NoirWallet:feat/noir-wallet-zcash

Conversation

@harry1115

@harry1115 harry1115 commented Jul 15, 2026

Copy link
Copy Markdown

Summary

  • Adds a NOIR_WALLET wallet option backed by the Noir Wallet browser
    extension (window.noirwallet), following the same injected-provider
    pattern already used for Vultisig/CTRL and the MetaMask SDK connector.
  • Registers Chain.Zcash on the UTXO toolbox, overriding getBalance,
    transfer, and signMessage to delegate to the extension, which spends
    from the shielded pool and builds/signs transactions internally.
  • Memos are passed through to the extension, which supports them for
    shielded recipients (zs/u1) and rejects them for transparent addresses
    (t1/t3). This means deposit-address routes (NEAR Intents) and
    shielded-memo transfers work, while OP_RETURN-based routes
    (Maya/THORChain) fail at the wallet level with a clear error.
  • No new dependency — the connector talks to window.noirwallet directly,
    same approach as the Vultisig connector.

Notes for reviewers

  • Noir Wallet reports the shielded-pool spendable balance via
    zcash_getBalance().available, not the transparent address on-chain
    UTXO set, so the displayed balance intentionally will not match a block
    explorer lookup of the transparent address.
  • Maya-routed quotes against a connected Noir Wallet will fail at the
    wallet level (memo to transparent address is rejected by the extension).
    A follow-up extension-side change (adding transparent-pool spends with
    OP_RETURN support) could unlock the Maya route later; out of scope here.

Test plan

  • bun run build:ci — full monorepo build + .d.ts generation
  • bun biome check — lint clean
  • bun test packages/wallet-extensions/src/noir-wallet/__tests__/noir-wallet.test.ts — 7/7 passing
  • SDK smoke test: createSwapKit() -> connectNoirWallet -> balance/transfer/signMessage against a mocked window.noirwallet
  • Manual verification: connect wallet, view balance, send ZEC transaction on mainnet via Vite playground
  • Swap route verification: ZEC<>BTC swap via NEAR Intents (blocked by CORS on localhost playground, pending production environment test)

harry1115 and others added 3 commits July 15, 2026 11:15
Adds a NOIR_WALLET wallet option backed by the Noir Wallet browser
extension (window.noirwallet). The connector registers Chain.Zcash with
the UTXO toolbox, overriding getBalance/transfer/signMessage to
delegate to the extension, which spends from the shielded pool and
builds/signs transactions internally.

Memo'd transfers throw wallet_noir_wallet_memo_not_supported since the
extension cannot attach OP_RETURN data to transparent recipients, so
OP_RETURN-based routes (Maya) are rejected explicitly while
deposit-address routes (NEAR Intents) are fully supported.
The extension now supports memos for shielded recipients (zs/u1),
so remove the blanket memo rejection from the connector and let the
wallet decide validity. Memos to transparent addresses (t1/t3) are
still rejected at the extension level.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant