Skip to content
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.

Rune Metadata #36

Closed
casey opened this issue Oct 6, 2023 · 1 comment · Fixed by ordinals/ord#2527
Closed

Rune Metadata #36

casey opened this issue Oct 6, 2023 · 1 comment · Fixed by ordinals/ord#2527

Comments

@casey
Copy link
Owner

casey commented Oct 6, 2023

Currently, rune metadata consists of the rune itself, and its divisibility. Divisibility is encoded as a 128 bit integer, but only 6 bits are needed since ceil(log2(len(str((1 << 128 - 1))))) == 6.

That leaves 122 unused bits. We should do something fun with them. I propose:

  • Foreground color: 12 bits
  • Background color: 12 bits
  • Currency symbol: 17 bits
  • Logo: 81 bits

Colors are 4 bits for red, green, and blue, and can be expressed as three-digit hex colors, e.g., #FFF for white.

Foreground and background color can be used on /rune pages. Probably not as background and foreground colors for the page, since that might be completely illegible, but we can use it for something else.

The currency symbol is a unicode symbol, like $, for displaying balances. 17 bits cover the Basic Multilingual Plane and the Supplementary Multilingual Plane, which max out at 0x1FFFF.

The logo is a 9x9 pixel bitmap, where on bits are the foreground color, and off bits are the background color.

@casey
Copy link
Owner Author

casey commented Oct 15, 2023

Foreground color and background color kind of introduce the myspace problem. They can be ugly, illegible, and if used substantially will make rune pages look different from each other. Runes can now have an inscription, which can be the visual identity of the rune, so the logo isn't necessary. However I did add a currency symbol to runes.

@casey casey linked a pull request Oct 15, 2023 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant