This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Account, | |
clusterApiUrl, | |
Connection, | |
PublicKey, | |
sendAndConfirmTransaction, | |
SystemProgram, | |
Transaction, | |
} from '@solana/web3.js'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const web3 = require('@solana/web3.js'); | |
const splToken = require('@solana/spl-token'); | |
(async () => { | |
//create connection to devnet | |
const connection = new web3.Connection(web3.clusterApiUrl("devnet")); | |
//generate keypair and airdrop 1000000000 Lamports (1 SOL) | |
const myKeypair = web3.Keypair.generate(); |