GET /api/merchant/wallet/connect?address=
Returnssuccess: true and a SIWE-style message. It also sets the 5-minute HTTP-only wallet_connect_nonce cookie. Keep that cookie through POST; Node/server fetch does not automatically retain a browser cookie jar.
Supply a valid EVM address yourself. The current GET checks that the query is present, not full address syntax. The generated message uses the incoming host and includes purpose, URI, version, nonce and issued-at text; do not reconstruct an example with a different origin.
POST /api/merchant/wallet/connect
Required JSON:address, exact returned message, its wallet signature, and walletKind (METAMASK, WALLETCONNECT or COINBASE). In the supported UI, keep the requested and submitted address equal and sign the unchanged challenge with that wallet.
The current server requires its nonce cookie to occur in the submitted message, then runs verifyMessage for the submitted address. It does not parse/validate a complete SIWE schema or independently compare every domain, URI, chain, timestamp and original challenge-address field. Do not describe it as strict full-SIWE validation. This is an unchanged implementation limitation, not a newly proven mainnet login test.
Successful POST updates walletProvider/walletAddress, clears circleWalletId and deletes the nonce cookie. Returns success and wallet.walletProvider/wallet.walletAddress. Missing authentication returns 401; missing input, invalid kind or challenge returns 400; signature failure returns 401.

