authenticate-wallet
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseWallet Authentication
钱包认证
This skill manages the authentication session for the CLI. It uses a 2-step email OTP process managed by Privy.
fibx本技能用于管理 CLI的认证会话,采用由Privy管理的两步式邮箱OTP验证流程。
fibxUsage
使用方法
Step 1: Initiate Login
步骤1:发起登录
Request an OTP code to be sent to the user's email.
bash
npx fibx auth login <email>请求向用户邮箱发送OTP验证码。
bash
npx fibx auth login <email>Step 2: Verify OTP
步骤2:验证OTP
Complete the login using the code provided by the user.
bash
npx fibx auth verify <email> <code>使用用户提供的验证码完成登录。
bash
npx fibx auth verify <email> <code>Check Status
检查状态
Verify if the wallet is currently authenticated and view the wallet address.
bash
npx fibx status验证钱包当前是否已认证,并查看钱包地址。
bash
npx fibx statusExamples
示例
Full Login Flow
完整登录流程
- Agent: "I need to log you in. What is your email?"
- User: "user@example.com"
- Agent: Runs command:
bash
npx fibx auth login user@example.com - Agent: "I've sent a code to your email. Please provide it."
- User: "123456"
- Agent: Runs command:
bash
npx fibx auth verify user@example.com 123456 - Agent: Validates success:
bash
npx fibx status
- Agent:“我需要帮您登录。请问您的邮箱是多少?”
- 用户:“user@example.com”
- Agent:执行命令:
bash
npx fibx auth login user@example.com - Agent:“我已向您的邮箱发送了验证码,请提供给我。”
- 用户:“123456”
- Agent:执行命令:
bash
npx fibx auth verify user@example.com 123456 - Agent:验证是否成功:
bash
npx fibx status
Error Handling
错误处理
- "Invalid code": Ask the user to check the code and try again.
verify - "Rate limit": Wait for a few seconds before retrying.
- "Session expired": Restart the flow from Step 1.
- “无效验证码”:请用户检查验证码后,重新尝试命令。
verify - “请求频率超限”:等待几秒后再重试。
- “会话已过期”:从步骤1重新开始流程。