@lit-protocol/vincent-policy-contract-whitelist 0.0.7-mma → 0.0.11-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
@@ -0,0 +1,14 @@
1
+ # 1.0.0 (2025-08-05)
2
+
3
+ ### ⚠️ Breaking Changes
4
+
5
+ - #### Define uiSchema/jsonSchema for registry usage ([cebcee0c](https://github.com/LIT-Protocol/Vincent/commit/cebcee0c))
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
+ - Daryl Collins
package/README.md CHANGED
@@ -2,22 +2,28 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The Contract Whitelist Policy is a Vincent Policy that restricts the signing of EVM transactions to a predefined whitelist of contract addresses and function selectors across multiple chains. This policy provides critical security controls for Vincent Agent Wallets by ensuring they can only interact with trusted contracts and approved functions.
5
+ The Contract Whitelist Policy enforces strict access control for blockchain transactions by ensuring that Vincent Apps can only interact with
6
+ pre-approved smart contracts and execute specific whitelisted functions on those contracts.
6
7
 
7
- This Vincent Policy is designed to work with Vincent Abilities, particularly the [@lit-protocol/vincent-ability-transaction-signer](../ability-transaction-signer/) ability, to provide granular control over which transactions can be signed.
8
+ This Vincent Policy is designed to work with Vincent Abilities, particularly the [@lit-protocol/vincent-ability-evm-transaction-signer](../ability-evm-transaction-signer/) ability, to provide granular control over which transactions can be signed.
9
+
10
+ ## Key Features
11
+
12
+ - **Multi-chain Support**: Configure whitelists for multiple blockchain networks
13
+ - **Granular Function Control**: Specify which functions are whitelisted using the Solidity function signature
14
+ - **Wildcard Support**: Allow all functions for trusted contracts using the `*` wildcard
8
15
 
9
16
  ## How It Works
10
17
 
11
18
  The Contract Whitelist Policy is built using the Vincent Policy SDK and validates transactions against a hierarchical whitelist. Here's how it operates:
12
19
 
13
- - **Input**: Receives a serialized EVM transaction from the ability
14
- - **Parsing**: Uses `ethers.utils.parseTransaction` to extract transaction details
15
- - **Extraction**: Gets the chain ID, target contract address, and function selector (first 4 bytes of `data` field)
16
- - **Validation**: Checks against the whitelist hierarchy
17
- - **Whitelist Matching**: The policy checks in order:
18
- - Is the chain ID whitelisted?
19
- - Is the contract address whitelisted for that chain?
20
- - Is the function selector allowed (either explicitly or via wildcard `*`)?
20
+ 1. **Transaction Parsing**: Receives a serialized EVM transaction and parses it using ethers.js
21
+ 2. **Data Extraction**: Extracts the chain ID (the `chainId` field in the transaction), target contract address (the `to` field in the transaction), and function selector (first 4 bytes of the transaction `data` field)
22
+ 3. **Whitelist Validation**: Checks the transaction against the configured on-chain whitelist:
23
+ - Is the chain ID whitelisted?
24
+ - Is the contract address whitelisted for that chain?
25
+ - Is the function selector allowed (explicitly or via wildcard)?
26
+ 4. **Result**: Returns an allow or deny decision with detailed information
21
27
 
22
28
  ## Example Configuration
23
29
 
@@ -70,7 +76,7 @@ The policy supports using `'*'` as a wildcard to allow all functions for a speci
70
76
 
71
77
  ## Integration with Abilities
72
78
 
73
- The Contract Whitelist Policy is designed to work seamlessly with Vincent Abilities, particularly the [Transaction Signer Ability](../ability-transaction-signer/README.md):
79
+ The Contract Whitelist Policy is designed to work seamlessly with Vincent Abilities, particularly the [Transaction Signer Ability](../ability-evm-transaction-signer/README.md):
74
80
 
