An Explanation of Safex/TWM Wallet Files

This article will briefly explain the necessity and function of each of the Safex wallet files, plus highlight the importance of the <walletname>.twm file, as used by the Safex TWM Wallet.

An Explanation of Safex/TWM Wallet Files

This article will briefly explain the necessity and function of each of the Safex wallet files, plus highlight the importance of the <walletname>.twm file, as used by the Safex TWM Wallet.

To provide an understanding of the importance of the .twm file, let’s first give some background information on Safex Wallet files generally.

The software releases for the Safex Blockchain includes the node/daemon/safexd software, and a cli [command line interface] wallet.

When you create a wallet within the cli wallet, it creates two basic files:

  • <walletname> the data file - it contains a record of the synced block height and IN/OUT transaction records, resulting in your balances for SFT and SFX
  • <walletname>.keys a file containing a copy of your Safex Private Spend and View keys, protected (encrypted) by the password you chose during wallet creation/restore.

You can also create merchant accounts within the cli wallet, and once you have created the first, an additional file appears:

  • <walletname>.safex_account_keys

Within the native Safexcore wallet, there is no messaging system or person-to-person (P2P) communications function.

This is why, with the development of the Safex TWM Wallet, additional functionality was added at the wallet level, to allow direct messaging between Merchants and Shoppers.

When you Create New Wallet with the TWM Wallet software, there are three files created:

  • <walletname>
  • <walletname>.keys
  • <walletname>.twm

The .twm file is used to store private encrypted (RSA-4096) messages between Shoppers and Merchants, for each item purchased via the TWM Wallet. When a Shopper buys a product, an encrypted P2P channel is created using PGP keys for the Shopper and the Merchant.

Important Notice for Old Wallet Holders

Prior to the release of the TWM Wallet, members of the Safex community could use either the cli wallet or the (now obsolete) Orbiter wallet to create a Safex wallet. Those old Safex Blockchain users will need to Restore from Keys/Mnemonic Seed to use their old Safex wallet address/es in the TWM Wallet.

However, when you Restore a wallet address in the TWM Wallet, only the two basic wallet files get created automatically. Once the wallet has synced, users can immediately send SFT/SFX and Stake/Unstake.  

But, to use the Market tab of the wallet, buy products and communicate directly with Merchants, users need to first close the wallet, then open it again using Open Existing, at which point they will receive the following popup message:

It is absolutely imperative that users click the OK button here, and allow the <walletname>.twm file to be created.

Users will now have a fully functional Safex TWM Wallet.

Troubleshooting the TWM Wallet

If a user closes their TWM Wallet while the wallet software is performing certain write functions in the background, they may find that the next time they go to open their wallet, they strike an error, and will see another wallet file has been created: <walletname>.unportable.

(The author has not come across this issue personally, as it’s a rare occurrence.)

In the event this happens to you, you can normally resolve it by deleting the .unportable file, opening the wallet, and then doing a Hard Rescan.

If you delete the .unportable file and the wallet still refuses to open, then also delete the <walletname> data file. At this point, you can open the wallet by selecting the .keys file as per normal, and the TWM wallet software will see there’s no <walletname> data file and simply create a new one, then rebuild it automatically, immediately doing a full Rescan to sync the wallet.

In all instances of Restores/Rescans, users should allow at least an hour for their balances to appear, depending on the PC and internet speeds, their geographic location, and the node (Daemon Host) to which they connected.

Read more about Safex Wallet.