txgate-policy
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
[]
= ["0x742d35Cc6634C0532925a3b844Bc9e7595f0Ab1c"]
= "1.0"
= { = 100, = 3600 }
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.