mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 05:12:33 +00:00
12 lines
316 B
TypeScript
12 lines
316 B
TypeScript
import { callCoreRpc } from './coreRpcClient';
|
|
|
|
interface CoreCommandResponse<T> {
|
|
result: T;
|
|
logs: string[];
|
|
}
|
|
|
|
export async function callCoreCommand<T>(method: string, params?: unknown): Promise<T> {
|
|
const response = await callCoreRpc<CoreCommandResponse<T>>({ method, params });
|
|
return response.result;
|
|
}
|