feat: NUT-CTF conditional tokens for prediction markets#1666
Draft
joemphilips wants to merge 4 commits intocashubtc:mainfrom
Draft
feat: NUT-CTF conditional tokens for prediction markets#1666joemphilips wants to merge 4 commits intocashubtc:mainfrom
joemphilips wants to merge 4 commits intocashubtc:mainfrom
Conversation
Add NUT-CTF conditional token support including: - Condition creation, attestation, and partition management - Split/merge and numeric conditional tokens - Pagination, status filtering, and incremental sync - Database storage types and SQL migrations - Wallet API and HTTP client integration - Security hardening for conditional token flows
…cation - Fix record_attestation type mismatch: use MintDatabase<database::Error> and map_err(Error::Database) for DB calls - Extract shared oracle verification into reusable helpers: parse_announcements_with_index, verify_enum_threshold, verify_numeric_threshold, record_attestation - Deduplicate swap saga: merge setup_swap and setup_swap_unbalanced into setup_swap_inner with BalanceCheck enum - Replace magic strings with STATUS_PENDING/STATUS_ATTESTED constants - Remove unused import (STATUS_PENDING in redeem_outcome) - Minor cleanups: hoist keyset timestamp, avoid unnecessary clone
The /v1/conditions endpoint for NUT-CTF is only available with the conditional-tokens cargo feature flag enabled.
The `record_attestation` free function took `&dyn MintDatabase<Error>` without Send+Sync bounds, causing the `post_redeem_outcome` axum handler's future to not be Send.
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.
Summary
Reference implementation of NUT-CTF: Conditional Tokens for Prediction Markets.
This is a work-in-progress draft. More details to follow as the spec stabilizes.