Summary
Integrate the Quidli Social Name Service (SNS) API to resolve Farcaster FIDs to additional ETH wallet addresses in the right sidebar's author context panel.
Background
The SNS API resolves social identities (Twitter, Discord, Telegram, Farcaster, email) to associated ETH wallet addresses. This could surface wallet addresses that users haven't explicitly verified on Farcaster but have linked via other platforms.
Current state: AuthorContextPanel.tsx displays verified_addresses.eth_addresses from Neynar API.
Proposed: Add a new "SNS Wallet" section showing addresses resolved via Quidli.
API Details
Base URL: https://api.sns.quid.li
Endpoint: POST /lookup
{
"recipients": [
{ "type": "farcaster", "fid": "3" }
]
}
Response:
{
"status": "completed",
"results": [
{
"type": "farcaster",
"fid": "3",
"walletAddress": "0x91e547D48CF666495A8eFbBa26c65286B6af8aBf"
}
]
}
Rate Limits (Important):
- 5 requests/second
- 20 requests/minute
Note: Some lookups may return status: "processing" with a pendingRequestId, requiring a follow-up GET /lookup/follow-up/{id} call.
Proposed Implementation
Caching Strategy
Given strict rate limits, use aggressive caching following existing patterns:
| Layer |
Technology |
TTL |
Rationale |
| Server |
unstable_cache |
7 days |
Wallet addresses rarely change (matches onchain data pattern) |
| Client |
React Query |
24h stale, 7d gc |
Long-lived data |
Files to Create/Modify
-
/app/api/sns/lookup/route.ts - API route
- Check
unstable_cache first
- Handle async
processing status with polling
- Return cached or fresh data
-
/src/hooks/queries/useSnsWallet.ts - React Query hook
- Debounce to avoid rapid selection changes (500ms)
- Long stale/gc times
-
/src/common/components/Sidebar/AuthorContextPanel.tsx - UI
- Add "SNS Wallet" section below "Verified Addresses"
- Show loading/resolved/not-found states
- Copy-to-clipboard (reuse existing utility)
Architecture
AuthorContextPanel
└─ useSnsWallet(fid) [debounced 500ms]
└─ React Query (staleTime: 24h)
└─ /api/sns/lookup?fid=X
└─ unstable_cache (7 days)
└─ Quidli SNS API
Future Enhancement: Request Batching
SNS API supports batch lookups. Could implement batshit pattern (like profileBatcher.ts) with 100ms window to batch FIDs from visible feed items.
Environment
Requires QUIDLI_SNS_API_KEY environment variable.
Tasks
Questions
- Should we show SNS wallet even if it matches a verified address? (dedupe?)
- What label? "Quidli Wallet" / "SNS Wallet" / "Linked Wallet"?
- Auto-fetch or manual "Resolve" button?
Summary
Integrate the Quidli Social Name Service (SNS) API to resolve Farcaster FIDs to additional ETH wallet addresses in the right sidebar's author context panel.
Background
The SNS API resolves social identities (Twitter, Discord, Telegram, Farcaster, email) to associated ETH wallet addresses. This could surface wallet addresses that users haven't explicitly verified on Farcaster but have linked via other platforms.
Current state:
AuthorContextPanel.tsxdisplaysverified_addresses.eth_addressesfrom Neynar API.Proposed: Add a new "SNS Wallet" section showing addresses resolved via Quidli.
API Details
Base URL:
https://api.sns.quid.liEndpoint:
POST /lookup{ "recipients": [ { "type": "farcaster", "fid": "3" } ] }Response:
{ "status": "completed", "results": [ { "type": "farcaster", "fid": "3", "walletAddress": "0x91e547D48CF666495A8eFbBa26c65286B6af8aBf" } ] }Rate Limits (Important):
Note: Some lookups may return
status: "processing"with apendingRequestId, requiring a follow-upGET /lookup/follow-up/{id}call.Proposed Implementation
Caching Strategy
Given strict rate limits, use aggressive caching following existing patterns:
unstable_cacheFiles to Create/Modify
/app/api/sns/lookup/route.ts- API routeunstable_cachefirstprocessingstatus with polling/src/hooks/queries/useSnsWallet.ts- React Query hook/src/common/components/Sidebar/AuthorContextPanel.tsx- UIArchitecture
Future Enhancement: Request Batching
SNS API supports batch lookups. Could implement
batshitpattern (likeprofileBatcher.ts) with 100ms window to batch FIDs from visible feed items.Environment
Requires
QUIDLI_SNS_API_KEYenvironment variable.Tasks
QUIDLI_SNS_API_KEYto environment/app/api/sns/lookup/route.tswithunstable_cacheprocessingstatus (polling or skip)useSnsWallet.tshook with debounceAuthorContextPanel.tsxQuestions