getAllContextRules

suspend fun getAllContextRules(maxScanId: UInt = kit.config.maxContextRuleScanId): List<SCValXdr>

Retrieves all active context rules as raw ScVal objects.

The contract uses monotonically increasing IDs. When a rule is removed, its ID slot becomes empty but is never reused, creating gaps. This method iterates IDs from 0 upward until all active rules (per getContextRulesCount) have been found, with maxScanId as a safety bound.

Return

List of raw ScVal objects, one per active context rule.

Parameters

maxScanId

Upper bound on rule IDs to scan. Defaults to OZSmartAccountConfig.maxContextRuleScanId.

Throws

if simulation fails

if the count result cannot be parsed