open-index/open-npm huggingface dataset:
npm package: @onekeyfe/aptos-wallet-adapter
Description: OneKey Wallet plugin to use with Aptos Wallet Adapter
Author: dev-fe@onekey.so
Latest version: 0.1.2

# OneKey wallet for wallet builders to interact with the Aptos Wallet Adapter

This repo provides wallet builders a pre-made class with all required wallet functionality following the [wallet standard](https://aptos.dev/standards/wallets) for easy and fast development to interact with the [Aptos Wallet Adapter](https://github.com/aptos-labs/aptos-wallet-adapter)

---

### Usage

- `fork` this repo
- run `npm install` or `yarn install`
- Run tests with `npm run test` - all tests should pass

At this point, you have a ready wallet class with all required properties and functions to integrate with the Aptos Wallet Adapter.

### Publish as a Package

Next step is to publish your wallet as a npm package so dapps can install it as a dependency.

- Make sure to update `package.json` name, description, author and any other properties.
- Run `npm install` then `npm run build` - a `dist` folder should be available
- (optional) Run `npm publish --dry-run` to see what would get published (make sure there is a `dist` folder)

Creating and publishing scoped public packages
https://docs.npmjs.com/creating-and-publishing-scoped-public-packages

Creating and publishing unscoped public packages
https://docs.npmjs.com/creating-and-publishing-unscoped-public-packages

### Add your name to the wallets list

Once the package is published, you can create a PR against the [aptos-wallet-adapter](https://github.com/aptos-labs/aptos-wallet-adapter) repo and add your wallet name as a url to the npm package to the [supported wallet list](https://github.com/aptos-labs/aptos-wallet-adapter#supported-wallet-packages) on the README file.

---

> **_Note:_** if your wallet provides function that is not included, you should open a PR against [aptos-wallet-adapter](https://github.com/aptos-labs/aptos-wallet-adapter) in the [core package](https://github.com/aptos-labs/aptos-wallet-adapter/blob/main/packages/wallet-adapter-core/src/WalletCore.ts) so it would support this functionality.
> You can take a look at the `signTransaction` on the wallet [core package](https://github.com/aptos-labs/aptos-wallet-adapter/blob/main/packages/wallet-adapter-core/src/WalletCore.ts)
npm package: @onekeyfe/blockchain-libs
Description: OneKey Blockchain Libs
Author: OneKey Team
Latest version: 0.0.48

# Blockchain Libs

![](https://github.com/OneKeyHQ/blockchain-libs/actions/workflows/test.yml/badge.svg)

## I want to develop

1. [Install nodejs](https://treehouse.github.io/installation-guides/mac/node-mac.html), recommend >= 14.x
2. [Install yarn](https://classic.yarnpkg.com/lang/en/docs/install/#mac-stable)
3. `cd $the_project`
4. `yarn`
<!-- 5. `yarn fix` before commit(deprecated) -->

### Before start commit

[Commit-Message details](https://github.com/conventional-changelog/commitlint)

```
A commit message consists of three sections: Header(required), Body(optional)
and Footer(optional).

Header is a single line string which is composed of three parts:
type(required), scope(optional) and subject(required).

<type>(<scope>): <subject>
// An empty line
<body>
// An empty line
<footer>

To avoid automatic line wrapping, always wrap lines of a commit message
to 72 characters.

---
Commit method 1 (manually)：
   eg:
      git commit -m "feat: add some new features"
      git commit -m "fix: fix some bugs"

Commit method 2 (interactively)：
   brew install commitizen
   cz c
```

## I want to publish new package

1. `npm install -g conventional-changelog-cli`
2. `yarn version` and input new version, then will update the CHANGELOG.md
3. `git push --tag`

## I want to use it as a package

1. `cd $my_own_project`
2. `yarn add @onekeyfe/blockchain-libs`
npm package: @onekeyfe/cross-inpage-provider-injected
Author: dev-fe@onekey.so
Latest version: 2.2.67

# cross-inpage-provider


# cross-inpage-provider

## 处理第三方库语法兼容性问题

当引入或升级第三方库时，可能会遇到语法兼容性检查失败的情况。这是因为我们的项目使用 `syntax-compatibility.eslint.config.cjs` 来限制使用较新的 JavaScript 语法特性，以确保更好的浏览器兼容性。

### 问题表现

1. ESLint 报错，提示类似：
   - `Logical OR assignment (||=) is not allowed`
   - `String.prototype.replaceAll is not allowed`
   - 其他在 `syntax-compatibility.eslint.config.cjs` 中定义的语法限制

### 解决步骤

1. 确认报错来源
   - 检查 ESLint 错误信息，定位是哪个第三方库使用了不兼容的语法
   - 通常这些错误会出现在 `node_modules` 中的文件

2. 将库添加到 webpack 配置中
   - 打开 `webpack.config.cjs`
   - 在 `includeModules` 数组中添加该库的包名
   ```js
   const includeModules = [
     // 已有的库
     '@solana/web3.js',
     // 添加新的库
     'your-new-package'
   ];
   ```

3. 验证修复
   - 重新运行构建或开发命令
   - 确认 ESLint 错误已解决

### 注意事项

1. 添加到 `includeModules` 意味着该库的代码将会被 webpack 处理和转换，这可能会：
   - 增加最终打包体积
   - 影响构建速度
   - 确保真的需要添加该库

2. 替代方案：
   - 考虑使用该库的较低版本（如果可用）
   - 寻找使用较旧语法的替代库
   - 如果可能，考虑自行实现相关功能

3. 定期审查：
   - 定期检查 `includeModules` 列表
   - 评估是否所有列出的库仍然需要被包含
   - 考虑是否可以移除一些不再需要的库

### 相关文件

- `syntax-compatibility.eslint.config.cjs`: 定义语法限制规则
- `webpack.config.cjs`: 配置需要处理的第三方模块