open-index/open-npm huggingface dataset:
npm package: @protochain/ts-web
Description: Protochain TypeScript SDK (browser optimized)
Author: Bernard Bussy
Latest version: 1.3.0

# @protochain/ts-web

Browser-optimized TypeScript SDK for Protochain gRPC APIs via Connect-Web.

[![npm](https://img.shields.io/npm/v/@protochain/ts-web)](https://www.npmjs.com/package/@protochain/ts-web)

## Installation

```bash
npm install @protochain/ts-web
# or
yarn add @protochain/ts-web
```

## Usage

```typescript
import {
  AccountServiceWebClient,
} from '@protochain/ts-web/solana/account/v1';

import {
  TransactionServiceWebClient,
} from '@protochain/ts-web/solana/transaction/v1';
```

## Generated Files

Auto-generated from protobuf definitions in `lib/proto/protochain/solana/`:

- `src/protochain/solana/account/v1/` - Account management types and services
- `src/protochain/solana/transaction/v1/` - Transaction lifecycle types and services
- `src/protochain/solana/program/system/v1/` - System program types and services
- `src/protochain/solana/program/token/v1/` - SPL Token & Token-2022 types and services
- `src/protochain/solana/rpc_client/v1/` - Direct RPC client types and services
- `src/protochain/solana/type/v1/` - Common types (commitment levels, keypairs, token programs)

## Development

### Regenerating from protobuf

```bash
# From repository root - generates only TypeScript bindings
./scripts/code-gen/generate/ts-web.sh

# Or generate all languages (Go, Rust, TypeScript)
./scripts/code-gen/generate/all.sh
```

### Building

```bash
cd lib/ts-web
yarn build
```

### Linting & Type Checking

```bash
yarn lint
yarn typecheck
```

## Dependencies

- `@bufbuild/protobuf` - Protobuf runtime for TypeScript
- `@connectrpc/connect` - Connect RPC client
- `@connectrpc/connect-web` - Web browser transport for Connect RPC

## Publishing

Published automatically via GitHub Actions when a `ts-web/v*.*.*` tag is pushed. Uses npm OIDC Trusted Publishing (no long-lived tokens).

```bash
# To publish a new version:
git tag ts-web/v1.0.0
git push origin ts-web/v1.0.0
```
npm package: @protocod/nest-elasticsearch
Description: Module for elastic search client
Author: Maximilien DI DIO
Latest version: 1.1.5

<p align="center">
  <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo_text.svg" width="320" alt="Nest Logo" /></a>
</p>

[travis-image]: https://api.travis-ci.org/nestjs/nest.svg?branch=master
[travis-url]: https://travis-ci.org/nestjs/nest
[linux-image]: https://img.shields.io/travis/nestjs/nest/master.svg?label=linux
[linux-url]: https://travis-ci.org/nestjs/nest

An Elastic Search Module for [Nest.js](https://github.com/nestjs/nest) 

## Description

This package wrap features provided by [the official elastic search client for Node.js](https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/index.html) into a nest.js provider `ElasticSearchService` in `ElasticSearchModule`.


## Installation

```bash
$ npm install @protocod/nest-elasticsearch --dev
```

## How to use

Go to your favorite module and import `ElasticSearchModule`

``` typescript
import { Module, Logger } from '@nestjs/common'
import { TypeOrmModule } from '@nestjs/typeorm'
import { Product } from './product.entity'
import { ProductTag } from './product.tag.entity'
import { Tag } from './tag.entity'
import { ElasticSearchModule } from '@protocod/nest-elasticsearch'
import { ProductController } from './product.controller'
import { ProductService } from './product.service'

@Module({
  imports: [
    TypeOrmModule.forFeature([
      Product,
      ProductTag,
      Tag
    ]),
    ElasticSearchModule.setOptions({
      node: 'http://localhost:9200',
      requestTimeout: 3000    
    })
  ],
  providers: [
    Logger,
    ProductService
  ],
  controllers: [
    ProductController
  ]
})
export class ProductModule {}
```

And simply inject the `ElasticSearchService` into your business layer

``` typescript
import { Controller, Get, Query } from '@nestjs/common'
import { ProductIndex } from './index/product.index'
import { ElasticSearchService } from '@protocod/nest-elasticsearch'
import { ApiResponse } from '@elastic/elasticsearch'

@Controller('products')
export class ProductController {
  constructor(private readonly elasticSearchService: ElasticSearchService) {}

  @Get()
  async getAllProducts(@Query('search') search: string): Promise<ReadonlyArray<ProductIndex>> {
    const apiResponse: ApiResponse<any> = await this.elasticSearchService.search({
      index: 'products',
      body: {
        query: {
          query_string: {
            allow_leading_wildcard: true,
            query: `*${search}*`
          }
        }
      }
    })
    return apiResponse.body.hits.hits.map(index => index._source)
  }
}
```