Files
Audric Ackermann d9300e67a0 fix: remove the whole kind logic and use namespace instead
this is because session doesn't care about the config it receives
anymore and just forwards them to libsession
2023-10-10 14:53:43 +11:00

11 lines
353 B
TypeScript

import * as wrappers from 'libsodium-wrappers-sumo';
type LibSodiumWrappers = typeof wrappers;
export async function getSodiumNode() {
// don't ask me why, but when called from node we have to do this as the types are incorrect?!
const anyWrappers = wrappers as any;
await anyWrappers.ready;
return anyWrappers.default as LibSodiumWrappers;
}