Skip to main content

usdctofiat

USDCtoFiat by Galleon Labs. Python client for non-custodial USDC-to-fiat cash-out on Base.

Built on the public Peer/ZKP2P protocol. Not a Peer Cash product. Not Peerlytics.

https://usdctofiat.xyz · https://usdctofiat.xyz/developers

Install

pip install usdctofiat

This repository is the source. A PyPI release is a separate publish step and is not part of this scaffold.

Cash out

mode is required. Fast is 0% spread / 0 bps and earns TOFIAT. Best is Delegate at 10 bps.

The client never takes a wallet private key. Pass a signer callback that submits an unsigned tx, or call prepare() and sign in the host.

from usdctofiat import cashout, create_offramp

def signer(tx):
    # Host signs and submits {to, data, value, chain_id}. Return the tx hash.
    return submit(tx)

order = cashout(
    mode="fast",
    signer=signer,
    amount="100",
    currency="EUR",
    platform="revolut",
    payee="alice",
)
print(order.deposit_id, order.tx_hash, order.mode)

Strings and numbers are human USDC amounts. An int is exact six-decimal base units.

Prepare without a signer

offramp = create_offramp()
prepared = offramp.prepare(
    mode="fast",
    amount="100",
    currency="EUR",
    platform="revolut",
    payee="alice",
)
for tx, step in zip(prepared.txs, prepared.steps):
    print(step, tx.to, tx.data[:10])

create_offramp() locks attribution to peer-ref-TOFIAT then galleonlabs. Inbound referral_code and peer-ref-* values are discarded. Extra analytics referrers may be appended after those two.

What v1 does

  • Fast prepare-path: public curator POST /v2/makers/create (no API key), then unsigned USDC approve + EscrowV2 createDeposit at the oracle floor (0 bps, no Delegate vault), with ERC-8021 on every tx.
  • Best is the same deposit plus a Delegate setRateManager hook so the API exists. The hook is encoded after a deposit_id is known. No Relay. No attestation mint.
  • estimate, watch, withdraw / close, and deposits talk to the public indexer.

There is no POST /cashout. Deposit creation is onchain.

Base mainnet

Chain 8453
USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
EscrowV2 0x777777779d229cdF3110e9de47943791c26300Ef

HTTP: https://api.zkp2p.xyz and https://indexer.zkp2p.xyz/v1/graphql.

Agno toolkit draft

A local UsdctoFiatTools draft lives in examples/agno/. It is a copy-ready scaffold for a future agno-agi/agno PR (agno[usdctofiat]). It is not an installable Agno first-party tool. Do not open that host PR while the external cap is full. Mode is required. No private-key constructor.

Licence

MIT

Metadata

Release files for usdctofiat 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for usdctofiat 0.1.0
File Size Uploaded Provenance
usdctofiat-0.1.0.tar.gz 19.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for usdctofiat 0.1.0
File Interpreter ABI Platform
usdctofiat-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 37.5 kB

Release files / usdctofiat-0.1.0.tar.gz

Download URL usdctofiat-0.1.0.tar.gz
Size 19.1 kB
Tags Source
SHA-256 checksum
How to use checksums
95a000e6a4a6181b5ba99deb4159b0b09c39c691511b028fcf76105195632b5c
BLAKE2b-256 checksum
How to use checksums
2d50fc24512a5942a8a9a08e94f947e69715d3d9be6f730e01ed8a1361eaee8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / usdctofiat-0.1.0-py3-none-any.whl

Download URL usdctofiat-0.1.0-py3-none-any.whl
Size 18.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5b6225497d05b786cdf4397cb90f741d29066f5a4143a6b4a44b168f0d620b9
BLAKE2b-256 checksum
How to use checksums
dbd413862494ada48aa5f38bb085f09ecff649544f865343e5b5c2a1221bb42a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for usdctofiat 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page