This thread is to help out each other to build using Next.js leveraging Klever Chain Network.
Does this both libraries for Web App & NodeJs work same ?
Web App - $npm install @klever/sdk-web
NodeJs - $npm install @klever/sdk-node
Hello @Jason_Stackhouse, hope you’re doing well!
No, they may look similar, but they serve different purposes:
sdk-node is designed for server-side applications. In this library, you manually manage your accounts, signatures, and related operations.
sdk-web is meant for client-side applications. In this library, whenever you need to sign a transaction or manage accounts, it interacts with the Klever Extension to handle those tasks.
Let me know if you need further clarification!
If i am building a kapp. I want user to
connect wallet,
sign message to verify ownership,
get balance of the connected address,
stake KDA,
disconnect wallet,
I must use Klever Web SDK ! ( for client side )
Am i correct ?
Anything that is automated ( bots, scripts, algo, … ) I must use sdk-node else for web app : sdk-web
Both of them serves similar functions but KLEVER-SDK-WEB does it by interacting with Klever Extension & K5 Wallet while KLEVER-SDK-NODE is completely independent of all.
How do I getBalance of a KDA not KLV using Next.js ?