Repository navigation
Return SignedRawTransaction instead of String for raw transactions - #705
Merged
Merged
Conversation
abdrasulov
previously approved these changes
Jun 1, 2026
There was a problem hiding this comment.
Pull request overview
This PR updates the kit/core API so that creating a signed raw transaction returns a structured result (raw hex + computed tx hash) instead of only the raw hex string.
Changes:
- Change
BitcoinCore.rawTransaction()return type fromStringtoSignedRawTransaction(hex + tx hash). - Update
AbstractKit.rawTransaction()to forward the new return type.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/BitcoinCore.kt | Returns a new structured SignedRawTransaction containing hex + computed transaction hash. |
| bitcoincore/src/main/kotlin/io/horizontalsystems/bitcoincore/AbstractKit.kt | Updates the public kit API to return the new structured raw-transaction type. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+553
to
+559
| return SignedRawTransaction( | ||
| hex = TransactionSerializer.serialize(fullTransaction).toHexString(), | ||
| txHash = fullTransaction.header.hash.toReversedHex(), | ||
| ) | ||
| } | ||
|
|
||
| data class SignedRawTransaction(val hex: String, val txHash: String) |
Comment on lines
283
to
296
| fun rawTransaction( | ||
| address: String, | ||
| memo: String?, | ||
| value: Long, | ||
| senderPay: Boolean = true, | ||
| feeRate: Int, | ||
| sortType: TransactionDataSortType, | ||
| unspentOutputs: List<UnspentOutputInfo>? = null, | ||
| pluginData: Map<Byte, IPluginData> = mapOf(), | ||
| rbfEnabled: Boolean, | ||
| changeToFirstInput: Boolean, | ||
| filters: UtxoFilters, | ||
| ): String { | ||
| ): BitcoinCore.SignedRawTransaction { | ||
| return bitcoinCore.rawTransaction( |
abdrasulov
approved these changes
Jun 1, 2026
rafaelekol
approved these changes
Jun 1, 2026
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.
No description provided.