-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
457 additions
and
105 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
import type { Challenge, ChallengeOptions, Payload, Solution } from './types.js'; | ||
import type { Challenge, ChallengeOptions, Payload, ServerSignaturePayload, ServerSignatureVerificationData, Solution } from './types.js'; | ||
export declare function createChallenge(options: ChallengeOptions): Promise<Challenge>; | ||
export declare function verifySolution(payload: string | Payload, hmacKey: string): Promise<boolean>; | ||
export declare function verifyServerSignature(payload: string | ServerSignaturePayload, hmacKey: string): Promise<{ | ||
verificationData: ServerSignatureVerificationData | null; | ||
verified: boolean | null; | ||
}>; | ||
export declare function solveChallenge(challenge: string, salt: string, algorithm?: string, max?: number, start?: number): { | ||
promise: Promise<Solution | null>; | ||
controller: AbortController; | ||
}; | ||
export declare function solveChallengeWorkers(workerScript: string | URL | (() => Worker), concurrency: number, challenge: string, salt: string, algorithm?: string, max?: number, startNumber?: number): Promise<Solution | null>; | ||
declare const _default: { | ||
createChallenge: typeof createChallenge; | ||
verifySolution: typeof verifySolution; | ||
solveChallenge: typeof solveChallenge; | ||
solveChallengeWorkers: typeof solveChallengeWorkers; | ||
verifyServerSignature: typeof verifyServerSignature; | ||
verifySolution: typeof verifySolution; | ||
}; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.