30 lines
791 B
TypeScript
30 lines
791 B
TypeScript
/* eslint-disable */
|
|
// This file was generated by [tauri-specta](https://github.com/oscartbeaumont/tauri-specta). Do not edit this file manually.
|
|
|
|
declare global {
|
|
interface Window {
|
|
__TAURI_INVOKE__<T>(cmd: string, args?: Record<string, unknown>): Promise<T>;
|
|
}
|
|
}
|
|
|
|
// Function avoids 'window not defined' in SSR
|
|
const invoke = () => window.__TAURI_INVOKE__;
|
|
|
|
export function helloTauri() {
|
|
return invoke()<string>("hello_tauri")
|
|
}
|
|
|
|
export function hash256sum(hashInput: string) {
|
|
return invoke()<string>("hash256sum", { hashInput })
|
|
}
|
|
|
|
export function storeSetKey(key: string, value: string) {
|
|
return invoke()<null>("store_set_key", { key,value })
|
|
}
|
|
|
|
export function storeReadKey(key: string) {
|
|
return invoke()<string | null>("store_read_key", { key })
|
|
}
|
|
|
|
|