Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Solana transaction support #11

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Solana transaction support #11

wants to merge 1 commit into from

Conversation

SurgeCode
Copy link
Member

@SurgeCode SurgeCode commented Jan 3, 2025

Adds solana support through wallet connect

  • Still needs work but can take review on non nits aka general approach
  • Solana transaction primitive is also drafted out but needs testing PR

minimal implementation example

import { BitteAiChat } from 'bitte-ai-chat';
import { useAppKitConnection, Provider } from '@reown/appkit-adapter-solana/react';
import { useAppKitProvider } from '@reown/appkit/react';

const App = () => {
  // Get Solana connection and wallet provider
  const { connection } = useAppKitConnection();
  const { walletProvider } = useAppKitProvider<Provider>('solana');

  return (
    <BitteAiChat
      // Required agent configuration
      agentData={{
        id: "your-agent-id",
        name: "Agent Name",
        description: "Agent Description",
      }}
      // Solana wallet configuration
      solanaWallet={{
        connection,
        provider: walletProvider
      }}
      apiUrl="/api/chat"
    />
  );
};

export default App;

Copy link
Collaborator

@Markeljan Markeljan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants