ethers.js/lib.esm/providers/provider-infura.d.ts

99 lines
3.6 KiB
TypeScript
Raw Normal View History

2022-11-30 23:44:23 +03:00
/**
2023-01-28 09:53:29 +03:00
* [[link-infura]] provides a third-party service for connecting to
* various blockchains over JSON-RPC.
2022-11-30 23:44:23 +03:00
*
2023-01-28 09:53:29 +03:00
* **Supported Networks**
*
* - Ethereum Mainnet (``mainnet``)
* - Goerli Testnet (``goerli``)
* - Sepolia Testnet (``sepolia``)
* - Arbitrum (``arbitrum``)
* - Arbitrum Goerli Testnet (``arbitrum-goerli``)
2024-01-16 07:07:48 +03:00
* - Arbitrum Sepolia Testnet (``arbitrum-sepolia``)
* - Base (``base``)
* - Base Goerlia Testnet (``base-goerli``)
* - Base Sepolia Testnet (``base-sepolia``)
2024-01-17 22:33:43 +03:00
* - BNB Smart Chain Mainnet (``bnb``)
* - BNB Smart Chain Testnet (``bnbt``)
2024-01-16 07:07:48 +03:00
* - Linea (``linea``)
* - Linea Goerlia Testnet (``linea-goerli``)
2023-01-28 09:53:29 +03:00
* - Optimism (``optimism``)
* - Optimism Goerli Testnet (``optimism-goerli``)
2024-01-16 07:07:48 +03:00
* - Optimism Sepolia Testnet (``optimism-sepolia``)
2023-01-28 09:53:29 +03:00
* - Polygon (``matic``)
2023-02-23 14:31:09 +03:00
* - Polygon Mumbai Testnet (``matic-mumbai``)
2023-01-28 09:53:29 +03:00
*
* @_subsection: api/providers/thirdparty:INFURA [providers-infura]
2022-11-30 23:44:23 +03:00
*/
2022-09-16 05:58:45 +03:00
import { FetchRequest } from "../utils/index.js";
2022-09-05 23:57:11 +03:00
import { Network } from "./network.js";
import { JsonRpcProvider } from "./provider-jsonrpc.js";
2022-09-30 05:57:27 +03:00
import { WebSocketProvider } from "./provider-websocket.js";
2022-09-05 23:57:11 +03:00
import type { AbstractProvider } from "./abstract-provider.js";
import type { CommunityResourcable } from "./community.js";
import type { Networkish } from "./network.js";
2022-11-30 23:44:23 +03:00
/**
2023-01-28 09:53:29 +03:00
* The **InfuraWebSocketProvider** connects to the [[link-infura]]
* WebSocket end-points.
*
* By default, a highly-throttled API key is used, which is
* appropriate for quick prototypes and simple scripts. To
* gain access to an increased rate-limit, it is highly
* recommended to [sign up here](link-infura-signup).
2022-11-30 23:44:23 +03:00
*/
2022-09-30 05:57:27 +03:00
export declare class InfuraWebSocketProvider extends WebSocketProvider implements CommunityResourcable {
2023-01-28 09:53:29 +03:00
/**
* The Project ID for the INFURA connection.
*/
2022-09-30 05:57:27 +03:00
readonly projectId: string;
2023-01-28 09:53:29 +03:00
/**
* The Project Secret.
*
* If null, no authenticated requests are made. This should not
* be used outside of private contexts.
*/
2022-09-30 05:57:27 +03:00
readonly projectSecret: null | string;
2023-01-28 09:53:29 +03:00
/**
* Creates a new **InfuraWebSocketProvider**.
*/
2022-11-30 23:44:23 +03:00
constructor(network?: Networkish, projectId?: string);
2022-09-30 05:57:27 +03:00
isCommunityResource(): boolean;
}
2022-11-30 23:44:23 +03:00
/**
2023-01-28 09:53:29 +03:00
* The **InfuraProvider** connects to the [[link-infura]]
* JSON-RPC end-points.
*
* By default, a highly-throttled API key is used, which is
* appropriate for quick prototypes and simple scripts. To
* gain access to an increased rate-limit, it is highly
* recommended to [sign up here](link-infura-signup).
2022-11-30 23:44:23 +03:00
*/
2022-09-05 23:57:11 +03:00
export declare class InfuraProvider extends JsonRpcProvider implements CommunityResourcable {
2023-01-28 09:53:29 +03:00
/**
* The Project ID for the INFURA connection.
*/
2022-09-05 23:57:11 +03:00
readonly projectId: string;
2023-01-28 09:53:29 +03:00
/**
* The Project Secret.
*
* If null, no authenticated requests are made. This should not
* be used outside of private contexts.
*/
2022-09-05 23:57:11 +03:00
readonly projectSecret: null | string;
2023-01-28 09:53:29 +03:00
/**
* Creates a new **InfuraProvider**.
*/
2022-09-05 23:57:11 +03:00
constructor(_network?: Networkish, projectId?: null | string, projectSecret?: null | string);
_getProvider(chainId: number): AbstractProvider;
isCommunityResource(): boolean;
2023-01-28 09:53:29 +03:00
/**
* Creates a new **InfuraWebSocketProvider**.
*/
2022-11-30 23:44:23 +03:00
static getWebSocketProvider(network?: Networkish, projectId?: string): InfuraWebSocketProvider;
2023-01-28 09:53:29 +03:00
/**
* Returns a prepared request for connecting to %%network%%
* with %%projectId%% and %%projectSecret%%.
*/
2022-09-30 05:57:27 +03:00
static getRequest(network: Network, projectId?: null | string, projectSecret?: null | string): FetchRequest;
2022-09-05 23:57:11 +03:00
}
//# sourceMappingURL=provider-infura.d.ts.map