fix: add alias 'to' to recipient field for CLI compatibility
Some checks failed
Blockchain Synchronization Verification / sync-verification (push) Failing after 11s
Integration Tests / test-service-integration (push) Has started running
Multi-Node Blockchain Health Monitoring / health-check (push) Has been cancelled
P2P Network Verification / p2p-verification (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

This commit is contained in:
aitbc
2026-04-28 15:52:09 +02:00
parent 118414697f
commit 0020aced99

View File

@@ -205,7 +205,7 @@ def _serialize_receipt(receipt: Receipt) -> Dict[str, Any]:
class TransactionRequest(BaseModel):
type: str = Field(description="Transaction type, e.g. TRANSFER, RECEIPT_CLAIM, GPU_MARKETPLACE, EXCHANGE, MESSAGE")
sender: str = Field(alias="from") # Accept both "sender" and "from"
recipient: str = Field(description="Recipient address (required for TRANSFER)")
recipient: str = Field(alias="to", description="Recipient address (required for TRANSFER)")
nonce: int
fee: int = Field(ge=0)
payload: Dict[str, Any]