@lit-protocol/vincent-ability-erc20-transfer 0.0.10-mma

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/CONTRIBUTING.md +84 -0
  2. package/README.md +271 -0
  3. package/dist/CONTRIBUTING.md +84 -0
  4. package/dist/README.md +271 -0
  5. package/dist/package.json +31 -0
  6. package/dist/src/generated/lit-action.js +9 -0
  7. package/dist/src/generated/vincent-ability-metadata.json +3 -0
  8. package/dist/src/generated/vincent-bundled-ability.d.ts +1122 -0
  9. package/dist/src/generated/vincent-bundled-ability.d.ts.map +1 -0
  10. package/dist/src/generated/vincent-bundled-ability.js +15 -0
  11. package/dist/src/generated/vincent-bundled-ability.js.map +1 -0
  12. package/dist/src/generated/vincent-bundled-ability.ts +13 -0
  13. package/dist/src/index.d.ts +2 -0
  14. package/dist/src/index.d.ts.map +1 -0
  15. package/dist/src/index.js +6 -0
  16. package/dist/src/index.js.map +1 -0
  17. package/dist/src/lib/helpers/commit-allowed-policies.d.ts +15 -0
  18. package/dist/src/lib/helpers/commit-allowed-policies.d.ts.map +1 -0
  19. package/dist/src/lib/helpers/commit-allowed-policies.js +37 -0
  20. package/dist/src/lib/helpers/commit-allowed-policies.js.map +1 -0
  21. package/dist/src/lib/helpers/execute-operation.d.ts +17 -0
  22. package/dist/src/lib/helpers/execute-operation.d.ts.map +1 -0
  23. package/dist/src/lib/helpers/execute-operation.js +54 -0
  24. package/dist/src/lib/helpers/execute-operation.js.map +1 -0
  25. package/dist/src/lib/helpers/index.d.ts +50 -0
  26. package/dist/src/lib/helpers/index.d.ts.map +1 -0
  27. package/dist/src/lib/helpers/index.js +116 -0
  28. package/dist/src/lib/helpers/index.js.map +1 -0
  29. package/dist/src/lib/lit-action.d.ts +2 -0
  30. package/dist/src/lib/lit-action.d.ts.map +1 -0
  31. package/dist/src/lib/lit-action.js +16 -0
  32. package/dist/src/lib/lit-action.js.map +1 -0
  33. package/dist/src/lib/schemas.d.ts +97 -0
  34. package/dist/src/lib/schemas.d.ts.map +1 -0
  35. package/dist/src/lib/schemas.js +73 -0
  36. package/dist/src/lib/schemas.js.map +1 -0
  37. package/dist/src/lib/vincent-ability.d.ts +1119 -0
  38. package/dist/src/lib/vincent-ability.d.ts.map +1 -0
  39. package/dist/src/lib/vincent-ability.js +190 -0
  40. package/dist/src/lib/vincent-ability.js.map +1 -0
  41. package/package.json +30 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vincent-ability.d.ts","sourceRoot":"","sources":["../../../src/lib/vincent-ability.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4QzB,CAAC"}
