-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,78 @@ | ||
# sv | ||
# @kredeum/wagmi-svelte5 | ||
|
||
Everything you need to build a Svelte project, powered by [`sv`](https://github.com/sveltejs/cli). | ||
A Svelte 5 Web3 library based on Wagmi, providing seamless integration of Web3 functionality into your Svelte applications. | ||
|
||
## Creating a project | ||
## Features | ||
|
||
If you're seeing this, you've probably already done this step. Congrats! | ||
- 🔌 Built for Svelte 5 | ||
- 🌐 Web3 Integration | ||
- 🔒 Wallet Connection Management | ||
- ⛓️ Multi-chain Support | ||
- 🎣 Reactive Web3 Hooks | ||
- 🔄 Auto-refresh on Network Changes | ||
|
||
## Installation | ||
|
||
```bash | ||
# create a new project in the current directory | ||
npx sv create | ||
npm install @kredeum/wagmi-svelte5 | ||
# or | ||
pnpm add @kredeum/wagmi-svelte5 | ||
# or | ||
yarn add @kredeum/wagmi-svelte5 | ||
``` | ||
|
||
## Quick Start | ||
|
||
```typescript | ||
import { createConfig } from '@kredeum/wagmi-svelte5'; | ||
|
||
# create a new project in my-app | ||
npx sv create my-app | ||
// Configure your Web3 settings | ||
const config = createConfig({ | ||
// Your configuration options here | ||
}); | ||
``` | ||
|
||
## Developing | ||
## Usage | ||
|
||
Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: | ||
### Connect Wallet | ||
|
||
```bash | ||
npm run dev | ||
```svelte | ||
<script> | ||
import { connect } from '@kredeum/wagmi-svelte5'; | ||
</script> | ||
# or start the server and open the app in a new browser tab | ||
npm run dev -- --open | ||
<button on:click={connect}>Connect Wallet</button> | ||
``` | ||
|
||
## Building | ||
## Requirements | ||
|
||
- Svelte 5.x | ||
- Node.js 16+ | ||
|
||
To create a production version of your app: | ||
## Development | ||
|
||
```bash | ||
npm run build | ||
# Install dependencies | ||
pnpm install | ||
|
||
# Run development server | ||
pnpm dev | ||
|
||
# Build package | ||
pnpm build | ||
|
||
# Run tests | ||
pnpm test | ||
``` | ||
|
||
You can preview the production build with `npm run preview`. | ||
## Contributing | ||
|
||
Contributions are welcome! Please feel free to submit a Pull Request. | ||
|
||
## License | ||
|
||
MIT License - see the [LICENSE](LICENSE) file for details. | ||
|
||
## Author | ||
|
||
> To deploy your app, you may need to install an [adapter](https://svelte.dev/docs/kit/adapters) for your target environment. | ||
zapaz.eth <[email protected]> (http://labs.kredeum.com/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters