Svelteth is an open-source library designed to simplify and amplify Web3 adoption in Svelte 5 projects. By leveraging Svelte's reactivity, Svelteth makes it easy to connect, manage, and interact with Ethereum wallets and providers in your Svelte applications.
npm install svelteth
Use the reactive wallet state and actions directly:
import {
availableWallets,
wallet,
connectWallet,
disconnectWallet,
listenToProviderEvents,
isConnecting,
isSearching,
signMessage,
sendTransaction
} from 'svelteth';
Want to see your chain supported in Svelteth? You can easily add it by editing the chain file:
src/lib/chain/index.ts
CHAIN
constant with your chain's ID, name, and logo.Example:
CHAIN[12345] = {
name: 'Your Chain Name',
logo: 'URL to your chain logo'
};
Feel free to contribute with a pull request on GitHub to make it available for everyone!
MIT
Made with ❤️ for the Svelte and Web3 communities.