pyre-world-kit 2.0.10 → 2.0.11

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/intel.js CHANGED
@@ -271,15 +271,8 @@ async function getAgentFactions(connection, wallet, factionLimit = 50) {
271
271
  const faction = factionMap.get(mint);
272
272
  if (!faction)
273
273
  continue;
274
- // Get holder percentage from holders list
275
- let percentage = 0;
276
- try {
277
- const holders = await getPyreHolders(connection, mint, 100);
278
- const holding = holders.holders.find(h => h.address === wallet);
279
- if (holding)
280
- percentage = holding.percentage;
281
- }
282
- catch { }
274
+ // balance / 1B total supply
275
+ const percentage = (balance / 1_000_000_000) * 100;
283
276
  positions.push({
284
277
  mint,
285
278
  name: faction.name,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-world-kit",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "Agent-first faction warfare kit — game-semantic wrapper over torchsdk",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/intel.ts CHANGED
@@ -295,13 +295,8 @@ export async function getAgentFactions(
295
295
  const faction = factionMap.get(mint);
296
296
  if (!faction) continue;
297
297
 
298
- // Get holder percentage from holders list
299
- let percentage = 0;
300
- try {
301
- const holders = await getPyreHolders(connection, mint, 100);
302
- const holding = holders.holders.find(h => h.address === wallet);
303
- if (holding) percentage = holding.percentage;
304
- } catch {}
298
+ // balance / 1B total supply
299
+ const percentage = (balance / 1_000_000_000) * 100;
305
300
 
306
301
  positions.push({
307
302
  mint,