@softwarecurator/solana-svelte

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.

Installation

To add this library to your Svelte project, run:

npm install @softwarecurator/solana-svelte

Usages

solanaProvider

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>

ConnectButton

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>

Top categories

Loading Svelte Themes