Skip to content

Return SignedRawTransaction instead of String for raw transactions - #705

Merged
omurovch merged 1 commit into
masterfrom
raw-transaction
Jun 1, 2026
Merged

omurovch merged 1 commit into
masterfrom
raw-transaction

Conversation

@omurovch

@omurovch omurovch commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

No description provided.

abdrasulov
abdrasulov previously approved these changes Jun 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from String to SignedRawTransaction (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(
@omurovch
omurovch merged commit 4d5fc85 into master Jun 1, 2026
1 of 2 checks passed
@omurovch
omurovch deleted the raw-transaction branch June 1, 2026 09:35

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

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.

4 participants