celoclicker-game-sdk
v0.1.1
Published
Standalone SDK for CeloClicker contract state, gameplay math, fee currency handling, and MiniPay wallet helpers.
Downloads
1,192
Maintainers
Readme
CeloClicker SDK
Standalone SDK derived from the celoclicker app for reading player state, calculating upgrade costs, choosing fee currencies, and handling MiniPay wallet detection.
Install
npm install celoclicker-game-sdk react wagmi viemUse
import {
DEFAULT_CELOCLICKER_CONFIG,
calculateUpgradeCost,
getDefaultFeeCurrencyId,
mapPlayerStats,
} from 'celoclicker-game-sdk';
const nextClickPowerCost = calculateUpgradeCost(10, 3);
const feeCurrencyId = getDefaultFeeCurrencyId(true, DEFAULT_CELOCLICKER_CONFIG.chainId);
const stats = mapPlayerStats([10n, 2n, 0n, 1n, 4n, 1n]);
console.log(nextClickPowerCost);
console.log(feeCurrencyId);
console.log(stats.clickPower);Local Build
npm install
npm test
npm run build