← all modules
@metanet-games/

chainweather

live on npm chainseed + chainclock npm ↗ source ↗ Apache-2.0

Deterministic shared weather from the chain — the same storm for every player, un-riggable, with no weather server.

Install

$ npm i @metanet-games/chainweather

Example

import { weatherAt, createWeather } from "@metanet-games/chainweather";

weatherAt({ hash, height, region: "north" });
// { season:"autumn", temperatureC:9.4, condition:"overcast", wind:0.3, … }

// or reactive over a chainclock:
const wx = createWeather(clock);
wx.on("change", () => render(wx.current("north")));

Plug it into your game

The same storm rolls in for everyone, derived from block hashes — anyone can recompute today's weather, and nobody can rig it. Pair it with chainclock for reactive updates as blocks arrive, and use region keys so different places get different skies under the same block.

Part of chainkit — verifiable building blocks for BSV games. Verify don't trust.

🧩 github.com/metanet-games/chainkit · 🕹️ the games · metanet.games