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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@sqds/grid-react-native

v1.0.0

Published

React Native hooks and components for Grid SDK

Readme

@sqds/grid-react-native

React Native hooks and components for Grid SDK - Build mobile wallet applications with authentication, balance queries, and transactions.

Features

  • Authentication Hooks: useEmailAuth, usePasskeyAuth with built-in OTP and session management
  • Account Management: useAccount for real-time account state
  • Balance Queries: useBalance (single token) and useBalances (all tokens with pagination)
  • Transfers: useTransfer (send funds) and useTransfers (fetch history with filtering)
  • React Native Context: GridProvider for SDK client management
  • TypeScript: Full type safety with TypeScript support
  • AsyncStorage: Automatic session persistence using React Native AsyncStorage
  • Cross-Platform: Works on iOS and Android

Installation

npm install @sqds/grid-react-native @sqds/grid @react-native-async-storage/async-storage

Additional Setup

This package requires @react-native-async-storage/async-storage for session persistence.

For iOS:

cd ios && pod install

Quick Start

1. Setup GridProvider

Wrap your app with GridProvider:

import { GridProvider } from '@sqds/grid-react-native';

export default function App() {
  return (
    <GridProvider
      apiKey="your-api-key"
      environment="sandbox"
    >
      <YourApp />
    </GridProvider>
  );
}

2. Use Authentication

import { useEmailAuth } from '@sqds/grid-react-native';

function LoginScreen() {
  const { requestOtp, verifyOtp, isLoading } = useEmailAuth();

  const handleLogin = async () => {
    await requestOtp('[email protected]');
    // User receives OTP via email
    await verifyOtp('123456');
  };

  return (
    <Button onPress={handleLogin} disabled={isLoading}>
      Login
    </Button>
  );
}

3. Query Balances

import { useBalances } from '@sqds/grid-react-native';

function BalancesScreen() {
  const { balances, isLoading } = useBalances();

  if (isLoading) return <ActivityIndicator />;

  return (
    <FlatList
      data={balances}
      renderItem={({ item }) => (
        <Text>{item.mint}: {item.balance}</Text>
      )}
    />
  );
}

Available Hooks

  • useEmailAuth() - Email + OTP authentication
  • usePasskeyAuth() - Passkey (biometric) authentication
  • useAccount() - Get account information
  • useBalance(mint) - Query single token balance
  • useBalances() - Query all token balances
  • useTransfer() - Send transactions
  • useTransfers() - Fetch transaction history
  • useGridClient() - Access the underlying Grid SDK client

Documentation

For complete documentation, visit docs.grid.squads.xyz

Related Packages

License

MIT