Closed jenlij closed 2 years ago
@dlamarmorgan > Great start to storing the HD Wallets! I do think the layout of the HD struct is a bit confusing with the hd_test object containing the wallet, but it seems like the name may still be temporary?
Essentially I wanted a way to create the endpoint and service to make it easy to generate a bunch of test deposit addresses and fill the db without having to create them offline then import them, as we will in production. Definitely open to other designs!
add 2 columns: api key, unique id (derivation path or otherwise)
we should store the address as a string(checksum mixed case hex) in DB and accept it as a string on endpoints.
claim then return address in db to avoid race conditions
moved to gerrit https://review.dev.storj.io/c/storj/storjscan/+/7115
Notes: Since the terms "wallet" and "account" are colloquially interchangeable, are my variable names confusing? Should account address be stored and used as a []byte or hex string type? Are there any methods or tests we might need to add? I can add more tests to cover more errors. Also, I will need to add an integration test with the eth network to ensure correct account generation.