Skip to content

Add automatic non-interactive wallet unlock command

Christopher Schinnerl requested to merge rudibs:master into master

Created by: rudibs

Wallet unlock with SIA_WALLET_PASSWORD environment variable non-interactively

Addresses trello public road map feature

https://trello.com/c/yRFaIgLb/65-enable-the-wallet-to-unlock-at-startup-without-user-intervention-advanced-less-secure-feature-primarily-for-hosts

see transcript below

➜ 001 cat typescript.txt

Usage: ./siac wallet [flags] ./siac wallet [command]

Available Commands: address Get a new wallet address addresses List all addresses autounlock Automatically (non interactively) unlock the wallet balance View wallet balance change-password Change the wallet password init Initialize and encrypt a new wallet init-seed Initialize and encrypt a new wallet using a pre-existing seed load Load a wallet seed, v0.3.3.x wallet, or siag keyset lock Lock the wallet seeds View information about your seeds send Send either siacoins or siafunds to an address sweep Sweep siacoins and siafunds from a seed. transactions View transactions unlock Unlock the wallet

Flags: -h, --help help for wallet

Global Flags: -a, --addr string which host/port to communicate with (i.e. the host/port siad is listening on) (default "localhost:9980")

Use "./siac wallet [command] --help" for more information about a command. ➜ siac git:(master) ✗ ./siac wallet autounlock SIA_WALLET_PASSWORD not set ➜ siac git:(master) ✗ SIA_WALLET_PASSWORD="abc" ./siac wallet autounlock Could not unlock wallet: error when calling /wallet/unlock: provided encryption key is incorrect ➜ siac git:(master) ✗ SIA_WALLET_PASSWORD="boil envy pram jogger sidekick bakery sunken gown mayor necklace navy certain noted bygones tidy zebra ongoing laboratory fierce duplex password changed for security reasons but environment variable good for docker" ./siac wallet autounlock Wallet unlocked ➜ siac git:(master) ✗

Merge request reports