This repository contains a code snippet utilizing the web3.js library to interact with the Solana blockchain. The primary goal is to provide practical examples and code snippets that facilitate the development of decentralized applications (dApps) on the Solana platform.
- Connecting to the Solana Blockchain: Establish a connection to a Solana cluster (devnet, testnet, or mainnet).
- Account Creation and Management: Examples of creating new accounts and managing private keys.
- Transactions: Sending and receiving SOL, as well as managing transactions.
- Data Retrieval: Fetching information about accounts, transactions, and deployed programs on the blockchain.
- Interacting with Solana Programs: Examples of calling smart contracts deployed on Solana.
- Node.js installed on your machine.
- An API key to access a Solana cluster (if necessary).
npm npm install @solana/web3.js
To use the snippets, open the npx esrun file.ts
file and follow the commented instructions for each feature.
Contributions are welcome! Feel free to submit pull requests or open issues to discuss improvements.
This project is licensed under the MIT License.