SiaFoundation / walletd

A new Sia wallet
https://sia.tech/software/walletd
MIT License
14 stars 6 forks source link

API Restructure #54

Closed n8maninger closed 5 months ago

n8maninger commented 5 months ago
lukechampine commented 5 months ago

Good stuff. What's the motivation for names->IDs, especially int64? Is it a sqlite thing?

n8maninger commented 5 months ago

Good stuff. What's the motivation for names->IDs, especially int64? Is it a sqlite thing?

name -> ID makes it possible to later change the name and keep the other wallet data consistent. The UI currently generates a UUID as the name and adds an additional friendlyName to metadata. This enforces that flow for all consumers.

I don’t really have a preference on the type. Int64 is easy and supported by every db I’m aware of. We could also use a UUID or frand.Entry128().String(). As long as it’s unique and set by walletd

lukechampine commented 5 months ago

Ok. Let's at least define a distinct WalletID type for it.