feat: add zap command

This commit is contained in:
2024-02-27 15:37:49 +07:00
parent 2403231ac4
commit 09df8672d0
12 changed files with 233 additions and 54 deletions

View File

@@ -394,6 +394,42 @@ export class Ark {
}
}
public async get_nwc_status() {
try {
const cmd: boolean = await invoke("get_nwc_status");
return cmd;
} catch {
return false;
}
}
public async set_nwc(uri: string) {
try {
const cmd: boolean = await invoke("set_nwc", { uri });
return cmd;
} catch {
return false;
}
}
public async zap_profile(id: string, amount: number, message: string) {
try {
const cmd: boolean = await invoke("zap_profile", { id, amount, message });
return cmd;
} catch {
return false;
}
}
public async zap_event(id: string, amount: number, message: string) {
try {
const cmd: boolean = await invoke("zap_event", { id, amount, message });
return cmd;
} catch {
return false;
}
}
public async upload(filePath?: string) {
try {
const allowExts = [