@opensea/cli 1.0.1 → 1.1.0

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
@@ -41,14 +41,15 @@ npx @opensea/cli collections get mfers
41
41
  Set your API key via environment variable or flag:
42
42
 
43
43
  ```bash
44
- export OPENSEA_API_KEY=your-api-key
44
+ # Get an instant free-tier API key (no signup needed)
45
+ export OPENSEA_API_KEY=$(curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key')
45
46
  opensea collections get mfers
46
47
 
47
48
  # or pass inline
48
49
  opensea --api-key your-api-key collections get mfers
49
50
  ```
50
51
 
51
- Get an API key at [docs.opensea.io](https://docs.opensea.io/reference/api-keys).
52
+ Get an API key instantly via the command above, or get a full key at [opensea.io/settings/developer](https://opensea.io/settings/developer) for higher rate limits. See [API key docs](https://docs.opensea.io/reference/api-keys) for details.
52
53
 
53
54
  ## Quick Start
54
55
 
@@ -174,7 +175,7 @@ console.log(formatToon(data))
174
175
  ## Requirements
175
176
 
176
177
  - Node.js >= 18.0.0
177
- - OpenSea API key ([get one here](https://docs.opensea.io/reference/api-keys))
178
+ - OpenSea API key get one instantly: `curl -s -X POST https://api.opensea.io/api/v2/auth/keys | jq -r '.api_key'` or from [opensea.io/settings/developer](https://opensea.io/settings/developer)
178
179
 
179
180
  ## Development
180
181
 
package/dist/cli.js CHANGED
@@ -6,7 +6,7 @@ import { Command as Command13 } from "commander";
6
6
  // src/client.ts
7
7
  var DEFAULT_BASE_URL = "https://api.opensea.io";
8
8
  var DEFAULT_TIMEOUT_MS = 3e4;
9
- var USER_AGENT = `opensea-cli/${"1.0.1"}`;
9
+ var USER_AGENT = `opensea-cli/${"1.1.0"}`;
10
10
  var DEFAULT_MAX_RETRIES = 0;
11
11
  var DEFAULT_RETRY_BASE_DELAY_MS = 1e3;
12
12
  function isRetryableStatus(status, method) {
@@ -1954,23 +1954,24 @@ function createWalletFromEnv(provider) {
1954
1954
  if (provider) {
1955
1955
  return createAdapter(provider);
1956
1956
  }
1957
- const hasTurnkey = !!process.env.TURNKEY_API_PUBLIC_KEY && !!process.env.TURNKEY_ORGANIZATION_ID;
1957
+ const hasPrivy = !!process.env.PRIVY_APP_ID && !!process.env.PRIVY_APP_SECRET;
1958
1958
  const hasFireblocks = !!process.env.FIREBLOCKS_API_KEY && !!process.env.FIREBLOCKS_VAULT_ID;
1959
+ const hasTurnkey = !!process.env.TURNKEY_API_PUBLIC_KEY && !!process.env.TURNKEY_ORGANIZATION_ID;
1959
1960
  const hasPrivateKey = !!process.env.PRIVATE_KEY && !!process.env.RPC_URL;
1960
- const hasPrivy = !!process.env.PRIVY_APP_ID && !!process.env.PRIVY_APP_SECRET;
1961
1961
  const detected = [
1962
- hasTurnkey && "turnkey",
1962
+ hasPrivy && "privy",
1963
1963
  hasFireblocks && "fireblocks",
1964
- hasPrivateKey && "private-key",
1965
- hasPrivy && "privy"
1964
+ hasTurnkey && "turnkey",
1965
+ hasPrivateKey && "private-key"
1966
1966
  ].filter(Boolean);
1967
1967
  if (detected.length > 1) {
1968
1968
  console.warn(
1969
1969
  `WARNING: Multiple wallet providers detected: ${detected.join(", ")}. Using ${detected[0]}. Set --wallet-provider explicitly to avoid ambiguity.`
1970
1970
  );
1971
1971
  }
1972
- if (hasTurnkey) return TurnkeyAdapter.fromEnv();
1972
+ if (hasPrivy) return PrivyAdapter.fromEnv();
1973
1973
  if (hasFireblocks) return FireblocksAdapter.fromEnv();
1974
+ if (hasTurnkey) return TurnkeyAdapter.fromEnv();
1974
1975
  if (hasPrivateKey) return PrivateKeyAdapter.fromEnv();
1975
1976
  return PrivyAdapter.fromEnv();
1976
1977
  }
@@ -2261,7 +2262,7 @@ var BANNER = `
2261
2262
  |_|
2262
2263
  `;
2263
2264
  var program = new Command13();
2264
- program.name("opensea").description("OpenSea CLI - Query the OpenSea API from the command line").version("1.0.1").addHelpText("before", BANNER).option("--api-key <key>", "OpenSea API key (or set OPENSEA_API_KEY env var)").option("--chain <chain>", "Default chain", "ethereum").option("--format <format>", "Output format (json, table, or toon)", "json").option("--base-url <url>", "API base URL").option("--timeout <ms>", "Request timeout in milliseconds", "30000").option("--verbose", "Log request and response info to stderr").option(
2265
+ program.name("opensea").description("OpenSea CLI - Query the OpenSea API from the command line").version("1.1.0").addHelpText("before", BANNER).option("--api-key <key>", "OpenSea API key (or set OPENSEA_API_KEY env var)").option("--chain <chain>", "Default chain", "ethereum").option("--format <format>", "Output format (json, table, or toon)", "json").option("--base-url <url>", "API base URL").option("--timeout <ms>", "Request timeout in milliseconds", "30000").option("--verbose", "Log request and response info to stderr").option(
2265
2266
  "--fields <fields>",
2266
2267
  "Comma-separated list of fields to include in output"
2267
2268
  ).option("--max-lines <lines>", "Truncate output after N lines").option("--max-retries <n>", "Max retries on 429/5xx (0 to disable)", "3").option("--no-retry", "Disable request retries");