UNPKG

1.69 kBTypeScriptView Raw
1/**
2 * [[link-chainstack]] provides a third-party service for connecting to
3 * various blockchains over JSON-RPC.
4 *
5 * **Supported Networks**
6 *
7 * - Ethereum Mainnet (``mainnet``)
8 * - Arbitrum (``arbitrum``)
9 * - BNB Smart Chain Mainnet (``bnb``)
10 * - Polygon (``matic``)
11 *
12 * @_subsection: api/providers/thirdparty:Chainstack [providers-chainstack]
13 */
14import { FetchRequest } from "../utils/index.js";
15import { Network } from "./network.js";
16import { JsonRpcProvider } from "./provider-jsonrpc.js";
17import type { AbstractProvider } from "./abstract-provider.js";
18import type { CommunityResourcable } from "./community.js";
19import type { Networkish } from "./network.js";
20/**
21 * The **ChainstackProvider** connects to the [[link-chainstack]]
22 * JSON-RPC end-points.
23 *
24 * By default, a highly-throttled API key is used, which is
25 * appropriate for quick prototypes and simple scripts. To
26 * gain access to an increased rate-limit, it is highly
27 * recommended to [sign up here](link-chainstack).
28 */
29export declare class ChainstackProvider extends JsonRpcProvider implements CommunityResourcable {
30 /**
31 * The API key for the Chainstack connection.
32 */
33 readonly apiKey: string;
34 /**
35 * Creates a new **ChainstackProvider**.
36 */
37 constructor(_network?: Networkish, apiKey?: null | string);
38 _getProvider(chainId: number): AbstractProvider;
39 isCommunityResource(): boolean;
40 /**
41 * Returns a prepared request for connecting to %%network%%
42 * with %%apiKey%% and %%projectSecret%%.
43 */
44 static getRequest(network: Network, apiKey?: null | string): FetchRequest;
45}
46//# sourceMappingURL=provider-chainstack.d.ts.map
\No newline at end of file