generated from PolymeshAssociation/typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
/
types.ts
91 lines (82 loc) · 1.95 KB
/
types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
import BigNumber from 'bignumber.js';
import { DefaultPortfolio, Identity, NumberedPortfolio, Venue } from '~/internal';
export enum OfferingTimingStatus {
/**
* Start date not reached yet
*/
NotStarted = 'NotStarted',
/**
* Between start and end date
*/
Started = 'Started',
/**
* End date reached
*/
Expired = 'Expired',
}
export enum OfferingBalanceStatus {
/**
* There still are Asset tokens available for purchase
*/
Available = 'Available',
/**
* All Asset tokens in the Offering have been sold
*/
SoldOut = 'SoldOut',
/**
* There are remaining Asset tokens, but their added value is lower than the Offering's
* minimum investment, so they cannot be purchased. The Offering should be manually closed
* to retrieve them
*/
Residual = 'Residual',
}
export enum OfferingSaleStatus {
/**
* Sale temporarily paused, can be resumed (unfrozen)
*/
Frozen = 'Frozen',
/**
* Investments can be made
*/
Live = 'Live',
/**
* Sale was manually closed before the end date was reached
*/
ClosedEarly = 'ClosedEarly',
/**
* Sale was manually closed after the end date was reached
*/
Closed = 'Closed',
}
export interface OfferingStatus {
timing: OfferingTimingStatus;
balance: OfferingBalanceStatus;
sale: OfferingSaleStatus;
}
export interface OfferingTier {
amount: BigNumber;
price: BigNumber;
}
export interface Tier extends OfferingTier {
remaining: BigNumber;
}
export interface OfferingDetails {
creator: Identity;
name: string;
offeringPortfolio: NumberedPortfolio | DefaultPortfolio;
raisingPortfolio: NumberedPortfolio | DefaultPortfolio;
raisingCurrency: string;
tiers: Tier[];
venue: Venue;
start: Date;
end: Date | null;
status: OfferingStatus;
minInvestment: BigNumber;
totalAmount: BigNumber;
totalRemaining: BigNumber;
}
export interface Investment {
investor: Identity;
soldAmount: BigNumber;
investedAmount: BigNumber;
}