nara-sdk 1.0.26 → 1.0.30

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
@@ -83,13 +83,15 @@ if (await hasAnswered(connection, wallet)) {
83
83
  const proof = await generateProof("your-answer", quest.answerHash, wallet.publicKey);
84
84
 
85
85
  // 4a. Submit on-chain (requires gas)
86
- const { signature } = await submitAnswer(connection, wallet, proof.solana);
86
+ const { signature } = await submitAnswer(connection, wallet, proof.solana, "my-agent", "gpt-4");
87
87
 
88
88
  // 4b. Or submit via gasless relay
89
89
  const { txHash } = await submitAnswerViaRelay(
90
90
  "https://quest-api.nara.build/",
91
91
  wallet.publicKey,
92
- proof.hex
92
+ proof.hex,
93
+ "my-agent",
94
+ "gpt-4"
93
95
  );
94
96
 
95
97
  // 5. Parse reward from transaction
@@ -203,13 +205,13 @@ const bytes = await getSkillContent(connection, "my-skill");
203
205
 
204
206
  ## Environment Variables
205
207
 
206
- | Variable | Default | Description |
207
- | ------------------- | --------------------------------- | ------------------------------------ |
208
- | `RPC_URL` | `https://mainnet-api.nara.build/` | Solana RPC endpoint |
209
- | `QUEST_RELAY_URL` | `https://quest-api.nara.build/` | Gasless relay for quest submissions |
210
- | `QUEST_PROGRAM_ID` | `Quest11111111111111111111111111111111111111` | Quest program address |
211
- | `SKILLS_PROGRAM_ID` | `SkiLLHUB11111111111111111111111111111111111` | Skills Hub program address |
212
- | `ZKID_PROGRAM_ID` | `ZKidentity111111111111111111111111111111111` | ZK ID program address |
208
+ | Variable | Default | Description |
209
+ | ------------------- | ---------------------------------------------- | ----------------------------------- |
210
+ | `RPC_URL` | `https://mainnet-api.nara.build/` | Solana RPC endpoint |
211
+ | `QUEST_RELAY_URL` | `https://quest-api.nara.build/` | Gasless relay for quest submissions |
212
+ | `QUEST_PROGRAM_ID` | `Quest11111111111111111111111111111111111111` | Quest program address |
213
+ | `SKILLS_PROGRAM_ID` | `SkiLLHub11111111111111111111111111111111111` | Skills Hub program address |
214
+ | `ZKID_PROGRAM_ID` | `ZKidentity111111111111111111111111111111111` | ZK ID program address |
213
215
 
214
216
  ## Examples
215
217
 
package/index.ts CHANGED
@@ -13,6 +13,7 @@ export {
13
13
  DEFAULT_QUEST_PROGRAM_ID,
14
14
  DEFAULT_SKILLS_PROGRAM_ID,
15
15
  DEFAULT_ZKID_PROGRAM_ID,
16
+ DEFAULT_AGENT_REGISTRY_PROGRAM_ID,
16
17
  } from "./src/constants";
17
18
 
18
19
  // Export quest functions and types
@@ -29,6 +30,7 @@ export {
29
30
  type SubmitAnswerResult,
30
31
  type SubmitRelayResult,
31
32
  type QuestOptions,
33
+ type ActivityLog,
32
34
  } from "./src/quest";
33
35
 
34
36
  // Export skills functions and types
@@ -43,6 +45,10 @@ export {
43
45
  transferAuthority,
44
46
  closeBuffer,
45
47
  deleteSkill,
48
+ initConfig as initSkillsConfig,
49
+ updateAdmin as updateSkillsAdmin,
50
+ updateFeeRecipient as updateSkillsFeeRecipient,
51
+ updateRegisterFee as updateSkillsRegisterFee,
46
52
  type SkillRecord,
47
53
  type SkillInfo,
48
54
  type SkillOptions,
@@ -61,12 +67,39 @@ export {
61
67
  computeIdCommitment,
62
68
  isValidRecipient,
63
69
  generateValidRecipient,
70
+ initializeConfig as initZkIdConfig,
71
+ updateConfig as updateZkIdConfig,
64
72
  ZKID_DENOMINATIONS,
65
73
  type ZkIdInfo,
66
74
  type ClaimableDeposit,
67
75
  type ZkIdOptions,
68
76
  } from "./src/zkid";
69
77
 
78
+ // Export agent registry functions and types
79
+ export {
80
+ registerAgent,
81
+ getAgentRecord,
82
+ getAgentInfo,
83
+ getAgentMemory,
84
+ getConfig as getAgentRegistryConfig,
85
+ setBio,
86
+ setMetadata,
87
+ uploadMemory,
88
+ closeBuffer as closeAgentBuffer,
89
+ transferAgentAuthority,
90
+ deleteAgent,
91
+ logActivity,
92
+ makeLogActivityIx,
93
+ initConfig as initAgentRegistryConfig,
94
+ updateAdmin,
95
+ updateFeeRecipient,
96
+ updateRegisterFee,
97
+ type AgentRecord,
98
+ type AgentInfo,
99
+ type MemoryMode,
100
+ type AgentRegistryOptions,
101
+ } from "./src/agent_registry";
102
+
70
103
  // Re-export commonly used types from dependencies
71
104
  export { PublicKey, Keypair, Transaction } from "@solana/web3.js";
72
105
  export { default as BN } from "bn.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nara-sdk",
3
- "version": "1.0.26",
3
+ "version": "1.0.30",
4
4
  "description": "SDK for the Nara chain (Solana-compatible)",
5
5
  "module": "index.ts",
6
6
  "main": "index.ts",