This npm package provides a set of tools and components designed for Svelte applications to interact with the Solana blockchain. It simplifies the process of connecting to wallets, sending transactions, and managing state within Svelte apps.
To add this library to your Svelte project, run:
npm install @softwarecurator/solana-svelte
The solanaProvider
is a wrapper that gives access to give access to use solana throughout the application.
Example Usage:
<script lang="ts">
import { SolanaProvider } from '@softwarecurator/solana-svelte';
const { children } = $props();
</script>
<SolanaProvider>
{@render children()}
</SolanaProvider>
The ConnectButton
is a svelte component that gives the developer a quick button that will connect to the solana blockchain via detected providers
<script lang="ts">
import { ConnectButton } from '@softwarecurator/solana-svelte';
</script>
<div class="flex justify-center items-center h-screen">
<ConnectButton maxNumberOfWallets={3} />
</div>