@fangorn-network/sdk 2026.5.10 → 2026.5.11

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
@@ -91,7 +91,7 @@ async function resolveSchemaId(fangorn, schemaNameOrId) {
91
91
  }
92
92
  }
93
93
  const program = new Command();
94
- program.name("fangorn").description("Fangorn Network CLI").version("0.2.0");
94
+ program.name("fangorn").description("Fangorn Network CLI").version("0.2.1");
95
95
  program.command("init").description("Configure your Fangorn credentials").action(async () => {
96
96
  intro("Fangorn Setup");
97
97
  const privateKey = await text({
package/lib/config.js CHANGED
@@ -31,7 +31,7 @@ const FangornConfig = {
31
31
  settlementRegistryContractAddress: "0x282915f5c6f6c9b15c131fa379916da47754fbef",
32
32
  chainName: "arbitrumSepolia",
33
33
  chain: arbitrumSepolia,
34
- rpcUrl: "https://sepolia-rollup.arbitrum.io/rpc",
34
+ rpcUrl: "https://arbitrum-sepolia-testnet.api.pocket.network",
35
35
  caip2: 421614,
36
36
  ipfsGateway: "https://ipfs.io"
37
37
  },
@@ -1,4 +1,4 @@
1
- import * as viem429 from "viem";
1
+ import * as viem430 from "viem";
2
2
  import { Address, Hash, Hex, PublicClient, WalletClient } from "viem";
3
3
 
4
4
  //#region src/registries/datasource-registry/index.d.ts
@@ -23,7 +23,7 @@ declare class DataSourceRegistry {
23
23
  resourceId(owner: Address, schemaId: Hex, name: string): Promise<Hex>;
24
24
  static resourceIdLocal(owner: Address, schemaId: Hex, name: string): Hex;
25
25
  hashName(name: string): Hex;
26
- waitForTransaction(hash: Hash): Promise<viem429.TransactionReceipt>;
26
+ waitForTransaction(hash: Hash): Promise<viem430.TransactionReceipt>;
27
27
  private estimateGas;
28
28
  }
29
29
  //#endregion
@@ -1,4 +1,4 @@
1
- import * as viem431 from "viem";
1
+ import * as viem429 from "viem";
2
2
  import { Address, Hash, Hex, PublicClient, WalletClient } from "viem";
3
3
 
4
4
  //#region src/registries/schema-registry/index.d.ts
@@ -27,7 +27,7 @@ declare class SchemaRegistry {
27
27
  hasPublishers(nameOrId: string): Promise<boolean>;
28
28
  isPublisher(nameOrId: string, publisher: Address): Promise<boolean>;
29
29
  getPublisherCount(nameOrId: string): Promise<bigint>;
30
- waitForTransaction(hash: Hash): Promise<viem431.TransactionReceipt>;
30
+ waitForTransaction(hash: Hash): Promise<viem429.TransactionReceipt>;
31
31
  private resolveId;
32
32
  }
33
33
  //#endregion
@@ -1,5 +1,5 @@
1
1
  import { PrepareSettleParams, PrepareSettleResult, RegisterParams, SettleParams, TransferWithAuthParams, TransferWithAuthPayload } from "./types.js";
2
- import * as viem430 from "viem";
2
+ import * as viem431 from "viem";
3
3
  import { Address, Hex, PublicClient, WalletClient } from "viem";
4
4
 
5
5
  //#region src/registries/settlement-registry/index.d.ts
@@ -53,7 +53,7 @@ declare class SettlementRegistry {
53
53
  isRegistered(resourceId: Hex, identityCommitment: bigint): Promise<boolean>;
54
54
  getGroupId(resourceId: Hex): Promise<bigint>;
55
55
  getPrice(resourceId: Hex): Promise<bigint>;
56
- waitForTransaction(hash: Hex): Promise<viem430.TransactionReceipt>;
56
+ waitForTransaction(hash: Hex): Promise<viem431.TransactionReceipt>;
57
57
  /**
58
58
  * Reconstruct the Semaphore group from MemberRegistered events.
59
59
  */
@@ -166,9 +166,17 @@ var PublisherRole = class {
166
166
  break;
167
167
  }
168
168
  const itemDef = fieldDef.items;
169
- if (itemDef && "@type" in itemDef) value.forEach((item, i) => {
169
+ if (!itemDef) break;
170
+ if ("@type" in itemDef) value.forEach((item, i) => {
170
171
  this.validateField(name, `${fieldName}[${i.toString()}]`, itemDef, item, errors);
171
172
  });
173
+ else value.forEach((item, i) => {
174
+ if (typeof item !== "object" || Array.isArray(item) || item === null) {
175
+ errors.push(`"${fieldName}[${i.toString()}]" must be an object`);
176
+ return;
177
+ }
178
+ for (const [subField, subDef] of Object.entries(itemDef)) this.validateField(name, `${fieldName}[${i.toString()}].${subField}`, subDef, item[subField], errors);
179
+ });
172
180
  break;
173
181
  }
174
182
  case "object": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fangorn-network/sdk",
3
- "version": "2026.05.10",
3
+ "version": "2026.05.11",
4
4
  "description": "A zero-knowledge conditional access control framework",
5
5
  "repository": {
6
6
  "type": "git",