blockchain-compare-polygon
v1.0.1
Published
npm Package - blockchain-compare-polygon
Readme
blockchain-compare-polygon
Compare NEAR and Polygon blockchains across gas, speed, and features.
Installation
npm install blockchain-compare-polygon
Usage
import { compareGas, compareSpeed, compareFeatures, fullComparison, getNearBlockHeight, } from 'blockchain-compare-polygon';
Compare Gas
const gas = await compareGas(); console.log(gas);
Compare Speed
const speed = await compareSpeed(); console.log(speed);
Compare Features
const features = await compareFeatures(); console.log(features);
Full Comparison
const result = await fullComparison(); console.log(result.gas, result.speed, result.features);
Get NEAR Block Height
const { blockHeight, network } = await getNearBlockHeight(); console.log(blockHeight, network);
API
| Function | Returns | Description |
|---|---|---|
| compareGas() | Promise<GasComparison> | Compares gas costs between NEAR and Polygon |
| compareSpeed() | Promise<SpeedComparison> | Compares transaction speeds |
| compareFeatures() | Promise<FeatureComparison> | Compares blockchain features |
| fullComparison() | Promise<FullComparison> | Returns full comparison of gas, speed, and features |
| getNearBlockHeight() | Promise<{ blockHeight: number; network: string }> | Returns current NEAR block height |
License
MIT
