diff options
| author | cyan <cyjan@mrcyjanek.net> | 2025-04-21 10:45:11 +0000 |
|---|---|---|
| committer | cyan <cyjan@mrcyjanek.net> | 2025-04-21 10:45:11 +0000 |
| commit | b335585a7fb94b315eb52bd88f2da6d3489fa508 (patch) | |
| tree | 6d97124eeb0b80b6dbb369a696b405877b960bd2 /impls/monero.dart | |
| parent | 24cce8f2cff643f8dcdd4740c529e1ac066dd717 (diff) | |
add wallet close functionoo-monerodart
Diffstat (limited to 'impls/monero.dart')
| -rw-r--r-- | impls/monero.dart/lib/src/monero.dart | 5 | ||||
| -rw-r--r-- | impls/monero.dart/lib/src/wallet2.dart | 1 | ||||
| -rw-r--r-- | impls/monero.dart/lib/src/wownero.dart | 5 |
3 files changed, 11 insertions, 0 deletions
diff --git a/impls/monero.dart/lib/src/monero.dart b/impls/monero.dart/lib/src/monero.dart index 5d71b26..b2eb8c7 100644 --- a/impls/monero.dart/lib/src/monero.dart +++ b/impls/monero.dart/lib/src/monero.dart @@ -1655,6 +1655,11 @@ class MoneroWalletManager implements Wallet2WalletManager { @override int ffiAddress() => wmPtr.address; + + @override + void closeWallet(Wallet2Wallet wallet, bool store) { + monero.WalletManager_closeWallet(wmPtr, Pointer.fromAddress(wallet.ffiAddress()), store); + } } class MoneroWalletManagerFactory implements Wallet2WalletManagerFactory { diff --git a/impls/monero.dart/lib/src/wallet2.dart b/impls/monero.dart/lib/src/wallet2.dart index 3c58949..2c07548 100644 --- a/impls/monero.dart/lib/src/wallet2.dart +++ b/impls/monero.dart/lib/src/wallet2.dart @@ -382,6 +382,7 @@ abstract class Wallet2WalletManager { Wallet2Wallet createWallet({ required String path, required String password, String language = "English", int networkType = 0, }); Wallet2Wallet openWallet({ required String path, required String password, int networkType = 0, }); + void closeWallet(Wallet2Wallet wallet, bool store); Wallet2Wallet recoveryWallet({ required String path, required String password, required String mnemonic, int networkType = 0, required int restoreHeight, int kdfRounds = 0, required String seedOffset, }); Wallet2Wallet createWalletFromKeys({ required String path, required String password, String language = "English", int nettype = 1, required int restoreHeight, required String addressString, required String viewKeyString, required String spendKeyString, int kdf_rounds = 1, }); Wallet2Wallet createDeterministicWalletFromSpendKey({ required String path, required String password, String language = "English", int networkType = 0, required String spendKeyString, required bool newWallet, required int restoreHeight, int kdfRounds = 1, }); diff --git a/impls/monero.dart/lib/src/wownero.dart b/impls/monero.dart/lib/src/wownero.dart index cd16f9b..c1ef9eb 100644 --- a/impls/monero.dart/lib/src/wownero.dart +++ b/impls/monero.dart/lib/src/wownero.dart @@ -1649,6 +1649,11 @@ class WowneroWalletManager implements Wallet2WalletManager { bool walletExists(String path) { return wownero.WalletManager_walletExists(wmPtr, path); } + + @override + void closeWallet(Wallet2Wallet wallet, bool store) { + wownero.WalletManager_closeWallet(wmPtr, Pointer.fromAddress(wallet.ffiAddress()), store); + } @override int ffiAddress() => wmPtr.address; |
