
Security News
TC39 Advances 11 Proposals for Math Precision, Binary APIs, and More
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
example-vincent-testing-policy
Advanced tools
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.
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.
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.
npm install @lit-protocol/vincent-policy-spending-limit
This policy can be integrated with Vincent Tools to enforce spending limits:
import {
createVincentToolPolicy,
createVincentTool,
supportedPoliciesForTool,
} from '@lit-protocol/vincent-tool-sdk';
import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-spending-limit';
const toolParamsSchema = z.object({
buy: z.boolean(),
});
const spendingLimitPolicy = createVincentToolPolicy({
toolParamsSchema,
bundledVincentPolicy,
toolParameterMappings: { buy: 'buyAmount' },
});
export const myTokenSwapTool = createVincentTool({
toolParamsSchema,
supportedPolicies: supportedPoliciesForTool([spendingLimitPolicy]),
// ... rest of tool implementation
});
Run nx build policy-spending-limit
to build the library.
Run nx test policy-spending-limit
to execute the unit tests via Jest.
Please see CONTRIBUTING.md for guidelines on how to contribute to this project.
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
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.
The npm package example-vincent-testing-policy receives a total of 0 weekly downloads. As such, example-vincent-testing-policy popularity was classified as not popular.
We found that example-vincent-testing-policy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TC39 advances 11 JavaScript proposals, with two moving to Stage 4, bringing better math, binary APIs, and more features one step closer to the ECMAScript spec.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.