1.0.1 • Published 5 months ago

@buddy-link/react v1.0.1

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
5 months ago

Buddy SDK

React components and hooks for wallet integration with the Buddy platform.

Installation

npm install @buddy-link/react
# or
yarn add @buddy-link/react
# or
bun add @buddy-link/react

Usage

import { Buddy, useBuddy, useBuddyState } from '@buddy-link/react';

function Layout() {
  return (
    <Buddy apiKey="your-api-key" appId="your-app-id"/>
    <YourComponent />
  );
}

function YourComponent() {
  const { connect, wallet } = useBuddy();
  
  return (
    <div>
      {wallet ? (
        <p>Connected: {wallet.address}</p>
      ) : (
        <button onClick={connect}>Connect Wallet</button>
      )}
    </div>
  );
}

Components

  • Buddy - Main provider component
  • BuddyState - State management component (initialized inside Buddy already)

Hooks

  • useBuddy - Main hook for wallet operations
  • useBuddyState - Hook for accessing Buddy state

Changelog

1.0.0 - 2025-06-02

  • Initial release
  • Basic wallet connection functionality
  • React hooks for state management
  • TypeScript support

License

Apache-2.0

1.0.1

5 months ago

1.0.0

5 months ago