{
  "schema": "sun-agent-discovery/v1",
  "name": "SUN",
  "purpose": "BNB Smart Chain token launchpad with project-specific Mint terms before public trading",
  "context": {
    "productionSite": "https://aisun.win/",
    "productionConfig": "https://aisun.win/api/config.json",
    "instructionsPath": "./agent.md",
    "agiPath": "./#/agi",
    "cli": "node sun-agent.mjs",
    "cliDownload": "https://aisun.win/sun-agent.mjs",
    "cliRuntime": "Node.js 22 or newer",
    "sourceCli": "node agent/orbit.mjs",
    "defaultProductionChainId": 56,
    "nativeCurrency": "BNB",
    "environment": {"ORBIT_RPC_URL": "rpcUrl", "ORBIT_CHAIN_ID": "chainId", "ORBIT_FACTORY": "factory"},
    "contractAddressSource": "The standalone CLI reads productionConfig by default and verifies BSC and the active factory on-chain. Set all deployment fields explicitly for a local, preview or historical deployment.",
    "versionSource": "The selected factory's on-chain economics getter, surfaced by inspect, decides which economics apply. Source code candidates and sample launches do not establish deployment.",
    "missingConfig": "Factory absent or empty means a demonstration only. RPC or snapshot failure means current state is unknown."
  },
  "onboarding": {
    "prompt": {
      "en": "Help me use SUN (https://aisun.win) in English. Read https://aisun.win/agent.json and https://aisun.win/agent.md, show the available actions, and ask what I want to do first. I will choose the token, shares, or launch settings in this chat, without first signing in to SUN or filling in a web form.\n\nIf you can open URLs or call HTTP, use the public SUN Agent API at https://aisun.win/api/agent/v1/ for available actions. Use the published capabilities to help with project discovery, contract addresses and Mint progress, launching, minting, refunds, trading, holdings, referrals, rewards, and project profiles. Ask for missing parameters only.\n\nUse my own Binance Agentic Wallet when needed. Verify the chain and full contract addresses, show the quote and official wallet preview, and wait for my approval before submitting any asset operation. Verify the receipt before reporting success. If this AI lacks a required tool, explain the limitation and give me the matching official SUN entry.",
      "zh": "请用中文协助我使用 SUN（https://aisun.win）。先读取 https://aisun.win/agent.json 和 https://aisun.win/agent.md，告诉我可用的操作，并问我想先做什么。我会在对话里选择代币、份数或发射参数，无需先登录 SUN 或填写网页表单。\n\n如果你可以访问网址或调用 HTTP，请优先用 SUN 公开接口 https://aisun.win/api/agent/v1/ 执行支持的操作。按能力清单协助找项目、查合约和 Mint 进度、发射、Mint、退款、买卖、持仓、邀请、奖励和项目资料，只问缺少的参数。\n\n需要钱包时使用我自己的币安 Agentic Wallet。核对链和完整合约地址，展示报价和官方钱包预览，等我确认后再提交资产操作，核对回执后才报告成功。如果当前 AI 缺少某项工具，说明限制并给出对应的 SUN 官方入口。"
    },
    "discoveryNeedsWallet": false,
    "quoteUsesPublicWalletAddress": true,
    "walletConnectFor": "Review and authorize a wallet operation or select the account for a personal browser view.",
    "unverifiedLiveState": "Give the user the matching SUN project or AI Mint link. Keep any supplied token and shares in the review draft and never invent live state."
  },
  "publicApi": {
    "baseUrl": "https://aisun.win/api/agent/v1/",
    "openapi": "https://aisun.win/api/agent/v1/openapi.json",
    "authentication": "none",
    "method": "GET",
    "mode": "READS_AND_UNSIGNED_QUOTES",
    "actions": ["describe", "list", "inspect", "prepare-launch", "quote-mint", "quote-binance-mint", "quote-refund", "refund-positions", "receipt"],
    "execution": "The user's own wallet must preview, authorize and submit any asset operation."
  },
  "browser": {
    "discover": "https://aisun.win/",
    "launchDraft": "https://aisun.win/#/agi",
    "mint": "https://aisun.win/#/agents",
    "mintWithDraft": "https://aisun.win/#/agents?token=<TOKEN>&shares=<SHARES>",
    "project": "https://aisun.win/#/token/<TOKEN>",
    "projectMintWithDraft": "https://aisun.win/#/token/<TOKEN>?tool=aiMint&shares=<SHARES>&ref=<REFERRER>",
    "draftRules": "Omit fields the user did not provide. Links open a review page. Use the project page for eligible refunds and Mint progress.",
    "websiteActions": {
      "buySell": {
        "sunCli": [],
        "url": "https://aisun.win/#/token/<TOKEN>",
        "availability": "The market opens after pool activation on supported projects. SUN trading must be enabled and the user reviews and approves with a browser wallet."
      },
      "holdings": {
        "sunCli": ["inspect", "refund-positions"],
        "url": "https://aisun.win/#/assets",
        "availability": "The CLI reads BNB balance and one project's Mint and refund position using a public address. The website scans SUN token holdings across the catalog for the connected browser account."
      },
      "referrals": {
        "sunCli": ["inspect", "quote-mint", "quote-binance-mint"],
        "url": "https://aisun.win/#/token/<TOKEN>?tool=referrals",
        "availability": "The CLI reports project quota and supports an optional referrer in a Mint quote. The website verifies the active account for its invitation link while Mint is open and referrals are enabled."
      },
      "rewardsAndPayouts": {
        "sunCli": [],
        "url": "https://aisun.win/#/token/<TOKEN>",
        "payoutUrl": "https://aisun.win/#/assets",
        "availability": "Open More details to view rewards on a supported live market. Supported deferred payouts are in My assets. Eligibility and any claim are checked for the connected recipient."
      },
      "projectAssetsAndProfile": {
        "sunCli": ["inspect"],
        "url": "https://aisun.win/#/token/<TOKEN>",
        "newProjectUrl": "https://aisun.win/#/create",
        "availability": "The CLI reads the on-chain name and symbol. The project page shows public profile data and available logo and listing tools under More details. New-project profile and enabled logo upload are in the launch form."
      }
    },
    "agentHandoffs": {
      "codex": "On desktop, open a Mint instruction draft in the user's installed Codex app. The user sends it.",
      "claudeCode": "On desktop, open a Mint instruction draft in the user's installed Claude Code app. The user sends it.",
      "binanceAiPro": "Copy the Mint instructions and open https://ai.binance.com/. The user pastes the instructions into the chat."
    }
  },
  "agentRuntimes": {
    "cli": {
      "requires": "The user's trusted agent runtime with Node.js 22+ and terminal access.",
      "supports": "Run SUN discovery, inspect, quote and receipt commands. The official Binance Wallet skill can preview a supported operation in the user's wallet."
    },
    "binanceAiPro": {
      "officialGuide": "https://web3.binance.com/en/dev-docs/products/agentic-wallet/ai-pro",
      "supports": "The built-in Agentic Wallet skill, in-chat sign-in and Binance's documented wallet operations.",
      "sunIntegration": "Copy a text prompt into AI Pro. Official documentation does not specify installing the SUN CLI or skill, registering a custom HTTP or MCP tool, or returning the wallet connection to SUN.",
      "fallback": "If a live SUN quote or the exact official wallet preview is unavailable, open the SUN project or AI Mint page for review."
    }
  },
  "execution": {
    "mode": "READ_ONLY",
    "requiresWalletSecret": false,
    "signs": false,
    "submits": false,
    "walletApprovalRequiredForSubmission": true,
    "walletSteps": ["Connect a standard EVM wallet in SUN and approve the exact transaction in that wallet.", "For Binance Agentic Wallet, the owner starts sign-in with the official Binance Wallet skill or BAW CLI in their trusted agent environment. The owner checks the pairing code and confirms on the original Binance page and in the Binance App.", "Read the official CLI's public BSC address, check Developer Mode, prepare quote-binance-mint, and use binancePreviewCommand only when ready. Review the successful preview with the user before executing its request ID. Follow any Binance App approval."],
    "unknownOrder": "Continue tracking the original provider order or original transaction hash. Wait for a verified terminal result before considering another submission. A separately observed identical transaction cannot prove the original provider order was resolved."
  },
  "launchDraft": {
    "mode": "BROWSER_DRAFT",
    "browserPath": "./#/agi",
    "encoding": "Set the hash query parameter draft to encodeURIComponent(JSON.stringify(payload)).",
    "payloadVersion": 1,
    "fields": {
      "name": "User-confirmed token name, at most 60 characters and 64 UTF-8 bytes",
      "symbol": "User-confirmed token symbol, at most 16 UTF-8 bytes",
      "mint.maxShares": "Total Mint shares, whole-number decimal string",
      "mint.sharePrice": "BNB price per share, plain decimal string",
      "mint.mintTokens": "Human-readable token quantity for Mint, plain decimal string, up to 18 decimals",
      "mint.poolTokens": "Human-readable token reserve for the pool, plain decimal string, up to 18 decimals",
      "quota.baseQuota": "Optional whole-share string from 1 to 100 for the starting Mint quota on a supported factory",
      "quota.invitationQuota": "Optional whole-share string from 1 to 100 added per qualifying invitation on a supported factory"
    },
    "examplePayload": {
      "v": 1,
      "name": "Spark",
      "symbol": "SPARK",
      "mint": { "maxShares": "100000", "sharePrice": "0.001", "mintTokens": "800000000", "poolTokens": "200000000" }
    },
    "missingFields": "Omit details the user has not supplied. SUN shows the draft first and leaves the remaining settings to the launcher.",
    "nextStep": "Return the draft URL to the user. The user reviews the draft in AGI, opens it in the launch form, completes the settings and approves the final transaction in their browser wallet."
  },
  "units": {
    "shares": "Positive integer in quote-mint",
    "mintPriceSource": "Read sale.sharePrice and mintTerms at the quote's canonical block. Project economics versions 6, 7 and 8 use mintTerms(token) with project-specific maxShares, sharePrice, mintTokens and poolTokens.",
    "legacySharePriceWei": "1000000000000000",
    "legacySharePriceBnb": "0.001",
    "gasPaidSeparately": true,
    "integerEncoding": "Share counts and token or wei quantities are base-10 strings. Chain IDs, block heights, block timestamps and version numbers are JSON numbers."
  },
  "launchModes": {
    "availability": "Project economics versions 6, 7 and 8 use custom mode ID 5 and mintTerms(token). Older factories use SHARE_PRICE() and modeTerms(mode). Read the registered launch's actual terms. The legacy catalog below does not establish deployment or availability.",
    "known": [
      {"id": 0, "name": "Standard", "nameZh": "标准", "maxShares": "300000", "raiseTargetBnb": "300"},
      {"id": 1, "name": "Quick", "nameZh": "快速", "maxShares": "30000", "raiseTargetBnb": "30"},
      {"id": 2, "name": "Turbo", "nameZh": "极速", "maxShares": "5000", "raiseTargetBnb": "5"},
      {"id": 3, "name": "Supreme", "nameZh": "至尊", "maxShares": "1600000", "raiseTargetBnb": "1600"},
      {"id": 4, "name": "Advanced", "nameZh": "进阶", "maxShares": "100000", "raiseTargetBnb": "100"}
    ],
    "custom": {"id": 5, "name": "Custom", "nameZh": "自定义", "termsGetter": "mintTerms(address token)", "projectEconomicsVersion": 6, "projectEconomicsVersions": [6, 7, 8]},
    "unknownMode": "An unrecognized ID is displayed as Mode <id>. Its payment and allocation use the terms successfully read from the selected factory's supported economics version."
  },
  "commands": {
    "describe": {
      "requires": [],
      "returns": "Offline discovery manifest"
    },
    "prepare-launch": {
      "exactlyOneOf": {
        "sentence": "One sentence with the intended token name, symbol and specified Mint parameters",
        "draft": "Version 1 launchDraft JSON with the user-confirmed fields"
      },
      "optional": {"site": "https://aisun.win/ or an explicit local loopback preview URL"},
      "returns": "An offline validated launch draft, fields to complete and reviewUrl"
    },
    "list": {
      "optional": {"start": "Zero-based offset", "limit": "1–25, default 10"},
      "returns": "Observed factory version, Mint pause state, registered tokens, per-sale availability and nextStart"
    },
    "inspect": {
      "required": {"token": "Full project token address"},
      "optional": {"wallet": "Full wallet address"},
      "returns": "Pinned block, live per-project Mint terms and sale state, pool and economics version, locked V7/V8 trade tax and split, V8 Mint allocation, and optional wallet eligibility, quota and pre-gas amount"
    },
    "quote-mint": {
      "required": {"token": "Full project token address", "wallet": "Full intended payer address", "shares": "Positive whole number"},
      "optional": {"referrer": "Full user-approved referral address"},
      "returns": "Pinned per-project Mint terms and eligibility checks, exact principal, expected tokens, graduation flag, simulation, gas and unsigned transaction only when ready"
    },
    "quote-binance-mint": {
      "required": {"token": "Full project token address", "wallet": "Public BSC address returned by the official Agentic Wallet CLI", "shares": "Positive whole number"},
      "optional": {"referrer": "Full user-approved referral address"},
      "returns": "The Mint quote after applying the factory's verified AI Mint policy. On BSC, ready quotes include the exact official BAW preview command. The command never signs or sends."
    },
    "quote-refund": {
      "required": {"token": "Full project token address", "wallet": "Full original payer address", "shares": "Positive whole number or all"},
      "optional": {"identity": "Historical position identity", "recipient": "Full refund recipient address approved by payer"},
      "returns": "Refund principal and unsigned transaction only when ready"
    },
    "refund-positions": {
      "required": {"token": "Full project token address", "wallet": "Full original payer address", "from-block": "Inclusive first block"},
      "optional": {"to-block": "Inclusive last block; range at most 5000 blocks"},
      "returns": "Historical refundable positions held by the payer"
    },
    "receipt": {
      "required": {"tx-hash": "Original submitted transaction hash", "quote": "Path to original saved quote JSON"},
      "optional": {"confirmations": "Positive whole number, default 1"},
      "returns": "Receipt and matching factory event checked against the original quote, with its saved Mint terms rechecked at the original canonical snapshot"
    }
  },
  "saleStatus": {
    "MINTING": "Sale is open at the reported block. Quote the exact wallet and shares.",
    "PAUSED": "Factory has paused Mint. Consult inspect again later; pre-launch refund quotes are separate.",
    "GRADUATED": "Pool has launched. Mint and pre-launch refunds have ended.",
    "SOLD_OUT": "The chain reports no remaining shares."
  },
  "quoteIssues": {
    "AI_MINT_POLICY_UNAVAILABLE": "The managed factory's AI Mint policy could not be verified. Retry when its current state is available.",
    "AI_MINT_DISABLED": "The verified factory policy currently disables AI Mint.",
    "AGENT_ID_REQUIRED": "Use a wallet that owns the required on-chain Agent ID.",
    "QUOTA_EXCEEDED": "Reduce the share count to the remaining quota.",
    "SALE_CAP_EXCEEDED": "Reduce the share count to the remaining sale supply.",
    "MINT_PAUSED": "Wait for Mint to resume and obtain a fresh quote.",
    "ALREADY_LAUNCHED": "Pre-launch Mint and refund are closed.",
    "INSUFFICIENT_PRINCIPAL": "The wallet lacks the Mint principal.",
    "INSUFFICIENT_GAS_BALANCE": "The wallet lacks the principal plus estimated gas.",
    "INVALID_REFERRER": "Verify the intended referral and quote again.",
    "HISTORICAL_IDENTITY_REQUIRED": "Use refund-positions to find the historical identity.",
    "NO_SUCH_REFUNDABLE_SHARES": "Check the original payer's remaining refundable shares.",
    "SIMULATION_REVERTED": "The exact operation reverted. Re-read the launch before another quote."
  },
  "receiptStatus": {
    "UNKNOWN": {"terminal": false, "nextAction": "TRACK_ORIGINAL_TRANSACTION"},
    "PENDING": {"terminal": false, "nextAction": "TRACK_ORIGINAL_TRANSACTION"},
    "CONFIRMING": {"terminal": false, "nextAction": "TRACK_ORIGINAL_TRANSACTION"},
    "CONFIRMED": {"terminal": true, "nextAction": "COMPLETE"},
    "REVERTED": {"terminal": true, "nextAction": "REVIEW_REVERT_AND_REQUOTE"}
  }
}
