aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-03-03 22:45:50 -0800
committerAdam Soltys <[email protected]>2026-03-03 22:45:50 -0800
commit1e9ed8fa128ec5ae038be14ef168cad37c1c0eb1 (patch)
tree29399a82df3f981a24ef6cc84562c8ee006738d7 /src/lib
parente66a08d18f2bef2eccfe84042a2674141a73d1c2 (diff)
downloadcoinos-ui-1e9ed8fa128ec5ae038be14ef168cad37c1c0eb1.tar.gz
coinos-ui-1e9ed8fa128ec5ae038be14ef168cad37c1c0eb1.zip
api proxy
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/ark.ts8
-rw-r--r--src/lib/bitcoinSync.ts2
-rw-r--r--src/lib/keyWrapping.ts2
-rw-r--r--src/lib/nostr.ts2
4 files changed, 7 insertions, 7 deletions
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<string, string>,
): Promise<void> {
- 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<string> => {