Skip to Content

@cfxdevkit/executor


@cfxdevkit/executor / IKeeperClient

Interface: IKeeperClient

Defined in: packages/executor/src/keeper-interface.ts:9

Minimal interface that any concrete keeper/executor must satisfy.

The SDK defines the contract here; implementations live in the CAS worker (KeeperClient) or in custom keeper deployments.

Methods

executeDCATick()

executeDCATick(jobId, owner, params): Promise<{ amountOut?: string; txHash: `0x${string}`; }>

Defined in: packages/executor/src/keeper-interface.ts:23

Submit an executeDCATick transaction and wait for confirmation.

Parameters

jobId

`0x${string}`

owner

`0x${string}`

params

DCAParams

Returns

Promise<{ amountOut?: string; txHash: `0x${string}`; }>


executeLimitOrder()

executeLimitOrder(jobId, owner, params): Promise<{ amountOut?: string; txHash: `0x${string}`; }>

Defined in: packages/executor/src/keeper-interface.ts:14

Submit an executeLimitOrder transaction to the AutomationManager contract and wait for it to be mined.

Parameters

jobId

`0x${string}`

owner

`0x${string}`

params

LimitOrderParams

Returns

Promise<{ amountOut?: string; txHash: `0x${string}`; }>


getOnChainStatus()

getOnChainStatus(jobId): Promise<"active" | "executed" | "cancelled" | "expired">

Defined in: packages/executor/src/keeper-interface.ts:38

Read the current on-chain status of a job.

Maps the contract JobStatus enum: 0 = ACTIVE → 'active' 1 = EXECUTED → 'executed' 2 = CANCELLED → 'cancelled' 3 = EXPIRED → 'expired'

Parameters

jobId

`0x${string}`

Returns

Promise<"active" | "executed" | "cancelled" | "expired">