Svelte Web3

screenshot of Svelte Web3
svelte

web3.js library integration as a Svelte store

Overview

svelte-web3 is a library that allows you to use the web3.js library as a collection of readable Svelte stores for Svelte or SvelteKit. If you prefer to use the ethers.js library to interact with EVM, you may be interested in the sister package svelte-ethers-store.

Features

  • Readable Svelte stores: The library creates readable Svelte stores that are automatically updated when a new connection is established, or when the chain or selected account changes.
  • Connection with browser provider: You can easily enable a connection with the current EIP-1193 provider injected in the browser window context by calling setProvider on the library abstract helper with no argument.
  • Connection with non-injected providers: You can connect to non-injected EIP-1193 providers like web3-onboard, buidler.dev, ethers.js, eth-provider, WalletConnect, etc. by calling setProvider on the library abstract helper with the JavaScript provider instance object of the library.

Summary

svelte-web3 is a library that allows you to use the web3.js library as a collection of readable Svelte stores. It provides easy connection with both browser provider and non-injected EIP-1193 providers. With svelte-web3, you can effortlessly manage connections, accounts, and chain data in your Svelte or SvelteKit application.

svelte
Svelte

Svelte is a modern front-end framework that compiles your code at build time, resulting in smaller and faster applications. It uses a reactive approach to update the DOM, allowing for high performance and a smoother user experience.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.