lib-base.trovechange

Home > @mosaic/lib-base > TroveChange

TroveChange type

Represents the change between two Trove states.

Signature:

export declare type TroveChange<T> = {
    type: "invalidCreation";
    invalidTrove: Trove;
    error: TroveCreationError;
} | {
    type: "creation";
    params: TroveCreationParams<T>;
} | {
    type: "closure";
    params: TroveClosureParams<T>;
} | {
    type: "adjustment";
    params: TroveAdjustmentParams<T>;
    setToZero?: "collateral" | "debt";
};

References: Trove, TroveCreationError, TroveCreationParams, TroveClosureParams, TroveAdjustmentParams

Remarks

Returned by Trove.whatChanged().

Passed as a parameter to Trove.apply().

Last updated