provider-pocket.d.ts 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. /**
  2. * [[link-pocket]] provides a third-party service for connecting to
  3. * various blockchains over JSON-RPC.
  4. *
  5. * **Supported Networks**
  6. *
  7. * - Ethereum Mainnet (``mainnet``)
  8. * - Goerli Testnet (``goerli``)
  9. * - Polygon (``matic``)
  10. * - Arbitrum (``arbitrum``)
  11. *
  12. * @_subsection: api/providers/thirdparty:Pocket [providers-pocket]
  13. */
  14. import { FetchRequest } from "../utils/index.js";
  15. import { AbstractProvider } from "./abstract-provider.js";
  16. import { Network } from "./network.js";
  17. import { JsonRpcProvider } from "./provider-jsonrpc.js";
  18. import type { CommunityResourcable } from "./community.js";
  19. import type { Networkish } from "./network.js";
  20. /**
  21. * The **PocketProvider** connects to the [[link-pocket]]
  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-pocket-signup).
  28. */
  29. export declare class PocketProvider extends JsonRpcProvider implements CommunityResourcable {
  30. /**
  31. * The Application ID for the Pocket connection.
  32. */
  33. readonly applicationId: string;
  34. /**
  35. * The Application Secret for making authenticated requests
  36. * to the Pocket connection.
  37. */
  38. readonly applicationSecret: null | string;
  39. /**
  40. * Create a new **PocketProvider**.
  41. *
  42. * By default connecting to ``mainnet`` with a highly throttled
  43. * API key.
  44. */
  45. constructor(_network?: Networkish, applicationId?: null | string, applicationSecret?: null | string);
  46. _getProvider(chainId: number): AbstractProvider;
  47. /**
  48. * Returns a prepared request for connecting to %%network%% with
  49. * %%applicationId%%.
  50. */
  51. static getRequest(network: Network, applicationId?: null | string, applicationSecret?: null | string): FetchRequest;
  52. isCommunityResource(): boolean;
  53. }
  54. //# sourceMappingURL=provider-pocket.d.ts.map