Skip to content

Commit e95cd0c

Browse files
committed
Add TransferWindow enum to constants and export it from index
1 parent 87ef890 commit e95cd0c

2 files changed

Lines changed: 28 additions & 1 deletion

File tree

packages/delegation-toolkit/src/constants.ts

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,30 @@ export enum Implementation {
77
Hybrid = 'Hybrid',
88
Stateless7702 = 'Stateless7702',
99
}
10+
11+
/**
12+
* Represents predefined time intervals (in seconds) for transfer windows.
13+
*
14+
* @remarks
15+
* These values are commonly used to specify the duration of transfer periods,
16+
* such as hourly, daily, weekly, etc., where each enum member's value is the
17+
* number of seconds in that interval.
18+
*
19+
* @enum {number}
20+
* @property {number} Hourly - 1 hour (3600 seconds)
21+
* @property {number} Daily - 1 day (86400 seconds)
22+
* @property {number} Weekly - 1 week (604800 seconds)
23+
* @property {number} BiWeekly - 2 weeks (1209600 seconds)
24+
* @property {number} Monthly - 1 month (30 days, 2592000 seconds)
25+
* @property {number} Quarterly - 1 quarter (90 days, 7776000 seconds)
26+
* @property {number} Yearly - 1 year (365 days, 31536000 seconds)
27+
*/
28+
export enum TransferWindow {
29+
Hourly = 3600, // 60 * 60 (seconds)
30+
Daily = 86400, // 60 * 60 * 24 (seconds)
31+
Weekly = 604800, // 60 * 60 * 24 * 7 (seconds)
32+
BiWeekly = 1209600, // 60 * 60 * 24 * 14 (seconds)
33+
Monthly = 2592000, // 60 * 60 * 24 * 30 (seconds)
34+
Quarterly = 7776000, // 60 * 60 * 24 * 90 (seconds)
35+
Yearly = 31536000, // 60 * 60 * 24 * 365 (seconds)
36+
}

packages/delegation-toolkit/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export {
3636
getDeleGatorEnvironment,
3737
} from './delegatorEnvironment';
3838

39-
export { Implementation } from './constants';
39+
export { Implementation, TransferWindow } from './constants';
4040

4141
export { createExecution, ExecutionMode } from './executions';
4242

0 commit comments

Comments
 (0)