rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:ph4310822/dsh-x402-wallet
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
A visual x402 payment wallet for DeepSeek Harness. Install one bundle and your agent can discover paid APIs, estimate their cost, and pay-and-call them over the x402 protocol — while a Phantom-style wallet popup gives you multi-wallet custody, QR receive, USDC send, and on-chain activity, all inside the DSH web GUI.
dsh plugin --profile web add @danielng23/dsh-x402-wallet
Restart dsh web — the x402 Wallet entry appears in the sidebar.

x402_discover, x402_estimate, x402_balance, x402_pay) discover x402-enabled APIs, probe their price without paying, and pay-and-call them with a spend cap and your approval.trustedHosts, blockedHosts, requireTrustedHost)./wallet, /balance, and /send <address> <amount> composer commands drive the wallet from any interactive adapter.The wallet speaks the x402 protocol natively with the exact (EIP-3009) scheme: the wallet signs a transfer authorization and the gateway settles on-chain, so the wallet pays no gas. Every paid call enforces maxCostUsdc (abort before signing when the cost exceeds the cap) and asks for your approval with the exact amount first.
Two different transfers, one wallet:
| What | How it works | Gas |
|---|---|---|
| Agent calls a paid API | Model runs x402_pay → probe → cap → approval → EIP-3009 signature → gateway settles |
none (paid by the API provider's gateway) |
| You move funds out of the wallet | Popup Send → plain on-chain ERC-20 transfer (viem, awaited receipt) | yes (normal network gas) |
No real money needed: point the host service at Base Sepolia and grab testnet USDC from the in-app faucet link on the receive screen.
# cordis.yml patch rows with a testnet config
- insert:
- id: x402
name: '@danielng23/dsh-x402'
config:
network: eip155:84532
rpcUrl: https://sepolia.base.org
- id: ui-x402
name: '@danielng23/dsh-client-ui-x402'
Create a wallet, open Receive, and follow the Get testnet USDC link to fund it — then ask the agent to pay for an API.
Published on the npm registry (any DSH installation):
dsh plugin --profile web add @danielng23/dsh-x402-wallet
From this checkout (development):
# installs the local checkout; the `file:` prefix is required — a bare path is
# recorded as pnpm `link:`, which skips installing the bundle's host/ui
# dependencies (see "Local development" below). `pnpm` must be on PATH.
dsh plugin --profile web add file:/absolute/path/to/dsh-x402-wallet/packages/bundle
To undo: dsh plugin --profile web remove @danielng23/dsh-x402-wallet. The wallet is opt-in — the shipped DSH web profile does not include it.
Looking for the general pattern to build and test other DSH plugins the same way? See LOCAL_DEVELOPMENT.md.
Everything below writes only to ~/.dsh (your profile directory); the harness
checkout is never modified. Requires a run-from-source harness checkout
(built with pnpm run build) and Node ^22.19.0 || >=24.0.0.
# 1. Build the plugin packages (tsc + tsdown emit lib/ for host and ui)
cd /path/to/dsh-x402-wallet
pnpm build
node scripts/repoint-typert.mjs # only after a typert regeneration — see Known issues
# 2. Install the local checkout into the web profile (run from the harness checkout)
cd /path/to/deepseek-harness
pnpm dsh plugin --profile web add file:/absolute/path/to/dsh-x402-wallet/packages/bundle
# 3. Verify the composed layer without booting
pnpm dsh --profile web --dump-config # look for "# == @danielng23/dsh-x402-wallet"
# 4. Boot the GUI on a non-default port (the default is 3080)
pnpm dsh web --port 3081 # open http://127.0.0.1:3081 and hard-refresh (⌘⇧R)
Iteration loop — the profile holds copies, not symlinks, so after editing sources you must refresh them before restarting:
cd /path/to/dsh-x402-wallet && pnpm build
cd ~/.dsh/profiles/web && pnpm install # re-copies the rebuilt lib/ from the checkout
# then restart: cd /path/to/deepseek-harness && pnpm dsh web --port 3081
Notes:
dsh creates every profile with autoInstallPeers: false and
nodeLinker: hoisted, so the @deepseek-ai/* peer packages are not
fetched from npm — they resolve at runtime from the healed
$DSH_HOME/profiles/node_modules fallback. Only the non-DSH dependencies
(@x402/*, viem, schemastery, zod, react-qr-code) are installed.dsh web: http://127.0.0.1:3081 and no
did not activate error; the boot audit throws on any pending entry, so a
running server means the whole plugin tree settled.file: deps must be flipped to ^ ranges
(node scripts/prepublish.mjs) and lib/ must be freshly built.Live tracker of planned, in-progress, and shipped features; details and delivery order live in ROADMAP.md. One feature per release — each ships tested, verified, and version-noted below.
x402_spend / x402_receipts tools and
/spend / /payments composer commands: the model can report today's spend
vs. budget and verify what it paid. (0.1.4)x402_pay calls can never overspend the daily budget. (0.1.5)capped (upto/Permit2) scheme still planned.hostCaps) and rolling approval rate limit (maxApprovalsPerMinute). (0.1.9)trustedHosts /
blockedHosts / requireTrustedHost from the Settings card. (0.1.10)zh/en as
selectable locales, so a third language cannot be registered by a plugin.X402_PRIVATE_KEY.packages/host/ @danielng23/dsh-x402 host service + tools + /remote
packages/ui/ @danielng23/dsh-client-ui-x402 browser GUI (dsh.client manifest)
packages/bundle/ @danielng23/dsh-x402-wallet installable patch layer
Product site: https://ph4310822.github.io/dsh-x402-wallet/ (static, in docs/).
cordis.yml patch layer.packages/x402/x402, packages/client/ui-x402) and ship here as a standalone, installable distribution.The three packages publish in dependency order, host → ui → bundle:
# bump each version first (e.g. npm version patch), then:
node scripts/regen-typert.mjs # after any @Remote surface change (see Known issues)
node scripts/prepublish.mjs # flips the bundle's file: deps to ^ ranges (npm can't resolve file:)
npm publish ./packages/host
npm publish ./packages/ui
npm publish ./packages/bundle
git checkout packages/bundle/package.json # restore the file: specs for local development
packages/host and packages/ui ship their built lib/ (the /remote
typert artifacts included). Rebuilding from source requires the DSH
repository's typert generator; build there and copy lib/ back, then run
node scripts/repoint-typert.mjs to restore the @danielng23 scope (see
Known issues), or keep the committed artifacts. Publishing requires npm
two-factor authentication (recovery code or authenticator).
Before the first publish, run a clean-room check that simulates the npm experience in a scratch home:
DSH_HOME=/tmp/dsh-release-check pnpm dsh plugin --profile web add @danielng23/dsh-x402-wallet
DSH_HOME=/tmp/dsh-release-check pnpm dsh web --port 3082 # open the wallet there
x402/payment event via ctx.remote.$on, but the
harness forwards only its own allowlist (API_REMOTE_FORWARDED_EVENTS in
@deepseek-ai/dsh-api-remotes) to the browser, and x402/payment is not on
it. The event therefore never reaches the client: wallet operations and
manual refresh work, but the popup will not auto-refresh the instant a
payment settles. Fixing it requires the harness to allowlist the event (or
the plugin to poll).@deepseek-ai/dsh-typert-protocol
symbols when that package is registered under the workspace's packages/;
scripts/regen-typert.mjs satisfies that by vendoring a copy of the
protocol package at packages/_vendor/protocol (with a paths override
in tsconfig.host.json). Run it after changing the host's @Remote
surface, then node scripts/repoint-typert.mjs as a scope safeguard. A
stale artifact (wrong package field or missing methods) makes the
typert-loader reject the host face and the wallet's RPC endpoints misbehave
(HTTP 404 or missing methods).file:
install snapshots lib/ at install time; after editing sources you must
pnpm build and re-run pnpm install in the profile, then restart
dsh web. A stale profile copy is the usual cause of
"bundle loaded without registering" (loader-id mismatch) or a missing GUI.^22.19.0 || >=24.0.0; running on
other versions (e.g. v23) works but prints an unsupported-engine warning —
pin 22/24 (e.g. with nvm) for a clean run.dsh-created profiles set autoInstallPeers: false, so
@deepseek-ai/* peers are resolved from the healed
profiles/node_modules fallback and are never fetched from the registry.approvalRequired true (the default) in any deployment that touches real funds.@deepseek-ai/dsh-*, @deepseek-ai/cordis) resolve from the DSH installation; only the non-DSH dependencies (@x402/*, viem, schemastery, zod, react-qr-code) are fetched from npm.| Version | Summary |
|---|---|
| 0.1.17 | Address book: saved recipients persisted to localStorage, with a picker and save-to-address-book in the send form. |
| 0.1.16 | Activity detail drawer: expandable history rows showing full tx metadata (from, to, amount, block, explorer link). |
| 0.1.15 | Spend analytics: per-host settled-spend breakdown (amount + call count) in the popup, computed from payment records. |
| 0.1.14 | Fiat on-ramp: MoonPay buy link prefilled with the wallet address on the receive screen (mainnet). |
| 0.1.13 | Catalog upgrades: sort by price/name and filter by network in the API browser, plus a per-entry copy-URL action. |
| 0.1.12 | In-GUI settlement toasts: a toast pops when a paid call settles (detected via the refresh poll), auto-dismissing. |
| 0.1.11 | Watch-only wallets (view balances, no key / can't pay or send) + native ETH/gas balance in the popup. |
| 0.1.10 | Trusted-hosts allowlist UI: edit trustedHosts / blockedHosts / requireTrustedHost from the Settings card. |
| 0.1.9 | Security hardening: per-host per-call caps (hostCaps) and rolling approval rate limit (maxApprovalsPerMinute). |
| 0.1.8 | Protocol depth: bounded retry/backoff on the signed paid call (network errors and 5xx), reusing the same EIP-3009 nonce so a retry can't double-charge. |
| 0.1.7 | Scoped budgets: per-host daily budgets (hostBudgets), per-host call rate limits (hostRateLimits), and a session budget (sessionBudgetUsdc, editable in Settings). |
| 0.1.6 | Custody completeness: reveal mnemonic, rename wallets, delete wallets (with key+mnemonic purge). Inline rename/delete in the wallet switcher. |
| 0.1.5 | Budget-race lock: per-day async mutex serializing the daily-budget check with the spend update so concurrent paid calls can't overspend. |
| 0.1.4 | Agent spend visibility: x402_spend / x402_receipts tools and /spend / /payments composer commands, per-host spend tally, prompt update. |
| 0.1.3 | Chunked deep history, persisted payments, BaseScan links, receive polling, English host messages. |
| 0.1.2 | Wallet-switch account fix, README/logo/website updates. |
| 0.1.1 | Corrected repository metadata. |
| 0.1.0 | Initial release: four model tools (discover, estimate, balance, pay), wallet popup, composer commands. |
MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek。