Replying to Avatar Ademan

*possibly* related, although I don't think so:

https://github.com/nostr-protocol/nips/blob/master/96.md says payload should be base64 encoded, but

https://github.com/nostr-protocol/nips/blob/master/98.md 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...

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...

https://github.com/Ademan/nip96-test

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:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3vamnwvaz7tmjv4kxz7fwd4hhxarj9ec82c30qy2hwumn8ghj7un9d3shjtnyv9kh2uewd9hj7qgkwaehxw309ajkgetw9ehx7um5wghxcctwvshszythwden5te0dehhxarj9emkjmn99uq3wamnwvaz7tmjv4kxz7fwdehhxarj9e3xzmny9uq36amnwvaz7tmwdaehgu3wvf5hgcm0d9hx2u3wwdhkx6tpdshszymhwden5te0wp6hyurvv4cxzeewv4ej7qgawaehxw309ahx7um5wghx6at5d9h8jampd3kx2apwvdhk6tcpr9mhxue69uhhyetvv9ujuumwdae8gtnnda3kjctv9uqzpxvf2qzp87m4dkzr0yfvcv47qucdhcdlc66a9mhht8s52mprn7g9q9v296 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.

nostr:nprofile1qythwumn8ghj7un9d3shjtnwdaehgu3wvfskuep0qyfhwumn8ghj7ur4wfcxcetsv9njuetn9uq32amnwvaz7tmjv4kxz7fwv3sk6atn9e5k7tcpz9mhxue69uhkummnw3ezuamfdejj7qgnwaehxw309ahkvenrdpskjm3wwp6kytcppemhxue69uhkummn9ekx7mp0qyghwumn8ghj7vf5xqhxvdm69e5k7tcprfmhxue69uhhyetvv9ujumn0wd68ycmgv43kktndv5hszxnhwden5te0dehhxarj9e6xsetnv9kk2cmpwshxjme0qqsgnc2tuj0dqpea4qak0qnee55m5kkcdncqpd4r6xjv8hz25n7aqtq3clwv4 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...

Reply to this note

Please Login to reply.

Discussion

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

Hello Ademan. I'll check it and get back to you, we can do some tests together. As far as I know NIP96 and NIP98 are not contradictory.

Thanks! Don't worry about it for the moment, I will review coracle before I waste anybody else's time. Sorry for the noise!

The first implementation of NIP96 was done by me in Coracle, if I can help you in any way I will be happy to do so.

BTW if you're curious about the contradiction I'm seeing, I (try to) explain it here https://github.com/nostr-protocol/nips/issues/1376