4

Is there a good way to make a wallet a cold wallet after setting the inflation destination? That is, if I have a wallet and set the inflation destination to a pool so I will accumulate inflation, can I still make that wallet "cold"?

5

Just create a paper wallet (paper, pendrive, ledger nano, etc), add some funds, set inflation destination and that's it. Even if you don't touch your account for years inflation will get to the ledger and increase your balance.

function setInflation(secretKey, destination, memo='Inflation') {
    var serverUrl = 'https://horizon.stellar.org';
    var server    = new StellarSdk.Server(serverUrl);
    var account   = StellarSdk.Keypair.fromSecret(secretKey);

    server.loadAccount(account.publicKey()).then(function(sourceAccount) {
        var operation   = StellarSdk.Operation.setOptions({inflationDest: destination});
        var transaction = new StellarSdk.TransactionBuilder(sourceAccount)
            .addOperation(operation)
            .addMemo(StellarSdk.Memo.text(memo))
            .build();
        transaction.sign(account);
        server.submitTransaction(transaction);
    });
}
| improve this answer | |
  • So how do you set the inflation destination for a paper wallet? My best guess is you need to set up a connected account, set the inflation destination, and then print the key/password combo and delete the account from the connected wallet. Or is there a way to set the inflation destination without having the wallet online? – JCTJ Jan 31 '18 at 2:27
  • 1
    Nevermind - found the answer re: setting inflation destination on a cold wallet here: stellar.stackexchange.com/questions/38/… SO - I am accepting this answer with the additional description on how to set the inflation destination. Thank you! – JCTJ Jan 31 '18 at 2:30
  • Added some JS code for reference – Kuyawa Jan 31 '18 at 12:32
6

Stellar doesn't have such concept as "cold" wallet. Once your wallet is created and funded, the public key and current balance are recorded on the ledger. If your private key securely stored somewhere (encrypted flash-drive or hardware wallet like Ledger Nano S), you shouldn't worry about the funds.

In order to enhance your account security, you can add one more signer and set all account thresholds to 2. In that way only those persons who have both private keys can authorize a transaction. However, multi-sig is not supported by most wallets so far, and if you choose this option you'll have to dive deeper into the Stellar docs and use Stellar Laboratory instead of a wallet with fancy interface.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.