@fractional-company/common
Version:
Tessera constants
84 lines (83 loc) • 2.93 kB
TypeScript
import { VaultBody } from "./vault.events";
import { EventContextBody } from "./common";
import { InternalEventBuilder } from "./InternalEventBuilder";
export declare const OPTIMISTIC_BID_CANCELLED: string;
export declare const OPTIMISTIC_BID_CREATED: string;
export declare const OPTIMISTIC_BID_FAILED: string;
export declare const OPTIMISTIC_BID_SUCCEED: string;
export declare const OPTIMISTIC_BID_REDEEM: string;
export declare const OPTIMISTIC_BID_CLOSED: string;
export declare const OPTIMISTIC_BID_CASHED_OUT: string;
export declare const reconstitutionParams: string[];
export declare type ReconstructionBody = {
id: string;
uuid: string;
vaultId: bigint;
method: string;
state: string;
creatorAddress: string;
remoteId: number | null;
isActive: boolean;
proposedVaultPriceWei: string | null;
proposedRaePriceWei: string | null;
valueInPoolWei: string | null;
supplyInPool: number | null;
};
declare type OptimisticBidBuyoutDetail = {
buyoutPriceUsd: string;
buyoutPriceWei: string;
};
export declare type OptimisticBidFailedBody = {
vault: VaultBody;
reconstitution: ReconstructionBody;
details: OptimisticBidBuyoutDetail;
context: EventContextBody;
};
export declare type OptimisticBidSucceedBody = {
vault: VaultBody;
reconstitution: ReconstructionBody;
details: OptimisticBidBuyoutDetail;
context: EventContextBody;
};
export declare type OptimisticBidRedeemBody = {
vault: VaultBody;
reconstitution: ReconstructionBody;
context: EventContextBody;
};
export declare type OptimisticBidCreatedBody = {
vault: VaultBody;
reconstitution: ReconstructionBody;
details: OptimisticBidBuyoutDetail;
context: EventContextBody;
};
export declare type OptimisticBidCashedOutBody = {
vault: VaultBody;
reconstitution: ReconstructionBody;
details: {
amountBurned: number;
ethReceived: number;
ethReceivedUsd: string;
cashierAddress: string;
};
context: EventContextBody;
};
export declare class OptimisticBidEventBuilder extends InternalEventBuilder {
protected vault?: VaultBody;
protected reconstitution?: ReconstructionBody;
protected details?: object;
setVault(vault: VaultBody): this;
setReconstitution(reconstitution: ReconstructionBody): this;
setDetails(details: object): this;
protected getDefaultBody(): {
vault: any;
reconstitution: any;
context: EventContextBody;
};
protected getCreatedBody(): OptimisticBidCreatedBody;
protected getSucceedBody(): OptimisticBidSucceedBody;
protected getRedeemBody(): OptimisticBidSucceedBody;
protected getFailedBody(): OptimisticBidFailedBody;
protected getCashedOutBody(): OptimisticBidCashedOutBody;
getEventBody(eventName: string): object;
}
export {};