Пример #1
0
        public void save(Common.IOutputStream destination, WalletSaveLevel saveLevel)
        {
            CryptoNote.BinaryOutputStreamSerializer s = new CryptoNote.BinaryOutputStreamSerializer(destination);

            byte saveLevelValue = (byte)saveLevel;

            s.functorMethod(saveLevelValue, "saveLevel");

            saveKeyListAndBalances(s.functorMethod, saveLevel == WalletSaveLevel.SAVE_ALL);

            if (saveLevel == WalletSaveLevel.SAVE_KEYS_AND_TRANSACTIONS || saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                saveTransactions(s.functorMethod);
                saveTransfers(s.functorMethod);
            }

            if (saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                saveTransfersSynchronizer(s.functorMethod);
                saveUnlockTransactionsJobs(s.functorMethod);
                s.functorMethod(m_uncommitedTransactions, "uncommitedTransactions");
            }

            s.functorMethod(m_extra, "extra");
        }
Пример #2
0
//C++ TO C# CONVERTER TODO TASK: The implementation of the following method could not be found:
//  WalletSerializerV2(ITransfersObserver transfersObserver, Crypto::PublicKey viewPublicKey, Crypto::SecretKey viewSecretKey, ref ulong actualBalance, ref ulong pendingBalance, WalletsContainer walletsContainer, TransfersSyncronizer synchronizer, UnlockTransactionJobs unlockTransactions, WalletTransactions transactions, WalletTransfers transfers, UncommitedTransactions uncommitedTransactions, string extra, uint transactionSoftLockTime);

        public void load(Common.IInputStream source, byte version)
        {
            CryptoNote.BinaryInputStreamSerializer s = new CryptoNote.BinaryInputStreamSerializer(source);

            byte saveLevelValue;

            s.functorMethod(saveLevelValue, "saveLevel");
            WalletSaveLevel saveLevel = (WalletSaveLevel)saveLevelValue;

            loadKeyListAndBalances(s.functorMethod, saveLevel == WalletSaveLevel.SAVE_ALL);

            if (saveLevel == WalletSaveLevel.SAVE_KEYS_AND_TRANSACTIONS || saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                loadTransactions(s.functorMethod);
                loadTransfers(s.functorMethod);
            }

            if (saveLevel == WalletSaveLevel.SAVE_ALL)
            {
                loadTransfersSynchronizer(s.functorMethod);
                loadUnlockTransactionsJobs(s.functorMethod);
                s.functorMethod(m_uncommitedTransactions, "uncommitedTransactions");
            }

            s.functorMethod(m_extra, "extra");
        }
Пример #3
0
 public abstract void exportWallet(string path, bool encrypt = true, WalletSaveLevel saveLevel        = WalletSaveLevel.SAVE_ALL, string extra = "");
Пример #4
0
 public abstract void save(WalletSaveLevel saveLevel         = WalletSaveLevel.SAVE_ALL, string extra = "");