getRule(config, rulesEngineRulesContract, policyId, ruleId): Promise<Maybe<RuleStruct>>

Retrieves a specific rule from the Rules Engine.

Parameters

ParameterTypeDescription
configConfig-
rulesEngineRulesContractobjectThe contract instance for interacting with the Rules Engine Policy.
rulesEngineRulesContract.abi(object | object | object)[]-
rulesEngineRulesContract.address`0x${string}`-
policyIdnumberThe ID of the policy containing the rule.
ruleIdnumberThe ID of the rule to retrieve.

Returns

Promise<Maybe<RuleStruct>>

The retrieved rule as a RuleStruct, or null if retrieval fails.

Defined in

src/modules/rules.ts:240