diff options
Diffstat (limited to 'makima/frontend/src/lib/api.ts')
| -rw-r--r-- | makima/frontend/src/lib/api.ts | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/makima/frontend/src/lib/api.ts b/makima/frontend/src/lib/api.ts index a08cba7..6a40aec 100644 --- a/makima/frontend/src/lib/api.ts +++ b/makima/frontend/src/lib/api.ts @@ -3323,7 +3323,6 @@ export interface UpdateContractDefinitionRequest { /** Response when starting a chain */ export interface StartChainResponse { chainId: string; - supervisorTaskId: string | null; contractsCreated: string[]; status: string; } @@ -3422,30 +3421,10 @@ export async function getChainDefinitionGraph( return res.json(); } -/** Options for starting a chain */ -export interface StartChainOptions { - /** Whether to create a supervisor task that monitors chain progress */ - withSupervisor?: boolean; - /** Repository URL for the supervisor task to work with */ - repositoryUrl?: string; -} - -/** Start a chain (creates root contracts and optionally spawns supervisor) */ -export async function startChain( - chainId: string, - options?: StartChainOptions -): Promise<StartChainResponse> { - const body = options - ? JSON.stringify({ - withSupervisor: options.withSupervisor ?? false, - repositoryUrl: options.repositoryUrl, - }) - : undefined; - +/** Start a chain (creates root contracts based on DAG) */ +export async function startChain(chainId: string): Promise<StartChainResponse> { const res = await authFetch(`${API_BASE}/api/v1/chains/${chainId}/start`, { method: "POST", - headers: body ? { "Content-Type": "application/json" } : undefined, - body, }); if (!res.ok) { const error = await res.json().catch(() => ({ message: res.statusText })); @@ -3454,7 +3433,7 @@ export async function startChain( return res.json(); } -/** Stop a chain (kills supervisor, marks as archived) */ +/** Stop a chain (marks as archived) */ export async function stopChain(chainId: string): Promise<{ stopped: boolean; status: string }> { const res = await authFetch(`${API_BASE}/api/v1/chains/${chainId}/stop`, { method: "POST", |
