You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

example-vincent-testing-policy

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

example-vincent-testing-policy

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.

0.0.0-dev1
latest
npmnpm
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

Vincent Policy Spending Limit

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.

Overview

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.

Features

  • Set maximum spending limits per period
  • Track spending across multiple tools
  • Configurable by users through the Vincent Dashboard

Installation

npm install @lit-protocol/vincent-policy-spending-limit

Usage

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
});

Building

Run nx build policy-spending-limit to build the library.

Running unit tests

Run nx test policy-spending-limit to execute the unit tests via Jest.

Contributing

Please see CONTRIBUTING.md for guidelines on how to contribute to this project.

License

This project is licensed under the MIT License - see the LICENSE file for details.

FAQs

Package last updated on 10 Jul 2025

Did you know?

Socket

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.

Install

Related posts