Skip to content

feat: Add Claimable Balance Creation Helper Tool (#130)#285

Merged
adams813 merged 4 commits intobenelabs:mainfrom
TochukwuJustice:fix-balance
May 3, 2026
Merged

feat: Add Claimable Balance Creation Helper Tool (#130)#285
adams813 merged 4 commits intobenelabs:mainfrom
TochukwuJustice:fix-balance

Conversation

@TochukwuJustice
Copy link
Copy Markdown
Contributor

@TochukwuJustice TochukwuJustice commented Apr 29, 2026

closes #130
Summary of Changes:

New MCP Tool: Added create_claimable_balance to simplify the creation of Stellar claimable balances.
Recursive Predicate Support: Implemented a robust mapping logic that supports complex nested conditions using and, or, and not logical operators.
Time-Lock Helpers: Support for beforeAbsoluteTime and beforeRelativeTime predicates.
Schema Validation: Added CreateClaimableBalanceInputSchema with strict Zod validation for assets, amounts, and claimant lists (up to 10 claimants).
Unit Testing: Added 100% coverage for the new tool logic, verifying asset resolution and complex predicate construction.
Reason for Changes: Building complex claimable balance predicates is traditionally difficult for AI assistants and human developers due to nested XDR structures. This tool abstracts that complexity into a clean JSON-based helper, enabling easier fund distribution with advanced conditions (e.g., timelocks, conditional payouts).

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 29, 2026

@TochukwuJustice Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@adams813
Copy link
Copy Markdown
Collaborator

adams813 commented May 3, 2026

Nice Implementation, LGTM!

@adams813 adams813 merged commit 4b789b1 into benelabs:main May 3, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Support for Claimable Balance Creation Helper

2 participants