@ghostspeak/sdk 1.3.3 → 1.3.5

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/dist/index.js CHANGED
@@ -21672,8 +21672,7 @@ var BaseInstructions = class {
21672
21672
  });
21673
21673
  signature = result?.signature || Object.values(signedTransaction.signatures || {})[0] || "unknown_signature";
21674
21674
  }
21675
- const rpcEndpoint = this.config.rpc?.toString() || "mainnet-beta";
21676
- const cluster = detectClusterFromEndpoint(rpcEndpoint);
21675
+ const cluster = this.config.cluster || (this.config.rpcEndpoint ? detectClusterFromEndpoint(this.config.rpcEndpoint) : "devnet");
21677
21676
  const transactionResult = createTransactionResult(
21678
21677
  signature,
21679
21678
  cluster,
@@ -21990,7 +21989,17 @@ var AgentInstructions = class extends BaseInstructions {
21990
21989
  // Could use memcmp filter here for efficiency
21991
21990
  this.commitment
21992
21991
  );
21993
- const ownerAgents = accounts.map(({ data }) => data).filter((agent) => agent.owner?.toString() === options.owner.toString());
21992
+ console.log("\u{1F50D} Debug: Total accounts fetched:", accounts.length);
21993
+ const ownerAgents = accounts.map(({ data, address: address2 }) => {
21994
+ console.log("\u{1F50D} Debug: Agent account:", {
21995
+ address: address2.toString(),
21996
+ owner: data.owner?.toString(),
21997
+ name: data.name,
21998
+ isActive: data.isActive
21999
+ });
22000
+ return { ...data, address: address2 };
22001
+ }).filter((agent) => agent.owner?.toString() === options.owner.toString());
22002
+ console.log("\u{1F50D} Debug: Filtered agents for owner:", ownerAgents.length);
21994
22003
  return ownerAgents;
21995
22004
  } catch (error) {
21996
22005
  console.warn("Failed to fetch agents by owner:", error);