Commit Graph
14 Commits
Author SHA1 Message Date
zhongsongzhi-cmyk b1c6bd095c fix(cli): remove interactive trade confirmations 2026-10-14 17:50:02 +08:00
zhongsongzhi-cmykandClaude b5cca5cc6d fix(confirm): address review findings on the trade confirmation gate
- Escape every non-visible character in the confirmation block by Unicode
  property (\p{C}, \p{Z}, \p{M}, Default_Ignorable_Code_Point, U+2800) instead
  of a hand-kept list; soft hyphens, Hangul fillers, tag characters etc. can no
  longer make a fee-share username look like another.
- Fold only fields a command declares as blobs (cooking --image); key fields
  are always shown in full. multi-swap and strategy create/cancel now validate
  their addresses like swap does.
- Judge protections on the values being sent (min_output 0, anti_mev_mode off,
  expire_in 0 now warn), and reject NaN / Infinity / negative --slippage,
  --percent, --expire-in, --dev-wallet-bps before they reach a signed body.
  --gas-price is converted gwei→wei exactly (was float-rounded).
- Total tip / priority fees per container, including sell_param / buy_param and
  buy_trade_config / sell_trade_config, so section ① no longer understates.
- Anti-MEV warning only where accurate: none for swap (documented default on),
  "server default applies" for multi-swap / strategy on sol / bsc / eth, and
  an explicit "off" warning for cooking create on sol.
- Bind confirmations to method + route + query + body, and require one for
  every signed non-GET request (deny by default) instead of a path allowlist.
- In interactive mode write the block to /dev/tty, so the process launcher
  cannot filter what the human reads before typing yes.
- Display: swap --percent shows the bps line first and marks input_amount as
  ignored; strategy amount_in_percent and multi-swap per-wallet bps show "% of
  balance"; multi-swap shows the wallet count.
- Group risky leaves in linear time; load credentials before confirmation so a
  missing key is reported before the user types yes.
- Sync skills/gmgn-swap, skills/gmgn-cooking and docs/cli-usage.md with the
  gated order strategy cancel and its --yes flag.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-29 16:45:26 +08:00
zhongsongzhi-cmykandClaude 2d6f565590 fix(confirm): derive trade confirmation from the signed body and verify it before signing
The confirmation prompt for swap / multi-swap / order strategy create /
cooking create printed a hand-written summary that omitted fields still sent
and signed: tip / priority fees, gas, min_output_amount, condition_orders
(auto TP/SL), check_price, sell_param / buy_param, buy_wallets,
snip_buy_wallets, dev_wallet_bps and the creator fee-share lists. A
prompt-injected agent could hide any of them behind a normal-looking summary.

Layer 1 - confirmTrade now takes the request object itself, flattens it to
every leaf field and prints four sections: key fields; risky fields, each
with a plain-language consequence and never folded; protections that are NOT
set (no min output, no slippage limit, anti-MEV not requested, no expiry);
and every remaining field. Section 4 is "whatever 1-3 did not print", so new
parameters appear automatically. Long strings (e.g. --image base64) fold to
<string, size, sha256>, gas_price is echoed in gwei, and command-side totals
are added (extra fees, total buy spend across dev / bundle / snipe wallets,
creator-fee recipients). Control, C1, bidi and zero-width characters are
escaped so a value cannot rewrite or hide lines.

Layer 2 - confirmTrade records the canonical-JSON sha256 of the confirmed
body; authSignedRequest refuses to sign swap, multi_swap, strategy/create,
strategy/cancel and create_token unless the exact body being signed was
confirmed, consuming the confirmation so it authorizes one signature. This
blocks a new command that forgets confirmTrade and a body mutated after
confirmation.

Layer 3 - order strategy cancel gets the same gate and --yes flag; cooking
create JSON options fail with a clear error instead of a raw SyntaxError;
Readme / Readme.zh now state the confirmation block is the complete request
body about to be signed.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-29 15:38:44 +08:00
zhongsongzhi-cmyk 0ffec3f73a docs(cli): synchronize OpenAPI contracts 2026-09-16 16:41:01 +08:00
zhongsongzhi-cmyk af73701a8d chore: bump gmgn-cli to 1.6.3 2026-09-14 19:46:20 +08:00
zhongsongzhi-cmyk a8f40a4be3 feat(cli): document Pro-only 1s kline 2026-09-14 19:45:58 +08:00
zhongsongzhi-cmyk d2e4e96865 feat: document Pro-only 1s kline support 2026-09-14 19:45:58 +08:00
zhongsongzhi-cmyk 263e699397 feat: support arbitrum and hyperevm 2026-09-11 11:31:49 +08:00
zhongsongzhi-cmykandClaude Opus 4.8 6572db0e2d docs: correct market trenches --limit / --launchpad-platform description
The CLI docs promised behavior the API does not deliver:

- --limit: was "max 80 (default 80)". In reality it is best-effort only —
  the new_creation category is served from a fixed live window (~60), so
  larger and smaller --limit values both tend to return ~60. Documented as
  best-effort.
- --launchpad-platform: was "default: all platforms for the chain". In
  reality, when omitted the server injects a fixed per-chain default
  allow-list (not literally all platforms), and passing values REPLACES that
  allow-list (fewer platforms => less data). Platforms outside the list
  (incl. some newer RWA / tokenized-stock launchpads) are filtered out.
- Added the previously-missing robinhood platform slug list, and noted that
  arc/stable apply no launchpad filter (all platforms).

Docs only; no code change.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-10 15:36:35 +08:00
zhongsongzhi-cmyk 25f3452722 fix(cli): close HTTP dispatcher before exiting on errors 2026-09-01 15:34:49 +08:00
zhongsongzhi-cmyk 37a078be40 feat: show plan upgrade guidance on rate limits 2026-08-26 20:15:16 +08:00
zhongsongzhi-cmyk 8eaee1cb03 feat(portfolio): add batch wallet profits command 2026-08-20 15:57:17 +08:00
zhongsongzhi-cmyk 8036b3c096 fix(trenches): defer launchpad defaults to service 2026-08-15 11:46:23 +08:00
zhongsongzhi-cmykandClaude Opus 4.8 bd4af1f345 docs(gmgn-market): add market search subcommand
Document the new `market search` command backed by the openapi-service
`GET /v1/market/search` endpoint (search_v3). Covers parameters, the
coins/wallets response shape, usage examples, and output format, plus
updates to the frontmatter, sub-commands table, supported chains note,
rate-limit table, and Notes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-08-12 16:25:09 +08:00