open-index/open-npm huggingface dataset:
npm package: @soroban-react/chains
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.1.13

# @soroban-react/chains

See the official gitbook: https://soroban-react.gitbook.io/index/
___

This package will charge the follwing chains:

```
import * as SorobanClient from "soroban-client";
import type {WalletChain, ChainName} from '@soroban-react/types';

export const allowedChains: Record<ChainName, WalletChain> = {
  public: {
    id: "public",
    name: "Public",
    networkPassphrase: SorobanClient.Networks.PUBLIC,
  },
  testnet: {
    id: "testnet",
    name: "Testnet",
    networkPassphrase: SorobanClient.Networks.TESTNET,
  },
  futurenet: {
    id: "futurenet",
    name: "Futurenet",
    networkPassphrase: SorobanClient.Networks.FUTURENET,
  },
  sandbox: {
    id: "sandbox",
    name: "Sandbox",
    networkPassphrase: SorobanClient.Networks.SANDBOX,
  },
  standalone: {
    id: "standalone",
    name: "Standalone",
    networkPassphrase: "Standalone Network ; February 2017",
  },
};
```


Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy
npm package: @soroban-react/connect-button
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.3.0

# @soroban-react/connect-button

See the official gitbook: https://soroban-react.gitbook.io/index/
___

Simple button, without style

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy

The @soroban-react/connect-button library sets a button inside your dApp to connect to an specific connector.
In order to use it you'll need to give it a context of type `SorobanContextType`

# Usage 

```
import { useSorobanReact } from '@soroban-react/core'
import { ConnectButton } from '@soroban-react/connect-button'

```

```
<ConnectButton label="Connect Wallet" sorobanContext={sorobanContext} />
```

Its important to give the button the sorobanContext that will carry the connector's `connect()` method that the button will trigger.
npm package: @soroban-react/contracts
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ . ___
Latest version: 9.3.0

# @soroban-react/contracts

See the official gitbook: https://soroban-react.gitbook.io/index/ .
___

```javascript
import { useContractValue} from '@soroban-react/contracts'
import { useSorobanReact } from '@soroban-react/core'


const balance = useContractValue({ 
        contractId: Constants.TokenId,
        method: 'balance',
        params: [contractIdentifier(Buffer.from(Constants.CrowdfundId, 'hex'))],
        sorobanContext: sorobanContext
    })
```
npm package: @soroban-react/core
Description: Use `autoconnect=true` to open user wallet automatically (by default is false).....
Latest version: 9.3.0

# @soroban-react/core

Use `autoconnect=true` to open user wallet automatically (by default is false).....

See the official gitbook: https://soroban-react.gitbook.io/index/ ..
___

@soroban-react is a simple, powerful framework for building modern Soroban dApps using React.

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy.


## Packages

| Package                                                   | Version                                                                                                                                       |
|-----------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------|
|
[`@soroban-react/core`](packages/core)                     | [![npm version](https://img.shields.io/npm/v/@soroban-react/core/latest.svg)](https://www.npmjs.com/package/@soroban-react/core/v/latest)
[`@soroban-react/types`](packages/types)                     | [![npm version](https://img.shields.io/npm/v/@soroban-react/types/latest.svg)](https://www.npmjs.com/package/@soroban-react/types/v/latest)
[`@soroban-react/freighter`](packages/core)                     | [![npm version](https://img.shields.io/npm/v/@soroban-react/freighter/latest.svg)](https://www.npmjs.com/package/@soroban-react/freighter/v/latest)



## Introduction

`@soroban-react` is a simple, powerful framework for building modern Soroban dApps using React. Its marquee features are:

- Full support for [Freighter](https://github.com/stellar/freighter)

- A dev-friendly context containing the current account and chain, and more, available globally throughout your dApp via a [React Context](https://reactjs.org/docs/context.html).

- The ability to write custom, fully featured _Connectors_ that manage every aspect of your dApp's connectivity with the Soroban blockchain and user accounts.

## Quickstart

To jump straight into code, check out the CodeSandbox demo! (ToDo)


## Implementations

Projects using `@soroban-react` include:

- [Soroban Example Dapp fork](https://github.com/esteblock/soroban-example-dapp/tree/%40soroban-react)

Open a PR to add your project to the list! If you're interested in contributing
npm package: @soroban-react/events
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.3.0

# @soroban-react/events

See the official gitbook: https://soroban-react.gitbook.io/index/
___

```javascript
import { useSorobanEvents, EventSubscription } from '@soroban-react/events'

const crowdfundPledgedEventSubscription: EventSubscription = {
      contractId: Constants.CrowdfundId, 
      topics: ['pledged_amount_changed'], 
      cb: (event: SorobanClient.SorobanRpc.EventResponse): void => {
        let eventTokenBalance = xdr.ScVal.fromXDR(event.value.xdr, 'base64')
        setTokenBalance(convert.scvalToBigNumber(eventTokenBalance))
      }, 
      id: Math.random()}

  const crowdfundTargetReachedSubscription: EventSubscription = {
      contractId: Constants.CrowdfundId, 
      topics: ['target_reached'], 
      cb: (event: SorobanClient.SorobanRpc.EventResponse): void => {
        setTargetReached(true)
      }, 
      id: Math.random()}

  const sorobanEventsContext = useSorobanEvents()
  React.useEffect(() => {
    const pledgedSubId = sorobanEventsContext.subscribe(crowdfundPledgedEventSubscription)
    const reachedSubId = sorobanEventsContext.subscribe(crowdfundTargetReachedSubscription)

    return () => {
      sorobanEventsContext.unsubscribe(pledgedSubId);
      sorobanEventsContext.unsubscribe(reachedSubId);
    }
  }, [sorobanEventsContext]);
```
npm package: @soroban-react/freighter
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.1.13

# @soroban-react/freighter

See the official gitbook: https://soroban-react.gitbook.io/index/
___

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy
npm package: @soroban-react/lobstr
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.1.13

# @soroban-react/lobstr

See the official gitbook: https://soroban-react.gitbook.io/index/
___

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy
npm package: @soroban-react/types
Description: See the official gitbook: https://soroban-react.gitbook.io/index/. ___
Latest version: 9.1.13

# @soroban-react/types

See the official gitbook: https://soroban-react.gitbook.io/index/.
___

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy
npm package: @soroban-react/utils
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.1.13

# @soroban-react/utils

See the official gitbook: https://soroban-react.gitbook.io/index/
___

Library created based on https://github.com/stellar/soroban-example-dapp/ written by https://github.com/paulbellamy
npm package: @soroban-react/wallet-data
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.3.0

# @soroban-react/wallet-data

See the official gitbook: https://soroban-react.gitbook.io/index/
___


Without any style 

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy
npm package: @soroban-react/xbull
Description: See the official gitbook: https://soroban-react.gitbook.io/index/ ___
Latest version: 9.3.0

# @soroban-react/xbull

See the official gitbook: https://soroban-react.gitbook.io/index/
___

Library created based on https://github.com/stellar/soroban-example-dapp/tree/main/wallet written by https://github.com/paulbellamy