npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wallet-gaya-sdk

v1.0.9

Published

SDK to connect and interact with Gaya Wallet easily in web apps.

Readme

Gaya Wallet SDK

A lightweight JavaScript/TypeScript SDK to easily connect to Gaya Wallet and detect Gaya Wallet installation in web applications.


✨ Features

  • Check if Gaya Wallet is installed
  • Connect to Gaya Wallet
  • Get the connected wallet address
  • Sign a message with Gaya Wallet
  • Check if wallet is currently connected
  • Disconnect the wallet
  • Send a transaction using Gaya Wallet

📦 Installation

Using npm:

npm install wallet-gaya-sdk

Using pnpm:

pnpm add wallet-gaya-sdk

Using yarn:

yarn add wallet-gaya-sdk

🚀 Usage

Import the SDK functions:

import {
  isGayaWalletInstalled,
  connectGayaWallet,
  getGayaWalletAddress,
  signMessageWithGayaWallet,
  isWalletConnected,
  disconnectWallet,
  sendTransaction,
} from "wallet-gaya-sdk";

1. Check if Gaya Wallet is Installed

if (isGayaWalletInstalled()) {
  console.log("Gaya Wallet is installed.");
} else {
  console.log("Gaya Wallet is not installed.");
}

2. Connect to Gaya Wallet

try {
  const wallet = await connectGayaWallet();
  console.log("Wallet connected:", wallet);
} catch (error) {
  console.error("Error connecting to Gaya Wallet:", error);
}

3. Get Connected Wallet Address

try {
  const address = await getGayaWalletAddress();
  console.log("Connected wallet address:", address);
} catch (error) {
  console.error("Error fetching wallet address:", error);
}

4. Sign Message with Gaya Wallet

try {
  const message = "Hello Solana World! Please sign me.";
  const signed = await signMessageWithGayaWallet(message);
  console.log("Signed message:", signed);
} catch (error) {
  console.error("Error signing message:", error);
}

5. Check if Wallet is Connected

const isConnected = await isWalletConnected();
console.log("Is wallet connected?", isConnected);

6. Disconnect Wallet

try {
  await disconnectWallet();
  console.log("Wallet disconnected.");
} catch (error) {
  console.error("Error disconnecting wallet:", error);
}

7. Send Transaction with Gaya Wallet

try {
  const transaction = "base64_or_serialized_transaction_data";
  const txResult = await sendTransaction(transaction);
  console.log("Transaction result:", txResult);
} catch (error) {
  console.error("Error sending transaction:", error);
}

📚 API Reference

isGayaWalletInstalled(): boolean

  • Checks if Gaya Wallet is available in the browser.
  • Returns: true if installed, otherwise false.

connectGayaWallet(): Promise<any>

  • Initiates a connection request to Gaya Wallet.
  • Returns: Wallet connection result or throws an error if connection fails.

getGayaWalletAddress(): Promise<string | null>

  • Retrieves the currently connected wallet address.
  • Returns: Address as a string, or null if not connected.

signMessageWithGayaWallet(message: string): Promise<{ address: string; message: string; signature: string } | null>

  • Requests Gaya Wallet to sign a message.
  • Returns: Signed object including address, message, and signature, or null if failed.

isWalletConnected(): Promise<boolean>

  • Checks if the wallet is currently connected.
  • Returns: true if connected, false otherwise.

disconnectWallet(): Promise<void>

  • Disconnects the wallet if connected.
  • Returns: void

sendTransaction(transaction: string): Promise<any>

  • Sends a transaction through Gaya Wallet.
  • Returns: Response from the wallet provider or null if failed.

📄 License

This project is licensed under the MIT License.