|
1 | 1 | # @lit-protocol/automation |
2 | 2 |
|
3 | | -A TypeScript library for creating and managing state machines that can automate complex workflows involving the Lit Protocol network, blockchain events, and other triggers. |
4 | | - |
5 | | -## Overview |
| 3 | +A TypeScript library for creating and managing automated workflows using Lit Protocol. |
6 | 4 |
|
7 | 5 | The automation package provides a flexible state machine implementation that allows you to: |
8 | 6 |
|
9 | | -- Create automated workflows that respond to blockchain events |
10 | | -- Execute Lit Actions based on custom triggers |
11 | | -- Mint PKPs and Capacity Delegation Tokens |
12 | | -- Monitor token balances and prices |
13 | | -- Bridge tokens across chains automatically using PKPs |
14 | | -- Automate PKP (Programmable Key Pair) operations overall |
| 7 | +- Execute automated Lit Action workflows based on custom triggers, such as events on blockchains or off-chain platforms |
| 8 | +- Automate the minting of PKPs, Capacity Credits, and other Lit operations |
| 9 | +- Monitor token balances and price info |
| 10 | +- Perform cross-chain messaging and transaction execution |
| 11 | +- And more... |
15 | 12 |
|
16 | 13 | ## Installation |
17 | 14 |
|
@@ -148,7 +145,7 @@ runLitActionInterval().catch(console.error); |
148 | 145 |
|
149 | 146 | There care cases where such a declarative interface won't be enough for your use case. When that happens, the machines can also accept generic states, actions, transitions and listeners where it is possible to write any logic. |
150 | 147 |
|
151 | | -Here is an example that listens to Ethereum blocks looking one whose numbers ends in 0 |
| 148 | +Here is an example that listens to Ethereum block hashes, looking for those that end in '0' |
152 | 149 |
|
153 | 150 | ```typescript |
154 | 151 | async function monitorEthereumBlocksWithHashEndingWithZero() { |
@@ -231,9 +228,9 @@ The machine context can be manually accessed using its `getFromContext`, `setToC |
231 | 228 |
|
232 | 229 | ### Advance example |
233 | 230 |
|
234 | | -By leveraging the State Machine context and the ability of Lit PKPs to sign transaction of a variety of chains, it is possible to implement a Token Bridge that composes multiple chains and even offchain interaction if needed among other uses cases. |
| 231 | +By leveraging context from the State Machine in combination with Lit PKPs, it is possible to implement a cross-chain messaging service that can be used to read and write data across virtually any blockchain. |
235 | 232 |
|
236 | | -In this example, when a State Machine PKP receives USDC in Base Sepolia, it will send the same amount to the sender but in Ethereum Sepolia |
| 233 | +In this example, when a State Machine PKP receives USDC in Base Sepolia, it will send the same amount to the sender but in Ethereum Sepolia. |
237 | 234 |
|
238 | 235 | ```typescript |
239 | 236 | async function bridgeBaseSepoliaUSDCToEthereumSepolia() { |
|
0 commit comments