open-index/open-npm huggingface dataset:
npm package: @1spyral/elysia-graphql-yoga
Description: Plugin for Elysia for using graphql-yoga
Author: saltyAom
Latest version: 1.4.1-1spyral.0

# @elysiajs/graphql-yoga
Plugin for [Elysia](https://github.com/elysiajs/elysia) for using graphql-yoga.

Please refers to the [documentation](https://elysiajs.com/plugins/graphql-yoga.html) on how to use the package
npm package: @1stdex/first-sdk
Description: 🛠 An SDK for building applications on top of 1st V2
Latest version: 1.0.101

# @1st/first-sdk

The 1st SDK provides abstractions to assist you with interacting with the 1st smart contracts in a Typescript/Javascript environment (e.g. websites, node scripts).

It makes uses of the Core SDK to gain access to abstractions that are common amongst the 1st SDKs.

## Installation

This is a private npm package. Authentication required.

### Setup

1. Create an `.npmrc` file in your project root:

```
@1stdex:registry=https://registry.npmjs.org/
//registry.npmjs.org/:_authToken=${FIRST_SDK_NPM_TOKEN}
```

2. Set your NPM token:

```bash
export FIRST_SDK_NPM_TOKEN=your_npm_token_here
```

3. Install:

```bash
npm install @1stdex/first-sdk
```

### CI/CD Setup

Add `FIRST_SDK_NPM_TOKEN` to your environment secrets with a token that has read access to `@1stdex` packages.
npm package: @1stg/babel-preset
Description: Personal but Shareable Babel Preset for all 1stG.me projects
Author: JounQin
Latest version: 4.1.0

# @1stg/babel-preset

Personal but Shareable Babel Preset for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/browserslist-config
Description: Personal but Shareable Browserslist Configuration for all 1stG.me projects
Author: JounQin
Latest version: 2.1.4

# @1stg/browserslist-config

Personal but Shareable Browserslist Configuration for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/common-config
Description: Personal but Shareable Common Configuration for all 1stG.me projects
Author: JounQin
Latest version: 14.3.0

# @1stg/common-config

Personal but Shareable Common Configuration for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/postcss-config
Description: Personal but Shareable PostCSS Configuration for all 1stG.me projects
Author: JounQin
Latest version: 6.1.0

# @1stg/postcss-config

Personal but Shareable PostCSS Configuration for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/remark-preset
Description: Personal but Shareable Remark Preset for all 1stG.me projects
Author: JounQin
Latest version: 3.1.2

# @1stg/remark-preset

Personal but Shareable Remark Preset for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/renovate-config
Description: Personal but Shareable Renovate Configuration for all 1stG.me projects
Author: JounQin
Latest version: 1.1.4
Deprecated: Use github>1stG/configs instead

# @1stg/renovate-config

Personal but Shareable Renovate Configuration for all 1stG.me projects

## Sponsors

| 1stG                                                                                                                               | RxTS                                                                                                                               | UnTS                                                                                                                               |
| ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

## Backers

| 1stG                                                                                                                             | RxTS                                                                                                                             | UnTS                                                                                                                             |
| -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers and sponsors](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers and sponsors](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers and sponsors](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stg.me]: https://www.1stg.me
[jounqin]: https://GitHub.com/JounQin
[mit]: http://opensource.org/licenses/MIT
npm package: @1stg/simple-git-hooks
Description: Personal but Shareable simple-git-hooks Configuration for all 1stG.me projects
Author: JounQin
Latest version: 2.1.0

# @1stg/simple-git-hooks

Personal but Shareable simple-git-hooks Configuration for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1stg/tsconfig
Description: Personal but Shareable TypeScript Configuration for all 1stG.me projects
Author: JounQin
Latest version: 3.0.3

# @1stg/tsconfig

Personal but Shareable TypeScript Configuration for all 1stG.me projects

## Sponsors and Backers

[![Sponsors and Backers](https://raw.githubusercontent.com/1stG/static/master/sponsors.svg)](https://github.com/sponsors/JounQin)

### Sponsors

| 1stG                                                                                                                   | RxTS                                                                                                                   | UnTS                                                                                                                   |
| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective sponsors](https://opencollective.com/1stG/organizations.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective sponsors](https://opencollective.com/rxts/organizations.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective sponsors](https://opencollective.com/unts/organizations.svg)](https://opencollective.com/unts) |

### Backers

| 1stG                                                                                                                | RxTS                                                                                                                | UnTS                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [![1stG Open Collective backers](https://opencollective.com/1stG/individuals.svg)](https://opencollective.com/1stG) | [![RxTS Open Collective backers](https://opencollective.com/rxts/individuals.svg)](https://opencollective.com/rxts) | [![UnTS Open Collective backers](https://opencollective.com/unts/individuals.svg)](https://opencollective.com/unts) |

## Changelog

Detailed changes for each release are documented in [CHANGELOG.md](./CHANGELOG.md).

## License

[MIT][] © [JounQin][]@[1stG.me][]

[1stG.me]: https://www.1stG.me
[JounQin]: https://github.com/JounQin
[MIT]: http://opensource.org/licenses/MIT
npm package: @1table/sms-client
Description: HTTP 客户端 SDK，用于调用短信微服务（发送模板短信、批量发送、按网关发送）
Latest version: 1.0.0

# @1table/sms-client

短信微服务的 HTTP 客户端 SDK，供其他项目集成调用已部署的短信服务，无需手写 HTTP 请求。

## 快速示例（在 sdk 目录内运行）

```bash
cd sms-microservice/sdk
# 确保微服务已启动（如 cd .. && npm start）
node example.js
# 只测健康检查、不真实发短信：
SMS_SKIP_SEND=1 node example.js
# 指定微服务地址与租户：
SMS_SERVICE_URL=http://localhost:8091 SMS_TENANT_ID=YQD node example.js
```

详见 [example.js](./example.js)。

---

## 安装

在需要调用短信服务的项目中：

```bash
npm install @1table/sms-client
# 或从本地/私有源安装
npm install file:../sms-microservice/sdk
```

## 配置

| 选项 | 必填 | 说明 |
|------|------|------|
| `baseUrl` | 是 | 短信微服务根地址，如 `http://localhost:8091` |
| `tenantId` | 是 | 租户 ID，对应请求头 `X-Tenant-ID` |
| `apiKey` | 否 | 可选，当前服务不参与鉴权，保留用于兼容 |
| `timeout` | 否 | 请求超时毫秒数，默认 10000 |

## 使用示例

### 发送模板短信（单条）

```javascript
const { SmsClient } = require('@1table/sms-client');

const client = new SmsClient({
  baseUrl: process.env.SMS_SERVICE_URL || 'http://localhost:8091',
  tenantId: process.env.SMS_TENANT_ID || 'YQD',
});

// 使用模板 key（在微服务租户里配置的 key，如 REGISTER）
const res = await client.sendTemplate('13800138000', 'REGISTER', { code: '123456' });
console.log(res.data?.requestId);

// 或直接使用阿里云模板 code
await client.sendTemplate('13800138000', 'SMS_123456789', { code: '123456' });
```

### 批量发送

```javascript
const res = await client.sendBatch(
  ['13800138000', '13900139000'],
  'REGISTER',
  { code: '123456' }
);
console.log(res.data?.success, res.data?.failed, res.data?.details);
```

### 按网关发送（不依赖租户模板）

适用于 Btom 等无模板网关，或临时指定网关配置：

```javascript
await client.sendByGateway('13800138000', {
  content: '您的验证码是 123456，5 分钟内有效。',
  gatewayType: 'btom',
});
```

### 健康检查

```javascript
const ok = await client.health();
console.log(ok.status);
```

## 错误处理

SDK 使用 axios，请求失败（4xx/5xx 或网络错误）会抛出异常，建议业务侧 try/catch 并处理 `error.response?.status` 与 `error.response?.data`。

```javascript
try {
  await client.sendTemplate(mobile, 'LOGIN', { code });
} catch (err) {
  if (err.response?.status === 401) {
    // 缺少或无效的 X-Tenant-ID
  }
  if (err.response?.data?.error) {
    console.error(err.response.data.error);
  }
  throw err;
}
```

## 发布为 npm 包（可选）

- 若使用私有 npm 或公司 registry：在 `sdk/` 下执行 `npm publish --access restricted`（或 `public`）。
- 若仅内网使用：可在业务项目中通过 `package.json` 的 `dependency` 引用本地路径，例如：`"@1table/sms-client": "file:../sms-microservice/sdk"`。

## 相关文档

- 微服务 [API 说明](../docs/SMS_API_REFERENCE.md)
- [集成指南](../INTEGRATION_GUIDE.md)（迁移到微服务 + 使用方式）
npm package: @1tm/eslint-config-1tm-react
Description: 1TM ESLint config for react.
Latest version: 0.0.11

# @1tm/eslint-config-1tm-react

[![npm](https://flat.badgen.net/npm/v/@1tm/eslint-config-1tm-react)](https://www.npmjs.com/package/@1tm/eslint-config-1tm-react)
[![code style prettier](https://flat.badgen.net/badge/code%20style/prettier/ff69b4)](https://github.com/prettier/prettier)

<div align="center">
  <a href="https://1tm.io">
  <br />
	<img src="https://user-images.githubusercontent.com/10325111/86770909-062c3d00-c084-11ea-8a3c-9e6d8dd43747.png" alt="1TM" width="500">
  <br />
    <sub><i>One platform, Thousand Ideas, Million Possibilities.</i></sub>
  <br />
  <br />
  </a>
</div>

## Installation

```sh
$ yarn add @1tm/eslint-config-1tm-react -D
```

## Credit

- [eslint-config-airbnb](https://github.com/airbnb/javascript/tree/master/packages)
- [eslint-config-unicorn](https://github.com/sindresorhus/eslint-plugin-unicorn)

## LICENSE

MIT
npm package: @1tokenfe/hd-transport-lowlevel
Description: `@1tokenfe/hd-transport-http` is a library that implements transport communication using http.
Latest version: 1.1.15

# `@1tokenfe/hd-transport-lowlevel`

`@1tokenfe/hd-transport-http` is a library that implements transport communication using http.

## What is the purpose

- translate JSON payloads to binary messages using protobuf definitions comprehensible to OneToken devices
- chunking and reading chunked messages according to the [OneToken protocol](./protocol.md)
- exposing single API for various transport methods:
  - Http Transport
  - React Native Transport
  - WebUSB
- Create and expose typescript definitions based on protobuf definitions.

### The short version

In order to be able to use new features of onetoken-firmware you need to update protobuf definitions.

1. `git submodule update --init --recursive` to initialize git submodules.
1. `yarn update-submodules` to update firmware submodule
1. `yarn update:protobuf` to generate new `./messages.json` and `./src/types/messages.ts`

git submodule update --init --recursive to initialize firmware submodule
yarn update-submodules to update firmware submodule
yarn update:protobuf to generate new ./messages.json and ./src/types/messages.ts

## Docs

Documentation is available [hardware-js-sdk](https://developer.onetoken.so/connect-to-hardware/hardware-sdk/start)
npm package: @1tokenfe/hd-transport-web-device
Description: `@1tokenfe/hd-transport-webusb` is a library that implements transport communication by WebUSB.
Author: OneToken
Latest version: 1.1.15

# `@1tokenfe/hd-transport-webusb`

`@1tokenfe/hd-transport-webusb` is a library that implements transport communication by WebUSB.

## What is the purpose

- translate JSON payloads to binary messages using protobuf definitions comprehensible to OneToken devices
- chunking and reading chunked messages according to the [OneToken protocol](./protocol.md)
- exposing single API for various transport methods:
  - Http Transport
  - React Native Transport
  - WebUSB
- Create and expose typescript definitions based on protobuf definitions.

### The short version

In order to be able to use new features of onetoken-firmware you need to update protobuf definitions.

1. `git submodule update --init --recursive` to initialize git submodules.
1. `yarn update-submodules` to update firmware submodule
1. `yarn update:protobuf` to generate new `./messages.json` and `./src/types/messages.ts`

git submodule update --init --recursive to initialize firmware submodule
yarn update-submodules to update firmware submodule
yar update:protobuf to generate new ./messages.json and ./src/types/messages.ts

## Docs

Documentation is available [hardware-js-sdk](https://developer.onetoken.so/connect-to-hardware/hardware-sdk/start)
npm package: @1tokenfe/kaspa-core-lib
Description: JavaScript Kaspa library.
Latest version: 1.0.2

JavaScript Data Primitives Library for Kaspa
=============================================

**PLEASE NOTE: This project is under heavy development and is not production ready**

Based on the popular [Bitcore library](https://github.com/bitpay/bitcore) developed by BitPay for the Bitcoin, Kaspacore library provides primitives for interfacing with the Kaspa network.

Get Started
-----------

```sh
git clone git@github.com:aspectron/kaspacore-lib
```

Adding Kaspacore to your app's `package.json`:

```json
"dependencies": {
    "aspectron/kaspacore-lib": "*"
}
```

Kaspa adaptation
----------------

Kaspacore library provides primitives such as Transaction and UTXO data structures customized for use with the next-generation high-performance Kaspa network.

Documentation
-------------

The complete docs are hosted here: [bitcore documentation](https://github.com/bitpay/bitcore). There's also a [bitcore API reference](https://github.com/bitpay/bitcore/blob/master/packages/bitcore-node/docs/api-documentation.md) available generated from the JSDocs of the project, where you'll find low-level details on each bitcore utility.


Building the Browser Bundle
---------------------------

To build a kaspacore-lib full bundle for the browser:

```sh
gulp browser
```

This will generate files named `kaspacore-lib.js` and `kaspacore-lib.min.js`.

You can also use our pre-generated files, provided for each release along with a PGP signature by one of the project's maintainers. To get them, checkout the [releases](https://github.com/bitpay/bitcore/blob/master/packages/bitcore-lib/CHANGELOG.md).


Contributing
------------

See [CONTRIBUTING.md](https://github.com/bitpay/bitcore/blob/master/Contributing.md) on the main bitcore repo for information about how to contribute.

License
-------

Code released under [the MIT license](https://github.com/bitpay/bitcore/blob/master/LICENSE).

Bitcore - Copyright 2013-2019 BitPay, Inc. Bitcore is a trademark maintained by BitPay, Inc.  
Kaspacore - Copyright 2020 ASPECTRON Inc.
npm package: @1tokenfe/react-native-ble-utils
Description: ble uilts
Author: OnetokenHQ
Latest version: 0.1.5

# react-native-ble-utils

ble uilts

## Installation

```sh
npm install react-native-ble-utils
```

## Usage


```js
import { multiply } from 'react-native-ble-utils';

// ...

const result = await multiply(3, 7);
```


## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @1tokenfe/react-native-text-input
Description: text-input
Author: huhuanming
Latest version: 0.2.9

# react-native-text-input

text-input

## Installation

```sh
npm install react-native-text-input
```

## Usage


```js
import { TextInputView } from "react-native-text-input";

// ...

<TextInputView color="tomato" />
```


## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## License

MIT

---

Made with [create-react-native-library](https://github.com/callstack/react-native-builder-bob)
npm package: @1upmonster/sdk
Description: Core SDK for 1upmonster — wallet-based authentication and tenant/game management.
Latest version: 0.1.2

# @1upmonster/sdk

Core SDK for 1upmonster — wallet-based authentication and tenant/game management.

## Install

```bash
npm install @1upmonster/sdk
```

## Auth

Authentication is wallet-based (Ed25519). The SDK handles the challenge/response flow — you just provide a signer.

```ts
import { AuthClient } from "@1upmonster/sdk";

const auth = new AuthClient("https://api.1up.monster");

// Works with any wallet adapter that implements signMessage
const session = await auth.login({
  publicKey: wallet.publicKey.toBase58(),
  signMessage: (msg) => wallet.signMessage(msg),
});

// session.token — JWT for subsequent API calls
// session.walletPubkey — verified public key
// session.expiresAt — unix timestamp (ms)
```

## Tenant & Game Management

```ts
import { TenantClient } from "@1upmonster/sdk";

const client = new TenantClient("https://api.1up.monster", session.token);

// Tenant
const tenant = await client.createTenant("My Studio");
const me = await client.getTenant();

// Games
const game = await client.createGame("My Game");
const games = await client.listGames();
await client.deleteGame(gameId);

// API Keys (for game clients)
const { key } = await client.createApiKey(gameId, "production");  // store this — shown once
const keys = await client.listApiKeys(gameId);
await client.revokeApiKey(gameId, keyId);
```
npm package: @1upmonster/versus
Description: Matchmaking and room client for 1upmonster Versus — queue players, form matches, and relay game messages over WebSocket.
Latest version: 0.1.2

# @1upmonster/versus

Matchmaking and room client for 1upmonster Versus — queue players, form matches, and relay game messages over WebSocket.

## Install

```bash
npm install @1upmonster/versus
```

## Quick Start

```ts
import { VersusClient } from "@1upmonster/versus";

const versus = new VersusClient({
  baseUrl: "https://api.1up.monster",
  token: session.token,     // JWT from @1upmonster/sdk AuthClient
  gameApiKey: "your-api-key", // issued per-game via CLI or TenantClient
});
```

## Matchmaking

```ts
// Join the queue — returns a MatchProposal when a match is found
const proposal = await versus.matchmake(gameId, (status) => {
  console.log("Queue status:", status); // optional progress callback
});

// Accept the match
const room = await proposal.accept();

// Or decline
await proposal.decline();
```

`matchmake` opens a WebSocket to the queue, waits for `match_found`, and returns a `MatchProposal`. Calling `accept()` sends the acceptance and waits for `match_ready`, then returns a connected `Room`.

## Room

```ts
// Signal you're ready to play
room.ready();

// Send game state / actions to all players
room.broadcast({ type: "move", x: 100, y: 200 });

// Listen for incoming messages
room.on("game_message", (msg) => {
  console.log("From opponent:", msg.data);
});

// Other events
room.on("room_ready", () => { /* all players ready */ });
room.on("opponent_disconnected", () => { /* handle drop */ });
room.on("match_expired", () => { /* match timed out */ });
room.on("close", () => { /* room closed */ });

// Leave when done
room.leave();
```

## Admin Methods

These require only a JWT (no game API key needed):

```ts
const config = await versus.getConfig(gameId);
await versus.setConfig(gameId, { /* VersusConfig */ });
const matches = await versus.listMatches(gameId);
const match = await versus.inspectMatch(matchId);
await versus.leaveQueue(gameId);
```

## ELO Configuration

Versus reads ELO from on-chain accounts. Configure via `setConfig` or the CLI:

```ts
await versus.setConfig(gameId, {
  eloSource: {
    account: {
      type: "static",
      address: "<player_account_pubkey>",
    },
    offset: 0,
    type: "u32",
    endian: "little",
  },
  matchFormat: {
    playersPerTeam: 1,
    teams: 2,
  },
  queueTtlSeconds: 60,
  matchTtlSeconds: 300,
  acceptWindowSeconds: 15,
});
```

For PDA-derived accounts:

```ts
account: {
  type: "pda",
  programId: "<your_program_id>",
  seeds: [{ type: "wallet" }],
}
```