You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
require'solana/ruby/kit'Kit=Solana::Ruby::Kit# Generate a signersigner=Kit::Signers.generate_key_pair_signerputssigner.address# => base58 public key# Connect to devnetrpc=Kit::Rpc::Client.new(Kit::RpcTypes.devnet)putsrpc.get_slot# => 123456789# Build and send a transactionblockhash_resp=rpc.get_latest_blockhashconstraint=Kit::TransactionMessages::BlockhashLifetimeConstraint.new(blockhash: blockhash_resp.value.blockhash,last_valid_block_height: blockhash_resp.value.last_valid_block_height)msg=Kit::Functional.pipe(Kit::TransactionMessages.create_transaction_message(version: 0),->(tx){Kit::TransactionMessages.set_fee_payer(signer.address,tx)},->(tx){Kit::TransactionMessages.set_blockhash_lifetime(constraint,tx)})