LogoLogo
WebsiteDiscordTelegramX (Twitter)
  • About LightLink
    • What is LightLink?
    • Low Gas Fees
    • Enterprise Mode With Zero Fees
    • Benefits of Enterprise Mode
  • Using LightLink
    • Connecting a Wallet
    • Adding LL Tokens to Your Wallet
    • Bridging Assets
    • Getting Testnet Tokens
    • Use Cases
  • Building on LightLink
    • Live Networks
    • EVM and Solidity Basics
    • Smart Contracts
    • Boneh-Lynn-Shacham Signatures (BLS)
    • JSON-RPC Specification
    • Enterprise Mode Overview
    • Enabling Enterprise Mode
    • Developer AI Support
  • Tools for Developers
    • Bolt for Gasless NFT Minting
    • Block Explorers
    • Clients
    • IDEs
    • Toolchains
    • Data Indexers
    • Oracles and Random Number Generators
    • Deployed Contracts
    • SPACE ID Web3 Name SDK
  • Achitecture & Design
    • LightLink Protocol: Deep Dive
    • Bridge Architecture
    • Live Contracts Addresses
  • Miscellaneous
    • Brand Assets
    • Security Audits
    • Ecosystem Growth Program
Powered by GitBook
On this page
  • ethers.js
  • thirdweb's SDK
  • web3.js
  1. Tools for Developers

Clients

PreviousBlock ExplorersNextIDEs

Last updated 1 year ago

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 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:

const url = 'https://replicator.phoenix.lightlink.io/rpc/v1';
const provider = new ethers.providers.JsonRpcProvider(url);

To connect with the Testnet, insert the following:

const url = 'https://replicator.pegasus.lightlink.io/rpc/v1';
const provider = new ethers.providers.JsonRpcProvider(url);

thirdweb's SDK

To connect 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'
const sdk = new ThirdwebSDK(LightlinkPhoenix, {
  clientId: "YOUR_CLIENT_ID",
});
// --- OR ---
// If used on the BACKEND pass your 'secretKey'
const sdk = new ThirdwebSDK(LightlinkPhoenix, {
  secretKey: "YOUR_SECRET_KEY",
});

const contract = await sdk.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'
const sdk = new ThirdwebSDK(LightlinkPegasusTestnet, {
  clientId: "YOUR_CLIENT_ID",
});
// --- OR ---
// If used on the BACKEND pass your 'secretKey'
const sdk = new ThirdwebSDK(LightlinkPegasusTestnet, {
  secretKey: "YOUR_SECRET_KEY",
});

const contract = await sdk.getContract("0x0000000000000000000000000000000000000000");

web3.js

const Web3 = require('web3');
const web3 = new Web3('https://replicator.phoenix.lightlink.io/rpc/v1');

To connect with the Testnet, use the following initialization:

const Web3 = require('web3');
const web3 = new Web3('https://replicator.pegasus.lightlink.io/rpc/v1');

To use with LightLink Mainnet, initialize a new web3 object:

Other EVM-compatible clients should also work with LightLink, provided the are used.

ethers.js
thirdweb SDK
web3.js
correct RPC node addresses