Skip to content

UI and back for claim nostr badge through QR code using NIP-05.

License

Notifications You must be signed in to change notification settings

rapax00/claim-badge

Repository files navigation

Claim Badge

License Stars Forks

UI and back for claim nostr badge through QR code using NIP-05.

Table of Contents

Flow

  1. User scans QR code
  2. This redirected to the claim page
  3. Fills the form with your NIP-05
  4. Sumbit and call the API to award the badge
  5. Backend award badge
  6. Success message

claim badge flow

Configuration

1. Setup environment variables

Copy .env.example to .env and fill the NOSTR_BADGE_EMITTER_PRIV with the private key of Nostr Badges emitter and NOSTR_BADGE_EMITTER_PUB with the public key.

cp .env.example .env

2. Setup

Use correct node version

nvm use

Install the dependencies

pnpm i

3. Run in dev mode

pnpm dev

Endpoints

Admin login

Validate if the user is an admin and access the admin panel.

your_ticketing_domain/api/admin/login

  • Validate the public key

Parameters:

{
  "publicKey": <string, 32-bytes lowercase hex-encoded public key>
}

Response:

Valid
{
	"status": <boolean>,
	"data": {
    "message": <string>
  }
}
Invalid
{
	"status": <boolean>,
	"errors": <string>
}

To Do

Priority

  1. Claim badge from NIP-05
  2. Claim badge from LaWallet
  3. Claim badge using LaCard

Front

  • Main page with QR to redirect to the claim page
  • Claim page

Back

  • Send award event

About

UI and back for claim nostr badge through QR code using NIP-05.

Resources

License

Stars

Watchers

Forks

Contributors 3

  •  
  •  
  •