open-index/open-npm huggingface dataset:
npm package: @lit-protocol/vincent-ability-aave
Description: A Vincent Ability that acts as a secure, gated signer for Aave v3 operations. It is designed to work with ERC-4337 Smart Accounts (UserOperations) and EOAs (Transactions).
Latest version: 1.1.2

# Vincent Aave Gated Signer Ability

A Vincent Ability that acts as a secure, gated signer for Aave v3 operations. It is designed to work with ERC-4337 Smart Accounts (UserOperations) and EOAs (Transactions).

## Overview

This ability validates transactions or UserOperations destined for the Aave v3 protocol. It ensures that the operations are safe and aligned with the user's intent before signing them with the delegated Vincent PKP.

It uses the `createVincentGatedSignerAbility` from `@lit-protocol/vincent-ability-sdk/gatedSigner` to enforce a strict validation lifecycle:

1.  **Decode**: Decodes the transaction or userOperation calldata.
2.  **Simulation**: Simulates the transaction/userOperation on-chain.
3.  **Validation**:
    - Verifies interaction with authorized Aave contracts.
    - Checks for value extraction (no unexpected transfers or approvals).
    - Validates operation types (Approve, Supply, Withdraw, etc.).
4.  **Signing**: Signs the UserOperation (ECDSA or EIP-712) or Transaction (ECDSA) if all checks pass.

## Features

- **Smart Account Support**: Compatible with Kernel, Crossmint, Safe, and other ERC-4337 accounts.
- **EOA Support**: Can sign raw transactions for EOAs.
- **Protocol Safety**: Restricts interactions to the Aave v3 protocol.
- **Simulation-based Security**: Validates the actual on-chain effects of the transaction.

## Usage

This ability is typically used within a Vincent App. The backend service prepares an unsigned UserOperation or Transaction and sends it to the ability for validation and signing.

### Parameters

The ability accepts either a `UserOperation` or a `Transaction` object.

#### For UserOperations (Smart Accounts)

```typescript
const abilityParams = {
  alchemyRpcUrl: 'https://...', // Required for simulation
  entryPointAddress: '0x...',
  userOp: { ... }, // The UserOperation object
  // Optional parameters for Safe/EIP-712
  safe4337ModuleAddress: '0x...',
  eip712Params: { ... },
};
```

#### For Transactions (EOA)

```typescript
const abilityParams = {
  alchemyRpcUrl: 'https://...', // Required for simulation
  transaction: {
    to: '0x...',
    data: '0x...',
    value: '0x...',
    // ... other tx fields
  },
};
```

## Integration

For a full integration example, please refer to the `vincent-smart-account-integration` project, which demonstrates how to use this ability with various smart account providers.

## Development

### Building

```bash
nx build ability-aave
```

### Testing

```bash
nx test ability-aave
```
npm package: @lit-protocol/vincent-ability-erc20-approval
Description: An ability to send ERC20 approve/allowance transactions from a Vincent app on behalf of the delegator.
Latest version: 3.2.2

# Vincent Ability ERC20 Approval

An ability to send ERC20 approve/allowance transactions from a Vincent app on behalf of the delegator.

## Overview

The Vincent Ability ERC20 Approval is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows Vincent apps to request and manage ERC20 token approvals on behalf of users, enabling seamless integration with DeFi protocols and other token-based applications.

## Features

- Request ERC20 token approvals for users
- Set specific allowance amounts
- Revoke existing approvals
- Support for multiple ERC20 tokens

## Installation

```bash
npm install @lit-protocol/vincent-ability-erc20-approval
```

## Usage

This ability can be used in Vincent apps to manage ERC20 approvals:

```typescript
import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient';
import { bundledVincentAbility } from '@lit-protocol/vincent-ability-erc20-approval';

// One of delegatee signers from your app's Vincent Dashboard
const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY');

// Initialize the Vincent Ability Client
const abilityClient = getVincentAbilityClient({
  ethersSigner: delegateeSigner,
  bundledVincentAbility,
});
const delegatorPkpEthAddress = '0x09182301238'; // The delegator PKP Eth Address

const abilityParams = {
  chainId: '8453', // The chain where the tx will be executed
  tokenIn: '0x1234...', // The ERC20 token address
  amountIn: '1000000000000000000', // The amount to approve (in wei)
  rpcUrl: 'https://mainnet.base.org', // The RPC to send the transaction through
};

// Run precheck to see if ability should be executed
const precheckResult = await client.precheck(abilityParams, {
  delegatorPkpEthAddress,
});

if (precheckResult.success === true) {
  // Execute the Vincent Ability
  const executeResult = await client.execute(abilityParams, {
    delegatorPkpEthAddress,
  });

  // ...ability has executed, you can check `executeResult` for details
}
```

## Building

Run `nx build ability-erc20-approval` to build the library.

## Running unit tests

