Skip to content

Commit

Permalink
🧻 Add reroll
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdodo committed Oct 12, 2024
1 parent a7e0352 commit 75261aa
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions core/api/reroll.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 reroll({
signMessage,
connection,
publicKey,
playsig,
}: FrontContext): Promise<void> {
if (!playsig) {
throw new Error("playsig is required to reroll !");
}

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

0 comments on commit 75261aa

Please sign in to comment.