zumokit
Version:
ZumoKit is a Wallet as a Service SDK
15 lines (11 loc) • 325 B
text/typescript
const loadZumoCoreModule = require('../zumocore/zumocore');
let instance: any;
let semaphore = false;
export const getZumoCore = async () => {
if (!instance && !semaphore) {
// make sure initialisation is called at most once
semaphore = true;
instance = await loadZumoCoreModule();
}
return instance;
};