Skip to content

feat: add recipient_allowlist declarative policy rule#225

Open
br-to wants to merge 4 commits into
open-wallet-standard:mainfrom
br-to:feat/sign-allowlist-policy-rule
Open

feat: add recipient_allowlist declarative policy rule#225
br-to wants to merge 4 commits into
open-wallet-standard:mainfrom
br-to:feat/sign-allowlist-policy-rule

Conversation

@br-to
Copy link
Copy Markdown

@br-to br-to commented May 17, 2026

What

Add RecipientAllowlist variant to the PolicyRule serde enum — a declarative rule that restricts transaction recipients to an address allowlist (case-insensitive). Denies transactions with no to field (e.g. contract creation).

Why

Recipient allowlists were previously only possible via custom executable policies. Adding a built-in declarative rule lets agents be scoped to specific destination addresses without subprocess overhead.

Testing

  • cargo test --workspace passes (265 tests)
  • cargo clippy --workspace -- -D warnings is clean
  • npm test passes (if Node bindings changed) — N/A, no binding changes
  • Tested manually with ows CLI

Notes

  • New tests: address match, non-match, case-insensitive, no to field, empty list, serde roundtrip
  • Docs updated: added recipient_allowlist section to docs/03-policy-engine.md, removed recipient allowlists from the "not implemented" note

@br-to br-to requested a review from njdawn as a code owner May 17, 2026 15:53
@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

@br-to is attempting to deploy a commit to the MoonPay Team on Vercel.

A member of the Team first needs to authorize it.

…engine and update related documentation and tests
@br-to br-to changed the title feat: add sign_allowlist declarative policy rule feat: add recipient_allowlist declarative policy rule May 17, 2026
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.

1 participant