@@ -0,0 +1,190 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.vincentAbility = void 0;
4
+ const vincent_ability_sdk_1 = require("@lit-protocol/vincent-ability-sdk");
5
+ const vincent_policy_send_counter_1 = require("@lit-protocol/vincent-policy-send-counter");
6
+ const ethers_1 = require("ethers");
7
+ const helpers_1 = require("./helpers");
8
+ const commit_allowed_policies_1 = require("./helpers/commit-allowed-policies");
9
+ const execute_operation_1 = require("./helpers/execute-operation");
10
+ const schemas_1 = require("./schemas");
11
+ const SendLimitPolicy = (0, vincent_ability_sdk_1.createVincentAbilityPolicy)({
12
+ abilityParamsSchema: schemas_1.abilityParamsSchema,
13
+ bundledVincentPolicy: vincent_policy_send_counter_1.bundledVincentPolicy,
14
+ abilityParameterMappings: {
15
+ to: 'to',
16
+ amount: 'amount',
17
+ },
18
+ });
19
+ exports.vincentAbility = (0, vincent_ability_sdk_1.createVincentAbility)({
20
+ packageName: '@lit-protocol/vincent-ability-erc20-transfer',
21
+ abilityDescription: 'Ability to transfer ERC20 tokens with a limit on how many transfers are allowed in a time window',
22
+ abilityParamsSchema: schemas_1.abilityParamsSchema,
23
+ supportedPolicies: (0, vincent_ability_sdk_1.supportedPoliciesForAbility)([SendLimitPolicy]),
24
+ precheckSuccessSchema: schemas_1.precheckSuccessSchema,
25
+ precheckFailSchema: schemas_1.precheckFailSchema,
26
+ executeSuccessSchema: schemas_1.executeSuccessSchema,
27
+ executeFailSchema: schemas_1.executeFailSchema,
28
+ precheck: async ({ abilityParams }, { succeed, fail, delegation: { delegatorPkpInfo } }) => {
29
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/precheck] 🔍 Starting validation');
30
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/precheck] 📋 params:', {
31
+ abilityParams,
32
+ });
33
+ const { to, amount, tokenAddress, rpcUrl, alchemyGasSponsor, alchemyGasSponsorApiKey, alchemyGasSponsorPolicyId, } = abilityParams;
34
+ // Validate recipient address
35
+ if (!(0, helpers_1.isValidAddress)(to)) {
36
+ return fail({
37
+ error: '[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ Invalid recipient address format',
38
+ });
39
+ }
40
+ // Validate amount
41
+ if (!(0, helpers_1.isValidAmount)(amount)) {
42
+ return fail({
43
+ error: '[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ Invalid amount format or amount must be greater than 0',
44
+ });
45
+ }
46
+ // Validate token contract address
47
+ if (!(0, helpers_1.isValidAddress)(tokenAddress)) {
48
+ return fail({
49
+ error: '[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ Invalid token contract address format',
50
+ });
51
+ }
52
+ // Validate EIP-7702 gas sponsorship
53
+ if (alchemyGasSponsor && (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId)) {
54
+ return fail({
55
+ error: '[@lit-protocol/vincent-ability-morpho/precheck] Alchemy gas sponsor is enabled, but missing Alchemy API key or policy ID',
56
+ });
57
+ }
58
+ // Validate RPC URL
59
+ if (!rpcUrl) {
60
+ return fail({
61
+ error: '[@lit-protocol/vincent-ability-erc20-transfer/precheck] RPC URL is required for precheck',
62
+ });
63
+ }
64
+ // Check if the sender has enough tokens
65
+ const provider = new ethers_1.ethers.providers.JsonRpcProvider(rpcUrl);
66
+ const erc20Contract = (0, helpers_1.getErc20Contract)(provider, tokenAddress);
67
+ const tokenDecimals = await erc20Contract.decimals();
68
+ const tokenAmountInWei = (0, helpers_1.parseTokenAmount)(amount, tokenDecimals);
69
+ const pkpAddress = delegatorPkpInfo.ethAddress;
70
+ if (!pkpAddress) {
71
+ return fail({
72
+ error: '[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ PKP public key not available',
73
+ });
74
+ }
75
+ // Check token balance
76
+ const userBalance = await erc20Contract.balanceOf(pkpAddress);
77
+ if (userBalance.lt(tokenAmountInWei)) {
78
+ return fail({
79
+ error: `[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ Insufficient token balance. Need ${ethers_1.ethers.utils.formatUnits(tokenAmountInWei, tokenDecimals)} tokens, but only have ${ethers_1.ethers.utils.formatUnits(userBalance, tokenDecimals)} tokens`,
80
+ });
81
+ }
82
+ // Estimate transfer gas and check there is enough
83
+ const estimatedGas = await erc20Contract.estimateGas.transfer(to, amount);
84
+ const nativeBalance = await provider.getBalance(pkpAddress);
85
+ if (nativeBalance.lt(estimatedGas)) {
86
+ return fail({
87
+ error: `[@agentic-ai/vincent-ability-erc20-transfer/precheck] ❌ In7702 on the approval abilitysufficient gas. Need ${estimatedGas.toString()} gas, but only have ${nativeBalance.toString()} gas`,
88
+ });
89
+ }
90
+ // Precheck succeeded
91
+ const successResult = {
92
+ addressValid: true,
93
+ amountValid: true,
94
+ tokenAddressValid: true,
95
+ userBalance: userBalance.toString(),
96
+ estimatedGas: estimatedGas.toString(),
97
+ };
98
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/precheck] ✅ Success result:', successResult);
99
+ const successResponse = succeed(successResult);
100
+ console.log('[ERC20TransferAbility/precheck] ✅ Success response:', JSON.stringify(successResponse, null, 2));
101
+ return successResponse;
102
+ },
103
+ execute: async ({ abilityParams }, { succeed, fail, delegation, policiesContext }) => {
104
+ try {
105
+ const { to, amount, tokenAddress, chain, alchemyGasSponsor, alchemyGasSponsorApiKey, alchemyGasSponsorPolicyId, } = abilityParams;
106
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 🚀 Executing ERC-20 Transfer Ability', {
107
+ to,
108
+ amount,
109
+ tokenAddress,
110
+ chain,
111
+ });
112
+ if (alchemyGasSponsor && (!alchemyGasSponsorApiKey || !alchemyGasSponsorPolicyId)) {
113
+ return fail({
114
+ error: '[@lit-protocol/vincent-ability-morpho/execute] Alchemy gas sponsor is enabled, but missing Alchemy API key or policy ID',
115
+ });
116
+ }
117
+ let provider;
118
+ try {
119
+ provider = new ethers_1.ethers.providers.JsonRpcProvider(await Lit.Actions.getRpcUrl({ chain }));
120
+ }
121
+ catch (error) {
122
+ console.error('[@agentic-ai/vincent-ability-erc20-transfer/execute] Provider error:', error);
123
+ throw new Error('Unable to obtain blockchain provider for transfer operations');
124
+ }
125
+ const { chainId } = await provider.getNetwork();
126
+ const erc20Contract = (0, helpers_1.getErc20Contract)(provider, tokenAddress);
127
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] ⛓️ Using Chain:', chain);
128
+ // Get PKP public key from delegation context
129
+ const pkpPublicKey = delegation.delegatorPkpInfo.publicKey;
130
+ if (!pkpPublicKey) {
131
+ throw new Error('PKP public key not available from delegation context');
132
+ }
133
+ const pkpAddress = ethers_1.ethers.utils.computeAddress(pkpPublicKey);
134
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 🔑 PKP wallet address:', pkpAddress);
135
+ // Get decimals
136
+ const tokenDecimals = await erc20Contract.decimals();
137
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 🔢 Using token decimals:', tokenDecimals);
138
+ // Parse amount to token units using decimals
139
+ const tokenAmountInWei = (0, helpers_1.parseTokenAmount)(amount, tokenDecimals);
140
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 💰 Transfer amount:', ethers_1.ethers.utils.formatUnits(tokenAmountInWei, tokenDecimals));
141
+ // Prepare contract call data for ERC-20 transfer
142
+ const contractCallData = {
143
+ provider,
144
+ pkpPublicKey,
145
+ callerAddress: pkpAddress,
146
+ contractAddress: tokenAddress,
147
+ abi: helpers_1.ERC20_ABI,
148
+ functionName: 'transfer',
149
+ args: [to, tokenAmountInWei],
150
+ chainId,
151
+ alchemyGasSponsor,
152
+ alchemyGasSponsorApiKey,
153
+ alchemyGasSponsorPolicyId,
154
+ };
155
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 🔧 Full contractCallData:', JSON.stringify(contractCallData, null, 2));
156
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] 🚀 Attempting contract call...');
157
+ // Commit policy changes to the blockchain. We do this before to prioritize updating the policy over the transfer transaction
158
+ const policyCommitResults = await (0, commit_allowed_policies_1.commitAllowedPolicies)(policiesContext, '[@agentic-ai/vincent-ability-erc20-transfer/execute]');
159
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] ✅ Policy commit results:', policyCommitResults);
160
+ // Execute the ERC-20 transfer using laUtils
161
+ const txHash = await (0, execute_operation_1.executeOperation)(contractCallData);
162
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] ✅ Contract call completed, txHash:', txHash);
163
+ console.log('[@agentic-ai/vincent-ability-erc20-transfer/execute] ✅ ERC-20 transfer successful', {
164
+ txHash,
165
+ to,
166
+ amount,
167
+ tokenAddress,
168
+ });
169
+ return succeed({
170
+ txHash,
171
+ to,
172
+ amount,
173
+ tokenAddress,
174
+ timestamp: Date.now(),
175
+ });
176
+ }
177
+ catch (error) {
178
+ console.error('[@agentic-ai/vincent-ability-erc20-transfer/execute] ❌ ERC-20 transfer failed', error);
179
+ // Provide more specific error messages for common ERC-20 failures
180
+ let errorMessage = '[@agentic-ai/vincent-ability-erc20-transfer/execute] ❌ Unknown error occurred';
181
+ if (error instanceof Error) {
182
+ errorMessage = `[@agentic-ai/vincent-ability-erc20-transfer/execute] ❌ ${error.message}`;
183
+ }
184
+ return fail({
185
+ error: errorMessage,
186
+ });
187
+ }
188
+ },
189
+ });
190
+ //# sourceMappingURL=vincent-ability.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vincent-ability.js","sourceRoot":"","sources":["../../../src/lib/vincent-ability.ts"],"names":[],"mappings":";;;AAAA,2EAI2C;AAC3C,2FAAiF;AACjF,mCAAgC;AAEhC,uCAMmB;AACnB,+EAA0E;AAC1E,mEAA+D;AAC/D,uCAMmB;AAEnB,MAAM,eAAe,GAAG,IAAA,gDAA0B,EAAC;IACjD,mBAAmB,EAAnB,6BAAmB;IACnB,oBAAoB,EAApB,kDAAoB;IACpB,wBAAwB,EAAE;QACxB,EAAE,EAAE,IAAI;QACR,MAAM,EAAE,QAAQ;KACjB;CACF,CAAC,CAAC;AAEU,QAAA,cAAc,GAAG,IAAA,0CAAoB,EAAC;IACjD,WAAW,EAAE,8CAAuD;IACpE,kBAAkB,EAChB,kGAA2G;IAC7G,mBAAmB,EAAnB,6BAAmB;IACnB,iBAAiB,EAAE,IAAA,iDAA2B,EAAC,CAAC,eAAe,CAAC,CAAC;IAEjE,qBAAqB,EAArB,+BAAqB;IACrB,kBAAkB,EAAlB,4BAAkB;IAElB,oBAAoB,EAApB,8BAAoB;IACpB,iBAAiB,EAAjB,2BAAiB;IAEjB,QAAQ,EAAE,KAAK,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,gBAAgB,EAAE,EAAE,EAAE,EAAE;QACzF,OAAO,CAAC,GAAG,CAAC,8EAA8E,CAAC,CAAC;QAC5F,OAAO,CAAC,GAAG,CAAC,kEAAkE,EAAE;YAC9E,aAAa;SACd,CAAC,CAAC;QAEH,MAAM,EACJ,EAAE,EACF,MAAM,EACN,YAAY,EACZ,MAAM,EACN,iBAAiB,EACjB,uBAAuB,EACvB,yBAAyB,GAC1B,GAAG,aAAa,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,IAAA,oCAAgB,EAAC,gBAAgB,CAAC,CAAC;YAExD,OAAO,CAAC,GAAG,CACT,yFAAyF,EACzF,MAAM,CACP,CAAC;YAEF,OAAO,CAAC,GAAG,CACT,mFAAmF,EACnF;gBACE,MAAM;gBACN,EAAE;gBACF,MAAM;gBACN,YAAY;aACb,CACF,CAAC;YAEF,OAAO,OAAO,CAAC;gBACb,MAAM;gBACN,EAAE;gBACF,MAAM;gBACN,YAAY;gBACZ,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CACX,+EAA+E,EAC/E,KAAK,CACN,CAAC;YAEF,kEAAkE;YAClE,IAAI,YAAY,GACd,+EAA+E,CAAC;YAElF,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;gBAC3B,YAAY,GAAG,0DAA0D,KAAK,CAAC,OAAO,EAAE,CAAC;YAC3F,CAAC;YAED,OAAO,IAAI,CAAC;gBACV,KAAK,EAAE,YAAY;aACpB,CAAC,CAAC;QACL,CAAC;IACH,CAAC;CACF,CAAC,CAAC"}
package/package.json ADDED
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "@lit-protocol/vincent-ability-erc20-transfer",
3
+ "version": "0.0.10-mma",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "dependencies": {
8
+ "@lit-protocol/vincent-scaffold-sdk": "^1.1.7",
9
+ "ethers": "^5.8.0",
10
+ "tslib": "2.8.1",
11
+ "zod": "^3.25.64",
12
+ "@lit-protocol/vincent-ability-sdk": "0.0.10-mma",
13
+ "@lit-protocol/vincent-policy-send-counter": "0.0.10-mma"
14
+ },
15
+ "peerDependencies": {
16
+ "@lit-protocol/vincent-app-sdk": "^0.0.10-mma"
17
+ },
18
+ "devDependencies": {
19
+ "esbuild": "^0.19.12",
20
+ "esbuild-plugin-polyfill-node": "^0.3.0",
21
+ "ipfs-only-hash": "^4.0.0"
22
+ },
23
+ "main": "./dist/src/index.js",
24
+ "module": "./dist/src/index.js",
25
+ "types": "./dist/src/index.d.ts",
26
+ "files": [
27
+ "dist/**",
28
+ "*.md"
29
+ ]
30
+ }