Skip to content
Snippets Groups Projects
Commit 99589273 authored by Matt Burton's avatar Matt Burton
Browse files

Add return of utils

parent 8e802fc0
No related branches found
No related tags found
No related merge requests found
......@@ -8,79 +8,78 @@ import './wasm_exec';
// @ts-ignore
import makeWasm from './xxdk.wasm';
export const loadUtils = () => new Promise<XXDKUtils>(async (res) => {
const go = new (window as any).Go();
const result = await makeWasm(go.importObject);
console.log('Result', result);
go.run(result.instance);
// const {
// Base64ToUint8Array,
// Crash,
// ConstructIdentity,
// DecodePrivateURL,
// DecodePublicURL,
// GenerateChannelIdentity,
// GetChannelInfo,
// GetChannelJSON,
// GetClientVersion,
// getCrashedLogFile,
// GetDefaultCMixParams,
// GetLogger,
// GetOrInitPassword,
// GetPublicChannelIdentityFromPrivate,
// GetShareUrlType,
// GetVersion,
// GetWasmSemanticVersion,
// ImportPrivateIdentity,
// IsNicknameValid,
// LoadChannelsManagerWithIndexedDb,
// LoadCmix,
// LogLevel,
// NewChannelsDatabaseCipher,
// NewChannelsManagerWithIndexedDb,
// NewCmix,
// NewDMClientWithIndexedDb,
// NewDMsDatabaseCipher,
// NewDummyTrafficManager,
// Purge,
// ValidForever,
// // eslint-disable-next-line @typescript-eslint/no-explicit-any
// } = (window) || {};
const {
Base64ToUint8Array,
Crash,
ConstructIdentity,
DecodePrivateURL,
DecodePublicURL,
GenerateChannelIdentity,
GetChannelInfo,
GetChannelJSON,
GetClientVersion,
getCrashedLogFile,
GetDefaultCMixParams,
GetLogger,
GetOrInitPassword,
GetPublicChannelIdentityFromPrivate,
GetShareUrlType,
GetVersion,
GetWasmSemanticVersion,
ImportPrivateIdentity,
IsNicknameValid,
LoadChannelsManagerWithIndexedDb,
LoadCmix,
LogLevel,
NewChannelsDatabaseCipher,
NewChannelsManagerWithIndexedDb,
NewCmix,
NewDMClientWithIndexedDb,
NewDMsDatabaseCipher,
NewDummyTrafficManager,
Purge,
ValidForever,
// eslint-disable-next-line @typescript-eslint/no-explicit-any
} = (window) || {};
// res({
// Base64ToUint8Array,
// Crash,
// ConstructIdentity,
// DecodePrivateURL,
// DecodePublicURL,
// GenerateChannelIdentity,
// GetChannelInfo,
// GetChannelJSON,
// GetClientVersion,
// getCrashedLogFile,
// GetDefaultCMixParams,
// GetLogger,
// GetOrInitPassword,
// GetPublicChannelIdentityFromPrivate,
// GetShareUrlType,
// GetVersion,
// GetWasmSemanticVersion,
// ImportPrivateIdentity,
// IsNicknameValid,
// LoadChannelsManagerWithIndexedDb,
// LoadCmix,
// LogLevel,
// NewChannelsDatabaseCipher,
// NewChannelsManagerWithIndexedDb,
// NewCmix,
// NewDMClientWithIndexedDb,
// NewDMsDatabaseCipher,
// NewDummyTrafficManager,
// Purge,
// ValidForever,
// })
res({
Base64ToUint8Array,
Crash,
ConstructIdentity,
DecodePrivateURL,
DecodePublicURL,
GenerateChannelIdentity,
GetChannelInfo,
GetChannelJSON,
GetClientVersion,
getCrashedLogFile,
GetDefaultCMixParams,
GetLogger,
GetOrInitPassword,
GetPublicChannelIdentityFromPrivate,
GetShareUrlType,
GetVersion,
GetWasmSemanticVersion,
ImportPrivateIdentity,
IsNicknameValid,
LoadChannelsManagerWithIndexedDb,
LoadCmix,
LogLevel,
NewChannelsDatabaseCipher,
NewChannelsManagerWithIndexedDb,
NewCmix,
NewDMClientWithIndexedDb,
NewDMsDatabaseCipher,
NewDummyTrafficManager,
Purge,
ValidForever,
})
})
export * from './types';
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment