mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-25 04:59:33 +00:00
5eabdcdca1
* CW-503 Prepare Ledger integration * CW-503 Revert Tor ignore * CW-503 Add Connect Device Page * CW-503 Add createWalletFromDevice for monero * CW-503 Add Connect Device Page * CW-503 Add Connect Device Page * CW-503 Add Debug Options * CW-503 Add proper hardware wallet selection screen * CW-503 Minor design changes on connect_device_page * CW-503 Add Create Wallet from Ledger * CW-503 Spent Ledger ETH Funds * CW-503 Minor fixes * CW-503 Fix Merge conflicts * CW-503 Fix Merge conflicts * CW-503 Fix Merge conflicts * CW-503 Fix minor conflicts * CW-503 Improve Ledger BLE Communication * CW-503 Improve Ledger BLE Communication * CW-503 Rollback Monero Test code * CW-503 Fix Execution failed for task :app:checkReleaseDuplicateClasses * CW-503 Better Error-Exceptions * CW-503 Add SetPinScreen before restore from hardware-wallet * CW-503 override web3dart to use cake's git hosted version * CW-503 Implement ledger sign messages * CW-503 Implement ledger sign messages and send erc20 tokens * CW-503 Fix merge conflicts * CW-503 Fix merge conflicts * CW-503 Use dep override for ledger_flutter * CW-503 Ledger ERC20 finalisation * CW-503 More graceful error handling * CW-503 Even more graceful error handling & remove debug code * CW-503 Minor Changes for Vik * CW-503 Fix USB connection * CW-503 Maybe this overrides web3dart finally * Indicate Loading on the first 5 Wallet Accounts * Prepare Ledger Bitcoin * Fix conflicts with main * Add Bluetooth permission to iOS [skip ci] * add privacyinfo for ios [skip ci] * update PrivacyInfo.xcprivacy [scip ci] * ios shit [skip ci] * Improve bitcoin xpub * Resolve open Todos regarding iOS Support * Minor debug * Remove erc20 dependency to have more granular control over the tx UX * Create Bitcoin Wallets using xpub * Create Bitcoin Wallets using xpub * Better error handling * Improve Ledger account handling * Add Bitcoin Support for Ledger * Add Bitcoin Support for Ledger * Add Bitcoin Support for Ledger * Implement requested Changes * Implement requested Changes * Minor fix * Implement requested Changes * Implement requested Changes * Add comment to remind me * Enable RBF for Bitcoin Ledger * Fix merge conflicts * Update wallet_info.dart * Cw 503 ledger support (#1310) * CW-503 Prepare Ledger integration * CW-503 Revert Tor ignore * CW-503 Add Connect Device Page * CW-503 Add createWalletFromDevice for monero * CW-503 Add Connect Device Page * CW-503 Add Connect Device Page * CW-503 Add Debug Options * CW-503 Add proper hardware wallet selection screen * CW-503 Minor design changes on connect_device_page * CW-503 Add Create Wallet from Ledger * CW-503 Spent Ledger ETH Funds * CW-503 Minor fixes * CW-503 Fix Merge conflicts * CW-503 Fix Merge conflicts * CW-503 Fix Merge conflicts * CW-503 Fix minor conflicts * CW-503 Improve Ledger BLE Communication * CW-503 Improve Ledger BLE Communication * CW-503 Rollback Monero Test code * CW-503 Fix Execution failed for task :app:checkReleaseDuplicateClasses * CW-503 Better Error-Exceptions * CW-503 Add SetPinScreen before restore from hardware-wallet * CW-503 override web3dart to use cake's git hosted version * CW-503 Implement ledger sign messages * CW-503 Implement ledger sign messages and send erc20 tokens * CW-503 Fix merge conflicts * CW-503 Fix merge conflicts * CW-503 Use dep override for ledger_flutter * CW-503 Ledger ERC20 finalisation * CW-503 More graceful error handling * CW-503 Even more graceful error handling & remove debug code * CW-503 Minor Changes for Vik * CW-503 Fix USB connection * CW-503 Maybe this overrides web3dart finally * Indicate Loading on the first 5 Wallet Accounts * Fix conflicts with main * Add Bluetooth permission to iOS [skip ci] * add privacyinfo for ios [skip ci] * update PrivacyInfo.xcprivacy [scip ci] * ios shit [skip ci] * Resolve open Todos regarding iOS Support * Remove erc20 dependency to have more granular control over the tx UX * Better error handling * Improve Ledger account handling * Implement requested Changes * Implement requested Changes * Implement requested Changes * Implement requested Changes * Fix merge conflicts * Update wallet_info.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com> * Fix merge conflicts * Fix merge conflicts * Minor Fix to derivations * Update cw_bitcoin/lib/bitcoin_wallet.dart [skip ci] * Update cw_bitcoin/lib/bitcoin_wallet.dart [skip ci] * Update cw_bitcoin/lib/electrum_wallet.dart [skip ci] * Fix backward compatibility issues * Merge Tron * Fix Tron with HW changes * fix ble on iOS fix tron address validation --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
156 lines
4.9 KiB
Dart
156 lines
4.9 KiB
Dart
import 'dart:ffi';
|
|
import 'package:cw_monero/api/structs/coins_info_row.dart';
|
|
import 'package:cw_monero/api/structs/pending_transaction.dart';
|
|
import 'package:cw_monero/api/structs/transaction_info_row.dart';
|
|
import 'package:cw_monero/api/structs/ut8_box.dart';
|
|
import 'package:ffi/ffi.dart';
|
|
|
|
typedef create_wallet = Int8 Function(
|
|
Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>, Int32, Pointer<Utf8>);
|
|
|
|
typedef restore_wallet_from_seed = Int8 Function(
|
|
Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>, Int32, Int64, Pointer<Utf8>);
|
|
|
|
typedef restore_wallet_from_keys = Int8 Function(Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>,
|
|
Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>, Int32, Int64, Pointer<Utf8>);
|
|
|
|
typedef restore_wallet_from_spend_key = Int8 Function(Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>,
|
|
Pointer<Utf8>, Pointer<Utf8>, Int32, Int64, Pointer<Utf8>);
|
|
|
|
// typedef restore_wallet_from_device = Int8 Function(Pointer<Utf8>, Pointer<Utf8>, Pointer<Utf8>,
|
|
// Int32, Int64, Pointer<Utf8>);
|
|
|
|
typedef is_wallet_exist = Int8 Function(Pointer<Utf8>);
|
|
|
|
typedef load_wallet = Int8 Function(Pointer<Utf8>, Pointer<Utf8>, Int8);
|
|
|
|
typedef error_string = Pointer<Utf8> Function();
|
|
|
|
typedef get_filename = Pointer<Utf8> Function();
|
|
|
|
typedef get_seed = Pointer<Utf8> Function();
|
|
|
|
typedef get_address = Pointer<Utf8> Function(Int32, 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<Utf8>, Pointer<Utf8>?, Pointer<Utf8>?, Int8, Int8, Pointer<Utf8>?, Pointer<Utf8>);
|
|
|
|
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<Utf8>);
|
|
|
|
typedef set_password = Int8 Function(Pointer<Utf8> password, Pointer<Utf8Box> error);
|
|
|
|
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<Int64> Function();
|
|
|
|
typedef subaddress_add_new = Void Function(Int32 accountIndex, Pointer<Utf8> label);
|
|
|
|
typedef subaddress_set_label = Void Function(
|
|
Int32 accountIndex, Int32 addressIndex, Pointer<Utf8> label);
|
|
|
|
typedef account_size = Int32 Function();
|
|
|
|
typedef account_refresh = Void Function();
|
|
|
|
typedef account_get_all = Pointer<Int64> Function();
|
|
|
|
typedef account_add_new = Void Function(Pointer<Utf8> label);
|
|
|
|
typedef account_set_label = Void Function(Int32 accountIndex, Pointer<Utf8> label);
|
|
|
|
typedef transactions_refresh = Void Function();
|
|
|
|
typedef get_transaction = Pointer<TransactionInfoRow> Function(Pointer<Utf8> txId);
|
|
|
|
typedef get_tx_key = Pointer<Utf8>? Function(Pointer<Utf8> txId);
|
|
|
|
typedef transactions_count = Int64 Function();
|
|
|
|
typedef transactions_get_all = Pointer<Int64> Function();
|
|
|
|
typedef transaction_create = Int8 Function(
|
|
Pointer<Utf8> address,
|
|
Pointer<Utf8> paymentId,
|
|
Pointer<Utf8> amount,
|
|
Int8 priorityRaw,
|
|
Int32 subaddrAccount,
|
|
Pointer<Pointer<Utf8>> preferredInputs,
|
|
Int32 preferredInputsSize,
|
|
Pointer<Utf8Box> error,
|
|
Pointer<PendingTransactionRaw> pendingTransaction);
|
|
|
|
typedef transaction_create_mult_dest = Int8 Function(
|
|
Pointer<Pointer<Utf8>> addresses,
|
|
Pointer<Utf8> paymentId,
|
|
Pointer<Pointer<Utf8>> amounts,
|
|
Int32 size,
|
|
Int8 priorityRaw,
|
|
Int32 subaddrAccount,
|
|
Pointer<Pointer<Utf8>> preferredInputs,
|
|
Int32 preferredInputsSize,
|
|
Pointer<Utf8Box> error,
|
|
Pointer<PendingTransactionRaw> pendingTransaction);
|
|
|
|
typedef transaction_commit = Int8 Function(Pointer<PendingTransactionRaw>, Pointer<Utf8Box>);
|
|
|
|
typedef secret_view_key = Pointer<Utf8> Function();
|
|
|
|
typedef public_view_key = Pointer<Utf8> Function();
|
|
|
|
typedef secret_spend_key = Pointer<Utf8> Function();
|
|
|
|
typedef public_spend_key = Pointer<Utf8> Function();
|
|
|
|
typedef close_current_wallet = Void Function();
|
|
|
|
typedef on_startup = Void Function();
|
|
|
|
typedef rescan_blockchain = Void Function();
|
|
|
|
typedef get_subaddress_label = Pointer<Utf8> Function(Int32 accountIndex, Int32 addressIndex);
|
|
|
|
typedef set_trusted_daemon = Void Function(Int8 trusted);
|
|
|
|
typedef trusted_daemon = Int8 Function();
|
|
|
|
typedef refresh_coins = Void Function(Int32 accountIndex);
|
|
|
|
typedef coins_count = Int64 Function();
|
|
|
|
// typedef coins_from_txid = Pointer<CoinsInfoRow> Function(Pointer<Utf8> txid);
|
|
|
|
typedef coin = Pointer<CoinsInfoRow> Function(Int32 index);
|
|
|
|
typedef freeze_coin = Void Function(Int32 index);
|
|
|
|
typedef thaw_coin = Void Function(Int32 index);
|
|
|
|
typedef sign_message = Pointer<Utf8> Function(Pointer<Utf8> message, Pointer<Utf8> address);
|