@fractional-company/common
Version:
Tessera constants
84 lines (83 loc) • 2.64 kB
TypeScript
import { VaultBody } from "./vault.events";
import { EventContextBody } from "./common";
import { InternalEventBuilder } from "./InternalEventBuilder";
export declare const LPDA_CREATED: string;
export declare const LPDA_BID: string;
export declare const LPDA_CLOSED: string;
export declare const LPDA_FAILED: string;
export declare const LPDA_ETH_REFUND: string;
export declare const distributionParams: string[];
export declare type DistributionBody = {
id: number;
uuid: string;
method: string;
creatorAddress: string;
isActive: boolean;
startDate: Date | null;
endDate: Date | null;
supply: string | null;
availableSupply: string | null;
initialRaePriceWei: string | null;
lastRaePriceWei: string | null;
};
export declare type BidBody = {
walletAddress: string;
priceWei: string;
priceFormatted: string;
priceUsd: string;
amount: number;
};
export declare type LPDABidBody = {
vault: VaultBody;
distribution: DistributionBody;
bid: BidBody;
context: EventContextBody;
};
export declare type LPDAClosedBody = {
vault: VaultBody;
distribution: DistributionBody;
isSuccessful: boolean;
context: EventContextBody;
};
export declare type LPDAFailedBody = {
vault: VaultBody;
distribution: DistributionBody;
context: EventContextBody;
};
export declare type LPDACreatedBody = {
vault: VaultBody;
distribution: DistributionBody;
context: EventContextBody;
};
export declare type LPDAETHRefundBody = {
vault: VaultBody;
distribution: DistributionBody;
details: {
amountWei: string;
amountUsd: string;
};
context: EventContextBody;
};
export declare class LPDAEventBuilder extends InternalEventBuilder {
protected vault?: VaultBody;
protected distribution?: DistributionBody;
protected details?: object;
protected bid?: BidBody;
protected isSuccessful?: boolean;
setVault(vault: VaultBody): this;
setBid(bid: BidBody): this;
setDetails(details: object): this;
setIsSuccessful(isSuccessful: boolean): this;
setDistribution(distribution: DistributionBody): this;
protected getDefaultBody(): {
vault: any;
distribution: any;
context: EventContextBody;
};
protected getCreatedBody(): LPDACreatedBody;
protected getClosedBody(): LPDAClosedBody;
protected getBidBody(): LPDABidBody;
protected getEthRefundBody(): LPDAETHRefundBody;
protected getFailedBody(): LPDAFailedBody;
getEventBody(eventName: string): object;
}