简体中文
免费统一的链上身份聚合服务,包含来自 B3、Basement、ENS、Lens 和 Farcaster 的社交身份数据
GET https://profiles.b3.fun/?address=0x1234567890abcdef1234567890abcdef12345678 GET https://profiles.b3.fun/?name=vitalik.eth GET https://profiles.b3.fun/?name=sean.b3.fun
POST /preference
POST /display-name
{ "name": "vitalik.eth", "address": "0x1234567890abcdef1234567890abcdef12345678", "avatar": "https://example.com/avatar.jpg", "bio": "Ethereum 共同创始人", "displayName": "Vitalik Buterin", "profiles": [ { "type": "ensdata", "address": "0x123...", "name": "vitalik.eth", "avatar": "https://...", "bio": null, "displayName": null }, { "type": "thirdweb-farcaster", "address": "0x123...", "name": "vitalik", "avatar": "https://...", "bio": "Ethereum 共同创始人", "displayName": "Vitalik Buterin" } ] }
// 通过地址获取档案 const response = await fetch('https://profiles.b3.fun/?address=0x123...'); const profile = await response.json(); console.log(profile.displayName); // "Vitalik Buterin" console.log(profile.profiles.length); // 找到的来源数量
// 通过 ENS 名称获取档案 const response = await fetch('https://profiles.b3.fun/?name=vitalik.eth'); const profile = await response.json(); console.log(profile.address); // 解析的钱包地址 console.log(profile.avatar); // ENS 头像 URL
// 通过签名设置首选档案来源 const message = `SetProfilePreference:${address}:thirdweb-farcaster:${timestamp}`; const signature = await wallet.signMessage(message); await fetch('https://profiles.b3.fun/preference', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ key: address, preferredType: 'thirdweb-farcaster', signature, signer: address, timestamp }) });
?fresh=true