@fangorn-network/sdk 2026.3.27 → 2026.3.29

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/lib/cli/cli.js CHANGED
@@ -2,7 +2,6 @@
2
2
  import { FangornConfig, SupportedNetworks } from "../config.js";
3
3
  import { SettlementRegistry } from "../registries/settlement-registry/index.js";
4
4
  import { Fangorn } from "../fangorn.js";
5
- import { SettledGadget } from "../modules/gadgets/settledGadget.js";
6
5
  import { getChain, handleCancel, selectChain } from "./index.js";
7
6
  import { createWalletClient, http } from "viem";
8
7
  import { privateKeyToAccount } from "viem/accounts";
@@ -174,28 +173,12 @@ program.command("init").description("Configure your Fangorn credentials").action
174
173
  outro(`Config saved to ${CONFIG_PATH}`);
175
174
  });
176
175
  const schemaCmd = program.command("schema").description("Schema registry operations");
177
- schemaCmd.command("register").description("Register an agent identity and/or a schema on-chain").argument("<name>", "Schema / agent name").option("-e, --skip-erc", "Skip ERC-8004 agent registration").action(async (name, options) => {
176
+ schemaCmd.command("register").description("Register an agent identity and/or a schema on-chain").argument("<name>", "Schema / agent name").action(async () => {
178
177
  try {
179
178
  intro("Chain selection");
180
179
  outro(`Selected chain: ${(await selectChain()).name}`);
181
180
  const fangorn = await getFangorn();
182
- let datasourceAgentId = "";
183
- let description = "";
184
- if (!options.skipErc) {
185
- intro("ERC-8004 Agent Registration");
186
- description = await text({ message: "Agent description:" });
187
- handleCancel(description);
188
- const s$1 = spinner();
189
- s$1.start("Registering agent...");
190
- const { agentId } = await fangorn.schema.registerAgent({
191
- name,
192
- description
193
- });
194
- s$1.stop();
195
- datasourceAgentId = agentId;
196
- note(`Agent ID: ${agentId}`, "ERC-8004 registered");
197
- outro("Agent Registration complete.");
198
- }
181
+ const datasourceAgentId = "";
199
182
  intro("Schema Registration");
200
183
  const schemaFilePath = await text({
201
184
  message: "Path to your JSON schema file:",
@@ -266,7 +249,6 @@ publishCmd.command("upload").description("Encrypt and publish file(s) under a sc
266
249
  try {
267
250
  const fangorn = await getFangorn();
268
251
  const cfg = loadConfig();
269
- const owner = getAccount().address;
270
252
  const price = BigInt(options.price);
271
253
  const s = spinner();
272
254
  const schemaId = await resolveSchemaId(fangorn, options.schema);
@@ -292,13 +274,7 @@ publishCmd.command("upload").description("Encrypt and publish file(s) under a sc
292
274
  schema,
293
275
  schemaId,
294
276
  gateway,
295
- options: { overwrite: options.overwrite },
296
- gadgetFactory: (tag) => new SettledGadget({
297
- resourceId: SettlementRegistry.deriveResourceId(owner, schemaId, tag),
298
- settlementRegistryAddress: cfg.cfg.settlementRegistryContractAddress,
299
- chainName: cfg.cfg.chainName,
300
- pinataJwt: cfg.jwt ?? ""
301
- })
277
+ options: { overwrite: options.overwrite }
302
278
  }, price);
303
279
  s.stop();
304
280
  note(`Manifest CID: ${result.manifestCid}\nEntries: ${result.entryCount.toString()}\nSchema: ${result.schemaId}`, "Upload complete");