Clients are libraries used to interact directly with the blockchain, for example, to deploy, call, and manage smart contracts.
LightLink is fully EVM-equivalent, and developers can use their usual Ethereum clients.
ethers.js
To use ethers.js in LightLink projects, you need to add LightLink's JSON RPC URL. In your project code, find this code and change the 'url' constant to:
To connect thirdweb SDK with LightLink Mainnet, add this code to your project:
import { LightlinkPhoenix } from"@thirdweb-dev/chains";import { ThirdwebSDK } from"@thirdweb-dev/sdk";// If used on the FRONTEND pass your 'clientId'constsdk=newThirdwebSDK(LightlinkPhoenix, { clientId:"YOUR_CLIENT_ID",});// --- OR ---// If used on the BACKEND pass your 'secretKey'constsdk=newThirdwebSDK(LightlinkPhoenix, { secretKey:"YOUR_SECRET_KEY",});constcontract=awaitsdk.getContract("0x0000000000000000000000000000000000000000");
To connect with the Testnet, add this code:
import { LightlinkPegasusTestnet } from"@thirdweb-dev/chains";import { ThirdwebSDK } from"@thirdweb-dev/sdk";// If used on the FRONTEND pass your 'clientId'constsdk=newThirdwebSDK(LightlinkPegasusTestnet, { clientId:"YOUR_CLIENT_ID",});// --- OR ---// If used on the BACKEND pass your 'secretKey'constsdk=newThirdwebSDK(LightlinkPegasusTestnet, { secretKey:"YOUR_SECRET_KEY",});constcontract=awaitsdk.getContract("0x0000000000000000000000000000000000000000");
web3.js
To use web3.js with LightLink Mainnet, initialize a new web3 object: