@fractional-company/common
Version:
Tessera constants
67 lines (66 loc) • 2.39 kB
TypeScript
import { ReconstructionBody } from "./optimistic-bid.events";
import { EventContextBody } from "./common";
import { InternalEventBuilder } from "./InternalEventBuilder";
import { TokenBodyType } from "./tessera.events";
export declare const VAULT_TOKEN_RECEIVED: string;
export declare const VAULT_TOKEN_SOLD: string;
export declare const VAULT_CREATED: string;
export declare const VAULT_CLOSED: string;
export declare const vaultParams: string[];
export declare type VaultBody = {
id: number;
slug: string | null;
name: string | null;
supply: string | null;
initialSupply: string | null;
closedAtBlock: number | null;
mintedAtBlock: number | null;
contractAddress: string | null;
curatorAddress: string | null;
chainId: number | null;
raeTokenAddress: string | null;
raeTokenId: number | null;
isVisible: boolean | null;
isActiveFrom: Date | null;
protoform: string | null;
tokenStandard: string | null;
tokenKey: string;
createdAt?: Date | null;
};
export declare type VaultCreatedBody = {
vault: VaultBody;
context: EventContextBody;
};
export declare type VaultClosedBody = {
vault: VaultBody;
reconstitution?: ReconstructionBody;
context: EventContextBody;
};
export declare type VaultTokenReceivedBody = {
vault: VaultBody;
token: TokenBodyType;
collectable: CollectableBody | null;
context: EventContextBody;
};
export declare type CollectableBody = {
collectionId: number;
collectableId: number;
};
export declare class VaultEventBuilder extends InternalEventBuilder {
protected vault: VaultBody | null;
protected token: TokenBodyType | null;
protected collectable: CollectableBody | null;
protected reconstitution: ReconstructionBody | null;
setVault(vault: VaultBody): this;
setToken(tokenAddress: string, tokenId?: string, chainId: number): this;
setCollectable(collectable: CollectableBody): this;
setReconstitution(reconstitution: ReconstructionBody): this;
protected getDefaultBody(): {
vault: any;
context: EventContextBody;
};
protected getCreatedBody(): VaultCreatedBody;
protected getTokenReceivedBody(): VaultTokenReceivedBody;
protected getClosedBody(): VaultClosedBody;
getEventBody(eventName: string): object;
}