open-index/open-npm huggingface dataset:
npm package: @sommatic/react-sdk
Description: UI SDK components for Sommatic
Author: Camilo Alexander Rodriguez Cuaran
Latest version: 1.0.27

# @sommatic/react-sdk

## Description

The @sommatic/react-sdk is a collection of React-based UI components designed to aid in the development of web applications. This library includes a variety of user interface elements ranging from simple alerts and spinners to more complex components like document viewers and data grids, providing developers with essential tools to create intuitive and engaging user interfaces.

## Installation

Install the library in your project with the following command:

> npm install @sommatic/react-sdk

## Components

- **Placeholder**: A React component designed to handle user authentication via email and password to create an intuitive sign-in experience.


For more details on each component, including usage and configuration options, please refer to the full documentation.

## Development

### Requirements

> npm install -g sass

### Compile

> sass src/styles/_bootstrap-namespaced.scss src/styles/bootstrap-namespaced.css;npm run build

### Debug with Storybook

> npm run storybook

### Publish

⚠️ Compile first!

> npm version patch;npm publish

## Documentation

For detailed information on each component, including the props they accept and the events they emit, refer to the comprehensive documentation provided with the library.

## Contributions

Contributions to the library are welcome. If you wish to contribute, please review the contribution guidelines provided in the repository.

## License

This project is licensed under the Apache License. For more details, see the LICENSE file in the repository.
npm package: @somnia-chain/reactivity
Description: Typescript SDK to build event-driven applications on the Somnia blockchain
Author: Somnia Foundation
Latest version: 0.1.10

# 🚀 Somnia Reactivity TypeScript SDK

The Somnia Reactivity TypeScript SDK enables applications within the Javascript and Typescript ecosystem (full stack) to immediately utilize reactivity tooling offered by Somnia chain with minimal boiler-plate code. 

## 🔒 Key abtractions

The SDK uses `viem` to abstract away RPC calls, wallets, transaction creation and starting subscriptions.

- For read-only access, provide just a public client—the SDK handles contract setup for Somnia testnet or mainnet.
- For transactions, add any wallet client: private key-based, remote signer, ERC-4337 AA, etc.

## 🚀 Getting Started

### 📦 SDK Installation

Example with `npm`:

```bash
npm i @somnia-chain/reactivity
```

However, feel free to use alternatives like `pnpm`
```bash
pnpm add @somnia-chain/reactivity
```

### 🔌 Plugging into the SDK

You'll need `viem` installed for the public and or wallet client. Install it with `npm i viem`.

```typescript
import { createPublicClient, createWalletClient, http, defineChain } from 'viem'
import { SDK } from '@somnia-chain/reactivity'

// Example: Public client (required for reading data)
const chain = defineChain() // see viem docs for defining a chain
const publicClient = createPublicClient({
  chain, 
  transport: http(),
})

// Optional: Wallet client for writes
const walletClient = createWalletClient({
  account,
  chain,
  transport: http(),
})

const sdk = new SDK({
  public: publicClient,
  wallet: walletClient, // Omit if not executing transactions on-chain
})
```

### 📡 Activating Websocket Reactivity Subscriptions

Use WebSocket subscriptions for real-time updates to contract event and state updates atomically. Define params and subscribe — the SDK handles the rest via WebSockets.

```typescript
import { SDK, SubscriptionInitParams, SubscriptionCallback } from '@somnia-chain/reactivity'

// Example params
const initParams: SubscriptionInitParams = {
  ethCalls: [], // State to read when events are emitted
  context: 'data', // Optional, e.g., 'topic0', 'data', 'address'
  onData: (data: SubscriptionCallback) => console.log('Received:', data),
  onlyPushChanges: true, // Optional, push only if data changes
}

const subscription = await sdk.subscribe(initParams)

// Later, unsubscribe when done
await subscription.unsubscribe()
```

## 📚 Documentation
For detailed documentation, head over to our doc site [here](https://docs.somnia.network/developer/reactivity)
npm package: @somnia-chain/streams
Description: A TypeScript SDK for Somnia streams with first class reactivity support
Author: Somnia Foundation
Latest version: 0.12.2

# 🚀 Somnia Data Streams TypeScript SDK

The Somnia Data Streams TypeScript SDK enables streaming data on-chain, integrated with off-chain reactivity to unlock new paradigms in the blockchain ecosystem. SDKs for other languages to follow.

## 🔒 Key abtractions

The SDK uses `viem` to abstract away RPC providers, wallets, and on-chain transactions.

- For read-only access, provide just a public client—the SDK handles contract setup for Somnia testnet or mainnet.
- For transactions, add any wallet client: private key-based, remote signer, ERC-4337 AA, etc.

## 🚀 Getting Started

### 📦 Installation

Example with `npm`:

```bash
npm i @somnia-chain/streams
```

However, feel free to use alternatives like `pnpm`
```bash
pnpm add @somnia-chain/streams
```

### 🔌 Connecting to the SDK

You'll need `viem` installed for the public and or wallet client. Install it with `npm i viem`.

```typescript
import { createPublicClient, createWalletClient, http, defineChain } from 'viem'
import { SDK } from '@somnia-chain/streams'

// Example: Public client (required for reading data)
const chain = defineChain() // see viem docs for defining somnia
const publicClient = createPublicClient({
  chain, 
  transport: http(),
})

// Optional: Wallet client for writes
const walletClient = createWalletClient({
  account,
  chain,
  transport: http(),
})

const sdk = new SDK({
  public: publicClient,
  wallet: walletClient, // Omit if read-only
})
```

### 📡 Activating Off-Chain Reactivity (Subscriptions)

Use WebSocket subscriptions for real-time updates. Define params and subscribe—the SDK handles the rest via WebSockets.

```typescript
import { SDK, SubscriptionInitParams, SubscriptionCallback } from '@somnia-chain/streams'

// Example params
const initParams: SubscriptionInitParams = {
  ethCalls: [], // Multicall3 recommended; can be empty
  context: 'data', // e.g., 'topic0', 'data', 'address'
  onData: (data: SubscriptionCallback) => console.log('Received:', data),
  onlyPushChanges: true, // Push only if data changes
}

const subscription = await sdk.streams.subscribe(initParams)

// Later, unsubscribe when done
subscription.unsubscribe()
```

### 📤 Emitting Data and Triggering Subscriptions

To emit data that triggers subscribers' `onData` callbacks:

```typescript
// Pseudo-code example (see docs for full ABI/details)
const dataStreams = [{
    id: toHex(`44-7`, { size: 32 }),
    schemaId: driverSchemaId,
    data: encodedData
}]

const eventStreams = [{
    id: 'your-event-id',
    argumentTopics: topics.slice(1),
    data: data
}]

await sdk.streams.setAndEmitEvents(dataStreams, eventStreams)

// This on-chain emission triggers off-chain reactivity:
// Subscribers with matching eventId get onData called with the new data.
```

## 📚 Full Data Streams Documentation

For detailed event schemas, advanced usage, and more examples, check the [Somnia Data Streams Docs](https://docs.somnia.network/developer/development-workflow/somnia-data-streams).