Automate Web3 Signing with Lit - Event Listener SDK by DIGITALAX

Automate Web3 Signing with Lit - Event Listener SDK by DIGITALAX

Lit Protocol is a decentralized key management network powered by threshold cryptography. A blockchain-agnostic identity layer, Lit can be used to power encryption, signing, and compute for web applications.

For builders automating workflows is key to creating seamless user experiences. This Event Listener SDK built by DIGITALAX helps you set up automated triggers and actions across blockchains with minimal code, allowing you to build complex signing applications with Lit.

The SDK is designed around conditionally pre-approved chain reactions that abstract away blockchain account management. You can chain encrypted, conditional actions together that are often on-chain to create complex automation strategies. The signing is done through Lit Actions and Programmable Key Pairs (PKPs), while the actions that trigger them can be based on three core condition functions: webhooks, on-chain events, and intervals.

Developers can use the Event Listener SDK for three core conditional functions:

Webhooks

Integrate external APIs and apps via webhooks that let you monitor events like crypto price changes or dApp updates in real-time. This enables your protocol to instantly react to relevant off-chain activities.

On-Chain Events

Subscribe to on-chain events like contract executions or new blocks through the SDK to trigger actions based on key blockchain activities. This unlocks on-demand responses to major on-chain occurrences.

Intervals

Configure interval timers that regulate how frequently your specified webhooks and chain events are checked. This delivers control over the timing your automations require, from near real-time to scheduled.

With these conditional building blocks, developers can construct automated workflows chained across blockchains to execute transactions, signatures, and other critical operations in a secure, decentralized manner.

The Event Listener SDK unlocks new potential for automation within your Web3 applications. To learn more about integrating conditional workflows leveraging Lit Protocol, be sure to check out the documentation.

How to use the SDK

Installation via NPM

npm i lit-listener-sdk ethers

Instantiate the SDK

Minting a PKP requires an ethers signer with LIT Tokens on the Lit Chronicle Network.

If you only need to generate Lit Action code then an ethers signer object is not necessary.

import { ethers } from "ethers";
import { Circuit } from "lit-listener-sdk";

const chronicleProvider = new ethers.providers.JsonRpcProvider("<https://chain-rpc.litprotocol.com/http>", 175177);
const chronicleSigner = new ethers.Wallet(YOUR_PRIVATE_KEY, chronicleProvider);

const newCircuit = new Circuit(chronicleSigner);

The signer is an optional constructor parameter.

If you are minting a PKP then you must set a signer with a provider compatible with the Lit Chronicle Network, you can use the standard RPC URL found here. You can also optionally pass in the PKP Contract to mint from: 0x8F75a53F65e31DD0D2e40d0827becAaE2299D111.

Node Code Platform

Looking to automate signing with Lit Actions, with no code? Check out this platform that utilizes the Event Listener SDK to build a no code solution. Automating Lit Actions is as simple as setting your conditions.

You can use the the PKP Explorer to mint a Programmable Key Pair and create a Lit Action. From there, you can use the Event Listener No Code Platform to automate running the action!

Closing

Excited to build with Lit? This Event Listener SDK came out of Lit’s grant program and if you want to help continue development or have an developer tool that could benefit from Lit’s technology reach out to the Lit development team on Discord, Twitter or on GitHub.

The Lit grant program is looking to fund projects that improve developer experience and community development within the web3 ecosystem. The goal is to support those who are building the infrastructure and applications that will make it easier for people to use and develop Lit-enabled applications.

DIGITALAX

DIGITALAX unbundles fashion and micro-manufacturing through web3 social commerce and paths to user-operated open silicon synth machines. DIGITALAX aims to accelerate personal autonomy through a complementary ecosystem of tools and interfaces for web3 creators, including Chromadin, Coin Op, The Dial, Legend and The Manufactory.

Flagship: https://t.co/cM2ucz26uc
Lens: https://t.co/vlkOdxlpOG
Github: https://t.co/mCPr8jH4IY
Twitter: https://t.co/NYnsrtJzeY