polygonprovider
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

DevDannyC Package: Polygon Provider

Installing and Importing

Node

/home/ricmoo> npm i polygonprovider
// JavaScript
const { PolygonscanProvider } = require("polygonprovider");

// TypeScript
import { PolygonscanProvider } from "polygonprovider";

Browser

Include the ESM module (ethers-polygonscan-provider.esm.js) in the same folder as the core library (i.e. ethers.esm.js) and import using:

<script type="module">
  import { PolygonscanProvider } from "./polygon.esm.js";
</script>

Application Programming Interface (API)

getDefaultProvider(networkish?)

Create a new default provider connected to networkish, which may be a chain name (i.e. "polygon-mainnet" or "polygon-testnet") or chain ID.

This will create a FallbackProvider, backed by all popular Third-Party polygon services (currently only polygoncsan).

PolygonscanProvider

The API for this provider is identical to the EtherscanProvider, except uses polygonscan.com (which is owned and operated by the same company as Etherscan and has the same underlying API) as its source for the Polygon network.

See EtherscanProvider.

License

MIT License.

Readme

Keywords

Package Sidebar

Install

npm i polygonprovider

Weekly Downloads

3

Version

0.0.3

License

MIT

Unpacked Size

114 kB

Total Files

79

Last publish

Collaborators

  • devdannyc