Documentation
¶
Overview ¶
Package ruleconfig provides strict format validation for rule configuration only. Used by API (create/update rule), config load (rule_init), and validate-rules CLI. For request/query/enum validation (address, sign_type, mode, chain_type, etc.) use internal/validate.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateJSRuleTestCasesRequirement ¶
ValidateJSRuleTestCasesRequirement enforces the same rule as Solidity: at least one positive and one negative test case. Call when validating evm_js rules that have test_cases. positiveCount and negativeCount are the number of test cases with expect_pass true/false.
func ValidateRuleConfig ¶
ValidateRuleConfig validates config map for the given rule type. Returns an error if format is wrong (e.g. allowed_sign_types as string instead of array, or sign_type_filter with invalid tokens). Call this before persisting rules from API or config.
Types ¶
This section is empty.