2024-04-10 12:27:10 +00:00
|
|
|
import 'package:cw_monero/api/account_list.dart';
|
|
|
|
import 'package:monero/monero.dart' as monero;
|
2023-08-24 13:54:05 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
monero.Coins? coins = null;
|
2023-08-24 13:54:05 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
void refreshCoins(int accountIndex) {
|
|
|
|
coins = monero.Wallet_coins(wptr!);
|
|
|
|
monero.Coins_refresh(coins!);
|
|
|
|
}
|
2023-08-24 13:54:05 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
int countOfCoins() => monero.Coins_count(coins!);
|
2023-08-24 13:54:05 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
monero.CoinsInfo getCoin(int index) => monero.Coins_coin(coins!, index);
|
2023-11-15 23:12:23 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
void freezeCoin(int index) => monero.Coins_setFrozen(coins!, index: index);
|
2023-11-15 23:12:23 +00:00
|
|
|
|
2024-04-10 12:27:10 +00:00
|
|
|
void thawCoin(int index) => monero.Coins_thaw(coins!, index: index);
|