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 USDCapprove+ EscrowV2createDepositat the oracle floor (0 bps, no Delegate vault), with ERC-8021 on every tx. - Best is the same deposit plus a Delegate
setRateManagerhook so the API exists. The hook is encoded after adeposit_idis known. No Relay. No attestation mint. estimate,watch,withdraw/close, anddepositstalk 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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file usdctofiat-0.1.0.tar.gz.
File metadata
- Download URL: usdctofiat-0.1.0.tar.gz
- Upload date:
- Size: 19.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95a000e6a4a6181b5ba99deb4159b0b09c39c691511b028fcf76105195632b5c
|
|
| MD5 |
8f3782b804ee799619cc766f6c8ad1cc
|
|
| BLAKE2b-256 |
2d50fc24512a5942a8a9a08e94f947e69715d3d9be6f730e01ed8a1361eaee8d
|
File details
Details for the file usdctofiat-0.1.0-py3-none-any.whl.
File metadata
- Download URL: usdctofiat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 18.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/7.0.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b5b6225497d05b786cdf4397cb90f741d29066f5a4143a6b4a44b168f0d620b9
|
|
| MD5 |
25eb6718d9fa9827f51d1d6591c347ae
|
|
| BLAKE2b-256 |
dbd413862494ada48aa5f38bb085f09ecff649544f865343e5b5c2a1221bb42a
|