From 5f7e4125e68a0154f8d76cc5dd75847c33af7708 Mon Sep 17 00:00:00 2001 From: runner Date: Mon, 11 Sep 2023 20:19:49 +0000 Subject: [PATCH] Update BitcoinDevKit.swift and Package.swift for release 0.30.0 --- Package.swift | 4 +- Sources/BitcoinDevKit/BitcoinDevKit.swift | 249 ++++++++++++---------- 2 files changed, 139 insertions(+), 114 deletions(-) diff --git a/Package.swift b/Package.swift index 5c1b052..9757973 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.29.0/bdkFFI.xcframework.zip", - checksum: "083617d379c49ff13fc7074778dd2dca32ebeaf9123ffcaa94d472c5abd30228"), + url: "https://github.com/bitcoindevkit/bdk-swift/releases/download/0.30.0/bdkFFI.xcframework.zip", + checksum: "b384b2968315f9d6cc68af830b6e56f3cf83dfd342c18765264d820b02b7c00d"), .target( name: "BitcoinDevKit", dependencies: ["bdkFFI"]), diff --git a/Sources/BitcoinDevKit/BitcoinDevKit.swift b/Sources/BitcoinDevKit/BitcoinDevKit.swift index a987c73..e65255e 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_103c_rustbuffer_from_bytes(ForeignBytes(bufferPointer: ptr), $0) } + try! rustCall { ffi_bdk_bc5f_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_103c_rustbuffer_free(self, $0) } + try! rustCall { ffi_bdk_bc5f_rustbuffer_free(self, $0) } } } @@ -428,13 +428,13 @@ public class Address: AddressProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Address_new( + bdk_bc5f_Address_new( FfiConverterString.lower(`address`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Address_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Address_object_free(pointer, $0) } } @@ -443,7 +443,7 @@ public class Address: AddressProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Address_from_script( + bdk_bc5f_Address_from_script( FfiConverterTypeScript.lower(`script`), FfiConverterTypeNetwork.lower(`network`), $0) }) @@ -456,7 +456,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_payload(self.pointer, $0 + bdk_bc5f_Address_payload(self.pointer, $0 ) } ) @@ -466,7 +466,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_network(self.pointer, $0 + bdk_bc5f_Address_network(self.pointer, $0 ) } ) @@ -476,7 +476,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_script_pubkey(self.pointer, $0 + bdk_bc5f_Address_script_pubkey(self.pointer, $0 ) } ) @@ -486,7 +486,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_to_qr_uri(self.pointer, $0 + bdk_bc5f_Address_to_qr_uri(self.pointer, $0 ) } ) @@ -496,7 +496,7 @@ public class Address: AddressProtocol { try! rustCall() { - bdk_103c_Address_as_string(self.pointer, $0 + bdk_bc5f_Address_as_string(self.pointer, $0 ) } ) @@ -558,13 +558,13 @@ public class Blockchain: BlockchainProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_new( + bdk_bc5f_Blockchain_new( FfiConverterTypeBlockchainConfig.lower(`config`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Blockchain_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Blockchain_object_free(pointer, $0) } } @@ -573,7 +573,7 @@ public class Blockchain: BlockchainProtocol { public func `broadcast`(`transaction`: Transaction) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_broadcast(self.pointer, + bdk_bc5f_Blockchain_broadcast(self.pointer, FfiConverterTypeTransaction.lower(`transaction`), $0 ) } @@ -582,7 +582,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterTypeFeeRate.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_estimate_fee(self.pointer, + bdk_bc5f_Blockchain_estimate_fee(self.pointer, FfiConverterUInt64.lower(`target`), $0 ) } @@ -592,7 +592,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterUInt32.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_get_height(self.pointer, $0 + bdk_bc5f_Blockchain_get_height(self.pointer, $0 ) } ) @@ -601,7 +601,7 @@ public class Blockchain: BlockchainProtocol { return try FfiConverterString.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Blockchain_get_block_hash(self.pointer, + bdk_bc5f_Blockchain_get_block_hash(self.pointer, FfiConverterUInt32.lower(`height`), $0 ) } @@ -664,14 +664,14 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { rustCall() { - bdk_103c_BumpFeeTxBuilder_new( + bdk_bc5f_BumpFeeTxBuilder_new( FfiConverterString.lower(`txid`), FfiConverterFloat.lower(`newFeeRate`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_BumpFeeTxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_BumpFeeTxBuilder_object_free(pointer, $0) } } @@ -682,7 +682,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_103c_BumpFeeTxBuilder_allow_shrinking(self.pointer, + bdk_bc5f_BumpFeeTxBuilder_allow_shrinking(self.pointer, FfiConverterString.lower(`address`), $0 ) } @@ -693,7 +693,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_103c_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 + bdk_bc5f_BumpFeeTxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -703,7 +703,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { try! rustCall() { - bdk_103c_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_bc5f_BumpFeeTxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -713,7 +713,7 @@ public class BumpFeeTxBuilder: BumpFeeTxBuilderProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_BumpFeeTxBuilder_finish(self.pointer, + bdk_bc5f_BumpFeeTxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -772,13 +772,13 @@ public class DerivationPath: DerivationPathProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DerivationPath_new( + bdk_bc5f_DerivationPath_new( FfiConverterString.lower(`path`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_DerivationPath_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_DerivationPath_object_free(pointer, $0) } } @@ -839,14 +839,14 @@ public class Descriptor: DescriptorProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Descriptor_new( + bdk_bc5f_Descriptor_new( FfiConverterString.lower(`descriptor`), FfiConverterTypeNetwork.lower(`network`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Descriptor_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Descriptor_object_free(pointer, $0) } } @@ -855,7 +855,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip44( + bdk_bc5f_Descriptor_new_bip44( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -867,7 +867,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip44_public( + bdk_bc5f_Descriptor_new_bip44_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -880,7 +880,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip49( + bdk_bc5f_Descriptor_new_bip49( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -892,7 +892,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip49_public( + bdk_bc5f_Descriptor_new_bip49_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -905,7 +905,7 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip84( + bdk_bc5f_Descriptor_new_bip84( FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), FfiConverterTypeKeychainKind.lower(`keychain`), FfiConverterTypeNetwork.lower(`network`), $0) @@ -917,7 +917,32 @@ public class Descriptor: DescriptorProtocol { rustCall() { - bdk_103c_Descriptor_new_bip84_public( + bdk_bc5f_Descriptor_new_bip84_public( + FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), + FfiConverterString.lower(`fingerprint`), + FfiConverterTypeKeychainKind.lower(`keychain`), + FfiConverterTypeNetwork.lower(`network`), $0) +}) + } + + public static func `newBip86`(`secretKey`: DescriptorSecretKey, `keychain`: KeychainKind, `network`: Network) -> Descriptor { + return Descriptor(unsafeFromRawPointer: try! + + rustCall() { + + bdk_bc5f_Descriptor_new_bip86( + FfiConverterTypeDescriptorSecretKey.lower(`secretKey`), + FfiConverterTypeKeychainKind.lower(`keychain`), + FfiConverterTypeNetwork.lower(`network`), $0) +}) + } + + public static func `newBip86Public`(`publicKey`: DescriptorPublicKey, `fingerprint`: String, `keychain`: KeychainKind, `network`: Network) -> Descriptor { + return Descriptor(unsafeFromRawPointer: try! + + rustCall() { + + bdk_bc5f_Descriptor_new_bip86_public( FfiConverterTypeDescriptorPublicKey.lower(`publicKey`), FfiConverterString.lower(`fingerprint`), FfiConverterTypeKeychainKind.lower(`keychain`), @@ -932,7 +957,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_103c_Descriptor_as_string(self.pointer, $0 + bdk_bc5f_Descriptor_as_string(self.pointer, $0 ) } ) @@ -942,7 +967,7 @@ public class Descriptor: DescriptorProtocol { try! rustCall() { - bdk_103c_Descriptor_as_string_private(self.pointer, $0 + bdk_bc5f_Descriptor_as_string_private(self.pointer, $0 ) } ) @@ -1000,7 +1025,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { } deinit { - try! rustCall { ffi_bdk_103c_DescriptorPublicKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_DescriptorPublicKey_object_free(pointer, $0) } } @@ -1009,7 +1034,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_from_string( + bdk_bc5f_DescriptorPublicKey_from_string( FfiConverterString.lower(`publicKey`), $0) }) } @@ -1020,7 +1045,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_derive(self.pointer, + bdk_bc5f_DescriptorPublicKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1030,7 +1055,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { return try FfiConverterTypeDescriptorPublicKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorPublicKey_extend(self.pointer, + bdk_bc5f_DescriptorPublicKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1041,7 +1066,7 @@ public class DescriptorPublicKey: DescriptorPublicKeyProtocol { try! rustCall() { - bdk_103c_DescriptorPublicKey_as_string(self.pointer, $0 + bdk_bc5f_DescriptorPublicKey_as_string(self.pointer, $0 ) } ) @@ -1104,7 +1129,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCall() { - bdk_103c_DescriptorSecretKey_new( + bdk_bc5f_DescriptorSecretKey_new( FfiConverterTypeNetwork.lower(`network`), FfiConverterTypeMnemonic.lower(`mnemonic`), FfiConverterOptionString.lower(`password`), $0) @@ -1112,7 +1137,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { } deinit { - try! rustCall { ffi_bdk_103c_DescriptorSecretKey_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_DescriptorSecretKey_object_free(pointer, $0) } } @@ -1121,7 +1146,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_from_string( + bdk_bc5f_DescriptorSecretKey_from_string( FfiConverterString.lower(`secretKey`), $0) }) } @@ -1132,7 +1157,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_derive(self.pointer, + bdk_bc5f_DescriptorSecretKey_derive(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1142,7 +1167,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { return try FfiConverterTypeDescriptorSecretKey.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_DescriptorSecretKey_extend(self.pointer, + bdk_bc5f_DescriptorSecretKey_extend(self.pointer, FfiConverterTypeDerivationPath.lower(`path`), $0 ) } @@ -1153,7 +1178,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_as_public(self.pointer, $0 + bdk_bc5f_DescriptorSecretKey_as_public(self.pointer, $0 ) } ) @@ -1163,7 +1188,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_secret_bytes(self.pointer, $0 + bdk_bc5f_DescriptorSecretKey_secret_bytes(self.pointer, $0 ) } ) @@ -1173,7 +1198,7 @@ public class DescriptorSecretKey: DescriptorSecretKeyProtocol { try! rustCall() { - bdk_103c_DescriptorSecretKey_as_string(self.pointer, $0 + bdk_bc5f_DescriptorSecretKey_as_string(self.pointer, $0 ) } ) @@ -1229,7 +1254,7 @@ public class FeeRate: FeeRateProtocol { } deinit { - try! rustCall { ffi_bdk_103c_FeeRate_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_FeeRate_object_free(pointer, $0) } } @@ -1238,7 +1263,7 @@ public class FeeRate: FeeRateProtocol { rustCall() { - bdk_103c_FeeRate_from_sat_per_vb( + bdk_bc5f_FeeRate_from_sat_per_vb( FfiConverterFloat.lower(`satPerVb`), $0) }) } @@ -1250,7 +1275,7 @@ public class FeeRate: FeeRateProtocol { try! rustCall() { - bdk_103c_FeeRate_as_sat_per_vb(self.pointer, $0 + bdk_bc5f_FeeRate_as_sat_per_vb(self.pointer, $0 ) } ) @@ -1309,13 +1334,13 @@ public class Mnemonic: MnemonicProtocol { rustCall() { - bdk_103c_Mnemonic_new( + bdk_bc5f_Mnemonic_new( FfiConverterTypeWordCount.lower(`wordCount`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Mnemonic_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Mnemonic_object_free(pointer, $0) } } @@ -1324,7 +1349,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Mnemonic_from_string( + bdk_bc5f_Mnemonic_from_string( FfiConverterString.lower(`mnemonic`), $0) }) } @@ -1334,7 +1359,7 @@ public class Mnemonic: MnemonicProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Mnemonic_from_entropy( + bdk_bc5f_Mnemonic_from_entropy( FfiConverterSequenceUInt8.lower(`entropy`), $0) }) } @@ -1346,7 +1371,7 @@ public class Mnemonic: MnemonicProtocol { try! rustCall() { - bdk_103c_Mnemonic_as_string(self.pointer, $0 + bdk_bc5f_Mnemonic_as_string(self.pointer, $0 ) } ) @@ -1411,13 +1436,13 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_PartiallySignedTransaction_new( + bdk_bc5f_PartiallySignedTransaction_new( FfiConverterString.lower(`psbtBase64`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_PartiallySignedTransaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_PartiallySignedTransaction_object_free(pointer, $0) } } @@ -1428,7 +1453,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_serialize(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_serialize(self.pointer, $0 ) } ) @@ -1438,7 +1463,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_txid(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_txid(self.pointer, $0 ) } ) @@ -1448,7 +1473,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_extract_tx(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_extract_tx(self.pointer, $0 ) } ) @@ -1457,7 +1482,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { return try FfiConverterTypePartiallySignedTransaction.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_PartiallySignedTransaction_combine(self.pointer, + bdk_bc5f_PartiallySignedTransaction_combine(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`other`), $0 ) } @@ -1468,7 +1493,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_fee_amount(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_fee_amount(self.pointer, $0 ) } ) @@ -1478,7 +1503,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_fee_rate(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_fee_rate(self.pointer, $0 ) } ) @@ -1488,7 +1513,7 @@ public class PartiallySignedTransaction: PartiallySignedTransactionProtocol { try! rustCall() { - bdk_103c_PartiallySignedTransaction_json_serialize(self.pointer, $0 + bdk_bc5f_PartiallySignedTransaction_json_serialize(self.pointer, $0 ) } ) @@ -1547,13 +1572,13 @@ public class Script: ScriptProtocol { rustCall() { - bdk_103c_Script_new( + bdk_bc5f_Script_new( FfiConverterSequenceUInt8.lower(`rawOutputScript`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Script_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Script_object_free(pointer, $0) } } @@ -1564,7 +1589,7 @@ public class Script: ScriptProtocol { try! rustCall() { - bdk_103c_Script_to_bytes(self.pointer, $0 + bdk_bc5f_Script_to_bytes(self.pointer, $0 ) } ) @@ -1634,13 +1659,13 @@ public class Transaction: TransactionProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Transaction_new( + bdk_bc5f_Transaction_new( FfiConverterSequenceUInt8.lower(`transactionBytes`), $0) }) } deinit { - try! rustCall { ffi_bdk_103c_Transaction_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Transaction_object_free(pointer, $0) } } @@ -1651,7 +1676,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_txid(self.pointer, $0 + bdk_bc5f_Transaction_txid(self.pointer, $0 ) } ) @@ -1661,7 +1686,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_weight(self.pointer, $0 + bdk_bc5f_Transaction_weight(self.pointer, $0 ) } ) @@ -1671,7 +1696,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_size(self.pointer, $0 + bdk_bc5f_Transaction_size(self.pointer, $0 ) } ) @@ -1681,7 +1706,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_vsize(self.pointer, $0 + bdk_bc5f_Transaction_vsize(self.pointer, $0 ) } ) @@ -1691,7 +1716,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_serialize(self.pointer, $0 + bdk_bc5f_Transaction_serialize(self.pointer, $0 ) } ) @@ -1701,7 +1726,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_coin_base(self.pointer, $0 + bdk_bc5f_Transaction_is_coin_base(self.pointer, $0 ) } ) @@ -1711,7 +1736,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_explicitly_rbf(self.pointer, $0 + bdk_bc5f_Transaction_is_explicitly_rbf(self.pointer, $0 ) } ) @@ -1721,7 +1746,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_is_lock_time_enabled(self.pointer, $0 + bdk_bc5f_Transaction_is_lock_time_enabled(self.pointer, $0 ) } ) @@ -1731,7 +1756,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_version(self.pointer, $0 + bdk_bc5f_Transaction_version(self.pointer, $0 ) } ) @@ -1741,7 +1766,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_lock_time(self.pointer, $0 + bdk_bc5f_Transaction_lock_time(self.pointer, $0 ) } ) @@ -1751,7 +1776,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_input(self.pointer, $0 + bdk_bc5f_Transaction_input(self.pointer, $0 ) } ) @@ -1761,7 +1786,7 @@ public class Transaction: TransactionProtocol { try! rustCall() { - bdk_103c_Transaction_output(self.pointer, $0 + bdk_bc5f_Transaction_output(self.pointer, $0 ) } ) @@ -1836,12 +1861,12 @@ public class TxBuilder: TxBuilderProtocol { rustCall() { - bdk_103c_TxBuilder_new($0) + bdk_bc5f_TxBuilder_new($0) }) } deinit { - try! rustCall { ffi_bdk_103c_TxBuilder_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_TxBuilder_object_free(pointer, $0) } } @@ -1852,7 +1877,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_recipient(self.pointer, + bdk_bc5f_TxBuilder_add_recipient(self.pointer, FfiConverterTypeScript.lower(`script`), FfiConverterUInt64.lower(`amount`), $0 ) @@ -1864,7 +1889,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_unspendable(self.pointer, + bdk_bc5f_TxBuilder_add_unspendable(self.pointer, FfiConverterTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1875,7 +1900,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_utxo(self.pointer, + bdk_bc5f_TxBuilder_add_utxo(self.pointer, FfiConverterTypeOutPoint.lower(`outpoint`), $0 ) } @@ -1886,7 +1911,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_utxos(self.pointer, + bdk_bc5f_TxBuilder_add_utxos(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`outpoints`), $0 ) } @@ -1897,7 +1922,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_do_not_spend_change(self.pointer, $0 + bdk_bc5f_TxBuilder_do_not_spend_change(self.pointer, $0 ) } ) @@ -1907,7 +1932,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_manually_selected_only(self.pointer, $0 + bdk_bc5f_TxBuilder_manually_selected_only(self.pointer, $0 ) } ) @@ -1917,7 +1942,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_only_spend_change(self.pointer, $0 + bdk_bc5f_TxBuilder_only_spend_change(self.pointer, $0 ) } ) @@ -1927,7 +1952,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_unspendable(self.pointer, + bdk_bc5f_TxBuilder_unspendable(self.pointer, FfiConverterSequenceTypeOutPoint.lower(`unspendable`), $0 ) } @@ -1938,7 +1963,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_fee_rate(self.pointer, + bdk_bc5f_TxBuilder_fee_rate(self.pointer, FfiConverterFloat.lower(`satPerVbyte`), $0 ) } @@ -1949,7 +1974,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_fee_absolute(self.pointer, + bdk_bc5f_TxBuilder_fee_absolute(self.pointer, FfiConverterUInt64.lower(`feeAmount`), $0 ) } @@ -1960,7 +1985,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_drain_wallet(self.pointer, $0 + bdk_bc5f_TxBuilder_drain_wallet(self.pointer, $0 ) } ) @@ -1970,7 +1995,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_drain_to(self.pointer, + bdk_bc5f_TxBuilder_drain_to(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -1981,7 +2006,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_enable_rbf(self.pointer, $0 + bdk_bc5f_TxBuilder_enable_rbf(self.pointer, $0 ) } ) @@ -1991,7 +2016,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_enable_rbf_with_sequence(self.pointer, + bdk_bc5f_TxBuilder_enable_rbf_with_sequence(self.pointer, FfiConverterUInt32.lower(`nsequence`), $0 ) } @@ -2002,7 +2027,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_add_data(self.pointer, + bdk_bc5f_TxBuilder_add_data(self.pointer, FfiConverterSequenceUInt8.lower(`data`), $0 ) } @@ -2013,7 +2038,7 @@ public class TxBuilder: TxBuilderProtocol { try! rustCall() { - bdk_103c_TxBuilder_set_recipients(self.pointer, + bdk_bc5f_TxBuilder_set_recipients(self.pointer, FfiConverterSequenceTypeScriptAmount.lower(`recipients`), $0 ) } @@ -2023,7 +2048,7 @@ public class TxBuilder: TxBuilderProtocol { return try FfiConverterTypeTxBuilderResult.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_TxBuilder_finish(self.pointer, + bdk_bc5f_TxBuilder_finish(self.pointer, FfiConverterTypeWallet.lower(`wallet`), $0 ) } @@ -2091,7 +2116,7 @@ public class Wallet: WalletProtocol { rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_new( + bdk_bc5f_Wallet_new( FfiConverterTypeDescriptor.lower(`descriptor`), FfiConverterOptionTypeDescriptor.lower(`changeDescriptor`), FfiConverterTypeNetwork.lower(`network`), @@ -2100,7 +2125,7 @@ public class Wallet: WalletProtocol { } deinit { - try! rustCall { ffi_bdk_103c_Wallet_object_free(pointer, $0) } + try! rustCall { ffi_bdk_bc5f_Wallet_object_free(pointer, $0) } } @@ -2111,7 +2136,7 @@ public class Wallet: WalletProtocol { try! rustCall() { - bdk_103c_Wallet_network(self.pointer, $0 + bdk_bc5f_Wallet_network(self.pointer, $0 ) } ) @@ -2120,7 +2145,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_address(self.pointer, + bdk_bc5f_Wallet_get_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2130,7 +2155,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeAddressInfo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_internal_address(self.pointer, + bdk_bc5f_Wallet_get_internal_address(self.pointer, FfiConverterTypeAddressIndex.lower(`addressIndex`), $0 ) } @@ -2140,7 +2165,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_is_mine(self.pointer, + bdk_bc5f_Wallet_is_mine(self.pointer, FfiConverterTypeScript.lower(`script`), $0 ) } @@ -2150,7 +2175,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeLocalUtxo.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_list_unspent(self.pointer, $0 + bdk_bc5f_Wallet_list_unspent(self.pointer, $0 ) } ) @@ -2159,7 +2184,7 @@ public class Wallet: WalletProtocol { return try FfiConverterSequenceTypeTransactionDetails.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_list_transactions(self.pointer, + bdk_bc5f_Wallet_list_transactions(self.pointer, FfiConverterBool.lower(`includeRaw`), $0 ) } @@ -2169,7 +2194,7 @@ public class Wallet: WalletProtocol { return try FfiConverterTypeBalance.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_get_balance(self.pointer, $0 + bdk_bc5f_Wallet_get_balance(self.pointer, $0 ) } ) @@ -2178,7 +2203,7 @@ public class Wallet: WalletProtocol { return try FfiConverterBool.lift( try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_sign(self.pointer, + bdk_bc5f_Wallet_sign(self.pointer, FfiConverterTypePartiallySignedTransaction.lower(`psbt`), FfiConverterOptionTypeSignOptions.lower(`signOptions`), $0 ) @@ -2188,7 +2213,7 @@ public class Wallet: WalletProtocol { public func `sync`(`blockchain`: Blockchain, `progress`: Progress?) throws { try rustCallWithError(FfiConverterTypeBdkError.self) { - bdk_103c_Wallet_sync(self.pointer, + bdk_bc5f_Wallet_sync(self.pointer, FfiConverterTypeBlockchain.lower(`blockchain`), FfiConverterOptionCallbackInterfaceProgress.lower(`progress`), $0 ) @@ -4507,7 +4532,7 @@ fileprivate struct FfiConverterCallbackInterfaceProgress { private static var callbackInitialized = false private static func initCallback() { try! rustCall { (err: UnsafeMutablePointer) in - ffi_bdk_103c_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) + ffi_bdk_bc5f_Progress_init_callback(foreignCallbackCallbackInterfaceProgress, err) } } private static func ensureCallbackinitialized() {