Skip to content

Commit

Permalink
chore: move gist link off of function
Browse files Browse the repository at this point in the history
  • Loading branch information
Snazzah committed Nov 6, 2023
1 parent f92ca42 commit 6164e17
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/web/creator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { BaseSlashCreator, SlashCreatorOptions } from '../creator';

// https://gist.github.com/devsnek/77275f6e3f810a9545440931ed314dc1
function hex2bin(hex: string) {
const buf = new Uint8Array(Math.ceil(hex.length / 2));
for (var i = 0; i < buf.length; i++) {
Expand Down Expand Up @@ -33,10 +34,6 @@ export class SlashCreator extends BaseSlashCreator {
return this.#publicKey;
}

/**
* Validates a payload from Discord against its signature and key.
* @see https://gist.github.com/devsnek/77275f6e3f810a9545440931ed314dc1
*/
protected async _verify(body: string, signature: string, timestamp: string): Promise<boolean> {
return await crypto.subtle.verify(
'NODE-ED25519',
Expand Down

0 comments on commit 6164e17

Please sign in to comment.