Closed chris124567 closed 2 years ago
my preference would be a /wallet/fund
endpoint, like in renterd
. It's a bit more work for the client, but much more flexible.
Do we want to keep /wallet/siacoins? I guess the question is how backwards compatible do we want to be with the v1 API.
hmm. I guess I do think we'll want a route like /wallet/siacoins
-- not for backwards compatibility, but simply because it's a common operation, and calling one route is much more convenient than calling /wallet/fund
, /wallet/sign
, /txpool/broadcast
.
Broadly speaking, my position on "high-level" routes like this is that:
In other words, they should be like bash aliases. :)
(Let's call it /wallet/send
, though, so that it can be used for either SC or SF)
Took a crack at it. It's a little complicated because you still have to fund the fee in SC even if you're sending SF.
Merging the FundTransactionSiacoins and FundTransactionSiafunds into one function made a lot of things much more simple :+1:
nice
Add /wallet/transaction and /wallet/siacoins in accordance with the specification laid out at https://api.sia.tech/.