Skip to content

feat: add Solana invoice guard plugins#113

Open
YoungblutSchilling wants to merge 1 commit into
zeroclaw-labs:mainfrom
YoungblutSchilling:feat/solana-invoice-guard
Open

feat: add Solana invoice guard plugins#113
YoungblutSchilling wants to merge 1 commit into
zeroclaw-labs:mainfrom
YoungblutSchilling:feat/solana-invoice-guard

Conversation

@YoungblutSchilling

Copy link
Copy Markdown

Solana Invoice Guard

Adds two composable, least-privilege ZeroClaw tool plugins for Solana invoice workflows:

  • solana-pay-request (T1 / build-only): creates canonical Solana Pay transfer URIs without accessing a wallet, signing, or touching the network.
  • solana-payment-verify (T0 / read-only): verifies finalized or confirmed SOL and SPL invoice payments from transaction data. It validates recipient net balance delta, transaction success, mint, reference, memo, and exact/at-least amount policies.

Security and reliability

  • Explicitly fail-closed handling for malformed RPC responses and SPL decimal precision above 19.
  • RPC endpoint hardening rejects credentials, localhost, reserved/private/special IP literals, query strings, and fragments.
  • No wallet access, signing, funds movement, or broad host permissions.

Validation

  • 21 host tests passing (8 request + 13 verification)
  • cargo clippy passes for both plugins
  • wasm32-wasip2 release builds pass
  • Registry metadata validation passes
  • Verified against a real finalized Solana mainnet transaction:
    • tx: 2BwJJ2vHxqHuRJLa2W3aTu9SqLsqqSAiRuiDUf1yGVYkSeyEyry7HdwBvLxaFC9LUMk2oWpqSxeZGz9ioqXWqJxX
    • result: paid, valid=true, 0.0013 SOL

Each plugin includes a standalone README, manifest, pure Rust core, thin WASM component shim, and host-run tests.

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