wallet
Connect wallets via QR code scanning to approve blockchain transactions while keeping private keys secure on the user's device. Enables multi-step bridge and swap operations through automated transaction and signature handling.
Instructions
Connect a user's wallet via WalletConnect. The user scans a QR code with their mobile wallet (MetaMask, Rainbow, etc.) to approve transactions — private keys never leave their device.
Actions: pair — Returns a WalletConnect URI. You MUST then display it as a QR code (see below), then IMMEDIATELY call status to wait for connection. status — Waits up to 60s for the wallet to connect. Blocks until connected or timeout. Call this right after rendering the QR. execute — Execute ALL steps from execute_bridge in order. Handles multi-step flows (approval + deposit) and both transaction and signature steps automatically. disconnect — End the wallet session.
IMPORTANT: After calling pair, you must:
Render the returned URI as a QR code using the bash command below.
Immediately call wallet with action 'status' — it will block until the user scans and connects (up to 60s).
Run this bash command to render the QR as an image, substituting the URI:
python3 -c " import qrcode, tempfile, os qr = qrcode.QRCode(border=3, box_size=10, error_correction=qrcode.constants.ERROR_CORRECT_L) qr.add_data('WALLETCONNECT_URI_HERE') qr.make() img = qr.make_image(fill_color='black', back_color='white') p = os.path.join(tempfile.gettempdir(), 'relay-wc-qr.png') img.save(p) os.system(f'open {p}') print(f'QR code opened: {p}') "
If python3 qrcode is not installed, run: pip3 install "qrcode[pil]"
Typical flow: pair → render QR via bash → (user scans) → status → execute_bridge → execute → get_transaction_status
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | The wallet action to perform. | |
| chainIds | No | Chain IDs to request access to. Required for "pair". E.g. [1, 8453] for Ethereum + Base. | |
| steps | No | The steps array from execute_bridge. Required for "execute". Contains all steps (approval, deposit, signatures) to execute in order. |