cake_wallet/cw_monero/lib/api/coins_info.dart

18 lines
509 B
Dart
Raw Normal View History

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