68 lines
1.9 KiB
Python
68 lines
1.9 KiB
Python
"""cardano_checkout — Python SDK for merchant-side Cardano payments + NFT cert minting.
|
|
|
|
Zero-custody by design: consumers provide a wallet xpub (account-level
|
|
extended public key). The SDK derives unique receive addresses per
|
|
invoice, polls the chain for payment, and (optionally) mints a CIP-25
|
|
NFT certificate of authenticity on confirmation.
|
|
|
|
Quick start::
|
|
|
|
from cardano_checkout import addresses, oracles
|
|
|
|
addr = addresses.derive_address(xpub_hex, index=42, network="mainnet")
|
|
price = await oracles.get_ada_usd_price()
|
|
lovelace = await oracles.convert_usd_to_lovelace(99.00)
|
|
|
|
For full invoice lifecycle see :mod:`cardano_checkout.invoice` +
|
|
:mod:`cardano_checkout.store` (Protocol-based persistence).
|
|
|
|
For NFT minting see :mod:`cardano_checkout.mint`.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
__version__ = "0.2.0-dev"
|
|
|
|
# Pure modules — stable API from extraction
|
|
from cardano_checkout import addresses, oracles # noqa: F401
|
|
|
|
# Payment lifecycle
|
|
from cardano_checkout.invoice import Invoice, InvoiceStatus # noqa: F401
|
|
from cardano_checkout.store import InMemoryStore, InvoiceStore # noqa: F401
|
|
|
|
# Monitoring + scheduling
|
|
from cardano_checkout.monitor import ( # noqa: F401
|
|
check_pending_invoices,
|
|
reprice_expired_invoices,
|
|
)
|
|
from cardano_checkout.scheduler import InvoiceScheduler # noqa: F401
|
|
|
|
# NFT + IPFS
|
|
from cardano_checkout.mint import ( # noqa: F401
|
|
MintPolicy,
|
|
UnsignedMint,
|
|
build_cip25_metadata,
|
|
mint_nft_cert,
|
|
submit_signed_tx,
|
|
)
|
|
from cardano_checkout.ipfs import IPFSClient, pin_bytes # noqa: F401
|
|
|
|
__all__ = [
|
|
"__version__",
|
|
"addresses",
|
|
"oracles",
|
|
"Invoice",
|
|
"InvoiceStatus",
|
|
"InvoiceStore",
|
|
"InMemoryStore",
|
|
"InvoiceScheduler",
|
|
"check_pending_invoices",
|
|
"reprice_expired_invoices",
|
|
"MintPolicy",
|
|
"UnsignedMint",
|
|
"mint_nft_cert",
|
|
"submit_signed_tx",
|
|
"build_cip25_metadata",
|
|
"IPFSClient",
|
|
"pin_bytes",
|
|
]
|