@astroblock/shared

v0.1.0

Published

Shared constants, types, and utilities for Astroblock

Readme

@astroblock/shared

Shared constants, types, and utilities for Astroblock.

Installation

npm install @astroblock/shared
# or
pnpm add @astroblock/shared
# or
yarn add @astroblock/shared

Usage

import { constants, TokenInfo, getCurrentWeek } from '@astroblock/shared';

// Access chain configuration
console.log(constants.chain.id);

// Get current week number
const week = getCurrentWeek();

Exports

Constants

  • constants - Chain configuration, API URLs, and game settings

Types

  • Constants - Type for the constants object
  • TokenInfo - Token metadata type
  • AstroItem - Game item type
  • TokenRange / TokenRanges - Token range configuration

Game Utilities

  • getCurrentWeek() - Get the current week number since leaderboard start

Superfluid

  • superfluidAddresses - Superfluid contract addresses per chain
  • subgraphUrlPerChainId - Superfluid subgraph URLs per chain

License

MIT