1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { set } from "https://esm.town/v/std/set?v=11";
import { verfiedCalls } from "https://esm.town/v/stevekrouse/verfiedCalls";
import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
export async function exampleAuthApi(arg1, arg2, auth) {
let { handle } = await verifyAPIAuth(auth);
if (handle) {
verfiedCalls.push({ handle, t: Date.now() });
set("verfiedCalls", verfiedCalls);
return `Successfully verified as a call from ${handle}`;
}
else {
return `Failed to verify as a call from ${auth.handle}`;
}
}