{"_id":"@ahumblebuilder/vincent-ability-stage-settlement","name":"@ahumblebuilder/vincent-ability-stage-settlement","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@ahumblebuilder/vincent-ability-stage-settlement","version":"0.0.1","description":"A Vincent ability that stages settlements with payment legs for escrow contracts.","main":"./dist/src/index.js","module":"./dist/src/index.js","types":"./dist/src/index.d.ts","scripts":{"build":"nx build"},"dependencies":{"@lit-protocol/vincent-example-policy-counter":"workspace:*","@lit-protocol/vincent-ability-sdk":"^2.0.0","@lit-protocol/vincent-scaffold-sdk":"^2.0.0","ethers":"5.8.0","tslib":"2.8.1","zod":"3.25.76"},"devDependencies":{"esbuild":"0.19.12","@lit-protocol/esbuild-plugin-polyfill-node":"^0.3.0","ipfs-only-hash":"4.0.0"},"peerDependencies":{"@lit-protocol/vincent-app-sdk":"^2.0.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"repository":{"type":"git","url":"git+https://github.com/your-username/lit-escrow-ability.git"},"keywords":["vincent","lit-protocol","ability","escrow","settlement","blockchain","ethereum"],"author":{"name":"Your Name","email":"your.email@example.com"},"license":"MIT","gitHead":"4b31e6e2a7b1c9543e09bee616a847f12b40644b","bugs":{"url":"https://github.com/your-username/lit-escrow-ability/issues"},"homepage":"https://github.com/your-username/lit-escrow-ability#readme","_id":"@ahumblebuilder/vincent-ability-stage-settlement@0.0.1","_nodeVersion":"22.20.0","_npmVersion":"8.12.1","dist":{"integrity":"sha512-Zdu5oyAUDx8gDiN8cnK3I5zo7Ag4nFvxZtoGIeg6aUz5bw6Ezt+2iRUnsaDmNVdp5WY9p2ZUAL9DkjGTZkNtcA==","shasum":"e11ba2abfc52feccef6c1ae01033db8a26c930ab","tarball":"https://registry.npmjs.org/@ahumblebuilder/vincent-ability-stage-settlement/-/vincent-ability-stage-settlement-0.0.1.tgz","fileCount":24,"unpackedSize":119785,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIDmw+/GHRWN8DTZzIfiV7Qbp7ROsToN+FiglQsfcmunPAiEAhCbenLgN3kMvuuvvyBmCUfDeszIfDt7+O/ZzTEpmetg="}]},"_npmUser":{"name":"ahumblebuilder","email":"ahumblebuilder@gmail.com"},"directories":{},"maintainers":[{"name":"ahumblebuilder","email":"ahumblebuilder@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/vincent-ability-stage-settlement_0.0.1_1761149603220_0.6507495987768619"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-22T16:13:23.094Z","0.0.1":"2025-10-22T16:13:23.407Z","modified":"2025-10-22T16:13:23.708Z"},"maintainers":[{"name":"ahumblebuilder","email":"ahumblebuilder@gmail.com"}],"description":"A Vincent ability that stages settlements with payment legs for escrow contracts.","homepage":"https://github.com/your-username/lit-escrow-ability#readme","keywords":["vincent","lit-protocol","ability","escrow","settlement","blockchain","ethereum"],"repository":{"type":"git","url":"git+https://github.com/your-username/lit-escrow-ability.git"},"author":{"name":"Your Name","email":"your.email@example.com"},"bugs":{"url":"https://github.com/your-username/lit-escrow-ability/issues"},"license":"MIT","readme":"# Vincent Stage Settlement Ability\r\n\r\nA Vincent/Lit Protocol ability for staging settlements with payment legs for escrow contracts.\r\n\r\n## Overview\r\n\r\nThis package provides a Vincent ability that allows third-party agents to stage settlements with multiple payment legs for escrow contracts. The staged settlements can later be executed by any authorized party within the specified validity window.\r\n\r\n## Features\r\n\r\n- **Stage Settlements**: Create staged settlements with multiple payment legs\r\n- **Payment Legs**: Support for native ETH and ERC-20 token payments\r\n- **Validity Window**: Configurable validity period (1 second to 30 days)\r\n- **Validation**: Comprehensive parameter validation\r\n- **Policy Support**: Integrates with Vincent policies for access control\r\n\r\n## Installation\r\n\r\n```bash\r\nnpm install @lit-protocol/vincent-example-ability-stage-settlement\r\n```\r\n\r\n## Usage\r\n\r\n### Basic Usage\r\n\r\n```typescript\r\nimport { vincentAbility } from '@lit-protocol/vincent-example-ability-stage-settlement';\r\n\r\n// The ability is ready to be used with Vincent\r\n```\r\n\r\n### Ability Parameters\r\n\r\nThe ability accepts the following parameters:\r\n\r\n```typescript\r\ninterface AbilityParams {\r\n  escrow: string;           // Escrow contract address\r\n  paymentLegs: PaymentLeg[]; // Array of payment legs\r\n  validForSeconds: number;   // Validity period in seconds\r\n  rpcUrl?: string;          // Optional RPC URL\r\n}\r\n\r\ninterface PaymentLeg {\r\n  to: string;              // Recipient address\r\n  amount: string;         // Amount (in ETH for native, or token units)\r\n  token?: string;          // Token address (optional, defaults to native ETH)\r\n}\r\n```\r\n\r\n### Example Payment Legs\r\n\r\n```typescript\r\nconst paymentLegs = [\r\n  {\r\n    to: \"0x742d35Cc6634C0532925a3b8D4C9db96C4b4d8b6\",\r\n    amount: \"1.5\", // 1.5 ETH\r\n    // token is optional for native ETH\r\n  },\r\n  {\r\n    to: \"0x8ba1f109551bD432803012645Hac136c\",\r\n    amount: \"1000\", // 1000 tokens\r\n    token: \"0xA0b86a33E6441b8C4C8C0C8C0C8C0C8C0C8C0C8C\" // ERC-20 token address\r\n  }\r\n];\r\n```\r\n\r\n## Contract Integration\r\n\r\nThis ability calls the `stageSettlement` function on your escrow contract:\r\n\r\n```solidity\r\nfunction stageSettlement(\r\n    address escrow,\r\n    PaymentLeg[] calldata paymentLegs,\r\n    uint256 validForSeconds\r\n) external;\r\n```\r\n\r\n### PaymentLeg Structure\r\n\r\n```solidity\r\nstruct PaymentLeg {\r\n    address to;      // Recipient address\r\n    uint256 amount; // Amount in wei\r\n    address token;   // Token address (zero address for native ETH)\r\n}\r\n```\r\n\r\n## Vincent Integration\r\n\r\nThis ability integrates with the Vincent ecosystem:\r\n\r\n- **Policies**: Supports Vincent policies for access control\r\n- **Delegation**: Works with PKP (Programmable Key Pairs) delegation\r\n- **Validation**: Comprehensive pre-execution validation\r\n- **Events**: Emits `SettlementStaged` events\r\n\r\n## Development\r\n\r\n### Building\r\n\r\n```bash\r\nnpm run build\r\n```\r\n\r\n### Testing\r\n\r\n```bash\r\nnpm test\r\n```\r\n\r\n## License\r\n\r\nMIT\r\n\r\n## Support\r\n\r\nFor issues and questions, please open an issue on the GitHub repository.\r\n","readmeFilename":"README.md","_rev":"1-d322dd242a82a9aa6ac69598a2bd1207"}