apow-cli 0.11.7 → 0.11.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/miner.js CHANGED
@@ -261,6 +261,9 @@ async function grindNonce(challengeNumber, target, minerAddress, onProgress) {
261
261
  nonce += 1n;
262
262
  }
263
263
  }
264
+ function toBigInt(value) {
265
+ return typeof value === "bigint" ? value : BigInt(value);
266
+ }
264
267
  async function showStartupBanner(tokenId) {
265
268
  const { account } = (0, wallet_1.requireWallet)();
266
269
  const [ethBalance, totalMines, totalMinted, mineableSupply, eraInterval, hashpowerRaw, rarityRaw] = await Promise.all([
@@ -314,9 +317,9 @@ async function showStartupBanner(tokenId) {
314
317
  ]);
315
318
  console.log("");
316
319
  return {
317
- mineableSupply,
318
- eraInterval,
319
- hashpower: hashpowerRaw,
320
+ mineableSupply: toBigInt(mineableSupply),
321
+ eraInterval: toBigInt(eraInterval),
322
+ hashpower: toBigInt(hashpowerRaw),
320
323
  };
321
324
  }
322
325
  async function startMining(tokenId) {
package/dist/mint.js CHANGED
@@ -181,9 +181,12 @@ async function runMintFlow(options = {}) {
181
181
  // Solve SMHL
182
182
  const challenge = deriveChallengeFromSeed(challengeSeed);
183
183
  const smhlSpinner = ui.spinner("Solving SMHL...");
184
- const solution = await (0, smhl_1.solveSmhlChallenge)(challenge, (attempt) => {
185
- smhlSpinner.update(`Solving SMHL... attempt ${attempt}/5`);
186
- });
184
+ const solution = (0, smhl_1.solveSmhlAlgorithmic)(challenge);
185
+ const issues = (0, smhl_1.validateSmhlSolution)(solution, challenge);
186
+ if (issues.length > 0) {
187
+ smhlSpinner.fail("Solving SMHL failed");
188
+ throw new Error(`SMHL generation failed: ${issues.join(", ")}`);
189
+ }
187
190
  smhlSpinner.stop("Solving SMHL... done");
188
191
  // Mint
189
192
  const mintSpinner = ui.spinner("Minting...");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apow-cli",
3
- "version": "0.11.7",
3
+ "version": "0.11.9",
4
4
  "description": "Mine AGENT tokens on Base L2 with Agentic Proof of Work",
5
5
  "keywords": [
6
6
  "apow",