Ademan's avatar
Ademan 1 year ago
*possibly* related, although I don't think so: says payload should be base64 encoded, but says the payload should be hex encoded This seems to be contradictory? nostr-tools uses the hex encoding, so if the server is expecting base64 that could be a problem, although like I said, I don't *think* these servers are processing the Auth header at all by the time they send me back a 400. I'll at least try changing it to a base64 encoded payload hash once I get back from mowing the lawn...

Replies (2)

Ademan's avatar
Ademan 1 year ago
OK I've created a simple sample page for making NIP-96 uploads the way I am in my larger project. I've also included a variation that generates the Auth header differently (according to NIP-96 where it contradicts NIP-98). Not sure what I'm doing wrong here... You can run it with ``` npx webpack serve -c webpack.dev.js ``` the "My version" checkbox activates the variant upload, rather than only using stock nostr-tools functions. @nostr.build any ideas? To the extent I am able as a non-web dev who's very unfamiliar with modern PHP, reviewing the nostr.build source it wasn't obvious to me what is going wrong either. @Quentin I get approximately the same 400 response with nostrcheck, does anything jump out at you? I appreciate any help y'all can give, and sorry for the noise. At least, if you're aware of clients that work with your nip96 endpoints specifically, I'd love to see them and compare...
Ademan's avatar
Ademan 1 year ago
Hodlbod confirmed he's using nip-96 after all, so I can reference his code to figure out what's going wrong on my end. Don't waste your time reading this garbage until I've looked over his code lol