refactor: explain better the 'toBeRedeemed' field

This commit is contained in:
P. Reis 2025-02-20 19:21:20 -03:00
parent 71fd6ef965
commit 36640dd400

View file

@ -119,8 +119,12 @@ async function getLastRedeemedNutzap(
} }
/** /**
* toBeRedeemed are the nutzaps that will be redeemed and saved in the kind 7376 - https://github.com/nostr-protocol/nips/blob/master/60.md#spending-history-event * toBeRedeemed are the nutzaps that will be redeemed into a kind 7375 and saved in the kind 7376 tags
* The tags format is: [ [ "e", "<event-id-of-created-token>", "", "redeemed" ] ] * The tags format is: [
* [ "e", "<9321-event-id>", "<relay-hint>", "redeemed" ], // nutzap event that has been redeemed
* [ "p", "<sender-pubkey>" ] // pubkey of the author of the 9321 event (nutzap sender)
* ]
* https://github.com/nostr-protocol/nips/blob/master/61.md#updating-nutzap-redemption-history
*/ */
type MintsToProofs = { [key: string]: { proofs: Proof[]; toBeRedeemed: string[][] } }; type MintsToProofs = { [key: string]: { proofs: Proof[]; toBeRedeemed: string[][] } };