@augustdigital/sdk 4.24.9 → 4.25.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/adapters/solana/getters.js +4 -0
- package/lib/adapters/solana/getters.js.map +1 -1
- package/lib/core/helpers/web3.d.ts +3 -2
- package/lib/core/helpers/web3.js +17 -1
- package/lib/core/helpers/web3.js.map +1 -1
- package/lib/modules/vaults/getters.d.ts +21 -0
- package/lib/modules/vaults/getters.js +292 -60
- package/lib/modules/vaults/getters.js.map +1 -1
- package/lib/modules/vaults/main.d.ts +1 -0
- package/lib/modules/vaults/main.js +20 -0
- package/lib/modules/vaults/main.js.map +1 -1
- package/lib/modules/vaults/utils/call-data-decoder.d.ts +14 -0
- package/lib/modules/vaults/utils/call-data-decoder.js +138 -0
- package/lib/modules/vaults/utils/call-data-decoder.js.map +1 -0
- package/lib/modules/vaults/utils/callDataDecoder.d.ts +14 -0
- package/lib/modules/vaults/utils/callDataDecoder.js +138 -0
- package/lib/modules/vaults/utils/callDataDecoder.js.map +1 -0
- package/lib/modules/vaults/utils/date-utils.d.ts +11 -0
- package/lib/modules/vaults/utils/date-utils.js +39 -0
- package/lib/modules/vaults/utils/date-utils.js.map +1 -0
- package/lib/modules/vaults/utils/dateUtils.d.ts +11 -0
- package/lib/modules/vaults/utils/dateUtils.js +39 -0
- package/lib/modules/vaults/utils/dateUtils.js.map +1 -0
- package/lib/modules/vaults/utils/index.d.ts +2 -0
- package/lib/modules/vaults/utils/index.js +19 -0
- package/lib/modules/vaults/utils/index.js.map +1 -0
- package/lib/types/vaults.d.ts +1 -0
- package/package.json +12 -12
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeWithdrawalProcessing = decodeWithdrawalProcessing;
|
|
4
|
+
exports.decodeFromReceiptLogs = decodeFromReceiptLogs;
|
|
5
|
+
exports.isMulticall = isMulticall;
|
|
6
|
+
exports.isWithdrawalProcessingFunction = isWithdrawalProcessingFunction;
|
|
7
|
+
function decodeWithdrawalProcessing(txData, iface) {
|
|
8
|
+
try {
|
|
9
|
+
const decoded = iface.parseTransaction({ data: txData });
|
|
10
|
+
if (!decoded || !decoded.args || decoded.args.length < 3) {
|
|
11
|
+
return {
|
|
12
|
+
functionName: 'unknown',
|
|
13
|
+
year: 0,
|
|
14
|
+
month: 0,
|
|
15
|
+
day: 0,
|
|
16
|
+
error: 'Invalid calldata: insufficient args',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const year = Number(decoded.args[0]);
|
|
20
|
+
const month = Number(decoded.args[1]);
|
|
21
|
+
const day = Number(decoded.args[2]);
|
|
22
|
+
if (year < 2000 || year > 2100 || month < 1 || month > 12 || day < 1) {
|
|
23
|
+
return {
|
|
24
|
+
functionName: 'unknown',
|
|
25
|
+
year,
|
|
26
|
+
month,
|
|
27
|
+
day,
|
|
28
|
+
error: 'Invalid date parameters',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const daysInMonth = new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
32
|
+
if (day > daysInMonth) {
|
|
33
|
+
return {
|
|
34
|
+
functionName: 'unknown',
|
|
35
|
+
year,
|
|
36
|
+
month,
|
|
37
|
+
day,
|
|
38
|
+
error: `Invalid day for month: ${day} > ${daysInMonth}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (decoded.name === 'processAllClaimsByDate') {
|
|
42
|
+
const maxLimit = decoded.args[3] ? Number(decoded.args[3]) : undefined;
|
|
43
|
+
return {
|
|
44
|
+
functionName: 'processAllClaimsByDate',
|
|
45
|
+
year,
|
|
46
|
+
month,
|
|
47
|
+
day,
|
|
48
|
+
maxLimit,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
else if (decoded.name === 'claim') {
|
|
52
|
+
const receiverAddr = decoded.args[3];
|
|
53
|
+
if (!receiverAddr) {
|
|
54
|
+
return {
|
|
55
|
+
functionName: 'unknown',
|
|
56
|
+
year,
|
|
57
|
+
month,
|
|
58
|
+
day,
|
|
59
|
+
error: 'Missing receiver address in claim()',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
functionName: 'claim',
|
|
64
|
+
year,
|
|
65
|
+
month,
|
|
66
|
+
day,
|
|
67
|
+
receiverAddr: receiverAddr.toString(),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
functionName: 'unknown',
|
|
72
|
+
year,
|
|
73
|
+
month,
|
|
74
|
+
day,
|
|
75
|
+
error: `Unknown withdrawal function: ${decoded.name}`,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return {
|
|
80
|
+
functionName: 'unknown',
|
|
81
|
+
year: 0,
|
|
82
|
+
month: 0,
|
|
83
|
+
day: 0,
|
|
84
|
+
error: error instanceof Error ? error.message : 'Unknown decoding error',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function decodeFromReceiptLogs(receipt, vaultAddress, iface) {
|
|
89
|
+
if (!receipt) {
|
|
90
|
+
return {
|
|
91
|
+
functionName: 'unknown',
|
|
92
|
+
year: 0,
|
|
93
|
+
month: 0,
|
|
94
|
+
day: 0,
|
|
95
|
+
error: 'No receipt available',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
for (const log of receipt.logs) {
|
|
99
|
+
if (log.address.toLowerCase() !== vaultAddress.toLowerCase()) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const parsed = iface.parseLog(log);
|
|
104
|
+
if (parsed && parsed.name === 'WithdrawalProcessed') {
|
|
105
|
+
return {
|
|
106
|
+
functionName: 'processAllClaimsByDate',
|
|
107
|
+
year: 0,
|
|
108
|
+
month: 0,
|
|
109
|
+
day: 0,
|
|
110
|
+
error: 'Event found but date not available in event schema',
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
functionName: 'unknown',
|
|
119
|
+
year: 0,
|
|
120
|
+
month: 0,
|
|
121
|
+
day: 0,
|
|
122
|
+
error: 'No WithdrawalProcessed logs found',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function isMulticall(functionName) {
|
|
126
|
+
const multicallNames = [
|
|
127
|
+
'multicall',
|
|
128
|
+
'aggregate',
|
|
129
|
+
'aggregate3',
|
|
130
|
+
'batchcall',
|
|
131
|
+
'batch',
|
|
132
|
+
];
|
|
133
|
+
return multicallNames.includes(functionName.toLowerCase());
|
|
134
|
+
}
|
|
135
|
+
function isWithdrawalProcessingFunction(functionName) {
|
|
136
|
+
return functionName === 'processAllClaimsByDate' || functionName === 'claim';
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=call-data-decoder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"call-data-decoder.js","sourceRoot":"","sources":["../../../../src.ts/modules/vaults/utils/call-data-decoder.ts"],"names":[],"mappings":";;AA6BA,gEA4FC;AAiBD,sDA8CC;AAYD,kCASC;AAQD,wEAEC;AA1LD,SAAgB,0BAA0B,CACxC,MAAc,EACd,KAAgB;IAEhB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,KAAK,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,CAAC;QAGzD,IAAI,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACzD,OAAO;gBACL,YAAY,EAAE,SAAS;gBACvB,IAAI,EAAE,CAAC;gBACP,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,CAAC;gBACN,KAAK,EAAE,qCAAqC;aAC7C,CAAC;QACJ,CAAC;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C;YACH,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;YACnC,IAAI,MAAM,IAAI,MAAM,CAAC,IAAI,KAAK,qBAAqB,EAAE,CAAC;gBAGpD,OAAO;oBACL,YAAY,EAAE,wBAAwB;oBACtC,IAAI,EAAE,CAAC;oBACP,KAAK,EAAE,CAAC;oBACR,GAAG,EAAE,CAAC;oBACN,KAAK,EAAE,oDAAoD;iBAC5D,CAAC;YACJ,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;QAEb,CAAC;IACH,CAAC;IAED,OAAO;QACL,YAAY,EAAE,SAAS;QACvB,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,GAAG,EAAE,CAAC;QACN,KAAK,EAAE,mCAAmC;KAC3C,CAAC;AACJ,CAAC;AAYD,SAAgB,WAAW,CAAC,YAAoB;IAC9C,MAAM,cAAc,GAAG;QACrB,WAAW;QACX,WAAW;QACX,YAAY;QACZ,WAAW;QACX,OAAO;KACR,CAAC;IACF,OAAO,cAAc,CAAC,QAAQ,CAAC,YAAY,CAAC,WAAW,EAAE,CAAC,CAAC;AAC7D,CAAC;AAQD,SAAgB,8BAA8B,CAAC,YAAoB;IACjE,OAAO,YAAY,KAAK,wBAAwB,IAAI,YAAY,KAAK,OAAO,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ContractTransactionReceipt, Interface } from 'ethers';
|
|
2
|
+
export interface ProcessingCallData {
|
|
3
|
+
functionName: 'processAllClaimsByDate' | 'claim' | 'unknown';
|
|
4
|
+
year: number;
|
|
5
|
+
month: number;
|
|
6
|
+
day: number;
|
|
7
|
+
maxLimit?: number;
|
|
8
|
+
receiverAddr?: string;
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function decodeWithdrawalProcessing(txData: string, iface: Interface): ProcessingCallData;
|
|
12
|
+
export declare function decodeFromReceiptLogs(receipt: ContractTransactionReceipt | null, vaultAddress: string, iface: Interface): Promise<ProcessingCallData>;
|
|
13
|
+
export declare function isMulticall(functionName: string): boolean;
|
|
14
|
+
export declare function isWithdrawalProcessingFunction(functionName: string): boolean;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeWithdrawalProcessing = decodeWithdrawalProcessing;
|
|
4
|
+
exports.decodeFromReceiptLogs = decodeFromReceiptLogs;
|
|
5
|
+
exports.isMulticall = isMulticall;
|
|
6
|
+
exports.isWithdrawalProcessingFunction = isWithdrawalProcessingFunction;
|
|
7
|
+
function decodeWithdrawalProcessing(txData, iface) {
|
|
8
|
+
try {
|
|
9
|
+
const decoded = iface.parseTransaction({ data: txData });
|
|
10
|
+
if (!decoded || !decoded.args || decoded.args.length < 3) {
|
|
11
|
+
return {
|
|
12
|
+
functionName: 'unknown',
|
|
13
|
+
year: 0,
|
|
14
|
+
month: 0,
|
|
15
|
+
day: 0,
|
|
16
|
+
error: 'Invalid calldata: insufficient args',
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
const year = Number(decoded.args[0]);
|
|
20
|
+
const month = Number(decoded.args[1]);
|
|
21
|
+
const day = Number(decoded.args[2]);
|
|
22
|
+
if (year < 2000 || year > 2100 || month < 1 || month > 12 || day < 1) {
|
|
23
|
+
return {
|
|
24
|
+
functionName: 'unknown',
|
|
25
|
+
year,
|
|
26
|
+
month,
|
|
27
|
+
day,
|
|
28
|
+
error: 'Invalid date parameters',
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const daysInMonth = new Date(year, month, 0).getDate();
|
|
32
|
+
if (day > daysInMonth) {
|
|
33
|
+
return {
|
|
34
|
+
functionName: 'unknown',
|
|
35
|
+
year,
|
|
36
|
+
month,
|
|
37
|
+
day,
|
|
38
|
+
error: `Invalid day for month: ${day} > ${daysInMonth}`,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
if (decoded.name === 'processAllClaimsByDate') {
|
|
42
|
+
const maxLimit = decoded.args[3] ? Number(decoded.args[3]) : undefined;
|
|
43
|
+
return {
|
|
44
|
+
functionName: 'processAllClaimsByDate',
|
|
45
|
+
year,
|
|
46
|
+
month,
|
|
47
|
+
day,
|
|
48
|
+
maxLimit,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
else if (decoded.name === 'claim') {
|
|
52
|
+
const receiverAddr = decoded.args[3];
|
|
53
|
+
if (!receiverAddr) {
|
|
54
|
+
return {
|
|
55
|
+
functionName: 'unknown',
|
|
56
|
+
year,
|
|
57
|
+
month,
|
|
58
|
+
day,
|
|
59
|
+
error: 'Missing receiver address in claim()',
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
return {
|
|
63
|
+
functionName: 'claim',
|
|
64
|
+
year,
|
|
65
|
+
month,
|
|
66
|
+
day,
|
|
67
|
+
receiverAddr: receiverAddr.toString(),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
functionName: 'unknown',
|
|
72
|
+
year,
|
|
73
|
+
month,
|
|
74
|
+
day,
|
|
75
|
+
error: `Unknown withdrawal function: ${decoded.name}`,
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
return {
|
|
80
|
+
functionName: 'unknown',
|
|
81
|
+
year: 0,
|
|
82
|
+
month: 0,
|
|
83
|
+
day: 0,
|
|
84
|
+
error: error instanceof Error ? error.message : 'Unknown decoding error',
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
async function decodeFromReceiptLogs(receipt, vaultAddress, iface) {
|
|
89
|
+
if (!receipt) {
|
|
90
|
+
return {
|
|
91
|
+
functionName: 'unknown',
|
|
92
|
+
year: 0,
|
|
93
|
+
month: 0,
|
|
94
|
+
day: 0,
|
|
95
|
+
error: 'No receipt available',
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
for (const log of receipt.logs) {
|
|
99
|
+
if (log.address.toLowerCase() !== vaultAddress.toLowerCase()) {
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
try {
|
|
103
|
+
const parsed = iface.parseLog(log);
|
|
104
|
+
if (parsed && parsed.name === 'WithdrawalProcessed') {
|
|
105
|
+
return {
|
|
106
|
+
functionName: 'processAllClaimsByDate',
|
|
107
|
+
year: 0,
|
|
108
|
+
month: 0,
|
|
109
|
+
day: 0,
|
|
110
|
+
error: 'Cannot extract date from logs (use Option 2 subgraph indexing)',
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
catch (e) {
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
return {
|
|
118
|
+
functionName: 'unknown',
|
|
119
|
+
year: 0,
|
|
120
|
+
month: 0,
|
|
121
|
+
day: 0,
|
|
122
|
+
error: 'No WithdrawalProcessed logs found',
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function isMulticall(functionName) {
|
|
126
|
+
const multicallNames = [
|
|
127
|
+
'multicall',
|
|
128
|
+
'aggregate',
|
|
129
|
+
'aggregate3',
|
|
130
|
+
'batchcall',
|
|
131
|
+
'batch',
|
|
132
|
+
];
|
|
133
|
+
return multicallNames.includes(functionName.toLowerCase());
|
|
134
|
+
}
|
|
135
|
+
function isWithdrawalProcessingFunction(functionName) {
|
|
136
|
+
return functionName === 'processAllClaimsByDate' || functionName === 'claim';
|
|
137
|
+
}
|
|
138
|
+
//# sourceMappingURL=callDataDecoder.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"callDataDecoder.js","sourceRoot":"","sources":["../../../../src.ts/modules/vaults/utils/callDataDecoder.ts"],"names":[],"mappings":";;AA6BA,gEA4FC;AAiBD,sDAiDC;AAYD,kCASC;AAQD,wEAEC;AA7LD,SAAgB,0BAA0B,CACxC,MAAc,EACd,KAAgB;IAEhB,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,K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
3
|
+
month: number;
|
|
4
|
+
day: number;
|
|
5
|
+
epoch: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function computeClaimableDate(requestTimestamp: number, lagDuration: number): ClaimableDate;
|
|
8
|
+
export declare function isClaimableNow(claimableEpoch: number, currentEpoch: number): boolean;
|
|
9
|
+
export declare function formatDateKey(year: number, month: number, day: number): string;
|
|
10
|
+
export declare function isValidClaimableDate(date: ClaimableDate): boolean;
|
|
11
|
+
export declare function getDaysInMonth(year: number, month: number): number;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeClaimableDate = computeClaimableDate;
|
|
4
|
+
exports.isClaimableNow = isClaimableNow;
|
|
5
|
+
exports.formatDateKey = formatDateKey;
|
|
6
|
+
exports.isValidClaimableDate = isValidClaimableDate;
|
|
7
|
+
exports.getDaysInMonth = getDaysInMonth;
|
|
8
|
+
function computeClaimableDate(requestTimestamp, lagDuration) {
|
|
9
|
+
const TIMESTAMP_MANIPULATION_WINDOW = 300;
|
|
10
|
+
const claimableEpoch = requestTimestamp + TIMESTAMP_MANIPULATION_WINDOW + lagDuration;
|
|
11
|
+
const date = new Date(claimableEpoch * 1000);
|
|
12
|
+
const year = date.getUTCFullYear();
|
|
13
|
+
const month = date.getUTCMonth() + 1;
|
|
14
|
+
const day = date.getUTCDate();
|
|
15
|
+
return { year, month, day, epoch: claimableEpoch };
|
|
16
|
+
}
|
|
17
|
+
function isClaimableNow(claimableEpoch, currentEpoch) {
|
|
18
|
+
const TIMESTAMP_MANIPULATION_WINDOW = 300;
|
|
19
|
+
return currentEpoch >= claimableEpoch - TIMESTAMP_MANIPULATION_WINDOW;
|
|
20
|
+
}
|
|
21
|
+
function formatDateKey(year, month, day) {
|
|
22
|
+
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
23
|
+
}
|
|
24
|
+
function isValidClaimableDate(date) {
|
|
25
|
+
if (date.year < 2000 ||
|
|
26
|
+
date.year > 2100 ||
|
|
27
|
+
date.month < 1 ||
|
|
28
|
+
date.month > 12 ||
|
|
29
|
+
date.day < 1 ||
|
|
30
|
+
date.epoch <= 0) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const daysInMonth = new Date(Date.UTC(date.year, date.month, 0)).getUTCDate();
|
|
34
|
+
return date.day <= daysInMonth;
|
|
35
|
+
}
|
|
36
|
+
function getDaysInMonth(year, month) {
|
|
37
|
+
return new Date(Date.UTC(year, month, 0)).getUTCDate();
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=date-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-utils.js","sourceRoot":"","sources":["../../../../src.ts/modules/vaults/utils/date-utils.ts"],"names":[],"mappings":";;AAyBA,oDAoBC;AAUD,wCAQC;AAMD,sCAMC;AAMD,oDAeC;AAQD,wCAEC;AAjFD,SAAgB,oBAAoB,CAClC,gBAAwB,EACxB,WAAmB;IAEnB,MAAM,6BAA6B,GAAG,GAAG,CAAC;IAI1C,MAAM,cAAc,GAClB,gBAAgB,GAAG,6BAA6B,GAAG,WAAW,CAAC;IAIjE,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AACrD,CAAC;AAUD,SAAgB,cAAc,CAC5B,cAAsB,EACtB,YAAoB;IAEpB,MAAM,6BAA6B,GAAG,GAAG,CAAC;IAG1C,OAAO,YAAY,IAAI,cAAc,GAAG,6BAA6B,CAAC;AACxE,CAAC;AAMD,SAAgB,aAAa,CAC3B,IAAY,EACZ,KAAa,EACb,GAAW;IAEX,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACrF,CAAC;AAMD,SAAgB,oBAAoB,CAAC,IAAmB;IACtD,IACE,IAAI,CAAC,IAAI,GAAG,IAAI;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI;QAChB,IAAI,CAAC,KAAK,GAAG,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,EAAE;QACf,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,KAAK,IAAI,CAAC,EACf,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IAC9E,OAAO,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC;AACjC,CAAC;AAQD,SAAgB,cAAc,CAAC,IAAY,EAAE,KAAa;IACxD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;AACzD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export interface ClaimableDate {
|
|
2
|
+
year: number;
|
|
3
|
+
month: number;
|
|
4
|
+
day: number;
|
|
5
|
+
epoch: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function computeClaimableDate(requestTimestamp: number, lagDuration: number): ClaimableDate;
|
|
8
|
+
export declare function isClaimableNow(claimableEpoch: number, currentEpoch: number): boolean;
|
|
9
|
+
export declare function formatDateKey(year: number, month: number, day: number): string;
|
|
10
|
+
export declare function isValidClaimableDate(date: ClaimableDate): boolean;
|
|
11
|
+
export declare function getDaysInMonth(year: number, month: number): number;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.computeClaimableDate = computeClaimableDate;
|
|
4
|
+
exports.isClaimableNow = isClaimableNow;
|
|
5
|
+
exports.formatDateKey = formatDateKey;
|
|
6
|
+
exports.isValidClaimableDate = isValidClaimableDate;
|
|
7
|
+
exports.getDaysInMonth = getDaysInMonth;
|
|
8
|
+
function computeClaimableDate(requestTimestamp, lagDuration) {
|
|
9
|
+
const TIMESTAMP_MANIPULATION_WINDOW = 300;
|
|
10
|
+
const claimableEpoch = requestTimestamp + TIMESTAMP_MANIPULATION_WINDOW + lagDuration;
|
|
11
|
+
const date = new Date(claimableEpoch * 1000);
|
|
12
|
+
const year = date.getUTCFullYear();
|
|
13
|
+
const month = date.getUTCMonth() + 1;
|
|
14
|
+
const day = date.getUTCDate();
|
|
15
|
+
return { year, month, day, epoch: claimableEpoch };
|
|
16
|
+
}
|
|
17
|
+
function isClaimableNow(claimableEpoch, currentEpoch) {
|
|
18
|
+
const TIMESTAMP_MANIPULATION_WINDOW = 300;
|
|
19
|
+
return currentEpoch >= claimableEpoch - TIMESTAMP_MANIPULATION_WINDOW;
|
|
20
|
+
}
|
|
21
|
+
function formatDateKey(year, month, day) {
|
|
22
|
+
return `${year}-${String(month).padStart(2, '0')}-${String(day).padStart(2, '0')}`;
|
|
23
|
+
}
|
|
24
|
+
function isValidClaimableDate(date) {
|
|
25
|
+
if (date.year < 2000 ||
|
|
26
|
+
date.year > 2100 ||
|
|
27
|
+
date.month < 1 ||
|
|
28
|
+
date.month > 12 ||
|
|
29
|
+
date.day < 1 ||
|
|
30
|
+
date.epoch <= 0) {
|
|
31
|
+
return false;
|
|
32
|
+
}
|
|
33
|
+
const daysInMonth = new Date(date.year, date.month, 0).getUTCDate();
|
|
34
|
+
return date.day <= daysInMonth;
|
|
35
|
+
}
|
|
36
|
+
function getDaysInMonth(year, month) {
|
|
37
|
+
return new Date(year, month, 0).getUTCDate();
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=dateUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dateUtils.js","sourceRoot":"","sources":["../../../../src.ts/modules/vaults/utils/dateUtils.ts"],"names":[],"mappings":";;AAyBA,oDAmBC;AAUD,wCAQC;AAMD,sCAMC;AAMD,oDAeC;AAQD,wCAEC;AAhFD,SAAgB,oBAAoB,CAClC,gBAAwB,EACxB,WAAmB;IAEnB,MAAM,6BAA6B,GAAG,GAAG,CAAC;IAI1C,MAAM,cAAc,GAAG,gBAAgB,GAAG,6BAA6B,GAAG,WAAW,CAAC;IAItF,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAE7C,MAAM,IAAI,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;IACnC,MAAM,KAAK,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;IACrC,MAAM,GAAG,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;IAE9B,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC;AACrD,CAAC;AAUD,SAAgB,cAAc,CAC5B,cAAsB,EACtB,YAAoB;IAEpB,MAAM,6BAA6B,GAAG,GAAG,CAAC;IAG1C,OAAO,YAAY,IAAI,cAAc,GAAG,6BAA6B,CAAC;AACxE,CAAC;AAMD,SAAgB,aAAa,CAC3B,IAAY,EACZ,KAAa,EACb,GAAW;IAEX,OAAO,GAAG,IAAI,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,CAAC;AACrF,CAAC;AAMD,SAAgB,oBAAoB,CAAC,IAAmB;IACtD,IACE,IAAI,CAAC,IAAI,GAAG,IAAI;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI;QAChB,IAAI,CAAC,KAAK,GAAG,CAAC;QACd,IAAI,CAAC,KAAK,GAAG,EAAE;QACf,IAAI,CAAC,GAAG,GAAG,CAAC;QACZ,IAAI,CAAC,KAAK,IAAI,CAAC,EACf,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAGD,MAAM,WAAW,GAAG,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;IACpE,OAAO,IAAI,CAAC,GAAG,IAAI,WAAW,CAAC;AACjC,CAAC;AAQD,SAAgB,cAAc,CAAC,IAAY,EAAE,KAAa;IACxD,OAAO,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,UAAU,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./dateUtils"), exports);
|
|
18
|
+
__exportStar(require("./callDataDecoder"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src.ts/modules/vaults/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,oDAAkC"}
|
package/lib/types/vaults.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@augustdigital/sdk",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.25.0-alpha.0",
|
|
4
4
|
"main": "lib/index.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"augustdigital",
|
|
@@ -12,6 +12,16 @@
|
|
|
12
12
|
"author": "August Digital",
|
|
13
13
|
"license": "MIT",
|
|
14
14
|
"description": "JS SDK powering the August Digital ecosystem.",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"test": "pnpm build && cross-env node dist/test",
|
|
18
|
+
"test:jest": "jest",
|
|
19
|
+
"test:jest:watch": "jest --watch",
|
|
20
|
+
"test:jest:coverage": "jest --coverage",
|
|
21
|
+
"clean": "rm -rf ./lib",
|
|
22
|
+
"format": "eslint . --fix",
|
|
23
|
+
"lint-sdk": "lint-staged"
|
|
24
|
+
},
|
|
15
25
|
"lint-staged": {
|
|
16
26
|
"*.{ts,tsx,js,jsx,json}": [
|
|
17
27
|
"eslint --fix"
|
|
@@ -53,15 +63,5 @@
|
|
|
53
63
|
"viem": {
|
|
54
64
|
"optional": true
|
|
55
65
|
}
|
|
56
|
-
},
|
|
57
|
-
"scripts": {
|
|
58
|
-
"build": "tsc",
|
|
59
|
-
"test": "pnpm build && cross-env node dist/test",
|
|
60
|
-
"test:jest": "jest",
|
|
61
|
-
"test:jest:watch": "jest --watch",
|
|
62
|
-
"test:jest:coverage": "jest --coverage",
|
|
63
|
-
"clean": "rm -rf ./lib",
|
|
64
|
-
"format": "eslint . --fix",
|
|
65
|
-
"lint-sdk": "lint-staged"
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|