import 'dart:ffi'; import 'package:cw_haven/api/structs/pending_transaction.dart'; import 'package:cw_haven/api/structs/ut8_box.dart'; import 'package:ffi/ffi.dart'; typedef create_wallet = Int8 Function( Pointer, Pointer, Pointer, Int32, Pointer); typedef restore_wallet_from_seed = Int8 Function( Pointer, Pointer, Pointer, Int32, Int64, Pointer); typedef restore_wallet_from_keys = Int8 Function(Pointer, Pointer, Pointer, Pointer, Pointer, Pointer, Int32, Int64, Pointer); typedef is_wallet_exist = Int8 Function(Pointer); typedef load_wallet = Int8 Function(Pointer, Pointer, Int8); typedef error_string = Pointer Function(); typedef get_filename = Pointer Function(); typedef get_seed = Pointer Function(); typedef get_address = Pointer Function(Int32, Int32); typedef get_full_balance = Pointer Function(Int32); typedef get_unlocked_balance = Pointer Function(Int32); typedef get_full_balanace = Int64 Function(Int32); typedef get_unlocked_balanace = Int64 Function(Int32); typedef get_current_height = Int64 Function(); typedef get_node_height = Int64 Function(); typedef is_connected = Int8 Function(); typedef setup_node = Int8 Function( Pointer, Pointer, Pointer, Int8, Int8, Pointer); typedef start_refresh = Void Function(); typedef connect_to_node = Int8 Function(); typedef set_refresh_from_block_height = Void Function(Int64); typedef set_recovering_from_seed = Void Function(Int8); typedef store_c = Void Function(Pointer); typedef set_listener = Void Function(); typedef get_syncing_height = Int64 Function(); typedef is_needed_to_refresh = Int8 Function(); typedef is_new_transaction_exist = Int8 Function(); typedef subaddrress_size = Int32 Function(); typedef subaddrress_refresh = Void Function(Int32); typedef subaddress_get_all = Pointer Function(); typedef subaddress_add_new = Void Function( Int32 accountIndex, Pointer label); typedef subaddress_set_label = Void Function( Int32 accountIndex, Int32 addressIndex, Pointer label); typedef account_size = Int32 Function(); typedef account_refresh = Void Function(); typedef account_get_all = Pointer Function(); typedef account_add_new = Void Function(Pointer label); typedef account_set_label = Void Function( Int32 accountIndex, Pointer label); typedef transactions_refresh = Void Function(); typedef get_tx_key = Pointer Function(Pointer txId); typedef transactions_count = Int64 Function(); typedef transactions_get_all = Pointer Function(); typedef transaction_create = Int8 Function( Pointer address, Pointer assetType, Pointer paymentId, Pointer amount, Int8 priorityRaw, Int32 subaddrAccount, Pointer error, Pointer pendingTransaction); typedef transaction_create_mult_dest = Int8 Function( Pointer> addresses, Pointer assetType, Pointer paymentId, Pointer> amounts, Int32 size, Int8 priorityRaw, Int32 subaddrAccount, Pointer error, Pointer pendingTransaction); typedef transaction_commit = Int8 Function(Pointer, Pointer); typedef secret_view_key = Pointer Function(); typedef public_view_key = Pointer Function(); typedef secret_spend_key = Pointer Function(); typedef public_spend_key = Pointer Function(); typedef close_current_wallet = Void Function(); typedef on_startup = Void Function(); typedef rescan_blockchain = Void Function(); typedef asset_types = Pointer> Function(); typedef asset_types_size = Int32 Function(); typedef get_rate = Pointer Function(); typedef size_of_rate = Int32 Function(); typedef update_rate = Void Function();