diff --git a/AGENTS.mdx b/AGENTS.mdx index f93d748a..01261d8a 100644 --- a/AGENTS.mdx +++ b/AGENTS.mdx @@ -42,8 +42,8 @@ https://www.helius.dev/docs/agents/rust-sdk.md ```bash npm install -g helius-cli helius keygen -# Fund wallet: 1 USDC + ~0.001 SOL -helius signup --json +# (Autopay only) Fund the keypair with ~0.001 SOL + plan USDC — skip if paying via the hosted link. +helius signup --email you@example.com --first-name Jane --last-name Doe --json ``` Success response: @@ -64,8 +64,14 @@ Or use the TypeScript SDK auth module for in-process signup (no CLI needed): ```typescript import { makeAuthClient } from "helius-sdk/auth/client"; const auth = makeAuthClient(); -const result = await auth.agenticSignup({ secretKey: keypair.secretKey }); -// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits } +const result = await auth.signupAndPay({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// result.kind: "completed" | "pending" | "expired" | "failed" | "already_subscribed" | "upgrade_required" ``` ## Use Helius APIs Instead Of Standard Solana RPC diff --git a/agents/claude-code-plugin.mdx b/agents/claude-code-plugin.mdx index 07ea3a47..e3d558a2 100644 --- a/agents/claude-code-plugin.mdx +++ b/agents/claude-code-plugin.mdx @@ -82,21 +82,23 @@ The plugin auto-starts the MCP server, but you still need a Helius API key. On f Just tell Claude: "Set my Helius API key to `YOUR_API_KEY`" - - Create a new account entirely within Claude Code — no browser needed. Each step is an action on `heliusAccount`: + + Create a new account from Claude Code via a hosted payment link or autopay. Each step is an action on `heliusAccount`: 1. Claude calls `heliusAccount` with `action: "generateKeypair"` — creates a Solana wallet - 2. You fund the wallet with **~0.001 SOL** + **1 USDC** - 3. Claude calls `heliusAccount` with `action: "checkSignupBalance"` to verify - 4. Claude calls `heliusAccount` with `action: "agenticSignup"` — API key is configured automatically + 2. Claude calls `heliusAccount` with `action: "signup"` and `mode: "link"` — returns a payment URL you open in a browser to pay with any wallet (or `mode: "autopay"` to pay USDC from the local keypair automatically) + 3. After paying via link, Claude calls `heliusAccount` with `action: "signup"` and `mode: "resume"` — finalizes provisioning and configures the API key automatically Use the [Helius CLI](/agents/cli) from the terminal: ```bash - npx helius-cli@latest keygen # Generate keypair - # Fund wallet with ~0.001 SOL + 1 USDC - npx helius-cli@latest signup # Create account + npx helius-cli@latest keygen + npx helius-cli@latest signup --plan agent --email you@example.com --first-name Jane --last-name Doe # Print hosted payment link + # (pay in browser, then:) + npx helius-cli@latest signup --resume # Finalize account + # Or autopay from the local keypair: + npx helius-cli@latest signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe ``` diff --git a/agents/cli.mdx b/agents/cli.mdx index 52a329b4..5a5e879e 100644 --- a/agents/cli.mdx +++ b/agents/cli.mdx @@ -28,6 +28,10 @@ Get your key from [dashboard.helius.dev](https://dashboard.helius.dev). That's i ## Quick Start — New Users + +All `helius signup` invocations require `--email`, `--first-name`, and `--last-name` — including the Agent plan. + + ```bash @@ -44,21 +48,22 @@ Get your key from [dashboard.helius.dev](https://dashboard.helius.dev). That's i • ~0.001 SOL for transaction fees • 1 USDC for Helius signup ``` - - - Send funds to the wallet address from the previous step: - | Asset | Amount | Purpose | - |-------|--------|---------| - | SOL | ~0.001 | Transaction fees + rent | - | [USDC](https://orbmarkets.io/token/EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v) | 1+ | Plan payment (see pricing below) | + The funding hint above only applies if you'll use autopay — skip funding if you plan to pay via the hosted link. + Two payment modes: hosted link (pay from any wallet, nothing to fund) or autopay (pay USDC from the local keypair, which must hold ~0.001 SOL + the plan amount). + ```bash - helius signup - ``` + # Default: print a hosted payment link, pay with any wallet in the browser + helius signup --email you@example.com --first-name Jane --last-name Doe + + # After paying via link, finalize the account + helius signup --resume - This checks balances, sends the USDC payment, and creates your Helius account and project. + # Or autopay from the local keypair + helius signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe + ``` ```bash @@ -79,20 +84,20 @@ You can purchase any Helius shared plan directly through the CLI. Pass `--plan` | Plan | Price | Credits | `--plan` value | |------|-------|---------|----------------| -| Agent (Basic) | $1 one-time | 1,000,000 | `basic` | +| Agent | $1 one-time | 1,000,000 | `agent` | | Developer | $49/mo | 10,000,000 | `developer` | | Business | $499/mo | 100,000,000 | `business` | | Professional | $999/mo | 200,000,000 | `professional` | -The **Agent** plan (`basic`) is the default. It costs $1 (paid in USDC) to prevent abuse and gives you 1,000,000 credits. For higher rate limits and more credits, sign up with a paid plan or upgrade later. +The **Agent** plan (`agent`) is the default. It costs $1 (paid in USDC) to prevent abuse and gives you 1,000,000 credits. For higher rate limits and more credits, sign up with a paid plan or upgrade later. ### Signup with a specific plan ```bash # Default: Agent plan ($1) -helius signup +helius signup --email you@example.com --first-name Jane --last-name Doe # Developer plan ($49/mo) helius signup --plan developer --email you@example.com --first-name Jane --last-name Doe @@ -209,20 +214,20 @@ All commands accept these flags: # Step 1: Generate keypair helius keygen -# Step 2: Fund wallet externally -# Send ~0.001 SOL + 1 USDC to the address - -# Step 3: Create account -helius signup +# Step 2: Create account (default: hosted payment link, pay from any wallet) +helius signup --email you@example.com --first-name Jane --last-name Doe +helius signup --resume # Finalize after paying via link +# Or autopay from the local keypair (requires ~0.001 SOL + plan USDC): +# helius signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe -# Step 4: Get API keys +# Step 3: Get API keys helius projects helius apikeys -# Step 5: Get RPC endpoints +# Step 4: Get RPC endpoints helius rpc -# Step 6: Start querying +# Step 5: Start querying helius balance
helius asset owner helius tx history
--limit 10 diff --git a/agents/cli/commands.mdx b/agents/cli/commands.mdx index 4f1ec46a..648e93a2 100644 --- a/agents/cli/commands.mdx +++ b/agents/cli/commands.mdx @@ -13,7 +13,7 @@ Create Helius accounts, generate keypairs, authenticate, upgrade plans, and pay | Command | Description | |---------|-------------| | `helius keygen` | Generate a new Solana keypair | -| `helius signup` | Create a Helius account (requires `--email`, `--first-name`, `--last-name`; supports `--plan`, `--period`, `--coupon`) | +| `helius signup` | Create a Helius account (requires `--email`, `--first-name`, `--last-name`; supports `--plan`, `--period`, `--coupon`, `--pay`, `--resume`) | | `helius login` | Authenticate with an existing wallet | | `helius upgrade` | Upgrade your plan (requires `--email`, `--first-name`, `--last-name`; supports `--plan`, `--period`, `--coupon`) | | `helius pay ` | Pay an existing payment intent (e.g., renewal) | diff --git a/agents/llms.txt b/agents/llms.txt index 26a83bac..7ed33519 100644 --- a/agents/llms.txt +++ b/agents/llms.txt @@ -24,7 +24,7 @@ Get an API key from https://dashboard.helius.dev or programmatically via the Hel The Helius MCP server is the recommended way for AI agents to interact with Helius. It provides 10 routed tools with structured inputs/outputs — the AI calls tools directly rather than spawning shell commands and parsing output. Use the CLI only for shell scripts, CI/CD, or when MCP is not available. -- MCP: Structured tool calls (9 routed domain tools — `heliusAccount`, `heliusWallet`, `heliusAsset`, `heliusTransaction`, `heliusChain`, `heliusStreaming`, `heliusKnowledge`, `heliusWrite`, `heliusCompression` — plus `expandResult` for paging large responses), built-in signup via `heliusAccount` actions (`generateKeypair` → `agenticSignup`), works with Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, and any MCP-compatible tool +- MCP: Structured tool calls (9 routed domain tools — `heliusAccount`, `heliusWallet`, `heliusAsset`, `heliusTransaction`, `heliusChain`, `heliusStreaming`, `heliusKnowledge`, `heliusWrite`, `heliusCompression` — plus `expandResult` for paging large responses), built-in signup via `heliusAccount` actions (`generateKeypair` → `signup`), works with Claude Code, Codex, Cursor, VS Code, Claude Desktop, Windsurf, and any MCP-compatible tool - CLI: Shell commands with `--json` output, for terminal workflows and automation scripts ## Pages @@ -110,8 +110,8 @@ https://www.helius.dev/docs/agents/rust-sdk/api-reference.md ```bash npm install -g helius-cli helius keygen -# Fund wallet: 1 USDC + ~0.001 SOL -helius signup --json +# (Autopay only) Fund wallet with plan USDC + ~0.001 SOL — skip if paying via the hosted link +helius signup --email you@example.com --first-name Jane --last-name Doe --json ``` Success response: @@ -132,8 +132,14 @@ Or use the TypeScript SDK auth module for in-process signup (no CLI needed): ```typescript import { makeAuthClient } from "helius-sdk/auth/client"; const auth = makeAuthClient(); -const result = await auth.agenticSignup({ secretKey: keypair.secretKey }); -// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits } +const result = await auth.signupAndPay({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// result.kind: "completed" | "pending" | "expired" | "failed" | "already_subscribed" | "upgrade_required" ``` ## Use Helius APIs Instead Of Standard Solana RPC diff --git a/agents/mcp.mdx b/agents/mcp.mdx index 360890ba..176be065 100644 --- a/agents/mcp.mdx +++ b/agents/mcp.mdx @@ -10,8 +10,8 @@ The [Helius MCP server](https://www.npmjs.com/package/helius-mcp) gives AI tools Domain-grouped tools (`heliusWallet`, `heliusAsset`, `heliusTransaction`, …) — every Helius action is reachable through one of them - - Create a Helius account and get an API key entirely within Claude — no browser needed + + Create a Helius account from your AI tool — pay via hosted link or autopay USDC from a local keypair Subscribe to Enhanced WebSockets and LaserStream gRPC directly from your AI tool @@ -65,7 +65,7 @@ The Helius docs site at [helius.dev/docs](https://www.helius.dev/docs) also expo 2. `HELIUS_API_KEY` environment variable 3. `~/.helius/config.json` (set via the [Helius CLI](/agents/cli)) - **If you need a new account:** See [Autonomous Signup](#autonomous-signup) below. + **If you need a new account:** See [Signup](#signup) below. Ask questions in plain English — the right tool and action are selected automatically: @@ -258,35 +258,35 @@ Heavy responses are **summary-first**. Routed tools return a compact summary plu This keeps token usage low for exploratory queries while still letting agents drill into the full payload when needed. -## Autonomous Signup +## Signup -Create a Helius account entirely within your AI tool — no browser needed. The signup flow runs through the `heliusAccount` routed tool: +Create a Helius account from your AI tool through a hosted payment link or by paying USDC directly from a local keypair. The signup flow runs through the `heliusAccount` routed tool: The AI calls `heliusAccount` with `action: "generateKeypair"` — it creates a Solana wallet and returns the address. - - Send **~0.001 SOL** (transaction fees) + **1 USDC** (basic plan costs $1) to the wallet address. + + The AI calls `heliusAccount` with `action: "signup"` and `mode: "link"` — returns a `paymentUrl` (e.g. `https://dashboard.helius.dev/pay/`) the user opens to pay with any wallet. Or pass `mode: "autopay"` to send USDC from the local keypair automatically (wallet must hold ~0.001 SOL + the plan amount in USDC). - - The AI calls `heliusAccount` with `action: "checkSignupBalance"` to confirm funds arrived. - - - The AI calls `heliusAccount` with `action: "agenticSignup"` — processes the USDC payment, creates the Helius account, and configures the API key automatically. + + After paying via link, the AI calls `heliusAccount` with `action: "signup"` and `mode: "resume"` — polls the payment intent, finalizes account provisioning, and configures the API key automatically. -**Paid plans (Developer / Business / Professional):** `agenticSignup` and `upgradePlan` require `email`, `firstName`, and `lastName`. The basic Agent plan does not. +**Contact info:** every new signup — including the Agent plan — requires `email`, `firstName`, and `lastName`. `upgradePlan` requires the same. Or do the same from the terminal with the [Helius CLI](/agents/cli): ```bash -npx helius-cli@latest keygen # Generate keypair -# Fund the wallet address with ~0.001 SOL + 1 USDC -npx helius-cli@latest signup # Create account +npx helius-cli@latest keygen +npx helius-cli@latest signup --plan agent --email you@example.com --first-name Jane --last-name Doe # Print hosted payment link +# (pay in browser, then:) +npx helius-cli@latest signup --resume # Finalize account +# Or autopay from the local keypair: +npx helius-cli@latest signup --plan agent --pay --email you@example.com --first-name Jane --last-name Doe ``` ## Network Configuration diff --git a/agents/mcp/tools.mdx b/agents/mcp/tools.mdx index 3a9ee5e5..2822523a 100644 --- a/agents/mcp/tools.mdx +++ b/agents/mcp/tools.mdx @@ -48,14 +48,14 @@ Account setup, auth, plans, and billing — including the autonomous signup flow | `setHeliusApiKey` | Configure your API key | | `setNetwork` | Switch between mainnet and devnet for the session | | `generateKeypair` | Create a Solana wallet for signup | -| `checkSignupBalance` | Verify wallet has enough SOL + USDC | -| `agenticSignup` | Pay USDC and create a Helius account (paid plans require `email`, `firstName`, `lastName`) | +| `signup` | Create a Helius account via hosted payment link. `mode: "link"` returns a payment URL the user opens in a browser; `mode: "autopay"` pays USDC from the local keypair; `mode: "resume"` polls a previously created intent. Every new signup (all plans, including Agent) requires `email`, `firstName`, `lastName`. | | `getAccountStatus` | Check account status and credits | | `getHeliusPlanInfo` | Get your current plan details | | `compareHeliusPlans` | Compare available plans | | `previewUpgrade` | Preview cost of upgrading | -| `upgradePlan` | Upgrade your plan (requires `email`, `firstName`, `lastName`) | -| `payRenewal` | Pay plan renewal | +| `upgradePlan` | Upgrade your plan. `mode: "link"` returns a payment URL; `mode: "autopay"` pays USDC from the local keypair. Requires `email`, `firstName`, `lastName`. | +| `payRenewal` | Pay a plan renewal. `mode: "link"` returns a payment URL; `mode: "autopay"` pays USDC from the local keypair. | +| `purchaseCredits` | Buy prepaid credits (one-time top-up). `mode: "link"` returns a payment URL; `mode: "autopay"` pays USDC from the local keypair. | ## heliusWallet diff --git a/agents/overview.mdx b/agents/overview.mdx index 3f94bee1..21179de9 100644 --- a/agents/overview.mdx +++ b/agents/overview.mdx @@ -26,7 +26,7 @@ The [Helius MCP server](/agents/mcp) is the recommended way for AI agents to int | **Best for** | AI agents in Claude Code, Cursor, Claude Desktop, and any MCP-compatible tool | Shell scripts, CI/CD pipelines, terminal workflows | | **Interface** | Structured tool calls with typed inputs/outputs | Command-line with `--json` output | | **Capabilities** | 10 routed tools (`heliusWallet`, `heliusAsset`, `heliusTransaction`, …) covering blockchain queries, transactions, webhooks, streaming, wallet analysis, docs, and signup | 95+ commands: same capabilities plus config management and interactive flows | -| **Account setup** | Built-in: `heliusAccount` actions `generateKeypair` → `agenticSignup` — no external tools needed | `helius keygen` → `helius signup` | +| **Account setup** | Built-in: `heliusAccount` actions `generateKeypair` → `signup` (link or autopay) — no external tools needed | `helius keygen` → `helius signup` | | **When to use** | Default choice for any AI agent | When you need shell-level automation or are not using an MCP-compatible tool | @@ -40,8 +40,8 @@ Agents can create a Helius account and get an API key in four steps using the [H ```bash npm install -g helius-cli # Install CLI helius keygen # Generate keypair -# Fund wallet with 1 USDC + ~0.001 SOL -helius signup --json # Get API key (JSON output) +# (Autopay only) Fund wallet with 1 USDC + ~0.001 SOL — skip if paying via the hosted link +helius signup --email you@example.com --first-name Jane --last-name Doe --json # Get API key (JSON output) ``` On success, your agent receives an API key, RPC endpoints, and 1,000,000 credits. See the [full CLI guide](/agents/cli) for details. diff --git a/agents/skills/build.mdx b/agents/skills/build.mdx index e4752596..1da279b3 100644 --- a/agents/skills/build.mdx +++ b/agents/skills/build.mdx @@ -24,7 +24,7 @@ The Build skill routes the AI to the correct Helius tools and documentation for | **Event Pipelines** | Webhooks | `createWebhook`, `getAllWebhooks`, `updateWebhook`, `deleteWebhook` | | **Wallet Analysis** | Wallet API | `getWalletIdentity`, `getWalletBalances`, `getWalletHistory`, `getWalletTransfers` | | **Transaction History** | Enhanced Transactions | `parseTransactions` | -| **Onboarding** | CLI, Auth | `generateKeypair`, `agenticSignup`, `setHeliusApiKey` | +| **Onboarding** | CLI, Auth | `generateKeypair`, `signup`, `setHeliusApiKey` | | **Solana Knowledge** | SIMDs, Source Code, Blog | `getSIMD`, `readSolanaSourceFile`, `fetchHeliusBlog` | ## Prerequisites diff --git a/agents/typescript-sdk.mdx b/agents/typescript-sdk.mdx index 6bae5a0c..e682e37f 100644 --- a/agents/typescript-sdk.mdx +++ b/agents/typescript-sdk.mdx @@ -89,17 +89,26 @@ import { makeAuthClient } from "helius-sdk/auth/client"; const auth = makeAuthClient(); -// All-in-one shortcut: -const result = await auth.agenticSignup({ secretKey: keypair.secretKey }); -// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits } - -// Or step-by-step: -const keypair = await auth.generateKeypair(); -const address = await auth.getAddress(keypair); -const { message, signature } = await auth.signAuthMessage(keypair.secretKey); -const { token } = await auth.walletSignup(message, signature, address); -const project = await auth.createProject(token); -const apiKey = await auth.createApiKey(token, project.id, address); +// Hosted-link signup (returns a paymentUrl the user opens in a browser): +const link = await auth.signup({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// link: { kind: "payment_required", jwt, refId, walletAddress, paymentLink: { paymentUrl, ... } } + +// Or pay USDC directly from the local keypair and provision in one call: +const result = await auth.signupAndPay({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// result.kind: "completed" | "pending" | "expired" | "failed" | "already_subscribed" | "upgrade_required" +// On "completed": result has { jwt, walletAddress, projectId, apiKey, endpoints, txSignature } ``` ## Deep Dives diff --git a/api-reference/authentication.mdx b/api-reference/authentication.mdx index e23fef8d..4f054bbb 100644 --- a/api-reference/authentication.mdx +++ b/api-reference/authentication.mdx @@ -92,15 +92,15 @@ helius keygen ``` -### Fund the Generated Wallet (Manual) +### Fund the Generated Wallet (Autopay only) -Send 1 USDC and 0.001 SOL to the wallet address provided in Step 2. +Skip this step if paying via the hosted payment link (`--pay` / `--resume`). For autopay, send 1 USDC and 0.001 SOL to the wallet address provided in Step 2. ### Signup and Get API Key ```bash -helius signup --json +helius signup --email you@example.com --first-name Jane --last-name Doe --json ``` diff --git a/llms.txt b/llms.txt index e432dbe7..31992c2e 100644 --- a/llms.txt +++ b/llms.txt @@ -38,16 +38,18 @@ Output: Creates keypair at `~/.helius/keypair.json` Returns: Wallet address to fund -### Step 3: Fund Wallet +### Step 3: Fund Wallet (Autopay only) -Send to the wallet address from Step 2: -- 1 USDC (token: `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`) +Skip this step if paying via the hosted payment link (`--pay` / `--resume`). + +For autopay, send to the wallet address from Step 2: +- Plan USDC (token: `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`) - ~0.001 SOL ### Step 4: Signup and Get API Key ```bash -helius signup --json +helius signup --email you@example.com --first-name Jane --last-name Doe --json ``` #### Success Response (exit code 0): diff --git a/zh/AGENTS.mdx b/zh/AGENTS.mdx index 7304cc80..f054087b 100644 --- a/zh/AGENTS.mdx +++ b/zh/AGENTS.mdx @@ -65,8 +65,14 @@ helius signup --json ```typescript import { makeAuthClient } from "helius-sdk/auth/client"; const auth = makeAuthClient(); -const result = await auth.agenticSignup({ secretKey: keypair.secretKey }); -// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits } +const result = await auth.signupAndPay({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// result.kind: "completed" | "pending" | "expired" | "failed" | "already_subscribed" | "upgrade_required" ``` ## 使用 Helius APIs 替代标准 Solana RPC diff --git a/zh/agents/mcp/tools.mdx b/zh/agents/mcp/tools.mdx index a9569f43..0c814611 100644 --- a/zh/agents/mcp/tools.mdx +++ b/zh/agents/mcp/tools.mdx @@ -49,14 +49,14 @@ Helius MCP 服务器公开了**10 个公共工具**:9 个路由域工具加上 | `setHeliusApiKey` | 配置您的 API 密钥 | | `setNetwork` | 在会话中切换到主网或开发网 | | `generateKeypair` | 创建用于注册的 Solana 钱包 | -| `checkSignupBalance` | 验证钱包是否有足够的 SOL + USDC | -| `agenticSignup` | 支付 USDC 并创建 Helius 账户(付费计划需要 `email`, `firstName`, `lastName`) | +| `signup` | 通过托管支付链接创建 Helius 账户。`mode: "link"` 返回用户在浏览器中打开的支付 URL;`mode: "autopay"` 从本地密钥对支付 USDC;`mode: "resume"` 轮询先前创建的支付意图。所有新注册(包括 Agent 计划)都需要 `email`, `firstName`, `lastName`。 | | `getAccountStatus` | 检查账户状态和积分 | | `getHeliusPlanInfo` | 获取当前计划详情 | | `compareHeliusPlans` | 比较可用计划 | | `previewUpgrade` | 预览升级费用 | -| `upgradePlan` | 升级您的计划(需要 `email`, `firstName`, `lastName`) | -| `payRenewal` | 支付计划续费 | +| `upgradePlan` | 升级您的计划。`mode: "link"` 返回支付 URL;`mode: "autopay"` 从本地密钥对支付 USDC。需要 `email`, `firstName`, `lastName`。 | +| `payRenewal` | 支付计划续费。`mode: "link"` 返回支付 URL;`mode: "autopay"` 从本地密钥对支付 USDC。 | +| `purchaseCredits` | 购买预付积分(一次性充值)。`mode: "link"` 返回支付 URL;`mode: "autopay"` 从本地密钥对支付 USDC。 | ## heliusWallet diff --git a/zh/agents/overview.mdx b/zh/agents/overview.mdx index 3223fe29..09b52173 100644 --- a/zh/agents/overview.mdx +++ b/zh/agents/overview.mdx @@ -26,7 +26,7 @@ Helius 为在 Solana 上构建的 AI 代理提供一流支持。从程序化帐 | **最佳使用** | Claude Code、Cursor、Claude Desktop中的AI代理及任何与MCP兼容的工具 | Shell脚本、CI/CD管道、终端工作流 | | **接口** | 具有类型化输入/输出的结构化工具调用 | 命令行与`--json`输出 | | **功能** | 覆盖区块链查询、交易、webhooks、流媒体、钱包分析、文档和注册的10个路由工具 (`heliusWallet`, `heliusAsset`, `heliusTransaction`, …) | 95+命令:同样的功能加上配置管理和交互流程 | -| **账户设置** | 内置:`heliusAccount` 操作 `generateKeypair` → `agenticSignup` — 无需外部工具 | `helius keygen` → `helius signup` | +| **账户设置** | 内置:`heliusAccount` 操作 `generateKeypair` → `signup`(链接或自动支付)— 无需外部工具 | `helius keygen` → `helius signup` | | **使用时机** | 任何AI代理的默认选择 | 当需要shell级自动化或不使用与MCP兼容的工具时 | diff --git a/zh/agents/skills/build.mdx b/zh/agents/skills/build.mdx index eba66ef4..00b3460a 100644 --- a/zh/agents/skills/build.mdx +++ b/zh/agents/skills/build.mdx @@ -25,7 +25,7 @@ description: 核心的Helius技能。使您的AI助手成为Solana开发专家 | **事件管道** | Webhooks | `createWebhook`, `getAllWebhooks`, `updateWebhook`, `deleteWebhook` | | **钱包分析** | 钱包API | `getWalletIdentity`, `getWalletBalances`, `getWalletHistory`, `getWalletTransfers` | | **交易历史** | 增强交易 | `parseTransactions` | -| **入门** | CLI, 授权 | `generateKeypair`, `agenticSignup`, `setHeliusApiKey` | +| **入门** | CLI, 授权 | `generateKeypair`, `signup`, `setHeliusApiKey` | | **Solana知识** | SIMD, 源代码, 博客 | `getSIMD`, `readSolanaSourceFile`, `fetchHeliusBlog` | ## 前提条件 diff --git a/zh/agents/typescript-sdk.mdx b/zh/agents/typescript-sdk.mdx index 06dd54cf..b163c671 100644 --- a/zh/agents/typescript-sdk.mdx +++ b/zh/agents/typescript-sdk.mdx @@ -90,17 +90,25 @@ import { makeAuthClient } from "helius-sdk/auth/client"; const auth = makeAuthClient(); -// All-in-one shortcut: -const result = await auth.agenticSignup({ secretKey: keypair.secretKey }); -// result: { jwt, walletAddress, projectId, apiKey, endpoints, credits } - -// Or step-by-step: -const keypair = await auth.generateKeypair(); -const address = await auth.getAddress(keypair); -const { message, signature } = await auth.signAuthMessage(keypair.secretKey); -const { token } = await auth.walletSignup(message, signature, address); -const project = await auth.createProject(token); -const apiKey = await auth.createApiKey(token, project.id, address); +// 托管链接注册(返回用户在浏览器中打开的 paymentUrl): +const link = await auth.signup({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// link: { kind: "payment_required", jwt, refId, walletAddress, paymentLink: { paymentUrl, ... } } + +// 或者从本地密钥对直接支付 USDC 并一次完成配置: +const result = await auth.signupAndPay({ + secretKey: keypair.secretKey, + plan: "agent", + email: "you@example.com", + firstName: "Ada", + lastName: "Lovelace", +}); +// result.kind: "completed" | "pending" | "expired" | "failed" | "already_subscribed" | "upgrade_required" ``` ## 深入探讨