-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add comprehensive transaction building to wallet FFI #175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add comprehensive transaction building to wallet FFI #175
Conversation
This commit adds production-ready transaction building functionality to the key-wallet-ffi layer, enabling C/Swift clients to create and sign transactions. New FFI Functions: 1. wallet_build_and_sign_transaction() - Comprehensive transaction builder that: - Selects UTXOs using Branch and Bound coin selection algorithm - Calculates fees based on fee_per_kb rate - Generates change addresses from internal address pool - Derives private keys from root extended key for signing - Returns fully signed, serialized transaction bytes 2. transaction_get_txid_from_bytes() - Utility function that: - Deserializes raw transaction bytes - Returns hex-encoded TXID as C string Implementation Details: - Integrates with ManagedWalletInfo for UTXO tracking and address management - Uses TransactionBuilder pattern with proper fee calculation - Maps addresses to derivation paths for key derivation - Comprehensive error handling with FFIError propagation - Proper memory management following FFI safety patterns - Updated wallet_build_transaction() to direct users to new combined function 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
Warning Rate limit exceeded@PastaPastaPasta has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 5 minutes and 29 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (3)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
…action This commit simplifies the memory allocation process for the transaction bytes in the wallet_build_and_sign_transaction function by removing an unnecessary match statement. The updated code directly allocates and converts the boxed slice into a raw pointer, improving readability and maintainability.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
This commit adds production-ready transaction building functionality to the key-wallet-ffi layer, enabling C/Swift clients to create and sign transactions.
New FFI Functions:
wallet_build_and_sign_transaction() - Comprehensive transaction builder that:
transaction_get_txid_from_bytes() - Utility function that:
Implementation Details:
🤖 Generated with Claude Code