@lit-protocol/vincent-policy-spending-limit 0.0.4-mma → 0.0.8-mma

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 CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ### 🧱 Updated Dependencies
8
8
 
9
- - Updated tool-sdk to 1.0.2
9
+ - Updated ability-sdk to 1.0.2
10
10
  - Updated app-sdk to 1.0.2
11
11
 
12
12
  ### ❤️ Thank You
package/CONTRIBUTING.md CHANGED
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent Policy Spendin
4
4
 
5
5
  ## Overview
6
6
 
7
- The Vincent Policy Spending Limit is a policy that can be attached to tools 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.
7
+ The Vincent Policy Spending Limit 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 Abilities ecosystem and is built using the Vincent Ability SDK.
8
8
 
9
9
  ## Setup
10
10
 
@@ -47,19 +47,19 @@ nx action:deploy policy-spending-limit
47
47
 
48
48
  ## Policy Development Guidelines
49
49
 
50
- 1. Use the Vincent Tool SDK to create policies
51
- 2. Define clear schemas for tool parameters and user parameters
50
+ 1. Use the Vincent Ability SDK to create policies
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
55
55
  6. Document the policy's purpose and usage
56
56
 
57
- ## Integration with Tools
57
+ ## Integration with Abilities
58
58
 
59
- This policy can be integrated with various Vincent Tools to enforce spending limits. When developing or modifying the policy, consider how it will be used by tools such as:
59
+ This policy can be integrated with various Vincent Abilities to enforce spending limits. When developing or modifying the policy, consider how it will be used by abilities such as:
60
60
 
61
- - Vincent Tool ERC20 Approval
62
- - Vincent Tool Uniswap Swap
61
+ - Vincent Ability ERC20 Approval
62
+ - Vincent Ability Uniswap Swap
63
63
 
64
64
  ## Testing
65
65
 
@@ -86,4 +86,4 @@ pnpm test
86
86
  ## Additional Resources
87
87
 