Run `nx test ability-erc20-approval` to execute the unit tests via [Jest](https://jestjs.io).

## Contributing

Please see [CONTRIBUTING.md](./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.
npm package: @lit-protocol/vincent-e2e-test-utils
Description: E2E test utilities for the Vincent protocol, providing helper functions for setting up test environments, managing wallets, minting PKPs, and handling permissions.
Latest version: 4.1.0

E2E test utilities for the Vincent protocol, providing helper functions for setting up test environments, managing wallets, minting PKPs, and handling permissions.

## Installation

<CodeGroup>

```bash npm
npm install @lit-protocol/vincent-e2e-test-utils
```

```bash yarn
yarn add @lit-protocol/vincent-e2e-test-utils
```

```bash pnpm
pnpm add @lit-protocol/vincent-e2e-test-utils
```

</CodeGroup>

## Features

- **Quick Environment Setup**: `setupVincentDevelopmentEnvironment()` handles all the boilerplate for setting up a complete Vincent test environment
- **Wallet Management**: Create random wallets and manage test accounts with automatic funding
- **PKP Management**: Mint new PKPs and configure permissions
- **Capacity Token Handling**: Ensure unexpired capacity tokens for testing
- **Chain Helpers**: Access pre-configured providers and wallets for different networks

## Quick Start

The easiest way to get started is with `setupVincentDevelopmentEnvironment()`:

```typescript
import { setupVincentDevelopmentEnvironment } from '@lit-protocol/vincent-e2e-test-utils';

// Define your abilities and policies
const permissionData = {
  [myAbility.ipfsCid]: {
    [myPolicy.ipfsCid]: {
      // policy configuration
    },
  },
};

// Set up everything with one call
const { agentPkpInfo, wallets, appId, appVersion } = await setupVincentDevelopmentEnvironment({
  permissionData,
});

// Now you're ready to test!
```

This single function:

- Checks and funds all required accounts (funder, app delegatee, app manager)
- Registers or updates your app with abilities and policies
- Creates or uses an existing agent PKP
- Sets up permissions for the agent PKP
- Ensures a valid capacity token exists
npm package: @lit-protocol/vincent-policy-send-counter
Description: A policy that can be attached to Vincent abilitys to limit the number of transactions that can be sent within a specific time period.
Latest version: 0.3.2

# Vincent Policy Send Counter

A policy that can be attached to Vincent abilitys to limit the number of transactions that can be sent within a specific time period.

## Overview

The Vincent Policy Send Counter is part of the Vincent Abilities ecosystem and is built using the Vincent Ability SDK. It allows users to set transaction count limits for abilitys, providing an additional layer of security and control.

## Features

- Set maximum transaction limits per time period
- Track transaction counts across multiple abilities
- Configurable by users through the Vincent Dashboard

## Installation

```bash
npm install @lit-protocol/vincent-policy-send-counter
```

## Usage

This policy can be integrated with Vincent Abilities to enforce transaction count limits:

```typescript
import {
  createVincentAbilityPolicy,
  createVincentAbility,
  supportedPoliciesForAbility,
} from '@lit-protocol/vincent-ability-sdk';
import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-send-counter';

const abilityParamsSchema = z.object({
  // Your ability's parameter schema
});

const sendCounterPolicy = createVincentAbilityPolicy({
  abilityParamsSchema,
  bundledVincentPolicy,
  // Map your ability's parameters to the policy's expected parameters if needed
  abilityParameterMappings: {
    /* your parameter mappings */
  },
});

export const myAbility = createVincentAbility({
  abilityParamsSchema,
  supportedPolicies: supportedPoliciesForAbility([sendCounterPolicy]),
  // ... rest of ability implementation
});
```

## Building

```bash
nx build policy-send-counter
```

## Running Tests

```bash
nx test policy-send-counter
```

## Contributing

Please see [CONTRIBUTING.md](../../CONTRIBUTING.md) for guidelines on how to contribute to this project.

## License

This project is licensed under the MIT License - see the [LICENSE](../../LICENSE) file for details.
npm package: @lit-protocol/vincent-policy-spending-limit
Description: 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.
Latest version: 2.2.2

# Vincent Policy Spending Limit

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.

## Overview

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.

## Features

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

## Installation

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

## Usage

This policy can be integrated with Vincent Abilities to enforce spending limits:

```typescript
import {
  createVincentAbilityPolicy,
  createVincentAbility,
  supportedPoliciesForAbility,
} from '@lit-protocol/vincent-ability-sdk';
import { bundledVincentPolicy } from '@lit-protocol/vincent-policy-spending-limit';

const abilityParamsSchema = z.object({
  buy: z.boolean(),
});

const spendingLimitPolicy = createVincentAbilityPolicy({
  abilityParamsSchema,
  bundledVincentPolicy,
  abilityParameterMappings: { buy: 'buyAmount' },
});

export const myTokenSwapAbility = createVincentAbility({
  abilityParamsSchema,
  supportedPolicies: supportedPoliciesForAbility([spendingLimitPolicy]),
  // ... rest of ability 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](https://jestjs.io).

## Contributing

Please see [CONTRIBUTING.md](./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.
npm package: @lit-protocol/vincent-registry-sdk
Description: Vincent Registry API definitions and generated code
Latest version: 6.1.0

# Vincent Registry API

This package contains the Vincent Registry API. It includes API definitions using Zod with OpenAPI extensions, and generated TypeScript clients for both NodeJS and React frontends, using RTK Query.

## Getting Started

Import the appropriate client for your environment, and call its `setBaseQueryFn()` function to configure your query function. See the [RTK Docs](https://redux-toolkit.js.org/rtk-query/api/fetchBaseQuery) for example usage.

#### React Client

```typescript
import { fetchBaseQuery } from '@reduxjs/toolkit/query/react';
import { reactClient } from '@lit-protocol/vincent-registry-sdk';

const { vincentApiClientReact, setBaseQueryFn } = reactClient;

setBaseQueryFn(fetchBaseQuery({ baseUrl: `https://registry.heyvincent.ai` }));
// Use the API client per https://redux-toolkit.js.org/rtk-query/api/created-api/hooks
```

#### NodeJS Client

```typescript
import { fetchBaseQuery } from '@reduxjs/toolkit/query';
import { nodeClient } from '@lit-protocol/vincent-registry-sdk';

const { vincentApiClientNode, setBaseQueryFn } = nodeClient;

setBaseQueryFn(fetchBaseQuery({ baseUrl: `http://localhost:3000` }));
// Use the API Client per https://redux-toolkit.js.org/rtk-query/usage/usage-without-react-hooks
```

### OpenAPI JSON Spec

The OpenAPI spec in JSON format is exported as `openApiJson`; you can import it if your JS environment supports parsing JSON, or read it directly from `dist/src/generated/openapi.json` in the package filesystem.

## Technologies

- [Zod](https://github.com/colinhacks/zod) - Schema validation
- [@asteasolutions/zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi) - Convert Zod schemas to OpenAPI
- [RTK Query](https://redux-toolkit.js.org/rtk-query/overview) - API client generation

## Development

Both generated clients _and_ the OpenAPI JSON file are re-generated every time you run `pnpm nx build`.
npm package: @lit-protocol/vincent-rest-api
Description: Vincent Registry REST API OpenAPI definition and related generated code
Latest version: 1.0.2
Deprecated: This package has been moved to @lit-protocol/vincent-registry-sdk

# Vincent Registry API

This package contains the Vincent Registry API. It includes API definitions using Zod with OpenAPI extensions, a generated TypeScript client using RTK Query.

## Getting Started

### Generate API Client

To generate the OpenAPI specification and TypeScript client:

```bash
pnpm generate-api
```

This command:
1. Converts Zod schemas to an OpenAPI specification using `@asteasolutions/zod-to-openapi`
2. Generates the OpenAPI JSON file in `src/generated/openapi.json`
3. Creates a TypeScript client with RTK Query in the `src/generated/api` directory

## Directory Structure

```
vincent-rest-api/
├── src/                        # Source code
│   ├── api/                    # API definitions and controllers
│   ├── generated/              # Generated OpenAPI and client code
│   │   ├── api/                # RTK Query API client
│   │   └── openapi.json        # Generated OpenAPI specification
│   ├── tests/                  # Integration tests
│   │   └── integration.test.txt # API integration tests (WIP)
│   └── utils/                  # Utility scripts for API generation
│       └── generate-openapi.ts # Script to generate OpenAPI specs from Zod schemas
├── docs/                       # API documentation
│   └── api.html                # API documentation viewer using RapiDoc
├── rtk-client-config.js           # RTK Query codegen configuration
├── package.json                # Project dependencies and scripts
└── README.md                   # Project documentation
```

## Technologies

- [Zod](https://github.com/colinhacks/zod) - Schema validation
- [@asteasolutions/zod-to-openapi](https://github.com/asteasolutions/zod-to-openapi) - Convert Zod schemas to OpenAPI
- [RTK Query](https://redux-toolkit.js.org/rtk-query/overview) - API client generation
- [Jest](https://jestjs.io/) - Testing framework
npm package: @lit-protocol/wasm
Description: Core lit utilities implemented in `Rust` and compiled to `WebAssembly` through `wasm-pack` implementations within this package wrap the compiled implementations from `rust` and provides functionality for converting the compiled artifact to a `base64` enco
Latest version: 8.1.1

# WASM

Core lit utilities implemented in `Rust` and compiled to `WebAssembly` through `wasm-pack` implementations within this package wrap the compiled implementations from `rust` and provides functionality for converting the compiled artifact to a `base64` encoded string for binding to the generated bridge. the functionality contained within this package exposes the functinoality provided from the wasm utilities.

For information on implementations see the [rust](./rust/README.md) directory.

### Building

This package contanis scripts for building the `rust` souce into `WebAssembly` and correctly encoding the binary artifact.
To perform the entire build / encoding operations you can run `rust:build`. If you wish to only produce the `WebAssembly` binding you can see the `rust` [README](./rust//README.md) for build information.