diff --git a/.stats.yml b/.stats.yml index c99b503..704584e 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 19 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-27b198f27c560514e57792ad3c3e31b30a636e86ff4cd0fca52e477beb3943ea.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/new%2Fblockaid-5e4d0576b2d38134571cb327258a600c25f8caa892fe15739b0c6dd6f0af182c.yml diff --git a/README.md b/README.md index b8acb8d..92d9d57 100755 --- a/README.md +++ b/README.md @@ -22,9 +22,7 @@ The full API of this library can be found in [api.md](api.md). ```js import Blockaid from '@blockaid/client'; -const client = new Blockaid({ - apiKey: process.env['BLOCKAID_CLIENT_API_KEY'], // This is the default and can be omitted -}); +const client = new Blockaid(); async function main() { const transactionScanResponse = await client.evm.jsonRpc.scan({ @@ -53,9 +51,7 @@ This library includes TypeScript definitions for all request params and response ```ts import Blockaid from '@blockaid/client'; -const client = new Blockaid({ - apiKey: process.env['BLOCKAID_CLIENT_API_KEY'], // This is the default and can be omitted -}); +const client = new Blockaid(); async function main() { const params: Blockaid.Evm.JsonRpcScanParams = { @@ -138,6 +134,7 @@ You can use the `maxRetries` option to configure or disable this: // Configure the default for all requests: const client = new Blockaid({ maxRetries: 0, // default is 2 + apiKey: 'My API Key', }); // Or, configure per-request: @@ -155,6 +152,7 @@ Requests time out after 1 minute by default. You can configure this with a `time // Configure the default for all requests: const client = new Blockaid({ timeout: 20 * 1000, // 20 seconds (default is 1 minute) + apiKey: 'My API Key', }); // Override per-request: @@ -310,6 +308,7 @@ import { HttpsProxyAgent } from 'https-proxy-agent'; // Configure the default for all requests: const client = new Blockaid({ httpAgent: new HttpsProxyAgent(process.env.PROXY_URL), + apiKey: 'My API Key', }); // Override per-request: diff --git a/src/index.ts b/src/index.ts index 0bd4f56..0617513 100755 --- a/src/index.ts +++ b/src/index.ts @@ -139,10 +139,6 @@ export class Blockaid extends Core.APIClient { }; } - protected override authHeaders(opts: Core.FinalRequestOptions): Core.Headers { - return { 'X-API-Key': this.apiKey }; - } - static Blockaid = this; static DEFAULT_TIMEOUT = 60000; // 1 minute