88
88
  - [Vincent Documentation](https://docs.heyvincent.ai/)
89
- - [Vincent Tool SDK Documentation](../../libs/tool-sdk/README.md)
89
+ - [Vincent Ability SDK Documentation](../../libs/ability-sdk/README.md)
package/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Vincent Policy Spending Limit
2
2
 
3
- A policy that can be attached to Vincent tools to avoid them spending more than a user-defined limit in a specific period of time.
3
+ A policy that can be attached to Vincent abilities to avoid them spending more than a user-defined limit in a specific period of time.
4
4
 
5
5
  ## Overview
6
6
 
7
- The Vincent Policy Spending Limit is part of the Vincent Tools ecosystem and is built using the Vincent Tool SDK. It allows users to set spending limits for tools that interact with their funds, providing an additional layer of security and control.
7
+ The Vincent Policy Spending Limit is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows users to set spending limits for abilities that interact with their funds, providing an additional layer of security and control.
8
8
 
9
9
  ## Features
10
10
 
11
11
  - Set maximum spending limits per period
12
- - Track spending across multiple tools
12
+ - Track spending across multiple abilities
13
13
  - Configurable by users through the Vincent Dashboard
14
14
 
15
15
  ## Installation
@@ -20,30 +20,30 @@ npm install @lit-protocol/vincent-policy-spending-limit
20
20
 
21
21
  ## Usage
22
22
 
23
- This policy can be integrated with Vincent Tools to enforce spending limits:
23
+ This policy can be integrated with Vincent Abilities to enforce spending limits:
24
24
 
25
25
  ```typescript
26
26
  import {
27
- createVincentToolPolicy,
28
- createVincentTool,
29
- supportedPoliciesForTool,
30
- } from '@lit-protocol/vincent-tool-sdk';
27
+ createVincentAbilityPolicy,
28
+ createVincentAbility,
29
+ supportedPoliciesForAbility,
30
+ } from '@lit-protocol/vincent-ability-sdk';
31
31
  import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-spending-limit';
32
32
 
33
- const toolParamsSchema = z.object({
33
+ const abilityParamsSchema = z.object({
34
34
  buy: z.boolean(),
35
35
  });
36
36
 
37
- const spendingLimitPolicy = createVincentToolPolicy({
38
- toolParamsSchema,
37
+ const spendingLimitPolicy = createVincentAbilityPolicy({
38
+ abilityParamsSchema,
39
39
  bundledVincentPolicy,
40
- toolParameterMappings: { buy: 'buyAmount' },
40
+ abilityParameterMappings: { buy: 'buyAmount' },
41
41
  });
42
42
 
43
- export const myTokenSwapTool = createVincentTool({
44
- toolParamsSchema,
45
- supportedPolicies: supportedPoliciesForTool([spendingLimitPolicy]),
46
- // ... rest of tool implementation
43
+ export const myTokenSwapAbility = createVincentAbility({
44
+ abilityParamsSchema,
45
+ supportedPolicies: supportedPoliciesForAbility([spendingLimitPolicy]),
46
+ // ... rest of ability implementation
47
47
  });
48
48
  ```
49
49
 
package/dist/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  ### 🧱 Updated Dependencies
8
8
 
9
- - Updated tool-sdk to 1.0.2
9
+ - Updated ability-sdk to 1.0.2
10
10
  - Updated app-sdk to 1.0.2
11
11
 
12
12
  ### ❤️ Thank You
@@ -4,7 +4,7 @@ This document provides guidelines for contributing to the Vincent Policy Spendin
4
4
 
5
5
  ## Overview
6
6
 
7
- The Vincent Policy Spending Limit is a policy that can be attached to tools 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.
7
+ The Vincent Policy Spending Limit 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 Abilities ecosystem and is built using the Vincent Ability SDK.
8
8
 
9
9
  ## Setup
10
10
 
@@ -47,19 +47,19 @@ nx action:deploy policy-spending-limit
47
47
 
48
48
  ## Policy Development Guidelines
49
49
 
50
- 1. Use the Vincent Tool SDK to create policies
51
- 2. Define clear schemas for tool parameters and user parameters
50
+ 1. Use the Vincent Ability SDK to create policies
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
55
55
  6. Document the policy's purpose and usage
56
56
 
57
- ## Integration with Tools
57
+ ## Integration with Abilities
58
58
 
59
- This policy can be integrated with various Vincent Tools to enforce spending limits. When developing or modifying the policy, consider how it will be used by tools such as:
59
+ This policy can be integrated with various Vincent Abilities to enforce spending limits. When developing or modifying the policy, consider how it will be used by abilities such as:
60
60
 
61
- - Vincent Tool ERC20 Approval
62
- - Vincent Tool Uniswap Swap
61
+ - Vincent Ability ERC20 Approval
62
+ - Vincent Ability Uniswap Swap
63
63
 
64
64
  ## Testing
65
65
 
@@ -86,4 +86,4 @@ pnpm test
86
86
  ## Additional Resources
87
87
 
88
88
  - [Vincent Documentation](https://docs.heyvincent.ai/)
89
- - [Vincent Tool SDK Documentation](../../libs/tool-sdk/README.md)
89
+ - [Vincent Ability SDK Documentation](../../libs/ability-sdk/README.md)
package/dist/README.md CHANGED
@@ -1,15 +1,15 @@
1
1
  # Vincent Policy Spending Limit
2
2
 
3
- A policy that can be attached to Vincent tools to avoid them spending more than a user-defined limit in a specific period of time.
3
+ A policy that can be attached to Vincent abilities to avoid them spending more than a user-defined limit in a specific period of time.
4
4
 
5
5
  ## Overview
6
6
 
7
- The Vincent Policy Spending Limit is part of the Vincent Tools ecosystem and is built using the Vincent Tool SDK. It allows users to set spending limits for tools that interact with their funds, providing an additional layer of security and control.
7
+ The Vincent Policy Spending Limit is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows users to set spending limits for abilities that interact with their funds, providing an additional layer of security and control.
8
8
 
9
9
  ## Features
10
10
 
11
11
  - Set maximum spending limits per period
12
- - Track spending across multiple tools
12
+ - Track spending across multiple abilities
13
13
  - Configurable by users through the Vincent Dashboard
14
14
 
15
15
  ## Installation
@@ -20,30 +20,30 @@ npm install @lit-protocol/vincent-policy-spending-limit
20
20
 
21
21
  ## Usage
22
22
 
23
- This policy can be integrated with Vincent Tools to enforce spending limits:
23
+ This policy can be integrated with Vincent Abilities to enforce spending limits:
24
24
 
25
25
  ```typescript
26
26
  import {
27
- createVincentToolPolicy,
28
- createVincentTool,
29
- supportedPoliciesForTool,
30
- } from '@lit-protocol/vincent-tool-sdk';
27
+ createVincentAbilityPolicy,
28
+ createVincentAbility,
29
+ supportedPoliciesForAbility,
30
+ } from '@lit-protocol/vincent-ability-sdk';
31
31
  import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-spending-limit';
32
32
 
33
- const toolParamsSchema = z.object({
33
+ const abilityParamsSchema = z.object({
34
34
  buy: z.boolean(),
35
35
  });
36
36
 
37
- const spendingLimitPolicy = createVincentToolPolicy({
38
- toolParamsSchema,
37
+ const spendingLimitPolicy = createVincentAbilityPolicy({
38
+ abilityParamsSchema,
39
39
  bundledVincentPolicy,
40
- toolParameterMappings: { buy: 'buyAmount' },
40
+ abilityParameterMappings: { buy: 'buyAmount' },
41
41
  });
42
42
 
43
- export const myTokenSwapTool = createVincentTool({
44
- toolParamsSchema,
45
- supportedPolicies: supportedPoliciesForTool([spendingLimitPolicy]),
46
- // ... rest of tool implementation
43
+ export const myTokenSwapAbility = createVincentAbility({
44
+ abilityParamsSchema,
45
+ supportedPolicies: supportedPoliciesForAbility([spendingLimitPolicy]),
46
+ // ... rest of ability implementation
47
47
  });
48
48
  ```
49
49
 
package/dist/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "access": "public"
6
6
  },
7
7
  "dependencies": {
8
- "@lit-protocol/vincent-tool-sdk": "workspace:*",
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",