pyre-world-kit 2.0.2 → 2.0.4

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
@@ -241,7 +241,7 @@ async function getAgentFactions(connection, wallet, factionLimit = 50) {
241
241
  const heldMints = tokenAccounts.value
242
242
  .map(a => ({
243
243
  mint: a.account.data.parsed.info.mint,
244
- balance: Number(a.account.data.parsed.info.tokenAmount.amount),
244
+ balance: Number(a.account.data.parsed.info.tokenAmount.uiAmount ?? 0),
245
245
  }))
246
246
  .filter(a => a.balance > 0 && (0, vanity_1.isPyreMint)(a.mint));
247
247
  if (heldMints.length === 0)
@@ -26,39 +26,21 @@
26
26
  "accounts": [
27
27
  {
28
28
  "name": "signer",
29
- "docs": [
30
- "Must be the profile's linked_wallet"
31
- ],
32
29
  "writable": true,
33
30
  "signer": true
34
31
  },
35
32
  {
36
33
  "name": "profile",
37
- "writable": true,
38
- "pda": {
39
- "seeds": [
40
- {
41
- "kind": "const",
42
- "value": [
43
- 112,
44
- 121,
45
- 114,
46
- 101,
47
- 95,
48
- 97,
49
- 103,
50
- 101,
51
- 110,
52
- 116
53
- ]
54
- },
55
- {
56
- "kind": "account",
57
- "path": "profile.creator",
58
- "account": "AgentProfile"
59
- }
60
- ]
61
- }
34
+ "docs": [
35
+ "may be smaller than the current AgentProfile struct (pre-P&L migration).",
36
+ "Anchor's Account<AgentProfile> would fail to deserialize them before",
37
+ "we get a chance to resize."
38
+ ],
39
+ "writable": true
40
+ },
41
+ {
42
+ "name": "system_program",
43
+ "address": "11111111111111111111111111111111"
62
44
  }
63
45
  ],
64
46
  "args": [
package/dist/registry.js CHANGED
@@ -164,6 +164,7 @@ async function buildCheckpointTransaction(connection, params) {
164
164
  .accounts({
165
165
  signer,
166
166
  profile,
167
+ systemProgram: web3_js_1.SystemProgram.programId,
167
168
  })
168
169
  .instruction();
169
170
  tx.add(ix);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-world-kit",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
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",
@@ -15,7 +15,7 @@
15
15
  "@solana/spl-token": "^0.4.6",
16
16
  "@solana/web3.js": "^1.98.4",
17
17
  "bs58": "^6.0.0",
18
- "torchsdk": "^3.7.36"
18
+ "torchsdk": "^3.7.37"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^22.15.0",
package/src/intel.ts CHANGED
@@ -264,7 +264,7 @@ export async function getAgentFactions(
264
264
  const heldMints = tokenAccounts.value
265
265
  .map(a => ({
266
266
  mint: a.account.data.parsed.info.mint as string,
267
- balance: Number(a.account.data.parsed.info.tokenAmount.amount),
267
+ balance: Number(a.account.data.parsed.info.tokenAmount.uiAmount ?? 0),
268
268
  }))
269
269
  .filter(a => a.balance > 0 && isPyreMint(a.mint));
270
270
 
@@ -26,39 +26,21 @@
26
26
  "accounts": [
27
27
  {
28
28
  "name": "signer",
29
- "docs": [
30
- "Must be the profile's linked_wallet"
31
- ],
32
29
  "writable": true,
33
30
  "signer": true
34
31
  },
35
32
  {
36
33
  "name": "profile",
37
- "writable": true,
38
- "pda": {
39
- "seeds": [
40
- {
41
- "kind": "const",
42
- "value": [
43
- 112,
44
- 121,
45
- 114,
46
- 101,
47
- 95,
48
- 97,
49
- 103,
50
- 101,
51
- 110,
52
- 116
53
- ]
54
- },
55
- {
56
- "kind": "account",
57
- "path": "profile.creator",
58
- "account": "AgentProfile"
59
- }
60
- ]
61
- }
34
+ "docs": [
35
+ "may be smaller than the current AgentProfile struct (pre-P&L migration).",
36
+ "Anchor's Account<AgentProfile> would fail to deserialize them before",
37
+ "we get a chance to resize."
38
+ ],
39
+ "writable": true
40
+ },
41
+ {
42
+ "name": "system_program",
43
+ "address": "11111111111111111111111111111111"
62
44
  }
63
45
  ],
64
46
  "args": [
package/src/registry.ts CHANGED
@@ -210,6 +210,7 @@ export async function buildCheckpointTransaction(
210
210
  .accounts({
211
211
  signer,
212
212
  profile,
213
+ systemProgram: SystemProgram.programId,
213
214
  })
214
215
  .instruction();
215
216