textileio / go-textile

[DEPRECATED] Textile is a set of tools and infrastructure for building composable apps and services on the IPFS network
https://textile.io
MIT License
357 stars 43 forks source link

Use base repo and account seed in cli #904

Closed asutula closed 4 years ago

asutula commented 4 years ago

Gets the CLI in line with how the programatic API deals with repo locations:

asutula commented 4 years ago

Added a little optimization where, if you there are multiple account initialized in the base repo location and you don't specify an account seed, it fails and tells you to provide an account seed. So, the only time you can omit account seed is when there is only one account initialized.

asutula commented 4 years ago

Ok @sanderpick re: lock file... what do you think the lock file will be used for?

asutula commented 4 years ago

To update the original PR description with the current state of affairs:

sanderpick commented 4 years ago

A file (not really a lock file)... would be handy under the base repo to determine which repo is "active" / logged in to. This way you wouldn't have to always specify account address when starting the node, which requires that state to be kept somewhere (in my 1pass or in the containing app, for example). You could just write the account address into this file.

asutula commented 4 years ago

Ok I understand the idea. Would that state be updated any time you do specify an account address to daemon and/or migrate?

It's not really blocking this current work, so maybe I'll add this now, but maybe save it for another PR?

sanderpick commented 4 years ago

yeah, specifying the address would mean "change account". agreed, not blocking this one...