mirror of
https://github.com/pezkuwichain/pezkuwi-common.git
synced 2026-04-21 23:48:05 +00:00
13 lines
347 B
JavaScript
13 lines
347 B
JavaScript
import { isReady, waitReady } from '@pezkuwi/wasm-crypto';
|
|
export const cryptoIsReady = isReady;
|
|
export function cryptoWaitReady() {
|
|
return waitReady()
|
|
.then(() => {
|
|
if (!isReady()) {
|
|
throw new Error('Unable to initialize @pezkuwi/util-crypto');
|
|
}
|
|
return true;
|
|
})
|
|
.catch(() => false);
|
|
}
|