crypull 1.0.1 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md DELETED
@@ -1,210 +0,0 @@
1
- <div align="center">
2
-
3
- # 🚀 Crypull
4
-
5
- **The Ultimate All-in-One Crypto API & CLI Tool**
6
-
7
- *Fetch cryptocurrency prices, top coins, deep token analytics, historical charts, network gas, and market sentiment across multiple platforms instantly—all completely for free, with zero API keys required.*
8
-
9
- ![TypeScript](https://img.shields.io/badge/TypeScript-007ACC?style=for-the-badge&logo=typescript&logoColor=white)
10
- ![NodeJS](https://img.shields.io/badge/Node.js-43853D?style=for-the-badge&logo=node.js&logoColor=white)
11
- ![npm](https://img.shields.io/badge/npm-CB3837?style=for-the-badge&logo=npm&logoColor=white)
12
- ![License](https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge)
13
- [![GitHub](https://img.shields.io/badge/GitHub-Repository-black?style=for-the-badge&logo=github)](https://github.com/Foisalislambd/crypull)
14
-
15
- </div>
16
-
17
- ---
18
-
19
- ## 📖 Table of Contents
20
- - [Why Crypull?](#-why-crypull)
21
- - [Installation](#-installation)
22
- - [💻 Command Line Interface (CLI) Guide](#-command-line-interface-cli-guide)
23
- - [1. Quick Price (`price`)](#1-get-a-quick-price)
24
- - [2. Deep Token Analytics (`info`)](#2-deep-token-analytics)
25
- - [3. Top 50 Cryptocurrencies (`top`)](#3-top-50-cryptocurrencies)
26
- - [4. Trending Coins (`trending`)](#4-trending-coins)
27
- - [5. Historical Charts (`chart`)](#5-historical-ascii-charts)
28
- - [6. Global Market Data (`market`)](#6-global-market-overview)
29
- - [7. Ethereum Gas Tracker (`gas`)](#7-ethereum-gas-tracker)
30
- - [8. Fear & Greed Index (`sentiment`)](#8-fear--greed-index)
31
- - [🛠️ Usage in Your Project (TypeScript / Node.js)](#%EF%B8%8F-usage-in-your-project-typescript--nodejs)
32
- - [1. Import and Initialize](#1-import-and-initialize)
33
- - [2. Available API Methods](#2-available-api-methods)
34
- - [3. Customizing Providers](#3-customizing-providers)
35
- - [Supported Providers](#-supported-providers)
36
-
37
- ---
38
-
39
- ## ✨ Why Crypull?
40
-
41
- 1. **Smart Routing:** It automatically detects if you're typing a symbol (like `BTC`) or a smart contract address (like `0x...`) and routes it to the correct provider.
42
- 2. **Zero Dependencies (Core):** Uses the native Node.js `fetch` API.
43
- 3. **100% Free APIs:** Pulls from CoinGecko, DexScreener, Binance, CoinCap, Coinpaprika, and CryptoCompare—no paid API keys required.
44
- 4. **DEX & CEX Coverage:** Finds both Top 100 exchange coins and brand new memecoins launching on Uniswap, Raydium, or PulseX.
45
- 5. **Beautiful CLI:** Built-in colored, heavily formatted terminal UI.
46
-
47
- ---
48
-
49
- ## 📦 Installation
50
-
51
- To use it in your terminal as a global CLI tool:
52
- ```bash
53
- npm install -g crypull
54
- ```
55
-
56
- To use it inside your Node.js or TypeScript project:
57
- ```bash
58
- npm install crypull
59
- ```
60
-
61
- ---
62
-
63
- ## 💻 Command Line Interface (CLI) Guide
64
-
65
- Once installed globally, you can run `crypull` from anywhere in your terminal!
66
-
67
- ### 1. Get a Quick Price
68
- Instantly fetch the current USD price of any symbol or contract address.
69
- ```bash
70
- $ crypull price btc
71
- $ crypull price 0x6982508145454Ce325dDbE47a25d4ec3d2311933
72
- ```
73
-
74
- ### 2. Deep Token Analytics
75
- Get detailed info including market cap, rank, FDV, 24h volume, circulating supply, all-time highs/lows, top DEX trading pairs, and official social links.
76
- ```bash
77
- $ crypull info eth
78
- $ crypull info solana
79
- ```
80
-
81
- ### 3. Top 50 Cryptocurrencies
82
- See a ranked, color-coded list of the Top 50 coins by global market capitalization.
83
- ```bash
84
- $ crypull top
85
- ```
86
-
87
- ### 4. Trending Coins
88
- See what the world is searching for! Fetches the top 10 most trending coins right now.
89
- ```bash
90
- $ crypull trending
91
- ```
92
-
93
- ### 5. Historical ASCII Charts
94
- Draw an actual historical price chart right inside your terminal!
95
- ```bash
96
- # Draws a 7-day chart by default
97
- $ crypull chart btc
98
-
99
- # Draw a 30-day chart for Solana
100
- $ crypull chart sol -d 30
101
- ```
102
-
103
- ### 6. Global Market Overview
104
- Get the total global cryptocurrency market cap, 24h volume, and BTC/ETH dominance percentages.
105
- ```bash
106
- $ crypull market
107
- ```
108
-
109
- ### 7. Ethereum Gas Tracker
110
- Check current Ethereum network congestion (Safe, Average, Fast) in Gwei.
111
- ```bash
112
- $ crypull gas
113
- ```
114
-
115
- ### 8. Fear & Greed Index
116
- Check current market sentiment (e.g., Extreme Fear vs. Extreme Greed).
117
- ```bash
118
- $ crypull sentiment
119
- ```
120
-
121
- ---
122
-
123
- ## 🛠️ Usage in Your Project (TypeScript / Node.js)
124
-
125
- Crypull is fully typed out of the box and works beautifully in any Node.js, Next.js, Express, or standard TypeScript project.
126
-
127
- ### 1. Import and Initialize
128
-
129
- You can simply import the global, ready-to-use `crypull` instance and call its methods immediately.
130
-
131
- **TypeScript / ES Modules (`import`)**
132
- ```typescript
133
- import { crypull } from 'crypull';
134
-
135
- async function fetchCryptoData() {
136
- // 1. Fetch a quick price
137
- const btcPrice = await crypull.price('BTC');
138
- console.log(`BTC Price: $${btcPrice?.priceUsd}`);
139
-
140
- // 2. Deep token info (works with contract addresses!)
141
- const pepeInfo = await crypull.info('0x6982508145454Ce325dDbE47a25d4ec3d2311933');
142
- console.log(`PEPE Market Cap: $${pepeInfo?.marketCap}`);
143
- console.log(`PEPE Volume 24h: $${pepeInfo?.volume24h}`);
144
- }
145
-
146
- fetchCryptoData();
147
- ```
148
-
149
- **CommonJS (`require`)**
150
- ```javascript
151
- const { crypull } = require('crypull');
152
-
153
- async function run() {
154
- const ethPrice = await crypull.price('ethereum');
155
- console.log('ETH Price:', ethPrice.priceUsd);
156
- }
157
- run();
158
- ```
159
-
160
- ### 2. Available API Methods
161
-
162
- | Method | Returns | Description |
163
- |--------|---------|-------------|
164
- | `price(query: string)` | `Promise<PriceData>` | Get basic symbol and USD price. |
165
- | `info(query: string)` | `Promise<TokenInfo>` | Massive payload including supplies, ATH/ATL, social links, and DEX pairs. |
166
- | `search(query: string)` | `Promise<SearchResult[]>` | Find coins by name or symbol across multiple providers. |
167
- | `top()` | `Promise<TopCoin[]>` | Get top 50 cryptocurrencies by market cap. |
168
- | `trending()` | `Promise<TrendingCoin[]>` | Get top 10 currently trending/searched tokens. |
169
- | `market()` | `Promise<GlobalMarketData>` | Global market cap, volume, and dominance metrics. |
170
- | `chart(query: string, days?: number)`| `Promise<ChartData>` | Arrays of timestamps and prices for building custom charts. |
171
- | `gas()` | `Promise<GasData>` | Current Ethereum Gwei prices. |
172
- | `sentiment()` | `Promise<SentimentData>` | Fear and Greed index (0-100). |
173
-
174
- ### 3. Customizing Providers
175
- By default, the global `crypull` instance smartly loops through all available providers until it finds the best data. If you want to explicitly restrict it to specific providers, you can instantiate your own class:
176
-
177
- ```typescript
178
- import { Crypull, CoinGeckoProvider, BinanceProvider } from 'crypull';
179
-
180
- // Create a custom instance that ONLY searches Binance and CoinGecko
181
- const customCrypull = new Crypull({
182
- providers: [
183
- new BinanceProvider(),
184
- new CoinGeckoProvider()
185
- ]
186
- });
187
-
188
- const price = await customCrypull.price('ETH');
189
- ```
190
-
191
- ---
192
-
193
- ## 🌐 Supported Providers
194
- Crypull queries data from the following platforms. It handles all rate-limits gracefully without requiring API keys.
195
-
196
- - **Binance:** Extremely fast for top CEX pairs.
197
- - **DexScreener:** Best for new and trending DEX tokens, contract addresses, and deep liquidity data.
198
- - **CoinGecko:** Broadest coverage for general coins, historical market data, and descriptions.
199
- - **Coinpaprika:** Provides extensive market data and supply metrics.
200
- - **CoinCap:** Fast, real-time pricing and market activity.
201
- - **CryptoCompare:** High-quality fallback market data.
202
- - **GeckoTerminal:** Fallback for custom networks and liquidity pools not fully indexed elsewhere.
203
-
204
- ---
205
-
206
- <div align="center">
207
-
208
- **Built with ❤️ for Web3 Developers by [Md Foisal Islam](https://github.com/Foisalislambd)**
209
-
210
- </div>
package/dist/cli.d.mts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node
package/dist/cli.d.ts DELETED
@@ -1 +0,0 @@
1
- #!/usr/bin/env node