provider-chainstack.d.ts 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. */
  14. import { FetchRequest } from "../utils/index.js";
  15. import { Network } from "./network.js";
  16. import { JsonRpcProvider } from "./provider-jsonrpc.js";
  17. import type { AbstractProvider } from "./abstract-provider.js";
  18. import type { CommunityResourcable } from "./community.js";
  19. import 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. */
  29. export 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