23 lines
619 B
TypeScript
23 lines
619 B
TypeScript
// Code generated by kitcom. DO NOT EDIT.
|
|
|
|
import { ParentIPC, ChildIPC } from "kitten-ipc";
|
|
|
|
export default class GoIpcApi {
|
|
protected ipc: ParentIPC | ChildIPC;
|
|
|
|
constructor(ipc: ParentIPC | ChildIPC) {
|
|
this.ipc = ipc;
|
|
}
|
|
|
|
async Div(a: number, b: number): Promise<number> {
|
|
const results = await this.ipc.call("GoIpcApi.Div", a, b);
|
|
return results[0] as number;
|
|
}
|
|
|
|
async XorData(data1: Buffer, data2: Buffer): Promise<Buffer> {
|
|
const results = await this.ipc.call("GoIpcApi.XorData", data1, data2);
|
|
results[0] = Buffer.from(results[0], "base64");
|
|
return results[0] as Buffer;
|
|
}
|
|
}
|