Express Backend
import express from "express";
const app = express()
const port = 3000
app.get('/', (req, res) => {
res.send('Hello World!')
})
app.listen(port, () => {
console.log(`Example app listening on port ${port}`)
})Initializing the Sign Protocol Client
import {
SignProtocolClient,
SpMode,
EvmChains
} from "@ethsign/sp-sdk";
import { privateKeyToAccount } from "viem/accounts";
const privateKey = "0x..."; // account responsible for paying gas fees
const client = new SignProtocolClient(SpMode.OnChain, {
chain: EvmChains.sepolia,
account: privateKeyToAccount(privateKey) // required in backend environments
});Setting Up Your Controller
(Frontend) Generating a Delegation Signature
Recap
Last updated
Was this helpful?
