open-index/open-npm huggingface dataset:
npm package: @streambird/solana-embed-sdk
Description: ## Example
Author: Streambird Engineers
Latest version: 1.0.4

# @streambird/solana-embed-sdk

## Example

```javascript
import React from 'react';
import Streambird from '../';
import { PublicKey, Transaction, Connection, clusterApiUrl } from '@solana/web3.js';

var streambird = null;

function App() {
  useEffect(() => {
    streambird = new Streambird();
    streambird.on('connect', handleConnected);

    const checkReconnect = async () => {
      if(!connected) {
        await streambird.init();
      }
    }

    checkReconnect();
  }, []);

  const handleConnected = async (publicKey) => {
    let connection = new Connection(clusterApiUrl(network), 'confirmed');
    const samplePublicKey = new PublicKey(publicKey);
    let balance = await connection.getBalance(samplePublicKey);
  }

  const handleConnect = async () => {
    try {
      await streambird.init();
      await streambird.login();
    } catch (e) {
      console.log(e);
    }
  };

  const handleDisconnect = async () => {
    streambird.cleanUp();
  }

  const handleSignTransaction = async () => {
    try {
      const transaction = await streambird.signTransaction(await createTransaction());
      setOutputData(JSON.stringify(transaction));
      setIsSendTransaction(false);
    } catch(e) {
      console.log(e);
    }
  };
}
```

## API

```javascript
class Streambird extends EventEmitter {
  isInitialized: boolean;
  constructor(config?: StreambirdParams);

  get publicKey(): PublicKey | null;
  get isConnected(): boolean | undefined;
  get connected(): boolean | undefined;
  get isLoggedIn(): boolean | null;
  
  init({ publicToken, apiHost }?: StreambirdParams): Promise<void>;
  login(): Promise<string>;
  disconnect(): Promise<void>;
  logout(): Promise<void>;
  cleanUp(): Promise<void>;
  clearIframe(): void;
  
  signMessage(data: Uint8Array): Promise<Uint8Array>;
  signTransaction(transaction: Transaction): Promise<Transaction>;
  signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
  sendTransaction(transaction: Transaction): Promise<Transaction>;
}
```

## Run Example App

* Update `example/App.js` to use your own public api token. 
* In the root directory, run

```bash
yarn install
yarn build
yarn example:start
```
npm package: @streambird/solana-wallet-adapter
Description: This is the adapter library to use for integration with the Streambird Solana wallet adapter.
Author: Streambird Engineers
Latest version: 1.0.4

This is the adapter library to use for integration with the Streambird Solana wallet adapter.

## Getting Started

The steps required to create this library is below:

```bash
npm install
npm run build

# or

yarn install
yarn build
```

## Main Class

The class methods and properties can be seen below which utilizes the Solana wallet adapter wallet base classes.

```javascript
class StreambirdWalletAdapter extends BaseMessageSignerWalletAdapter {
  name: WalletName;
  url: string;
  icon: string;

  constructor({ params }?: StreambirdWalletAdapterConfig);

  get publicKey(): PublicKey | null;
  get connecting(): boolean;
  get connected(): boolean;
  get readyState(): WalletReadyState;

  connect(): Promise<void>;
  disconnect(): Promise<void>;
  signTransaction(transaction: Transaction): Promise<Transaction>;
  signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
  signMessage(message: Uint8Array): Promise<Uint8Array>;
}
```
npm package: @streambird/solana-wallet-sdk
Description: ## Example
Author: Streambird Engineers
Latest version: 0.0.122
Deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

# @streambird/solana-wallet-sdk

## Example

```javascript
import Streambird from '@streambird/solana-wallet-sdk';
import { Transaction } from '@solana/web3.js';

const wallet = new Streambird();

wallet.on('connect', () => console.log('connected', wallet.publicKey.toString()));
wallet.on('disconnect', () => console.log('disconnected'));

try {
  await wallet.connect();

  const transaction = await wallet.signTransaction(new Transaction());
  const transactions = await wallet.signAllTransactions([ new Transaction(), new Transaction() ]);

  const encoder = new TextEncoder();
  const messageBytes = encoder.encode('Test message');
  const messageSignature = await wallet.signMessage(messageBytes);

  await wallet.disconnect();
} catch (err) {
  console.log(err);
}
```

## API

```javascript
class Streambird extends EventEmitter {
  publicKey: PublicKey | null;
  isConnected: boolean;

  constructor(config: StreambirdConfig);

  connect(): Promise<void>;
  disconnect(): Promise<void>;

  sendTransaction(transaction: Transaction): Promise<Transaction>;
  signTransaction(transaction: Transaction): Promise<Transaction>;
  signAllTransactions(transactions: Transaction[]): Promise<Transaction[]>;
  signMessage(data: Uint8Array): Promise<Uint8Array>;
}
```

## Run Example App

* Update `example/App.js` to use your own public api token. 
* In the root directory, run

```bash
yarn install
yarn build
yarn example:start
```