Description
Problem
Applications cannot enforce high-level spending policies before transactions are submitted. There is no unified mechanism for configuring per-transaction, daily, or monthly limits or requiring additional approval when a transaction exceeds a configured threshold.
Solution
Implement a spending policy engine that evaluates transactions before submission.
Policies should support:
- Per-transaction limits.
- Daily limits.
- Monthly limits.
- Asset-specific limits.
- Destination restrictions.
- Approval thresholds.
- Multiple required approvers.
The policy engine must calculate already-authorized spending and prevent concurrent transactions from bypassing configured limits.
Acceptance Criteria
Note for Contributors
The policy engine should evaluate the transaction before signing/submission. Be explicit about how pending, failed, and completed transactions affect spending calculations.
Description
Problem
Applications cannot enforce high-level spending policies before transactions are submitted. There is no unified mechanism for configuring per-transaction, daily, or monthly limits or requiring additional approval when a transaction exceeds a configured threshold.
Solution
Implement a spending policy engine that evaluates transactions before submission.
Policies should support:
The policy engine must calculate already-authorized spending and prevent concurrent transactions from bypassing configured limits.
Acceptance Criteria
setSpendingLimit(asset, amount, period)is implemented.src/transaction/index.tsandsrc/index.ts.Note for Contributors
The policy engine should evaluate the transaction before signing/submission. Be explicit about how pending, failed, and completed transactions affect spending calculations.