Skip to content

Add zero-custody Solana tool plugins (pay-request, token-risk-check, sns-resolve, unsigned-transfer)#139

Open
ertanyeni wants to merge 1 commit into
zeroclaw-labs:mainfrom
ertanyeni:solana-tools
Open

Add zero-custody Solana tool plugins (pay-request, token-risk-check, sns-resolve, unsigned-transfer)#139
ertanyeni wants to merge 1 commit into
zeroclaw-labs:mainfrom
ertanyeni:solana-tools

Conversation

@ertanyeni

Copy link
Copy Markdown

Zero-custody Solana tool plugins

Four standalone wasm32-wasip2 tool plugins that let a ZeroClaw agent help move money on Solana without ever holding a key — the agent proposes; a human or a Squads multisig disposes. Each follows the upstream redact-text layout and is independently buildable, reviewable, and installable.

Tool Tier Job Authority
sns_resolve T0 Resolve a .sol name to its current on-chain owner Read-only Solana RPC
token_risk_check T0 Assess mint/freeze authority, token program, holder concentration Read-only Solana RPC
solana_pay_request T1 Build a validated Solana Pay URL for SOL or SPL tokens No network, signer, or key
unsigned_transfer T1 Assemble an unsigned SOL/SPL transfer for a human/Squads to sign Read-only RPC; never signs

Together they form a safe payment path: resolve a human-readable recipient → vet the SPL mint → build a Solana Pay request or a ready-to-sign transaction whose signature still stays with the owner. The agent can research, validate, and propose — but cannot move funds by itself.

Deny by default

  • solana-pay-request declares permissions = []; the two T0 readers get only HTTP-client + config-read for RPC. No component imports signing or secret-management capabilities; every execute path logs an event via the host logging interface.
  • Fails closed at each trust boundary: payment requests reject malformed recipients/mints/references/amounts (display fields percent-encoded, recipient preserved verbatim for wallet review); token checks never turn missing/unknown mint data into a green verdict (unverifiable = high risk); name resolution derives the account deterministically and rejects absent/malformed/ownerless/unsupported results.

Quality / mergeability

  • Small auditable cores + thin WIT shims for ZeroClaw's tool-plugin world; a shared hardened rpc.rs.
  • Per-tool README with custody tier, threat model, and a prompt-injection transcript; offline adversarial tests + golden vectors in every plugin.
  • cargo fmt --check clean, clippy clean, cargo test passing; release builds expose exactly the tool + plugin-info interfaces (networked components use host wasi:http).
  • No registry.json edits (left to CI).

Dev repo (full history, demo web UI, one-pager): https://github.com/ertanyeni/zeroclaw-solana-plugins

- solana-pay-request (T1): build Solana Pay transfer-request URLs + QR payloads
- token-risk-check (T0): on-chain mint/freeze-authority + holder-concentration risk
- sns-resolve (T0): resolve .sol names to owner addresses (SNS)
- unsigned-transfer (T1): assemble an unsigned SOL/SPL transfer for the user's wallet to sign

Each is a wasm32-wasip2 tool plugin matching the redact-text layout, with a per-tool
README (custody tier + threat model + prompt-injection transcript), a shared hardened
rpc.rs, and passing cargo fmt/clippy/tests. No registry.json edits (CI-generated).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants