dxid
btcutil
dxid | btcutil | |
---|---|---|
2 | 2 | |
7 | 476 | |
- | 0.8% | |
6.6 | 0.0 | |
about 1 month ago | 11 months ago | |
JavaScript | Go | |
MIT License | ISC License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
dxid
-
You Don't Need UUID
you might want to consider an alternative with a base32 encoding with a luhn checksum
https://github.com/tttp/dxid
- Show HN: Display primary keys the way humans and developers prefer
btcutil
-
You Don't Need UUID
Your IDs are []byte of len=11. Those bytes can be represented in many ways.
You can represent them as hex strings via encoding/hex.EncodeToString(id), or base64 strings via encoding/base64.StdEncoding.EncodeToString(id), or base32 strings via encoding/base32.StdEncoding.EncodeToString(id), or etc.
Looks like the most used base58 package is https://pkg.go.dev/github.com/btcsuite/btcutil/base58, but looking at the implementation [0] I'm not impressed, and confident there's a better implementation
[0] https://github.com/btcsuite/btcutil/blob/v1.0.2/base58/base5...
But how you encode 11 bytes of data is kind of orthogonal to the important thing, which is that you have 11 bytes of data. They should be always be store in memory (in your application, or a DB, or anything else) as the actual 11 bytes of the ID, and not as a base58 or base64 or JSON or whatever other kind of string that can be decoded to the actual 11 bytes of data.
Likewise, a UUID shouldn't be stored as a string like "64d3f2e0-a4dc-48d3-98ad-7f09eb3b082f", that's a specific encoding of the actual 16 UUID bytes, you should store, process, etc. those bytes directly.
-
Algorithm to get address?
Golang: https://github.com/btcsuite/btcutil
What are some alternatives?
cuid2 - Next generation guids. Secure, collision-resistant ids optimized for horizontal scaling and performance.
dogecoin - very currency
spec - The canonical spec for ulid
nanoid - A tiny (124 bytes), secure, URL-friendly, unique string ID generator for JavaScript
e16957bf-7d7f-41f1-97f4-98c93a6c3540
bip39 - A web tool for converting BIP39 mnemonic codes
keripy - Key Event Receipt Infrastructure - the spec and implementation of the KERI protocol
bitcoin-ruby - bitcoin utils and protocol in ruby.
typeid - Type-safe, K-sortable, globally unique identifier inspired by Stripe IDs
ksuid - K-Sortable Globally Unique IDs