https://github.com/bitkarrot/nip98-vercel-api
NIP98 Auth Endpoint server demo (vanilla js)
https://github.com/bitkarrot/nip98-vercel-api
Last synced: about 1 year ago
JSON representation
NIP98 Auth Endpoint server demo (vanilla js)
- Host: GitHub
- URL: https://github.com/bitkarrot/nip98-vercel-api
- Owner: bitkarrot
- Created: 2024-11-07T08:28:23.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-09T00:23:46.000Z (over 1 year ago)
- Last Synced: 2024-12-09T01:23:35.391Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://nip98-vercel-api.vercel.app/
- Size: 30.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NIP98-Vercel-API server
## Usage notes
use `vercel dev` to run locally
deployed to vercel as https://nip98-vercel-api.vercel.app/
## API endpoint
### Test GET endpoint:
`curl -X GET https://nip98-vercel-api.vercel.app/api`
### Test POST endpoint:
`curl -X POST https://nip98-vercel-api.vercel.app/api/two`
### NIP98 POST Auth endpoint:
requires Authorization header with nostr (in place of bearer)
and a body with `room`, `username`, `avatarURL`, `relays`, `isPresenter`
`curl -X POST https://nip98-vercel-api.vercel.app/api/auth -H "Authorization: Nostr " -d '{"room": "test", "username": "test", "avatarURL": "test", "relays": [ "wss://relay.damus.io" ], "isPresenter": true}'`