txgate-policy 0.2.0

Policy engine for transaction approval rules in TxGate
Documentation

txgate-policy

Crates.io Documentation License

Policy engine for transaction approval rules in the TxGate transaction signing service.

Warning

This is an internal crate with an unstable API.

This crate is published to crates.io only as a dependency of the txgate binary. The API may change without notice between versions.

Do not depend on this crate directly. Use the txgate crate instead.

What's Inside

Policy Rules

  • Allowlist - Only sign transactions to approved addresses
  • Denylist - Block transactions to specific addresses
  • Rate Limits - Limit transaction frequency per time window
  • Amount Limits - Maximum per-transaction spending limits

Features

  • TOML-based policy configuration
  • Per-chain policy rules
  • Composable rule evaluation

Example Policy

[ethereum]
allowlist = ["0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab1c"]
max_amount = "1.0"
rate_limit = { max_requests = 100, window_seconds = 3600 }

License

Licensed under either of:

at your option.