Skip to content

(draft) deps: 2.0.0#297

Closed
reez wants to merge 1 commit intobitcoindevkit:mainfrom
reez:ffi-756
Closed

(draft) deps: 2.0.0#297
reez wants to merge 1 commit intobitcoindevkit:mainfrom
reez:ffi-756

Conversation

@reez
Copy link
Copy Markdown
Collaborator

@reez reez commented Jun 2, 2025

Description

Notes to the reviewers

Changelog notice

Checklists

All Submissions:

New Features:

  • I've added tests for the new feature
  • I've added docs for the new feature
  • UI changes tested on small, medium, and large devices to ensure layout consistency

Bugfixes:

  • This pull request breaks the existing API
  • I've added tests to reproduce the issue which are now passing
  • I'm linking the issue being fixed by this PR

@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Jun 2, 2025

8f61274 tested by using ffi master at said date

@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Jun 2, 2025

tested local build of bitcoindevkit/bdk-ffi#777 (no changes to iOS app that I'm seeing)

Comment thread BDKSwiftExampleWallet/Extensions/BDK+Extensions/LocalOutput+Extensions.swift Outdated
@reez reez force-pushed the ffi-756 branch 3 times, most recently from 20da6be to 4049420 Compare June 3, 2025 19:29
blockId: .init(
height: UInt32(12),
hash: "hash"
hash: try! BlockHash.fromBytes(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

BlockHash changed from String to type bitcoindevkit/bdk-ffi@23d14f0

Would be nice to have a String constructor again somehow

confirmationTime: UInt64(21)
),
transitively: "c1f9fe0d7f97c6490f8360cf71bbef151f2e73302bd06f1690d640b96fb94457"
transitively: try! Txid.fromBytes(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Txid changed from String to type bitcoindevkit/bdk-ffi@23d14f0

Would be nice to have a String constructor again somehow

static var mock = LocalOutput(
outpoint: OutPoint(
txid: "txid",
txid: try! Txid.fromBytes(
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Txid changed from String to type bitcoindevkit/bdk-ffi@23d14f0

Would be nice to have a String constructor again somehow

txout: TxOut(
value: UInt64(1),
scriptPubkey: Script(rawOutputScript: [UInt8(1)])
scriptPubkey: Script.init(rawOutputScript: Data([0x51]))
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

import Foundation
import BitcoinDevKit

extension OutPoint: Hashable {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Outpoint went to Record from object so lost its Hashable/Equatable in the process, so added this because of that

extension Transaction {
var transactionID: String {
return self.computeTxid()
return "\(self.computeTxid())"
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

function returned String but now returns Txid

bitcoindevkit/bdk-ffi@23d14f0

extension Transaction {
static var mock = try? Transaction(
transactionBytes: String.mockTransactionHex.hexStringToByteArray()
transactionBytes: Data(String.mockTransactionHex.hexStringToByteArray())
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think similar-ish to https://github.com/bitcoindevkit/BDKSwiftExampleWallet/pull/297/files#r2124988471 ?

new expectation is Data as argument type

VStack(alignment: .leading, spacing: 5) {

Text(output.outpoint.txid)
Text(output.outpoint.txid.description)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

bitcoindevkit/bdk-ffi@23d14f0

Outpoint uses txid which is a type not a string now

@reez reez mentioned this pull request Jul 14, 2025
9 tasks
@reez
Copy link
Copy Markdown
Collaborator Author

reez commented Jul 14, 2025

closing in favor of #302

@reez reez closed this Jul 14, 2025
@reez reez deleted the ffi-756 branch July 30, 2025 21:00
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.

1 participant