Skip to content

feat(frontend): introducing pow worker for allow_signing protection #5752

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 0 commits into from

Conversation

DecentAgeCoder
Copy link
Collaborator

@DecentAgeCoder DecentAgeCoder commented Apr 9, 2025

Motivation

This PR introduces new functionality to handle proof-of-work (PoW) challenges for calling allow_signing endpoint

Changes

  • Introduced a short polling (request - repspone) post message design for message communication between the pow.worker.ts and worker.pow.services.ts
  • Added Other as a new variant for errors in CreateChallengeError across several files.
  • Added new functions for managing proof-of-work challenges: createPowChallenge and allowSigningResult.
  • Implemented new PowProtector Service and PoW worker functionalities.
  • Integrated PowProtector into the frontend loader component.
  • Added cryptographic hashing utilities and worker management helpers to support PoW.
  • Updated schemas and types for backend communication, ensuring strong type safety in PoW-related operations.

Tests

Copy link
Collaborator

@AntonioVentilii AntonioVentilii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's split this PR

  • the backend canister API
  • the utils
  • the worker
  • the Svelte component

@DecentAgeCoder DecentAgeCoder force-pushed the feat/frontend/pow/introducing-pow-worker branch from 1cba584 to b4a6251 Compare April 15, 2025 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants