generated from PolymeshAssociation/typescript-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 11
/
types.ts
49 lines (42 loc) · 1.04 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
import BigNumber from 'bignumber.js';
import { Identity, SecurityToken } from '~/api/entities';
export enum InstructionStatus {
Pending = 'Pending',
Unknown = 'Unknown',
}
export enum InstructionType {
SettleOnAuthorization = 'SettleOnAuthorization',
SettleOnBlock = 'SettleOnBlock',
}
export type InstructionDetails = {
status: InstructionStatus;
createdAt: Date;
/**
* If null, the instruction is valid immediately
*/
validFrom: Date | null;
} & (
| {
type: InstructionType.SettleOnAuthorization;
}
| {
type: InstructionType.SettleOnBlock;
endBlock: BigNumber;
}
);
export interface Leg {
from: Identity; // NOTE @monitz87: change these identities to portfolios when the entity exists
to: Identity;
amount: BigNumber;
token: SecurityToken;
}
export enum AuthorizationStatus {
Unknown = 'Unknown',
Pending = 'Pending',
Authorized = 'Authorized',
Rejected = 'Rejected',
}
export interface AuthorizerWithAuthorizationStatus {
identity: Identity;
authorizarionStatus: AuthorizationStatus;
}