onenft.click

From one number to one knot

The only input is the Base block number. Nobody sets it and nobody can roll it back.

A day is the block number divided by 43,200, rounded down. At two seconds per block that is about a day. The boundary drifts against wall-clock time, because the chain is the clock.

The seed is the day run through splitmix64. From it you pull a stream of bits: eight bits pick the palette, then two bits for each of the 64 cells in an 8 by 8 grid.

Four cell states: two quarter-arcs in one of two orientations, a vertical pass, a horizontal pass. Classic Truchet has arcs and nothing else. The passes break it into longer runs.

The drawing is one SVG path drawn twice: a thicker shadow and a thinner cord. The whole file is about five kilobytes. The contract returns it as a data: URI, with no server in between.

The palette is one of eight: ink, copper, moss, ash, ultramarine, rust, salt, tar. This page takes its colors from today's palette, so it looks different in each of the eight epochs. Today: moss.

Build it yourself

The same block number gives the same knot every time, ten years from now and with this page switched off. The generator is in the repository. The full random stream is below, so you can port it to any language.

u64 next(u64 x):
  x += 0x9e3779b97f4a7c15
  x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9
  x = (x ^ (x >> 27)) * 0x94d049bb133111eb
  return x ^ (x >> 31)

counter = next(epoch)
palette = top8(next(++counter)) mod 8
cell[i] = top2(next(++counter))   for i in 0..63

If you build it, write to me. That is the one thing I am waiting for here.

Back to the fabric