From 1e9ed8fa128ec5ae038be14ef168cad37c1c0eb1 Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 3 Mar 2026 22:45:50 -0800 Subject: api proxy --- src/lib/ark.ts | 8 ++++---- src/lib/bitcoinSync.ts | 2 +- src/lib/keyWrapping.ts | 2 +- src/lib/nostr.ts | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ark.ts b/src/lib/ark.ts index 18652d1e..e223d013 100644 --- a/src/lib/ark.ts +++ b/src/lib/ark.ts @@ -303,7 +303,7 @@ const _syncTransactions = async (aid: string) => { const bal = await wallet.getBalance(); const balance = (bal.available || 0) + (bal.preconfirmed || 0); - const result = await post("/post/ark/sync", { transactions, aid, balance, arkAddress: walletAddr }); + const result = await post("/api/ark/sync", { transactions, aid, balance, arkAddress: walletAddr }); cacheVaultSnapshot(); // fire-and-forget return result; }; @@ -456,14 +456,14 @@ export const sendArkViaForward = async ({ try { const txid = await sendArk(serverArkAddress, amount); - await post("/post/ark/vault-send", { hash: txid, amount, aid }); + await post("/api/ark/vault-send", { hash: txid, amount, aid }); const invoice: any = { type: "ark", amount, aid }; if (forward) invoice.forward = forward; - const inv = await post("/post/invoice", { invoice, user }); + const inv = await post("/api/invoice", { invoice, user }); - return await post("/post/ark/receive", { amount, hash: txid, iid: inv.id }); + return await post("/api/ark/receive", { amount, hash: txid, iid: inv.id }); } finally { vaultForwarding = false; } diff --git a/src/lib/bitcoinSync.ts b/src/lib/bitcoinSync.ts index 9061e2fc..92d3382b 100644 --- a/src/lib/bitcoinSync.ts +++ b/src/lib/bitcoinSync.ts @@ -6,7 +6,7 @@ export const syncBitcoinVault = async (aid: string) => { if (syncing) return; syncing = true; try { - return await post("/post/bitcoin/sync", { aid }); + return await post("/api/bitcoin/sync", { aid }); } finally { syncing = false; } diff --git a/src/lib/keyWrapping.ts b/src/lib/keyWrapping.ts index b176e741..fb46f767 100644 --- a/src/lib/keyWrapping.ts +++ b/src/lib/keyWrapping.ts @@ -45,7 +45,7 @@ export async function resolveCanonicalKey( export async function saveEncryptedKeys( encryptedKeys: Record, ): Promise { - await post("/post/user", { encryptedKeys }); + await post("/api/user", { encryptedKeys }); } export function passwordMethodId(): string { diff --git a/src/lib/nostr.ts b/src/lib/nostr.ts index 1bbf6bcc..4b7316e8 100644 --- a/src/lib/nostr.ts +++ b/src/lib/nostr.ts @@ -136,7 +136,7 @@ export const sign = async (event: any, user?: any) => { }; export const send = (event: EventTemplate) => { - return post("/events", { event }); + return post("/api/event", { event }); }; const getPassword = async (): Promise => { -- cgit v1.2.3