
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
example-vincent-testing-policy-two
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-two receives a total of 6 weekly downloads. As such, example-vincent-testing-policy-two popularity was classified as not popular.
We found that example-vincent-testing-policy-two 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.