monero-project/monero

Offline wallet is considered as "Hot"

dev-warrior777 opened this issue · 6 comments

I am following https://monero.stackexchange.com/questions/2868/is-there-any-way-to-construct-a-transaction-manually sequence. Can successfully export outputs from a view only wallet using monero-wallet-cli but cannot import into an offline wallet with the unexpected error:
Error: Failed to import outputs view.outputs: Failed to import outputs: Hot wallets cannot import outputs

================================
Hot View only wallet
================================

$ ./monero-wallet-cli --daemon-address 127.0.0.1:18081  --wallet-file /home/dev/dextest/xmr/wallets/tx_builder_view/tx_builder_view  --allow-mismatched-daemon-version --log-level 2
This is the command line monero wallet. It needs to connect to a monero
daemon to work correctly.
WARNING: Do not reuse your Monero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy.

Monero 'Fluorine Fermi' (v0.18.3.3-release)
Logging to ./monero-wallet-cli.log
Wallet password: 
Opened watch-only wallet: 46MdM2AoFHz8wAkRgBvjpBe6zmDaUTXqDEHU7SxpJjvULydszNoHLdn4qzCRjRzmEL3dBStqjFFkb1P31vBbVe5KEDzh6LV
**********************************************************************
Use the "help" command to see a simplified list of available commands.
Use "help all" to see the list of all available commands.
Use "help <command>" to see a command's documentation.
**********************************************************************
The daemon is not set up to background mine.
With background mining enabled, the daemon will mine when idle and not on battery.
Enabling this supports the network you are using, and makes you eligible for receiving new monero
Do you want to do it now? (Y/Yes/N/No): : n
Background mining not enabled. Set setup-background-mining to 1 to change.
Starting refresh...
Refresh done, blocks received: 0                                
Untagged accounts:
          Account               Balance      Unlocked balance                 Label
 *       0 46MdM2       84.000000000000       84.000000000000       Primary account
------------------------------------------------------------------------------------
          Total         84.000000000000       84.000000000000
Currently selected account: [0] Primary account
Tag: (No tag assigned)
Balance: 84.000000000000, unlocked balance: 84.000000000000 (Some owned outputs have missing key images - export_outputs, import_outputs, export_key_images, and import_key_images needed)
Background refresh thread started
[wallet 46MdM2]: export_outputs view.outputs
Wallet password: 
Outputs exported to view.outputs

[wallet 46MdM2]: exit

================================
Cold wallet
================================

$ ./monero-wallet-cli --offline  --wallet-file /home/dev/dextest/xmr/wallets/tx_builder/tx_builder  --allow-mismatched-daemon-version --log-level 2
This is the command line monero wallet. It needs to connect to a monero
daemon to work correctly.
WARNING: Do not reuse your Monero keys on another fork, UNLESS this fork has key reuse mitigations built in. Doing so will harm your privacy.

Monero 'Fluorine Fermi' (v0.18.3.3-release)
Logging to ./monero-wallet-cli.log
Wallet password: 
Opened wallet: 46MdM2AoFHz8wAkRgBvjpBe6zmDaUTXqDEHU7SxpJjvULydszNoHLdn4qzCRjRzmEL3dBStqjFFkb1P31vBbVe5KEDzh6LV
**********************************************************************
Use the "help" command to see a simplified list of available commands.
Use "help all" to see the list of all available commands.
Use "help <command>" to see a command's documentation.
**********************************************************************
Background mining not enabled. Run "set setup-background-mining 1" to change.
Error: wallet failed to connect to daemon, because it is set to *offline* mode
Background refresh thread started
[wallet 46MdM2 (no daemon)]: import_outputs view.outputs
Wallet password: 
Error: Failed to import outputs view.outputs: Failed to import outputs: Hot wallets cannot import outputs
[wallet 46MdM2 (no daemon)]: exit

================================



This message means this wallet has been previously synced with an online node before. You have to create a separate file for the cold wallet that never touches a node.

Is there an easy way to do that given x.wallet and x.wallet.keys?

generate-from-keys perhaps

Yes, generate-from-keys or seed should work but the whole idea is that the offline wallet gets generated on an offline system, so what you are doing is more of a workaround.

ok understand, thanks for help