README.md in solana-ruby-web3js-2.0.0beta1 vs README.md in solana-ruby-web3js-2.0.0beta2

- old
+ new

@@ -340,11 +340,11 @@ #### Requirements: - **Sender's Keypair:** Either generate a new keypair or provide the private key for an existing sender account. This keypair is used to sign the transaction. - **Receiver's Public Key:** Specify the public key of the destination account. You can generate a new keypair for the receiver or use an existing public key. -- **Airdrop Functionality:** For Devnet or Testnet transactions, ensure that the sender's account is funded with sufficient lamports using the Solana airdrop feature. +- **Airdrop Functionality:** For Mainnet, Devnet, or Testnet transactions, ensure that the sender's account is funded with sufficient lamports using the Solana airdrop feature. - An initialized client to interact with the Solana blockchain. #### Example Usage: require 'solana_ruby' @@ -362,31 +362,31 @@ # sender_keypair = SolanaRuby::Keypair.from_private_key("InsertPrivateKeyHere") sender_pubkey = sender_keypair[:public_key] - # Airdrop some lamports to the sender's account + # Airdrop some lamports to the sender's account when needed. lamports = 10 * 1_000_000_000 sleep(1) result = client.request_airdrop(sender_pubkey, lamports) puts "Solana Balance #{lamports} lamports added sucessfully for the public key: #{sender_pubkey}" sleep(10) # Generate or use an existing receiver's public key # Option 1: Generate a new keypair for the receiver - receiver_keypair = SolanaRuby::Keypair.generate # generate receiver keypair + receiver_keypair = SolanaRuby::Keypair.generate receiver_pubkey = receiver_keypair[:public_key] # Option 2: Use an existing public key # receiver_pubkey = 'InsertExistingPublicKeyHere' transfer_lamports = 1 * 1_000_000 puts "Payer's full private key: #{sender_keypair[:full_private_key]}" puts "Receiver's full private key: #{receiver_keypair[:full_private_key]}" puts "Receiver's Public Key: #{receiver_keypair[:public_key]}" # Create a new transaction - transaction = SolanaRuby::TransactionHelper.new_sol_transaction( + transaction = SolanaRuby::TransactionHelper.sol_transfer( sender_pubkey, receiver_pubkey, transfer_lamports, recent_blockhash )