75
81
  ```typescript
76
82
  import { createVincentAbilityPolicy } from '@lit-protocol/vincent-ability-sdk';
package/dist/CHANGELOG.md CHANGED
@@ -0,0 +1,14 @@
1
+ # 1.0.0 (2025-08-05)
2
+
3
+ ### ⚠️ Breaking Changes
4
+
5
+ - #### Define uiSchema/jsonSchema for registry usage ([cebcee0c](https://github.com/LIT-Protocol/Vincent/commit/cebcee0c))
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
+ - Daryl Collins
package/dist/README.md CHANGED
@@ -2,22 +2,28 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The Contract Whitelist Policy is a Vincent Policy that restricts the signing of EVM transactions to a predefined whitelist of contract addresses and function selectors across multiple chains. This policy provides critical security controls for Vincent Agent Wallets by ensuring they can only interact with trusted contracts and approved functions.
5
+ The Contract Whitelist Policy enforces strict access control for blockchain transactions by ensuring that Vincent Apps can only interact with
6
+ pre-approved smart contracts and execute specific whitelisted functions on those contracts.
6
7
 
7
- This Vincent Policy is designed to work with Vincent Abilities, particularly the [@lit-protocol/vincent-ability-transaction-signer](../ability-transaction-signer/) ability, to provide granular control over which transactions can be signed.
8
+ This Vincent Policy is designed to work with Vincent Abilities, particularly the [@lit-protocol/vincent-ability-evm-transaction-signer](../ability-evm-transaction-signer/) ability, to provide granular control over which transactions can be signed.
9
+
10
+ ## Key Features
11
+
12
+ - **Multi-chain Support**: Configure whitelists for multiple blockchain networks
13
+ - **Granular Function Control**: Specify which functions are whitelisted using the Solidity function signature
14
+ - **Wildcard Support**: Allow all functions for trusted contracts using the `*` wildcard
8
15
 
9
16
  ## How It Works
10
17
 
11
18
  The Contract Whitelist Policy is built using the Vincent Policy SDK and validates transactions against a hierarchical whitelist. Here's how it operates:
12
19
 
13
- - **Input**: Receives a serialized EVM transaction from the ability
14
- - **Parsing**: Uses `ethers.utils.parseTransaction` to extract transaction details
15
- - **Extraction**: Gets the chain ID, target contract address, and function selector (first 4 bytes of `data` field)
16
- - **Validation**: Checks against the whitelist hierarchy
17
- - **Whitelist Matching**: The policy checks in order:
18
- - Is the chain ID whitelisted?
19
- - Is the contract address whitelisted for that chain?
20
- - Is the function selector allowed (either explicitly or via wildcard `*`)?
20
+ 1. **Transaction Parsing**: Receives a serialized EVM transaction and parses it using ethers.js
21
+ 2. **Data Extraction**: Extracts the chain ID (the `chainId` field in the transaction), target contract address (the `to` field in the transaction), and function selector (first 4 bytes of the transaction `data` field)
22
+ 3. **Whitelist Validation**: Checks the transaction against the configured on-chain whitelist:
23
+ - Is the chain ID whitelisted?
24
+ - Is the contract address whitelisted for that chain?
25
+ - Is the function selector allowed (explicitly or via wildcard)?
26
+ 4. **Result**: Returns an allow or deny decision with detailed information
21
27
 
22
28
  ## Example Configuration
23
29
 
@@ -70,7 +76,7 @@ The policy supports using `'*'` as a wildcard to allow all functions for a speci
70
76
 
71
77
  ## Integration with Abilities
72
78
 
73
- The Contract Whitelist Policy is designed to work seamlessly with Vincent Abilities, particularly the [Transaction Signer Ability](../ability-transaction-signer/README.md):
79
+ The Contract Whitelist Policy is designed to work seamlessly with Vincent Abilities, particularly the [Transaction Signer Ability](../ability-evm-transaction-signer/README.md):
74
80
 
75
81
  ```typescript
76
82
  import { createVincentAbilityPolicy } from '@lit-protocol/vincent-ability-sdk';