Transfer SOL
Transfers SOL from one account to another
import solcoin.transfer_sol as ts
from solana.rpc.api import Client
client = Client("your_RPC_url") # ex:https://api.mainnet-beta.solana.com
private_key_base58_string = "private_key_base58_string"
receiver_public_key_string = "receiver's pubkey"
sol_amount = .1 # how much sol you want to transfer
sig = ts.make_transfer(client, private_key_base58_string, receiver_public_key_string, sol_amount)
sends .1 sol to the receivers pubkey and returns the transaction signature
Last updated