@contextvm/ctxcn
Version:
A command-line utility inspired by shadcn that streamlines the integration of ContextVM (CVM) servers into your TypeScript projects
38 lines • 1.23 kB
TypeScript
import { type NostrTransportOptions } from "@contextvm/sdk";
export type DemoServer = {
add: (a: number, b: number) => Promise<{
result: number;
}>;
echo: (input: string) => Promise<{
[k: string]: unknown;
}>;
};
export declare class DemoServerClient implements DemoServer {
static readonly SERVER_PUBKEY = "ada13b4dbc773890a5e8e468b72418b9fffb51c40b78236819a721971b14fed1";
private client;
private transport;
constructor(options?: Partial<NostrTransportOptions> & {
privateKey?: string;
relays?: string[];
});
disconnect(): Promise<void>;
private call;
/**
* Add two numbers
* @param {number} a The first number to add
* @param {number} b The second number to add
* @returns {Promise<{ result: number; }>} The result of the add operation
*/
add(a: number, b: number): Promise<{
result: number;
}>;
/**
* Echoes a given input
* @param {string} input The input value to be echoed
* @returns {Promise<{ [k: string]: unknown; }>} The result of the echo operation
*/
echo(input: string): Promise<{
[k: string]: unknown;
}>;
}
//# sourceMappingURL=DemoServerClient.d.ts.map