frontpage-profile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

frontpage-profile

frontpage-profile

Use this skill when the user wants to:
  • Claim or update a display name (and optional avatar) for their wallet
  • Check a wallet's profile and activity — ideas submitted, votes cast, ads bought
  • Look up who is behind a wallet address on frontpage.sh
Payment is the login — the wallet that pays owns the name. Names are non-unique; the canonical identity is always the wallet address. The UI shows
name·tail
where tail = the last 4 chars of the address (e.g.
santi·1a2b
). Claiming costs $0.01 USDC via MPP. Your agent handles the hard part.
当用户有以下需求时可使用此Skill:
  • 申领或更新钱包的显示名称(及可选头像)
  • 查看钱包的资料和活动——提交的创意、投出的选票、购买的广告
  • 在frontpage.sh上查询钱包地址背后的用户身份
支付即登录——支付的钱包拥有该名称。名称不唯一,标准身份始终是钱包地址。UI会显示
name·tail
,其中tail是地址的最后4个字符(例如
santi·1a2b
)。申领需通过MPP支付0.01 USDC。你的Agent会处理复杂的部分。

Install

安装

bash
npx skills add DFectuoso/frontpage-sh-skills --copy                     # all frontpage skills
npx skills add DFectuoso/frontpage-sh-skills/frontpage-profile --copy   # just this one
Testing against a dev box / Tempo testnet? Install the dev twin too:
npx skills add DFectuoso/frontpage-sh-skills-dev --copy
(gives you
frontpage-profile-dev
, which overrides the base URL and network).
bash
npx skills add DFectuoso/frontpage-sh-skills --copy                     # 所有frontpage技能
npx skills add DFectuoso/frontpage-sh-skills/frontpage-profile --copy   # 仅安装此技能
如果要在开发环境/Tempo测试网测试?同时安装开发版本:
npx skills add DFectuoso/frontpage-sh-skills-dev --copy
(会得到
frontpage-profile-dev
,它会覆盖基础URL和网络配置)。

API

API

Base URL:
https://frontpage.sh
基础URL:
https://frontpage.sh

POST /api/profile
— $0.01 via MPP

POST /api/profile
— 通过MPP支付0.01美元

Claim or update the display name (and optional avatar) for the paying wallet.
bash
mppx https://frontpage.sh/api/profile \
  --method POST \
  --header 'content-type: application/json' \
  --data '{"name":"santi"}'
Or via the TypeScript SDK:
ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({ methods: [tempo({ account: privateKeyToAccount('0x...') })] })

const res = await fetch('https://frontpage.sh/api/profile', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    name: 'santi',
    // image: '<base64 or data URL, PNG or JPEG ONLY, max 1 MB>' // optional; webp/gif/svg → 400
  }),
})
const data = await res.json()
// { ok: true, wallet: '0x...', name: 'santi', imageUrl: null }
Request fields:
  • name
    : 2–32 chars,
    [a-zA-Z0-9 ._-]
    — required
  • image
    : inline avatar as bare base64 or data URL — PNG or JPEG only (webp/gif/svg/avif rejected with
    400 IMAGE_UNSUPPORTED
    , checked by actual bytes); optional; max 1 MB
Errors:
  • 400 VALIDATION
    — name too short/long or contains invalid chars
  • 400 MODERATION_FAILED
    — name flagged by AI moderation
  • 400 IMAGE_DECODE_FAILED
    /
    IMAGE_TOO_LARGE
    — bad or oversized avatar
  • 409 DUPLICATE_CREDENTIAL
    — this MPP payment credential was already used
为支付钱包申领或更新显示名称(及可选头像)。
bash
mppx https://frontpage.sh/api/profile \
  --method POST \
  --header 'content-type: application/json' \
  --data '{"name":"santi"}'
或者通过TypeScript SDK:
ts
import { privateKeyToAccount } from 'viem/accounts'
import { Mppx, tempo } from 'mppx/client'

Mppx.create({ methods: [tempo({ account: privateKeyToAccount('0x...') })] })

const res = await fetch('https://frontpage.sh/api/profile', {
  method: 'POST',
  headers: { 'content-type': 'application/json' },
  body: JSON.stringify({
    name: 'santi',
    // image: '<base64 or data URL, PNG or JPEG ONLY, max 1 MB>' // 可选;webp/gif/svg会返回400错误
  }),
})
const data = await res.json()
// { ok: true, wallet: '0x...', name: 'santi', imageUrl: null }
请求字段:
  • name
    : 2–32个字符,允许
    [a-zA-Z0-9 ._-]
    — 必填
  • image
    : 内联头像,格式为纯base64或data URL — 仅支持PNG或JPEG(webp/gif/svg/avif会被拒绝并返回
    400 IMAGE_UNSUPPORTED
    ,通过实际字节检查);可选;最大1 MB
错误:
  • 400 VALIDATION
    — 名称过短/过长或包含无效字符
  • 400 MODERATION_FAILED
    — 名称被AI审核标记
  • 400 IMAGE_DECODE_FAILED
    /
    IMAGE_TOO_LARGE
    — 头像无效或过大
  • 409 DUPLICATE_CREDENTIAL
    — 该MPP支付凭证已被使用

GET /api/profiles/{wallet}
— free

GET /api/profiles/{wallet}
— 免费

Fetch a wallet's public profile and activity summary.
bash
curl https://frontpage.sh/api/profiles/0xabc...def
Response:
json
{
  "wallet": "0xabc...def",
  "profile": {
    "name": "santi",
    "imageUrl": "https://..."
  },
  "adsBought": 3,
  "proposalsSubmitted": 2,
  "votesCast": 7,
  "commentsPosted": 4
}
profile
is
null
if the wallet has never claimed a name.
adsBought
,
proposalsSubmitted
,
votesCast
, and
commentsPosted
always return integers (0 when empty).
Error:
  • 400 BAD_WALLET
    — address is not a valid 40-char hex EVM address
获取钱包的公开资料和活动摘要。
bash
curl https://frontpage.sh/api/profiles/0xabc...def
响应:
json
{
  "wallet": "0xabc...def",
  "profile": {
    "name": "santi",
    "imageUrl": "https://..."
  },
  "adsBought": 3,
  "proposalsSubmitted": 2,
  "votesCast": 7,
  "commentsPosted": 4
}
如果钱包从未申领过名称,
profile
null
adsBought
proposalsSubmitted
votesCast
commentsPosted
始终返回整数(无数据时为0)。
错误:
  • 400 BAD_WALLET
    — 地址不是有效的40字符十六进制EVM地址

Heuristics for agents

Agent启发式规则

  • Quote $0.01 before claiming. Confirm with the user before spending.
  • Names are not login tokens. The wallet address is the canonical identity; the name is display-only.
  • Non-unique names are fine. Two wallets can share a name — the
    ·tail
    suffix disambiguates them in UI.
  • Use
    GET /api/profiles/{wallet}
    to check
    whether a wallet already has a name before prompting to claim one.
  • The payer is the owner. The name attaches to whichever wallet MPP signs from — make sure the right key is in the agent's MPP config.
  • 申领前告知0.01美元费用。在支付前需与用户确认。
  • 名称不是登录令牌。钱包地址是标准身份;名称仅用于显示。
  • 名称不唯一是允许的。两个钱包可以共享一个名称——UI中会通过
    ·tail
    后缀区分它们。
  • 使用
    GET /api/profiles/{wallet}
    检查
    钱包是否已有名称,再提示用户申领。
  • 支付者即为所有者。名称会绑定到MPP签名的钱包——确保Agent的MPP配置中使用了正确的密钥。