- Guide: Getting Started
- Tool: GetLit CLI
- Example: Fetching Off-Chain Data in a Lit Action
- Example: Conditional Signing with Lit Actions
- Example: Using Mint/Grant/Burn: Use the Mint/Grant/Burn function in the Lit
contracts-sdkto atomically assign a Lit Action(s) to a PKP. The PKP will only return a signed response if the function you've declared in your Lit Action returns 'true'. Learn more about minting PKPs here.
Blockchains like Ethereum have smart contracts that let developers encode logic to change that state. As a key management network, Lit provides a method for allowing developers to encode logic that dictate signing.
A trivial example would be a Lit Action and associated PKP that checks if a number is prime, only returning a signature if the number is prime. Each node will execute the Lit Action with a submitted input and verify that it meets the required conditions. If it does, the node will provision an independent signing share. Only after more than two-thirds of these shares have been collected can the complete signature be formed.
- Blockchain Agnostic: Lit Actions can be used to write data to blockchains using PKPs.
- Immutable: Once a Lit Action has been published, just like a blockchain smart contract - it cannot be modified. Using Mint/Grant/Burn, you can atomically link a PKP to an authorized set of Lit Actions. This method guarantees that a particular PKP can only ever be used to sign data from within the approved set.
- Off-Chain Compatibility: Lit Actions can pull in data from off-chain sources natively, without requiring the use of a third party oracle.
Ideal use cases
- Generating proofs
- Looking up permitted actions, addresses and auth methods associated with a PKP
- Checking access control conditions with conditional signing
Not Recommended Use Cases
- POST request that inserts a new SQL row (if not called in single execution, the Lit Action will be executed by every node in parallel, you will end up with n number of rows, where n is no less than two-thirds the number of total nodes in the Lit network)
- ETH RPC calls
- Sending a transaction that needs an external API call (the API call will be sent n times, where n is no less than two-thirds the number of total nodes in the Lit network)