damus icon indicating copy to clipboard operation
damus copied to clipboard

Detect nostr.build account

Open jb55 opened this issue 1 year ago • 4 comments

We need to know if we are authed to nostr.build and have an active account. This is needed for warning about file size limits before upload.

Perhaps we can do an http nostr auth check somehow, but we would still want to know the upload size limit. We may need:

  • [ ] #1564

for this

jb55 avatar May 06 '24 21:05 jb55

I can implement an API that will tell you the actual upload limit for NB and probably make it compliant with NIP-96 or any other API. Should not be too hard.

fishcakeday avatar May 06 '24 21:05 fishcakeday

@fishcakeday no rush, we don't have this scheduled in any sprint atm

jb55 avatar May 06 '24 21:05 jb55

@fishcakeday no rush, we don't have this scheduled in any sprint atm

curl https://nostr.build/api/v2/upload/limit is implemented, it will check based on your NIP98 authentication or return a free upload limit by default with no headers:

{
  "status": "success",
  "message": "Upload limit retrieved successfully",
  "data": {
    "limit": 11534336
  }
}

fishcakeday avatar May 06 '24 21:05 fishcakeday

On Mon, May 06, 2024 at 02:52:34PM GMT, Fishcake wrote:

@fishcakeday no rush, we don't have this scheduled in any sprint atm

curl https://nostr.build/api/v2/upload/limit is implemented, it will check based on your NIP98 authentication or return a free upload limit by default with no headers:

{
 "status": "success",
 "message": "Upload limit retrieved successfully",
 "data": {
   "limit": 11534336
 }
}

perfect, thanks!

jb55 avatar May 06 '24 22:05 jb55