gmgn-api
v0.1.15
Published
Listen Solana, BSC, Base, Tron, Ethereum transaction from Gmgn API
Readme
gmgn-api
Listen Solana, BSC, Base, Tron, Ethereum transaction from Gmgn API
Join to follow updates: https://discord.gg/u955DwU8
Get started
npx puppeteer browsers install chrome
npm install gmgn-api- Install required dependencies if you are on linux machine/Docker
import GmgnApi from 'gmgn-api'
const gmgnApi = new GmgnApi()
const addresses = [
{address: 'pumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn', network: 'sol'}
]
gmgnApi.listen((data) => {
for (const tx of data) {
console.log(tx.txn, tx.walletAddress, tx);
}
}, addresses)Troubleshooting
- Error:
Syntax error: word unexpected (expecting ")")
Set PUPPETEER_CHROMIUM_BIN in the .env with the chromium location
- Installing in Docker
RUN apt-get update && apt-get install -y \
python3 \
wget \
ca-certificates \
fonts-liberation \
libappindicator3-1 \
libasound2 \
libatk-bridge2.0-0 \
libatk1.0-0 \
libcups2 \
libdbus-1-3 \
libdrm2 \
libgbm1 \
libgtk-3-0 \
libnspr4 \
libnss3 \
libx11-xcb1 \
libxcomposite1 \
libxdamage1 \
libxrandr2 \
xdg-utils \
libglib2.0-0 \
libxshmfence1 \
libxcb1 \
libxext6 \
libxfixes3 \
libxrender1 \
--no-install-recommends && \
apt-get clean && rm -rf /var/lib/apt/lists/*