mirror of
https://github.com/luxfhe/v1-sdk.git
synced 2026-10-30 17:07:22 +00:00
16 lines
381 B
JavaScript
16 lines
381 B
JavaScript
import { createInstance } from '../lib/node.cjs';
|
|
import { logCLI } from './utils.js';
|
|
|
|
let __instance;
|
|
|
|
export async function getInstance(config, options) {
|
|
if (!__instance) {
|
|
if (!config) {
|
|
throw new Error('Missing FhevmInstanceConfig');
|
|
}
|
|
logCLI(`create FHEVM instance...`, options);
|
|
__instance = await createInstance(config);
|
|
}
|
|
return __instance;
|
|
}
|