nara-sdk 1.0.71 → 1.0.73

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/README.md CHANGED
@@ -16,15 +16,15 @@ TypeScript/JavaScript SDK for interacting with the Nara blockchain. Build agents
16
16
  ## Install
17
17
 
18
18
  ```bash
19
- npm install @nara/sdk
19
+ npm install nara-sdk
20
20
  ```
21
21
 
22
22
  ## Quick Start
23
23
 
24
24
  ```js
25
- import { Connection, Keypair, Transaction } from '@nara/sdk';
25
+ import { Connection, Keypair, Transaction } from 'nara-sdk';
26
26
 
27
- const connection = new Connection('https://devnet-api.nara.build');
27
+ const connection = new Connection('https://mainnet-api.nara.build');
28
28
  const balance = await connection.getBalance(publicKey);
29
29
  ```
30
30
 
@@ -41,7 +41,7 @@ RPC Client Full RPC method coverage
41
41
  ## CLI
42
42
 
43
43
  ```bash
44
- npx @nara/sdk --help
44
+ npx nara-sdk --help
45
45
  ```
46
46
 
47
47
  ## Documentation
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nara-sdk",
3
- "version": "1.0.71",
3
+ "version": "1.0.73",
4
4
  "description": "SDK for the Nara chain (Solana-compatible)",
5
5
  "module": "index.ts",
6
6
  "main": "index.ts",
@@ -8,7 +8,8 @@
8
8
  "private": false,
9
9
  "files": [
10
10
  "src",
11
- "index.ts"
11
+ "index.ts",
12
+ "README.md"
12
13
  ],
13
14
  "keywords": [
14
15
  "nara",
@@ -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,10 @@ 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
+ offset += 4; // _padding
263
+ const referralCount = buf.readUInt32LE(offset);
258
264
 
259
265
  return {
260
266
  authority,
@@ -263,6 +269,7 @@ function parseAgentRecordData(data: Buffer | Uint8Array): AgentRecord {
263
269
  memory,
264
270
  version,
265
271
  referralId,
272
+ referralCount,
266
273
  createdAt,
267
274
  updatedAt,
268
275
  };
@@ -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",
@@ -4863,12 +4865,34 @@
4863
4865
  "name": "_padding",
4864
4866
  "type": "u32"
4865
4867
  },
4868
+ {
4869
+ "name": "referral_count",
4870
+ "type": "u32"
4871
+ },
4866
4872
  {
4867
4873
  "name": "_reserved",
4868
4874
  "type": {
4869
4875
  "array": [
4870
4876
  "u8",
4871
- 64
4877
+ 32
4878
+ ]
4879
+ }
4880
+ },
4881
+ {
4882
+ "name": "_reserved2",
4883
+ "type": {
4884
+ "array": [
4885
+ "u8",
4886
+ 16
4887
+ ]
4888
+ }
4889
+ },
4890
+ {
4891
+ "name": "_reserved3",
4892
+ "type": {
4893
+ "array": [
4894
+ "u8",
4895
+ 12
4872
4896
  ]
4873
4897
  }
4874
4898
  }
@@ -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",
@@ -4869,12 +4871,34 @@ export type NaraAgentRegistry = {
4869
4871
  "name": "padding",
4870
4872
  "type": "u32"
4871
4873
  },
4874
+ {
4875
+ "name": "referralCount",
4876
+ "type": "u32"
4877
+ },
4872
4878
  {
4873
4879
  "name": "reserved",
4874
4880
  "type": {
4875
4881
  "array": [
4876
4882
  "u8",
4877
- 64
4883
+ 32
4884
+ ]
4885
+ }
4886
+ },
4887
+ {
4888
+ "name": "reserved2",
4889
+ "type": {
4890
+ "array": [
4891
+ "u8",
4892
+ 16
4893
+ ]
4894
+ }
4895
+ },
4896
+ {
4897
+ "name": "reserved3",
4898
+ "type": {
4899
+ "array": [
4900
+ "u8",
4901
+ 12
4878
4902
  ]
4879
4903
  }
4880
4904
  }