Closed hsanjuan closed 3 years ago
I did not work on the initial implementation of Starling, so this is inherited from previous versions. Indeed, relying on the data already provided by the Lotus would would minimize the setup process. PR coming soon. Thanks!
@alexandrumatei36 I have realized that it also should prime LOTUS_PATH
over ~/.lotus
when defined.
I have not managed to get starling to work without defining
LOTUS_AUTH_TOKEN
andLOTUS_URL
.However, local installations of Lotus provide this information already in ~/.lotus/token and ~/.lotus/api. Additionally, Lotus itself recognize a
FULLNODE_API_INFO=<optional_token>:<url>
env variable which is used to customize the client to use a custom endpoint/token. It would be good if starling relied on these two things, since they are rather standard.The only gotcha is that lotus uses multiaddresses so, while
FULLNODE_API_INFO=ws://something..
works, it will be more common to seeFULLNODE_API_INFO=/ip4/<ip>/tcp/1234/http
. Same for ~/.lotus/api, it will be a multiaddress.These can be handled with ease using https://github.com/multiformats/js-multiaddr.