cashubtc / nuts

Cashu protocol specifications https://cashubtc.github.io/nuts/
MIT License
150 stars 52 forks source link

NUT-11: Proof JSON seralization #61

Closed thesimplekid closed 9 months ago

thesimplekid commented 1 year ago

I am having trouble with the proof serialization in NUT-11, I do not think the example proof JSON in the NUT is valid. The ' should be replaced with a " and the witness field is missing {}.

{
   "amount":8,
   "secret":"[\"P2PK\", {\"nonce\": \"5d11913ee0f92fefdc82a6764fd2457a\", \"data\": \"026562efcfadc8e86d44da6a8adf80633d974302e62c850774db1fb36ff4cc7198\",}]",
   "C":"02250a37a56b78e66674f7f063e6abd3d9345f8761fb90cac0293108910a8c27a3",
   "id":"1cCNIAZ2X/w1",
   "witness":[
      {
         "signatures":[
            "c43d0090be59340a6364dc1340876211f2173d6a21c391115adf097adb6ea0a3ddbe7fd81b4677281decc77be09c0359faa77416025130e487f8b9169eb0c609"
         ]
      }
   ]
}

https://github.com/cashubtc/nuts/blob/aefec2e80c108cbf794e592dc6ae3b8bdc3fc6f8/11.md?plain=1#L31-L45

thesimplekid commented 9 months ago

https://github.com/cashubtc/nuts/pull/77#issue-2100323353