that's what your code says

Reply to this note

Please Login to reply.

Discussion

My guess is it's a serialization issue. Are you using the clnurl plugin or something else? Could you post the request?

yes, elsirions clnurl

Strange they use the same library for serialization and verification.

but clnurl does not check the description, right? also I used a .js tool to check the descriptions signature and id, all valid.

Maybe I'm misunderstanding where it's failing. Do you have the text of the log message you're seeing ?

plugin-cln-zapper: Error while decoding zap (likely just not a zap invoice): invalid signature

Going to have to look into this further. But my guess is it's because some of the relays have a trailing /. That's lost when serializing to a rust url type. Will have to figure out how to handle that. Would have been introduced here. https://github.com/thesimplekid/cln-zapper-rs/commit/281bc4321b38af99e43161a99422c634f433490b

nostr.mutinywallet.com has

Just do the verification on a simple string to json object without fancy url-types. you can do that after the verification.

I thought rust types were supposed to be helpful lol. Pushed that for now. https://github.com/thesimplekid/cln-zapper-rs

plugin-cln-zapper: Event { id: EventId(0x6e4e08b5e8dad1612b6d62b336027b850ef76bd6518b426f5452ba8a1f5c7324), pubkey: XOnlyPublicKey(bbd657fb095b4cee0d2998362332ac1ff4965f5ef61d577b7cc2deef1be8bb1a96c072d0561ded7178b1e3499be2fe14463747e408e5a72a21811bdf4ad787e1), created_at: Timestamp(1680560994), kind: ZapRequest, tags: [Event(EventId(0x158ffff18da26ade7b8c23a413750d65624322a3ab5f841bd2fd9c8358abe277), None, None), PubKey(XOnlyPublicKey(989fdfa258bab79ab1990cf37238c71013416d2dcf6b5e61b2f0cec486e93630e8b460e75e7683780f2219b1622f13d1a68545ae0e96782d5232426237dab646), None), Relays([\"wss://relay.damus.io\", \"wss://eden.nostr.land\", \"wss://nos.lol\", \"wss://nos.lol/\", \"wss://brb.io\", \"wss://nostrafrica.pcdkd.fyi\", \"wss://relay.current.fyi\", \"wss://nostr.mutinywallet.com/\", \"wss://relay.damus.io/\", \"wss://adult.18plus.social/\"])], content: \"\", sig: Signature(5a0ffead2c9e6ce6549acd0221872c600c55b19bc0c6bf9e61e82e8ce552d684e51ff7a24f2c21d2fe9fdbd8bf4ec1e152584a04b69fac6d6ec0c5254a818c28) }

If you got that then its verifying i belive, is it working? I do see 23 sats on this post but not sure if youre using youre other zapper. Never seen that TLS error before

yes, it works. but I think because you commented out the verification.

No, I realized Event from json does verification so dont need to call it manually. https://docs.rs/nostr/0.20.0/src/nostr/event/mod.rs.html#94-101

also got this somewhere at start: **BROKEN** plugin-cln-zapper: TLS alert received: AlertMessagePayload {\n level: Fatal,\n description: InternalError,\n}

{\"content\":\"\",\"created_at\":1680535967,\"id\":\"0237c32a241cbbdb6d8c7984befbd04428643669007f5d12efb7806863ac746e\",\"kind\":9734,\"pubkey\":\"1abbe81befdec27c7b571df65e5f96f41fac32233698290dee4c5b09fb57d6bb\",\"sig\":\"3e5fd2d74972b9aba7519e5c239b413f78cb8b1dd9f1349f883d6c1edf6619e36ca423524a99d3d8739fde095557a287e7690e1fca1a5ecea16e846035499e39\",\"tags\":[[\"e\",\"9b8e5879b8f895b229c97a87deb1232d96499d746209625284dd8de65ebb52e3\"],[\"p\",\"3036e986c4cef0b2615e6bcf2d6d411310c73872f30c99b19ab7ba58a2df9f98\"],[\"relays\",\"wss://relay.damus.io\",\"wss://eden.nostr.land\",\"wss://nos.lol\",\"wss://nostr.mutinywallet.com/\",\"wss://offchain.pub\",\"wss://relay.damus.io/\",\"wss://relay.current.fyi\",\"wss://relay.snort.social\",\"wss://nostr.btcmp.com\",\"wss://adult.18plus.social/\"]]}