Drift
The tx field of BuiltOrder carries an EVM transaction payload for on-chain AMM exchanges (e.g. Baozi). In TypeScript it is a precisely typed inline object with four required fields; in Python it is an untyped Dict[str, Any]. Users cannot discover the structure of the transaction payload from Python type annotations.
TypeScript SDK
sdks/typescript/pmxt/models.ts, lines 582–588:
export interface BuiltOrder {
...
/** For on-chain AMM exchanges: the EVM transaction payload. */
tx?: {
to: string;
data: string;
value: string;
chainId: number;
};
...
}
Python SDK
sdks/python/pmxt/models.py, lines 420–422:
@dataclass
class BuiltOrder:
...
tx: Optional[Dict[str, Any]] = None
"""For on-chain AMM exchanges: the EVM transaction payload."""
No field names (to, data, value, chainId) are declared; all access must be via string keys.
Expected
Python BuiltOrder.tx should be typed with a TypedDict (e.g. TxPayload) that declares:
class TxPayload(TypedDict):
to: str
data: str
value: str
chain_id: int
and the field annotated as tx: Optional[TxPayload] = None.
Impact
Python users who handle the EVM transaction path (e.g. on-chain AMM exchanges) have no type-safe way to access tx.to, tx.data, tx.value, tx.chain_id (or tx["chainId"]?). The correct key name (chain_id vs chainId) is undiscoverable without reading source code.
Found by automated SDK cross-language drift audit
Drift
The
txfield ofBuiltOrdercarries an EVM transaction payload for on-chain AMM exchanges (e.g. Baozi). In TypeScript it is a precisely typed inline object with four required fields; in Python it is an untypedDict[str, Any]. Users cannot discover the structure of the transaction payload from Python type annotations.TypeScript SDK
sdks/typescript/pmxt/models.ts, lines 582–588:Python SDK
sdks/python/pmxt/models.py, lines 420–422:No field names (
to,data,value,chainId) are declared; all access must be via string keys.Expected
Python
BuiltOrder.txshould be typed with aTypedDict(e.g.TxPayload) that declares:and the field annotated as
tx: Optional[TxPayload] = None.Impact
Python users who handle the EVM transaction path (e.g. on-chain AMM exchanges) have no type-safe way to access
tx.to,tx.data,tx.value,tx.chain_id(ortx["chainId"]?). The correct key name (chain_idvschainId) is undiscoverable without reading source code.Found by automated SDK cross-language drift audit