Constructs an empty adjustment; populate it through the group setters.
The amount group, or undefined.
Sets the amount group.
Accepts an AccountAdjustmentAmount object or a plain
AccountAdjustmentAmountInit literal.
Throws ParamError when a literal field is invalid.
The bounds group, or undefined.
Sets the bounds group.
Accepts an AccountAdjustmentBounds object or a plain
AccountAdjustmentBoundsInit literal.
Throws ParamError when a literal field is invalid.
The selected adjustment operation, or undefined.
Sets the operation group.
Accepts any exported adjustment-operation wrapper or its plain-object
form. A state field selects an account-wide PnL operation; the
removed pnl field is rejected outright, even alone. Position PnL
belongs to a balance operation as realizedPnl; a position operation
is selected by any position-specific field (underlyingAsset,
settlementAsset, collateralAsset, mode, leverage), otherwise the
literal is read as a balance operation. Combining state with any
balance/position field is rejected as ambiguous.
Throws TypeError when value is neither an operation wrapper nor a
plain object, when it declares the removed pnl field, or when it
combines state with a balance/position field; AssetError when a
literal asset string is empty; TypeError/RangeError/ParamError
when a literal field is otherwise invalid.
Returns a deep copy of this adjustment, including its groups.
Top-level account adjustment: operation, amount, and bounds.