From 6cc7412e0ead59cf6d51e8b061ce9f8e3ebb180a Mon Sep 17 00:00:00 2001 From: runner Date: Tue, 24 Sep 2024 18:49:16 +0000 Subject: [PATCH] Update BitcoinDevKit.swift and Package.swift for release 0.31.2 --- Package.swift | 4 +- Sources/BitcoinDevKit/BitcoinDevKit.swift | 241 +++++++++++----------- 2 files changed, 128 insertions(+), 117 deletions(-) diff --git a/Package.swift b/Package.swift index 1354392..94f94b0 100644 --- a/Package.swift +++ b/Package.swift @@ -24,8 +24,8 @@ let package = Package( // Targets can depend on other targets in this package, and on products in packages this package depends on. .binaryTarget( name: "bdkFFI", - url: "https://github.com/bitcoindevkit/bdk-swift/releases/download/0.31.0/bdkFFI.xcframework.zip", - checksum: "aaa290375c2c4631dbfc3e5aa2292cff637dae78f16597791c0aa1c294940df2"), + url: "https://github.com/bitcoindevkit/bdk-swift/releases/download/0.31.2/bdkFFI.xcframework.zip", + checksum: "83af71f019577b2c93d7c846a77419881e4c2fd25551122b3e59314808344224"), .target( name: "BitcoinDevKit", dependencies: ["bdkFFI"]), diff --git a/Sources/BitcoinDevKit/BitcoinDevKit.swift b/Sources/BitcoinDevKit/BitcoinDevKit.swift index c6ae427..b643ee8 100644 --- a/Sources/BitcoinDevKit/BitcoinDevKit.swift +++ b/Sources/BitcoinDevKit/BitcoinDevKit.swift @@ -19,13 +19,13 @@ fileprivate extension RustBuffer { } static func from(_ ptr: UnsafeBufferPointer) -> RustBuffer { - try! rustCall { ffi_bdk_84_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } + try! rustCall { ffi_bdk_bb98_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } } // Frees the buffer in place. // The buffer must not be used after this is called. func deallocate() { - try! rustCall { ffi_bdk_84_rustbuffer_free(self, $0) } + try! rustCall { ffi_bdk_bb98_rustbuffer_free(self, $0) } } } @@ -429,14 +429,14 @@ public class Address: AddressProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Address_new( + bdk_bb98_Address_new( FfiConverterString.lower(`address`), FfiConverterTypeNetwork.lower(`network`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Address_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Address_object_free(pointer, $0) } } @@ -445,7 +445,7 @@ public class Address: AddressProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Address_from_script( + bdk_bb98_Address_from_script( FfiConverterTypeScript.lower(`script`), FfiConverterTypeNetwork.lower(`network`), $0) }) @@ -458,7 +458,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_payload(self.pointer, $0 + bdk_bb98_Address_payload(self.pointer, $0 ) } ) @@ -468,7 +468,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_network(self.pointer, $0 + bdk_bb98_Address_network(self.pointer, $0 ) } ) @@ -478,7 +478,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_script_pubkey(self.pointer, $0 + bdk_bb98_Address_script_pubkey(self.pointer, $0 ) } ) @@ -488,7 +488,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_to_qr_uri(self.pointer, $0 + bdk_bb98_Address_to_qr_uri(self.pointer, $0 ) } ) @@ -498,7 +498,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_is_valid_for_network(self.pointer, + bdk_bb98_Address_is_valid_for_network(self.pointer, FfiConverterTypeNetwork.lower(`network`), $0 ) } @@ -509,7 +509,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_84_Address_as_string(self.pointer, $0 + bdk_bb98_Address_as_string(self.pointer, $0 ) } ) @@ -554,6 +554,7 @@ public protocol BlockchainProtocol { func `estimateFee`(`target`: UInt64) throws -> FeeRate func `getHeight`() throws -> UInt32 func `getBlockHash`(`height`: UInt32) throws -> String + func `getTx`(`txid`: String) throws -> Transaction? } @@ -571,13 +572,13 @@ public class Blockchain: BlockchainProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Blockchain_new( + bdk_bb98_Blockchain_new( FfiConverterTypeBlockchainConfig.lower(`config`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Blockchain_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Blockchain_object_free(pointer, $0) } } @@ -586,7 +587,7 @@ public class Blockchain: BlockchainProtocol { public func `broadcast`(`transaction`: Transaction) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Blockchain_broadcast(self.pointer, + bdk_bb98_Blockchain_broadcast(self.pointer, FfiConverterTypeTransaction.lower(`transaction`), $0 ) } @@ -595,7 +596,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterTypeFeeRate.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Blockchain_estimate_fee(self.pointer, + bdk_bb98_Blockchain_estimate_fee(self.pointer, FfiConverterUInt64.lower(`target`), $0 ) } @@ -605,7 +606,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterUInt32.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Blockchain_get_height(self.pointer, $0 + bdk_bb98_Blockchain_get_height(self.pointer, $0 ) } ) @@ -614,9 +615,19 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterString.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Blockchain_get_block_hash(self.pointer, + bdk_bb98_Blockchain_get_block_hash(self.pointer, FfiConverterUInt32.lower(`height`), $0 ) +} + ) + } + public func `getTx`(`txid`: String) throws -> Transaction? { + return try FfiConverterOptionTypeTransaction.lift( + try + rustCallWithError(FfiConverterTypeBdkError.self) { + bdk_bb98_Blockchain_get_tx(self.pointer, + FfiConverterString.lower(`txid`), $0 + ) } ) } @@ -677,14 +688,14 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { rustCall() { - bdk_84_BumpFeeTxBuilder_new( + bdk_bb98_BumpFeeTxBuilder_new( FfiConverterString.lower(`txid`), FfiConverterFloat.lower(`newFeeRate`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_BumpFeeTxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_BumpFeeTxBuilder_object_free(pointer, $0) } } @@ -695,7 +706,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_84_BumpFeeTxBuilder_allow_shrinking(self.pointer, + bdk_bb98_BumpFeeTxBuilder_allow_shrinking(self.pointer, FfiConverterTypeScript.lower(`scriptPubkey`), $0 ) } @@ -706,7 +717,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_84_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 + bdk_bb98_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -716,7 +727,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_84_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_bb98_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -726,7 +737,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_BumpFeeTxBuilder_finish(self.pointer, + bdk_bb98_BumpFeeTxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -785,13 +796,13 @@ public class DerivationPath: DerivationPathProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DerivationPath_new( + bdk_bb98_DerivationPath_new( FfiConverterString.lower(`path`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_DerivationPath_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_DerivationPath_object_free(pointer, $0) } } @@ -852,14 +863,14 @@ public class Descriptor: DescriptorProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Descriptor_new( + bdk_bb98_Descriptor_new( FfiConverterString.lower(`descriptor`), FfiConverterTypeNetwork.lower(`network`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Descriptor_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Descriptor_object_free(pointer, $0) } } @@ -868,7 +879,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip44( + bdk_bb98_Descriptor_new_bip44( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -880,7 +891,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip44_public( + bdk_bb98_Descriptor_new_bip44_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -893,7 +904,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip49( + bdk_bb98_Descriptor_new_bip49( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -905,7 +916,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip49_public( + bdk_bb98_Descriptor_new_bip49_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -918,7 +929,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip84( + bdk_bb98_Descriptor_new_bip84( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -930,7 +941,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip84_public( + bdk_bb98_Descriptor_new_bip84_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -943,7 +954,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip86( + bdk_bb98_Descriptor_new_bip86( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -955,7 +966,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_84_Descriptor_new_bip86_public( + bdk_bb98_Descriptor_new_bip86_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -970,7 +981,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_84_Descriptor_as_string(self.pointer, $0 + bdk_bb98_Descriptor_as_string(self.pointer, $0 ) } ) @@ -980,7 +991,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_84_Descriptor_as_string_private(self.pointer, $0 + bdk_bb98_Descriptor_as_string_private(self.pointer, $0 ) } ) @@ -1038,7 +1049,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { } deinit { - try! rustCall { ffi_bdk_84_DescriptorPublicKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_DescriptorPublicKey_object_free(pointer, $0) } } @@ -1047,7 +1058,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorPublicKey_from_string( + bdk_bb98_DescriptorPublicKey_from_string( FfiConverterString.lower(`publicKey`), $0) }) } @@ -1058,7 +1069,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorPublicKey_derive(self.pointer, + bdk_bb98_DescriptorPublicKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1068,7 +1079,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorPublicKey_extend(self.pointer, + bdk_bb98_DescriptorPublicKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1079,7 +1090,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { try! rustCall() { - bdk_84_DescriptorPublicKey_as_string(self.pointer, $0 + bdk_bb98_DescriptorPublicKey_as_string(self.pointer, $0 ) } ) @@ -1142,7 +1153,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCall() { - bdk_84_DescriptorSecretKey_new( + bdk_bb98_DescriptorSecretKey_new( FfiConverterTypeNetwork.lower(`network`), FfiConverterTypeMnemonic.lower(`mnemonic`), FfiConverterOptionString.lower(`password`), $0) @@ -1150,7 +1161,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { } deinit { - try! rustCall { ffi_bdk_84_DescriptorSecretKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_DescriptorSecretKey_object_free(pointer, $0) } } @@ -1159,7 +1170,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorSecretKey_from_string( + bdk_bb98_DescriptorSecretKey_from_string( FfiConverterString.lower(`secretKey`), $0) }) } @@ -1170,7 +1181,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorSecretKey_derive(self.pointer, + bdk_bb98_DescriptorSecretKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1180,7 +1191,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_DescriptorSecretKey_extend(self.pointer, + bdk_bb98_DescriptorSecretKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1191,7 +1202,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_84_DescriptorSecretKey_as_public(self.pointer, $0 + bdk_bb98_DescriptorSecretKey_as_public(self.pointer, $0 ) } ) @@ -1201,7 +1212,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_84_DescriptorSecretKey_secret_bytes(self.pointer, $0 + bdk_bb98_DescriptorSecretKey_secret_bytes(self.pointer, $0 ) } ) @@ -1211,7 +1222,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_84_DescriptorSecretKey_as_string(self.pointer, $0 + bdk_bb98_DescriptorSecretKey_as_string(self.pointer, $0 ) } ) @@ -1267,7 +1278,7 @@ public class FeeRate: FeeRateProtocol { } deinit { - try! rustCall { ffi_bdk_84_FeeRate_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_FeeRate_object_free(pointer, $0) } } @@ -1276,7 +1287,7 @@ public class FeeRate: FeeRateProtocol { rustCall() { - bdk_84_FeeRate_from_sat_per_vb( + bdk_bb98_FeeRate_from_sat_per_vb( FfiConverterFloat.lower(`satPerVb`), $0) }) } @@ -1288,7 +1299,7 @@ public class FeeRate: FeeRateProtocol { try! rustCall() { - bdk_84_FeeRate_as_sat_per_vb(self.pointer, $0 + bdk_bb98_FeeRate_as_sat_per_vb(self.pointer, $0 ) } ) @@ -1347,13 +1358,13 @@ public class Mnemonic: MnemonicProtocol { rustCall() { - bdk_84_Mnemonic_new( + bdk_bb98_Mnemonic_new( FfiConverterTypeWordCount.lower(`wordCount`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Mnemonic_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Mnemonic_object_free(pointer, $0) } } @@ -1362,7 +1373,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Mnemonic_from_string( + bdk_bb98_Mnemonic_from_string( FfiConverterString.lower(`mnemonic`), $0) }) } @@ -1372,7 +1383,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Mnemonic_from_entropy( + bdk_bb98_Mnemonic_from_entropy( FfiConverterSequenceUInt8.lower(`entropy`), $0) }) } @@ -1384,7 +1395,7 @@ public class Mnemonic: MnemonicProtocol { try! rustCall() { - bdk_84_Mnemonic_as_string(self.pointer, $0 + bdk_bb98_Mnemonic_as_string(self.pointer, $0 ) } ) @@ -1449,13 +1460,13 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_PartiallySignedTransaction_new( + bdk_bb98_PartiallySignedTransaction_new( FfiConverterString.lower(`psbtBase64`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_PartiallySignedTransaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_PartiallySignedTransaction_object_free(pointer, $0) } } @@ -1466,7 +1477,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_serialize(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_serialize(self.pointer, $0 ) } ) @@ -1476,7 +1487,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_txid(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_txid(self.pointer, $0 ) } ) @@ -1486,7 +1497,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_extract_tx(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_extract_tx(self.pointer, $0 ) } ) @@ -1495,7 +1506,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_PartiallySignedTransaction_combine(self.pointer, + bdk_bb98_PartiallySignedTransaction_combine(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`other`), $0 ) } @@ -1506,7 +1517,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_fee_amount(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_fee_amount(self.pointer, $0 ) } ) @@ -1516,7 +1527,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_fee_rate(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_fee_rate(self.pointer, $0 ) } ) @@ -1526,7 +1537,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_84_PartiallySignedTransaction_json_serialize(self.pointer, $0 + bdk_bb98_PartiallySignedTransaction_json_serialize(self.pointer, $0 ) } ) @@ -1585,13 +1596,13 @@ public class Script: ScriptProtocol { rustCall() { - bdk_84_Script_new( + bdk_bb98_Script_new( FfiConverterSequenceUInt8.lower(`rawOutputScript`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Script_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Script_object_free(pointer, $0) } } @@ -1602,7 +1613,7 @@ public class Script: ScriptProtocol { try! rustCall() { - bdk_84_Script_to_bytes(self.pointer, $0 + bdk_bb98_Script_to_bytes(self.pointer, $0 ) } ) @@ -1672,13 +1683,13 @@ public class Transaction: TransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Transaction_new( + bdk_bb98_Transaction_new( FfiConverterSequenceUInt8.lower(`transactionBytes`), $0) }) } deinit { - try! rustCall { ffi_bdk_84_Transaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Transaction_object_free(pointer, $0) } } @@ -1689,7 +1700,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_txid(self.pointer, $0 + bdk_bb98_Transaction_txid(self.pointer, $0 ) } ) @@ -1699,7 +1710,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_weight(self.pointer, $0 + bdk_bb98_Transaction_weight(self.pointer, $0 ) } ) @@ -1709,7 +1720,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_size(self.pointer, $0 + bdk_bb98_Transaction_size(self.pointer, $0 ) } ) @@ -1719,7 +1730,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_vsize(self.pointer, $0 + bdk_bb98_Transaction_vsize(self.pointer, $0 ) } ) @@ -1729,7 +1740,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_serialize(self.pointer, $0 + bdk_bb98_Transaction_serialize(self.pointer, $0 ) } ) @@ -1739,7 +1750,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_is_coin_base(self.pointer, $0 + bdk_bb98_Transaction_is_coin_base(self.pointer, $0 ) } ) @@ -1749,7 +1760,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_is_explicitly_rbf(self.pointer, $0 + bdk_bb98_Transaction_is_explicitly_rbf(self.pointer, $0 ) } ) @@ -1759,7 +1770,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_is_lock_time_enabled(self.pointer, $0 + bdk_bb98_Transaction_is_lock_time_enabled(self.pointer, $0 ) } ) @@ -1769,7 +1780,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_version(self.pointer, $0 + bdk_bb98_Transaction_version(self.pointer, $0 ) } ) @@ -1779,7 +1790,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_lock_time(self.pointer, $0 + bdk_bb98_Transaction_lock_time(self.pointer, $0 ) } ) @@ -1789,7 +1800,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_input(self.pointer, $0 + bdk_bb98_Transaction_input(self.pointer, $0 ) } ) @@ -1799,7 +1810,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_84_Transaction_output(self.pointer, $0 + bdk_bb98_Transaction_output(self.pointer, $0 ) } ) @@ -1874,12 +1885,12 @@ public class TxBuilder: TxBuilderProtocol { rustCall() { - bdk_84_TxBuilder_new($0) + bdk_bb98_TxBuilder_new($0) }) } deinit { - try! rustCall { ffi_bdk_84_TxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_TxBuilder_object_free(pointer, $0) } } @@ -1890,7 +1901,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_add_recipient(self.pointer, + bdk_bb98_TxBuilder_add_recipient(self.pointer, FfiConverterTypeScript.lower(`script`), FfiConverterUInt64.lower(`amount`), $0 ) @@ -1902,7 +1913,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_add_unspendable(self.pointer, + bdk_bb98_TxBuilder_add_unspendable(self.pointer, FfiConverterTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1913,7 +1924,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_add_utxo(self.pointer, + bdk_bb98_TxBuilder_add_utxo(self.pointer, FfiConverterTypeOutPoint.lower(`outpoint`), $0 ) } @@ -1924,7 +1935,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_add_utxos(self.pointer, + bdk_bb98_TxBuilder_add_utxos(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`outpoints`), $0 ) } @@ -1935,7 +1946,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_do_not_spend_change(self.pointer, $0 + bdk_bb98_TxBuilder_do_not_spend_change(self.pointer, $0 ) } ) @@ -1945,7 +1956,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_manually_selected_only(self.pointer, $0 + bdk_bb98_TxBuilder_manually_selected_only(self.pointer, $0 ) } ) @@ -1955,7 +1966,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_only_spend_change(self.pointer, $0 + bdk_bb98_TxBuilder_only_spend_change(self.pointer, $0 ) } ) @@ -1965,7 +1976,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_unspendable(self.pointer, + bdk_bb98_TxBuilder_unspendable(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1976,7 +1987,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_fee_rate(self.pointer, + bdk_bb98_TxBuilder_fee_rate(self.pointer, FfiConverterFloat.lower(`satPerVbyte`), $0 ) } @@ -1987,7 +1998,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_fee_absolute(self.pointer, + bdk_bb98_TxBuilder_fee_absolute(self.pointer, FfiConverterUInt64.lower(`feeAmount`), $0 ) } @@ -1998,7 +2009,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_drain_wallet(self.pointer, $0 + bdk_bb98_TxBuilder_drain_wallet(self.pointer, $0 ) } ) @@ -2008,7 +2019,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_drain_to(self.pointer, + bdk_bb98_TxBuilder_drain_to(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -2019,7 +2030,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_enable_rbf(self.pointer, $0 + bdk_bb98_TxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -2029,7 +2040,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_bb98_TxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -2040,7 +2051,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_add_data(self.pointer, + bdk_bb98_TxBuilder_add_data(self.pointer, FfiConverterSequenceUInt8.lower(`data`), $0 ) } @@ -2051,7 +2062,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_84_TxBuilder_set_recipients(self.pointer, + bdk_bb98_TxBuilder_set_recipients(self.pointer, FfiConverterSequenceTypeScriptAmount.lower(`recipients`), $0 ) } @@ -2061,7 +2072,7 @@ public class TxBuilder: TxBuilderProtocol { return try FfiConverterTypeTxBuilderResult.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_TxBuilder_finish(self.pointer, + bdk_bb98_TxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -2129,7 +2140,7 @@ public class Wallet: WalletProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_new( + bdk_bb98_Wallet_new( FfiConverterTypeDescriptor.lower(`descriptor`), FfiConverterOptionTypeDescriptor.lower(`changeDescriptor`), FfiConverterTypeNetwork.lower(`network`), @@ -2138,7 +2149,7 @@ public class Wallet: WalletProtocol { } deinit { - try! rustCall { ffi_bdk_84_Wallet_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bb98_Wallet_object_free(pointer, $0) } } @@ -2149,7 +2160,7 @@ public class Wallet: WalletProtocol { try! rustCall() { - bdk_84_Wallet_network(self.pointer, $0 + bdk_bb98_Wallet_network(self.pointer, $0 ) } ) @@ -2158,7 +2169,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_get_address(self.pointer, + bdk_bb98_Wallet_get_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2168,7 +2179,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_get_internal_address(self.pointer, + bdk_bb98_Wallet_get_internal_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2178,7 +2189,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_is_mine(self.pointer, + bdk_bb98_Wallet_is_mine(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -2188,7 +2199,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeLocalUtxo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_list_unspent(self.pointer, $0 + bdk_bb98_Wallet_list_unspent(self.pointer, $0 ) } ) @@ -2197,7 +2208,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeTransactionDetails.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_list_transactions(self.pointer, + bdk_bb98_Wallet_list_transactions(self.pointer, FfiConverterBool.lower(`includeRaw`), $0 ) } @@ -2207,7 +2218,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeBalance.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_get_balance(self.pointer, $0 + bdk_bb98_Wallet_get_balance(self.pointer, $0 ) } ) @@ -2216,7 +2227,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_sign(self.pointer, + bdk_bb98_Wallet_sign(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`psbt`), FfiConverterOptionTypeSignOptions.lower(`signOptions`), $0 ) @@ -2226,7 +2237,7 @@ public class Wallet: WalletProtocol { public func `sync`(`blockchain`: Blockchain, `progress`: Progress?) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_84_Wallet_sync(self.pointer, + bdk_bb98_Wallet_sync(self.pointer, FfiConverterTypeBlockchain.lower(`blockchain`), FfiConverterOptionCallbackInterfaceProgress.lower(`progress`), $0 ) @@ -4555,7 +4566,7 @@ fileprivate struct FfiConverterCallbackInterfaceProgress { private static var callbackInitialized = false private static func initCallback() { try! rustCall { (err: UnsafeMutablePointer) in - ffi_bdk_84_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) + ffi_bdk_bb98_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) } } private static func ensureCallbackinitialized() {