diff --git a/example/android/app/build.gradle b/example/android/app/build.gradle
index daf0840..29cfe3c 100644
--- a/example/android/app/build.gradle
+++ b/example/android/app/build.gradle
@@ -9,7 +9,7 @@ plugins {
android {
namespace = "io.bdk.f.bdk_flutter_example"
compileSdk = flutter.compileSdkVersion
- ndkVersion "25.1.8937393"
+ ndkVersion = "25.1.8937393"
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
diff --git a/example/lib/bdk_library.dart b/example/lib/bdk_library.dart
index db4ecce..702cf26 100644
--- a/example/lib/bdk_library.dart
+++ b/example/lib/bdk_library.dart
@@ -52,7 +52,7 @@ class BdkLibrary {
Future getPsbtInput(
Wallet wallet, LocalUtxo utxo, bool onlyWitnessUtxo) async {
final input =
- await wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo);
+ wallet.getPsbtInput(utxo: utxo, onlyWitnessUtxo: onlyWitnessUtxo);
return input;
}
@@ -68,7 +68,6 @@ class BdkLibrary {
List getConfirmedTransactions(Wallet wallet) {
List confirmed = [];
final res = wallet.listTransactions(includeRaw: true);
-
for (var e in res) {
if (e.confirmationTime != null) confirmed.add(e);
}
@@ -103,7 +102,7 @@ class BdkLibrary {
.addRecipient(script, BigInt.from(amountSat))
.feeRate(feeRate.satPerVb)
.finish(wallet);
- final isFinalized = await wallet.sign(psbt: psbt);
+ final isFinalized = wallet.sign(psbt: psbt);
if (isFinalized) {
final tx = psbt.extractTx();
final res = await blockchain.broadcast(transaction: tx);
diff --git a/example/lib/wallet.dart b/example/lib/wallet.dart
index 159e368..3e47532 100644
--- a/example/lib/wallet.dart
+++ b/example/lib/wallet.dart
@@ -64,7 +64,7 @@ class _ExampleWalletState extends State {
displayText = "You have ${unConfirmed.length} unConfirmed transactions";
});
for (var e in unConfirmed) {
- final txOut = await e.transaction!.output();
+ final txOut = e.transaction!.output();
if (kDebugMode) {
print(" txid: ${e.txid}");
print(" fee: ${e.fee}");
@@ -86,10 +86,11 @@ class _ExampleWalletState extends State {
print(" txid: ${e.txid}");
print(" confirmationTime: ${e.confirmationTime?.timestamp}");
print(" confirmationTime Height: ${e.confirmationTime?.height}");
- final txIn = await e.transaction!.input();
- final txOut = await e.transaction!.output();
+ final txIn = e.transaction!.input();
+ final txOut = e.transaction!.output();
print("=============TxIn==============");
for (var e in txIn) {
+ print(" script: ${e.scriptSig}");
print(" previousOutout Txid: ${e.previousOutput.txid}");
print(" previousOutout vout: ${e.previousOutput.vout}");
print(" witness: ${e.witness}");
diff --git a/example/macos/Podfile.lock b/example/macos/Podfile.lock
index 78c676d..aa208fe 100644
--- a/example/macos/Podfile.lock
+++ b/example/macos/Podfile.lock
@@ -14,7 +14,7 @@ EXTERNAL SOURCES:
:path: Flutter/ephemeral
SPEC CHECKSUMS:
- bdk_flutter: d0437c6116753242241fed48270587542a636d40
+ bdk_flutter: 6897321c2433d56f1fc780982b6d94d5894258dd
FlutterMacOS: 8f6f14fa908a6fb3fba0cd85dbd81ec4b251fb24
PODFILE CHECKSUM: 6acf97521436d16fc31cd5e1a02000905acdb3ae
diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h
index 2430b24..cc868c1 100644
--- a/ios/Classes/frb_generated.h
+++ b/ios/Classes/frb_generated.h
@@ -171,27 +171,54 @@ typedef struct wire_cst_list_list_prim_u_8_strict {
int32_t len;
} wire_cst_list_list_prim_u_8_strict;
-typedef struct wire_cst_tx_in {
+typedef struct wire_cst_bdk_tx_in {
struct wire_cst_out_point previous_output;
- struct wire_cst_bdk_script_buf script_sig;
+ struct wire_cst_bdk_script_buf *script_sig;
uint32_t sequence;
struct wire_cst_list_list_prim_u_8_strict *witness;
-} wire_cst_tx_in;
+} wire_cst_bdk_tx_in;
-typedef struct wire_cst_list_tx_in {
- struct wire_cst_tx_in *ptr;
+typedef struct wire_cst_list_bdk_tx_in {
+ struct wire_cst_bdk_tx_in *ptr;
int32_t len;
-} wire_cst_list_tx_in;
+} wire_cst_list_bdk_tx_in;
-typedef struct wire_cst_tx_out {
+typedef struct wire_cst_bdk_tx_out {
uint64_t value;
struct wire_cst_bdk_script_buf script_pubkey;
-} wire_cst_tx_out;
+} wire_cst_bdk_tx_out;
-typedef struct wire_cst_list_tx_out {
- struct wire_cst_tx_out *ptr;
+typedef struct wire_cst_list_bdk_tx_out {
+ struct wire_cst_bdk_tx_out *ptr;
int32_t len;
-} wire_cst_list_tx_out;
+} wire_cst_list_bdk_tx_out;
+
+typedef struct wire_cst_sqlite_db_configuration {
+ struct wire_cst_list_prim_u_8_strict *path;
+} wire_cst_sqlite_db_configuration;
+
+typedef struct wire_cst_DatabaseConfig_Sqlite {
+ struct wire_cst_sqlite_db_configuration *config;
+} wire_cst_DatabaseConfig_Sqlite;
+
+typedef struct wire_cst_sled_db_configuration {
+ struct wire_cst_list_prim_u_8_strict *path;
+ struct wire_cst_list_prim_u_8_strict *tree_name;
+} wire_cst_sled_db_configuration;
+
+typedef struct wire_cst_DatabaseConfig_Sled {
+ struct wire_cst_sled_db_configuration *config;
+} wire_cst_DatabaseConfig_Sled;
+
+typedef union DatabaseConfigKind {
+ struct wire_cst_DatabaseConfig_Sqlite Sqlite;
+ struct wire_cst_DatabaseConfig_Sled Sled;
+} DatabaseConfigKind;
+
+typedef struct wire_cst_database_config {
+ int32_t tag;
+ union DatabaseConfigKind kind;
+} wire_cst_database_config;
typedef struct wire_cst_bdk_wallet {
uintptr_t ptr;
@@ -217,7 +244,7 @@ typedef struct wire_cst_address_index {
typedef struct wire_cst_local_utxo {
struct wire_cst_out_point outpoint;
- struct wire_cst_tx_out txout;
+ struct wire_cst_bdk_tx_out txout;
int32_t keychain;
bool is_spent;
} wire_cst_local_utxo;
@@ -226,33 +253,6 @@ typedef struct wire_cst_psbt_sig_hash_type {
uint32_t inner;
} wire_cst_psbt_sig_hash_type;
-typedef struct wire_cst_sqlite_db_configuration {
- struct wire_cst_list_prim_u_8_strict *path;
-} wire_cst_sqlite_db_configuration;
-
-typedef struct wire_cst_DatabaseConfig_Sqlite {
- struct wire_cst_sqlite_db_configuration *config;
-} wire_cst_DatabaseConfig_Sqlite;
-
-typedef struct wire_cst_sled_db_configuration {
- struct wire_cst_list_prim_u_8_strict *path;
- struct wire_cst_list_prim_u_8_strict *tree_name;
-} wire_cst_sled_db_configuration;
-
-typedef struct wire_cst_DatabaseConfig_Sled {
- struct wire_cst_sled_db_configuration *config;
-} wire_cst_DatabaseConfig_Sled;
-
-typedef union DatabaseConfigKind {
- struct wire_cst_DatabaseConfig_Sqlite Sqlite;
- struct wire_cst_DatabaseConfig_Sled Sled;
-} DatabaseConfigKind;
-
-typedef struct wire_cst_database_config {
- int32_t tag;
- union DatabaseConfigKind kind;
-} wire_cst_database_config;
-
typedef struct wire_cst_sign_options {
bool trust_witness_utxo;
uint32_t *assume_height;
@@ -521,6 +521,20 @@ typedef struct wire_cst_list_bdk_policy {
int32_t len;
} wire_cst_list_bdk_policy;
+typedef struct wire_cst_bdk_transaction_details {
+ struct wire_cst_bdk_transaction *transaction;
+ struct wire_cst_list_prim_u_8_strict *txid;
+ uint64_t received;
+ uint64_t sent;
+ uint64_t *fee;
+ struct wire_cst_block_time *confirmation_time;
+} wire_cst_bdk_transaction_details;
+
+typedef struct wire_cst_list_bdk_transaction_details {
+ struct wire_cst_bdk_transaction_details *ptr;
+ int32_t len;
+} wire_cst_list_bdk_transaction_details;
+
typedef struct wire_cst_list_condition {
struct wire_cst_condition *ptr;
int32_t len;
@@ -561,20 +575,6 @@ typedef struct wire_cst_list_record_u_32_list_condition {
int32_t len;
} wire_cst_list_record_u_32_list_condition;
-typedef struct wire_cst_transaction_details {
- struct wire_cst_bdk_transaction *transaction;
- struct wire_cst_list_prim_u_8_strict *txid;
- uint64_t received;
- uint64_t sent;
- uint64_t *fee;
- struct wire_cst_block_time *confirmation_time;
-} wire_cst_transaction_details;
-
-typedef struct wire_cst_list_transaction_details {
- struct wire_cst_transaction_details *ptr;
- int32_t len;
-} wire_cst_list_transaction_details;
-
typedef struct wire_cst_balance {
uint64_t immature;
uint64_t trusted_pending;
@@ -804,10 +804,10 @@ typedef struct wire_cst_record_bdk_address_u_32 {
uint32_t field1;
} wire_cst_record_bdk_address_u_32;
-typedef struct wire_cst_record_bdk_psbt_transaction_details {
+typedef struct wire_cst_record_bdk_psbt_bdk_transaction_details {
struct wire_cst_bdk_psbt field0;
- struct wire_cst_transaction_details field1;
-} wire_cst_record_bdk_psbt_transaction_details;
+ struct wire_cst_bdk_transaction_details field1;
+} wire_cst_record_bdk_psbt_bdk_transaction_details;
typedef struct wire_cst_Satisfaction_Partial {
uint64_t n;
@@ -925,92 +925,76 @@ void frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height(
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string(struct wire_cst_bdk_descriptor *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_create(struct wire_cst_list_prim_u_8_strict *descriptor,
+ int32_t network);
+
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight(struct wire_cst_bdk_descriptor *that);
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *descriptor,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *secret_key,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *public_key,
- struct wire_cst_list_prim_u_8_strict *fingerprint,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *secret_key,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *public_key,
- struct wire_cst_list_prim_u_8_strict *fingerprint,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *secret_key,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *public_key,
- struct wire_cst_list_prim_u_8_strict *fingerprint,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *secret_key,
- int32_t keychain_kind,
- int32_t network);
-
-void frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *public_key,
- struct wire_cst_list_prim_u_8_strict *fingerprint,
- int32_t keychain_kind,
- int32_t network);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44(struct wire_cst_bdk_descriptor_secret_key *secret_key,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(struct wire_cst_bdk_descriptor_public_key *public_key,
+ struct wire_cst_list_prim_u_8_strict *fingerprint,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49(struct wire_cst_bdk_descriptor_secret_key *secret_key,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(struct wire_cst_bdk_descriptor_public_key *public_key,
+ struct wire_cst_list_prim_u_8_strict *fingerprint,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84(struct wire_cst_bdk_descriptor_secret_key *secret_key,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(struct wire_cst_bdk_descriptor_public_key *public_key,
+ struct wire_cst_list_prim_u_8_strict *fingerprint,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86(struct wire_cst_bdk_descriptor_secret_key *secret_key,
+ int32_t keychain_kind,
+ int32_t network);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(struct wire_cst_bdk_descriptor_public_key *public_key,
+ struct wire_cst_list_prim_u_8_strict *fingerprint,
+ int32_t keychain_kind,
+ int32_t network);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_to_string_private(struct wire_cst_bdk_descriptor *that);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_as_string(struct wire_cst_bdk_derivation_path *that);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *path);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_derivation_path_from_string(struct wire_cst_list_prim_u_8_strict *path);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_as_string(struct wire_cst_bdk_descriptor_public_key *that);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *ptr,
- struct wire_cst_bdk_derivation_path *path);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_derive(struct wire_cst_bdk_descriptor_public_key *ptr,
+ struct wire_cst_bdk_derivation_path *path);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(int64_t port_,
- struct wire_cst_bdk_descriptor_public_key *ptr,
- struct wire_cst_bdk_derivation_path *path);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_extend(struct wire_cst_bdk_descriptor_public_key *ptr,
+ struct wire_cst_bdk_derivation_path *path);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *public_key);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_public_key_from_string(struct wire_cst_list_prim_u_8_strict *public_key);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_public(struct wire_cst_bdk_descriptor_secret_key *ptr);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_as_string(struct wire_cst_bdk_descriptor_secret_key *that);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int64_t port_,
- int32_t network,
- struct wire_cst_bdk_mnemonic *mnemonic,
- struct wire_cst_list_prim_u_8_strict *password);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_create(int32_t network,
+ struct wire_cst_bdk_mnemonic *mnemonic,
+ struct wire_cst_list_prim_u_8_strict *password);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *ptr,
- struct wire_cst_bdk_derivation_path *path);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_derive(struct wire_cst_bdk_descriptor_secret_key *ptr,
+ struct wire_cst_bdk_derivation_path *path);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(int64_t port_,
- struct wire_cst_bdk_descriptor_secret_key *ptr,
- struct wire_cst_bdk_derivation_path *path);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_extend(struct wire_cst_bdk_descriptor_secret_key *ptr,
+ struct wire_cst_bdk_derivation_path *path);
void frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string(int64_t port_,
struct wire_cst_list_prim_u_8_strict *secret_key);
@@ -1019,19 +1003,16 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_se
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string(struct wire_cst_bdk_mnemonic *that);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(int64_t port_,
- struct wire_cst_list_prim_u_8_loose *entropy);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_create(int32_t word_count);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *mnemonic);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy(struct wire_cst_list_prim_u_8_loose *entropy);
-void frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new(int64_t port_, int32_t word_count);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string(struct wire_cst_list_prim_u_8_strict *mnemonic);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string(struct wire_cst_bdk_psbt *that);
-void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(int64_t port_,
- struct wire_cst_bdk_psbt *ptr,
- struct wire_cst_bdk_psbt *other);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine(struct wire_cst_bdk_psbt *ptr,
+ struct wire_cst_bdk_psbt *other);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx(struct wire_cst_bdk_psbt *ptr);
@@ -1039,8 +1020,7 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_amo
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_fee_rate(struct wire_cst_bdk_psbt *that);
-void frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *psbt_base64);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_from_str(struct wire_cst_list_prim_u_8_strict *psbt_base64);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_json_serialize(struct wire_cst_bdk_psbt *that);
@@ -1050,13 +1030,11 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_txid(st
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_as_string(struct wire_cst_bdk_address *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(int64_t port_,
- struct wire_cst_bdk_script_buf *script,
- int32_t network);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_script(struct wire_cst_bdk_script_buf *script,
+ int32_t network);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *address,
- int32_t network);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_from_string(struct wire_cst_list_prim_u_8_strict *address,
+ int32_t network);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_address_is_valid_for_network(struct wire_cst_bdk_address *that,
int32_t network);
@@ -1085,56 +1063,46 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty(void);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(int64_t port_,
- struct wire_cst_list_prim_u_8_strict *s);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex(struct wire_cst_list_prim_u_8_strict *s);
+
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(uintptr_t capacity);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity(int64_t port_,
- uintptr_t capacity);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_create(int32_t version,
+ struct wire_cst_lock_time *lock_time,
+ struct wire_cst_list_bdk_tx_in *input,
+ struct wire_cst_list_bdk_tx_out *output);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(int64_t port_,
- struct wire_cst_list_prim_u_8_loose *transaction_bytes);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes(struct wire_cst_list_prim_u_8_loose *transaction_bytes);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new(int64_t port_,
- int32_t version,
- struct wire_cst_lock_time *lock_time,
- struct wire_cst_list_tx_in *input,
- struct wire_cst_list_tx_out *output);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_txid(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(struct wire_cst_bdk_transaction *that);
-void frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight(int64_t port_,
- struct wire_cst_bdk_transaction *that);
+void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_create(int64_t port_,
+ struct wire_cst_bdk_descriptor *descriptor,
+ struct wire_cst_bdk_descriptor *change_descriptor,
+ int32_t network,
+ struct wire_cst_database_config *database_config);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address(struct wire_cst_bdk_wallet *ptr,
struct wire_cst_address_index *address_index);
@@ -1147,11 +1115,10 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_internal_address(struct wire_cst_bdk_wallet *ptr,
struct wire_cst_address_index *address_index);
-void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(int64_t port_,
- struct wire_cst_bdk_wallet *that,
- struct wire_cst_local_utxo *utxo,
- bool only_witness_utxo,
- struct wire_cst_psbt_sig_hash_type *sighash_type);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_psbt_input(struct wire_cst_bdk_wallet *that,
+ struct wire_cst_local_utxo *utxo,
+ bool only_witness_utxo,
+ struct wire_cst_psbt_sig_hash_type *sighash_type);
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_is_mine(struct wire_cst_bdk_wallet *ptr,
struct wire_cst_bdk_script_buf *script);
@@ -1163,19 +1130,12 @@ WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_lis
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network(struct wire_cst_bdk_wallet *that);
-void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new(int64_t port_,
- struct wire_cst_bdk_descriptor *descriptor,
- struct wire_cst_bdk_descriptor *change_descriptor,
- int32_t network,
- struct wire_cst_database_config *database_config);
-
WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies(struct wire_cst_bdk_wallet *ptr,
int32_t keychain);
-void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(int64_t port_,
- struct wire_cst_bdk_wallet *ptr,
- struct wire_cst_bdk_psbt *psbt,
- struct wire_cst_sign_options *sign_options);
+WireSyncRust2DartDco frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign(struct wire_cst_bdk_wallet *ptr,
+ struct wire_cst_bdk_psbt *psbt,
+ struct wire_cst_sign_options *sign_options);
void frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync(int64_t port_,
struct wire_cst_bdk_wallet *ptr,
@@ -1334,6 +1294,12 @@ uint8_t *frbgen_bdk_flutter_cst_new_box_autoadd_u_8(uint8_t value);
struct wire_cst_list_bdk_policy *frbgen_bdk_flutter_cst_new_list_bdk_policy(int32_t len);
+struct wire_cst_list_bdk_transaction_details *frbgen_bdk_flutter_cst_new_list_bdk_transaction_details(int32_t len);
+
+struct wire_cst_list_bdk_tx_in *frbgen_bdk_flutter_cst_new_list_bdk_tx_in(int32_t len);
+
+struct wire_cst_list_bdk_tx_out *frbgen_bdk_flutter_cst_new_list_bdk_tx_out(int32_t len);
+
struct wire_cst_list_condition *frbgen_bdk_flutter_cst_new_list_condition(int32_t len);
struct wire_cst_list_list_prim_u_8_strict *frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict(int32_t len);
@@ -1359,12 +1325,6 @@ struct wire_cst_list_record_string_list_prim_u_32_strict *frbgen_bdk_flutter_cst
struct wire_cst_list_record_u_32_list_condition *frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition(int32_t len);
struct wire_cst_list_script_amount *frbgen_bdk_flutter_cst_new_list_script_amount(int32_t len);
-
-struct wire_cst_list_transaction_details *frbgen_bdk_flutter_cst_new_list_transaction_details(int32_t len);
-
-struct wire_cst_list_tx_in *frbgen_bdk_flutter_cst_new_list_tx_in(int32_t len);
-
-struct wire_cst_list_tx_out *frbgen_bdk_flutter_cst_new_list_tx_out(int32_t len);
static int64_t dummy_method_to_enforce_bundling(void) {
int64_t dummy_var = 0;
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_address_error);
@@ -1409,6 +1369,9 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_64);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_box_autoadd_u_8);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_policy);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_transaction_details);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_tx_in);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_bdk_tx_out);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_condition);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_list_prim_u_8_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_local_utxo);
@@ -1422,9 +1385,6 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_string_list_prim_u_32_strict);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_record_u_32_list_condition);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_script_amount);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_transaction_details);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_in);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_cst_new_list_tx_out);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinAddress);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkbitcoinbip32DerivationPath);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_rust_arc_decrement_strong_count_RustOpaque_bdkblockchainAnyBlockchain);
@@ -1453,8 +1413,8 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_block_hash);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__blockchain__bdk_blockchain_get_height);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_as_string);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_create);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_max_satisfaction_weight);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip44_public);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__descriptor__bdk_descriptor_new_bip49);
@@ -1478,9 +1438,9 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_from_string);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_descriptor_secret_key_secret_bytes);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_as_string);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_create);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_entropy);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_from_string);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__key__bdk_mnemonic_new);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_as_string);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_combine);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__psbt__bdk_psbt_extract_tx);
@@ -1508,13 +1468,13 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_empty);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_from_hex);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_script_buf_with_capacity);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_create);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_from_bytes);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_input);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_coin_base);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_explicitly_rbf);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_is_lock_time_enabled);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_lock_time);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_new);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_output);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_serialize);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_size);
@@ -1522,6 +1482,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_version);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_vsize);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__types__bdk_transaction_weight);
+ dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_create);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_address);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_balance);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_get_descriptor_for_keychain);
@@ -1531,7 +1492,6 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_transactions);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_list_unspent);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_network);
- dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_new);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_policies);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sign);
dummy_var ^= ((int64_t) (void*) frbgen_bdk_flutter_wire__crate__api__wallet__bdk_wallet_sync);
diff --git a/lib/bdk_flutter.dart b/lib/bdk_flutter.dart
index 3f8a045..1e3341d 100644
--- a/lib/bdk_flutter.dart
+++ b/lib/bdk_flutter.dart
@@ -21,7 +21,6 @@ export './src/generated/api/types.dart'
FeeRate,
Input,
KeychainKind,
- LocalUtxo,
LockTime,
Network,
OutPoint,
@@ -37,8 +36,6 @@ export './src/generated/api/types.dart'
Variant,
WitnessVersion,
WordCount;
-export './src/generated/api/wallet.dart'
- hide BdkWallet, finishBumpFeeTxBuilder, txBuilderFinish;
export './src/root.dart';
export 'src/utils/exceptions.dart'
hide
diff --git a/lib/src/generated/api/descriptor.dart b/lib/src/generated/api/descriptor.dart
index 83ace5c..a2ba36f 100644
--- a/lib/src/generated/api/descriptor.dart
+++ b/lib/src/generated/api/descriptor.dart
@@ -26,25 +26,24 @@ class BdkDescriptor {
that: this,
);
+ static BdkDescriptor create(
+ {required String descriptor, required Network network}) =>
+ core.instance.api.crateApiDescriptorBdkDescriptorCreate(
+ descriptor: descriptor, network: network);
+
BigInt maxSatisfactionWeight() =>
core.instance.api.crateApiDescriptorBdkDescriptorMaxSatisfactionWeight(
that: this,
);
- // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
- static Future newInstance(
- {required String descriptor, required Network network}) =>
- core.instance.api.crateApiDescriptorBdkDescriptorNew(
- descriptor: descriptor, network: network);
-
- static Future newBip44(
+ static BdkDescriptor newBip44(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) =>
core.instance.api.crateApiDescriptorBdkDescriptorNewBip44(
secretKey: secretKey, keychainKind: keychainKind, network: network);
- static Future newBip44Public(
+ static BdkDescriptor newBip44Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
@@ -55,14 +54,14 @@ class BdkDescriptor {
keychainKind: keychainKind,
network: network);
- static Future newBip49(
+ static BdkDescriptor newBip49(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) =>
core.instance.api.crateApiDescriptorBdkDescriptorNewBip49(
secretKey: secretKey, keychainKind: keychainKind, network: network);
- static Future newBip49Public(
+ static BdkDescriptor newBip49Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
@@ -73,14 +72,14 @@ class BdkDescriptor {
keychainKind: keychainKind,
network: network);
- static Future newBip84(
+ static BdkDescriptor newBip84(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) =>
core.instance.api.crateApiDescriptorBdkDescriptorNewBip84(
secretKey: secretKey, keychainKind: keychainKind, network: network);
- static Future newBip84Public(
+ static BdkDescriptor newBip84Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
@@ -91,14 +90,14 @@ class BdkDescriptor {
keychainKind: keychainKind,
network: network);
- static Future newBip86(
+ static BdkDescriptor newBip86(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) =>
core.instance.api.crateApiDescriptorBdkDescriptorNewBip86(
secretKey: secretKey, keychainKind: keychainKind, network: network);
- static Future newBip86Public(
+ static BdkDescriptor newBip86Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
diff --git a/lib/src/generated/api/key.dart b/lib/src/generated/api/key.dart
index 627cde7..4a84a6c 100644
--- a/lib/src/generated/api/key.dart
+++ b/lib/src/generated/api/key.dart
@@ -22,7 +22,7 @@ class BdkDerivationPath {
that: this,
);
- static Future fromString({required String path}) =>
+ static BdkDerivationPath fromString({required String path}) =>
core.instance.api.crateApiKeyBdkDerivationPathFromString(path: path);
@override
@@ -48,20 +48,19 @@ class BdkDescriptorPublicKey {
that: this,
);
- static Future derive(
+ static BdkDescriptorPublicKey derive(
{required BdkDescriptorPublicKey ptr,
required BdkDerivationPath path}) =>
core.instance.api
.crateApiKeyBdkDescriptorPublicKeyDerive(ptr: ptr, path: path);
- static Future extend(
+ static BdkDescriptorPublicKey extend(
{required BdkDescriptorPublicKey ptr,
required BdkDerivationPath path}) =>
core.instance.api
.crateApiKeyBdkDescriptorPublicKeyExtend(ptr: ptr, path: path);
- static Future fromString(
- {required String publicKey}) =>
+ static BdkDescriptorPublicKey fromString({required String publicKey}) =>
core.instance.api
.crateApiKeyBdkDescriptorPublicKeyFromString(publicKey: publicKey);
@@ -92,20 +91,20 @@ class BdkDescriptorSecretKey {
that: this,
);
- static Future create(
+ static BdkDescriptorSecretKey create(
{required Network network,
required BdkMnemonic mnemonic,
String? password}) =>
core.instance.api.crateApiKeyBdkDescriptorSecretKeyCreate(
network: network, mnemonic: mnemonic, password: password);
- static Future derive(
+ static BdkDescriptorSecretKey derive(
{required BdkDescriptorSecretKey ptr,
required BdkDerivationPath path}) =>
core.instance.api
.crateApiKeyBdkDescriptorSecretKeyDerive(ptr: ptr, path: path);
- static Future extend(
+ static BdkDescriptorSecretKey extend(
{required BdkDescriptorSecretKey ptr,
required BdkDerivationPath path}) =>
core.instance.api
@@ -144,20 +143,19 @@ class BdkMnemonic {
that: this,
);
+ /// Generates Mnemonic with a random entropy
+ static BdkMnemonic create({required WordCount wordCount}) =>
+ core.instance.api.crateApiKeyBdkMnemonicCreate(wordCount: wordCount);
+
/// Create a new Mnemonic in the specified language from the given entropy.
/// Entropy must be a multiple of 32 bits (4 bytes) and 128-256 bits in length.
- static Future fromEntropy({required List entropy}) =>
+ static BdkMnemonic fromEntropy({required List entropy}) =>
core.instance.api.crateApiKeyBdkMnemonicFromEntropy(entropy: entropy);
/// Parse a Mnemonic with given string
- static Future fromString({required String mnemonic}) =>
+ static BdkMnemonic fromString({required String mnemonic}) =>
core.instance.api.crateApiKeyBdkMnemonicFromString(mnemonic: mnemonic);
- // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
- /// Generates Mnemonic with a random entropy
- static Future newInstance({required WordCount wordCount}) =>
- core.instance.api.crateApiKeyBdkMnemonicNew(wordCount: wordCount);
-
@override
int get hashCode => ptr.hashCode;
diff --git a/lib/src/generated/api/psbt.dart b/lib/src/generated/api/psbt.dart
index 2ca20ac..f55768b 100644
--- a/lib/src/generated/api/psbt.dart
+++ b/lib/src/generated/api/psbt.dart
@@ -25,8 +25,7 @@ class BdkPsbt {
/// Combines this PartiallySignedTransaction with other PSBT as described by BIP 174.
///
/// In accordance with BIP 174 this function is commutative i.e., `A.combine(B) == B.combine(A)`
- static Future combine(
- {required BdkPsbt ptr, required BdkPsbt other}) =>
+ static BdkPsbt combine({required BdkPsbt ptr, required BdkPsbt other}) =>
core.instance.api.crateApiPsbtBdkPsbtCombine(ptr: ptr, other: other);
/// Return the transaction.
@@ -47,7 +46,7 @@ class BdkPsbt {
that: this,
);
- static Future fromStr({required String psbtBase64}) =>
+ static BdkPsbt fromStr({required String psbtBase64}) =>
core.instance.api.crateApiPsbtBdkPsbtFromStr(psbtBase64: psbtBase64);
/// Serialize the PSBT data structure as a String of JSON.
diff --git a/lib/src/generated/api/types.dart b/lib/src/generated/api/types.dart
index 1b642cb..02f82e6 100644
--- a/lib/src/generated/api/types.dart
+++ b/lib/src/generated/api/types.dart
@@ -104,12 +104,12 @@ class BdkAddress {
that: this,
);
- static Future fromScript(
+ static BdkAddress fromScript(
{required BdkScriptBuf script, required Network network}) =>
core.instance.api
.crateApiTypesBdkAddressFromScript(script: script, network: network);
- static Future fromString(
+ static BdkAddress fromString(
{required String address, required Network network}) =>
core.instance.api.crateApiTypesBdkAddressFromString(
address: address, network: network);
@@ -202,11 +202,11 @@ class BdkScriptBuf {
static BdkScriptBuf empty() =>
core.instance.api.crateApiTypesBdkScriptBufEmpty();
- static Future fromHex({required String s}) =>
+ static BdkScriptBuf fromHex({required String s}) =>
core.instance.api.crateApiTypesBdkScriptBufFromHex(s: s);
///Creates a new empty script with pre-allocated capacity.
- static Future withCapacity({required BigInt capacity}) =>
+ static BdkScriptBuf withCapacity({required BigInt capacity}) =>
core.instance.api
.crateApiTypesBdkScriptBufWithCapacity(capacity: capacity);
@@ -228,88 +228,82 @@ class BdkTransaction {
required this.s,
});
- static Future fromBytes(
- {required List transactionBytes}) =>
- core.instance.api.crateApiTypesBdkTransactionFromBytes(
- transactionBytes: transactionBytes);
+ static BdkTransaction create(
+ {required int version,
+ required LockTime lockTime,
+ required List input,
+ required List output}) =>
+ core.instance.api.crateApiTypesBdkTransactionCreate(
+ version: version, lockTime: lockTime, input: input, output: output);
+
+ static BdkTransaction fromBytes({required List transactionBytes}) => core
+ .instance.api
+ .crateApiTypesBdkTransactionFromBytes(transactionBytes: transactionBytes);
///List of transaction inputs.
- Future> input() =>
- core.instance.api.crateApiTypesBdkTransactionInput(
+ List input() => core.instance.api.crateApiTypesBdkTransactionInput(
that: this,
);
///Is this a coin base transaction?
- Future isCoinBase() =>
- core.instance.api.crateApiTypesBdkTransactionIsCoinBase(
+ bool isCoinBase() => core.instance.api.crateApiTypesBdkTransactionIsCoinBase(
that: this,
);
///Returns true if the transaction itself opted in to be BIP-125-replaceable (RBF).
/// This does not cover the case where a transaction becomes replaceable due to ancestors being RBF.
- Future isExplicitlyRbf() =>
+ bool isExplicitlyRbf() =>
core.instance.api.crateApiTypesBdkTransactionIsExplicitlyRbf(
that: this,
);
///Returns true if this transactions nLockTime is enabled (BIP-65 ).
- Future isLockTimeEnabled() =>
+ bool isLockTimeEnabled() =>
core.instance.api.crateApiTypesBdkTransactionIsLockTimeEnabled(
that: this,
);
///Block height or timestamp. Transaction cannot be included in a block until this height/time.
- Future lockTime() =>
- core.instance.api.crateApiTypesBdkTransactionLockTime(
+ LockTime lockTime() => core.instance.api.crateApiTypesBdkTransactionLockTime(
that: this,
);
- // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
- static Future newInstance(
- {required int version,
- required LockTime lockTime,
- required List input,
- required List output}) =>
- core.instance.api.crateApiTypesBdkTransactionNew(
- version: version, lockTime: lockTime, input: input, output: output);
-
///List of transaction outputs.
- Future> output() =>
+ List output() =>
core.instance.api.crateApiTypesBdkTransactionOutput(
that: this,
);
///Encodes an object into a vector.
- Future serialize() =>
+ Uint8List serialize() =>
core.instance.api.crateApiTypesBdkTransactionSerialize(
that: this,
);
///Returns the regular byte-wise consensus-serialized size of this transaction.
- Future size() => core.instance.api.crateApiTypesBdkTransactionSize(
+ BigInt size() => core.instance.api.crateApiTypesBdkTransactionSize(
that: this,
);
///Computes the txid. For non-segwit transactions this will be identical to the output of wtxid(),
/// but for segwit transactions, this will give the correct txid (not including witnesses) while wtxid will also hash witnesses.
- Future txid() => core.instance.api.crateApiTypesBdkTransactionTxid(
+ String txid() => core.instance.api.crateApiTypesBdkTransactionTxid(
that: this,
);
///The protocol version, is currently expected to be 1 or 2 (BIP 68).
- Future version() => core.instance.api.crateApiTypesBdkTransactionVersion(
+ int version() => core.instance.api.crateApiTypesBdkTransactionVersion(
that: this,
);
///Returns the “virtual size” (vsize) of this transaction.
///
- Future vsize() => core.instance.api.crateApiTypesBdkTransactionVsize(
+ BigInt vsize() => core.instance.api.crateApiTypesBdkTransactionVsize(
that: this,
);
///Returns the regular byte-wise consensus-serialized size of this transaction.
- Future weight() =>
- core.instance.api.crateApiTypesBdkTransactionWeight(
+ BigInt weight() => core.instance.api.crateApiTypesBdkTransactionWeight(
that: this,
);
@@ -324,6 +318,118 @@ class BdkTransaction {
s == other.s;
}
+///A wallet transaction
+class BdkTransactionDetails {
+ final BdkTransaction? transaction;
+
+ /// Transaction id.
+ final String txid;
+
+ /// Received value (sats)
+ /// Sum of owned outputs of this transaction.
+ final BigInt received;
+
+ /// Sent value (sats)
+ /// Sum of owned inputs of this transaction.
+ final BigInt sent;
+
+ /// Fee value (sats) if confirmed.
+ /// The availability of the fee depends on the backend. It's never None with an Electrum
+ /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive
+ /// funds while offline.
+ final BigInt? fee;
+
+ /// If the transaction is confirmed, contains height and timestamp of the block containing the
+ /// transaction, unconfirmed transaction contains `None`.
+ final BlockTime? confirmationTime;
+
+ const BdkTransactionDetails({
+ this.transaction,
+ required this.txid,
+ required this.received,
+ required this.sent,
+ this.fee,
+ this.confirmationTime,
+ });
+
+ @override
+ int get hashCode =>
+ transaction.hashCode ^
+ txid.hashCode ^
+ received.hashCode ^
+ sent.hashCode ^
+ fee.hashCode ^
+ confirmationTime.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is BdkTransactionDetails &&
+ runtimeType == other.runtimeType &&
+ transaction == other.transaction &&
+ txid == other.txid &&
+ received == other.received &&
+ sent == other.sent &&
+ fee == other.fee &&
+ confirmationTime == other.confirmationTime;
+}
+
+class BdkTxIn {
+ final OutPoint previousOutput;
+ final BdkScriptBuf? scriptSig;
+ final int sequence;
+ final List witness;
+
+ const BdkTxIn({
+ required this.previousOutput,
+ this.scriptSig,
+ required this.sequence,
+ required this.witness,
+ });
+
+ @override
+ int get hashCode =>
+ previousOutput.hashCode ^
+ scriptSig.hashCode ^
+ sequence.hashCode ^
+ witness.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is BdkTxIn &&
+ runtimeType == other.runtimeType &&
+ previousOutput == other.previousOutput &&
+ scriptSig == other.scriptSig &&
+ sequence == other.sequence &&
+ witness == other.witness;
+}
+
+///A transaction output, which defines new coins to be created from old ones.
+class BdkTxOut {
+ /// The value of the output, in satoshis.
+ final BigInt value;
+
+ /// The address of the output.
+ final BdkScriptBuf scriptPubkey;
+
+ const BdkTxOut({
+ required this.value,
+ required this.scriptPubkey,
+ });
+
+ @override
+ int get hashCode => value.hashCode ^ scriptPubkey.hashCode;
+
+ @override
+ bool operator ==(Object other) =>
+ identical(this, other) ||
+ other is BdkTxOut &&
+ runtimeType == other.runtimeType &&
+ value == other.value &&
+ scriptPubkey == other.scriptPubkey;
+}
+
///Block height and timestamp of a block
class BlockTime {
///Confirmation block height
@@ -441,7 +547,7 @@ enum KeychainKind {
///Unspent outputs of this wallet
class LocalUtxo {
final OutPoint outpoint;
- final TxOut txout;
+ final BdkTxOut txout;
final KeychainKind keychain;
final bool isSpent;
@@ -805,118 +911,6 @@ class SqliteDbConfiguration {
path == other.path;
}
-///A wallet transaction
-class TransactionDetails {
- final BdkTransaction? transaction;
-
- /// Transaction id.
- final String txid;
-
- /// Received value (sats)
- /// Sum of owned outputs of this transaction.
- final BigInt received;
-
- /// Sent value (sats)
- /// Sum of owned inputs of this transaction.
- final BigInt sent;
-
- /// Fee value (sats) if confirmed.
- /// The availability of the fee depends on the backend. It's never None with an Electrum
- /// Server backend, but it could be None with a Bitcoin RPC node without txindex that receive
- /// funds while offline.
- final BigInt? fee;
-
- /// If the transaction is confirmed, contains height and timestamp of the block containing the
- /// transaction, unconfirmed transaction contains `None`.
- final BlockTime? confirmationTime;
-
- const TransactionDetails({
- this.transaction,
- required this.txid,
- required this.received,
- required this.sent,
- this.fee,
- this.confirmationTime,
- });
-
- @override
- int get hashCode =>
- transaction.hashCode ^
- txid.hashCode ^
- received.hashCode ^
- sent.hashCode ^
- fee.hashCode ^
- confirmationTime.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is TransactionDetails &&
- runtimeType == other.runtimeType &&
- transaction == other.transaction &&
- txid == other.txid &&
- received == other.received &&
- sent == other.sent &&
- fee == other.fee &&
- confirmationTime == other.confirmationTime;
-}
-
-class TxIn {
- final OutPoint previousOutput;
- final BdkScriptBuf scriptSig;
- final int sequence;
- final List witness;
-
- const TxIn({
- required this.previousOutput,
- required this.scriptSig,
- required this.sequence,
- required this.witness,
- });
-
- @override
- int get hashCode =>
- previousOutput.hashCode ^
- scriptSig.hashCode ^
- sequence.hashCode ^
- witness.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is TxIn &&
- runtimeType == other.runtimeType &&
- previousOutput == other.previousOutput &&
- scriptSig == other.scriptSig &&
- sequence == other.sequence &&
- witness == other.witness;
-}
-
-///A transaction output, which defines new coins to be created from old ones.
-class TxOut {
- /// The value of the output, in satoshis.
- final BigInt value;
-
- /// The address of the output.
- final BdkScriptBuf scriptPubkey;
-
- const TxOut({
- required this.value,
- required this.scriptPubkey,
- });
-
- @override
- int get hashCode => value.hashCode ^ scriptPubkey.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is TxOut &&
- runtimeType == other.runtimeType &&
- value == other.value &&
- scriptPubkey == other.scriptPubkey;
-}
-
enum Variant {
bech32,
bech32M,
diff --git a/lib/src/generated/api/wallet.dart b/lib/src/generated/api/wallet.dart
index e3a5ff3..474d9b5 100644
--- a/lib/src/generated/api/wallet.dart
+++ b/lib/src/generated/api/wallet.dart
@@ -14,7 +14,7 @@ import 'types.dart';
// These function are ignored because they are on traits that is not defined in current crate (put an empty `#[frb]` on it to unignore): `fmt`
-Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder(
+Future<(BdkPsbt, BdkTransactionDetails)> finishBumpFeeTxBuilder(
{required String txid,
required double feeRate,
BdkAddress? allowShrinking,
@@ -29,7 +29,7 @@ Future<(BdkPsbt, TransactionDetails)> finishBumpFeeTxBuilder(
enableRbf: enableRbf,
nSequence: nSequence);
-Future<(BdkPsbt, TransactionDetails)> txBuilderFinish(
+Future<(BdkPsbt, BdkTransactionDetails)> txBuilderFinish(
{required BdkWallet wallet,
required List recipients,
required List utxos,
@@ -69,6 +69,17 @@ class BdkWallet {
required this.ptr,
});
+ static Future create(
+ {required BdkDescriptor descriptor,
+ BdkDescriptor? changeDescriptor,
+ required Network network,
+ required DatabaseConfig databaseConfig}) =>
+ core.instance.api.crateApiWalletBdkWalletCreate(
+ descriptor: descriptor,
+ changeDescriptor: changeDescriptor,
+ network: network,
+ databaseConfig: databaseConfig);
+
/// Return a derived address using the external descriptor, see AddressIndex for available address index selection
/// strategies. If none of the keys in the descriptor are derivable (i.e. the descriptor does not end with a * character)
/// then the same address will always be returned for any AddressIndex.
@@ -102,7 +113,7 @@ class BdkWallet {
ptr: ptr, addressIndex: addressIndex);
///get the corresponding PSBT Input for a LocalUtxo
- Future getPsbtInput(
+ Input getPsbtInput(
{required LocalUtxo utxo,
required bool onlyWitnessUtxo,
PsbtSigHashType? sighashType}) =>
@@ -116,7 +127,7 @@ class BdkWallet {
core.instance.api.crateApiWalletBdkWalletIsMine(ptr: ptr, script: script);
/// Return the list of transactions made and received by the wallet. Note that this method only operate on the internal database, which first needs to be [Wallet.sync] manually.
- List listTransactions({required bool includeRaw}) =>
+ List listTransactions({required bool includeRaw}) =>
core.instance.api.crateApiWalletBdkWalletListTransactions(
that: this, includeRaw: includeRaw);
@@ -132,18 +143,6 @@ class BdkWallet {
that: this,
);
- // HINT: Make it `#[frb(sync)]` to let it become the default constructor of Dart class.
- static Future newInstance(
- {required BdkDescriptor descriptor,
- BdkDescriptor? changeDescriptor,
- required Network network,
- required DatabaseConfig databaseConfig}) =>
- core.instance.api.crateApiWalletBdkWalletNew(
- descriptor: descriptor,
- changeDescriptor: changeDescriptor,
- network: network,
- databaseConfig: databaseConfig);
-
static BdkPolicy? policies(
{required BdkWallet ptr, required KeychainKind keychain}) =>
core.instance.api
@@ -156,7 +155,7 @@ class BdkWallet {
/// the transaction is finalized at the end. Note that it can't be guaranteed that *every*
/// signers will follow the options, but the "software signers" (WIF keys and `xprv`) defined
/// in this library will.
- static Future sign(
+ static bool sign(
{required BdkWallet ptr,
required BdkPsbt psbt,
SignOptions? signOptions}) =>
diff --git a/lib/src/generated/frb_generated.dart b/lib/src/generated/frb_generated.dart
index 8d2b34e..71a887e 100644
--- a/lib/src/generated/frb_generated.dart
+++ b/lib/src/generated/frb_generated.dart
@@ -62,7 +62,7 @@ class core extends BaseEntrypoint {
String get codegenVersion => '2.0.0';
@override
- int get rustContentHash => -321771070;
+ int get rustContentHash => -418359953;
static const kDefaultExternalLibraryLoaderConfig =
ExternalLibraryLoaderConfig(
@@ -90,51 +90,51 @@ abstract class coreApi extends BaseApi {
String crateApiDescriptorBdkDescriptorAsString({required BdkDescriptor that});
+ BdkDescriptor crateApiDescriptorBdkDescriptorCreate(
+ {required String descriptor, required Network network});
+
BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight(
{required BdkDescriptor that});
- Future crateApiDescriptorBdkDescriptorNew(
- {required String descriptor, required Network network});
-
- Future crateApiDescriptorBdkDescriptorNewBip44(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip44(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip44Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip44Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip49(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip49(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip49Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip49Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip84(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip84(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip84Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip84Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip86(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip86(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network});
- Future crateApiDescriptorBdkDescriptorNewBip86Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip86Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
@@ -146,19 +146,19 @@ abstract class coreApi extends BaseApi {
String crateApiKeyBdkDerivationPathAsString(
{required BdkDerivationPath that});
- Future crateApiKeyBdkDerivationPathFromString(
+ BdkDerivationPath crateApiKeyBdkDerivationPathFromString(
{required String path});
String crateApiKeyBdkDescriptorPublicKeyAsString(
{required BdkDescriptorPublicKey that});
- Future crateApiKeyBdkDescriptorPublicKeyDerive(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyDerive(
{required BdkDescriptorPublicKey ptr, required BdkDerivationPath path});
- Future crateApiKeyBdkDescriptorPublicKeyExtend(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyExtend(
{required BdkDescriptorPublicKey ptr, required BdkDerivationPath path});
- Future crateApiKeyBdkDescriptorPublicKeyFromString(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyFromString(
{required String publicKey});
BdkDescriptorPublicKey crateApiKeyBdkDescriptorSecretKeyAsPublic(
@@ -167,15 +167,15 @@ abstract class coreApi extends BaseApi {
String crateApiKeyBdkDescriptorSecretKeyAsString(
{required BdkDescriptorSecretKey that});
- Future crateApiKeyBdkDescriptorSecretKeyCreate(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyCreate(
{required Network network,
required BdkMnemonic mnemonic,
String? password});
- Future crateApiKeyBdkDescriptorSecretKeyDerive(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyDerive(
{required BdkDescriptorSecretKey ptr, required BdkDerivationPath path});
- Future crateApiKeyBdkDescriptorSecretKeyExtend(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyExtend(
{required BdkDescriptorSecretKey ptr, required BdkDerivationPath path});
Future crateApiKeyBdkDescriptorSecretKeyFromString(
@@ -186,17 +186,15 @@ abstract class coreApi extends BaseApi {
String crateApiKeyBdkMnemonicAsString({required BdkMnemonic that});
- Future crateApiKeyBdkMnemonicFromEntropy(
- {required List entropy});
+ BdkMnemonic crateApiKeyBdkMnemonicCreate({required WordCount wordCount});
- Future crateApiKeyBdkMnemonicFromString(
- {required String mnemonic});
+ BdkMnemonic crateApiKeyBdkMnemonicFromEntropy({required List entropy});
- Future crateApiKeyBdkMnemonicNew({required WordCount wordCount});
+ BdkMnemonic crateApiKeyBdkMnemonicFromString({required String mnemonic});
String crateApiPsbtBdkPsbtAsString({required BdkPsbt that});
- Future crateApiPsbtBdkPsbtCombine(
+ BdkPsbt crateApiPsbtBdkPsbtCombine(
{required BdkPsbt ptr, required BdkPsbt other});
BdkTransaction crateApiPsbtBdkPsbtExtractTx({required BdkPsbt ptr});
@@ -205,7 +203,7 @@ abstract class coreApi extends BaseApi {
FeeRate? crateApiPsbtBdkPsbtFeeRate({required BdkPsbt that});
- Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64});
+ BdkPsbt crateApiPsbtBdkPsbtFromStr({required String psbtBase64});
String crateApiPsbtBdkPsbtJsonSerialize({required BdkPsbt that});
@@ -215,10 +213,10 @@ abstract class coreApi extends BaseApi {
String crateApiTypesBdkAddressAsString({required BdkAddress that});
- Future crateApiTypesBdkAddressFromScript(
+ BdkAddress crateApiTypesBdkAddressFromScript(
{required BdkScriptBuf script, required Network network});
- Future crateApiTypesBdkAddressFromString(
+ BdkAddress crateApiTypesBdkAddressFromString(
{required String address, required Network network});
bool crateApiTypesBdkAddressIsValidForNetwork(
@@ -248,55 +246,54 @@ abstract class coreApi extends BaseApi {
BdkScriptBuf crateApiTypesBdkScriptBufEmpty();
- Future crateApiTypesBdkScriptBufFromHex({required String s});
+ BdkScriptBuf crateApiTypesBdkScriptBufFromHex({required String s});
- Future crateApiTypesBdkScriptBufWithCapacity(
+ BdkScriptBuf crateApiTypesBdkScriptBufWithCapacity(
{required BigInt capacity});
- Future crateApiTypesBdkTransactionFromBytes(
- {required List transactionBytes});
+ BdkTransaction crateApiTypesBdkTransactionCreate(
+ {required int version,
+ required LockTime lockTime,
+ required List input,
+ required List output});
- Future> crateApiTypesBdkTransactionInput(
- {required BdkTransaction that});
+ BdkTransaction crateApiTypesBdkTransactionFromBytes(
+ {required List transactionBytes});
- Future crateApiTypesBdkTransactionIsCoinBase(
+ List crateApiTypesBdkTransactionInput(
{required BdkTransaction that});
- Future crateApiTypesBdkTransactionIsExplicitlyRbf(
- {required BdkTransaction that});
+ bool crateApiTypesBdkTransactionIsCoinBase({required BdkTransaction that});
- Future crateApiTypesBdkTransactionIsLockTimeEnabled(
+ bool crateApiTypesBdkTransactionIsExplicitlyRbf(
{required BdkTransaction that});
- Future crateApiTypesBdkTransactionLockTime(
+ bool crateApiTypesBdkTransactionIsLockTimeEnabled(
{required BdkTransaction that});
- Future crateApiTypesBdkTransactionNew(
- {required int version,
- required LockTime lockTime,
- required List input,
- required List output});
+ LockTime crateApiTypesBdkTransactionLockTime({required BdkTransaction that});
- Future> crateApiTypesBdkTransactionOutput(
+ List crateApiTypesBdkTransactionOutput(
{required BdkTransaction that});
- Future crateApiTypesBdkTransactionSerialize(
+ Uint8List crateApiTypesBdkTransactionSerialize(
{required BdkTransaction that});
- Future crateApiTypesBdkTransactionSize(
- {required BdkTransaction that});
+ BigInt crateApiTypesBdkTransactionSize({required BdkTransaction that});
- Future crateApiTypesBdkTransactionTxid(
- {required BdkTransaction that});
+ String crateApiTypesBdkTransactionTxid({required BdkTransaction that});
- Future crateApiTypesBdkTransactionVersion(
- {required BdkTransaction that});
+ int crateApiTypesBdkTransactionVersion({required BdkTransaction that});
- Future crateApiTypesBdkTransactionVsize(
- {required BdkTransaction that});
+ BigInt crateApiTypesBdkTransactionVsize({required BdkTransaction that});
- Future crateApiTypesBdkTransactionWeight(
- {required BdkTransaction that});
+ BigInt crateApiTypesBdkTransactionWeight({required BdkTransaction that});
+
+ Future crateApiWalletBdkWalletCreate(
+ {required BdkDescriptor descriptor,
+ BdkDescriptor? changeDescriptor,
+ required Network network,
+ required DatabaseConfig databaseConfig});
(BdkAddress, int) crateApiWalletBdkWalletGetAddress(
{required BdkWallet ptr, required AddressIndex addressIndex});
@@ -309,7 +306,7 @@ abstract class coreApi extends BaseApi {
(BdkAddress, int) crateApiWalletBdkWalletGetInternalAddress(
{required BdkWallet ptr, required AddressIndex addressIndex});
- Future crateApiWalletBdkWalletGetPsbtInput(
+ Input crateApiWalletBdkWalletGetPsbtInput(
{required BdkWallet that,
required LocalUtxo utxo,
required bool onlyWitnessUtxo,
@@ -318,23 +315,17 @@ abstract class coreApi extends BaseApi {
bool crateApiWalletBdkWalletIsMine(
{required BdkWallet ptr, required BdkScriptBuf script});
- List crateApiWalletBdkWalletListTransactions(
+ List crateApiWalletBdkWalletListTransactions(
{required BdkWallet that, required bool includeRaw});
List crateApiWalletBdkWalletListUnspent({required BdkWallet that});
Network crateApiWalletBdkWalletNetwork({required BdkWallet that});
- Future crateApiWalletBdkWalletNew(
- {required BdkDescriptor descriptor,
- BdkDescriptor? changeDescriptor,
- required Network network,
- required DatabaseConfig databaseConfig});
-
BdkPolicy? crateApiWalletBdkWalletPolicies(
{required BdkWallet ptr, required KeychainKind keychain});
- Future crateApiWalletBdkWalletSign(
+ bool crateApiWalletBdkWalletSign(
{required BdkWallet ptr,
required BdkPsbt psbt,
SignOptions? signOptions});
@@ -342,7 +333,7 @@ abstract class coreApi extends BaseApi {
Future crateApiWalletBdkWalletSync(
{required BdkWallet ptr, required BdkBlockchain blockchain});
- Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder(
+ Future<(BdkPsbt, BdkTransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder(
{required String txid,
required double feeRate,
BdkAddress? allowShrinking,
@@ -350,7 +341,7 @@ abstract class coreApi extends BaseApi {
required bool enableRbf,
int? nSequence});
- Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish(
+ Future<(BdkPsbt, BdkTransactionDetails)> crateApiWalletTxBuilderFinish(
{required BdkWallet wallet,
required List recipients,
required List utxos,
@@ -618,6 +609,32 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
argNames: ["that"],
);
+ @override
+ BdkDescriptor crateApiDescriptorBdkDescriptorCreate(
+ {required String descriptor, required Network network}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
+ var arg0 = cst_encode_String(descriptor);
+ var arg1 = cst_encode_network(network);
+ return wire.wire__crate__api__descriptor__bdk_descriptor_create(
+ arg0, arg1);
+ },
+ codec: DcoCodec(
+ decodeSuccessData: dco_decode_bdk_descriptor,
+ decodeErrorData: dco_decode_bdk_error,
+ ),
+ constMeta: kCrateApiDescriptorBdkDescriptorCreateConstMeta,
+ argValues: [descriptor, network],
+ apiImpl: this,
+ ));
+ }
+
+ TaskConstMeta get kCrateApiDescriptorBdkDescriptorCreateConstMeta =>
+ const TaskConstMeta(
+ debugName: "bdk_descriptor_create",
+ argNames: ["descriptor", "network"],
+ );
+
@override
BigInt crateApiDescriptorBdkDescriptorMaxSatisfactionWeight(
{required BdkDescriptor that}) {
@@ -646,43 +663,17 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNew(
- {required String descriptor, required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_String(descriptor);
- var arg1 = cst_encode_network(network);
- return wire.wire__crate__api__descriptor__bdk_descriptor_new(
- port_, arg0, arg1);
- },
- codec: DcoCodec(
- decodeSuccessData: dco_decode_bdk_descriptor,
- decodeErrorData: dco_decode_bdk_error,
- ),
- constMeta: kCrateApiDescriptorBdkDescriptorNewConstMeta,
- argValues: [descriptor, network],
- apiImpl: this,
- ));
- }
-
- TaskConstMeta get kCrateApiDescriptorBdkDescriptorNewConstMeta =>
- const TaskConstMeta(
- debugName: "bdk_descriptor_new",
- argNames: ["descriptor", "network"],
- );
-
- @override
- Future crateApiDescriptorBdkDescriptorNewBip44(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip44(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey);
var arg1 = cst_encode_keychain_kind(keychainKind);
var arg2 = cst_encode_network(network);
return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip44(
- port_, arg0, arg1, arg2);
+ arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -701,20 +692,20 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip44Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip44Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey);
var arg1 = cst_encode_String(fingerprint);
var arg2 = cst_encode_keychain_kind(keychainKind);
var arg3 = cst_encode_network(network);
return wire
.wire__crate__api__descriptor__bdk_descriptor_new_bip44_public(
- port_, arg0, arg1, arg2, arg3);
+ arg0, arg1, arg2, arg3);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -733,17 +724,17 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip49(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip49(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey);
var arg1 = cst_encode_keychain_kind(keychainKind);
var arg2 = cst_encode_network(network);
return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip49(
- port_, arg0, arg1, arg2);
+ arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -762,20 +753,20 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip49Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip49Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey);
var arg1 = cst_encode_String(fingerprint);
var arg2 = cst_encode_keychain_kind(keychainKind);
var arg3 = cst_encode_network(network);
return wire
.wire__crate__api__descriptor__bdk_descriptor_new_bip49_public(
- port_, arg0, arg1, arg2, arg3);
+ arg0, arg1, arg2, arg3);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -794,17 +785,17 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip84(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip84(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey);
var arg1 = cst_encode_keychain_kind(keychainKind);
var arg2 = cst_encode_network(network);
return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip84(
- port_, arg0, arg1, arg2);
+ arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -823,20 +814,20 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip84Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip84Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey);
var arg1 = cst_encode_String(fingerprint);
var arg2 = cst_encode_keychain_kind(keychainKind);
var arg3 = cst_encode_network(network);
return wire
.wire__crate__api__descriptor__bdk_descriptor_new_bip84_public(
- port_, arg0, arg1, arg2, arg3);
+ arg0, arg1, arg2, arg3);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -855,17 +846,17 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip86(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip86(
{required BdkDescriptorSecretKey secretKey,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(secretKey);
var arg1 = cst_encode_keychain_kind(keychainKind);
var arg2 = cst_encode_network(network);
return wire.wire__crate__api__descriptor__bdk_descriptor_new_bip86(
- port_, arg0, arg1, arg2);
+ arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -884,20 +875,20 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiDescriptorBdkDescriptorNewBip86Public(
+ BdkDescriptor crateApiDescriptorBdkDescriptorNewBip86Public(
{required BdkDescriptorPublicKey publicKey,
required String fingerprint,
required KeychainKind keychainKind,
required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(publicKey);
var arg1 = cst_encode_String(fingerprint);
var arg2 = cst_encode_keychain_kind(keychainKind);
var arg3 = cst_encode_network(network);
return wire
.wire__crate__api__descriptor__bdk_descriptor_new_bip86_public(
- port_, arg0, arg1, arg2, arg3);
+ arg0, arg1, arg2, arg3);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor,
@@ -966,13 +957,13 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDerivationPathFromString(
+ BdkDerivationPath crateApiKeyBdkDerivationPathFromString(
{required String path}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_String(path);
- return wire.wire__crate__api__key__bdk_derivation_path_from_string(
- port_, arg0);
+ return wire
+ .wire__crate__api__key__bdk_derivation_path_from_string(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_derivation_path,
@@ -1016,14 +1007,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorPublicKeyDerive(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyDerive(
{required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr);
var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path);
return wire.wire__crate__api__key__bdk_descriptor_public_key_derive(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_public_key,
@@ -1042,14 +1033,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorPublicKeyExtend(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyExtend(
{required BdkDescriptorPublicKey ptr, required BdkDerivationPath path}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_public_key(ptr);
var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path);
return wire.wire__crate__api__key__bdk_descriptor_public_key_extend(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_public_key,
@@ -1068,14 +1059,13 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorPublicKeyFromString(
+ BdkDescriptorPublicKey crateApiKeyBdkDescriptorPublicKeyFromString(
{required String publicKey}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_String(publicKey);
return wire
- .wire__crate__api__key__bdk_descriptor_public_key_from_string(
- port_, arg0);
+ .wire__crate__api__key__bdk_descriptor_public_key_from_string(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_public_key,
@@ -1144,17 +1134,17 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorSecretKeyCreate(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyCreate(
{required Network network,
required BdkMnemonic mnemonic,
String? password}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_network(network);
var arg1 = cst_encode_box_autoadd_bdk_mnemonic(mnemonic);
var arg2 = cst_encode_opt_String(password);
return wire.wire__crate__api__key__bdk_descriptor_secret_key_create(
- port_, arg0, arg1, arg2);
+ arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_secret_key,
@@ -1173,14 +1163,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorSecretKeyDerive(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyDerive(
{required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr);
var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path);
return wire.wire__crate__api__key__bdk_descriptor_secret_key_derive(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_secret_key,
@@ -1199,14 +1189,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkDescriptorSecretKeyExtend(
+ BdkDescriptorSecretKey crateApiKeyBdkDescriptorSecretKeyExtend(
{required BdkDescriptorSecretKey ptr, required BdkDerivationPath path}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_descriptor_secret_key(ptr);
var arg1 = cst_encode_box_autoadd_bdk_derivation_path(path);
return wire.wire__crate__api__key__bdk_descriptor_secret_key_extend(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_descriptor_secret_key,
@@ -1300,76 +1290,72 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiKeyBdkMnemonicFromEntropy(
- {required List entropy}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_list_prim_u_8_loose(entropy);
- return wire.wire__crate__api__key__bdk_mnemonic_from_entropy(
- port_, arg0);
+ BdkMnemonic crateApiKeyBdkMnemonicCreate({required WordCount wordCount}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
+ var arg0 = cst_encode_word_count(wordCount);
+ return wire.wire__crate__api__key__bdk_mnemonic_create(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_mnemonic,
decodeErrorData: dco_decode_bdk_error,
),
- constMeta: kCrateApiKeyBdkMnemonicFromEntropyConstMeta,
- argValues: [entropy],
+ constMeta: kCrateApiKeyBdkMnemonicCreateConstMeta,
+ argValues: [wordCount],
apiImpl: this,
));
}
- TaskConstMeta get kCrateApiKeyBdkMnemonicFromEntropyConstMeta =>
+ TaskConstMeta get kCrateApiKeyBdkMnemonicCreateConstMeta =>
const TaskConstMeta(
- debugName: "bdk_mnemonic_from_entropy",
- argNames: ["entropy"],
+ debugName: "bdk_mnemonic_create",
+ argNames: ["wordCount"],
);
@override
- Future crateApiKeyBdkMnemonicFromString(
- {required String mnemonic}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_String(mnemonic);
- return wire.wire__crate__api__key__bdk_mnemonic_from_string(
- port_, arg0);
+ BdkMnemonic crateApiKeyBdkMnemonicFromEntropy({required List entropy}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
+ var arg0 = cst_encode_list_prim_u_8_loose(entropy);
+ return wire.wire__crate__api__key__bdk_mnemonic_from_entropy(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_mnemonic,
decodeErrorData: dco_decode_bdk_error,
),
- constMeta: kCrateApiKeyBdkMnemonicFromStringConstMeta,
- argValues: [mnemonic],
+ constMeta: kCrateApiKeyBdkMnemonicFromEntropyConstMeta,
+ argValues: [entropy],
apiImpl: this,
));
}
- TaskConstMeta get kCrateApiKeyBdkMnemonicFromStringConstMeta =>
+ TaskConstMeta get kCrateApiKeyBdkMnemonicFromEntropyConstMeta =>
const TaskConstMeta(
- debugName: "bdk_mnemonic_from_string",
- argNames: ["mnemonic"],
+ debugName: "bdk_mnemonic_from_entropy",
+ argNames: ["entropy"],
);
@override
- Future crateApiKeyBdkMnemonicNew(
- {required WordCount wordCount}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_word_count(wordCount);
- return wire.wire__crate__api__key__bdk_mnemonic_new(port_, arg0);
+ BdkMnemonic crateApiKeyBdkMnemonicFromString({required String mnemonic}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
+ var arg0 = cst_encode_String(mnemonic);
+ return wire.wire__crate__api__key__bdk_mnemonic_from_string(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_mnemonic,
decodeErrorData: dco_decode_bdk_error,
),
- constMeta: kCrateApiKeyBdkMnemonicNewConstMeta,
- argValues: [wordCount],
+ constMeta: kCrateApiKeyBdkMnemonicFromStringConstMeta,
+ argValues: [mnemonic],
apiImpl: this,
));
}
- TaskConstMeta get kCrateApiKeyBdkMnemonicNewConstMeta => const TaskConstMeta(
- debugName: "bdk_mnemonic_new",
- argNames: ["wordCount"],
+ TaskConstMeta get kCrateApiKeyBdkMnemonicFromStringConstMeta =>
+ const TaskConstMeta(
+ debugName: "bdk_mnemonic_from_string",
+ argNames: ["mnemonic"],
);
@override
@@ -1396,13 +1382,13 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiPsbtBdkPsbtCombine(
+ BdkPsbt crateApiPsbtBdkPsbtCombine(
{required BdkPsbt ptr, required BdkPsbt other}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_psbt(ptr);
var arg1 = cst_encode_box_autoadd_bdk_psbt(other);
- return wire.wire__crate__api__psbt__bdk_psbt_combine(port_, arg0, arg1);
+ return wire.wire__crate__api__psbt__bdk_psbt_combine(arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_psbt,
@@ -1488,11 +1474,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiPsbtBdkPsbtFromStr({required String psbtBase64}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ BdkPsbt crateApiPsbtBdkPsbtFromStr({required String psbtBase64}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_String(psbtBase64);
- return wire.wire__crate__api__psbt__bdk_psbt_from_str(port_, arg0);
+ return wire.wire__crate__api__psbt__bdk_psbt_from_str(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_psbt,
@@ -1601,14 +1587,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkAddressFromScript(
+ BdkAddress crateApiTypesBdkAddressFromScript(
{required BdkScriptBuf script, required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_script_buf(script);
var arg1 = cst_encode_network(network);
return wire.wire__crate__api__types__bdk_address_from_script(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_address,
@@ -1627,14 +1613,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkAddressFromString(
+ BdkAddress crateApiTypesBdkAddressFromString(
{required String address, required Network network}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_String(address);
var arg1 = cst_encode_network(network);
return wire.wire__crate__api__types__bdk_address_from_string(
- port_, arg0, arg1);
+ arg0, arg1);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_address,
@@ -1952,12 +1938,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkScriptBufFromHex({required String s}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ BdkScriptBuf crateApiTypesBdkScriptBufFromHex({required String s}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_String(s);
- return wire.wire__crate__api__types__bdk_script_buf_from_hex(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_script_buf_from_hex(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_script_buf,
@@ -1976,13 +1961,12 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkScriptBufWithCapacity(
+ BdkScriptBuf crateApiTypesBdkScriptBufWithCapacity(
{required BigInt capacity}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_usize(capacity);
- return wire.wire__crate__api__types__bdk_script_buf_with_capacity(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_script_buf_with_capacity(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_script_buf,
@@ -2001,13 +1985,43 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionFromBytes(
+ BdkTransaction crateApiTypesBdkTransactionCreate(
+ {required int version,
+ required LockTime lockTime,
+ required List input,
+ required List output}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
+ var arg0 = cst_encode_i_32(version);
+ var arg1 = cst_encode_box_autoadd_lock_time(lockTime);
+ var arg2 = cst_encode_list_bdk_tx_in(input);
+ var arg3 = cst_encode_list_bdk_tx_out(output);
+ return wire.wire__crate__api__types__bdk_transaction_create(
+ arg0, arg1, arg2, arg3);
+ },
+ codec: DcoCodec(
+ decodeSuccessData: dco_decode_bdk_transaction,
+ decodeErrorData: dco_decode_bdk_error,
+ ),
+ constMeta: kCrateApiTypesBdkTransactionCreateConstMeta,
+ argValues: [version, lockTime, input, output],
+ apiImpl: this,
+ ));
+ }
+
+ TaskConstMeta get kCrateApiTypesBdkTransactionCreateConstMeta =>
+ const TaskConstMeta(
+ debugName: "bdk_transaction_create",
+ argNames: ["version", "lockTime", "input", "output"],
+ );
+
+ @override
+ BdkTransaction crateApiTypesBdkTransactionFromBytes(
{required List transactionBytes}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_list_prim_u_8_loose(transactionBytes);
- return wire.wire__crate__api__types__bdk_transaction_from_bytes(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_from_bytes(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bdk_transaction,
@@ -2026,15 +2040,15 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future> crateApiTypesBdkTransactionInput(
+ List crateApiTypesBdkTransactionInput(
{required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_input(port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_input(arg0);
},
codec: DcoCodec(
- decodeSuccessData: dco_decode_list_tx_in,
+ decodeSuccessData: dco_decode_list_bdk_tx_in,
decodeErrorData: dco_decode_bdk_error,
),
constMeta: kCrateApiTypesBdkTransactionInputConstMeta,
@@ -2050,13 +2064,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionIsCoinBase(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ bool crateApiTypesBdkTransactionIsCoinBase({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_is_coin_base(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_is_coin_base(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bool,
@@ -2075,13 +2087,13 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionIsExplicitlyRbf(
+ bool crateApiTypesBdkTransactionIsExplicitlyRbf(
{required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_is_explicitly_rbf(
- port_, arg0);
+ return wire
+ .wire__crate__api__types__bdk_transaction_is_explicitly_rbf(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bool,
@@ -2100,14 +2112,14 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionIsLockTimeEnabled(
+ bool crateApiTypesBdkTransactionIsLockTimeEnabled(
{required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
return wire
.wire__crate__api__types__bdk_transaction_is_lock_time_enabled(
- port_, arg0);
+ arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bool,
@@ -2126,13 +2138,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionLockTime(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ LockTime crateApiTypesBdkTransactionLockTime({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_lock_time(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_lock_time(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_lock_time,
@@ -2151,47 +2161,15 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionNew(
- {required int version,
- required LockTime lockTime,
- required List input,
- required List output}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_i_32(version);
- var arg1 = cst_encode_box_autoadd_lock_time(lockTime);
- var arg2 = cst_encode_list_tx_in(input);
- var arg3 = cst_encode_list_tx_out(output);
- return wire.wire__crate__api__types__bdk_transaction_new(
- port_, arg0, arg1, arg2, arg3);
- },
- codec: DcoCodec(
- decodeSuccessData: dco_decode_bdk_transaction,
- decodeErrorData: dco_decode_bdk_error,
- ),
- constMeta: kCrateApiTypesBdkTransactionNewConstMeta,
- argValues: [version, lockTime, input, output],
- apiImpl: this,
- ));
- }
-
- TaskConstMeta get kCrateApiTypesBdkTransactionNewConstMeta =>
- const TaskConstMeta(
- debugName: "bdk_transaction_new",
- argNames: ["version", "lockTime", "input", "output"],
- );
-
- @override
- Future> crateApiTypesBdkTransactionOutput(
+ List crateApiTypesBdkTransactionOutput(
{required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_output(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_output(arg0);
},
codec: DcoCodec(
- decodeSuccessData: dco_decode_list_tx_out,
+ decodeSuccessData: dco_decode_list_bdk_tx_out,
decodeErrorData: dco_decode_bdk_error,
),
constMeta: kCrateApiTypesBdkTransactionOutputConstMeta,
@@ -2207,13 +2185,12 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionSerialize(
+ Uint8List crateApiTypesBdkTransactionSerialize(
{required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_serialize(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_serialize(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_list_prim_u_8_strict,
@@ -2232,12 +2209,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionSize(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ BigInt crateApiTypesBdkTransactionSize({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_size(port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_size(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_u_64,
@@ -2256,12 +2232,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionTxid(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ String crateApiTypesBdkTransactionTxid({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_txid(port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_txid(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_String,
@@ -2280,13 +2255,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionVersion(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ int crateApiTypesBdkTransactionVersion({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_version(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_version(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_i_32,
@@ -2305,12 +2278,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionVsize(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ BigInt crateApiTypesBdkTransactionVsize({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_vsize(port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_vsize(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_u_64,
@@ -2329,13 +2301,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiTypesBdkTransactionWeight(
- {required BdkTransaction that}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ BigInt crateApiTypesBdkTransactionWeight({required BdkTransaction that}) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_transaction(that);
- return wire.wire__crate__api__types__bdk_transaction_weight(
- port_, arg0);
+ return wire.wire__crate__api__types__bdk_transaction_weight(arg0);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_u_64,
@@ -2353,6 +2323,42 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
argNames: ["that"],
);
+ @override
+ Future crateApiWalletBdkWalletCreate(
+ {required BdkDescriptor descriptor,
+ BdkDescriptor? changeDescriptor,
+ required Network network,
+ required DatabaseConfig databaseConfig}) {
+ return handler.executeNormal(NormalTask(
+ callFfi: (port_) {
+ var arg0 = cst_encode_box_autoadd_bdk_descriptor(descriptor);
+ var arg1 = cst_encode_opt_box_autoadd_bdk_descriptor(changeDescriptor);
+ var arg2 = cst_encode_network(network);
+ var arg3 = cst_encode_box_autoadd_database_config(databaseConfig);
+ return wire.wire__crate__api__wallet__bdk_wallet_create(
+ port_, arg0, arg1, arg2, arg3);
+ },
+ codec: DcoCodec(
+ decodeSuccessData: dco_decode_bdk_wallet,
+ decodeErrorData: dco_decode_bdk_error,
+ ),
+ constMeta: kCrateApiWalletBdkWalletCreateConstMeta,
+ argValues: [descriptor, changeDescriptor, network, databaseConfig],
+ apiImpl: this,
+ ));
+ }
+
+ TaskConstMeta get kCrateApiWalletBdkWalletCreateConstMeta =>
+ const TaskConstMeta(
+ debugName: "bdk_wallet_create",
+ argNames: [
+ "descriptor",
+ "changeDescriptor",
+ "network",
+ "databaseConfig"
+ ],
+ );
+
@override
(BdkAddress, int) crateApiWalletBdkWalletGetAddress(
{required BdkWallet ptr, required AddressIndex addressIndex}) {
@@ -2456,19 +2462,19 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiWalletBdkWalletGetPsbtInput(
+ Input crateApiWalletBdkWalletGetPsbtInput(
{required BdkWallet that,
required LocalUtxo utxo,
required bool onlyWitnessUtxo,
PsbtSigHashType? sighashType}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_wallet(that);
var arg1 = cst_encode_box_autoadd_local_utxo(utxo);
var arg2 = cst_encode_bool(onlyWitnessUtxo);
var arg3 = cst_encode_opt_box_autoadd_psbt_sig_hash_type(sighashType);
return wire.wire__crate__api__wallet__bdk_wallet_get_psbt_input(
- port_, arg0, arg1, arg2, arg3);
+ arg0, arg1, arg2, arg3);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_input,
@@ -2512,7 +2518,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- List crateApiWalletBdkWalletListTransactions(
+ List crateApiWalletBdkWalletListTransactions(
{required BdkWallet that, required bool includeRaw}) {
return handler.executeSync(SyncTask(
callFfi: () {
@@ -2522,7 +2528,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
arg0, arg1);
},
codec: DcoCodec(
- decodeSuccessData: dco_decode_list_transaction_details,
+ decodeSuccessData: dco_decode_list_bdk_transaction_details,
decodeErrorData: dco_decode_bdk_error,
),
constMeta: kCrateApiWalletBdkWalletListTransactionsConstMeta,
@@ -2584,41 +2590,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
argNames: ["that"],
);
- @override
- Future crateApiWalletBdkWalletNew(
- {required BdkDescriptor descriptor,
- BdkDescriptor? changeDescriptor,
- required Network network,
- required DatabaseConfig databaseConfig}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
- var arg0 = cst_encode_box_autoadd_bdk_descriptor(descriptor);
- var arg1 = cst_encode_opt_box_autoadd_bdk_descriptor(changeDescriptor);
- var arg2 = cst_encode_network(network);
- var arg3 = cst_encode_box_autoadd_database_config(databaseConfig);
- return wire.wire__crate__api__wallet__bdk_wallet_new(
- port_, arg0, arg1, arg2, arg3);
- },
- codec: DcoCodec(
- decodeSuccessData: dco_decode_bdk_wallet,
- decodeErrorData: dco_decode_bdk_error,
- ),
- constMeta: kCrateApiWalletBdkWalletNewConstMeta,
- argValues: [descriptor, changeDescriptor, network, databaseConfig],
- apiImpl: this,
- ));
- }
-
- TaskConstMeta get kCrateApiWalletBdkWalletNewConstMeta => const TaskConstMeta(
- debugName: "bdk_wallet_new",
- argNames: [
- "descriptor",
- "changeDescriptor",
- "network",
- "databaseConfig"
- ],
- );
-
@override
BdkPolicy? crateApiWalletBdkWalletPolicies(
{required BdkWallet ptr, required KeychainKind keychain}) {
@@ -2645,17 +2616,16 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future crateApiWalletBdkWalletSign(
+ bool crateApiWalletBdkWalletSign(
{required BdkWallet ptr,
required BdkPsbt psbt,
SignOptions? signOptions}) {
- return handler.executeNormal(NormalTask(
- callFfi: (port_) {
+ return handler.executeSync(SyncTask(
+ callFfi: () {
var arg0 = cst_encode_box_autoadd_bdk_wallet(ptr);
var arg1 = cst_encode_box_autoadd_bdk_psbt(psbt);
var arg2 = cst_encode_opt_box_autoadd_sign_options(signOptions);
- return wire.wire__crate__api__wallet__bdk_wallet_sign(
- port_, arg0, arg1, arg2);
+ return wire.wire__crate__api__wallet__bdk_wallet_sign(arg0, arg1, arg2);
},
codec: DcoCodec(
decodeSuccessData: dco_decode_bool,
@@ -2700,7 +2670,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future<(BdkPsbt, TransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder(
+ Future<(BdkPsbt, BdkTransactionDetails)> crateApiWalletFinishBumpFeeTxBuilder(
{required String txid,
required double feeRate,
BdkAddress? allowShrinking,
@@ -2719,7 +2689,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
port_, arg0, arg1, arg2, arg3, arg4, arg5);
},
codec: DcoCodec(
- decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details,
+ decodeSuccessData: dco_decode_record_bdk_psbt_bdk_transaction_details,
decodeErrorData: dco_decode_bdk_error,
),
constMeta: kCrateApiWalletFinishBumpFeeTxBuilderConstMeta,
@@ -2742,7 +2712,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
@override
- Future<(BdkPsbt, TransactionDetails)> crateApiWalletTxBuilderFinish(
+ Future<(BdkPsbt, BdkTransactionDetails)> crateApiWalletTxBuilderFinish(
{required BdkWallet wallet,
required List recipients,
required List utxos,
@@ -2797,7 +2767,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
arg14);
},
codec: DcoCodec(
- decodeSuccessData: dco_decode_record_bdk_psbt_transaction_details,
+ decodeSuccessData: dco_decode_record_bdk_psbt_bdk_transaction_details,
decodeErrorData: dco_decode_bdk_error,
),
constMeta: kCrateApiWalletTxBuilderFinishConstMeta,
@@ -3457,6 +3427,48 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
}
+ @protected
+ BdkTransactionDetails dco_decode_bdk_transaction_details(dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ final arr = raw as List;
+ if (arr.length != 6)
+ throw Exception('unexpected arr length: expect 6 but see ${arr.length}');
+ return BdkTransactionDetails(
+ transaction: dco_decode_opt_box_autoadd_bdk_transaction(arr[0]),
+ txid: dco_decode_String(arr[1]),
+ received: dco_decode_u_64(arr[2]),
+ sent: dco_decode_u_64(arr[3]),
+ fee: dco_decode_opt_box_autoadd_u_64(arr[4]),
+ confirmationTime: dco_decode_opt_box_autoadd_block_time(arr[5]),
+ );
+ }
+
+ @protected
+ BdkTxIn dco_decode_bdk_tx_in(dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ final arr = raw as List;
+ if (arr.length != 4)
+ throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
+ return BdkTxIn(
+ previousOutput: dco_decode_out_point(arr[0]),
+ scriptSig: dco_decode_opt_box_autoadd_bdk_script_buf(arr[1]),
+ sequence: dco_decode_u_32(arr[2]),
+ witness: dco_decode_list_list_prim_u_8_strict(arr[3]),
+ );
+ }
+
+ @protected
+ BdkTxOut dco_decode_bdk_tx_out(dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ final arr = raw as List;
+ if (arr.length != 2)
+ throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
+ return BdkTxOut(
+ value: dco_decode_u_64(arr[0]),
+ scriptPubkey: dco_decode_bdk_script_buf(arr[1]),
+ );
+ }
+
@protected
BdkWallet dco_decode_bdk_wallet(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
@@ -3977,6 +3989,27 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
return (raw as List).map(dco_decode_bdk_policy).toList();
}
+ @protected
+ List dco_decode_list_bdk_transaction_details(
+ dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ return (raw as List)
+ .map(dco_decode_bdk_transaction_details)
+ .toList();
+ }
+
+ @protected
+ List dco_decode_list_bdk_tx_in(dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ return (raw as List).map(dco_decode_bdk_tx_in).toList();
+ }
+
+ @protected
+ List dco_decode_list_bdk_tx_out(dynamic raw) {
+ // Codec=Dco (DartCObject based), see doc to use other codecs
+ return (raw as List).map(dco_decode_bdk_tx_out).toList();
+ }
+
@protected
List dco_decode_list_condition(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
@@ -4059,27 +4092,9 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
@protected
- List dco_decode_list_script_amount(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- return (raw as List).map(dco_decode_script_amount).toList();
- }
-
- @protected
- List dco_decode_list_transaction_details(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- return (raw as List).map(dco_decode_transaction_details).toList();
- }
-
- @protected
- List dco_decode_list_tx_in(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- return (raw as List).map(dco_decode_tx_in).toList();
- }
-
- @protected
- List dco_decode_list_tx_out(dynamic raw) {
+ List dco_decode_list_script_amount(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
- return (raw as List).map(dco_decode_tx_out).toList();
+ return (raw as List).map(dco_decode_script_amount).toList();
}
@protected
@@ -4090,7 +4105,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
return LocalUtxo(
outpoint: dco_decode_out_point(arr[0]),
- txout: dco_decode_tx_out(arr[1]),
+ txout: dco_decode_bdk_tx_out(arr[1]),
keychain: dco_decode_keychain_kind(arr[2]),
isSpent: dco_decode_bool(arr[3]),
);
@@ -4340,8 +4355,8 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
@protected
- (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details(
- dynamic raw) {
+ (BdkPsbt, BdkTransactionDetails)
+ dco_decode_record_bdk_psbt_bdk_transaction_details(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
final arr = raw as List;
if (arr.length != 2) {
@@ -4349,7 +4364,7 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
return (
dco_decode_bdk_psbt(arr[0]),
- dco_decode_transaction_details(arr[1]),
+ dco_decode_bdk_transaction_details(arr[1]),
);
}
@@ -4575,48 +4590,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
);
}
- @protected
- TransactionDetails dco_decode_transaction_details(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- final arr = raw as List;
- if (arr.length != 6)
- throw Exception('unexpected arr length: expect 6 but see ${arr.length}');
- return TransactionDetails(
- transaction: dco_decode_opt_box_autoadd_bdk_transaction(arr[0]),
- txid: dco_decode_String(arr[1]),
- received: dco_decode_u_64(arr[2]),
- sent: dco_decode_u_64(arr[3]),
- fee: dco_decode_opt_box_autoadd_u_64(arr[4]),
- confirmationTime: dco_decode_opt_box_autoadd_block_time(arr[5]),
- );
- }
-
- @protected
- TxIn dco_decode_tx_in(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- final arr = raw as List;
- if (arr.length != 4)
- throw Exception('unexpected arr length: expect 4 but see ${arr.length}');
- return TxIn(
- previousOutput: dco_decode_out_point(arr[0]),
- scriptSig: dco_decode_bdk_script_buf(arr[1]),
- sequence: dco_decode_u_32(arr[2]),
- witness: dco_decode_list_list_prim_u_8_strict(arr[3]),
- );
- }
-
- @protected
- TxOut dco_decode_tx_out(dynamic raw) {
- // Codec=Dco (DartCObject based), see doc to use other codecs
- final arr = raw as List;
- if (arr.length != 2)
- throw Exception('unexpected arr length: expect 2 but see ${arr.length}');
- return TxOut(
- value: dco_decode_u_64(arr[0]),
- scriptPubkey: dco_decode_bdk_script_buf(arr[1]),
- );
- }
-
@protected
int dco_decode_u_32(dynamic raw) {
// Codec=Dco (DartCObject based), see doc to use other codecs
@@ -5143,6 +5116,49 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
return BdkTransaction(s: var_s);
}
+ @protected
+ BdkTransactionDetails sse_decode_bdk_transaction_details(
+ SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ var var_transaction =
+ sse_decode_opt_box_autoadd_bdk_transaction(deserializer);
+ var var_txid = sse_decode_String(deserializer);
+ var var_received = sse_decode_u_64(deserializer);
+ var var_sent = sse_decode_u_64(deserializer);
+ var var_fee = sse_decode_opt_box_autoadd_u_64(deserializer);
+ var var_confirmationTime =
+ sse_decode_opt_box_autoadd_block_time(deserializer);
+ return BdkTransactionDetails(
+ transaction: var_transaction,
+ txid: var_txid,
+ received: var_received,
+ sent: var_sent,
+ fee: var_fee,
+ confirmationTime: var_confirmationTime);
+ }
+
+ @protected
+ BdkTxIn sse_decode_bdk_tx_in(SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ var var_previousOutput = sse_decode_out_point(deserializer);
+ var var_scriptSig = sse_decode_opt_box_autoadd_bdk_script_buf(deserializer);
+ var var_sequence = sse_decode_u_32(deserializer);
+ var var_witness = sse_decode_list_list_prim_u_8_strict(deserializer);
+ return BdkTxIn(
+ previousOutput: var_previousOutput,
+ scriptSig: var_scriptSig,
+ sequence: var_sequence,
+ witness: var_witness);
+ }
+
+ @protected
+ BdkTxOut sse_decode_bdk_tx_out(SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ var var_value = sse_decode_u_64(deserializer);
+ var var_scriptPubkey = sse_decode_bdk_script_buf(deserializer);
+ return BdkTxOut(value: var_value, scriptPubkey: var_scriptPubkey);
+ }
+
@protected
BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
@@ -5666,6 +5682,43 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
return ans_;
}
+ @protected
+ List sse_decode_list_bdk_transaction_details(
+ SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+
+ var len_ = sse_decode_i_32(deserializer);
+ var ans_ = [];
+ for (var idx_ = 0; idx_ < len_; ++idx_) {
+ ans_.add(sse_decode_bdk_transaction_details(deserializer));
+ }
+ return ans_;
+ }
+
+ @protected
+ List sse_decode_list_bdk_tx_in(SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+
+ var len_ = sse_decode_i_32(deserializer);
+ var ans_ = [];
+ for (var idx_ = 0; idx_ < len_; ++idx_) {
+ ans_.add(sse_decode_bdk_tx_in(deserializer));
+ }
+ return ans_;
+ }
+
+ @protected
+ List sse_decode_list_bdk_tx_out(SseDeserializer deserializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+
+ var len_ = sse_decode_i_32(deserializer);
+ var ans_ = [];
+ for (var idx_ = 0; idx_ < len_; ++idx_) {
+ ans_.add(sse_decode_bdk_tx_out(deserializer));
+ }
+ return ans_;
+ }
+
@protected
List sse_decode_list_condition(SseDeserializer deserializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
@@ -5810,48 +5863,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
return ans_;
}
- @protected
- List sse_decode_list_transaction_details(
- SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
-
- var len_ = sse_decode_i_32(deserializer);
- var ans_ = [];
- for (var idx_ = 0; idx_ < len_; ++idx_) {
- ans_.add(sse_decode_transaction_details(deserializer));
- }
- return ans_;
- }
-
- @protected
- List sse_decode_list_tx_in(SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
-
- var len_ = sse_decode_i_32(deserializer);
- var ans_ = [];
- for (var idx_ = 0; idx_ < len_; ++idx_) {
- ans_.add(sse_decode_tx_in(deserializer));
- }
- return ans_;
- }
-
- @protected
- List sse_decode_list_tx_out(SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
-
- var len_ = sse_decode_i_32(deserializer);
- var ans_ = [];
- for (var idx_ = 0; idx_ < len_; ++idx_) {
- ans_.add(sse_decode_tx_out(deserializer));
- }
- return ans_;
- }
-
@protected
LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
var var_outpoint = sse_decode_out_point(deserializer);
- var var_txout = sse_decode_tx_out(deserializer);
+ var var_txout = sse_decode_bdk_tx_out(deserializer);
var var_keychain = sse_decode_keychain_kind(deserializer);
var var_isSpent = sse_decode_bool(deserializer);
return LocalUtxo(
@@ -6201,11 +6217,12 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
@protected
- (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details(
- SseDeserializer deserializer) {
+ (BdkPsbt, BdkTransactionDetails)
+ sse_decode_record_bdk_psbt_bdk_transaction_details(
+ SseDeserializer deserializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
var var_field0 = sse_decode_bdk_psbt(deserializer);
- var var_field1 = sse_decode_transaction_details(deserializer);
+ var var_field1 = sse_decode_bdk_transaction_details(deserializer);
return (var_field0, var_field1);
}
@@ -6410,49 +6427,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
return SqliteDbConfiguration(path: var_path);
}
- @protected
- TransactionDetails sse_decode_transaction_details(
- SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- var var_transaction =
- sse_decode_opt_box_autoadd_bdk_transaction(deserializer);
- var var_txid = sse_decode_String(deserializer);
- var var_received = sse_decode_u_64(deserializer);
- var var_sent = sse_decode_u_64(deserializer);
- var var_fee = sse_decode_opt_box_autoadd_u_64(deserializer);
- var var_confirmationTime =
- sse_decode_opt_box_autoadd_block_time(deserializer);
- return TransactionDetails(
- transaction: var_transaction,
- txid: var_txid,
- received: var_received,
- sent: var_sent,
- fee: var_fee,
- confirmationTime: var_confirmationTime);
- }
-
- @protected
- TxIn sse_decode_tx_in(SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- var var_previousOutput = sse_decode_out_point(deserializer);
- var var_scriptSig = sse_decode_bdk_script_buf(deserializer);
- var var_sequence = sse_decode_u_32(deserializer);
- var var_witness = sse_decode_list_list_prim_u_8_strict(deserializer);
- return TxIn(
- previousOutput: var_previousOutput,
- scriptSig: var_scriptSig,
- sequence: var_sequence,
- witness: var_witness);
- }
-
- @protected
- TxOut sse_decode_tx_out(SseDeserializer deserializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- var var_value = sse_decode_u_64(deserializer);
- var var_scriptPubkey = sse_decode_bdk_script_buf(deserializer);
- return TxOut(value: var_value, scriptPubkey: var_scriptPubkey);
- }
-
@protected
int sse_decode_u_32(SseDeserializer deserializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
@@ -7119,6 +7093,34 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
sse_encode_String(self.s, serializer);
}
+ @protected
+ void sse_encode_bdk_transaction_details(
+ BdkTransactionDetails self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_opt_box_autoadd_bdk_transaction(self.transaction, serializer);
+ sse_encode_String(self.txid, serializer);
+ sse_encode_u_64(self.received, serializer);
+ sse_encode_u_64(self.sent, serializer);
+ sse_encode_opt_box_autoadd_u_64(self.fee, serializer);
+ sse_encode_opt_box_autoadd_block_time(self.confirmationTime, serializer);
+ }
+
+ @protected
+ void sse_encode_bdk_tx_in(BdkTxIn self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_out_point(self.previousOutput, serializer);
+ sse_encode_opt_box_autoadd_bdk_script_buf(self.scriptSig, serializer);
+ sse_encode_u_32(self.sequence, serializer);
+ sse_encode_list_list_prim_u_8_strict(self.witness, serializer);
+ }
+
+ @protected
+ void sse_encode_bdk_tx_out(BdkTxOut self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_u_64(self.value, serializer);
+ sse_encode_bdk_script_buf(self.scriptPubkey, serializer);
+ }
+
@protected
void sse_encode_bdk_wallet(BdkWallet self, SseSerializer serializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
@@ -7627,6 +7629,35 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
}
+ @protected
+ void sse_encode_list_bdk_transaction_details(
+ List self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_i_32(self.length, serializer);
+ for (final item in self) {
+ sse_encode_bdk_transaction_details(item, serializer);
+ }
+ }
+
+ @protected
+ void sse_encode_list_bdk_tx_in(List self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_i_32(self.length, serializer);
+ for (final item in self) {
+ sse_encode_bdk_tx_in(item, serializer);
+ }
+ }
+
+ @protected
+ void sse_encode_list_bdk_tx_out(
+ List self, SseSerializer serializer) {
+ // Codec=Sse (Serialization based), see doc to use other codecs
+ sse_encode_i_32(self.length, serializer);
+ for (final item in self) {
+ sse_encode_bdk_tx_out(item, serializer);
+ }
+ }
+
@protected
void sse_encode_list_condition(
List self, SseSerializer serializer) {
@@ -7749,39 +7780,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
}
- @protected
- void sse_encode_list_transaction_details(
- List self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_i_32(self.length, serializer);
- for (final item in self) {
- sse_encode_transaction_details(item, serializer);
- }
- }
-
- @protected
- void sse_encode_list_tx_in(List self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_i_32(self.length, serializer);
- for (final item in self) {
- sse_encode_tx_in(item, serializer);
- }
- }
-
- @protected
- void sse_encode_list_tx_out(List self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_i_32(self.length, serializer);
- for (final item in self) {
- sse_encode_tx_out(item, serializer);
- }
- }
-
@protected
void sse_encode_local_utxo(LocalUtxo self, SseSerializer serializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
sse_encode_out_point(self.outpoint, serializer);
- sse_encode_tx_out(self.txout, serializer);
+ sse_encode_bdk_tx_out(self.txout, serializer);
sse_encode_keychain_kind(self.keychain, serializer);
sse_encode_bool(self.isSpent, serializer);
}
@@ -8098,11 +8101,11 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
}
@protected
- void sse_encode_record_bdk_psbt_transaction_details(
- (BdkPsbt, TransactionDetails) self, SseSerializer serializer) {
+ void sse_encode_record_bdk_psbt_bdk_transaction_details(
+ (BdkPsbt, BdkTransactionDetails) self, SseSerializer serializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
sse_encode_bdk_psbt(self.$1, serializer);
- sse_encode_transaction_details(self.$2, serializer);
+ sse_encode_bdk_transaction_details(self.$2, serializer);
}
@protected
@@ -8282,34 +8285,6 @@ class coreApiImpl extends coreApiImplPlatform implements coreApi {
sse_encode_String(self.path, serializer);
}
- @protected
- void sse_encode_transaction_details(
- TransactionDetails self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_opt_box_autoadd_bdk_transaction(self.transaction, serializer);
- sse_encode_String(self.txid, serializer);
- sse_encode_u_64(self.received, serializer);
- sse_encode_u_64(self.sent, serializer);
- sse_encode_opt_box_autoadd_u_64(self.fee, serializer);
- sse_encode_opt_box_autoadd_block_time(self.confirmationTime, serializer);
- }
-
- @protected
- void sse_encode_tx_in(TxIn self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_out_point(self.previousOutput, serializer);
- sse_encode_bdk_script_buf(self.scriptSig, serializer);
- sse_encode_u_32(self.sequence, serializer);
- sse_encode_list_list_prim_u_8_strict(self.witness, serializer);
- }
-
- @protected
- void sse_encode_tx_out(TxOut self, SseSerializer serializer) {
- // Codec=Sse (Serialization based), see doc to use other codecs
- sse_encode_u_64(self.value, serializer);
- sse_encode_bdk_script_buf(self.scriptPubkey, serializer);
- }
-
@protected
void sse_encode_u_32(int self, SseSerializer serializer) {
// Codec=Sse (Serialization based), see doc to use other codecs
diff --git a/lib/src/generated/frb_generated.io.dart b/lib/src/generated/frb_generated.io.dart
index 2b17a14..484caad 100644
--- a/lib/src/generated/frb_generated.io.dart
+++ b/lib/src/generated/frb_generated.io.dart
@@ -168,6 +168,15 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
BdkTransaction dco_decode_bdk_transaction(dynamic raw);
+ @protected
+ BdkTransactionDetails dco_decode_bdk_transaction_details(dynamic raw);
+
+ @protected
+ BdkTxIn dco_decode_bdk_tx_in(dynamic raw);
+
+ @protected
+ BdkTxOut dco_decode_bdk_tx_out(dynamic raw);
+
@protected
BdkWallet dco_decode_bdk_wallet(dynamic raw);
@@ -349,6 +358,16 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
List dco_decode_list_bdk_policy(dynamic raw);
+ @protected
+ List dco_decode_list_bdk_transaction_details(
+ dynamic raw);
+
+ @protected
+ List dco_decode_list_bdk_tx_in(dynamic raw);
+
+ @protected
+ List dco_decode_list_bdk_tx_out(dynamic raw);
+
@protected
List dco_decode_list_condition(dynamic raw);
@@ -391,15 +410,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
List dco_decode_list_script_amount(dynamic raw);
- @protected
- List dco_decode_list_transaction_details(dynamic raw);
-
- @protected
- List dco_decode_list_tx_in(dynamic raw);
-
- @protected
- List dco_decode_list_tx_out(dynamic raw);
-
@protected
LocalUtxo dco_decode_local_utxo(dynamic raw);
@@ -490,8 +500,8 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
(BdkAddress, int) dco_decode_record_bdk_address_u_32(dynamic raw);
@protected
- (BdkPsbt, TransactionDetails) dco_decode_record_bdk_psbt_transaction_details(
- dynamic raw);
+ (BdkPsbt, BdkTransactionDetails)
+ dco_decode_record_bdk_psbt_bdk_transaction_details(dynamic raw);
@protected
(Uint32List, List)
@@ -532,15 +542,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
SqliteDbConfiguration dco_decode_sqlite_db_configuration(dynamic raw);
- @protected
- TransactionDetails dco_decode_transaction_details(dynamic raw);
-
- @protected
- TxIn dco_decode_tx_in(dynamic raw);
-
- @protected
- TxOut dco_decode_tx_out(dynamic raw);
-
@protected
int dco_decode_u_32(dynamic raw);
@@ -679,6 +680,16 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
BdkTransaction sse_decode_bdk_transaction(SseDeserializer deserializer);
+ @protected
+ BdkTransactionDetails sse_decode_bdk_transaction_details(
+ SseDeserializer deserializer);
+
+ @protected
+ BdkTxIn sse_decode_bdk_tx_in(SseDeserializer deserializer);
+
+ @protected
+ BdkTxOut sse_decode_bdk_tx_out(SseDeserializer deserializer);
+
@protected
BdkWallet sse_decode_bdk_wallet(SseDeserializer deserializer);
@@ -877,6 +888,16 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
@protected
List sse_decode_list_bdk_policy(SseDeserializer deserializer);
+ @protected
+ List sse_decode_list_bdk_transaction_details(
+ SseDeserializer deserializer);
+
+ @protected
+ List sse_decode_list_bdk_tx_in(SseDeserializer deserializer);
+
+ @protected
+ List sse_decode_list_bdk_tx_out(SseDeserializer deserializer);
+
@protected
List sse_decode_list_condition(SseDeserializer deserializer);
@@ -923,16 +944,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
List sse_decode_list_script_amount(
SseDeserializer deserializer);
- @protected
- List sse_decode_list_transaction_details(
- SseDeserializer deserializer);
-
- @protected
- List sse_decode_list_tx_in(SseDeserializer deserializer);
-
- @protected
- List sse_decode_list_tx_out(SseDeserializer deserializer);
-
@protected
LocalUtxo sse_decode_local_utxo(SseDeserializer deserializer);
@@ -1034,8 +1045,9 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
SseDeserializer deserializer);
@protected
- (BdkPsbt, TransactionDetails) sse_decode_record_bdk_psbt_transaction_details(
- SseDeserializer deserializer);
+ (BdkPsbt, BdkTransactionDetails)
+ sse_decode_record_bdk_psbt_bdk_transaction_details(
+ SseDeserializer deserializer);
@protected
(Uint32List, List)
@@ -1080,16 +1092,6 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
SqliteDbConfiguration sse_decode_sqlite_db_configuration(
SseDeserializer deserializer);
- @protected
- TransactionDetails sse_decode_transaction_details(
- SseDeserializer deserializer);
-
- @protected
- TxIn sse_decode_tx_in(SseDeserializer deserializer);
-
- @protected
- TxOut sse_decode_tx_out(SseDeserializer deserializer);
-
@protected
int sse_decode_u_32(SseDeserializer deserializer);
@@ -1514,6 +1516,39 @@ abstract class coreApiImplPlatform extends BaseApiImpl {
return ans;
}
+ @protected
+ ffi.Pointer
+ cst_encode_list_bdk_transaction_details(List