nara-sdk 1.0.72 → 1.0.74

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nara-sdk",
3
- "version": "1.0.72",
3
+ "version": "1.0.74",
4
4
  "description": "SDK for the Nara chain (Solana-compatible)",
5
5
  "module": "index.ts",
6
6
  "main": "index.ts",
@@ -43,6 +43,8 @@ export interface AgentRecord {
43
43
  version: number;
44
44
  /** Referral agent ID, null if none */
45
45
  referralId: string | null;
46
+ /** Number of agents referred by this agent */
47
+ referralCount: number;
46
48
  createdAt: number;
47
49
  updatedAt: number;
48
50
  }
@@ -255,6 +257,9 @@ function parseAgentRecordData(data: Buffer | Uint8Array): AgentRecord {
255
257
  const referralId = referralIdLen > 0
256
258
  ? buf.subarray(offset, offset + referralIdLen).toString("utf-8")
257
259
  : null;
260
+ offset += 32; // referral_id fixed array
261
+
262
+ const referralCount = buf.readUInt32LE(offset);
258
263
 
259
264
  return {
260
265
  authority,
@@ -263,6 +268,7 @@ function parseAgentRecordData(data: Buffer | Uint8Array): AgentRecord {
263
268
  memory,
264
269
  version,
265
270
  referralId,
271
+ referralCount,
266
272
  createdAt,
267
273
  updatedAt,
268
274
  };
@@ -2093,7 +2093,8 @@
2093
2093
  }
2094
2094
  },
2095
2095
  {
2096
- "name": "referral_agent"
2096
+ "name": "referral_agent",
2097
+ "writable": true
2097
2098
  },
2098
2099
  {
2099
2100
  "name": "referral_authority",
@@ -2707,7 +2708,8 @@
2707
2708
  }
2708
2709
  },
2709
2710
  {
2710
- "name": "referral_agent"
2711
+ "name": "referral_agent",
2712
+ "writable": true
2711
2713
  },
2712
2714
  {
2713
2715
  "name": "config",
@@ -4860,7 +4862,7 @@
4860
4862
  }
4861
4863
  },
4862
4864
  {
4863
- "name": "_padding",
4865
+ "name": "referral_count",
4864
4866
  "type": "u32"
4865
4867
  },
4866
4868
  {
@@ -2099,7 +2099,8 @@ export type NaraAgentRegistry = {
2099
2099
  }
2100
2100
  },
2101
2101
  {
2102
- "name": "referralAgent"
2102
+ "name": "referralAgent",
2103
+ "writable": true
2103
2104
  },
2104
2105
  {
2105
2106
  "name": "referralAuthority",
@@ -2713,7 +2714,8 @@ export type NaraAgentRegistry = {
2713
2714
  }
2714
2715
  },
2715
2716
  {
2716
- "name": "referralAgent"
2717
+ "name": "referralAgent",
2718
+ "writable": true
2717
2719
  },
2718
2720
  {
2719
2721
  "name": "config",
@@ -4866,7 +4868,7 @@ export type NaraAgentRegistry = {
4866
4868
  }
4867
4869
  },
4868
4870
  {
4869
- "name": "padding",
4871
+ "name": "referralCount",
4870
4872
  "type": "u32"
4871
4873
  },
4872
4874
  {