alchemy-hello-world

Featured

Create a minimal Alchemy Web3 example: get ETH balance, fetch NFTs, read token balances. Use when starting blockchain development, testing Alchemy setup, or learning basic blockchain query patterns. Trigger: "alchemy hello world", "alchemy example", "alchemy quick start", "get ETH balance", "fetch NFTs alchemy".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Alchemy Hello World ## Overview Minimal working examples with the real Alchemy SDK: get ETH balance, fetch NFTs for a wallet, read ERC-20 token balances, and subscribe to pending transactions. ## Prerequisites - Completed `alchemy-install-auth` setup - `alchemy-sdk` installed (`npm install alchemy-sdk`) - Valid API key configured ## Instructions ### Step 1: Get ETH Balance ```typescript // src/hello-world/get-balance.ts import { Alchemy, Network, Utils } from 'alchemy-sdk'; const alchemy = new Alchemy({ apiKey: process.env.ALCHEMY_API_KEY, network: Network.ETH_MAINNET, }); async function getBalance(address: string) { const balanceWei = await alchemy.core.getBalance(address); const balanceEth = Utils.formatEther(balanceWei); console.log(`Balance of ${address}: ${balanceEth} ETH`); return balanceEth; } // Query Vitalik's address getBalance('0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045').catch(console.error); ``` ### Step 2: Fetch NFTs for a Wallet ```typescript // src/hello-world/get-nfts.ts import { Alchemy, Network } from 'alchemy-sdk'; const alchemy = new Alchemy({ apiKey: process.env.ALCHEMY_API_KEY, network: Network.ETH_MAINNET, }); async function getNftsForOwner(owner: string) { const nfts = await alchemy.nft.getNftsForOwner(owner); console.log(`Total NFTs: ${nfts.totalCount}`); for (const nft of nfts.ownedNfts.slice(0, 5)) { console.log(` ${nft.contract.name} — ${nft.name || nft.tokenId}`); console.log(` Contract: ${nft.co...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category