declare module '*/wasm_app.js' {
  export default function init(): Promise<void>;
  export function init_session(keyspace: string, password: string): Promise<void>;
  export function create_keyspace(keyspace: string, password: string): Promise<void>;
  export function lock_session(): void;
  export function is_unlocked(): boolean;
  export function add_keypair(key_type: string | undefined, metadata: string | undefined): Promise<string>;
  export function list_keypairs(): Promise<string>;
  export function select_keypair(key_id: string): Promise<void>;
  export function current_keypair_metadata(): Promise<any>;
  export function current_keypair_public_key(): Promise<Uint8Array>;
  export function sign(message: Uint8Array): Promise<string>;
  export function verify(signature: string, message: Uint8Array): Promise<boolean>;
  export function init_rhai_env(): void;
  export function run_rhai(script: string): Promise<string>;
}
