refactor: store id as bytes #95

Merged
thesimplekid merged 1 commit from id_as_bytes into main 2024-04-26 06:59:06 +00:00
thesimplekid commented 2024-04-22 21:32:19 +00:00 (Migrated from github.com)
No description provided.
davidcaseria (Migrated from github.com) reviewed 2024-04-24 22:31:08 +00:00
@ -17,12 +18,16 @@ use crate::nuts::nut00::CurrencyUnit;
use crate::util::hex;
davidcaseria (Migrated from github.com) commented 2024-04-24 22:29:48 +00:00

Is there any scenario where KeySetVersion would be multiple bytes? It seems like that would be a breaking incompatible change down the line.

Is there any scenario where KeySetVersion would be multiple bytes? It seems like that would be a breaking incompatible change down the line.
thesimplekid (Migrated from github.com) reviewed 2024-04-24 22:39:35 +00:00
@ -17,12 +18,16 @@ use crate::nuts::nut00::CurrencyUnit;
use crate::util::hex;
thesimplekid (Migrated from github.com) commented 2024-04-24 22:39:35 +00:00

It is defined in NUT-02 as a version byte. So could change to to_byte(&self) -> u8?

### Keyset ID version

Keyset IDs have a version byte (two hexadecimal characters). The currently used version byte is `00`
It is defined in [NUT-02](https://github.com/cashubtc/nuts/blob/main/02.md) as a version byte. So could change to `to_byte(&self) -> u8`? ``` ### Keyset ID version Keyset IDs have a version byte (two hexadecimal characters). The currently used version byte is `00` ```
davidcaseria (Migrated from github.com) reviewed 2024-04-24 23:35:19 +00:00
@ -17,12 +18,16 @@ use crate::nuts::nut00::CurrencyUnit;
use crate::util::hex;
davidcaseria (Migrated from github.com) commented 2024-04-24 23:35:19 +00:00

Yes, I think returning (and parsing) a single byte makes more sense.

Yes, I think returning (and parsing) a single byte makes more sense.
davidcaseria (Migrated from github.com) approved these changes 2024-04-25 13:17:56 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cashubtc/cdk!95
No description provided.