Open
Conversation
Replace closed_loop boolean with a purpose enum (transactional | gift-card | offer) in mint info extensions. Offer mints have NUT-04 minting disabled and keyset-based expiry for promotional ecash distribution. - Add 'offer' to MintPurpose type and account_purpose DB enum - Add expiresAt field to CashuAccount (derived from active keyset final_expiry) - Allow NUT-04 disabled in mint validation for offer mints - Adapt canSendToLightning/canReceiveFromLightning for 3-purpose model - Update isTestMintQueryOptions to handle mints with minting disabled
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (add-offer-accounts) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
gudnuf
commented
Mar 26, 2026
| * Converted from the active keyset's `final_expiry` unix epoch (NUT-02). | ||
| * Null for non-offer accounts or when the keyset has no expiry. | ||
| */ | ||
| expires_at: z.string().nullable().optional(), |
Contributor
Author
There was a problem hiding this comment.
looking at this plan for adding account state here I'm wondering if expires_at should be a new column, not in the cashu account jsonb.
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace closed_loop boolean with a purpose enum (transactional | gift-card | offer) in mint info extensions. Offer mints have NUT-04 minting disabled and keyset-based expiry.
I will open follow up PRs that add the account state (active, expired, deleted), and one for the offers UI