Nukez

Docs · PyNukez

PyNukez Helpers

optional · local

Helpers

Optional nukez_pay.py helper.

Python Helpers

nukez_pay.py lives on the client side of the payment boundary: PyNukez asks the gateway for a quote, this helper sends the selected payment, then PyNukez confirms the returned transaction signature.

Downloadnukez_pay.py

Standalone helper for selected x402 payment legs.

ScopeNo gateway custody

Key files remain local and transactions go through your RPC.

RailsSOL, SPL, MON, ERC-20

Use the quote fields to select the payment implementation.

Install

Install optional payment helper dependencies

Keep the SDK install separate from the local libraries needed only for payment execution examples.

shell
pip install "pynukez>=4.0.13"pip install solana solders web3 eth-account base58curl -fsSLO https://nukez.xyz/helpers/pynukez/nukez_pay.py

Code notes

The payment helper is optional. It exists for local examples and automation where you want the selected x402 payment leg executed from your own machine.

The helper reads local key files only on your machine. Nukez does not receive or store keypair material.

SOL payment

Execute the default native SOL quote

Use the helper to send the selected quote leg through your local keypair and RPC endpoint.

python
from pynukez import Nukezfrom nukez_pay import pay_from_request SVM_KEYPAIR = "~/.config/solana/id.json"SVM_RPC = "https://api.mainnet-beta.solana.com" client = Nukez(    keypair_path=SVM_KEYPAIR,  # optional local signer for gateway envelopes    base_url="https://api.nukez.xyz",    network="mainnet-beta",) req = client.request_storage(units=1, provider="gcs")payment = pay_from_request(    req,    svm_keypair=SVM_KEYPAIR,    svm_rpc=SVM_RPC,) receipt = client.confirm_storage(req.pay_req_id, **payment.confirm_kwargs())

Code notes

The helper reads the selected quote, sends the payment through the RPC endpoint you provide, and returns confirmation arguments that plug back into PyNukez.

Use this path for native SOL. For SPL tokens or EVM rails, request the specific payment leg first.

Alternate rails

Execute SPL token or Monad/EVM quotes

Select the desired payment network and asset before calling the helper for token or EVM-based legs.

python
req = client.request_storage(    units=1,    provider="gcs",    pay_network="solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp",    pay_asset="USDC",  # or USDT / WETH) spl_payment = pay_from_request(    req,    svm_keypair=SVM_KEYPAIR,    svm_rpc=SVM_RPC,) evm_req = client.request_storage(    units=1,    provider="gcs",    pay_network="eip155:143",    pay_asset="USDC",  # or USDT0 / MON / WETH) evm_payment = pay_from_request(    evm_req,    evm_keypair="~/.keys/evm_key.json",    evm_rpc="https://rpc.monad.xyz",)

Code notes

The helper can execute Solana SPL transfers, native EVM transfers, and ERC-20 transfers, provided the quote selects the correct network and asset.

Use the returned payment.confirm_kwargs() with client.confirm_storage(...) for whichever leg you execute.

Supported legs

What the helper supports

LegFunctionNotes
Solana SOLsend_sol(...)Native lamport transfer to the SOL treasury address.
Solana USDC / USDT / WETHsend_spl(...)SPL transfer_checked from payer ATA to treasury token account.
Monad MONsend_evm(...)Native EVM transfer.
Monad USDC / USDT0 / WETHsend_evm(..., token_address=...)ERC-20 transfer using the quote token contract.

§ next