Skip to content

Commit

Permalink
⏫Add level up
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdodo committed Oct 16, 2024
1 parent 1528a40 commit 0278e75
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/api/level-up.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type { FrontContext } from "../types/front-context";

export async function levelUp({
signMessage,
connection,
publicKey,
playsig,
}: FrontContext): Promise<void> {
if (!playsig) {
throw new Error("playsig is required to level up !");
}

const levelUpRequest = await signMessage({ playsig, publicKey });
connection.send({ levelUpRequest });
}

0 comments on commit 0278e75

Please sign in to comment.