@secondlayer/cli 8.6.3 → 8.6.4

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/cli.js CHANGED
@@ -12870,8 +12870,12 @@ class StacksApiClient {
12870
12870
  async getContractInfo(contractId) {
12871
12871
  await this.ensureProxy();
12872
12872
  if (this.useProxy) {
12873
- const url2 = `${this.baseUrl}/api/node/contracts/${contractId}/abi`;
12874
- return this.fetchWithErrorHandling(url2, "Contract", contractId);
12873
+ const url2 = `${this.baseUrl}/v1/contracts/${encodeURIComponent(contractId)}?include=abi`;
12874
+ const { contract } = await this.fetchWithErrorHandling(url2, "Contract", contractId);
12875
+ if (!contract?.abi) {
12876
+ throw new Error(`ABI not available for ${contractId} (status: ${contract?.abi_status ?? "unknown"})`);
12877
+ }
12878
+ return contract.abi;
12875
12879
  }
12876
12880
  const { address, contractName } = parseContractId(contractId);
12877
12881
  const url = `${this.baseUrl}/v2/contracts/interface/${address}/${contractName}`;
@@ -31651,7 +31655,7 @@ Examples:`));
31651
31655
  No .clar files or contract addresses matched the provided inputs`));
31652
31656
  process.exit(1);
31653
31657
  }
31654
- const apiKey = options3.apiKey || process.env.STACKS_NODE_API_KEY || process.env.HIRO_API_KEY;
31658
+ const apiKey = options3.apiKey || process.env.STACKS_NODE_API_KEY;
31655
31659
  config = await buildConfigFromInputs(parsedInputs, options3.out, apiKey);
31656
31660
  } else {
31657
31661
  config = await loadConfig2(options3.config);
@@ -31807,7 +31811,7 @@ var {
31807
31811
  // package.json
31808
31812
  var package_default = {
31809
31813
  name: "@secondlayer/cli",
31810
- version: "8.6.3",
31814
+ version: "8.6.4",
31811
31815
  repository: {
31812
31816
  type: "git",
31813
31817
  url: "git+https://github.com/ryanwaits/secondlayer.git",
@@ -31856,9 +31860,9 @@ var package_default = {
31856
31860
  dependencies: {
31857
31861
  "@inquirer/prompts": "^8.2.0",
31858
31862
  "@secondlayer/bundler": "^0.3.7",
31859
- "@secondlayer/scaffold": "^1.1.0",
31863
+ "@secondlayer/scaffold": "^1.2.0",
31860
31864
  "@secondlayer/sdk": "^6.19.0",
31861
- "@secondlayer/shared": "^6.28.0",
31865
+ "@secondlayer/shared": "^6.28.1",
31862
31866
  "@secondlayer/stacks": "^2.4.0",
31863
31867
  "@secondlayer/subgraphs": "^3.10.0",
31864
31868
  "@biomejs/js-api": "^0.7.0",
@@ -35818,7 +35822,7 @@ Examples:
35818
35822
  } else {
35819
35823
  const address = contractAddress;
35820
35824
  const network = inferNetwork(address) ?? "mainnet";
35821
- const apiKey = options2.apiKey ?? process.env.STACKS_NODE_API_KEY ?? process.env.HIRO_API_KEY;
35825
+ const apiKey = options2.apiKey ?? process.env.STACKS_NODE_API_KEY;
35822
35826
  const client = new StacksApiClient(network, apiKey);
35823
35827
  info(`Fetching ABI for ${address} via ${client.describeContractInfoSource()}...`);
35824
35828
  const contractInfo = await client.getContractInfo(address);
@@ -37912,5 +37916,5 @@ registerAccountCommand(program);
37912
37916
  registerKeysCommand(program);
37913
37917
  program.parse();
37914
37918
 
37915
- //# debugId=FD969C75B9A203B164756E2164756E21
37919
+ //# debugId=D852EB907B2A586864756E2164756E21
37916
37920
  //# sourceMappingURL=cli.js.map