authenticate-wallet

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Wallet Authentication

钱包认证

This skill manages the authentication session for the
fibx
CLI. It uses a 2-step email OTP process managed by Privy.
本技能用于管理
fibx
CLI的认证会话,采用由Privy管理的两步式邮箱OTP验证流程。

Usage

使用方法

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 status

Examples

示例

Full Login Flow

完整登录流程

  1. Agent: "I need to log you in. What is your email?"
  2. User: "user@example.com"
  3. Agent: Runs command:
    bash
    npx fibx auth login user@example.com
  4. Agent: "I've sent a code to your email. Please provide it."
  5. User: "123456"
  6. Agent: Runs command:
    bash
    npx fibx auth verify user@example.com 123456
  7. Agent: Validates success:
    bash
    npx fibx status
  1. Agent:“我需要帮您登录。请问您的邮箱是多少?”
  2. 用户:“user@example.com
  3. Agent:执行命令:
    bash
    npx fibx auth login user@example.com
  4. Agent:“我已向您的邮箱发送了验证码,请提供给我。”
  5. 用户:“123456”
  6. Agent:执行命令:
    bash
    npx fibx auth verify user@example.com 123456
  7. Agent:验证是否成功:
    bash
    npx fibx status

Error Handling

错误处理

  • "Invalid code": Ask the user to check the code and try
    verify
    again.
  • "Rate limit": Wait for a few seconds before retrying.
  • "Session expired": Restart the flow from Step 1.
  • “无效验证码”:请用户检查验证码后,重新尝试
    verify
    命令。
  • “请求频率超限”:等待几秒后再重试。
  • “会话已过期”:从步骤1重新开始流程。