@lit-protocol/vincent-policy-send-counter 0.0.4-mma → 0.1.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/CHANGELOG.md +14 -0
- package/CONTRIBUTING.md +4 -4
- package/README.md +18 -18
- package/dist/CHANGELOG.md +14 -0
- package/dist/CONTRIBUTING.md +4 -4
- package/dist/README.md +18 -18
- package/dist/package.json +2 -2
- package/dist/src/generated/lit-action.js +2 -2
- package/dist/src/generated/vincent-bundled-policy.d.ts +4 -4
- package/dist/src/generated/vincent-bundled-policy.js +2 -2
- package/dist/src/generated/vincent-bundled-policy.js.map +1 -1
- package/dist/src/generated/vincent-bundled-policy.ts +1 -1
- package/dist/src/generated/vincent-policy-metadata.json +1 -1
- package/dist/src/lib/lit-action.js +3 -3
- package/dist/src/lib/lit-action.js.map +1 -1
- package/dist/src/lib/schemas.d.ts +1 -1
- package/dist/src/lib/schemas.d.ts.map +1 -1
- package/dist/src/lib/schemas.js +2 -2
- package/dist/src/lib/schemas.js.map +1 -1
- package/dist/src/lib/vincent-policy.d.ts +4 -4
- package/dist/src/lib/vincent-policy.js +9 -9
- package/dist/src/lib/vincent-policy.js.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## 0.1.0 (2025-08-05)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Migrated abilities and policy to vincent monorepo ([f62d9461](https://github.com/LIT-Protocol/Vincent/commit/f62d9461))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated ability-sdk to 2.0.0
|
|
10
|
+
- Updated app-sdk to 2.0.0
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- FedericoAmura @FedericoAmura
|
package/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent Policy Send Co
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent Policy Send Counter is a policy that can be attached to
|
|
7
|
+
The Vincent Policy Send Counter is a policy that can be attached to abilities to avoid them spending more than a user-defined limit in a specific period of time. It's part of the Vincent Tools ecosystem and is built using the Vincent Tool SDK.
|
|
8
8
|
|
|
9
9
|
## Setup
|
|
10
10
|
|
|
@@ -48,7 +48,7 @@ nx action:deploy policy-spending-limit
|
|
|
48
48
|
## Policy Development Guidelines
|
|
49
49
|
|
|
50
50
|
1. Use the Vincent Tool SDK to create policies
|
|
51
|
-
2. Define clear schemas for
|
|
51
|
+
2. Define clear schemas for ability parameters and user parameters
|
|
52
52
|
3. Implement the policy lifecycle methods (evaluate, commit)
|
|
53
53
|
4. Handle errors gracefully
|
|
54
54
|
5. Write comprehensive tests for all functionality
|
|
@@ -56,7 +56,7 @@ nx action:deploy policy-spending-limit
|
|
|
56
56
|
|
|
57
57
|
## Integration with Tools
|
|
58
58
|
|
|
59
|
-
This policy can be integrated with various Vincent Tools to enforce sending limits. When developing or modifying the policy, consider how it will be used by
|
|
59
|
+
This policy can be integrated with various Vincent Tools to enforce sending limits. When developing or modifying the policy, consider how it will be used by abilities such as:
|
|
60
60
|
|
|
61
61
|
- Vincent Tool ERC20 Approval
|
|
62
62
|
- Vincent Tool Uniswap Swap
|
|
@@ -86,4 +86,4 @@ pnpm test
|
|
|
86
86
|
## Additional Resources
|
|
87
87
|
|
|
88
88
|
- [Vincent Documentation](https://docs.heyvincent.ai/)
|
|
89
|
-
- [Vincent
|
|
89
|
+
- [Vincent Ability SDK Documentation](../../libs/ability-sdk/README.md)
|
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Vincent Policy Send Counter
|
|
2
2
|
|
|
3
|
-
A policy that can be attached to Vincent
|
|
3
|
+
A policy that can be attached to Vincent abilitys to limit the number of transactions that can be sent within a specific time period.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent Policy Send Counter is part of the Vincent
|
|
7
|
+
The Vincent Policy Send Counter is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows users to set transaction count limits for abilitys, providing an additional layer of security and control.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
11
|
- Set maximum transaction limits per time period
|
|
12
|
-
- Track transaction counts across multiple
|
|
12
|
+
- Track transaction counts across multiple abilitys
|
|
13
13
|
- Configurable by users through the Vincent Dashboard
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
@@ -20,33 +20,33 @@ npm install @lit-protocol/vincent-policy-send-counter
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
This policy can be integrated with Vincent
|
|
23
|
+
This policy can be integrated with Vincent Abilities to enforce transaction count limits:
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
26
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from '@lit-protocol/vincent-
|
|
27
|
+
createVincentAbilityPolicy,
|
|
28
|
+
createVincentAbility,
|
|
29
|
+
supportedPoliciesForAbility,
|
|
30
|
+
} from '@lit-protocol/vincent-ability-sdk';
|
|
31
31
|
import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-send-counter';
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
// Your
|
|
33
|
+
const abilityParamsSchema = z.object({
|
|
34
|
+
// Your ability's parameter schema
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
const sendCounterPolicy =
|
|
38
|
-
|
|
37
|
+
const sendCounterPolicy = createVincentAbilityPolicy({
|
|
38
|
+
abilityParamsSchema,
|
|
39
39
|
bundledVincentPolicy,
|
|
40
|
-
// Map your
|
|
41
|
-
|
|
40
|
+
// Map your ability's parameters to the policy's expected parameters if needed
|
|
41
|
+
abilityParameterMappings: {
|
|
42
42
|
/* your parameter mappings */
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
supportedPolicies:
|
|
49
|
-
// ... rest of
|
|
46
|
+
export const myAbility = createVincentAbility({
|
|
47
|
+
abilityParamsSchema,
|
|
48
|
+
supportedPolicies: supportedPoliciesForAbility([sendCounterPolicy]),
|
|
49
|
+
// ... rest of ability implementation
|
|
50
50
|
});
|
|
51
51
|
```
|
|
52
52
|
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
## 0.1.0 (2025-08-05)
|
|
2
|
+
|
|
3
|
+
### 🚀 Features
|
|
4
|
+
|
|
5
|
+
- Migrated abilities and policy to vincent monorepo ([f62d9461](https://github.com/LIT-Protocol/Vincent/commit/f62d9461))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated ability-sdk to 2.0.0
|
|
10
|
+
- Updated app-sdk to 2.0.0
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- FedericoAmura @FedericoAmura
|
package/dist/CONTRIBUTING.md
CHANGED
|
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent Policy Send Co
|
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent Policy Send Counter is a policy that can be attached to
|
|
7
|
+
The Vincent Policy Send Counter is a policy that can be attached to abilities to avoid them spending more than a user-defined limit in a specific period of time. It's part of the Vincent Tools ecosystem and is built using the Vincent Tool SDK.
|
|
8
8
|
|
|
9
9
|
## Setup
|
|
10
10
|
|
|
@@ -48,7 +48,7 @@ nx action:deploy policy-spending-limit
|
|
|
48
48
|
## Policy Development Guidelines
|
|
49
49
|
|
|
50
50
|
1. Use the Vincent Tool SDK to create policies
|
|
51
|
-
2. Define clear schemas for
|
|
51
|
+
2. Define clear schemas for ability parameters and user parameters
|
|
52
52
|
3. Implement the policy lifecycle methods (evaluate, commit)
|
|
53
53
|
4. Handle errors gracefully
|
|
54
54
|
5. Write comprehensive tests for all functionality
|
|
@@ -56,7 +56,7 @@ nx action:deploy policy-spending-limit
|
|
|
56
56
|
|
|
57
57
|
## Integration with Tools
|
|
58
58
|
|
|
59
|
-
This policy can be integrated with various Vincent Tools to enforce sending limits. When developing or modifying the policy, consider how it will be used by
|
|
59
|
+
This policy can be integrated with various Vincent Tools to enforce sending limits. When developing or modifying the policy, consider how it will be used by abilities such as:
|
|
60
60
|
|
|
61
61
|
- Vincent Tool ERC20 Approval
|
|
62
62
|
- Vincent Tool Uniswap Swap
|
|
@@ -86,4 +86,4 @@ pnpm test
|
|
|
86
86
|
## Additional Resources
|
|
87
87
|
|
|
88
88
|
- [Vincent Documentation](https://docs.heyvincent.ai/)
|
|
89
|
-
- [Vincent
|
|
89
|
+
- [Vincent Ability SDK Documentation](../../libs/ability-sdk/README.md)
|
package/dist/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
# Vincent Policy Send Counter
|
|
2
2
|
|
|
3
|
-
A policy that can be attached to Vincent
|
|
3
|
+
A policy that can be attached to Vincent abilitys to limit the number of transactions that can be sent within a specific time period.
|
|
4
4
|
|
|
5
5
|
## Overview
|
|
6
6
|
|
|
7
|
-
The Vincent Policy Send Counter is part of the Vincent
|
|
7
|
+
The Vincent Policy Send Counter is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows users to set transaction count limits for abilitys, providing an additional layer of security and control.
|
|
8
8
|
|
|
9
9
|
## Features
|
|
10
10
|
|
|
11
11
|
- Set maximum transaction limits per time period
|
|
12
|
-
- Track transaction counts across multiple
|
|
12
|
+
- Track transaction counts across multiple abilitys
|
|
13
13
|
- Configurable by users through the Vincent Dashboard
|
|
14
14
|
|
|
15
15
|
## Installation
|
|
@@ -20,33 +20,33 @@ npm install @lit-protocol/vincent-policy-send-counter
|
|
|
20
20
|
|
|
21
21
|
## Usage
|
|
22
22
|
|
|
23
|
-
This policy can be integrated with Vincent
|
|
23
|
+
This policy can be integrated with Vincent Abilities to enforce transaction count limits:
|
|
24
24
|
|
|
25
25
|
```typescript
|
|
26
26
|
import {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
} from '@lit-protocol/vincent-
|
|
27
|
+
createVincentAbilityPolicy,
|
|
28
|
+
createVincentAbility,
|
|
29
|
+
supportedPoliciesForAbility,
|
|
30
|
+
} from '@lit-protocol/vincent-ability-sdk';
|
|
31
31
|
import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-send-counter';
|
|
32
32
|
|
|
33
|
-
const
|
|
34
|
-
// Your
|
|
33
|
+
const abilityParamsSchema = z.object({
|
|
34
|
+
// Your ability's parameter schema
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
const sendCounterPolicy =
|
|
38
|
-
|
|
37
|
+
const sendCounterPolicy = createVincentAbilityPolicy({
|
|
38
|
+
abilityParamsSchema,
|
|
39
39
|
bundledVincentPolicy,
|
|
40
|
-
// Map your
|
|
41
|
-
|
|
40
|
+
// Map your ability's parameters to the policy's expected parameters if needed
|
|
41
|
+
abilityParameterMappings: {
|
|
42
42
|
/* your parameter mappings */
|
|
43
43
|
},
|
|
44
44
|
});
|
|
45
45
|
|
|
46
|
-
export const
|
|
47
|
-
|
|
48
|
-
supportedPolicies:
|
|
49
|
-
// ... rest of
|
|
46
|
+
export const myAbility = createVincentAbility({
|
|
47
|
+
abilityParamsSchema,
|
|
48
|
+
supportedPolicies: supportedPoliciesForAbility([sendCounterPolicy]),
|
|
49
|
+
// ... rest of ability implementation
|
|
50
50
|
});
|
|
51
51
|
```
|
|
52
52
|
|
package/dist/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-policy-send-counter",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@lit-protocol/vincent-
|
|
8
|
+
"@lit-protocol/vincent-ability-sdk": "workspace:*",
|
|
9
9
|
"@uniswap/sdk-core": "^7.7.2",
|
|
10
10
|
"ethers": "^5.8.0",
|
|
11
11
|
"tslib": "2.8.1",
|