open-index/open-npm huggingface dataset:
npm package: @ottp/sdk
Description: Software Integration Kit for OTTP
Author: Krish
Latest version: 1.0.11

# OTTP Integration Kit

This is an official integration repo for OTTP.

## Using this example

Run the following command to install:

```sh
npm i @ottp/sdk
```

## Usage

#### Get Attestations

This method fetches attesations made using OTTP protocol for a given FID (Farcaster ID). Set `userInfo` to `true` if you need user details of the attester and the attested to be returned.

```sh
import { OttpClient } from '@ottp/sdk'

const main = async () => {

    const ottp = new OttpClient()
    const attestations = await getOttpAttestations('316300', true)
}

main()
```

```sh
import { OttpClient } from '@ottp/sdk'

const main = async () => {

    const ottp = new OttpClient()
    const attestations = await getOttpAttestations('316300')
}

main()
```


#### Get OTTP ID

This method fetches the ottp id from the chain for a given FID (Farcaster ID).

```sh
import { OttpClient } from '@ottp/sdk'

const main = async () => {

    const ottp = new OttpClient()
    ottp.getOttpId(316300)
}

main()
```

#### Get Collaborators

This method fetches the collaborators for a given FID (Farcaster ID).

```sh
import { OttpClient } from '@ottp/sdk'

const main = async () => {

    const ottp = new OttpClient()
    const collabs = await ottp.getCollaborators('316300')
    console.log(collabs)
}

main()
```

#### Get FIDs from tagged users

This method would be typically used in web clients to validate usernames entered by users while attesting.

```sh
import { OttpClient } from '@ottp/sdk'

const main = async () => {

    const ottp = new OttpClient()
    const fids = await ottp.getTaggedUserFids('@lowcodekrish @ting')
    console.log(fids)
}

main()
```

#### Create Attestation

