38 lines
1.4 KiB
Python
38 lines
1.4 KiB
Python
"""Transaction construction helpers wrapping PyCardano.
|
|
|
|
v0.1.0 surface stub — the example-studio Phase-2 sprint will fill these in
|
|
with:
|
|
- Ogmios-backed `ChainContext` (via PyCardano's OgmiosChainContext)
|
|
- Build-transaction helpers for (a) plain ADA payment refunds, (b)
|
|
native-token mint+send, (c) reference-asset clones
|
|
- Cold-signer hand-off shape matching an external cold-signer payout pattern:
|
|
build_body_on_hot → transfer via temp dir → sign_offline_on_cold →
|
|
return signed_witness → submit_from_hot.
|
|
|
|
Exists as a named module in v0.1 so consumers can import the stable path
|
|
without having to update imports later.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
def _v0_2_sentinel(_name: str) -> None:
|
|
raise NotImplementedError(
|
|
f"txbuild.{_name} ships in cardano-checkout v0.2 alongside the "
|
|
"Ogmios chain-context wiring and cold-signer hand-off."
|
|
)
|
|
|
|
|
|
def build_mint_tx(*args, **kwargs): # noqa: D401, ANN002, ANN003
|
|
"""Build an unsigned mint transaction. v0.2."""
|
|
_v0_2_sentinel("build_mint_tx")
|
|
|
|
|
|
def build_payment_tx(*args, **kwargs): # noqa: D401, ANN002, ANN003
|
|
"""Build an unsigned payment transaction (e.g. refund path). v0.2."""
|
|
_v0_2_sentinel("build_payment_tx")
|
|
|
|
|
|
def submit_signed_tx(*args, **kwargs): # noqa: D401, ANN002, ANN003
|
|
"""Submit a signed tx to Ogmios. v0.2."""
|
|
_v0_2_sentinel("submit_signed_tx")
|