Skip to main content

No project description provided

Project description

easysolpay

PyPI - Version PyPI - Python Version


Contact Us: https://x.com/RNovaai6363

One-line SOL transfer from JSON wallet files on Solana

A minimalist Python package that enables sending SOL (Solana's native token) from a JSON-formatted private key file (exported from wallets like Phantom, Solflare, Backpack, etc.) using a single function call.

Perfect for automation scripts, bots, CLI tools, testing utilities, or any scenario requiring simple programmatic SOL transfers.

Features

  • Extremely simple API: send_sol(wallet_json_path, to_address, amount_sol)
  • Automatically handles rent-exempt minimum balance for new/uninitialized accounts
  • Uses modern VersionedTransaction (MessageV0)
  • Built-in sender balance check before transaction
  • Supports custom RPC endpoints (mainnet, devnet, testnet, private nodes)
  • Configurable commitment level for confirmation
  • Prints Solscan link and user-friendly messages
  • Optional automatic adjustment for rent-exempt amount

Installation

From PyPI (recommended for end users)

pip install easysolpay

Quick Start

from easysolpay import send_sol

# Basic transfer
tx_signature = send_sol(
    wallet_json_path="~/my-wallet.json",
    to_address="9xY8zQw...RecipientPublicKeyHere",
    amount_sol=0.42
)

print(f"Transaction sent: https://solscan.io/tx/{tx_signature}")

Sending to a new (uninitialized) account

# Small amount → automatically adjusted to rent-exempt minimum (~0.00089088 SOL)
send_sol(
    wallet_json_path="wallet.json",
    to_address="NewAccount11111111111111111111111111111",
    amount_sol=0.0001,                     # will be raised if needed
    # auto_adjust_for_rent=True            # this is the default
)

Testing on devnet (highly recommended before mainnet)

send_sol(
    wallet_json_path="devnet-wallet.json",
    to_address="RecipientOnDevnet...",
    amount_sol=1.0,
    rpc_url="https://api.devnet.solana.com"
)

Function Signature

send_sol(
    wallet_json_path: Union[str, Path],
    to_address: Union[str, Pubkey],
    amount_sol: float,
    rpc_url: str = "https://api.mainnet-beta.solana.com",
    commitment = Confirmed,
    auto_adjust_for_rent: bool = True
) -> str

Returns: the transaction signature as a string.

License

easysolpay is distributed under the terms of the MIT license.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

easysolpay-0.0.7.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

easysolpay-0.0.7-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file easysolpay-0.0.7.tar.gz.

File metadata

  • Download URL: easysolpay-0.0.7.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for easysolpay-0.0.7.tar.gz
Algorithm Hash digest
SHA256 5f18cda10ecdf0365e0a2dd2bba6b647804edc9b1f45db29be3e485153085373
MD5 97c62cd31a1181db8a357c0c07bacec4
BLAKE2b-256 82f77f14a5a270ccf26ca4cbb5106204ea10a2a051c82721c22e796aa29843c0

See more details on using hashes here.

File details

Details for the file easysolpay-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: easysolpay-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for easysolpay-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c979311b6b7f22b8f93239cdc800a351b5548948f74d974a6eed87a461c399
MD5 c1c6f1cd8a9e5da5fa7de4ec8d2b30d0
BLAKE2b-256 2672cc4cb46291d5632709467b9a5ff64fc1895aef3a5b20d94a0b5e7cdebf42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page