@lit-protocol/vincent-ability-erc20-transfer 0.0.10-mma → 0.0.12-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.
- package/README.md +13 -13
- package/dist/README.md +13 -13
- package/dist/src/generated/lit-action.js +2 -2
- package/dist/src/generated/vincent-ability-metadata.json +1 -1
- package/dist/src/lib/helpers/execute-operation.js +5 -5
- package/dist/src/lib/helpers/execute-operation.js.map +1 -1
- package/dist/src/lib/vincent-ability.js +4 -4
- package/dist/src/lib/vincent-ability.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -54,16 +54,16 @@ providing:
|
|
|
54
54
|
|
|
55
55
|
All functions accept the following parameters:
|
|
56
56
|
|
|
57
|
-
| Parameter | Type | Description
|
|
58
|
-
| --------------------------- | --------- |
|
|
59
|
-
| `rpcUrl` | `string` | RPC URL used during precheck validations
|
|
60
|
-
| `chain` | `string` |
|
|
61
|
-
| `to` | `string` | Recipient address (0x...)
|
|
62
|
-
| `tokenAddress` | `string` | ERC-20 token contract address (0x...)
|
|
63
|
-
| `amount` | `string` | Amount in human-readable string (e.g., "1.23")
|
|
64
|
-
| `alchemyGasSponsor` | `boolean` | Whether to use Alchemy's gas sponsorship (EIP-7702)
|
|
65
|
-
| `alchemyGasSponsorApiKey` | `string` | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true)
|
|
66
|
-
| `alchemyGasSponsorPolicyId` | `string` | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true)
|
|
57
|
+
| Parameter | Type | Description |
|
|
58
|
+
| --------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `rpcUrl` | `string` | RPC URL used during precheck validations |
|
|
60
|
+
| `chain` | `string` | Lit [supported EVM chain name](https://developer.litprotocol.com/resources/supported-chains) used during execute (e.g., 'base', 'ethereum') |
|
|
61
|
+
| `to` | `string` | Recipient address (0x...) |
|
|
62
|
+
| `tokenAddress` | `string` | ERC-20 token contract address (0x...) |
|
|
63
|
+
| `amount` | `string` | Amount in human-readable string (e.g., "1.23") |
|
|
64
|
+
| `alchemyGasSponsor` | `boolean` | Whether to use Alchemy's gas sponsorship (EIP-7702) |
|
|
65
|
+
| `alchemyGasSponsorApiKey` | `string` | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true) |
|
|
66
|
+
| `alchemyGasSponsorPolicyId` | `string` | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true) |
|
|
67
67
|
|
|
68
68
|
## Usage Examples
|
|
69
69
|
|
|
@@ -117,10 +117,10 @@ const transferParams = {
|
|
|
117
117
|
|
|
118
118
|
### 2. Execute Phase
|
|
119
119
|
|
|
120
|
-
- Connects to specified
|
|
120
|
+
- Connects to specified chain
|
|
121
121
|
- Retrieves PKP public key from delegation context
|
|
122
122
|
- Converts PKP public key to Ethereum address
|
|
123
|
-
- Parses token amount using
|
|
123
|
+
- Parses token amount using retrieved number of decimals
|
|
124
124
|
- Validates native balance for gas fees
|
|
125
125
|
- Validates token balance for transfer amount
|
|
126
126
|
- Executes ERC-20 transfer using `laUtils.transaction.handler.contractCall`
|
|
@@ -129,7 +129,7 @@ const transferParams = {
|
|
|
129
129
|
|
|
130
130
|
## Policy Integration
|
|
131
131
|
|
|
132
|
-
The ability automatically integrates with the `send-counter-limit` policy:
|
|
132
|
+
The ability automatically integrates with the `send-counter-limit` policy if enabled by the Vincent App User:
|
|
133
133
|
|
|
134
134
|
- **Precheck**: Validates ability parameters
|
|
135
135
|
- **Execute**: Performs the actual ERC-20 transfer
|
package/dist/README.md
CHANGED
|
@@ -54,16 +54,16 @@ providing:
|
|
|
54
54
|
|
|
55
55
|
All functions accept the following parameters:
|
|
56
56
|
|
|
57
|
-
| Parameter | Type | Description
|
|
58
|
-
| --------------------------- | --------- |
|
|
59
|
-
| `rpcUrl` | `string` | RPC URL used during precheck validations
|
|
60
|
-
| `chain` | `string` |
|
|
61
|
-
| `to` | `string` | Recipient address (0x...)
|
|
62
|
-
| `tokenAddress` | `string` | ERC-20 token contract address (0x...)
|
|
63
|
-
| `amount` | `string` | Amount in human-readable string (e.g., "1.23")
|
|
64
|
-
| `alchemyGasSponsor` | `boolean` | Whether to use Alchemy's gas sponsorship (EIP-7702)
|
|
65
|
-
| `alchemyGasSponsorApiKey` | `string` | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true)
|
|
66
|
-
| `alchemyGasSponsorPolicyId` | `string` | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true)
|
|
57
|
+
| Parameter | Type | Description |
|
|
58
|
+
| --------------------------- | --------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
59
|
+
| `rpcUrl` | `string` | RPC URL used during precheck validations |
|
|
60
|
+
| `chain` | `string` | Lit [supported EVM chain name](https://developer.litprotocol.com/resources/supported-chains) used during execute (e.g., 'base', 'ethereum') |
|
|
61
|
+
| `to` | `string` | Recipient address (0x...) |
|
|
62
|
+
| `tokenAddress` | `string` | ERC-20 token contract address (0x...) |
|
|
63
|
+
| `amount` | `string` | Amount in human-readable string (e.g., "1.23") |
|
|
64
|
+
| `alchemyGasSponsor` | `boolean` | Whether to use Alchemy's gas sponsorship (EIP-7702) |
|
|
65
|
+
| `alchemyGasSponsorApiKey` | `string` | Alchemy API key for gas sponsorship (required if alchemyGasSponsor is true) |
|
|
66
|
+
| `alchemyGasSponsorPolicyId` | `string` | Alchemy gas policy ID for sponsorship (required if alchemyGasSponsor is true) |
|
|
67
67
|
|
|
68
68
|
## Usage Examples
|
|
69
69
|
|
|
@@ -117,10 +117,10 @@ const transferParams = {
|
|
|
117
117
|
|
|
118
118
|
### 2. Execute Phase
|
|
119
119
|
|
|
120
|
-
- Connects to specified
|
|
120
|
+
- Connects to specified chain
|
|
121
121
|
- Retrieves PKP public key from delegation context
|
|
122
122
|
- Converts PKP public key to Ethereum address
|
|
123
|
-
- Parses token amount using
|
|
123
|
+
- Parses token amount using retrieved number of decimals
|
|
124
124
|
- Validates native balance for gas fees
|
|
125
125
|
- Validates token balance for transfer amount
|
|
126
126
|
- Executes ERC-20 transfer using `laUtils.transaction.handler.contractCall`
|
|
@@ -129,7 +129,7 @@ const transferParams = {
|
|
|
129
129
|
|
|
130
130
|
## Policy Integration
|
|
131
131
|
|
|
132
|
-
The ability automatically integrates with the `send-counter-limit` policy:
|
|
132
|
+
The ability automatically integrates with the `send-counter-limit` policy if enabled by the Vincent App User:
|
|
133
133
|
|
|
134
134
|
- **Precheck**: Validates ability parameters
|
|
135
135
|
- **Execute**: Performs the actual ERC-20 transfer
|