Refer the [example](https://github.com/opentothepublic/ottp-sdk/tree/main/example) repo.
npm package: @ottrelite/core
Description: Extensible, unified tracing framework for React Native
Author: Callstack
Latest version: 0.1.1

# @ottrelite/core

This is the core package of the Ottrelite library for React Native, which provides a unified interface for various backends that can be used to trace and profile React Native applications.

<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=ottrelite" align="center">
  <picture>
    <img alt="Ottrelite" src="https://github.com/callstackincubator/ottrelite/blob/main/img/banner.jpg?raw=true">
  </picture>
</a>

<h3 align="center">
  <b>Ottrelite</b> - Unified, extensible, cross-language tracing toolkit for React Native ⚡️🔎
</h3>

---

<div align="center">

  [![Release](https://github.com/callstackincubator/ottrelite/actions/workflows/release.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/release.yml)
  [![Docs](https://github.com/callstackincubator/ottrelite/actions/workflows/docs.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/docs.yml)
  [![Build, lint & test (JS)](https://github.com/callstackincubator/ottrelite/actions/workflows/build-lint-test.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/build-lint-test.yml)

  [![core npm downloads](https://img.shields.io/npm/dm/@ottrelite/core.svg?style=flat-square&label=NPM%20-%20%40ottrelite%2Fcore)](https://www.npmjs.com/package/@ottrelite/core)

</div>

## Documentation

All the features, usage & installation of this package and extending it are documented in the [documentation](https://callstackincubator.github.io/ottrelite/docs/core/quick-start.html).
npm package: @ottrelite/instrumentation-react
Description: Pluggable tracing framework for React Native plugin for Babel - autoinstrumention
Author: Callstack
Latest version: 0.1.1

# @ottrelite/instrumentation-react

This plugin provides ways to automatically instrument React components with Ottrelite traces, using a Babel plugin.

<a href="https://www.callstack.com/open-source?utm_campaign=generic&utm_source=github&utm_medium=referral&utm_content=ottrelite" align="center">
  <picture>
    <img alt="Ottrelite" src="https://github.com/callstackincubator/ottrelite/blob/main/img/banner.jpg?raw=true">
  </picture>
</a>

<h3 align="center">
  <b>Ottrelite</b> - Unified, extensible, cross-language tracing toolkit for React Native ⚡️🔎
</h3>

---

<div align="center">

  [![Release](https://github.com/callstackincubator/ottrelite/actions/workflows/release.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/release.yml)
  [![Docs](https://github.com/callstackincubator/ottrelite/actions/workflows/docs.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/docs.yml)
  [![Build, lint & test (JS)](https://github.com/callstackincubator/ottrelite/actions/workflows/build-lint-test.yml/badge.svg)](https://github.com/callstackincubator/ottrelite/actions/workflows/build-lint-test.yml)

  [![instrumentation-react npm downloads](https://img.shields.io/npm/dm/@ottrelite/instrumentation-react.svg?style=flat-square&label=NPM%20-%20%40ottrelite%2Finstrumentation-react)](https://www.npmjs.com/package/@ottrelite/instrumentation-react)

</div>

Please read the [documentation website](https://callstackincubator.github.io/ottrelite/docs/instrumentation-react/quick-start.html) for more details.
npm package: @otts/uv-ui-types
Description: 为 uv-ui 组件提供 TypeScript 类型
Author: Otts
Latest version: 0.0.10

# @otts/uv-ui-types

## 介绍

## 致谢

最初在 [@ts-env/uv-ui](https://www.npmjs.com/package/@ts-env/uv-ui) 得到了灵感。

基于 <https://www.npmjs.com/package/@ts-env/uv-ui> 完成。
npm package: @otun/sdk
Description: OpenTunnel Node.js client SDK.
Author: OpenTunnel Team
Latest version: 0.1.0

# OpenTunnel Node.js SDK

OpenTunnel client SDK for Node.js runtimes.

## Requirements

- Node.js 20+
- ESM project setup

## Installation

```bash
pnpm add @otun/nodejs-sdk
```

## Quick Start

```ts
import { TunnelClient } from "@otun/nodejs-sdk";

const client = new TunnelClient({
	clientId: process.env.OPENTUNNEL_CLIENT_ID!,
	secret: process.env.OPENTUNNEL_SECRET!,
	tunnelHost: process.env.OPENTUNNEL_TUNNEL_HOST!,
	tunnelPort: 7654,
	logLevel: "info",
	onError: (error) => {
		console.error(error.code, error.message, error.context);
	},
});

await client.start();

process.on("SIGINT", async () => {
	await client.stop();
	process.exit(0);
});
```

## Options

- clientId: Required OpenTunnel client identifier.
- secret: Required OpenTunnel client secret.
- tunnelHost: Required tunnel entry host if OPENTUNNEL_TUNNEL_HOST is not set.
- tunnelPort: Optional tunnel entry port. Default 7654.
- controlUrl: Optional control plane websocket URL.
- heartbeatMs: Optional control heartbeat interval.
- reconnectMs: Optional reconnect delay.
- logLevel: Optional minimum log level. One of debug, info, warn, error.
- logger: Optional custom logger with log(level, message, meta) method.
- onControlConnected: Optional callback when control channel is ready.
- onControlDisconnected: Optional callback on control channel close.
- onTunnelConnected: Optional callback when a tunnel session becomes active.
- onTunnelDisconnected: Optional callback when a tunnel session closes.
- onError: Optional callback for SDK errors.

## Errors

All surfaced SDK failures use TunnelSdkError.

- INVALID_CONFIG
- CONTROL_AUTH_FAILED
- CONTROL_DISCONNECTED
- TUNNEL_CONNECT_FAILED
- TARGET_CONNECT_FAILED
- TUNNEL_RUNTIME_FAILED

## Logging

By default, logs are JSON lines emitted to stdout.

Use a custom logger:

```ts
import { TunnelClient, type TunnelLogger } from "@otun/nodejs-sdk";

const logger: TunnelLogger = {
	log(level, message, meta) {
		// forward to your logging stack
	},
};

const client = new TunnelClient({
	clientId: "...",
	secret: "...",
	tunnelHost: "...",
	logger,
});
```

## Environment Variables

- OPENTUNNEL_CONTROL_URL
- OPENTUNNEL_TUNNEL_HOST
- OPENTUNNEL_TUNNEL_PORT
- OPENTUNNEL_HEARTBEAT_MS
- OPENTUNNEL_RECONNECT_MS
- OPENTUNNEL_LOG_LEVEL

## Development

```bash
pnpm install
pnpm run typecheck
pnpm run test
pnpm run build
```
npm package: @otvechai/authorizer-react
Description: Authorizer React SDK allows you to implement authentication in your [React](https://reactjs.org/) application quickly. It also allows you to access the user profile.
Author: Lakhan Samani
Latest version: 1.1.61

# authorizer-react

Authorizer React SDK allows you to implement authentication in your [React](https://reactjs.org/) application quickly. It also allows you to access the user profile.

Here is a quick guide on getting started with `@authorizerdev/authorizer-react` package.

## Code Sandbox Demo: https://codesandbox.io/s/authorizer-demo-qgjpw

## Step 1 - Create Instance

Get Authorizer URL by instantiating [Authorizer instance](/deployment) and configuring it with necessary [environment variables](/core/env).

## Step 2 - Install package

Install `@authorizerdev/authorizer-react` library

```sh
npm i --save @authorizerdev/authorizer-react
OR
yarn add @authorizerdev/authorizer-react
```

## Step 3 - Configure Provider and use Authorizer Components

Authorizer comes with [react context](https://reactjs.org/docs/context.html) which serves as `Provider` component for the application

```jsx
import {
  AuthorizerProvider,
  Authorizer,
  useAuthorizer,
} from '@authorizerdev/authorizer-react';

const App = () => {
  return (
    <AuthorizerProvider
      config={{
        authorizerURL: 'http://localhost:8080',
        redirectURL: window.location.origin,
        clientID: 'YOUR_CLIENT_ID',
      }}
    >
      <LoginSignup />
      <Profile />
    </AuthorizerProvider>
  );
};

const LoginSignup = () => {
  return <Authorizer />;
};

const Profile = () => {
  const { user } = useAuthorizer();

  if (user) {
    return <div>{user.email}</div>;
  }

  return null;
};
```

## Commands

### Local Development

The recommended workflow is to run authorizer in one terminal:

```bash
npm start # or yarn start
```

This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.

Then run either Storybook or the example playground:

### Example

Then run the example inside another:

```bash
cd example
npm i # or yarn to install dependencies
npm start # or yarn start
```

The default example imports and live reloads whatever is in `/dist`, so if you are seeing an out of date component, make sure TSDX is running in watch mode like we recommend above. **No symlinking required**, we use [Parcel's aliasing](https://parceljs.org/module_resolution.html#aliases).

To do a one-off build, use `npm run build` or `yarn build`.

To run tests, use `npm test` or `yarn test`.

## Configuration

Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.

### Jest

Jest tests are set up to run with `npm test` or `yarn test`.

### Bundle analysis

Calculates the real cost of your library using [size-limit](https://github.com/ai/size-limit) with `npm run size` and visulize it with `npm run analyze`.
npm package: @otw/mask-react
Description: React String Mask Input
Author: Thomas Juster
Latest version: 1.0.1

# @otw/mask-react

Table Of Contents:

- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [CONTRIBUTE](#contribute)
  - [Local Installation](#local-installation)
  - [Run Tests](#run-tests)
  - [Build](#build)

## Install

```bash
npm i --save @otw/mask-react

yarn add @otw/mask-react
```

:warning: Under the hood, it relies on [@otw/mask](https://gitlab.com/thomasjuster/on-the-wire/tree/master/packages/mask)

## Usage

See mask examples in [@otw/mask documentation](https://gitlab.com/thomasjuster/on-the-wire/tree/master/packages/mask). Here I take the credit card example.

```jsx
import React from 'react'
import { InputMask } from '@otw/mask-react'

const mask = '.... .... .... ....'
const validators = { '.': /[0-9]/ }
export function CreditCardInput ({ value, onChange, onBlur, onFocus }) {
  return (
    <InputMask
      mask={mask}
      validators={validators}
      value={value} // raw value here, something like '1111222233334444'
      onChange={(e, { value, maskedValue }) => onChange(e, value)}
      onBlur={(e, { value, maskedValue }) => onBlur(e, { value, maskedValue })}
      onFocus={(e, { value, maskedValue }) => onFocus(e, { value, maskedValue })}
    />
  )
}
```

## API

```tsx
export interface InterfaceProps extends React.HTMLProps<HTMLInputElement> {
  mask: string;
  value: string;
  validators?: OTWMaskValidators; // type from @otw/mask → https://gitlab.com/thomasjuster/on-the-wire/tree/master/packages/mask
  ref?: React.Ref<HTMLInputElement>;
  _ref?: React.Ref<HTMLInputElement>;
  onChange: (e: React.ChangeEvent<HTMLInputElement>, data?: { value: string; maskedValue: string }) => void;
  onBlur?: (e: React.ChangeEvent<HTMLInputElement>, data?: { value: string; maskedValue: string }) => void;
  onFocus?: (e: React.ChangeEvent<HTMLInputElement>, data?: { value: string; maskedValue: string }) => void;
}

export function InputMask (props: InterfaceProps): ReactNode
```

## CONTRIBUTE

This library is provided as is, without any intention to add functionalities or anything. I intend to keep this package _extremely simple_, with simple masking functionalities.

If there are any bugs though, you can still submit a pull request, which I'll check out if relevant.

### Local Installation

```bash
git clone git@gitlab.com:thomasjuster/on-the-wire.git
cd ./on-the-wire
yarn
cd ./packages/mask-react
```

### Run Tests

```bash
yarn test
```

### Build

```bash
# development build
yarn make

# production build
yarn build
```
npm package: @otwb/lint
Description: otwb 项目的 ESLint、StyleLint 配置
Latest version: 2.0.0

# @otwb/lint

安装 `npm i -D @otwb/lint`

- 集成 `@eslint/js` 的 `recommended` 推荐规则；
- 集成 `typescript-eslint` 的 `recommendedTypeChecked`，启用 `Type Aware Rules 类型感知规则`，检查 ts、vue 文件的类型错误；
- 集成 `eslint-plugin-vue`的`flat/recommended` 推荐规则；
- 集成 `eslint-plugin-unicorn` 的 `flat/recommended` 推荐规则；
- 集成 `@unocss/eslint-config` 的 `flat` 推荐规则；
- 集成 `eslint-plugin-tsdoc` 规则；
- 集成 `eslint-plugin-import-x` 规则;
- 集成 `eslint-plugin-playwright`、`@vitest/eslint-plugin` 测试代码规则；
- 支持 `StyleLint` 配置。

> 由于启用了类型感知规则，原则上 typescript 会在整个项目上执行，推测 `lint-staged` 效果不佳。

## ESLint

安装 `npm i -D eslint`

```js
// eslint.config.js

import ithinkdt from '@otwb/lint'

/**
 * @type {import("eslint").Linter.FlatConfig[]}
 */
export default [
    ...ithinkdt,
    // 其他配置
]
```

## StyleLint

安装 `npm i -D stylelint`

```js
// stylelint.config.js

import ithinkdt from '@otwb/lint/stylelint'

/**
 * @type {import('stylelint').Config}
 */
export default {
    extends: [ithinkdt],
    rules: {
        // 覆盖配置
    },
}
```