diff --git a/packages/delegation-toolkit/src/constants.ts b/packages/delegation-toolkit/src/constants.ts index 0c851425..3e73a29b 100644 --- a/packages/delegation-toolkit/src/constants.ts +++ b/packages/delegation-toolkit/src/constants.ts @@ -7,3 +7,27 @@ export enum Implementation { Hybrid = 'Hybrid', Stateless7702 = 'Stateless7702', } + +/** + * Represents predefined time intervals (in seconds) for transfer windows. + * These values are commonly used to specify the duration of transfer periods, + * such as hourly, daily, weekly, etc., where each enum member's value is the + * number of seconds in that interval. + * @enum {number} + * @property {number} Hourly - 1 hour (3600 seconds) + * @property {number} Daily - 1 day (86400 seconds) + * @property {number} Weekly - 1 week (604800 seconds) + * @property {number} BiWeekly - 2 weeks (1209600 seconds) + * @property {number} Monthly - 1 month (30 days, 2592000 seconds) + * @property {number} Quarterly - 1 quarter (90 days, 7776000 seconds) + * @property {number} Yearly - 1 year (365 days, 31536000 seconds) + */ +export enum TransferWindow { + Hourly = 3600, // 60 * 60 (seconds) + Daily = 86400, // 60 * 60 * 24 (seconds) + Weekly = 604800, // 60 * 60 * 24 * 7 (seconds) + BiWeekly = 1209600, // 60 * 60 * 24 * 14 (seconds) + Monthly = 2592000, // 60 * 60 * 24 * 30 (seconds) + Quarterly = 7776000, // 60 * 60 * 24 * 90 (seconds) + Yearly = 31536000, // 60 * 60 * 24 * 365 (seconds) +} diff --git a/packages/delegation-toolkit/src/index.ts b/packages/delegation-toolkit/src/index.ts index 0750ad78..e4e3ee86 100644 --- a/packages/delegation-toolkit/src/index.ts +++ b/packages/delegation-toolkit/src/index.ts @@ -36,7 +36,7 @@ export { getDeleGatorEnvironment, } from './delegatorEnvironment'; -export { Implementation } from './constants'; +export { Implementation, TransferWindow } from './constants'; export { createExecution, ExecutionMode } from './executions';