@lit-protocol/vincent-policy-send-counter 0.0.12-mma → 0.1.1
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/CHANGELOG.md +7 -0
- package/dist/CHANGELOG.md +21 -0
- package/dist/CONTRIBUTING.md +89 -0
- package/dist/README.md +71 -0
- package/dist/package.json +1 -1
- package/dist/src/generated/lit-action.js +9 -0
- package/dist/src/generated/vincent-bundled-policy.d.ts +18 -18
- package/dist/src/generated/vincent-bundled-policy.ts +13 -0
- package/dist/src/generated/vincent-policy-metadata.json +1 -1
- package/dist/src/lib/schemas.d.ts +6 -6
- package/dist/src/lib/schemas.d.ts.map +1 -1
- package/dist/src/lib/schemas.js +4 -8
- package/dist/src/lib/schemas.js.map +1 -1
- package/dist/src/lib/vincent-policy.d.ts +18 -18
- package/dist/src/lib/vincent-policy.d.ts.map +1 -1
- package/dist/src/lib/vincent-policy.js +21 -31
- package/dist/src/lib/vincent-policy.js.map +1 -1
- package/package.json +3 -3
|
@@ -11,14 +11,14 @@ export declare const bundledVincentPolicy: import("@lit-protocol/vincent-ability
|
|
|
11
11
|
to: string;
|
|
12
12
|
amount: string;
|
|
13
13
|
}>, import("zod").ZodObject<{
|
|
14
|
-
maxSends: import("zod").
|
|
15
|
-
timeWindowSeconds: import("zod").
|
|
14
|
+
maxSends: import("zod").ZodNumber;
|
|
15
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
16
16
|
}, "strip", import("zod").ZodTypeAny, {
|
|
17
|
-
maxSends:
|
|
18
|
-
timeWindowSeconds:
|
|
17
|
+
maxSends: number;
|
|
18
|
+
timeWindowSeconds: number;
|
|
19
19
|
}, {
|
|
20
|
-
maxSends
|
|
21
|
-
timeWindowSeconds
|
|
20
|
+
maxSends: number;
|
|
21
|
+
timeWindowSeconds: number;
|
|
22
22
|
}>, import("zod").ZodObject<{
|
|
23
23
|
currentCount: import("zod").ZodNumber;
|
|
24
24
|
maxSends: import("zod").ZodNumber;
|
|
@@ -125,14 +125,14 @@ export declare const bundledVincentPolicy: import("@lit-protocol/vincent-ability
|
|
|
125
125
|
to: string;
|
|
126
126
|
amount: string;
|
|
127
127
|
}>, import("zod").ZodObject<{
|
|
128
|
-
maxSends: import("zod").
|
|
129
|
-
timeWindowSeconds: import("zod").
|
|
128
|
+
maxSends: import("zod").ZodNumber;
|
|
129
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
130
130
|
}, "strip", import("zod").ZodTypeAny, {
|
|
131
|
-
maxSends:
|
|
132
|
-
timeWindowSeconds:
|
|
131
|
+
maxSends: number;
|
|
132
|
+
timeWindowSeconds: number;
|
|
133
133
|
}, {
|
|
134
|
-
maxSends
|
|
135
|
-
timeWindowSeconds
|
|
134
|
+
maxSends: number;
|
|
135
|
+
timeWindowSeconds: number;
|
|
136
136
|
}>, import("zod").ZodObject<{
|
|
137
137
|
currentCount: import("zod").ZodNumber;
|
|
138
138
|
maxSends: import("zod").ZodNumber;
|
|
@@ -176,14 +176,14 @@ export declare const bundledVincentPolicy: import("@lit-protocol/vincent-ability
|
|
|
176
176
|
to: string;
|
|
177
177
|
amount: string;
|
|
178
178
|
}>, import("zod").ZodObject<{
|
|
179
|
-
maxSends: import("zod").
|
|
180
|
-
timeWindowSeconds: import("zod").
|
|
179
|
+
maxSends: import("zod").ZodNumber;
|
|
180
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
181
181
|
}, "strip", import("zod").ZodTypeAny, {
|
|
182
|
-
maxSends:
|
|
183
|
-
timeWindowSeconds:
|
|
182
|
+
maxSends: number;
|
|
183
|
+
timeWindowSeconds: number;
|
|
184
184
|
}, {
|
|
185
|
-
maxSends
|
|
186
|
-
timeWindowSeconds
|
|
185
|
+
maxSends: number;
|
|
186
|
+
timeWindowSeconds: number;
|
|
187
187
|
}>, import("zod").ZodObject<{
|
|
188
188
|
currentCount: import("zod").ZodNumber;
|
|
189
189
|
maxSends: import("zod").ZodNumber;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DO NOT EDIT THIS FILE. IT IS GENERATED ON BUILD.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { asBundledVincentPolicy } from '@lit-protocol/vincent-ability-sdk';
|
|
6
|
+
import { vincentPolicy } from '../lib/vincent-policy';
|
|
7
|
+
import metadata from './vincent-policy-metadata.json';
|
|
8
|
+
|
|
9
|
+
if(!metadata.ipfsCid) {
|
|
10
|
+
throw new Error('ipfsCid is not defined in metadata JSON file');
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export const bundledVincentPolicy = asBundledVincentPolicy(vincentPolicy, metadata.ipfsCid);
|
|
@@ -16,14 +16,14 @@ export declare const abilityParamsSchema: z.ZodObject<{
|
|
|
16
16
|
* User parameters schema - policy configuration set by the user
|
|
17
17
|
*/
|
|
18
18
|
export declare const userParamsSchema: z.ZodObject<{
|
|
19
|
-
maxSends: z.
|
|
20
|
-
timeWindowSeconds: z.
|
|
19
|
+
maxSends: z.ZodNumber;
|
|
20
|
+
timeWindowSeconds: z.ZodNumber;
|
|
21
21
|
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
maxSends:
|
|
23
|
-
timeWindowSeconds:
|
|
22
|
+
maxSends: number;
|
|
23
|
+
timeWindowSeconds: number;
|
|
24
24
|
}, {
|
|
25
|
-
maxSends
|
|
26
|
-
timeWindowSeconds
|
|
25
|
+
maxSends: number;
|
|
26
|
+
timeWindowSeconds: number;
|
|
27
27
|
}>;
|
|
28
28
|
/**
|
|
29
29
|
* Commit parameters schema - data passed to commit phase
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../../../src/lib/schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;EAS9B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;EAS3B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;EAO7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAKpC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;EAKnC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;EAKhC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;EAM/B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;EAMlC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;EAEjC,CAAC"}
|
package/dist/src/lib/schemas.js
CHANGED
|
@@ -20,16 +20,12 @@ exports.abilityParamsSchema = zod_1.z.object({
|
|
|
20
20
|
*/
|
|
21
21
|
exports.userParamsSchema = zod_1.z.object({
|
|
22
22
|
maxSends: zod_1.z
|
|
23
|
-
.
|
|
24
|
-
.
|
|
25
|
-
.max(100n)
|
|
26
|
-
.default(2n)
|
|
23
|
+
.number()
|
|
24
|
+
.positive()
|
|
27
25
|
.describe('Maximum number of sends allowed within the configured time window.'),
|
|
28
26
|
timeWindowSeconds: zod_1.z
|
|
29
|
-
.
|
|
30
|
-
.
|
|
31
|
-
.max(604800n)
|
|
32
|
-
.default(10n) // Default to 10 seconds for testing
|
|
27
|
+
.number()
|
|
28
|
+
.positive()
|
|
33
29
|
.describe('Length of the counting window in seconds (e.g., 10 = 10 seconds).'),
|
|
34
30
|
});
|
|
35
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;GAEG;AACU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,mCAAmC,CAAC;SAC3C,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,QAAQ,CAAC,iFAAiF,CAAC;CAC/F,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,OAAC;SACR,MAAM,EAAE;SACR,
|
|
1
|
+
{"version":3,"file":"schemas.js","sourceRoot":"","sources":["../../../src/lib/schemas.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;GAEG;AACU,QAAA,mBAAmB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1C,EAAE,EAAE,OAAC;SACF,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,mCAAmC,CAAC;SAC3C,QAAQ,CAAC,8DAA8D,CAAC;IAC3E,MAAM,EAAE,OAAC;SACN,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,EAAE,wBAAwB,CAAC;SAChC,QAAQ,CAAC,iFAAiF,CAAC;CAC/F,CAAC,CAAC;AAEH;;GAEG;AACU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,QAAQ,EAAE,OAAC;SACR,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,oEAAoE,CAAC;IACjF,iBAAiB,EAAE,OAAC;SACjB,MAAM,EAAE;SACR,QAAQ,EAAE;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,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6DAA6D,CAAC;CAC3F,CAAC,CAAC"}
|
|
@@ -8,14 +8,14 @@ export declare const vincentPolicy: import("node_modules/@lit-protocol/vincent-a
|
|
|
8
8
|
to: string;
|
|
9
9
|
amount: string;
|
|
10
10
|
}>, import("zod").ZodObject<{
|
|
11
|
-
maxSends: import("zod").
|
|
12
|
-
timeWindowSeconds: import("zod").
|
|
11
|
+
maxSends: import("zod").ZodNumber;
|
|
12
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
13
13
|
}, "strip", import("zod").ZodTypeAny, {
|
|
14
|
-
maxSends:
|
|
15
|
-
timeWindowSeconds:
|
|
14
|
+
maxSends: number;
|
|
15
|
+
timeWindowSeconds: number;
|
|
16
16
|
}, {
|
|
17
|
-
maxSends
|
|
18
|
-
timeWindowSeconds
|
|
17
|
+
maxSends: number;
|
|
18
|
+
timeWindowSeconds: number;
|
|
19
19
|
}>, import("zod").ZodObject<{
|
|
20
20
|
currentCount: import("zod").ZodNumber;
|
|
21
21
|
maxSends: import("zod").ZodNumber;
|
|
@@ -122,14 +122,14 @@ export declare const vincentPolicy: import("node_modules/@lit-protocol/vincent-a
|
|
|
122
122
|
to: string;
|
|
123
123
|
amount: string;
|
|
124
124
|
}>, import("zod").ZodObject<{
|
|
125
|
-
maxSends: import("zod").
|
|
126
|
-
timeWindowSeconds: import("zod").
|
|
125
|
+
maxSends: import("zod").ZodNumber;
|
|
126
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
127
127
|
}, "strip", import("zod").ZodTypeAny, {
|
|
128
|
-
maxSends:
|
|
129
|
-
timeWindowSeconds:
|
|
128
|
+
maxSends: number;
|
|
129
|
+
timeWindowSeconds: number;
|
|
130
130
|
}, {
|
|
131
|
-
maxSends
|
|
132
|
-
timeWindowSeconds
|
|
131
|
+
maxSends: number;
|
|
132
|
+
timeWindowSeconds: number;
|
|
133
133
|
}>, import("zod").ZodObject<{
|
|
134
134
|
currentCount: import("zod").ZodNumber;
|
|
135
135
|
maxSends: import("zod").ZodNumber;
|
|
@@ -173,14 +173,14 @@ export declare const vincentPolicy: import("node_modules/@lit-protocol/vincent-a
|
|
|
173
173
|
to: string;
|
|
174
174
|
amount: string;
|
|
175
175
|
}>, import("zod").ZodObject<{
|
|
176
|
-
maxSends: import("zod").
|
|
177
|
-
timeWindowSeconds: import("zod").
|
|
176
|
+
maxSends: import("zod").ZodNumber;
|
|
177
|
+
timeWindowSeconds: import("zod").ZodNumber;
|
|
178
178
|
}, "strip", import("zod").ZodTypeAny, {
|
|
179
|
-
maxSends:
|
|
180
|
-
timeWindowSeconds:
|
|
179
|
+
maxSends: number;
|
|
180
|
+
timeWindowSeconds: number;
|
|
181
181
|
}, {
|
|
182
|
-
maxSends
|
|
183
|
-
timeWindowSeconds
|
|
182
|
+
maxSends: number;
|
|
183
|
+
timeWindowSeconds: number;
|
|
184
184
|
}>, import("zod").ZodObject<{
|
|
185
185
|
currentCount: import("zod").ZodNumber;
|
|
186
186
|
maxSends: import("zod").ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vincent-policy.d.ts","sourceRoot":"","sources":["../../../src/lib/vincent-policy.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"vincent-policy.d.ts","sourceRoot":"","sources":["../../../src/lib/vincent-policy.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgRxB,CAAC"}
|
|
@@ -29,22 +29,19 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
29
29
|
const { maxSends, timeWindowSeconds } = userParams;
|
|
30
30
|
const { ethAddress } = delegatorPkpInfo;
|
|
31
31
|
try {
|
|
32
|
-
// Convert BigInt to number for helper function
|
|
33
|
-
const maxSendsNum = Number(maxSends);
|
|
34
|
-
const timeWindowSecondsNum = Number(timeWindowSeconds);
|
|
35
32
|
// Check current send limit for the user
|
|
36
|
-
const limitCheck = await (0, index_1.checkSendLimit)(ethAddress,
|
|
33
|
+
const limitCheck = await (0, index_1.checkSendLimit)(ethAddress, maxSends, timeWindowSeconds);
|
|
37
34
|
if (!limitCheck.allowed) {
|
|
38
35
|
const denyResult = {
|
|
39
|
-
reason: `Send limit exceeded. Maximum ${
|
|
36
|
+
reason: `Send limit exceeded. Maximum ${maxSends} sends per ${timeWindowSeconds} seconds. Try again in ${limitCheck.secondsUntilReset} seconds.`,
|
|
40
37
|
currentCount: limitCheck.currentCount,
|
|
41
|
-
maxSends:
|
|
38
|
+
maxSends: maxSends,
|
|
42
39
|
secondsUntilReset: limitCheck.secondsUntilReset || 0,
|
|
43
40
|
};
|
|
44
41
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 POLICY PRECHECK DENYING REQUEST:');
|
|
45
42
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 Deny result:', JSON.stringify(denyResult, null, 2));
|
|
46
43
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 Current count:', limitCheck.currentCount);
|
|
47
|
-
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 Max sends:',
|
|
44
|
+
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 Max sends:', maxSends);
|
|
48
45
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 Limit check result:', JSON.stringify(limitCheck, null, 2));
|
|
49
46
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/precheck] 🚫 About to call deny() function...');
|
|
50
47
|
const denyResponse = deny(denyResult);
|
|
@@ -52,15 +49,15 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
52
49
|
return denyResponse;
|
|
53
50
|
}
|
|
54
51
|
const allowResult = {
|
|
52
|
+
maxSends,
|
|
53
|
+
timeWindowSeconds,
|
|
55
54
|
currentCount: limitCheck.currentCount,
|
|
56
|
-
maxSends: Number(maxSends),
|
|
57
55
|
remainingSends: limitCheck.remainingSends,
|
|
58
|
-
timeWindowSeconds: Number(timeWindowSeconds),
|
|
59
56
|
};
|
|
60
57
|
console.log('[SendLimitPolicy/precheck] ✅ POLICY PRECHECK ALLOWING REQUEST:');
|
|
61
58
|
console.log('[SendLimitPolicy/precheck] ✅ Allow result:', JSON.stringify(allowResult, null, 2));
|
|
62
59
|
console.log('[SendLimitPolicy/precheck] ✅ Current count:', limitCheck.currentCount);
|
|
63
|
-
console.log('[SendLimitPolicy/precheck] ✅ Max sends:',
|
|
60
|
+
console.log('[SendLimitPolicy/precheck] ✅ Max sends:', maxSends);
|
|
64
61
|
console.log('[SendLimitPolicy/precheck] ✅ Remaining sends:', limitCheck.remainingSends);
|
|
65
62
|
const allowResponse = allow(allowResult);
|
|
66
63
|
console.log('[SendLimitPolicy/precheck] ✅ POLICY PRECHECK ALLOW RESPONSE:', JSON.stringify(allowResponse, null, 2));
|
|
@@ -69,14 +66,14 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
69
66
|
catch (error) {
|
|
70
67
|
console.error('[SendLimitPolicy/precheck] Error in precheck:', error);
|
|
71
68
|
return deny({
|
|
69
|
+
maxSends,
|
|
72
70
|
reason: `Policy error: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
|
73
71
|
currentCount: 0,
|
|
74
|
-
maxSends: Number(maxSends),
|
|
75
72
|
secondsUntilReset: 0,
|
|
76
73
|
});
|
|
77
74
|
}
|
|
78
75
|
},
|
|
79
|
-
evaluate: async ({ abilityParams, userParams }, { allow, deny,
|
|
76
|
+
evaluate: async ({ abilityParams, userParams }, { allow, deny, delegation: { delegatorPkpInfo } }) => {
|
|
80
77
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/evaluate] Evaluating send limit policy', {
|
|
81
78
|
abilityParams,
|
|
82
79
|
userParams,
|
|
@@ -86,10 +83,7 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
86
83
|
const { ethAddress } = delegatorPkpInfo;
|
|
87
84
|
const checkSendResponse = await Lit.Actions.runOnce({ waitForResponse: true, name: 'checkSendLimit' }, async () => {
|
|
88
85
|
try {
|
|
89
|
-
|
|
90
|
-
const maxSendsNum = Number(maxSends);
|
|
91
|
-
const timeWindowSecondsNum = Number(timeWindowSeconds);
|
|
92
|
-
const limitCheck = await (0, index_1.checkSendLimit)(ethAddress, maxSendsNum, timeWindowSecondsNum);
|
|
86
|
+
const limitCheck = await (0, index_1.checkSendLimit)(ethAddress, maxSends, timeWindowSeconds);
|
|
93
87
|
return JSON.stringify({
|
|
94
88
|
status: 'success',
|
|
95
89
|
...limitCheck,
|
|
@@ -105,21 +99,21 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
105
99
|
const parsedResponse = JSON.parse(checkSendResponse);
|
|
106
100
|
if (parsedResponse.status === 'error') {
|
|
107
101
|
return deny({
|
|
102
|
+
maxSends,
|
|
103
|
+
timeWindowSeconds,
|
|
108
104
|
reason: `Error checking send limit: ${parsedResponse.error} (evaluate)`,
|
|
109
105
|
currentCount: 0,
|
|
110
|
-
maxSends: Number(maxSends),
|
|
111
106
|
secondsUntilReset: 0,
|
|
112
|
-
timeWindowSeconds: Number(timeWindowSeconds),
|
|
113
107
|
});
|
|
114
108
|
}
|
|
115
109
|
const { allowed, currentCount, remainingSends, secondsUntilReset } = parsedResponse;
|
|
116
110
|
if (!allowed) {
|
|
117
111
|
return deny({
|
|
118
|
-
reason: `Send limit exceeded during evaluation. Maximum ${
|
|
112
|
+
reason: `Send limit exceeded during evaluation. Maximum ${maxSends} sends per ${timeWindowSeconds} seconds. Try again in ${secondsUntilReset} seconds.`,
|
|
119
113
|
currentCount,
|
|
120
|
-
maxSends
|
|
114
|
+
maxSends,
|
|
115
|
+
timeWindowSeconds,
|
|
121
116
|
secondsUntilReset: secondsUntilReset || 0,
|
|
122
|
-
timeWindowSeconds: Number(timeWindowSeconds),
|
|
123
117
|
});
|
|
124
118
|
}
|
|
125
119
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/evaluate] Evaluated send limit policy', {
|
|
@@ -129,16 +123,16 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
129
123
|
});
|
|
130
124
|
return allow({
|
|
131
125
|
currentCount,
|
|
132
|
-
maxSends
|
|
126
|
+
maxSends,
|
|
133
127
|
remainingSends,
|
|
134
|
-
timeWindowSeconds
|
|
128
|
+
timeWindowSeconds,
|
|
135
129
|
});
|
|
136
130
|
},
|
|
137
131
|
commit: async ({ currentCount, maxSends, timeWindowSeconds }, { allow, appId, delegation: { delegatorPkpInfo } }) => {
|
|
138
132
|
const { ethAddress } = delegatorPkpInfo;
|
|
139
133
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/commit] 🚀 IM COMMITING!');
|
|
140
134
|
// Check if we need to reset the counter first
|
|
141
|
-
const checkResponse = await (0, index_1.checkSendLimit)(ethAddress, maxSends,
|
|
135
|
+
const checkResponse = await (0, index_1.checkSendLimit)(ethAddress, maxSends, timeWindowSeconds);
|
|
142
136
|
if (checkResponse.shouldReset) {
|
|
143
137
|
console.log(`[@lit-protocol/vincent-policy-send-counter-limit/commit] Resetting counter for ${ethAddress} due to time window expiration`);
|
|
144
138
|
try {
|
|
@@ -155,22 +149,18 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
155
149
|
console.log(`[@lit-protocol/vincent-policy-send-counter-limit/commit] Recording send to contract for ${ethAddress} (appId: ${appId})`);
|
|
156
150
|
// Execute the contract call to increment the counter directly
|
|
157
151
|
console.log(`[@lit-protocol/vincent-policy-send-counter-limit/commit] Calling incrementByAddress(${ethAddress}) on contract ${counterSignatures_1.counterSignatures.address}`);
|
|
158
|
-
const provider = await Lit.Actions.getRpcUrl({ chain: 'yellowstone' });
|
|
159
152
|
// Call contract directly without Lit.Actions.runOnce wrapper
|
|
160
153
|
const txHash = await vincent_scaffold_sdk_1.laUtils.transaction.handler.contractCall({
|
|
161
|
-
provider,
|
|
154
|
+
provider: new ethers.providers.JsonRpcProvider(await Lit.Actions.getRpcUrl({ chain: 'yellowstone' })),
|
|
162
155
|
pkpPublicKey: delegatorPkpInfo.publicKey,
|
|
163
156
|
callerAddress: ethAddress,
|
|
164
157
|
abi: [counterSignatures_1.counterSignatures.methods.increment],
|
|
165
158
|
contractAddress: counterSignatures_1.counterSignatures.address,
|
|
166
159
|
functionName: 'increment',
|
|
167
160
|
args: [],
|
|
168
|
-
overrides: {
|
|
169
|
-
gasLimit: 100000,
|
|
170
|
-
},
|
|
171
161
|
});
|
|
172
162
|
const newCount = currentCount + 1;
|
|
173
|
-
const remainingSends =
|
|
163
|
+
const remainingSends = maxSends - newCount;
|
|
174
164
|
console.log('[@lit-protocol/vincent-policy-send-counter-limit/commit] Policy commit successful', {
|
|
175
165
|
ethAddress,
|
|
176
166
|
newCount,
|
|
@@ -190,7 +180,7 @@ exports.vincentPolicy = (0, vincent_ability_sdk_1.createVincentPolicy)({
|
|
|
190
180
|
return allow({
|
|
191
181
|
recorded: false,
|
|
192
182
|
newCount: currentCount + 1,
|
|
193
|
-
remainingSends: Math.max(0,
|
|
183
|
+
remainingSends: Math.max(0, maxSends - currentCount - 1),
|
|
194
184
|
});
|
|
195
185
|
}
|
|
196
186
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vincent-policy.js","sourceRoot":"","sources":["../../../src/lib/vincent-policy.ts"],"names":[],"mappings":";;;AAAA,2EAAwE;AACxE,6EAA6D;AAE7D,2CAAmE;AACnE,uCAUmB;AACnB,+DAA4D;AAE/C,QAAA,aAAa,GAAG,IAAA,yCAAmB,EAAC;IAC/C,WAAW,EAAE,iDAA0D;IAEvE,mBAAmB,EAAnB,6BAAmB;IACnB,gBAAgB,EAAhB,0BAAgB;IAChB,kBAAkB,EAAlB,4BAAkB;IAElB,yBAAyB,EAAzB,mCAAyB;IACzB,wBAAwB,EAAxB,kCAAwB;IAExB,qBAAqB,EAArB,+BAAqB;IACrB,oBAAoB,EAApB,8BAAoB;IAEpB,uBAAuB,EAAvB,iCAAuB;IACvB,sBAAsB,EAAtB,gCAAsB;IAEtB,QAAQ,EAAE,KAAK,EACb,EAAE,aAAa,EAAE,UAAU,EAAE,EAC7B,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,gBAAgB,EAAE,EAAE,EACxD,EAAE;QACF,OAAO,CAAC,GAAG,CACT,sFAAsF,CACvF,CAAC;QACF,OAAO,CAAC,GAAG,CACT,uFAAuF,EACvF;YACE,aAAa;YACb,UAAU;YACV,UAAU,EAAE,gBAAgB,CAAC,UAAU;YACvC,KAAK;SACN,CACF,CAAC;QAEF,+DAA+D;QAC/D,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,GAAG,UAAU,CAAC;QACnD,MAAM,EAAE,UAAU,EAAE,GAAG,gBAAgB,CAAC;QAExC,IAAI,CAAC;YACH
|
|
1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EAAE,aAAa,EAAE,CAAC,CACtD;gBACD,YAAY,EAAE,gBAAgB,CAAC,SAAS;gBACxC,aAAa,EAAE,UAAU;gBACzB,GAAG,EAAE,CAAC,qCAAiB,CAAC,OAAO,CAAC,SAAS,CAAC;gBAC1C,eAAe,EAAE,qCAAiB,CAAC,OAAO;gBAC1C,YAAY,EAAE,WAAW;gBACzB,IAAI,EAAE,EAAE;aACT,CAAC,CAAC;YAEH,MAAM,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;YAClC,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAC;YAE3C,OAAO,CAAC,GAAG,CACT,mFAAmF,EACnF;gBACE,UAAU;gBACV,QAAQ;gBACR,QAAQ;gBACR,cAAc;gBACd,MAAM;aACP,CACF,CAAC;YAEF,OAAO,KAAK,CAAC;gBACX,QAAQ,EAAE,IAAI;gBACd,QAAQ;gBACR,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,cAAc,CAAC;aAC5C,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,iFAAiF,EACjF,KAAK,CACN,CAAC;YACF,8DAA8D;YAC9D,OAAO,KAAK,CAAC;gBACX,QAAQ,EAAE,KAAK;gBACf,QAAQ,EAAE,YAAY,GAAG,CAAC;gBAC1B,cAAc,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,GAAG,YAAY,GAAG,CAAC,CAAC;aACzD,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-policy-send-counter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
"ethers": "^5.8.0",
|
|
10
10
|
"tslib": "2.8.1",
|
|
11
11
|
"zod": "^3.25.64",
|
|
12
|
-
"@lit-protocol/vincent-ability-sdk": "
|
|
12
|
+
"@lit-protocol/vincent-ability-sdk": "2.0.1"
|
|
13
13
|
},
|
|
14
14
|
"peerDependencies": {
|
|
15
|
-
"@lit-protocol/vincent-app-sdk": "^
|
|
15
|
+
"@lit-protocol/vincent-app-sdk": "^2.0.1"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"esbuild": "^0.19.12",
|