@lit-protocol/vincent-ability-morpho 0.1.18-mma → 1.0.0
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.
- package/CHANGELOG.md +15 -0
- package/README.md +15 -15
- package/dist/CHANGELOG.md +15 -0
- package/dist/README.md +15 -15
- package/dist/package.json +2 -7
- package/dist/src/generated/lit-action.js +2 -2
- package/dist/src/generated/vincent-ability-metadata.json +1 -1
- package/dist/src/generated/vincent-bundled-ability.d.ts +10 -16
- package/dist/src/generated/vincent-bundled-ability.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +3 -2
- package/dist/src/index.js.map +1 -1
- package/dist/src/lib/helpers/index.d.ts +26 -363
- package/dist/src/lib/helpers/index.d.ts.map +1 -1
- package/dist/src/lib/helpers/index.js +155 -983
- package/dist/src/lib/helpers/index.js.map +1 -1
- package/dist/src/lib/schemas.d.ts +11 -16
- package/dist/src/lib/schemas.d.ts.map +1 -1
- package/dist/src/lib/schemas.js +16 -14
- package/dist/src/lib/schemas.js.map +1 -1
- package/dist/src/lib/vincent-ability.d.ts +10 -16
- package/dist/src/lib/vincent-ability.d.ts.map +1 -1
- package/dist/src/lib/vincent-ability.js +98 -115
- package/dist/src/lib/vincent-ability.js.map +1 -1
- package/package.json +4 -9
- package/dist/ethers-v6-shim.js +0 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# 1.0.0 (2025-09-03)
|
|
2
|
+
|
|
3
|
+
### ⚠️ Breaking Changes
|
|
4
|
+
|
|
5
|
+
- Remove not used withdraw command. Add approve command to generate erc20 allowances only on morpho vaults, also fix its amount specification to not use decimal indicator and to correctly estimate gas when using 7702 ([b95256b3](https://github.com/LIT-Protocol/Vincent/commit/b95256b3))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated ability-sdk to 2.0.1
|
|
10
|
+
- Updated app-sdk to 2.0.1
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- FedericoAmura @FedericoAmura
|
|
15
|
+
|
|
1
16
|
## 0.1.0 (2025-08-05)
|
|
2
17
|
|
|
3
18
|
### 🚀 Features
|
package/README.md
CHANGED
|
@@ -28,7 +28,7 @@ This ability can be used in Vincent apps to interact with Morpho vaults:
|
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient';
|
|
31
|
-
import { bundledVincentAbility } from '@lit-protocol/vincent-ability-morpho';
|
|
31
|
+
import { bundledVincentAbility, MorphoOperation } from '@lit-protocol/vincent-ability-morpho';
|
|
32
32
|
|
|
33
33
|
// One of delegatee signers from your app's Vincent Dashboard
|
|
34
34
|
const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY');
|
|
@@ -41,9 +41,9 @@ const abilityClient = getVincentAbilityClient({
|
|
|
41
41
|
const delegatorPkpEthAddress = '0x09182301238'; // The delegator PKP Eth Address
|
|
42
42
|
|
|
43
43
|
const abilityParams = {
|
|
44
|
-
operation:
|
|
44
|
+
operation: MorphoOperation.DEPOSIT, // 'approve', 'deposit', or 'redeem'
|
|
45
45
|
vaultAddress: '0x1234...', // The Morpho vault address
|
|
46
|
-
amount: '
|
|
46
|
+
amount: '100000', // Amount to approve/withdraw/redeem
|
|
47
47
|
chain: 'base', // The chain where the vault is deployed
|
|
48
48
|
};
|
|
49
49
|
|
|
@@ -66,7 +66,7 @@ if (precheckResult.success === true) {
|
|
|
66
66
|
|
|
67
67
|
Before executing vault operations, ensure that:
|
|
68
68
|
|
|
69
|
-
1. The user has approved the vault to spend their tokens (for deposits). You can use the
|
|
69
|
+
1. The user has approved the vault to spend their tokens (for deposits). You can use the MorphoOperation.APPROVE to handle token approvals
|
|
70
70
|
2. The user has sufficient balance of the required tokens
|
|
71
71
|
3. The user has delegated permission to the Vincent app to execute operations
|
|
72
72
|
|
|
@@ -76,22 +76,22 @@ Note: The ability can subsidize gas for the user using Alchemy. If not doing so,
|
|
|
76
76
|
|
|
77
77
|
The ability supports the following operations on Morpho vaults:
|
|
78
78
|
|
|
79
|
+
- **APPROVE** - Approve a Morpho vault to take your assets on deposit
|
|
79
80
|
- **DEPOSIT** - Deposit assets into a Morpho vault to earn yield
|
|
80
|
-
- **WITHDRAW** - Withdraw assets from a Morpho vault
|
|
81
81
|
- **REDEEM** - Redeem vault shares for underlying assets
|
|
82
82
|
|
|
83
83
|
## Parameters
|
|
84
84
|
|
|
85
|
-
| Parameter | Type
|
|
86
|
-
| --------------------------- |
|
|
87
|
-
| `operation` | `"
|
|
88
|
-
| `vaultAddress` | `string`
|
|
89
|
-
| `amount` | `string`
|
|
90
|
-
| `chain` | `string`
|
|
91
|
-
| `rpcUrl` | `string`
|
|
92
|
-
| `alchemyGasSponsor` | `boolean`
|
|
93
|
-
| `alchemyGasSponsorApiKey` | `string`
|
|
94
|
-
| `alchemyGasSponsorPolicyId` | `string`
|
|
85
|
+
| Parameter | Type | Required | Description |
|
|
86
|
+
| --------------------------- | ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------ |
|
|
87
|
+
| `operation` | `"approve" \| "deposit" \| "redeem"` | ✅ | The vault operation to perform |
|
|
88
|
+
| `vaultAddress` | `string` | ✅ | Morpho vault contract address (0x format) |
|
|
89
|
+
| `amount` | `string` | ✅ | Amount as string in units, no decimal places (assets for deposit or withdraw, shares for redeem) |
|
|
90
|
+
| `chain` | `string` | ✅ | Chain identifier (e.g., "base") |
|
|
91
|
+
| `rpcUrl` | `string` | ❌ | Custom RPC URL (for precheck validation) |
|
|
92
|
+
| `alchemyGasSponsor` | `boolean` | ❌ | Whether to use Alchemy's gas sponsorship (EIP-7702) |
|
|
93
|
+
| `alchemyGasSponsorApiKey` | `string` | ❌ | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true) |
|
|
94
|
+
| `alchemyGasSponsorPolicyId` | `string` | ❌ | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true) |
|
|
95
95
|
|
|
96
96
|
## Supported Networks
|
|
97
97
|
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
# 1.0.0 (2025-09-03)
|
|
2
|
+
|
|
3
|
+
### ⚠️ Breaking Changes
|
|
4
|
+
|
|
5
|
+
- Remove not used withdraw command. Add approve command to generate erc20 allowances only on morpho vaults, also fix its amount specification to not use decimal indicator and to correctly estimate gas when using 7702 ([b95256b3](https://github.com/LIT-Protocol/Vincent/commit/b95256b3))
|
|
6
|
+
|
|
7
|
+
### 🧱 Updated Dependencies
|
|
8
|
+
|
|
9
|
+
- Updated ability-sdk to 2.0.1
|
|
10
|
+
- Updated app-sdk to 2.0.1
|
|
11
|
+
|
|
12
|
+
### ❤️ Thank You
|
|
13
|
+
|
|
14
|
+
- FedericoAmura @FedericoAmura
|
|
15
|
+
|
|
1
16
|
## 0.1.0 (2025-08-05)
|
|
2
17
|
|
|
3
18
|
### 🚀 Features
|
package/dist/README.md
CHANGED
|
@@ -28,7 +28,7 @@ This ability can be used in Vincent apps to interact with Morpho vaults:
|
|
|
28
28
|
|
|
29
29
|
```typescript
|
|
30
30
|
import { getVincentAbilityClient } from '@lit-protocol/vincent-app-sdk/abilityClient';
|
|
31
|
-
import { bundledVincentAbility } from '@lit-protocol/vincent-ability-morpho';
|
|
31
|
+
import { bundledVincentAbility, MorphoOperation } from '@lit-protocol/vincent-ability-morpho';
|
|
32
32
|
|
|
33
33
|
// One of delegatee signers from your app's Vincent Dashboard
|
|
34
34
|
const delegateeSigner = new ethers.Wallet('YOUR_DELEGATEE_PRIVATE_KEY');
|
|
@@ -41,9 +41,9 @@ const abilityClient = getVincentAbilityClient({
|
|
|
41
41
|
const delegatorPkpEthAddress = '0x09182301238'; // The delegator PKP Eth Address
|
|
42
42
|
|
|
43
43
|
const abilityParams = {
|
|
44
|
-
operation:
|
|
44
|
+
operation: MorphoOperation.DEPOSIT, // 'approve', 'deposit', or 'redeem'
|
|
45
45
|
vaultAddress: '0x1234...', // The Morpho vault address
|
|
46
|
-
amount: '
|
|
46
|
+
amount: '100000', // Amount to approve/withdraw/redeem
|
|
47
47
|
chain: 'base', // The chain where the vault is deployed
|
|
48
48
|
};
|
|
49
49
|
|
|
@@ -66,7 +66,7 @@ if (precheckResult.success === true) {
|
|
|
66
66
|
|
|
67
67
|
Before executing vault operations, ensure that:
|
|
68
68
|
|
|
69
|
-
1. The user has approved the vault to spend their tokens (for deposits). You can use the
|
|
69
|
+
1. The user has approved the vault to spend their tokens (for deposits). You can use the MorphoOperation.APPROVE to handle token approvals
|
|
70
70
|
2. The user has sufficient balance of the required tokens
|
|
71
71
|
3. The user has delegated permission to the Vincent app to execute operations
|
|
72
72
|
|
|
@@ -76,22 +76,22 @@ Note: The ability can subsidize gas for the user using Alchemy. If not doing so,
|
|
|
76
76
|
|
|
77
77
|
The ability supports the following operations on Morpho vaults:
|
|
78
78
|
|
|
79
|
+
- **APPROVE** - Approve a Morpho vault to take your assets on deposit
|
|
79
80
|
- **DEPOSIT** - Deposit assets into a Morpho vault to earn yield
|
|
80
|
-
- **WITHDRAW** - Withdraw assets from a Morpho vault
|
|
81
81
|
- **REDEEM** - Redeem vault shares for underlying assets
|
|
82
82
|
|
|
83
83
|
## Parameters
|
|
84
84
|
|
|
85
|
-
| Parameter | Type
|
|
86
|
-
| --------------------------- |
|
|
87
|
-
| `operation` | `"
|
|
88
|
-
| `vaultAddress` | `string`
|
|
89
|
-
| `amount` | `string`
|
|
90
|
-
| `chain` | `string`
|
|
91
|
-
| `rpcUrl` | `string`
|
|
92
|
-
| `alchemyGasSponsor` | `boolean`
|
|
93
|
-
| `alchemyGasSponsorApiKey` | `string`
|
|
94
|
-
| `alchemyGasSponsorPolicyId` | `string`
|
|
85
|
+
| Parameter | Type | Required | Description |
|
|
86
|
+
| --------------------------- | ------------------------------------ | -------- | ------------------------------------------------------------------------------------------------ |
|
|
87
|
+
| `operation` | `"approve" \| "deposit" \| "redeem"` | ✅ | The vault operation to perform |
|
|
88
|
+
| `vaultAddress` | `string` | ✅ | Morpho vault contract address (0x format) |
|
|
89
|
+
| `amount` | `string` | ✅ | Amount as string in units, no decimal places (assets for deposit or withdraw, shares for redeem) |
|
|
90
|
+
| `chain` | `string` | ✅ | Chain identifier (e.g., "base") |
|
|
91
|
+
| `rpcUrl` | `string` | ❌ | Custom RPC URL (for precheck validation) |
|
|
92
|
+
| `alchemyGasSponsor` | `boolean` | ❌ | Whether to use Alchemy's gas sponsorship (EIP-7702) |
|
|
93
|
+
| `alchemyGasSponsorApiKey` | `string` | ❌ | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true) |
|
|
94
|
+
| `alchemyGasSponsorPolicyId` | `string` | ❌ | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true) |
|
|
95
95
|
|
|
96
96
|
## Supported Networks
|
|
97
97
|
|
package/dist/package.json
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lit-protocol/vincent-ability-morpho",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
7
|
-
"scripts": {
|
|
8
|
-
"vault-search": "tsx examples/vault-search.ts",
|
|
9
|
-
"debug": "NODE_OPTIONS=\"--require ./ethers-v6-shim.cjs\" tsx src/lib/helpers/index.ts"
|
|
10
|
-
},
|
|
11
7
|
"dependencies": {
|
|
12
|
-
"@lit-protocol/vincent-ability-sdk": "workspace:*",
|
|
13
8
|
"@lit-protocol/vincent-scaffold-sdk": "^1.1.7",
|
|
14
|
-
"@
|
|
9
|
+
"@lit-protocol/vincent-ability-sdk": "workspace:*",
|
|
15
10
|
"ethers": "^5.8.0",
|
|
16
11
|
"tslib": "2.8.1",
|
|
17
12
|
"zod": "^3.25.64"
|