@cfxdevkit/executor / KeeperClientImpl
Class: KeeperClientImpl
Defined in: packages/executor/src/keeper-client.ts:87
@cfxdevkit/executor
On-chain strategy execution engine for Conflux DevKit.
Provides the runtime primitives needed to build keepers, bots, or AI agents that execute on-chain strategies (limit orders, DCA, TWAP, spot swaps).
Key exports:
- Job types (LimitOrderJob, DCAJob, TWAPJob, SwapJob) + params
- Strategy types (LimitOrderStrategy, DCAStrategy, TWAPStrategy, SwapStrategy)
- SafetyGuard — circuit-breaker / swap-cap / retry-cap
- RetryQueue — exponential backoff with jitter
- PriceChecker — pluggable price source + condition evaluation
- KeeperClient interface + KeeperClientImpl (viem / AutomationManager)
- Executor — orchestrator that ties all of the above together
- AutomationLogger — injectable logger interface (no runtime dep)
Implements
Constructors
Constructor
new KeeperClientImpl(
config):KeeperClientImpl
Defined in: packages/executor/src/keeper-client.ts:96
Parameters
config
Returns
KeeperClientImpl
Methods
executeDCATick()
executeDCATick(
jobId,owner,params):Promise<{amountOut:string|null;nextExecutionSec:number;txHash:string; }>
Defined in: packages/executor/src/keeper-client.ts:340
Parameters
jobId
string
owner
string
params
Returns
Promise<{ amountOut: string | null; nextExecutionSec: number; txHash: string; }>
Implementation of
executeLimitOrder()
executeLimitOrder(
jobId,owner,params):Promise<{amountOut:string|null;txHash:string; }>
Defined in: packages/executor/src/keeper-client.ts:239
Parameters
jobId
string
owner
string
params
Returns
Promise<{ amountOut: string | null; txHash: string; }>
Implementation of
KeeperClient.executeLimitOrder
getOnChainStatus()
getOnChainStatus(
onChainJobId):Promise<"active"|"executed"|"cancelled"|"expired">
Defined in: packages/executor/src/keeper-client.ts:133
Query the on-chain status of a job. Returns one of: ‘active’ | ‘executed’ | ‘cancelled’ | ‘expired’. Throws if the contract call fails (e.g. job not found).
Parameters
onChainJobId
`0x${string}`
Returns
Promise<"active" | "executed" | "cancelled" | "expired">