sal-modular/wasm_console_demo/main.js
2025-05-26 13:22:42 +03:00

14 lines
533 B
JavaScript

// Minimal loader for the vault WASM module for console interaction
// Adjust the module path if needed (this assumes the default wasm-pack output in the parent dir)
import init, * as vault from './wasm_app.js';
window.vault = null;
init().then(() => {
window.vault = vault;
console.log('Vault WASM module loaded. Use window.vault.<function>() in the console.');
});
// Optional: Helper to convert Uint8Array to hex
window.toHex = arr => Array.from(new Uint8Array(arr)).map(b => b.toString(16).padStart(2, '0')).join('');