diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml new file mode 100644 index 000000000..247ff21e6 --- /dev/null +++ b/.commitlintrc.yaml @@ -0,0 +1,3 @@ +extends: + - "@commitlint/config-conventional" + \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/task.yml b/.github/ISSUE_TEMPLATE/task.yml new file mode 100644 index 000000000..122d482d3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yml @@ -0,0 +1,35 @@ +name: 更新任务 +description: 更新任务信息 +title: "[Task]: " +labels: [task] +assignees: + - izayl +body: + - type: dropdown + id: type + attributes: + label: 这个 PR/issue 属于什么类型? + multiple: false + options: + - bug 修复(Bugfix) + - 创建新的基础任务 + - 创建新的进阶任务 + - 更新任务内容 + - 任务认领 + - type: input + id: task + attributes: + label: 涉及的任务是哪个 + description: 请填写任务名 + placeholder: 例如:uniswap-v3 + validations: + required: true + - type: textarea + id: info + attributes: + label: 详细信息 + description: Bug详细信息,或者更新、创建任务的内容 + placeholder: Tell us what you see! + value: "" + validations: + required: false \ No newline at end of file diff --git a/.github/PULL_REQUEST_ISSUE_TAEMPLATE.md b/.github/PULL_REQUEST_ISSUE_TAEMPLATE.md new file mode 100644 index 000000000..eee0eb431 --- /dev/null +++ b/.github/PULL_REQUEST_ISSUE_TAEMPLATE.md @@ -0,0 +1,17 @@ + + + +** + +- [ ] bug 修复(Bugfix) +- [ ] 创建新的基础任务 +- [ ] 创建新的进阶任务 +- [ ] 更新任务内容 + +**涉及的任务是哪个?(必填)** + + + +**其他信息:** + + \ No newline at end of file diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml new file mode 100644 index 000000000..3b9cdd3a6 --- /dev/null +++ b/.github/workflows/codeql-analysis.yml @@ -0,0 +1,71 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +# +# ******** NOTE ******** +# We have attempted to detect the languages in your repository. Please check +# the `language` matrix defined below to confirm you have the correct set of +# supported CodeQL languages. +# +name: "CodeQL" + +on: + push: + branches: [ main ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ main ] + schedule: + - cron: '39 1 * * 5' + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: [ 'javascript', 'python' ] + # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] + # Learn more: + # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # ℹ️ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/lint-pr.yml b/.github/workflows/lint-pr.yml new file mode 100644 index 000000000..4298282b9 --- /dev/null +++ b/.github/workflows/lint-pr.yml @@ -0,0 +1,17 @@ +name: Lint PR + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + main: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/markdown-links.yml b/.github/workflows/markdown-links.yml new file mode 100644 index 000000000..06ae46cf8 --- /dev/null +++ b/.github/workflows/markdown-links.yml @@ -0,0 +1,21 @@ +name: Check Markdown links +on: + workflow_dispatch: + + +jobs: + markdown-link-check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Link Checker + id: lychee + uses: lycheeverse/lychee-action@v2.0.2 + + - name: Create Issue From File + if: env.lychee_exit_code != 0 + uses: peter-evans/create-issue-from-file@v4 + with: + title: Link Checker Report + content-filepath: ./lychee/out.md + labels: report, automated issue \ No newline at end of file diff --git a/.gitignore b/.gitignore index 51f786b1c..48681f5f4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,12 @@ */node_modules -*/sk.txt -*/sk*.txt -*/sk*.json -*/package-lock.json +**/.env +**/sk.txt +**/env.py +**/sk*.txt +**/sk*.json +**/__pycache__ +**/Uniswap +**/package-lock.json # dependencies /node_modules /.pnp @@ -14,9 +18,11 @@ **/*.bytecode.js **/*.abi.js **/*.address.js -*/yarn.lock -*/artifacts -*/cache +**/yarn.lock +**/artifacts +**/cache +**/debug +**/target # testing coverage @@ -26,7 +32,7 @@ build # misc .DS_Store -.env* +.env # debug npm-debug.log* @@ -35,3 +41,4 @@ yarn-error.log* .idea .vscode +mnemonic.txt diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..66888488c --- /dev/null +++ b/.gitmodules @@ -0,0 +1,9 @@ +[submodule "lib/openzeppelin-contracts"] +path = lib/openzeppelin-contracts +url = https://github.com/OpenZeppelin/openzeppelin-contracts +[submodule "dao/dao/Openzeppelin-DAO"] +path = dao/dao/Openzeppelin-DAO +url = https://github.com/tamphill/openzeppelin_dao.git +[submodule "basic/79-hardhat-foundry/lib/openzeppelin-contracts"] + path = basic/79-hardhat-foundry/lib/openzeppelin-contracts + url = https://github.com/Openzeppelin/openzeppelin-contracts diff --git a/.husky/commit-msg b/.husky/commit-msg new file mode 100755 index 000000000..b5a5eb074 --- /dev/null +++ b/.husky/commit-msg @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx commitlint --edit "$1" diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 000000000..d24fdfc60 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/usr/bin/env sh +. "$(dirname -- "$0")/_/husky.sh" + +npx lint-staged diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 000000000..d22e5a7ba --- /dev/null +++ b/.lycheeignore @@ -0,0 +1,2 @@ +https://sepolia.infura.io/v3 +http://127.0.0.1 \ No newline at end of file diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 000000000..b43bf86b5 --- /dev/null +++ b/.prettierignore @@ -0,0 +1 @@ +README.md diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 000000000..25f76488e --- /dev/null +++ b/.prettierrc @@ -0,0 +1,25 @@ +{ + "printWidth": 150, + "tabWidth": 2, + "semi": true, + "singleQuote": true, + "trailingComma": "es5", + "tslintIntegration": true, + "insertSpaceBeforeFunctionParenthesis": false, + "overrides": [ + { + "files": ["*.js", "*.ts"], + "options": { + "semi": true, + "singleQuote": true + } + }, + { + "files": "*.sol", + "options": { + "semi": true, + "tabWidth": 4 + } + } + ] +} diff --git a/.solhint.json b/.solhint.json new file mode 100644 index 000000000..742915020 --- /dev/null +++ b/.solhint.json @@ -0,0 +1,16 @@ +{ + "extends": "solhint:recommended", + "rules": { + "code-complexity": ["warn", 7], + "function-max-lines": ["warn", 50], + "max-line-length": ["error", 120], + "func-param-name-mixedcase": "warn", + "modifier-name-mixedcase": "warn", + "ordering": "warn", + "compiler-version": ["error", "^0.8.20"], + "func-visibility": ["warn", { "ignoreConstructors": true }], + "immutable-vars-naming": "off", + "one-contract-per-file": "off", + "no-console": "off" + } +} diff --git a/.solhintignore b/.solhintignore new file mode 100644 index 000000000..7a2b3c1c1 --- /dev/null +++ b/.solhintignore @@ -0,0 +1,2 @@ +lib +node_modules/ diff --git a/BTC/Advanced/Lighting Network/README-EN.md b/BTC/Advanced/Lighting Network/README-EN.md new file mode 100644 index 000000000..3a51147db --- /dev/null +++ b/BTC/Advanced/Lighting Network/README-EN.md @@ -0,0 +1,42 @@ +# Lightning Network + +The Lightning Network is a Layer 2 payment protocol for Bitcoin, designed to enable fast, low-cost transactions by reducing on-chain transactions. Built on top of the Bitcoin blockchain, it aims to solve Bitcoin's current scalability and transaction speed issues. Here's a detailed introduction to the core concepts and functions of the Lightning Network: + +### 1. **Core Concept: Payment Channels** + +The Lightning Network operates through payment channels. The specific process is as follows: + - **Creating Payment Channels**: When two parties need frequent transactions, they can create a payment channel. This requires both parties to deposit initial funds into a multi-signature wallet, recorded on the blockchain as a single on-chain transaction. + - **Off-chain Transactions**: Once the channel is established, both parties can directly exchange signed balance updates off-chain, without requiring network-wide confirmation, greatly improving transaction speed. + - **Closing Channels**: When parties no longer need to continue transacting, they can choose to close the channel. The final balance state of the channel is then recorded on the Bitcoin blockchain as an on-chain transaction. This greatly reduces blockchain burden as multiple transactions only require two on-chain transactions (opening and closing). + +### 2. **Transaction Mechanism in Lightning Network** + +In the Lightning Network, transactions within channels are instantly confirmed. The specific process is: + - **Incremental Balance Updates**: Each off-chain transaction only updates the balance state in the payment channel, without broadcasting to the Bitcoin blockchain. + - **Decentralized Trust Transactions**: Each state update is confirmed by signatures from both parties, ensuring neither party can tamper with transaction balances, preventing attempts to take excess funds. + +### 3. **Cross-Channel Payment Routing** + +The Lightning Network supports not only direct payments between two channel users but also multi-hop payments, allowing funds to be transferred to target users through multiple channels. The specific process is: + - **Path Finding**: If there's no direct channel between two users, the network finds suitable paths through other nodes to complete the payment. + - **Payment Atomicity**: The entire payment only completes when all intermediate nodes in the path agree and complete their part of the payment, ensuring funds aren't intercepted during multi-hop processes. + +### 4. **Main Advantages** + + - **Scalability**: Through off-chain transactions, the Lightning Network significantly reduces Bitcoin blockchain load, theoretically supporting millions of transactions per second. + - **Lower Fees**: Most transactions occur off-chain, with very low transaction fees, only requiring a fraction of on-chain transaction fees. + - **Instant Payments**: Lightning Network transactions are almost instantaneous, making them suitable for daily consumption, unlike on-chain transactions that might take minutes. + +### 5. **Challenges and Limitations** + + - **Liquidity Requirements**: To ensure large transactions flow smoothly, each node in the path must have sufficient funds in the channel, otherwise transactions might be blocked. + - **Channel Management**: Users need to manually open and close channels, each operation requiring on-chain fees, making frequent operations costly. + - **Security Risks**: While the Lightning Network is highly secure, it's not without risks. Nodes need to stay online to prevent attackers from broadcasting outdated transactions. + +### 6. **Lightning Network Applications and Future** + + - **Micropayments**: Due to low fees, the Lightning Network is ideal for micropayments, such as content tipping, small donations, and in-app purchases. + - **Merchant and Retail**: With near-real-time transaction speeds, the Lightning Network can make Bitcoin an ideal payment method for retail, dining, and daily consumption. + - **Cross-border Payments**: It enables quick and low-cost international remittances, providing a convenient path for cross-border payments. + +The Lightning Network continues to evolve with ongoing development and user growth. It provides a promising solution to Bitcoin's scalability, but to fully realize its potential, it requires support from a reliable and robust node network. \ No newline at end of file diff --git a/BTC/Advanced/Lighting Network/README.md b/BTC/Advanced/Lighting Network/README.md new file mode 100644 index 000000000..01af411ce --- /dev/null +++ b/BTC/Advanced/Lighting Network/README.md @@ -0,0 +1,40 @@ +**闪电网络**(Lightning Network)是一种比特币的第二层支付协议,旨在通过减少链上交易数量,实现快速、低成本的交易。这一网络在比特币区块链之上构建,旨在解决比特币当前的扩展性和交易速度问题。以下是对闪电网络的核心概念及其功能的详细介绍: + +### 1. **核心概念:支付通道** + +闪电网络的基本运行机制是通过支付通道。具体操作如下: + - **创建支付通道**:两方需要频繁交易时,可以通过创建支付通道来进行。这需要双方向一个多签名钱包存入初始资金,并记录在区块链上作为一次链上交易。 + - **链下交易**:通道建立后,双方可以直接交换签名的余额更新,这些更新是链下进行的,不需要经过全网确认,从而大大提高了交易速度。 + - **关闭通道**:当两方不再需要继续交易时,可以选择关闭通道。此时通道的最终余额状态会作为一次链上交易记录在比特币区块链上。这样可以极大减少区块链的负担,因为多笔交易只需记录两次链上交易(开通和关闭)。 + +### 2. **闪电网络中的交易机制** + +在闪电网络中,通道内的交易是即时确认的。具体过程如下: + - **增量余额更新**:每次链下交易只更新支付通道中的余额状态,而不广播至比特币区块链。 + - **去中心化的信任交易**:每次状态更新都由双方签名确认,确保任何一方都无法篡改交易余额,避免了一方试图多拿资金的可能。 + +### 3. **跨通道支付的路由** + +闪电网络不仅限于两个通道用户间的直接支付,还支持多跳支付,使得资金能够通过多个通道转账给目标用户。具体过程如下: + - **路径查找**:如果两个用户之间没有直接的通道,网络会寻找合适的路径通过其他节点完成支付。 + - **支付的原子性**:只有在路径中所有中间节点同意并完成自己的部分支付时,整个支付才会完成,确保资金在多跳过程中不被截留。 + +### 4. **主要优势** + + - **扩展性**:通过链下交易的方式,闪电网络大幅减少了比特币区块链的负载,理论上可以支持每秒数百万次交易。 + - **降低费用**:大部分交易是链下进行的,交易费用很低,仅需链上交易费用的一小部分。 + - **即时支付**:闪电网络的交易几乎是即时完成的,使其适用于日常消费,而不像链上交易那样可能需要数分钟。 + +### 5. **挑战与局限性** + + - **流动性要求**:为了确保大额交易畅通,路径中的每个节点必须在通道中拥有足够的资金,否则可能会阻塞交易。 + - **通道管理**:用户需要手动开通和关闭通道,每次操作都需支付链上费用,因此频繁操作的成本较高。 + - **安全风险**:虽然闪电网络安全性较高,但它并非没有风险。节点需要保持在线以防止攻击者试图广播过时的交易。 + +### 6. **闪电网络的应用场景及未来** + + - **小额支付**:由于费用低廉,闪电网络非常适合进行小额支付,如内容打赏、小额捐赠和应用内购买等。 + - **商户和零售**:交易速度接近实时,闪电网络能使比特币成为零售、餐饮等日常消费的理想支付方式。 + - **跨境支付**:它能快速且低成本地实现国际汇款,为跨境支付提供了一种便利的途径。 + +闪电网络随着开发和用户的持续增长在不断发展。它为解决比特币的扩展性提供了一个极具前景的方案,但要充分发挥其潜力,还需要一个可靠且强大的节点网络支持。 \ No newline at end of file diff --git a/BTC/Advanced/Lighting Network/config/index.md b/BTC/Advanced/Lighting Network/config/index.md new file mode 100644 index 000000000..ed0a9da71 --- /dev/null +++ b/BTC/Advanced/Lighting Network/config/index.md @@ -0,0 +1,106 @@ +要在比特币节点上配置和运行闪电网络节点,需要执行以下步骤。配置过程涉及安装比特币全节点、下载闪电网络节点软件(如 `lnd` 或 `c-lightning`),并设置基本的连接和通道参数。以下是详细步骤: + +### 步骤 1:安装比特币全节点 + +1. **下载比特币核心(Bitcoin Core)**: + - 在 [比特币官网](https://bitcoin.org/en/download)下载最新版 Bitcoin Core 软件,并按照官方文档安装。 + +2. **启动比特币节点**: + - 使用以下命令启动比特币节点: + ```bash + bitcoind -daemon + ``` + - 节点需要同步区块链数据,建议启用 `pruned` 模式,以节省存储空间。 + +3. **修改 `bitcoin.conf` 配置文件**: + - 打开 `bitcoin.conf` 文件(通常位于 `~/.bitcoin/bitcoin.conf`)并添加以下内容以支持闪电网络: + ```ini + server=1 + txindex=1 + rpcuser=your_rpc_user + rpcpassword=your_rpc_password + ``` + +### 步骤 2:选择并安装闪电网络节点软件 + +目前,主流的闪电网络实现有 `lnd`(Lightning Labs)、`c-lightning`(Blockstream)和 `eclair`(ACINQ)。以 `lnd` 为例: + +1. **下载并安装 `lnd`**: + - 可以在 [GitHub](https://github.com/lightningnetwork/lnd) 下载最新版本的 `lnd`。 + - 安装完 `lnd` 后,使用以下命令启动 `lnd` 服务: + ```bash + lnd + ``` + +2. **配置 `lnd.conf` 文件**: + - 在 `~/.lnd/lnd.conf` 文件中设置基本配置,连接到比特币节点: + ```ini + [Application Options] + alias=YourNodeAlias # 设置节点的别名 + color=#FF0000 # 设置节点颜色(十六进制) + + [Bitcoin] + bitcoin.active=1 + bitcoin.mainnet=1 # 或 bitcoin.testnet=1 用于测试网 + bitcoin.node=bitcoind + + [Bitcoind] + bitcoind.rpcuser=your_rpc_user + bitcoind.rpcpass=your_rpc_password + bitcoind.rpchost=localhost + bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 + bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 + ``` + +### 步骤 3:启动并初始化闪电网络节点 + +1. **初始化闪电网络节点**: + - 使用以下命令启动 `lnd` 并生成钱包: + ```bash + lncli create + ``` + - 你将被要求设置密码并备份助记词,这对于保护你的资金非常重要。 + +2. **启动和连接**: + - 启动 `lnd` 服务后,可以使用 `lncli` 命令管理和查询节点状态。例如: + ```bash + lncli getinfo + ``` + +### 步骤 4:建立闪电网络支付通道 + +1. **获取资金**: + - 首先为节点充值比特币。可以使用 `lncli newaddress` 获取节点地址,然后从外部钱包转账。 + +2. **打开通道**: + - 使用以下命令来打开通道: + ```bash + lncli openchannel --node_key=对方节点公钥 --local_amt=通道资金 + ``` + - 其中 `node_key` 是对方节点的公钥,`local_amt` 是设置的通道资金数量。 + +3. **监控通道状态**: + - 打开通道后,可以使用 `lncli listchannels` 查看通道状态,并确保通道正常运行。 + +### 步骤 5:管理和使用闪电网络节点 + +1. **发送和接收支付**: + - 可以通过 `lncli` 发起支付,或生成支付请求让他人向你支付。 + - 例如,生成收款请求: + ```bash + lncli addinvoice --amt=金额 + ``` + - 通过支付请求二维码或字符串,其他用户可以通过他们的闪电节点完成支付。 + +2. **关闭通道**: + - 如果不再需要通道,可以通过以下命令手动关闭: + ```bash + lncli closechannel --funding_txid=交易ID --output_index=输出索引 + ``` + +3. **备份和恢复**: + - 为了防止意外情况,定期备份数据至安全位置。`lnd` 支持通道备份,可以使用 `lncli exportchanbackup` 导出备份文件。 + +### 小结 + +通过以上步骤,您可以成功配置并运行闪电网络节点。闪电网络通过支付通道的机制,降低比特币链上负载,实现了低成本、快速的小额支付。 \ No newline at end of file diff --git a/BTC/Advanced/Lighting Network/config/index.sh b/BTC/Advanced/Lighting Network/config/index.sh new file mode 100644 index 000000000..009fc15ba --- /dev/null +++ b/BTC/Advanced/Lighting Network/config/index.sh @@ -0,0 +1,79 @@ + +### 设置并启动闪电网络节点的 Shell 脚本 + +```bash +#!/bin/bash + +# 设置变量 +BITCOIN_USER="your_rpc_user" # 替换为你的比特币 RPC 用户名 +BITCOIN_PASSWORD="your_rpc_password" # 替换为你的比特币 RPC 密码 +BITCOIN_CONF_PATH="$HOME/.bitcoin/bitcoin.conf" +LND_CONF_PATH="$HOME/.lnd/lnd.conf" + +# 步骤 1:安装必要的依赖项 +echo "Updating system and installing dependencies..." +sudo apt-get update -y && sudo apt-get upgrade -y +sudo apt-get install -y wget jq unzip + +# 步骤 2:下载并安装 Bitcoin Core +echo "Downloading and installing Bitcoin Core..." +wget https://bitcoin.org/bin/bitcoin-core-24.0.1/bitcoin-24.0.1-x86_64-linux-gnu.tar.gz +tar -xzf bitcoin-24.0.1-x86_64-linux-gnu.tar.gz +sudo install -m 0755 -o root -t /usr/local/bin bitcoin-24.0.1/bin/* + +# 步骤 3:配置比特币节点 +echo "Configuring Bitcoin node..." +mkdir -p "$HOME/.bitcoin" +cat < "$BITCOIN_CONF_PATH" +server=1 +txindex=1 +prune=600 # 如果存储空间有限 +rpcuser=$BITCOIN_USER +rpcpassword=$BITCOIN_PASSWORD +EOF + +# 启动比特币节点 +echo "Starting Bitcoin node..." +bitcoind -daemon +sleep 10 # 等待节点启动 + +# 步骤 4:下载并安装 lnd +echo "Downloading and installing lnd..." +wget https://github.com/lightningnetwork/lnd/releases/download/v0.15.0-beta/lnd-linux-amd64-v0.15.0-beta.tar.gz +tar -xzf lnd-linux-amd64-v0.15.0-beta.tar.gz +sudo install -m 0755 -o root -t /usr/local/bin lnd-linux-amd64-*/lnd +sudo install -m 0755 -o root -t /usr/local/bin lnd-linux-amd64-*/lncli + +# 步骤 5:配置 lnd 节点 +echo "Configuring lnd node..." +mkdir -p "$HOME/.lnd" +cat < "$LND_CONF_PATH" +[Application Options] +alias=YourNodeAlias # 设置节点别名 +color=#FF0000 # 设置节点颜色 + +[Bitcoin] +bitcoin.active=1 +bitcoin.mainnet=1 +bitcoin.node=bitcoind + +[Bitcoind] +bitcoind.rpcuser=$BITCOIN_USER +bitcoind.rpcpass=$BITCOIN_PASSWORD +bitcoind.rpchost=localhost +bitcoind.zmqpubrawblock=tcp://127.0.0.1:28332 +bitcoind.zmqpubrawtx=tcp://127.0.0.1:28333 +EOF + +# 步骤 6:启动 lnd 节点 +echo "Starting lnd node..." +lnd --configfile="$LND_CONF_PATH" & + +# 步骤 7:等待 lnd 启动后初始化钱包 +sleep 15 # 等待 lnd 完全启动 +echo "Creating lnd wallet..." +echo "Please follow the instructions to create a wallet for your lnd node:" +lncli create + +echo "Lightning Network node setup is complete!" +``` \ No newline at end of file diff --git a/BTC/Advanced/Lighting Network/lightning-network.js b/BTC/Advanced/Lighting Network/lightning-network.js new file mode 100644 index 000000000..6d1afed61 --- /dev/null +++ b/BTC/Advanced/Lighting Network/lightning-network.js @@ -0,0 +1,280 @@ +// Custom error class for payment channel operations +class PaymentChannelError extends Error { + constructor(message) { + super(message); + this.name = 'PaymentChannelError'; + } +} + +// Payment Channel class represents a bi-directional payment channel between two parties +class PaymentChannel { + constructor(channelId, partyA, partyB, initialDepositA, initialDepositB, timeoutBlocks = 144) { + // Validate input parameters + if (initialDepositA < 0 || initialDepositB < 0) { + throw new PaymentChannelError('Initial deposits must be positive'); + } + if (!this._isValidParty(partyA) || !this._isValidParty(partyB)) { + throw new PaymentChannelError('Invalid party information'); + } + + this.channelId = channelId; + this.partyA = partyA; + this.partyB = partyB; + this.balanceA = initialDepositA; + this.balanceB = initialDepositB; + this.status = 'INITIALIZED'; + this.nonce = 0; + this.updates = new Map(); + this.timeoutBlocks = timeoutBlocks; // Default 24 hours (assuming 10 min blocks) + this.openBlockHeight = null; + } + + // Create a new payment channel + async createChannel() { + try { + if (this.status !== 'INITIALIZED') { + throw new PaymentChannelError('Channel already created'); + } + + // Create multisig transaction + const multisigTx = await this._createMultisigTransaction(); + this.openBlockHeight = await this._getCurrentBlockHeight(); + this.status = 'OPEN'; + + // Record initial state + this._recordUpdate({ + nonce: this.nonce, + sender: this.partyA.id, + receiver: this.partyB.id, + amount: 0, + balanceA: this.balanceA, + balanceB: this.balanceB, + timestamp: Date.now() + }); + + return true; + } catch (error) { + console.error('Failed to create channel:', error); + return false; + } + } + + // Update channel balances + async updateBalance(sender, receiver, amount) { + try { + // Validate channel state + this._validateChannelState(); + + // Validate amount + if (amount <= 0) { + throw new PaymentChannelError('Amount must be positive'); + } + + // Update balances based on sender and receiver + if (sender === this.partyA.id && receiver === this.partyB.id) { + if (this.balanceA < amount) { + throw new PaymentChannelError('Insufficient funds for party A'); + } + this.balanceA -= amount; + this.balanceB += amount; + } else if (sender === this.partyB.id && receiver === this.partyA.id) { + if (this.balanceB < amount) { + throw new PaymentChannelError('Insufficient funds for party B'); + } + this.balanceB -= amount; + this.balanceA += amount; + } else { + throw new PaymentChannelError('Invalid parties for transfer'); + } + + // Create and record update + const update = { + nonce: ++this.nonce, + sender, + receiver, + amount, + balanceA: this.balanceA, + balanceB: this.balanceB, + timestamp: Date.now() + }; + + // Sign and verify update (implementation needed) + // update.signature = await this._signUpdate(update); + // if (!this._verifySignature(update)) { + // throw new PaymentChannelError('Invalid signature'); + // } + + this._recordUpdate(update); + return true; + } catch (error) { + console.error('Failed to update balance:', error); + return false; + } + } + + // Close the payment channel and settle final balances + async closeChannel() { + try { + if (this.status === 'CLOSED') { + throw new PaymentChannelError('Channel already closed'); + } + + // Validate closing conditions + await this._validateCloseConditions(); + + // Create settlement transaction + const settlementTx = await this._createSettlementTransaction(); + this.status = 'CLOSED'; + + // Emit settlement event + this._emitSettlementEvent(settlementTx); + + return [this.balanceA, this.balanceB]; + } catch (error) { + console.error('Failed to close channel:', error); + return [0, 0]; + } + } + + // Get current channel state + getChannelState() { + return { + nonce: this.nonce, + balanceA: this.balanceA, + balanceB: this.balanceB, + timestamp: Date.now() + }; + } + + // Private helper methods + _validateChannelState() { + if (this.status !== 'OPEN') { + throw new PaymentChannelError('Channel not open'); + } + } + + _isValidParty(party) { + return party && party.id && party.publicKey; + } + + _recordUpdate(update) { + this.updates.set(update.nonce, update); + } + + async _getCurrentBlockHeight() { + // Implementation needed: connect to blockchain node + return Promise.resolve(1000); + } + + async _createMultisigTransaction() { + // Implementation needed: create actual multisig transaction + return Promise.resolve({ + channelId: this.channelId, + partyA: this.partyA, + partyB: this.partyB, + totalAmount: this.balanceA + this.balanceB, + timestamp: Date.now() + }); + } + + async _createSettlementTransaction() { + // Implementation needed: create actual settlement transaction + return Promise.resolve({ + channelId: this.channelId, + finalBalanceA: this.balanceA, + finalBalanceB: this.balanceB, + timestamp: Date.now() + }); + } + + async _validateCloseConditions() { + // Implementation needed: validate closing conditions + } + + _emitSettlementEvent(settlementTx) { + // Implementation needed: emit settlement event + } +} + +// Lightning Network class manages multiple payment channels +class LightningNetwork { + constructor() { + this.channels = new Map(); + } + + // Create a new payment channel + async createPaymentChannel(channelId, partyA, partyB, depositA, depositB) { + try { + const channel = new PaymentChannel( + channelId, + partyA, + partyB, + depositA, + depositB + ); + + if (await channel.createChannel()) { + this.channels.set(channelId, channel); + return channel; + } + return null; + } catch (error) { + console.error('Failed to create payment channel:', error); + return null; + } + } + + // Get an existing payment channel + getChannel(channelId) { + return this.channels.get(channelId); + } +} + +// Example usage +async function main() { + try { + // Create Lightning Network instance + const ln = new LightningNetwork(); + + // Create channel parties + const alice = { + id: 'Alice', + publicKey: '0x1234...', // Should be real public key + }; + const bob = { + id: 'Bob', + publicKey: '0x5678...', // Should be real public key + }; + + // Create payment channel + const channel = await ln.createPaymentChannel( + 'ch001', + alice, + bob, + 1.0, + 1.0 + ); + + if (!channel) { + throw new Error('Failed to create channel'); + } + + // Perform payments + console.log('Initial state:', channel.getChannelState()); + + await channel.updateBalance(alice.id, bob.id, 0.3); + console.log('After first payment:', channel.getChannelState()); + + await channel.updateBalance(bob.id, alice.id, 0.1); + console.log('After second payment:', channel.getChannelState()); + + // Close channel + const [finalBalanceA, finalBalanceB] = await channel.closeChannel(); + console.log('Final settlement:', { Alice: finalBalanceA, Bob: finalBalanceB }); + } catch (error) { + console.error('Error in main:', error); + } +} + +// Run the example +main().catch(console.error); \ No newline at end of file diff --git a/BTC/Advanced/Lighting Network/technical/imgs/offchain.png b/BTC/Advanced/Lighting Network/technical/imgs/offchain.png new file mode 100644 index 000000000..0061356df Binary files /dev/null and b/BTC/Advanced/Lighting Network/technical/imgs/offchain.png differ diff --git a/BTC/Advanced/Lighting Network/technical/imgs/open.png b/BTC/Advanced/Lighting Network/technical/imgs/open.png new file mode 100644 index 000000000..2062ebcd7 Binary files /dev/null and b/BTC/Advanced/Lighting Network/technical/imgs/open.png differ diff --git a/BTC/Advanced/Lighting Network/technical/imgs/route.png b/BTC/Advanced/Lighting Network/technical/imgs/route.png new file mode 100644 index 000000000..7c2f110dd Binary files /dev/null and b/BTC/Advanced/Lighting Network/technical/imgs/route.png differ diff --git a/BTC/Advanced/Lighting Network/technical/imgs/transfer.png b/BTC/Advanced/Lighting Network/technical/imgs/transfer.png new file mode 100644 index 000000000..445ce7543 Binary files /dev/null and b/BTC/Advanced/Lighting Network/technical/imgs/transfer.png differ diff --git a/BTC/Advanced/Lighting Network/technical/index.md b/BTC/Advanced/Lighting Network/technical/index.md new file mode 100644 index 000000000..d3bca6900 --- /dev/null +++ b/BTC/Advanced/Lighting Network/technical/index.md @@ -0,0 +1,75 @@ +闪电网络(Lightning Network,LN)是一种基于比特币区块链的**第二层支付协议**,旨在解决比特币主网的可扩展性和交易效率问题。它通过引入**支付通道**和**离线交易机制**,极大地减少了对链上交易的依赖,从而提升交易速度和降低成本。以下是闪电网络的主要技术原理。 + + +### 1. **支付通道的概念** + +支付通道是指两个用户之间创建的**链下交易**路径,允许双方在通道内多次转账,而无需每笔交易都记录在主链上。只在开通和关闭通道时需要链上交易,以确保资金安全。这种方式被称为“链下交易”,通过支付通道,双方可以在不影响区块链的情况下快速、安全地互相转账。 + +- **开通通道**:用户 A 和用户 B 向一个多重签名地址存入比特币,该地址需要两方的签名才能支出资金。 +- **更新余额**:两方可以通过交换新的余额分配签名,来更新支付通道的余额,而不进行链上记录。 +- **关闭通道**:当用户希望关闭通道时,最后的余额分配会提交到链上,进行最终结算。 + + +![offchain transaction](./imgs/offchain.png) + +### 2. **哈希时间锁定合约(HTLC)** + +HTLC 是闪电网络中的关键技术,用于确保链下交易的安全性。它通过**哈希锁定和时间锁定**的组合,让资金只有在特定条件满足时才会被转移,从而防止一方在交易完成前恶意撤回资金。 + +- **哈希锁定**:支付者生成一个随机数,并将其哈希值发送给接收者。接收者只有在知道该哈希值的原始输入时,才能解锁资金。 +- **时间锁定**:如果接收者未在指定时间内解锁资金,支付者可以撤销交易。这防止了接收者长时间不领取资金的情况。 + +HTLC 使闪电网络能够跨越多个节点转账,从而形成**跨通道的支付路径**,实现了网络的互联。 + +### 3. **路由支付** + +在闪电网络中,支付不需要直接的支付通道。即使没有直接的链下通道,用户也可以通过多个中介节点实现转账。闪电网络中的节点将自动寻找**最优路径**来完成支付,这一过程被称为路由。 + +- **多跳支付**:通过多个节点传递支付,用户可以利用其他节点作为中转站发送资金。 +- **路径发现和路由选择**:闪电网络使用路由协议(如 Onion 路由)找到最佳路径,确保资金在最短路径内传输,并提高了交易隐私性。 + + +![route pay](./imgs/route.png) + +### 4. **即时交易与低费用** + +与比特币区块链的**确认时间**相比,闪电网络中的链下交易几乎是即时的,因为交易只需双方签名并在通道中达成一致。而且,闪电网络的交易费用通常较低,仅需支付通道的维护费用或微量的路由费用,这使得其适合处理**小额支付**和**高频支付**。 + +### 5. **去中心化网络结构** + +闪电网络的设计是去中心化的,节点自由加入和退出,且不依赖于单一服务器或第三方。用户既可以选择与其他节点建立通道,也可以选择关闭通道。每个节点都可以自主设置路由费用,以激励更多节点参与进来,从而扩大网络的支付能力和覆盖范围。 + +### 6. **链下结算和通道关闭** + +闪电网络中的所有链下交易都是基于承诺的状态更新协议。只有当通道关闭时,链下的最后交易状态才会记录在链上: + +- **双向承诺**:在链下交易的过程中,任何一方都可以选择关闭通道,最后的余额状态将提交到链上,并进行结算。 +- **惩罚机制**:如果一方试图在链上提交过期的余额分配,另一方可以提交最新的状态,没收对方的余额。这种机制保证了用户不会恶意提交无效交易。 + +### 7. **闪电网络的优点和挑战** + +**优点**: +- **扩展性**:通过链下交易和支付通道,大大减轻了区块链的负担。 +- **低费用**:只在开通、关闭通道时支付链上交易费用,其余链下交易几乎无费用。 +- **隐私性**:交易不直接记录在区块链上,增强了交易隐私性。 +- **实时交易**:链下交易几乎是即时完成的。 + +**挑战**: +- **通道流动性**:当通道内的资金耗尽时,需要重新注资或重新开通新通道。 +- **网络连通性**:尽管闪电网络允许通过多跳支付进行路由,但找到稳定的路径可能会变得复杂。 +- **脱机风险**:由于是链下交易,断开网络或节点意外退出可能会影响交易的正常进行。 + +### 示例:使用闪电网络支付流程 + +1. **Alice 和 Bob 开通支付通道**:Alice 和 Bob 创建一个多重签名地址,并将 5 BTC 存入其中。 +![open channel](./imgs/open.png) + +2. **支付流程**:Alice 想给 Charlie 支付 1 BTC。Alice 和 Charlie 没有直接的通道,但 Bob 与 Charlie 之间有一个通道。因此,Alice 可以通过 Bob 将这笔金额转给 Charlie。 +3. **HTLC 保护**:Alice 创建一个 HTLC,将 1 BTC 锁定到 Bob,要求 Charlie 提供随机数来解锁。Bob 通过 Charlie 完成支付。 +4. **支付完成**:Charlie 提供随机数,Bob 获得资金解锁权,并最终完成 Alice 到 Charlie 的支付。 +![transfer](./imgs/transfer.png) + + +### 总结 + +闪电网络通过支付通道和 HTLC 实现了离线链下交易,同时通过去中心化的路由机制保证了可扩展性和交易隐私。尽管其实现和配置稍显复杂,但闪电网络为比特币和其他区块链提供了一种有效的扩容解决方案,极大地提升了区块链的应用潜力。 \ No newline at end of file diff --git a/BTC/Advanced/Multisign/OP_CHECKMULTISIG/README.md b/BTC/Advanced/Multisign/OP_CHECKMULTISIG/README.md new file mode 100644 index 000000000..34f134ba9 --- /dev/null +++ b/BTC/Advanced/Multisign/OP_CHECKMULTISIG/README.md @@ -0,0 +1,245 @@ +## OP_CHECKMULTISIG + +`OP_CHECKMULTISIG` 是比特币脚本语言中的一个操作码(opcode),用于实现多重签名验证。在比特币交易中,`OP_CHECKMULTISIG` 允许指定多个公钥,并要求至少有一定数量(M)的签名来验证交易。此功能广泛应用于多重签名钱包和联合管理的比特币地址,旨在增强比特币网络的安全性和灵活性。 + +### 背景 + +1. **早期比特币设计**: + - 比特币最初设计主要关注点是点对点的单一用户交易。 + - 简单的签名机制足以支持基本的比特币转账功能。 + +2. **安全需求增加**: + - 随着比特币的普及,越来越多的用户和组织开始使用比特币。 + - 对于大额资金或共享账户,单一签名的安全性不足以抵御潜在风险。 + +3. **多重签名需求**: + - 多重签名(multisig)技术允许多个签名者共同管理一个比特币地址,提高了安全性。 + - 特别适用于企业账户、家庭共享账户和其他需要联合管理的情境。 + +### 具体的 BIP + +1. **BIP 11**: + - 标题:`M-of-N Standard Transactions` + - 提案作者:Gavin Andresen + - 提出时间:2012 年 3 月 + - 内容:描述了多重签名交易的标准格式,即 M 个签名中的 N 个签名验证通过即可执行交易。 + +2. **BIP 16**: + - 标题:`Pay to Script Hash` + - 提案作者:Gavin Andresen + - 提出时间:2012 年 1 月 + - 内容:定义了支付到脚本哈希(P2SH)的机制,使得复杂的脚本可以更简洁地在链上表示,从而增强了多重签名的可用性。 + +### 时间线 + +1. **2011 年至 2012 年初**: + - 多重签名的需求逐渐显现,社区开始讨论如何实现更安全的交易机制。 + +2. **2012 年 1 月**: + - Gavin Andresen 提出 BIP 16,描述了 P2SH 的机制,为多重签名交易的简化提供了基础。 + +3. **2012 年 3 月**: + - Gavin Andresen 提出 BIP 11,明确了 M-of-N 多重签名交易的标准格式,具体描述了如何在比特币脚本中实现多重签名验证。 + +4. **2012 年 5 月**: + - 比特币客户端(Bitcoin Core)集成了 P2SH 和多重签名功能,`OP_CHECKMULTISIG` 操作码开始被正式使用。 + +### 关键人物 + +1. **Gavin Andresen**: + - 比特币基金会的首席科学家,最早提出并推动了 P2SH 和多重签名交易的标准化。 + - 他是 BIP 11 和 BIP 16 的主要作者,对 `OP_CHECKMULTISIG` 的引入和实施起到了关键作用。 + +2. **比特币开发社区**: + - 包括许多开发者和贡献者,他们共同讨论、审查和改进了多重签名机制。 + - 社区的参与和支持确保了这些改进提案的顺利实施和推广。 + +### 工作原理 + +`OP_CHECKMULTISIG` 的基本原理是检查一组公钥和签名,确认至少有 M 个签名是有效的。具体来说,这个操作码会验证堆栈上的公钥和签名,并确保至少有 M 个签名与对应的公钥匹配。 + +### 操作步骤 + +1. **堆栈输入**: + - 签名数量(N) + - N 个签名 + - 公钥数量(M) + - M 个公钥 + +2. **执行过程**: + - 从堆栈中弹出签名数量(N)。 + - 弹出 N 个签名并存储。 + - 弹出公钥数量(M)。 + - 弹出 M 个公钥并存储。 + - 验证至少有 M 个签名能匹配对应的公钥。 + - 如果验证成功,脚本继续执行;否则,脚本失败。 + +### 示例脚本 + +假设我们有三个公钥,需要至少两个签名来验证交易,脚本如下: + +``` +2 3 OP_CHECKMULTISIG +``` + +在这个脚本中: +- `2` 表示需要两个有效签名。 +- ` ` 是三个公钥。 +- `3` 表示总共有三个公钥。 +- `OP_CHECKMULTISIG` 执行多重签名验证。 + +### 例子详解 + +假设 Alice、Bob 和 Charlie 共同管理一个地址,任何交易需要至少两人签名。我们生成一个多重签名地址,并创建一个 P2SH(Pay to Script Hash)交易。 + +1. **创建多重签名地址**: + + ``` + 2 3 OP_CHECKMULTISIG + ``` + +2. **生成 P2SH 地址**: + 将上述脚本的哈希作为地址,这样可以简化交易脚本并提高安全性。 + +3. **花费多重签名地址中的资金**: + - Alice 和 Bob 签名交易。 + - 将签名和原始脚本放入输入脚本中: + + ``` + 0 2 3 OP_CHECKMULTISIG + ``` + +### 注意事项 + +- **漏洞**:早期版本的 `OP_CHECKMULTISIG` 有一个“off-by-one”漏洞,要求在签名数量前添加一个额外的 `OP_0`。 +- **效率**:验证签名和公钥需要计算资源,在高频交易场景中需要考虑其效率。 + +## 链上交易 +### P2SH-P2MS +链上交易:https://mempool.space/zh/tx/45f862a3c72b659406c38f606e2bcc73145241c3bf5c42ded4d4737af8d401ad +```js +// ScriptSig + +OP_0 +OP_PUSHBYTES_71 3044022018a750079fc75b68f5208f86b146821d5f3acb41f68195f8b4cbf1012cba2cbb02200c3ddd0dc271342f62222603356dd7c713cf387718e57ec2644f7811295d03ea01 +OP_PUSHBYTES_72 30450221009a5914969675238ddfb9c1475d2888b3a5a507c6d13c35ac13a6f97a5c3dec97022055587f56408ba7abdc48d637d3eb03a3c29f05d7c22df9a20fd4bea739a00b2601 +OP_PUSHDATA1 52210231d0ed51696dff4a25015f2a8330d07b81761eda22cae558da1086b5d084e1922102e142c9123d48ce4c0b32403b19403e41129f1d37de852d9bbc95165af6960e3b2102207620c770dc24eb02edc6fba51b70fd0c04a2772842d808188b835a8f73832853ae + +// P2SH redeem script +OP_PUSHNUM_2 +OP_PUSHBYTES_33 0231d0ed51696dff4a25015f2a8330d07b81761eda22cae558da1086b5d084e192 +OP_PUSHBYTES_33 02e142c9123d48ce4c0b32403b19403e41129f1d37de852d9bbc95165af6960e3b +OP_PUSHBYTES_33 02207620c770dc24eb02edc6fba51b70fd0c04a2772842d808188b835a8f738328 +OP_PUSHNUM_3 +OP_CHECKMULTISIG +``` + +### P2WSH-P2MS +链上交易:https://mempool.space/zh/tx/a085e629f5932e729f54f174c936f015a10bb7935db66d5803e81dbff0ee15cc +```js +// Witness + +304402204f63983ae7cdb18fc3b75d4acc8e74d35816d4a8660d4296da4c0f6a0206fdd90220347e8317c686aa3785905eb1ff1cf32c4ce7ef019678fdd9ad00cfceedd74c2e01 +30440220055d4a41afa73ef449b18add7748b054eec768a8350c5095b4f622546eb55a3f022073cea484b99331cc8ae1ebf6b1698d07b560ad01ee63e3a4a739684a0408aec601 +52210279d1f38c1c80d47cb00ddbbe2915a60d5706e1ef66056a169150f083b288eb952102cb7d02b654f8616bfc5ab017b7a3ec9092e466381af0f552b7efcd8d920453672103c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f88053ae + +// P2WSH witness script +OP_PUSHNUM_2 +OP_PUSHBYTES_33 0279d1f38c1c80d47cb00ddbbe2915a60d5706e1ef66056a169150f083b288eb95 +OP_PUSHBYTES_33 02cb7d02b654f8616bfc5ab017b7a3ec9092e466381af0f552b7efcd8d92045367 +OP_PUSHBYTES_33 03c96d495bfdd5ba4145e3e046fee45e84a8a48ad05bd8dbb395c011a32cf9f880 +OP_PUSHNUM_3 +OP_CHECKMULTISIG +``` + +### P2TR-P2MS + +## 代码示例 + +完整的示例可以在[bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib/)里找到,这里逐步拆解分析。 + +### P2SH-P2MS + +示例代码参考[bitcoinjs-lib](https://github.com/bitcoinjs/bitcoinjs-lib/blob/master/test/integration/transactions.spec.ts#L204-L250)。 + + +1. **构建锁定脚本**: + 以上面的示例脚本为例: + + ```javascript + 2 3 OP_CHECKMULTISIG + + const output = bscript.compile( + ([] as Stack).concat( + OP_INT_BASE + a.m, + a.pubkeys, + OP_INT_BASE + o.n, + OPS.OP_CHECKMULTISIG, + ) + ); + + // 其中 + m = 2; + pubkeys = [, , ]; + n = 3; + ``` + +2. **签名过程**: + + ```javascript + const multisig = createPayment('p2sh-p2ms(2 of 4)'); + const inputData1 = await getInputData(2e4, multisig.payment, false, 'p2sh'); + + const psbt = new bitcoin.Psbt({ network: regtest }) + .addInput(inputData1) + .addOutput({ + address: regtestUtils.RANDOM_ADDRESS, + value: 1e4, + }) + .signInput(0, multisig.keys[0]) + .signInput(0, multisig.keys[2]); + ``` + + 签名之后会得到签名信息,多签对应多个元素的签名数组: + + ```javascript + const partialSig = [ + { + pubkey: AlicePubKey, + signature: bscript.signature.encode(Alice.sign(hash), sighashType), + }, + { + pubkey: BobPubKey, + signature: bscript.signature.encode(Bob.sign(hash), sighashType), + }, + ]; + ``` + +3. **排序签名**: + + ```javascript + function getSortedSigs(script: Buffer, partialSig: PartialSig[]): Buffer[] { + const p2ms = payments.p2ms({ output: script }); + // for each pubkey in order of p2ms script + return p2ms + .pubkeys!.map(pk => { + // filter partialSig array by pubkey being equal + return ( + partialSig.filter(ps => { + return ps.pubkey.equals(pk); + })[0] || {} + ).signature; + // Any pubkey without a match will return undefined + // this last filter removes all the undefined items in the array. + }) + .filter(v => !!v); + } + ``` + +4. **构建解锁脚本**: + + ```javascript + bscript.compile(([OPS.OP_0] as Stack).concat(a.signatures)) + ``` + + \ No newline at end of file diff --git a/BTC/Advanced/Multisign/OP_CHECKMULTISIGVERIFY/README.md b/BTC/Advanced/Multisign/OP_CHECKMULTISIGVERIFY/README.md new file mode 100644 index 000000000..c3a6ac404 --- /dev/null +++ b/BTC/Advanced/Multisign/OP_CHECKMULTISIGVERIFY/README.md @@ -0,0 +1,48 @@ +## OP_CHECKMULTISIGVERIFY + +`OP_CHECKMULTISIGVERIFY` 并没有通过单独的 BIP 提出,但其背景和实现与 BIP 16 的提出密切相关。BIP 16 提出了支付到脚本哈希(P2SH)的机制,使得复杂的脚本可以更简洁地在链上表示,并且增强了多重签名的可用性。 + +### 详细背景 + +#### BIP 16 提出 + +1. **BIP 16**: + - 标题:`Pay to Script Hash` + - 提案作者:Gavin Andresen + - 提出时间:2012 年 1 月 + - 内容:定义了支付到脚本哈希(P2SH)的机制。P2SH 允许复杂的脚本在链上以更简洁的形式表示,并在解锁时提供完整的脚本内容。这极大地简化了多重签名等复杂交易的实现。 + +#### OP_CHECKMULTISIGVERIFY 的引入 + +在 BIP 16 提出并实现后,比特币开发社区继续寻找优化和简化脚本的方法。`OP_CHECKMULTISIGVERIFY` 作为 `OP_CHECKMULTISIG` 和 `OP_VERIFY` 的组合,自然而然地被引入,以简化多重签名验证的脚本编写和执行过程。 + +### OP_CHECKMULTISIGVERIFY 的工作原理 + +`OP_CHECKMULTISIGVERIFY` 结合了 `OP_CHECKMULTISIG` 和 `OP_VERIFY` 的功能。其主要目的是在验证多重签名后,立即判断验证结果并返回执行状态。 + +脚本构建和签名过程可以参考[OP_CHECKMULTISIG](../OP_CHECKMULTISIG/README.md),这里不再赘述。 + +### 具体案例 +在babylon业务中,会把用户的资产质押到一个Taproot地址里。根据官方披露的三条解锁路径都需要OP_CHECKSIGVERIFY来验证签名然后执行后续逻辑 +1. 时间锁路径,质押者到期可以赎回 +```js + OP_CHECKSIGVERIFY OP_CHECKSEQUENCEVERIFY +``` + +2. 解绑路径,质押者提前赎回 +``` + OP_CHECKSIGVERIFY + OP_CHECKSIG + OP_CHECKSIGADD ... OP_CHECKSIGADD + OP_GREATERTHANOREQUAL +``` + +3. 质押者作恶,惩罚路径 +```js + OP_CHECKSIGVERIFY + OP_CHECKSIGVERIFY + OP_CHECKSIG OP_CHECKSIGADD ... OP_CHECKSIGADD + OP_GREATERTHANOREQUAL +``` + +相关交易可以查看:https://mempool.space/zh/signet/tx/ceb126550481ecb69b45929b2b5869fd3975a707e6100b368d6cc15e4434ad9d \ No newline at end of file diff --git a/BTC/Advanced/Multisign/OP_CHECKSIGADD/README.md b/BTC/Advanced/Multisign/OP_CHECKSIGADD/README.md new file mode 100644 index 000000000..015ad3420 --- /dev/null +++ b/BTC/Advanced/Multisign/OP_CHECKSIGADD/README.md @@ -0,0 +1,246 @@ +## OP_CHECKSIGADD +`OP_CHECKSIGADD` 是比特币脚本语言中的一个操作码(opcode),其引入主要目的是为了优化和简化多重签名验证过程。它在 Taproot 和 Schnorr 签名方案中扮演了重要角色,允许更高效地实现多重签名和复杂交易。 + +### BIP 提出的背景 + +`OP_CHECKSIGADD` 的引入是为了配合 Taproot 和 Schnorr 签名的实现,这两个方案显著优化了比特币的签名机制,提高了隐私性和效率。 + +#### 具体的 BIP +1. **BIP 340**: + - 标题:`Schnorr Signatures for secp256k1` + - 提案作者:Pieter Wuille, Jonas Nick, Tim Ruffing + - 提出时间:2020 年 1 月 + - 内容:介绍了 Schnorr 签名算法,为比特币带来了更简洁的签名和更高的验证效率。 + +2. **BIP 341**: + - 标题:`Taproot: SegWit version 1 spending rules` + - 提案作者:Pieter Wuille, Jonas Nick, Anthony Towns + - 提出时间:2020 年 1 月 + - 内容:定义了 Taproot 升级,引入了一种新的输出类型,使得复杂的交易更加高效和隐私。 + +3. **BIP 342**: + - 标题:`Validation of Taproot Scripts` + - 提案作者:Pieter Wuille + - 提出时间:2020 年 1 月 + - 内容:引入了 `OP_CHECKSIGADD` 操作码,用于在 Taproot 中实现更高效的多重签名验证。 + +### 关键人物 + +1. **Pieter Wuille**: + - 比特币核心开发者,BIP 340、BIP 341 和 BIP 342 的主要作者,对 Taproot 和 Schnorr 签名的引入和实施起到了关键作用。 + +2. **Jonas Nick**: + - 比特币核心开发者,参与了 Schnorr 签名和 Taproot 的研究和开发。 + +3. **Tim Ruffing**: + - 密码学研究者,参与了 Schnorr 签名和多重签名方案的研究和开发。 + +4. **Anthony Towns**: + - 比特币核心开发者,参与了 Taproot 的设计和实现。 + +### 激活过程 +为了激活 Taproot 升级,比特币网络采用了一种称为“Speedy Trial”的激活机制。这种机制允许矿工通过在区块中设置特定的标志位(version bits)来表示他们对 Taproot 升级的支持。 + +- **信号期**:矿工在每个区块中设置信号位,表示对 Taproot 升级的支持。 +- **激活门槛**:在一个难度调整周期(2016 个区块)内,需要至少 90% 的区块(即 1815 个区块)设置信号位,以表示对升级的支持。 +- **锁定期**:如果在一个信号期内达到了激活门槛,Taproot 升级会进入“锁定期”(lock-in period),再经过一个难度调整周期后,升级正式生效。 + +#### 5. 正式激活 + +Taproot 升级在 2021 年 6 月达到了激活门槛,随后在 2021 年 11 月正式激活。从这个时间点开始,`OP_CHECKSIGADD` 和其他相关的新功能在比特币网络上正式生效。 + +### 关键时间点 + +- **2020 年 1 月**:BIP 340、BIP 341 和 BIP 342 提出。 +- **2021 年 6 月**:Taproot 升级达到了激活门槛。 +- **2021 年 11 月 14 日**:Taproot 升级正式激活。 + +### 工作原理 + +`OP_CHECKSIGADD` 操作码的主要功能是验证单个签名并将结果(0 或 1)与现有的累计值相加。这在构建多重签名验证时尤其有用,因为它允许逐步累积签名验证的结果,然后在最后进行总和检查。 + +#### 操作步骤 + +1. 从堆栈中弹出一个公钥。 +2. 从堆栈中弹出一个签名。 +3. 从堆栈中弹出一个累计值。 +4. 验证公钥和签名: + - 如果签名有效,返回 1;否则返回 0。 +5. 将验证结果与累计值相加。 +6. 将新的累计值压回堆栈。 + +### 示例脚本 + +假设我们有三个公钥和三个对应的签名,我们希望验证至少两个签名,脚本如下: + +``` + <0> OP_CHECKSIGADD OP_CHECKSIGADD OP_CHECKSIGADD <2> OP_EQUAL +``` + +在这个脚本中: +- ` ` 是签名。 +- `<0>` 是初始累计值。 +- ` ` 是公钥。 +- `OP_CHECKSIGADD` 执行单个签名验证并累加结果。 +- `<2> OP_EQUAL` 检查累加值是否等于 2。 + + +`OP_CHECKSIGADD` 是比特币脚本语言中用于优化多重签名验证的新操作码。它简化了多重签名的实现,使得复杂交易更加高效。它的引入与 BIP 340、BIP 341 和 BIP 342 紧密相关,标志着比特币在隐私性和效率方面的显著提升。通过 `OP_CHECKSIGADD`,比特币能够更灵活地实现多重签名验证,同时保持较高的安全性和性能。 + +### 案例 +这里以上面示例中taproot script-path脚本中的2-3多签为例 + +1. 随机生成internal public key和三份多签用户的私钥 +```js +const internalKey = bip32.fromSeed(rng(64), regtest); + +const leafKeys = []; +const leafPubkeys = []; +for (let i = 0; i < 3; i++) { + const leafKey = bip32.fromSeed(rng(64), regtest); + leafKeys.push(leafKey); + leafPubkeys.push(toXOnly(leafKey.publicKey).toString('hex')); +} +``` + +2. 构造锁定脚本 +```js + const leafScriptAsm = `${leafPubkeys[2]} OP_CHECKSIG ${leafPubkeys[1]} OP_CHECKSIGADD ${leafPubkeys[0]} OP_CHECKSIGADD OP_3 OP_NUMEQUAL`; +``` + +3. 构造MAST +```js +const leafScript = bitcoin.script.fromASM(leafScriptAsm); + +const scriptTree: Taptree = [ + { + output: bitcoin.script.fromASM( + '50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0 OP_CHECKSIG', + ), + }, + [ + { + output: bitcoin.script.fromASM( + '50929b74c1a04954b78b4b6035e97a5e078a5a0f28ec96d547bfee9ace803ac0 OP_CHECKSIG', + ), + }, + { + output: leafScript, + }, + ], +]; +const redeem = { + output: leafScript, + redeemVersion: LEAF_VERSION_TAPSCRIPT, +}; + +const { output, address, witness } = bitcoin.payments.p2tr({ + internalPubkey: toXOnly(internalKey.publicKey), + scriptTree, + redeem, + network: regtest, +}); +``` + +4. 构造PSBT交易 +```js +// amount from faucet +const amount = 42e4; +// amount to send +const sendAmount = amount - 1e4; +// get faucet +const unspent = await regtestUtils.faucetComplex(wallet.output, amount); + +const psbt = new bitcoin.Psbt({ network: regtest }); + +// Adding an input is a bit special in this case, +// So we contain it in the wallet class +// Any wallet can do this, wallet2 or wallet3 could be used. +wallet.addInput(psbt, unspent.txId, unspent.vout, unspent.value); + +psbt.addOutput({ value: sendAmount, address: wallet.address }); + +``` + +5. 签名交易 +```js +// Sign with at least 2 of the 3 wallets. +// Verify that there is a matching leaf script +// (which includes the unspendable internalPubkey, +// so we verify that no one can key-spend it) +wallet3.verifyInputScript(psbt, 0); +wallet2.verifyInputScript(psbt, 0); +psbt.signInput(0, wallet3); +psbt.signInput(0, wallet2); + +// Before finalizing, we need to add dummy signatures for all that did not sign. +// Any wallet can do this, wallet2 or wallet3 could be used. +wallet.addDummySigs(psbt); + +// its just used to add dummy signature that have an empty Buffer +addDummySigs(psbt: bitcoin.Psbt) { + const leafHash = tapleafHash({ + output: this.leafScript, + version: this.leafVersion, + }); + for (const input of psbt.data.inputs) { + if (!input.tapScriptSig) continue; + const signedPubkeys = input.tapScriptSig + .filter(ts => ts.leafHash.equals(leafHash)) + .map(ts => ts.pubkey); + for (const pubkey of this.pubkeys) { + if (signedPubkeys.some(sPub => sPub.equals(pubkey))) continue; + // Before finalizing, every key that did not sign must have an empty signature + // in place where their signature would be. + // In order to do this currently we need to construct a dummy signature manually. + input.tapScriptSig.push({ + // This can be reused for each dummy signature + leafHash, + // This is the pubkey that didn't sign + pubkey, + // This must be an empty Buffer. + signature: Buffer.from([]), + }); + } + } +} +``` +这里需要注意 +OP_CHECKSIGADD需要**完整的三个签名**,我们需要对未签名的公钥补一个无效签名,即一个字节的0x00 + +6. 提取广播 +```js +psbt.finalizeAllInputs(); +const tx = psbt.extractTransaction(); +const rawTx = tx.toBuffer(); +const hex = rawTx.toString('hex'); + +await regtestUtils.broadcast(hex); +``` + +OP_CHECKSIGADD交易示例,这笔交易里还同时包含了OP_CHECKSIG和OP_CHECKSIGVERIFY:https://mempool.space/zh/signet/tx/ceb126550481ecb69b45929b2b5869fd3975a707e6100b368d6cc15e4434ad9d + +```js +OP_PUSHBYTES_32 9d65bad2d86e26bf1a907077312b849f89e5109a8574087a34953252af63940c +OP_CHECKSIGVERIFY +OP_PUSHBYTES_32 113c3a32a9d320b72190a04a020a0db3976ef36972673258e9a38a364f3dc3b0 +OP_CHECKSIG +OP_PUSHBYTES_32 17921cf156ccb4e73d428f996ed11b245313e37e27c978ac4d2cc21eca4672e4 +OP_CHECKSIGADD +OP_PUSHBYTES_32 3bb93dfc8b61887d771f3630e9a63e97cbafcfcc78556a474df83a31a0ef899c +OP_CHECKSIGADD +OP_PUSHBYTES_32 40afaf47c4ffa56de86410d8e47baa2bb6f04b604f4ea24323737ddc3fe092df +OP_CHECKSIGADD +OP_PUSHBYTES_32 49766ccd9e3cd94343e2040474a77fb37cdfd30530d05f9f1e96ae1e2102c86e +OP_CHECKSIGADD +OP_PUSHBYTES_32 76d1ae01f8fb6bf30108731c884cddcf57ef6eef2d9d9559e130894e0e40c62c +OP_CHECKSIGADD +OP_PUSHBYTES_32 79a71ffd71c503ef2e2f91bccfc8fcda7946f4653cef0d9f3dde20795ef3b9f0 +OP_CHECKSIGADD +OP_PUSHBYTES_32 d21faf78c6751a0d38e6bd8028b907ff07e9a869a43fc837d6b3f8dff6119a36 +OP_CHECKSIGADD +OP_PUSHBYTES_32 f5199efae3f28bb82476163a7e458c7ad445d9bffb0682d10d3bdb2cb41f8e8e +OP_CHECKSIGADD +OP_PUSHNUM_6 +OP_NUMEQUAL +``` \ No newline at end of file diff --git a/BTC/Advanced/Multisign/README-EN.md b/BTC/Advanced/Multisign/README-EN.md new file mode 100644 index 000000000..9bf43ee65 --- /dev/null +++ b/BTC/Advanced/Multisign/README-EN.md @@ -0,0 +1,103 @@ +# Multi-Signature Introduction + +## Overview +In the Bitcoin (BTC) network, Multi-Signature (Multi-Sig) is a security enhancement technology that requires multiple keys to sign to execute a transaction. Specifically, the multi-sig mechanism allows users to create a wallet address where funds can only be used when certain signature conditions are met. Multi-signature technology can be used to enhance security, implement distributed control, and manage funds. + +### How Multi-Signature Works +1. **Creating Multi-sig Address**: + - Multi-sig addresses are typically generated from multiple participants' public keys. + - For example, a 2-of-3 multi-sig address means it requires three public keys, and at least two corresponding private keys to sign transactions. + +2. **Constructing Transactions**: + - When using bitcoins in a multi-sig address, a transaction containing all necessary signatures must be constructed. + - For example, for a 2-of-3 multi-sig address, signatures from at least two participants are required to execute the transaction. + +3. **Broadcasting Transactions**: + - Fully signed transactions can be broadcast to the Bitcoin network for verification and packaging by miners. + +### Multi-Signature Use Cases +1. **Enhanced Security**: + - Theft of a single private key cannot transfer funds; multiple private keys must be stolen simultaneously for malicious transactions. + +2. **Distributed Control**: + - Can be used for joint fund control, such as multi-party management of company funds, preventing single-person abuse. + +3. **Smart Contracts and DApps**: + - Multi-signatures can serve as simple smart contract mechanisms, supporting more complex transaction conditions and logic. + +### Example +A simple 2-of-3 multi-sig transaction process might look like this: +1. Generate three key pairs (User A, User B, User C). +2. Create a 2-of-3 multi-sig address using the three public keys. +3. Transfer bitcoins to this multi-sig address. +4. When needing to transfer bitcoins, Users A and B (or A and C, or B and C) jointly sign the transaction. +5. Broadcast the transaction to the network and wait for confirmation. + +## Multi-Signature OPCodes +In the Bitcoin network, multi-signature allows enhanced security and flexibility by requiring multiple signatures for transaction execution. Bitcoin Script provides several key operation codes (OPCodes) to implement multi-signatures. Here are the main multi-signature-related OPCodes and their functions: + +### Main Multi-Signature OPCodes + +1. **OP_CHECKMULTISIG** + - **Function**: Verifies multi-signature transactions. + - **Description**: Pops n public keys and m signatures from the stack, checks if at least m signatures are valid. Returns true if valid, false otherwise. + - **Example**: + ``` + OP_CHECKMULTISIG + ``` + where `` is minimum required signatures, `` is number of provided public keys. + +2. **OP_CHECKMULTISIGVERIFY** + - **Function**: Similar to OP_CHECKMULTISIG but terminates execution and returns error on verification failure. + - **Description**: Works same as OP_CHECKMULTISIG, but script immediately fails if check fails. + - **Example**: + ``` + OP_CHECKMULTISIGVERIFY + ``` + +3. **OP_CHECKSIGADD** + - **Function**: Used for efficient multi-signature verification in Taproot and Schnorr signature schemes. + - **Description**: Takes a public key and signature from stack, verifies signature validity, adds result to counter indicating total valid signatures. + - **Example**: + ``` + OP_CHECKSIGADD + OP_CHECKSIGADD + OP_CHECKSIGADD + <2> OP_EQUAL + ``` + +### Script Examples + +#### P2SH (Pay-to-Script-Hash) Multi-sig Transaction +1. **Create Redeem Script**: + ``` + <2> <3> OP_CHECKMULTISIG + ``` + +2. **Generate P2SH Address**: + - Use hash of redeem script as P2SH address for receiving bitcoins. + +3. **Spend P2SH Multi-sig Transaction**: + - Unlocking Script: + ``` + <0> + ``` + +#### Taproot Multi-sig Script +``` + OP_CHECKSIGADD + OP_CHECKSIGADD + OP_CHECKSIGADD +<2> OP_EQUAL +``` + +### OPCode Comparison + +| OPCode | Function | Description | Advantages | Disadvantages | Script Types | BIP Number | Example | +|--------|----------|-------------|------------|---------------|--------------|------------|---------| +| **OP_CHECKMULTISIG** | Multi-sig verification | Verifies m-of-n signatures | Widely supported | Larger scripts, requires dummy value | P2SH, P2WSH | BIP 11, 16 | `<2> <3> OP_CHECKMULTISIG` | +| **OP_CHECKMULTISIGVERIFY** | Multi-sig verify with error | Like OP_CHECKMULTISIG with immediate failure | Simplified error handling | Requires dummy value | P2SH, P2WSH | BIP 11, 16 | `<2> <3> OP_CHECKMULTISIGVERIFY` | +| **OP_CHECKSIGADD** | Efficient multi-sig | Incremental signature verification | More efficient, smaller transactions | Only for Taproot | Taproot | BIP 340, 341 | ` OP_CHECKSIGADD...` | + +### Summary +These OPCodes provide various ways to implement multi-signatures in the Bitcoin network. OP_CHECKMULTISIG and OP_CHECKMULTISIGVERIFY are traditional implementations, while OP_CHECKSIGADD is a more efficient and flexible implementation introduced with Taproot and Schnorr signatures. Together, these technologies enhance Bitcoin transaction security and flexibility, meeting requirements for different use cases. diff --git a/BTC/Advanced/Multisign/README.md b/BTC/Advanced/Multisign/README.md new file mode 100644 index 000000000..e346c0d80 --- /dev/null +++ b/BTC/Advanced/Multisign/README.md @@ -0,0 +1,117 @@ +## 多签介绍 +在比特币 (BTC) 网络中,多签名 (Multi-Signature 或 Multi-Sig) 是一种安全性增强技术,它要求多个密钥签名才能执行一笔交易。具体来说,多签机制允许用户创建一个钱包地址,只有在满足一定数量的签名条件下,才能使用钱包中的资金。多签名技术可以用于提高安全性、实现分布式控制和管理资金等用途。 + +### 多签名的工作原理 +1. **创建多签地址**: + - 多签地址通常是由多个参与者的公钥共同生成的。 + - 比如,一个 2-of-3 的多签地址意味着需要三个公钥,并且至少需要其中两个公钥对应的私钥来签名交易。 + +2. **构造交易**: + - 当需要使用多签地址中的比特币时,必须构造一个包含所有必要签名的交易。 + - 比如,对于 2-of-3 的多签地址,至少需要两个参与者的签名才能执行交易。 + +3. **广播交易**: + - 完整签名的交易可以广播到比特币网络,并由矿工进行验证和打包。 + +### 多签名的应用场景 +1. **提高安全性**: + - 单一私钥被盗将无法转移资金,必须多个私钥同时被盗才能实现恶意交易。 + +2. **分布式控制**: + - 可以用于多方共同控制资金,比如公司资金的多方管理,防止单人滥用资金。 + +3. **智能合约和去中心化应用**: + - 多签名可以作为简单的智能合约机制,支持更加复杂的交易条件和逻辑。 + +### 示例 +一个简单的 2-of-3 多签交易流程可能如下: +1. 生成三个公私钥对(用户A、用户B、用户C)。 +2. 使用三个公钥生成一个 2-of-3 的多签地址。 +3. 将比特币转入这个多签地址。 +4. 当需要转出比特币时,用户A和用户B(或者用户A和用户C,或者用户B和用户C)共同签名交易。 +5. 交易广播到网络并等待确认。 + + +## 多签验证的OPCode +在比特币网络中,多签名(Multi-Signature,简称多签)是一种提高安全性和灵活性的技术,允许在执行交易时需要多个签名。为了实现多签名,比特币脚本(Bitcoin Script)提供了几个关键的操作码(OPCode)。以下是与多签名相关的主要 OPCode 及其功能: + +### 主要的多签名 OPCode + +1. **OP_CHECKMULTISIG** + - **功能**:验证多签名交易。 + - **描述**:从堆栈中弹出 n 个公钥和 m 个签名,检查是否有至少 m 个签名有效。如果有效,则返回 true,否则返回 false。 + - **示例**: + ``` + OP_CHECKMULTISIG + ``` + 其中,`` 是需要的最小签名数,`` 是提供的公钥数量。 + +2. **OP_CHECKMULTISIGVERIFY** + - **功能**:与 OP_CHECKMULTISIG 类似,但在验证失败时终止执行并返回错误。 + - **描述**:与 OP_CHECKMULTISIG 的工作原理相同,只是如果检查失败,脚本将立即失败。 + - **示例**: + ``` + OP_CHECKMULTISIGVERIFY + ``` + +3. **OP_CHECKSIGADD** + - **功能**:用于在 Taproot 和 Schnorr 签名方案中实现高效的多签名验证。 + - **描述**:从堆栈中取出一个公钥和一个签名,验证该签名是否有效,并将结果添加到一个计数器中。计数器表示有效签名的总数。 + - **示例**: + ``` + <签名A> OP_CHECKSIGADD + <签名B> OP_CHECKSIGADD + <签名C> OP_CHECKSIGADD + <2> OP_EQUAL + ``` + - ` <签名A> OP_CHECKSIGADD`:验证签名A是否匹配A公钥并将结果加到计数器。 + - ` <签名B> OP_CHECKSIGADD`:验证签名B是否匹配B公钥并将结果加到计数器。 + - ` <签名C> OP_CHECKSIGADD`:验证签名C是否匹配C公钥并将结果加到计数器。 + - `<2> OP_EQUAL`:检查计数器是否等于2,即验证是否有两个有效签名。 + +### 示例脚本 + +#### P2SH(Pay-to-Script-Hash)多签名交易 +1. **创建赎回脚本(Redeem Script)**: + ``` + <2> <3> OP_CHECKMULTISIG + ``` + - `<2>`:至少需要两个签名。 + - ` `:三个公钥。 + - `<3>`:表示共有三个公钥。 + +2. **生成 P2SH 地址**: + - 将上述赎回脚本的哈希值作为 P2SH 地址,将比特币发送到该地址。 + +3. **花费 P2SH 多签名交易**: + - 解锁脚本(Unlocking Script): + ``` + <0> <签名1> <签名2> <赎回脚本> + ``` + - `<0>`:因为 OP_CHECKMULTISIG 有一个历史遗留的 bug,需要额外的空值。 + - `<签名1> <签名2>`:两个有效签名。 + - `<赎回脚本>`:实际的赎回脚本,证明这是正确的解锁条件。 + +#### Taproot 多签名脚本 +1. **赎回脚本(Taproot Script)**: + ``` + <签名A> OP_CHECKSIGADD + <签名B> OP_CHECKSIGADD + <签名C> OP_CHECKSIGADD + <2> OP_EQUAL + ``` + +### 操作码对比 +对比比特币多签名相关的主要 OPCode,包括功能、描述、优点、缺点、使用的脚本类型、推出的 BIP 编号及示例: + +| OPCode | 功能 | 描述 | 优点 | 缺点 | 使用的脚本类型 | 推出的 BIP 编号 | 示例 | +|--------------------------|---------------------------|---------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|-------------------------------------------------------------------------|--------------------------------|------------------|---------------------------------------------------------------------------------------------------------------| +| **[OP_CHECKMULTISIG](./OP_CHECKMULTISIG/README.md)** | 验证多签名交易 | 从堆栈中弹出 n 个公钥和 m 个签名,检查是否有至少 m 个签名有效。如果有效,则返回 true,否则返回 false。 | 适用于传统多签名交易,广泛支持 | 脚本较大,存在历史遗留的 bug 需要额外的空值 | P2SH, P2WSH | BIP 11, BIP 16 | `<2> <3> OP_CHECKMULTISIG` | +| **[OP_CHECKMULTISIGVERIFY](./OP_CHECKMULTISIGVERIFY/README.md)** | 验证多签名并返回错误 | 与 OP_CHECKMULTISIG 类似,但在验证失败时终止执行并返回错误。 | 简化了错误处理逻辑 | 同样存在历史遗留的 bug 需要额外的空值 | P2SH, P2WSH | BIP 11, BIP 16 | `<2> <3> OP_CHECKMULTISIGVERIFY` | +| **[OP_CHECKSIGADD](./OP_CHECKSIGADD/README.md)** | 高效验证多签名 | 从堆栈中取出一个公钥和一个签名,验证该签名是否有效,并将结果添加到一个计数器中。计数器表示有效签名的总数。 | 更高效,简化了多签名脚本,减少交易大小和费用 | 仅在 Taproot 和 Schnorr 签名方案中可用 | Taproot | BIP 340, BIP 341 | ` <签名A> OP_CHECKSIGADD
<签名B> OP_CHECKSIGADD
<签名C> OP_CHECKSIGADD
<2> OP_EQUAL` | + + + +### 总结 +通过这些操作码,比特币网络提供了多种实现多签名的方式。`OP_CHECKMULTISIG` 和 `OP_CHECKMULTISIGVERIFY` 是传统的多签名实现方式,而 `OP_CHECKSIGADD` 则是引入 Taproot 和 Schnorr 签名后,更高效和灵活的实现方式。这些技术共同提升了比特币交易的安全性和灵活性,满足了不同应用场景的需求。 + diff --git a/BTC/Advanced/OP_CAT/README.md b/BTC/Advanced/OP_CAT/README.md new file mode 100644 index 000000000..18f6288e0 --- /dev/null +++ b/BTC/Advanced/OP_CAT/README.md @@ -0,0 +1,46 @@ +`OP_CAT` 是比特币脚本中的一个操作码(opcode),它用于将两个或多个元素连接在一起。这一功能在比特币的原生脚本语言中并不存在,因此 `OP_CAT` 的引入是为了增强比特币脚本的灵活性和功能,特别是在智能合约和复杂交易的应用场景中。 + +### `OP_CAT` 的背景和用途 + +1. **操作码(Opcode)概述**: + - 比特币的脚本语言是栈式的,操作码是脚本的基本组成部分。每个操作码执行特定的功能,如加法、签名验证和数据操作等。 + - `OP_CAT` 用于将两个栈顶元素连接(concatenate)成一个更大的元素。这对于构建复杂数据结构和处理更复杂的脚本逻辑非常有用。 + +2. **为何需要 `OP_CAT`**: + - 在比特币早期的脚本语言中,没有直接的连接字符串或数据的功能。这限制了某些智能合约和复杂交易的实现。 + - 引入 `OP_CAT` 使得开发者能够更灵活地操作和组合数据,增强了比特币脚本的表达能力。 + +### `OP_CAT` 的功能 + +- **连接功能**:`OP_CAT` 将两个元素从栈中取出,并将它们连接成一个新的元素。举例来说,如果栈顶的元素是字符串 "Hello" 和 "World",执行 `OP_CAT` 后,栈顶元素将变成 "HelloWorld"。 +- **应用场景**: + - **智能合约**:在构建智能合约时,可以利用 `OP_CAT` 组合数据,形成更复杂的数据结构。 + - **多签名交易**:在多签名场景中,可以将多个公钥或签名连接在一起,以便在验证时进行处理。 + - **数据打包**:当需要将多个输入数据合并成一个输出时,`OP_CAT` 是一个重要工具。 + +### 示例 + +假设我们有两个元素在栈中,分别为 "Data1" 和 "Data2"。使用 `OP_CAT` 的过程如下: + +1. **栈状态**: + ``` + Top -> Data2 + Data1 + ``` + +2. **执行 `OP_CAT`**: + - 栈顶的两个元素 "Data1" 和 "Data2" 被取出,并连接在一起。 + +3. **结果栈状态**: + ``` + Top -> Data1Data2 + ``` + +### 安全性和实现 + +- **安全性**:虽然 `OP_CAT` 增强了脚本的灵活性,但也可能引入一些复杂性。合约的开发者需要确保合约逻辑的安全性和正确性,避免潜在的漏洞。 +- **实现**:`OP_CAT` 的实现需要对比特币的脚本引擎进行修改,因此需要在比特币核心代码中进行添加和测试,确保它与现有的操作码兼容。 + +### 结论 + +`OP_CAT` 的引入为比特币的脚本语言增加了重要的功能,使得在智能合约和复杂交易的开发中可以更灵活地处理数据。尽管比特币的脚本设计注重安全性和简单性,但通过引入 `OP_CAT`,开发者能够实现更丰富的逻辑和应用场景。随着比特币生态系统的发展,像 `OP_CAT` 这样的操作码可能会变得越来越重要。 \ No newline at end of file diff --git a/BTC/Advanced/OP_CAT/example/README.md b/BTC/Advanced/OP_CAT/example/README.md new file mode 100644 index 000000000..2cc2548f7 --- /dev/null +++ b/BTC/Advanced/OP_CAT/example/README.md @@ -0,0 +1,60 @@ +你是对的,我在之前的示例中没有明确给出与 `OP_EQUAL` 验证的内容。在比特币脚本中,`OP_EQUAL` 用于验证栈顶两个元素是否相等。因此,我们需要在脚本中明确指定连接后的结果,并与这个结果进行比较。 + +### 完整示例 + +下面是一个更新后的示例,展示如何使用 `OP_CAT` 实现智能合约,并在脚本中验证连接后的结果是否等于 "HelloWorld": + +```javascript +const bitcoin = require('bitcoinjs-lib'); + +// 创建一个包含 OP_CAT 的脚本 +function createScript() { + // 连接的目标结果 + const target = Buffer.from('HelloWorld'); + + const script = bitcoin.script.compile([ + bitcoin.opcodes.OP_DUP, + bitcoin.opcodes.OP_HASH160, + Buffer.from('...'), // 使用适当的公钥哈希 + bitcoin.opcodes.OP_EQUALVERIFY, + bitcoin.opcodes.OP_CHECKSIG, + // 连接两个字符串 + Buffer.from('Hello'), // 第一个元素 + Buffer.from('World'), // 第二个元素 + bitcoin.opcodes.OP_CAT, // 连接操作 + target, // 连接后的目标结果 + bitcoin.opcodes.OP_EQUAL // 验证连接结果是否等于 'HelloWorld' + ]); + + return script; +} + +// 创建和打印 P2SH 地址 +function createP2SHAddress() { + const script = createScript(); + const { address } = bitcoin.payments.p2sh({ redeem: { output: script, network: bitcoin.networks.bitcoin } }); + + console.log('P2SH Address:', address); +} + +createP2SHAddress(); +``` + +### 代码解析 + +1. **连接后的目标结果**: + - 我们定义了一个 `target` 变量,表示连接后的目标结果 `HelloWorld`。在脚本中,我们将这个目标结果与连接后的结果进行比较。 + +2. **脚本逻辑**: + - `OP_CAT` 将 `Buffer.from('Hello')` 和 `Buffer.from('World')` 连接起来,结果是 `HelloWorld`。 + - 然后,`target`(即 `HelloWorld`)被推入栈中。 + - 最后,`OP_EQUAL` 用于检查连接的结果是否与 `target` 相等。 + +### 注意事项 + +- **脚本验证**:在比特币的环境中,脚本通常是在执行交易时被验证。因此,这段脚本需要在合适的环境中进行测试。 +- **公钥哈希**:在实际应用中,`Buffer.from('...')` 应替换为实际的公钥哈希。 + +### 结论 + +现在这个脚本清楚地验证了连接后的结果是否与预期值 `HelloWorld` 相等。这种方式展示了如何在比特币脚本中使用 `OP_CAT` 进行数据连接和验证。虽然比特币的脚本语言有一定的限制,但通过合理组合操作码,依然可以实现复杂的逻辑。 \ No newline at end of file diff --git a/BTC/Advanced/OP_CAT/example/index.js b/BTC/Advanced/OP_CAT/example/index.js new file mode 100644 index 000000000..cfcdac613 --- /dev/null +++ b/BTC/Advanced/OP_CAT/example/index.js @@ -0,0 +1,33 @@ +const bitcoin = require('bitcoinjs-lib'); + +// 创建一个包含 OP_CAT 的脚本 +function createScript() { + // 连接的目标结果 + const target = Buffer.from('HelloWorld'); + + const script = bitcoin.script.compile([ + bitcoin.opcodes.OP_DUP, + bitcoin.opcodes.OP_HASH160, + Buffer.from('...'), // 使用适当的公钥哈希 + bitcoin.opcodes.OP_EQUALVERIFY, + bitcoin.opcodes.OP_CHECKSIG, + // 连接两个字符串 + Buffer.from('Hello'), // 第一个元素 + Buffer.from('World'), // 第二个元素 + bitcoin.opcodes.OP_CAT, // 连接操作,必须在两个字符串之后 + target, // 连接后的目标结果 + bitcoin.opcodes.OP_EQUAL, // 验证连接结果是否等于 'HelloWorld' + ]); + + return script; +} + +// 创建和打印 P2SH 地址 +function createP2SHAddress() { + const script = createScript(); + const { address } = bitcoin.payments.p2sh({ redeem: { output: script, network: bitcoin.networks.bitcoin } }); + + console.log('P2SH Address:', address); +} + +createP2SHAddress(); diff --git a/BTC/Advanced/Psbt/README.md b/BTC/Advanced/Psbt/README.md new file mode 100644 index 000000000..c23c20677 --- /dev/null +++ b/BTC/Advanced/Psbt/README.md @@ -0,0 +1,59 @@ +PSBT(Partially Signed Bitcoin Transaction,部分签名比特币交易)是一种交易格式,用于在不同参与者之间安全地传输未完成的交易信息,以便完成签名过程。这种格式主要用于提高比特币交易的灵活性和多方合作的安全性,尤其是在涉及多重签名和复杂的交易结构时。 + +### PSBT的目的和应用场景 + +PSBT(Partially Signed Bitcoin Transactions)是一种格式,用于Bitcoin交易的离线或多方签名。这种格式在[BIP 174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki)中被详细定义,该BIP是由Andrew Chow于2017年提出的,PSBT编码和解析参考[PSBT encode](./encode.md)。 + +在PSBT出现之前,Bitcoin的交易签名过程通常需要交易的所有参与者在线,并能够直接交互以产生完全签名的交易。这在多方需要合作创建一个交易,尤其是在使用硬件钱包或冷存储方案时,会变得复杂和不安全。此外,对于复杂的交易类型(如多重签名或条件交易),简单的交易签名数据结构并不足以容纳所需的全部信息,如前一交易的脚本或其他元数据。 + +PSBT的设计初衷是解决比特币生态中的一个关键问题:在不共享私钥的情况下,如何在多个参与者之间安全地协作构建和签名交易。它允许每个参与者独立地添加到交易的签名或其他必需信息,而不必暴露自己的私钥给其他人。 + +主要应用场景包括: +- **多重签名交易**:多个参与者需要对同一笔交易进行签名。 +- **冷存储和硬件钱包**:安全设备可以在不直接连接到互联网的情况下签名交易。 +- **复杂的交易类型**:涉及时间锁、多步骤执行等特殊条件的交易。 + +## PSBT的工作原理 +在PSBT(Partially Signed Bitcoin Transaction)的工作流程中,涉及到几个关键的参与者或身份,他们各自负责交易的不同阶段。这些身份通常根据他们在交易签名和构建过程中的角色来定义。以下是PSBT流程中几个主要身份的概述: + +### 1. 交易发起者(Creator) +- **角色**:开始PSBT流程的是交易发起者。他们负责构建交易的初始结构,这包括定义交易的输入和输出。 +- **责任**:交易发起者需要收集并添加所有必要的输入数据(如UTXOs的详细信息)以及输出信息。他们会创建一个PSBT文件,此文件还未包含任何签名。 + +### 2. 更新者(Updater) +- **角色**:更新者的任务是添加或更新交易中缺失的信息,这可能包括输入和输出的附加细节。 +- **责任**:更新者确保PSBT包含足够的信息以便所有参与者可以验证交易。例如,他们可能需要添加redeemScript或witnessScript等信息。 + +### 3. 签名者(Signer) +- **角色**:签名者是那些用自己的私钥对交易的一个或多个输入进行签名的参与者。 +- **责任**:每个签名者都必须独立验证他们即将签名的交易的有效性和完整性。在确认无误后,签名者将他们的签名添加到PSBT中。 + +### 4. 合并者(Combiner) +- **角色**:在多签名或多步骤签名的情况下,合并者负责将来自不同签名者的多个PSBT副本合并成一个包含所有必需签名的单一PSBT。 +- **责任**:合并者需确保所有的签名都正确并被妥善地合并到PSBT中,没有遗漏任何有效签名。 + +### 5. 最终化者(Finalizer) +- **角色**:最终化者负责处理交易的最终细节,确保所有的输入都已正确地签名,并将PSBT转换成可以广播的标准比特币交易格式。 +- **责任**:最终化者将完成的签名脚本插入到交易中的相应输入,并移除所有不再需要的临时数据。 + +### 6. 广播者(Broadcaster) +- **角色**:一旦PSBT被最终化并转换成一个完整的交易后,广播者负责将其发送到比特币网络。 +- **责任**:广播者需要确保交易被网络接受,并进行监控,直到交易被确认。 + +## PSBT与普通交易的联系与区别 + +| 特性 | 普通交易 (Raw Transaction) | PSBT (Partially Signed Bitcoin Transaction) | +|---------------|-----------------------------------|------------------------------------------------| +| **格式** | 简单的二进制格式 | 扩展的二进制格式,包含未签名交易和元数据 | +| **用途** | 直接在网络上广播和确认 | 用于离线或多方签名,最终转换为普通交易广播 | +| **签名** | 交易中直接包含签名 | 签名被包含在元数据中,允许多步骤和多方签名 | +| **数据内容** | 仅包含交易必需的数据 | 包含交易数据外的额外信息,如脚本、公钥等 | +| **交互性** | 通常由单一实体完成 | 支持多个实体分别签名后合并 | +| **安全性** | 需要网络连接进行签名 | 可以完全离线签名,提高安全性 | +| **兼容性** | 所有比特币网络节点直接支持 | 需要特定的钱包或工具来创建和解析PSBT | +| **处理流程** | 创建、签名、广播为一体的流程 | 创建、签名可以分开,由不同的参与者在不同时间完成 | +| **适用场景** | 简单的个人交易 | 复杂的交易,如多重签名、企业级应用等 | + + + +PSBT是一个强大的工具,能够处理复杂的比特币交易,特别是在需要多方合作的情况下。它通过提供一个标准化且安全的方式来协调和合并不同参与者的输入,极大地增强了比特币交易的多样性和安全性。每个角色在PSBT的创建和完成过程中发挥着关键作用,确保交易不仅符合技术规范,同时也达到了预期的安全性标准。 \ No newline at end of file diff --git a/BTC/Advanced/Psbt/encode.md b/BTC/Advanced/Psbt/encode.md new file mode 100644 index 000000000..8727e992c --- /dev/null +++ b/BTC/Advanced/Psbt/encode.md @@ -0,0 +1,195 @@ +PSBT(Partially Signed Bitcoin Transaction)的编码和解码是一个关键环节,它允许各种工具和应用以标准格式交换交易信息。PSBT格式设计为可扩展和兼容未来功能,同时确保可以在不同设备和平台间安全地传输和处理交易数据。 + +### PSBT格式 + +PSBT的基本格式是一个序列化的数据结构,包含所有必要的信息,使多个参与者能够独立进行交易签名和验证。这个格式遵循一定的编码规则,详细见[BIP174](https://github.com/bitcoin/bips/blob/master/bip-0174.mediawiki),通常以Base64或十六进制形式进行传输。 + +**The Partially Signed Bitcoin Transaction (PSBT) format** + +```bash + # whole structure + := * * + + # start with magic number + # 0x70 0x73 0x62 0x74 encode of PSBT + := 0x70 0x73 0x62 0x74 0xFF + := * 0x00 + := * 0x00 + := * 0x00 + + # keyPair structure + := + + # key structure + := + + # value structure + := +``` + +PSBT数据主要分为以下几部分: + +1. **全局数据**:包括事务的未签名版本,以及可能的全局元数据,例如原始交易的版本和锁定时间。 +2. **输入数据**:每个输入独立的数据,包括UTXO信息、签名脚本、见证脚本、签名和其他相关信息。 +3. **输出数据**:每个输出独立的数据,如赎回脚本和其他可能的输出信息。 + +### 编码过程 + +PSBT的编码过程包括将交易的各个部分转换成可序列化的格式,然后通常使用Base64进行编码以便于传输。具体步骤如下: + +1. **创建基础交易**:首先,创建一个标准的Bitcoin交易,指定所需的输入和输出。 +2. **填充PSBT结构**:为每个输入和输出填充必要的信息,如UTXO详情、赎回路径和必要的签名数据。 +3. **序列化数据**:将所有信息序列化为连续的字节流。这包括使用键值对编码各个部分,其中键和值有特定的格式。 +4. **Base64编码**:最后,将序列化的数据编码为Base64字符串,便于在网络上或通过其他方式安全传输。 + +### 解码过程 + +解码PSBT是编码过程的逆过程,主要步骤包括: + +1. **Base64解码**:首先将接收到的Base64字符串解码回原始的字节流。 +2. **反序列化数据**:解析字节流,根据PSBT的键值对结构恢复出每个部分的数据。 +3. **重建交易信息**:使用解码的数据重建完整的交易视图,包括所有输入和输出的详细信息。 +4. **验证和签名**:在交易数据完全恢复后,参与者可以验证交易的有效性,并在必要时添加自己的签名。 + +## PSBT 创建 + +以下是一个使用JavaScript和`bitcoinjs-lib`库来处理PSBT(Partially Signed Bitcoin Transaction)的基本示例。这个例子展示了如何创建一个PSBT,添加输入和输出,进行签名,并最终导出为可以广播的比特币交易。 + +### 环境设置 + +首先,你需要确保已经安装了`bitcoinjs-lib`。如果尚未安装,可以通过npm进行安装: + +```bash +npm install bitcoinjs-lib +``` + +### 创建和签名PSBT的案例 + +```javascript +const bitcoin = require('bitcoinjs-lib'); + +// 设置网络,这里以比特币测试网为例 +const network = bitcoin.networks.testnet; + +// 创建一个新的比特币密钥对 +const keyPair = bitcoin.ECPair.makeRandom({ network: network }); +const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network: network }); + +console.log(`New address: ${address}`); + +// 创建一个新的PSBT +let psbt = new bitcoin.Psbt({ network: network }); + +// 假设这是UTXO的详细信息,你需要从区块链或钱包获取这些信息 +const utxo = { + hash: 'transaction-hash-of-utxo-here', // 事务哈希 + index: 0, // 输出索引 + value: 100000, // Satoshis +}; + +// 添加输入,这里假设UTXO已经知道 +psbt.addInput({ + hash: utxo.hash, + index: utxo.index, + nonWitnessUtxo: Buffer.from('raw-transaction-hex-here', 'hex'), +}); + +// 添加输出,指定接收地址和金额(satoshis) +psbt.addOutput({ + address: 'recipient-address-here', + value: 90000, // 减去手续费 +}); + +// 对PSBT进行签名 +psbt.signInput(0, keyPair); + +// 验证签名是否正确 +psbt.validateSignaturesOfInput(0); + +// 最终确认PSBT +psbt.finalizeAllInputs(); + +// 导出可以广播的交易 +const tx = psbt.extractTransaction().toHex(); + +console.log(`Transaction ready to be broadcasted: ${tx}`); +``` + +### 解释 + +1. **初始化**:首先创建一个比特币网络的环境,并生成一个新的密钥对和地址。 +2. **创建PSBT**:实例化一个PSBT对象,为添加输入和输出做准备。 +3. **添加输入**:添加一个UTXO作为输入。这通常需要事务的原始数据,这里使用`nonWitnessUtxo`字段传入原始交易的hex字符串。 +4. **添加输出**:添加一个输出,指定收款地址和金额。 +5. **签名**:使用私钥对输入进行签名。 +6. **验证签名**:验证输入的签名是否有效。 +7. **完成PSBT**:完成所有输入,锁定PSBT,使之准备好转换为最终的交易格式。 +8. **导出交易**:将PSBT转换为一个标准的比特币交易,并将其转换为hex格式,准备广播到网络。 + +## PSBT 解析 + +要解析PSBT(Partially Signed Bitcoin Transaction)并查看其详细内容,你可以使用`bitcoinjs-lib`库在JavaScript环境中执行这一任务。下面的示例将展示如何读取一个PSBT,解析其内容,以及如何查看关键信息,如输入和输出详情。 + +### 示例:解析PSBT + +```javascript +const bitcoin = require('bitcoinjs-lib'); + +// 假设这是一个已经存在的PSBT的Base64编码字符串 +const psbtBase64 = + 'cHNidP8BAHECAAAAAZtuEiavDmeZR6WUjIhjFbkFh7m+yywCfHlni6uTrgH/////AZD+GwAAAAAAF6kU9BeD5tGIzjL0VzU3+kEUNw+HME3/////8C0wbdQAAAAAAF6kUAAAAAAAAiACATWsYQSE/C85hv5jZVDezl0l4AAAAAAAEBKxAnAAAAAAAAFgAUjVv8Fy0Qdk84W/oBhiMllC+HIHg='; + +// 将Base64编码的PSBT解码 +const psbt = bitcoin.Psbt.fromBase64(psbtBase64); + +// 遍历PSBT的输入和输出 +psbt.data.inputs.forEach((input, index) => { + console.log(`Input ${index}:`); + console.log(input); +}); + +psbt.data.outputs.forEach((output, index) => { + console.log(`Output ${index}:`); + console.log(output); +}); + +// 如果需要更详细地查看某个特定的输入或输出,可以根据实际需要提取更多信息 +``` + +### 解释 + +1. **解码PSBT**:首先使用`bitcoinjs-lib`的`Psbt.fromBase64`方法将Base64编码的PSBT字符串解码成一个PSBT对象。 +2. **遍历输入和输出**:通过访问`psbt.data.inputs`和`psbt.data.outputs`数组,可以查看每个输入和输出的详细信息。这包括UTXO信息、脚本、签名等。 +3. **打印信息**:在控制台打印每个输入和输出的详细信息,这有助于开发者理解和调试PSBT。 + +## 原生解析 + +在比特币的PSBT(Partially Signed Bitcoin Transaction)处理中,原生编码和解码是指不使用任何外部库直接操作PSBT格式数据的方法。这通常涉及到直接处理PSBT的二进制表示,理解其结构,并根据规范来手动解析或构建数据。由于PSBT规范的复杂性,这一过程比较繁琐,但非常重要,因为它能提供对PSBT工作原理的深入理解。 + +### PSBT数据结构 + +PSBT是一种包含多个键值对的数据结构,每个部分都有其特定的分隔符和格式。其结构大致如下: + +1. **全局部分**:包含交易的全局信息,如未签名的交易(除了witness)和其他全局类型的数据。 +2. **输入部分**:每个输入都有自己的键值对集,可能包括非见证UTXO、签名脚本、序列号等。 +3. **输出部分**:每个输出可能包括与之相关的脚本或其他数据。 + +### 原生编码过程 + +编码PSBT时,你需要遵循BIP 174(PSBT规范)中定义的格式,将交易的各个部分转换为键值对,并且每个键值对之后跟一个分隔符。具体步骤如下: + +1. **开始全局部分**:使用特定的魔术字节(`0x70736274FF`,表示"psbt"加上分隔符)开始。 +2. **编码全局键值对**:例如,将交易版本、交易输入和输出数量等编码为键值对。 +3. **输入部分**:对每个输入,编码所有相关信息(如UTXO、见证数据、部分签名等)为键值对。 +4. **输出部分**:对每个输出,编码所有相关信息(如赎回脚本)为键值对。 +5. **结束**:每个部分结束时都需要一个`0x00`作为分隔符。 + +### 原生解码过程 + +解码PSBT时,需要按照编码的相反顺序来操作: + +1. **读取并验证魔术字节**:确认PSBT的开始符合规范。 +2. **解析全局键值对**:读取键值对,直到遇到分隔符。 +3. **逐个解析输入部分**:对于每个输入,读取其键值对,直到遇到分隔符。 +4. **逐个解析输出部分**:对于每个输出,同样读取其键值对。 +5. **验证完整性**:确保所有必要的数据都已正确解析,并且数据结构符合PSBT的规范。 diff --git a/BTC/Advanced/Psbt/rawParsePSBT.js b/BTC/Advanced/Psbt/rawParsePSBT.js new file mode 100644 index 000000000..9a177cd98 --- /dev/null +++ b/BTC/Advanced/Psbt/rawParsePSBT.js @@ -0,0 +1,76 @@ +const parsePSBT = (psbtBase64) => { + const psbtBuffer = Buffer.from(psbtBase64, 'base64'); + let index = 0; + + // 魔术字节和分隔符 + const magicBytes = psbtBuffer.slice(index, index + 5); + index += 5; + if (magicBytes.toString('hex') !== '70736274ff') { // Check for valid PSBT magic bytes + throw new Error('Not a valid PSBT'); + } + + // 解析全局部分 + console.log('Global Data:'); + while (psbtBuffer[index] !== 0x00 && index < psbtBuffer.length) { + // Parse key + if (index + 2 > psbtBuffer.length) break; // Prevent reading beyond buffer + const keyLen = psbtBuffer[index]; + const key = psbtBuffer.slice(index + 1, index + 1 + keyLen); + index += 1 + keyLen; + + // Parse value + if (index + 1 > psbtBuffer.length) break; // Prevent reading beyond buffer + const valueLen = psbtBuffer.readIntLE(index, 1); + const value = psbtBuffer.slice(index + 1, index + 1 + valueLen); + index += 1 + valueLen; + + console.log(`Key: ${key.toString('hex')}, Value: ${value.toString('hex')}`); + } + index++; // Move past separator byte + + // 解析输入部分 + console.log('Inputs:'); + while (index < psbtBuffer.length && psbtBuffer[index] !== 0x00) { + // Process each input's key-value pairs + while (psbtBuffer[index] !== 0x00 && index < psbtBuffer.length) { + if (index + 2 > psbtBuffer.length) break; + const keyLen = psbtBuffer[index]; + const key = psbtBuffer.slice(index + 1, index + 1 + keyLen); + index += 1 + keyLen; + + if (index + 1 > psbtBuffer.length) break; + const valueLen = psbtBuffer.readUIntLE(index, 1); + const value = psbtBuffer.slice(index + 1, index + 1 + valueLen); + index += 1 + valueLen; + console.log(`Key: ${key.toString('hex')}, Value: ${value.toString('hex')}`); + } + index++; // Move to next input or separator + } + index++; // Move past input separator + + // 解析输出部分 + console.log('Outputs:'); + while (index < psbtBuffer.length && psbtBuffer[index] !== 0x00) { + console.log(`Output at index ${index}:`); + // Process each output's key-value pairs + while (psbtBuffer[index] !== 0x00 && index < psbtBuffer.length) { + if (index + 2 > psbtBuffer.length) break; + const keyLen = psbtBuffer[index]; + const key = psbtBuffer.slice(index + 1, index + 1 + keyLen); + index += 1 + keyLen; + + if (index + 1 > psbtBuffer.length) break; + const valueLen = psbtBuffer.readUIntLE(index, 1); + const value = psbtBuffer.slice(index + 1, index + 1 + valueLen); + index += 1 + valueLen; + + console.log(`Key: ${key.toString('hex')}, Value: ${value.toString('hex')}`); + } + index++; // Move to next output or end + } +}; + +// 用你提供的Base64字符串测试 +const psbtBase64 = + 'cHNidP8BAHUCAAAAASaBcTce3/KF6Tet7qSze3gADAVmy7OtZGQXE8pCFxv2AAAAAAD+////AtPf9QUAAAAAGXapFNDFmQPFusKGh2DpD9UhpGZap2UgiKwA4fUFAAAAABepFDVF5uM7gyxHBQ8k0+65PJwDlIvHh7MuEwAAAQD9pQEBAAAAAAECiaPHHqtNIOA3G7ukzGmPopXJRjr6Ljl/hTPMti+VZ+UBAAAAFxYAFL4Y0VKpsBIDna89p95PUzSe7LmF/////4b4qkOnHf8USIk6UwpyN+9rRgi7st0tAXHmOuxqSJC0AQAAABcWABT+Pp7xp0XpdNkCxDVZQ6vLNL1TU/////8CAMLrCwAAAAAZdqkUhc/xCX/Z4Ai7NK9wnGIZeziXikiIrHL++E4sAAAAF6kUM5cluiHv1irHU6m80GfWx6ajnQWHAkcwRAIgJxK+IuAnDzlPVoMR3HyppolwuAJf3TskAinwf4pfOiQCIAGLONfc0xTnNMkna9b7QPZzMlvEuqFEyADS8vAtsnZcASED0uFWdJQbrUqZY3LLh+GFbTZSYG2YVi/jnF6efkE/IQUCSDBFAiEA0SuFLYXc2WHS9fSrZgZU327tzHlMDDPOXMMJ/7X85Y0CIGczio4OFyXBl/saiK9Z9R5E5CVbIBZ8hoQDHAXR8lkqASECI7cr7vCWXRC+B3jv7NYfysb3mk6haTkzgHNEZPhPKrMAAAAAAAAA'; +parsePSBT(psbtBase64); \ No newline at end of file diff --git a/BTC/Advanced/Taproot/MAST.md b/BTC/Advanced/Taproot/MAST.md new file mode 100644 index 000000000..de593c4f4 --- /dev/null +++ b/BTC/Advanced/Taproot/MAST.md @@ -0,0 +1,527 @@ +## MAST简介 + +Merkelized Alternative Script Tree (MAST) 是比特币的一种增强功能,它利用 Merkle 树结构将不同的花费条件(脚本)组织起来,只公开实际使用的脚本分支,提高隐私性和效率。在 MAST 中,有几个关键角色(或身份),它们在构建和验证 Merkle 树时扮演重要作用: + +### 关键角色 + +1. **叶子节点(Leaf Nodes)** + + - **定义**: 叶子节点是 Merkle 树中的基础节点,每个叶子节点代表一个具体的花费条件或脚本。叶子节点通常哈希值进行字典序(lexicographical order)排序。排序的目的是确保 Merkle 树的结构和哈希值是唯一且确定的,这样不同的参与者在构建相同的 Merkle 树时可以得到相同的根哈希值,从而确保交易的一致性和可验证性。 + - **功能**: 包含实际的比特币脚本(例如条件 A、B、C),这些脚本定义了不同的花费条件。 + - **示例**: + - 条件 A: 在特定时间后 Alice 可以花费。 + - 条件 B: 在不同的特定时间后 Bob 可以花费。 + - 条件 C: Alice 和 Bob 联合签名可以立即花费。 + +2. **内部节点(Internal Nodes)** + + - **定义**: 内部节点是 Merkle 树中的中间节点,每个内部节点是其子节点哈希值的组合。 + - **功能**: 通过将其子节点的哈希值组合在一起,内部节点形成了从叶子节点到根节点的路径。 + - **示例**: 如果 `A` 和 `B` 是叶子节点,那么 `H1 = Hash(A, B)` 是内部节点。 + +3. **根节点(Root Node)** + + - **定义**: 根节点是 Merkle 树的顶层节点,代表整个树的哈希值。 + - **功能**: 根节点的哈希值用于验证整个 Merkle 树的完整性和有效性。 + - **示例**: 如果 `H1` 和 `H2` 是内部节点,那么 `Root = Hash(H1, H2)` 是根节点。 + +4. **Merkle 路径(Merkle Path)** + - **定义**: Merkle 路径是从叶子节点到根节点的一系列哈希值,用于验证特定叶子节点是否属于 Merkle 树的一部分。 + - **功能**: 当花费特定条件时,公开的 Merkle 路径允许验证者确认该条件是 Merkle 树的一部分,而不必公开其他条件。 + - **示例**: 如果叶子节点 `C` 被使用,Merkle 路径包括 `H3` 和 `H1`,以验证 `C` 到根节点的路径。 + +### 示例 + +假设有三个条件(脚本),它们组织成如下 Merkle 树结构: + +``` + Root (R) + / \ + H1 H2 + / \ / \ + A B C H3 +``` + +- **A**、**B**、**C** 是叶子节点,代表具体的花费条件。 +- **H1** 是 `Hash(A, B)`,**H2** 是 `Hash(C, H3)`,它们是内部节点。 +- **Root** 是 `Hash(H1, H2)`,它是根节点。 + +当 Alice 和 Bob 联合签名花费条件 C 时,需要公开以下信息来验证条件 C 的合法性: + +1. 条件 C 的脚本(叶子节点)。 +2. 节点 H3(内部节点,用于计算 H2)。 +3. 节点 H1(内部节点,用于计算 Root)。 +4. 根节点 Root。 + +### 验证过程 + +1. 计算 C 的哈希值。 +2. 结合 C 的哈希值和 H3,计算出 H2。 +3. 结合 H1 和 H2,计算出 Root。 +4. 比对计算得到的 Root 和交易中提供的 Root,如果匹配,则验证通过。 + +这种结构使得未使用的条件(例如 A 和 B)保持隐藏,提高了交易的隐私性,同时提供了高效的验证机制。 + +## MAST的创建、更新和移除 + +实现 MAST(Merkelized Alternative Script Tree) 的创建、插入和删除功能,可以使用 JavaScript 结合一些加密库来完成。以下是一个基本的示例,演示如何创建、插入和删除 MAST 中的节点。 + +```javascript +const crypto = require('crypto'); + +class MAST { + constructor() { + this.leaves = []; + this.tree = []; + } + + // 计算哈希值 + hash(data) { + return crypto.createHash('sha256').update(data).digest('hex'); + } + + // 将叶子节点添加到树中 + addLeaf(data) { + const hashedData = this.hash(data); + this.leaves.push(hashedData); + this.buildTree(); + } + + // 删除叶子节点并重建树 + removeLeaf(data) { + const hashedData = this.hash(data); + const index = this.leaves.indexOf(hashedData); + if (index > -1) { + this.leaves.splice(index, 1); + this.buildTree(); + } + } + + // 构建 Merkle 树 + buildTree() { + if (this.leaves.length === 0) { + this.tree = []; + return; + } + + let level = this.leaves.slice().sort(); // 字典序排序 + this.tree = [level]; + + while (level.length > 1) { + level = this.getNextLevel(level); + this.tree.unshift(level); + } + } + + // 计算下一层节点 + getNextLevel(level) { + const nextLevel = []; + for (let i = 0; i < level.length; i += 2) { + if (i + 1 < level.length) { + nextLevel.push(this.hash(level[i] + level[i + 1])); + } else { + nextLevel.push(level[i]); // 如果没有配对节点,直接移动到下一层 + } + } + return nextLevel; + } + + // 获取 Merkle 树的根 + getRoot() { + return this.tree.length ? this.tree[0][0] : null; + } + + // 打印 Merkle 树 + printTree() { + console.log(JSON.stringify(this.tree, null, 2)); + } +} + +// 示例用法 +const mast = new MAST(); +mast.addLeaf('Condition A'); +mast.addLeaf('Condition B'); +mast.addLeaf('Condition C'); +console.log('Initial MAST:'); +mast.printTree(); +console.log('Root:', mast.getRoot()); + +mast.removeLeaf('Condition B'); +console.log('After removing Condition B:'); +mast.printTree(); +console.log('Root:', mast.getRoot()); + +mast.addLeaf('Condition D'); +console.log('After adding Condition D:'); +mast.printTree(); +console.log('Root:', mast.getRoot()); +``` + +### 解释 + +- **hash(data)**: 计算给定数据的 SHA-256 哈希值。 +- **addLeaf(data)**: 添加叶子节点,添加后重建 Merkle 树。 +- **removeLeaf(data)**: 删除叶子节点,删除后重建 Merkle 树。 +- **buildTree()**: 根据当前叶子节点构建 Merkle 树。 +- **getNextLevel(level)**: 计算当前层次节点的哈希值以生成下一层节点。 +- **getRoot()**: 获取 Merkle 树的根节点。 +- **printTree()**: 打印整个 Merkle 树。 + +### 注意事项 + +1. **排序**: 每次构建树时,叶子节点都根据其哈希值进行字典序排序,以确保树的唯一性和确定性。 +2. **树结构**: `tree` 属性是一个数组,存储从叶子节点到根节点的所有层次。 + +这个示例实现了基本的 MAST 功能,包括创建、插入和删除叶子节点。 + +## Taproot中的应用 + +![$$Q = P + t*G$$](https://aandds.com/blog/images/taproot_tweak.gif) +如上图,在Taproot中需要在MAST中针对叶子结点、树结点和根结点分别引入TapLeaf、TapBranch和TapTweak去计算hash。 + +### 代码示例 + +```javascript +const bitcoin = require('bitcoinjs-lib'); +const crypto = require('crypto'); +const ecc = require('tiny-secp256k1'); +const { BIP32Factory } = require('bip32'); +const bip32 = BIP32Factory(ecc); +const { payments } = bitcoin; + +// 创建 Tagged Hash 函数 +function taggedHash(tag, data) { + const tagHash = crypto.createHash('sha256').update(tag).digest(); + return crypto + .createHash('sha256') + .update(Buffer.concat([tagHash, tagHash, data])) + .digest(); +} + +// Taproot Tweak 函数 +function tapTweakPubkey(pubkey, h) { + const tweak = taggedHash('TapTweak', Buffer.concat([pubkey, h])); + const tweakedPubkey = Buffer.from(ecc.pointAddScalar(pubkey, tweak)); + return { tweakedPubkey, tweak }; +} + +// TapLeaf 计算函数 +function tapLeaf(version, script) { + const leafVersion = Buffer.from([version]); + return taggedHash('TapLeaf', Buffer.concat([leafVersion, script])); +} + +// TapBranch 计算函数 +function tapBranch(h1, h2) { + return taggedHash('TapBranch', Buffer.concat([h1, h2].sort(Buffer.compare))); +} + +class MAST { + constructor() { + this.leaves = []; + } + + // 添加叶子节点 + addLeaf(script, version = 0xc0) { + const hashedLeaf = tapLeaf(version, script); + this.leaves.push(hashedLeaf); + this.leaves.sort(Buffer.compare); // 字典序排序 + } + + // 构建 Merkle 树并返回根节点 + getMerkleRoot() { + if (this.leaves.length === 0) { + return Buffer.alloc(32, 0); + } + return this.buildTree(this.leaves); + } + + // 递归构建 Merkle 树 + buildTree(leaves) { + if (leaves.length === 1) { + return leaves[0]; + } + + const nextLevel = []; + for (let i = 0; i < leaves.length; i += 2) { + if (i + 1 < leaves.length) { + nextLevel.push(tapBranch(leaves[i], leaves[i + 1])); + } else { + nextLevel.push(leaves[i]); // 如果没有配对节点,直接移动到下一层 + } + } + + return this.buildTree(nextLevel); + } +} + +// 示例用法 +const mast = new MAST(); +mast.addLeaf(Buffer.from('Condition A')); +mast.addLeaf(Buffer.from('Condition B')); +mast.addLeaf(Buffer.from('Condition C')); +console.log('Initial MAST:'); +console.log(mast.leaves.map((leaf) => leaf.toString('hex'))); +console.log('MAST Root:', mast.getMerkleRoot().toString('hex')); +``` + +### 代码说明 + +1. **taggedHash(tag, data)**: 创建 Tagged Hash 函数,用于 Taproot Tweak 和 TapLeaf/TapBranch。 +2. **tapTweakPubkey(pubkey, h)**: 使用 Tagged Hash 和内部公钥计算 Tweaked 公钥。 +3. **tapLeaf(version, script)**: 计算 TapLeaf 的哈希值。 +4. **tapBranch(h1, h2)**: 计算两个子树的 TapBranch 哈希值。 +5. **MAST 类**: + - `addLeaf(script, version)`: 添加叶子节点并对其哈希值进行字典序排序。 + - `getMerkleRoot()`: 构建 Merkle 树并返回根节点。 + - `buildTree(leaves)`: 递归构建 Merkle 树。 + +### Taproot地址计算 + +生成Taproot地址,实际上是对Tweaked 公钥的X坐标编码为 Bech32m 格式 +**流程** + +- 初始化 MAST 并添加叶子节点。 +- 构建 Merkle 树并计算根节点。 +- 生成内部公钥并计算 Tweaked 公钥。 +- 生成并输出 Taproot 地址。 + +```js +// 生成内部公钥 +const keyPair = bip32.fromSeed(crypto.randomBytes(32)); +const internalPubkey = keyPair.publicKey.slice(1, 33); // 移除 0x02 或 0x03 前缀 + +// 计算 Taproot 公钥 +const mastRoot = mast.getMerkleRoot(); +const { tweakedPubkey } = tapTweakPubkey(internalPubkey, mastRoot); + +// 生成 Taproot 地址 +const taprootAddress = payments.p2tr({ + internalPubkey: tweakedPubkey.slice(1, 33), + network: bitcoin.networks.bitcoin, +}).address; + +console.log('Taproot Address:', taprootAddress); +``` + +### 锁定脚本(scriptPubKey) + +对于隔离见证 Output,其 scriptPubKey 为 **OP_n tweaked-public-key** + +##### OP_n + +OP_n 表示隔离见证版本,版本 0 隔离见证 Output 的 scriptPubKey 的首个字节是 0x00,而版本 1 隔离见证 Output 的 scriptPubKey 的首个字节是 0x51 + +```js +OP_0: 0x00 // segwitV0 +OP_1: 0x51 // segwitV1,即Taproot +OP_2: 0x52 +... + +See: https://github.com/bitcoin/bitcoin/blob/v22.0/src/script/script.h#L68 +``` + +#### tweaked-public-key + +tweaked-public-key的计算比较复杂,有internal public key和script tree的Merkle Root组成,然后再进行Bech32m编码就能得到Taproot地址 + +##### script path + +script path是Taproot中比较灵活、同时比较复杂的一种方式 +tweaked-public-key的计算比较如上图:$$Q = P + t*G$$ + +#### key path + +key path不需要 Script Path,则可以去掉 Script 相关的哈希 +即:$$Q = P + t*G = P + TaggedHash('TapTweak', P)G$$ +钱包中的taproot地址就是基于**用户公钥做P**代入上方公式推导得到 + +#### **代码实现** + +```js +const mast = new MAST(); +mast.addLeaf(Buffer.from("OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG")); +mast.addLeaf(Buffer.from("OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG")); +mast.addLeaf(Buffer.from("OP_2 OP_2 OP_CHECKMULTISIG")); + +// 生成内部公钥 +const keyPair = bip32.fromSeed(crypto.randomBytes(32)); +const internalPubkey = keyPair.publicKey.slice(1, 33); // 移除 0x02 或 0x03 前缀 + +// 计算 Taproot 公钥 +const mastRoot = mast.getMerkleRoot(); +const { tweakedPubkey } = tapTweakPubkey(internalPubkey, mastRoot); + +// 获取 Tweaked 公钥的 X 坐标 +const tweakedPubkeyX = tweakedPubkey.slice(1, 33); + +// 生成锁定脚本(P2TR 地址的锁定脚本) +const lockingScript = bitcoin.script.compile([bitcoin.opcodes.OP_1, tweakedPubkeyX]); + +console.log('Locking Script:', lockingScript.toString('hex')); +``` + +### 解锁脚本(witnessScript) + +Taproot属于Segwit v1版本,其相关解锁脚本放在Witness位置 +如果在花费 P2TR UTXO 时,Witness 只包含一个元素,则是 P2TR (Key Path),如果在花费 P2TR UTXO 时,Witness 至少包含两个元素,则是 P2TR (Script Path)。在花费一个 P2TR UTXO 时,是通过 Witness 中元素的个数来决定使用 Key Path(Witness 元素个数为 1)还是 Script Path(Witness 元素个数大于等于 2)。 +在 Taproot 中,解锁script path可以使用 Taproot Tree 的任意路径之一来满足条件。 +下面代码以解锁一个script tree中的2-2多签叶子结点C为例: + +#### **代码实现** + +```js +class MAST { + // ... + // 获取叶子节点的路径 + getLeafPath(leaf) { + const index = this.leaves.indexOf(leaf); + if (index === -1) return null; + + let path = []; + let level = this.leaves.slice(); + + while (level.length > 1) { + const nextLevel = []; + for (let i = 0; i < level.length; i += 2) { + if (i + 1 < level.length) { + nextLevel.push(tapBranch(level[i], level[i + 1])); + } else { + nextLevel.push(level[i]); + } + if (i === index || i + 1 === index) { + path.push(i === index ? level[i + 1] : level[i]); + index = Math.floor(i / 2); + } + } + level = nextLevel; + } + return path; + } +} + +const mast = new MAST(); +const scriptA = Buffer.from("OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG"); +const scriptB = Buffer.from("OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG"); +const scriptC = Buffer.from("OP_2 OP_2 OP_CHECKMULTISIG"); +mast.addLeaf(scriptA); +mast.addLeaf(scriptB); +mast.addLeaf(scriptC); + +// 生成内部公钥 +const keyPairAlice = bip32.fromSeed(crypto.randomBytes(32)); +const keyPairBob = bip32.fromSeed(crypto.randomBytes(32)); +const internalPubkey = keyPairAlice.publicKey.slice(1, 33); // 移除 0x02 或 0x03 前缀 + +// 计算 Taproot 公钥 +const mastRoot = mast.getMerkleRoot(); +const { tweakedPubkey } = tapTweakPubkey(internalPubkey, mastRoot); + +// 获取 Tweaked 公钥的 X 坐标 +const tweakedPubkeyX = tweakedPubkey.slice(1, 33); + +// 构建交易以花费 Taproot 输出 +const txb = new bitcoin.TransactionBuilder(bitcoin.networks.bitcoin); +const value = 100000; // 假设输出金额为 100000 satoshis +const inputIndex = 0; // 输入索引 +const prevTx = bitcoin.Transaction.fromHex(''); // 上一个交易的对象 +const prevTxId = prevTx.getId(); // 上一个交易的 ID +const outputIndex = 0; // 上一个交易输出的索引 + +// 添加输入和输出 +txb.addInput(prevTxId, outputIndex); +txb.addOutput('', value - 1000); // 减去交易费用 + +// 假设要花费 scriptC +const leafToSpend = tapLeaf(0xc0, scriptC); +const leafPath = mast.getLeafPath(leafToSpend); + +// 构建 controlBlock +const controlBlock = Buffer.concat([ + Buffer.from([0xc0]), // 脚本版本 + internalPubkey, + ...leafPath, +]); + +// 签名交易 +const hashType = bitcoin.Transaction.SIGHASH_ALL; +const signatureHash = txb.buildIncomplete().hashForWitnessV1(inputIndex, [lockingScript], [value], hashType); +const signatureAlice = bitcoin.script.signature.encode(keyPairAlice.sign(signatureHash), hashType); +const signatureBob = bitcoin.script.signature.encode(keyPairBob.sign(signatureHash), hashType); + +// 构建解锁脚本(witness script) +const witnessScript = [signatureAlice, signatureBob, scriptC, controlBlock]; + +// 设置 witness +txb.setWitness(inputIndex, witnessScript); + +// 构建并输出交易 +const tx = txb.build(); +console.log('Transaction:', tx.toHex()); +``` + +**构建和签名交易:** + +- 创建一个交易以花费 Taproot 输出。 +- 添加输入和输出。 +- 获取要花费的脚本(例如 scriptC)的 TapLeaf 哈希值和 Merkle 路径。 +- 构建 controlBlock,包含脚本版本、内部公钥和 Merkle 路径。 +- 使用 Alice 和 Bob 的密钥分别对交易进行签名。 +- 构建包含两个签名和其他信息的解锁脚本(witness script)。 +- 设置交易的 witness。 + +#### script path + +[905ecdf95a84804b192f4dc221cfed4d77959b81ed66013a7e41a6e61e7ed530](https://blockchain.info/rawtx/905ecdf95a84804b192f4dc221cfed4d77959b81ed66013a7e41a6e61e7ed530)是花费 P2TR (Script Path) 的例子(它是一个 2-of-2 多签脚本),它的 Witness 为 + +```js +044123b1d4ff27b16af4b0fcb9672df671701a1a7f5a6bb7352b051f461edbc614aa6068b3e5313a174f90f3d95dc4e06f69bebd9cf5a3098fde034b01e69e8e788901400fd4a0d3f36a1f1074cb15838a48f572dc18d412d0f0f0fc1eeda9fa4820c942abb77e4d1a3c2b99ccf4ad29d9189e6e04a017fe611748464449f681bc38cf394420febe583fa77e49089f89b78fa8c116710715d6e40cc5f5a075ef1681550dd3c4ad20d0fa46cb883e940ac3dc5421f05b03859972639f51ed2eccbf3dc5a62e2e1b15ac41c02e44c9e47eaeb4bb313adecd11012dfad435cd72ce71f525329f24d75c5b9432774e148e9209baf3f1656a46986d5f38ddf4e20912c6ac28f48d6bf747469fb1 +``` + +根据编码我们得知有4个元素 + +```js +0070: .. .. .. .. .. .. 04 .. .. .. .. .. .. .. .. .. vin0 Witness Count: 4 +0070: .. .. .. .. .. .. .. 41 23 b1 d4 ff 27 b1 6a f4 vin0 Witness 0 Length:65 (0x41) +0080: b0 fc b9 67 2d f6 71 70 1a 1a 7f 5a 6b b7 35 2b +0090: 05 1f 46 1e db c6 14 aa 60 68 b3 e5 31 3a 17 4f +00a0: 90 f3 d9 5d c4 e0 6f 69 be bd 9c f5 a3 09 8f de +00b0: 03 4b 01 e6 9e 8e 78 89 01 .. .. .. .. .. .. .. +00b0: .. .. .. .. .. .. .. .. .. 40 0f d4 a0 d3 f3 6a vin0 Witness 1 Length:64 (0x40) +00c0: 1f 10 74 cb 15 83 8a 48 f5 72 dc 18 d4 12 d0 f0 +00d0: f0 fc 1e ed a9 fa 48 20 c9 42 ab b7 7e 4d 1a 3c +00e0: 2b 99 cc f4 ad 29 d9 18 9e 6e 04 a0 17 fe 61 17 +00f0: 48 46 44 49 f6 81 bc 38 cf 39 .. .. .. .. .. .. +00f0: .. .. .. .. .. .. .. .. .. .. 44 20 fe be 58 3f vin0 Witness 2 Length:68 (0x44) +0100: a7 7e 49 08 9f 89 b7 8f a8 c1 16 71 07 15 d6 e4 +0110: 0c c5 f5 a0 75 ef 16 81 55 0d d3 c4 ad 20 d0 fa +0120: 46 cb 88 3e 94 0a c3 dc 54 21 f0 5b 03 85 99 72 +0130: 63 9f 51 ed 2e cc bf 3d c5 a6 2e 2e 1b 15 ac .. +0130: .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. 41 vin0 Witness 3 Length:65 (0x41) +0140: c0 2e 44 c9 e4 7e ae b4 bb 31 3a de cd 11 01 2d +0150: fa d4 35 cd 72 ce 71 f5 25 32 9f 24 d7 5c 5b 94 +0160: 32 77 4e 14 8e 92 09 ba f3 f1 65 6a 46 98 6d 5f +0170: 38 dd f4 e2 09 12 c6 ac 28 f4 8d 6b f7 47 46 9f +0180: b1 +``` + +#### key path + +[dbef583962e13e365a2069d451937a6de3c2a86149dc6a4ac0d84ab450509c91](https://blockchain.info/rawtx/dbef583962e13e365a2069d451937a6de3c2a86149dc6a4ac0d84ab450509c91)是花费 P2TR (Key Path) 的例子,它的 witness 为: + +```js +044123b1d4ff27b16af4b0fcb9672df671701a1a7f5a6bb7352b051f461edbc614aa6068b3e5313a174f90f3d95dc4e06f69bebd9cf5a3098fde034b01e69e8e788901400fd4a0d3f36a1f1074cb15838a48f572dc18d412d0f0f0fc1eeda9fa4820c942abb77e4d1a3c2b99ccf4ad29d9189e6e04a017fe611748464449f681bc38cf394420febe583fa77e49089f89b78fa8c116710715d6e40cc5f5a075ef1681550dd3c4ad20d0fa46cb883e940ac3dc5421f05b03859972639f51ed2eccbf3dc5a62e2e1b15ac41c02e44c9e47eaeb4bb313adecd11012dfad435cd72ce71f525329f24d75c5b9432774e148e9209baf3f1656a46986d5f38ddf4e20912c6ac28f48d6bf747469fb1 +``` + +```js +0141e6e1fe41524e65e3040bc3d080a136345c2c806eb7f336dd6a7a79e9054b0d1fc6a8d836667ef6e9f2188cd1270ab28e5e0eb642eac89f2ec50a32ca54aaf9d601 + +01 .. .. .. .. .. .. .. .. .. .. .. .. .. .. vin0 Witness Count: 1 +.. 41 .. .. .. .. .. .. .. .. .. .. .. .. .. vin0 Witness 0 Length:65, schnorr_sig (64 bytes) + sig_hash (1 bytes) +.. .. e6 e1 fe 41 52 4e 65 e3 04 0b c3 d0 80 schnorr_sig +a1 36 34 5c 2c 80 6e b7 f3 36 dd 6a 7a 79 e9 +05 4b 0d 1f c6 a8 d8 36 66 7e f6 e9 f2 18 8c +d1 27 0a b2 8e 5e 0e b6 42 ea c8 9f 2e c5 0a +32 ca 54 aa f9 d6 +.. .. .. .. .. .. 01 sig_hash: SIGHASH_ALL (0x01) +``` diff --git a/BTC/Advanced/Taproot/README.md b/BTC/Advanced/Taproot/README.md new file mode 100644 index 000000000..8c2d09f77 --- /dev/null +++ b/BTC/Advanced/Taproot/README.md @@ -0,0 +1,72 @@ +### Taproot的详细历史和特点 + +#### 起源与发展 + +1. **提案的提出**: + - Taproot的设计始于比特币改进提案 [BIP 340](https://github.com/bitcoin/bips/blob/master/bip-0340.mediawiki)、[BIP 341](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki)和[BIP 342](https://github.com/bitcoin/bips/blob/master/bip-0342.mediawiki)。BIP 340介绍了Schnorr签名算法在比特币中的应用,BIP 341提出了Taproot的概念,而BIP 342则探讨了Taproot和Schnorr的集成。 + +2. **设计目标**: + - Taproot的主要设计目标包括提高比特币网络的隐私性、可扩展性和支持更复杂的智能合约。通过引入Schnorr签名和Merkle树结构,Taproot旨在优化多重签名交易的外观,并将其与常规单签名交易统一化,从而提升隐私保护。 + +#### 技术特点 + +1. **Schnorr签名和签名聚合**: + - Taproot引入了Schnorr签名算法,这种签名算法相较于比特币当前使用的ECDSA签名更高效,并支持多个输入的签名聚合。这意味着多重签名交易的签名可以被聚合成一个单一的签名,显著减小了交易大小,降低了交易费用,并提高了链上交易的隐私性。 + +2. **Merkle树结构**: + - Taproot利用Merkle树结构,将多种不同的比特币脚本路径合并成一个单一的“扩展公钥”。这使得在链上查看的所有交易看起来都像是来自一个单一的地址,从而隐藏了实际执行的交易路径和使用的脚本类型,进一步提升了隐私性。 + +3. **智能合约支持**: + - Taproot通过其灵活的脚本能力,支持更复杂和高级的智能合约。这些合约可以以更简洁和隐私的方式实现,允许比特币用户创建更复杂的交易逻辑和条件,如多重签名、时间锁定、条件支付等。 + +#### 部署和实施 + +1. **社区支持和开发**: + - Taproot的开发经历了长时间的讨论和审查,由比特币社区内的核心开发者、研究人员和网络参与者共同推动。通过开放的讨论和测试网络(如Bitcoin Testnet),确保了升级的安全性和兼容性。 + +2. **激活过程**: + - Taproot于2021年11月通过比特币矿工社区的投票得到了广泛支持和认可。随后,升级计划在2022年11月在比特币主网上正式生效,这意味着所有比特币节点都支持Taproot升级,并能够开始使用新的Taproot功能。 + +### Segwit版本区别 + +#### Segwit 版本0(P2WPKH和P2WSH) + +##### 特点: +1. **P2WPKH(Pay to Witness Public Key Hash)**:这种类型的地址通常以`bc1q`开头。 +2. **P2WSH(Pay to Witness Script Hash)**:这种类型的地址通常以`bc1q`开头,用于更复杂的多重签名(multisig)脚本。 +3. **隔离见证**:交易的见证数据被隔离到一个独立的区块部分,减小了交易数据的大小,从而提高了区块的容量。 +4. **交易格式**:新的交易格式,包含一个见证字段,用于存储签名等见证数据。 +5. **可延展性问题的解决**:通过隔离见证,解决了交易的可延展性问题,使得交易ID在没有更改其内容的情况下不能被篡改。 + +#### Segwit 版本1(Taproot) + +##### 特点: +1. **Taproot**:这是Segwit版本1的主要改进,它是一个更复杂的地址方案,通常以`bc1p`开头。 +2. **Schnorr签名**:引入了Schnorr签名算法,这种算法比原来的ECDSA签名更高效和安全,可以实现批量验证签名,从而进一步提高效率。 +3. **Mast(Merkelized Abstract Syntax Tree)**:允许更复杂的智能合约和多重签名方案,只有在执行时需要的部分才会被暴露,增强了隐私性和效率。 +4. **更高的灵活性和隐私**:与传统的多重签名方案相比,Taproot允许在不暴露具体条件的情况下进行复杂的条件支付,大大增强了隐私性。 +5. **兼容性**:保持与Segwit版本0的兼容性,新的功能和特性在使用时才会生效。 + +#### 功能对比 + +| 特点 | Segwit 版本0 | Segwit 版本1 (Taproot) | +|-------------------------------|------------------------------------|---------------------------------| +| **地址格式** | `bc1q` 开头 | `bc1p` 开头 | +| **主要改进** | 隔离见证(Segregated Witness) | Taproot | +| **签名算法** | ECDSA 签名 | Schnorr 签名 | +| **交易格式** | 包含见证字段,分离见证数据 | 与版本0兼容,增加了新的见证字段 | +| **隐私和效率** | 提高区块容量,解决交易可延展性问题 | 进一步提高隐私性和效率 | +| **智能合约功能** | 基础单签名和简单多重签名方案 | 支持更复杂的智能合约和条件支付 | +| **Mast 支持** | 不支持 | 支持(Merkelized Abstract Syntax Tree) | +| **批量签名验证** | 不支持 | 支持(Schnorr签名的特性) | +| **兼容性** | 不适用于Taproot | 兼容Segwit版本0 | + +#### 锁定脚本和解锁脚本的对比 +| Type | scriptPubKey(锁定时使用) | Witness(花费时使用) | 说明 | +|-------------------------|------------------------------------------------|----------------------------------------------|-----------------------------------------| +| **P2WPKH** | 0x0014{20-byte-key-hash} | \ \ | 支付到单一公钥哈希,常用于单签名交易。 | +| **P2WSH** | 0x0020{32-byte-hash} | \ \ | 支付到复杂脚本哈希,适用于多重签名或其他复杂脚本。| +| **P2TR (Key Path)** | 0x5120{32-byte-tweaked-public-key} | \ | 使用Taproot支付到单一公钥,简化的单签名。 | +| **P2TR (Script Path)** | 0x5120{32-byte-tweaked-public-key} | \ \ \ | 使用Taproot支付到复杂脚本路径,支持复杂的条件支付。| + +Taproot的地址计算、锁定脚本和解锁脚本详见[MAST](./MAST.md) \ No newline at end of file diff --git a/BTC/Advanced/Taproot/example/README.md b/BTC/Advanced/Taproot/example/README.md new file mode 100644 index 000000000..f8f8b5d5d --- /dev/null +++ b/BTC/Advanced/Taproot/example/README.md @@ -0,0 +1,129 @@ +# Bitcoin Taproot Example + +A demonstration project showcasing Bitcoin Taproot technology implementation, including address creation, transaction handling, and Schnorr signatures. + +## Features + +- Taproot address generation +- Schnorr signature implementation +- Transaction creation and signing +- OP_RETURN output support +- Debug information output + +## Tech Stack + +- bitcoinjs-lib: Bitcoin transaction handling library +- ecpair: Key pair management +- @bitcoinerlab/secp256k1: Elliptic curve cryptography + +## Installation + +```bash +npm install bitcoinjs-lib ecpair @bitcoinerlab/secp256k1 +``` + +## Usage + +1. Create a Taproot address: +```javascript +const taprootData = createTaprootAddress(); +console.log('Taproot Address:', taprootData.address); +``` + +2. Create a transaction: +```javascript +const tx = await createTaprootTransaction(taprootData, recipientAddress, amount); +``` + +## Core Components + +### SchnorrSigner Class +Handles Schnorr signatures required for Taproot transactions: +- Key pair management +- x-only public key conversion +- Schnorr signature generation + +### Utility Functions +- `toXOnly`: Converts full public key to x-only format +- `createTaprootAddress`: Generates Taproot address +- `addOpReturnOutput`: Adds OP_RETURN output +- `createTaprootTransaction`: Creates and signs transactions + +## Important Notes + +- Currently configured for testnet +- Uses fixed transaction fee (1000 satoshis) +- Example UTXO is placeholder (replace with real UTXO in production) + +## Debug Features + +The project includes comprehensive debug output: +- Address information +- Public key details +- Transaction details +- Signature information + +## Example Output + +When running the program, you'll see: +- Taproot address +- Public key (hex format) +- Output script +- Network information +- Transaction details +- Witness data + +## Development Environment + +- Node.js +- npm/yarn +- Bitcoin Testnet (for testing) + +## Security Considerations + +- This is a demonstration project, not recommended for mainnet use +- Ensure proper private key handling in production +- Implement appropriate error handling for production use + +## API Reference + +### createTaprootAddress() +Returns an object containing: +- signer: SchnorrSigner instance +- address: Taproot address +- output: Output script + +### createTaprootTransaction(taprootData, recipient, satoshis, message) +Parameters: +- taprootData: Object containing signer and output information +- recipient: Recipient's address +- satoshis: Amount to send +- message: Optional OP_RETURN message (default provided) + +Returns: Signed transaction in hex format + +## References + +- [Bitcoin Taproot Documentation](https://github.com/bitcoin/bips/blob/master/bip-0341.mediawiki) +- [bitcoinjs-lib Documentation](https://github.com/bitcoinjs/bitcoinjs-lib) + +## Contributing + +Feel free to submit issues and enhancement requests. + +## License + +MIT License +``` + +This README.md provides: +1. Project overview and key features +2. Installation and usage instructions +3. Detailed component descriptions +4. Development considerations +5. Debug information +6. Security notes +7. API documentation +8. Relevant references + +You can customize this content based on your specific needs. diff --git a/BTC/Advanced/Taproot/example/index.js b/BTC/Advanced/Taproot/example/index.js new file mode 100644 index 000000000..837e91914 --- /dev/null +++ b/BTC/Advanced/Taproot/example/index.js @@ -0,0 +1,174 @@ +const bitcoin = require('bitcoinjs-lib'); +const { ECPairFactory } = require('ecpair'); +const secp256k1 = require('@bitcoinerlab/secp256k1'); +const ECPair = ECPairFactory(secp256k1); + +// Initialize the elliptic curve library for Bitcoin operations +bitcoin.initEccLib(secp256k1); + +// Set network to testnet for development purposes +const network = bitcoin.networks.testnet; + +/** + * Convert a public key to x-only format required for Taproot + * @param {Buffer} pubKey - The full public key + * @returns {Buffer} The x-only public key (32 bytes) + */ +function toXOnly(pubKey) { + return Buffer.from(pubKey).slice(1, 33); +} + +/** + * SchnorrSigner class for handling Taproot signatures + * Implements the Schnorr signature scheme required for Taproot + */ +class SchnorrSigner { + constructor(keyPair) { + this.keyPair = keyPair; + // Convert to x-only public key format required for Taproot + this.publicKey = toXOnly(keyPair.publicKey); + } + + // Sign transaction with Schnorr signature + sign(hash) { + return this.keyPair.sign(hash, true); // Enable Schnorr signing + } + + signSchnorr(hash) { + return this.sign(hash); + } +} + +/** + * Creates a Taproot address and associated data + * @returns {Object} Contains signer, address and output script + */ +function createTaprootAddress() { + // Generate random keypair for Taproot + const keyPair = ECPair.makeRandom({ network }); + const schnorrSigner = new SchnorrSigner(keyPair); + + // Create P2TR (Pay-to-Taproot) payment object + const { address, output } = bitcoin.payments.p2tr({ + pubkey: schnorrSigner.publicKey, + network, + }); + + return { signer: schnorrSigner, address, output }; +} + +/** + * Adds OP_RETURN output to transaction + * @param {Psbt} psbt - The Partially Signed Bitcoin Transaction + * @param {string} message - Message to embed in OP_RETURN + */ +function addOpReturnOutput(psbt, message) { + const data = Buffer.from(message, 'utf8'); + const embed = bitcoin.payments.embed({ data: [data] }); + psbt.addOutput({ script: embed.output, value: 0 }); +} + +/** + * Creates and signs a Taproot transaction + * @param {Object} taprootData - Contains signer and output information + * @param {string} recipient - Recipient's address + * @param {number} satoshis - Amount to send + * @param {string} message - Optional OP_RETURN message + * @returns {string} Signed transaction in hex format + */ +async function createTaprootTransaction(taprootData, recipient, satoshis, message = "Created with Bitcoin Taproot Demo") { + try { + // Initialize PSBT (Partially Signed Bitcoin Transaction) + const psbt = new bitcoin.Psbt({ network }); + + // Example transaction ID (replace with actual UTXO in production) + const txid = Buffer.from('a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2', 'hex'); + + // Add input with Taproot specific fields + psbt.addInput({ + hash: txid, + index: 0, + witnessUtxo: { + value: satoshis, + script: taprootData.output, + }, + tapInternalKey: taprootData.signer.publicKey, + }); + + // Add recipient output (with fee deduction) + psbt.addOutput({ + address: recipient, + value: satoshis - 1000 // Deduct transaction fee + }); + + // Add optional OP_RETURN message + addOpReturnOutput(psbt, message); + + // Sign and finalize the transaction + await psbt.signInput(0, taprootData.signer); + psbt.finalizeAllInputs(); + + return psbt.extractTransaction().toHex(); + } catch (error) { + console.error('Error in createTaprootTransaction:', error); + throw error; + } +} + +// Print debug information +function printDebugInfo(data) { + console.log('\nDebug Information:'); + for (const [key, value] of Object.entries(data)) { + if (Buffer.isBuffer(value)) { + console.log(`${key}: ${value.toString('hex')} (Buffer)`); + } else if (typeof value === 'object' && value !== null) { + console.log(`${key}: [Object]`); + } else { + console.log(`${key}: ${value}`); + } + } +} + +async function main() { + try { + // Create Taproot address + const taprootData = createTaprootAddress(); + + console.log('Taproot Details:'); + console.log('Taproot Address:', taprootData.address); + console.log('Public Key:', taprootData.signer.publicKey.toString('hex')); + console.log('Output Script:', taprootData.output.toString('hex')); + + // Output debug information + printDebugInfo({ + network: network.messagePrefix, + publicKeyType: taprootData.signer.publicKey.constructor.name, + publicKeyLength: taprootData.signer.publicKey.length, + hasPrivateKey: !!taprootData.signer.keyPair.privateKey, + outputType: taprootData.output.constructor.name, + outputLength: taprootData.output.length + }); + + // Create transaction + const recipientAddress = 'tb1qw508d6qejxtdg4y5r3zarvary0c5xw7kxpjzsx'; + const tx = await createTaprootTransaction(taprootData, recipientAddress, 100000); + + // Parse and print transaction details + const decodedTx = bitcoin.Transaction.fromHex(tx); + console.log('\nTransaction Details:'); + console.log('Version:', decodedTx.version); + console.log('Inputs:', decodedTx.ins.length); + console.log('Outputs:', decodedTx.outs.length); + console.log('Transaction Hex:', tx); + + // Print signature information + console.log('\nSignature Details:'); + decodedTx.ins.forEach((input, index) => { + console.log(`Input #${index} Witness:`, input.witness.map(w => w.toString('hex'))); + }); + } catch (error) { + console.error('Main Error:', error); + } +} + +main().catch(console.error); diff --git a/BTC/Advanced/Taproot/example/package.json b/BTC/Advanced/Taproot/example/package.json new file mode 100644 index 000000000..9798077c0 --- /dev/null +++ b/BTC/Advanced/Taproot/example/package.json @@ -0,0 +1,20 @@ +{ + "name": "example", + "version": "1.0.0", + "description": "", + "main": "index.js", + "engines": { + "node": ">=20.0.0" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "@bitcoinerlab/secp256k1": "^1.2.0", + "bitcoinjs-lib": "^6.1.5", + "ecpair": "^3.0.0" + } +} diff --git a/BTC/Application/ARC-20/README.md b/BTC/Application/ARC-20/README.md new file mode 100644 index 000000000..9efa14408 --- /dev/null +++ b/BTC/Application/ARC-20/README.md @@ -0,0 +1,75 @@ +# ARC-20 简介 +## Atomical +Atomicals 协议是一种简单而灵活的协议,用于为比特币等未花费的交易输出 (UTXO) 区块链铸造、传输和更新数字对象 (传统上称为不可替代代币)。原子(或“原子”)是一种组织数字对象的创建、传输和更新的方式——它本质上是根据一些简单规则定义的数字所有权链。 +### Atomicals 与其他流行的不可替代代币 (NFT) 协议进行比较。 +| 功能 | Atomicals | Ordinals | Ethereum ERC721 | +|---------------------|------------------------------------------------|--------------------------------------------------|--------------------------------------------| +| 价值主张 | 数字对象、数字工件、数字收藏品 | 数字对象、数字工件、数字收藏品 | 数字对象、数字工件、数字收藏品 | +| 区块链 | 比特币及所有 UTXO 区块链 | 比特币及所有 UTXO 区块链 | 兼容以太坊 EVM 的区块链 | +| 铸币技术 | 比特币:提交和显示,使用 "atom" 封套 | 比特币:提交和显示,使用 "ord" 封套 | 资金和部署合约账户 | +| 数据存储 | 在铸造时存储一个或多个文件 | 在铸造时仅存储一个文件 | 未定义 | +| 动态状态 | 定义和更新基本和任何复杂文件类型的应用状态 | 未定义 - 可以基于应用特定来定义 | 未定义 - 可以预先编程 | +| 验证 | 目前通过索引服务 "electrumx" 验证 - 理论上可以客户端全部验证 | 目前通过索引服务 "ord" 验证 - 理论上可以客户端全部验证 | 信任以太坊 EVM 节点或实际上信任 Metamask 或 Infura | +| 索引 | 目前依赖于 elecrumx atomicals 索引器 (Python) 进行追踪序号系统 | 目前依赖于 ord 索引器 (Rust) 进行追踪序号系统 | 使用原生以太坊 EVM 节点或实际上信任 Metamask 或 Infura | +| 地址格式 | 铸造和更新需要 P2TR (Taproot) 地址 | 所有使用如铸造和转移都需要 P2TR (Taproot) 地址 | 使用原生以太坊账户地址 | +| 集合 | 首次的 "容器" NFT 用于更新集合,可以永久封闭 | 未定义但正在进展中的父子关系 | 定义为单独的 ERC | +| 原子交换 | 部分签名比特币交易 (PBSTs) | 部分签名比特币交易 (PBSTs) | 定义为单独的 ERC | +| 可替代代币 | 首次 "ARC20" 使用 Satoshi 作为计量单位。去中心化和直接铸造模式可用。内置 Ticker 名称服务 | 基本协议中未提供。"BRC20" 通过铸造在铭文中创建 JSON 协议来定义去中心化铸造规则和 Ticker 名称。 | 定义为 ERC20 类型代币 | +| 域名服务 | Realms 作为首次的 NFT,代表域名和数字身份。一种新的无域名后缀的命名标准,以加号 "+" 开头,如 +username | 基本协议中未提供。".names" 和 ".sats" 协议作为铭文中的 JSON 协议存在,定义声明和更新规则。 | 现有服务如 ENS 和 Unstoppable Domains | + + + +## ARC-20 +Atomicals 协议解决了如何在比特币区块链上表示任意可替代代币资产的长期存在的问题。ARC-20 可替代代币标准最终为比特币带来了彩色硬币,并使用每个 Satoshi 来代表已部署代币的所有权单位。这意味着每个单位的代币永远由 1 聪支持。它充当一种支撑代币价值的“数字黄金含量”。这也意味着根据定义,每个代币的价值永远不会低于 1 聪。 + +ARC-20 使用原生 Satoshi 单位来表示每个代币,它们可以像普通比特币一样拆分和组合。ARC-20 代币可以由任何人铸造,并转移到任何比特币地址类型,并可与支持 UTXO 选择的钱包配合使用,例如 Sparrow Wallet (外部链接)。有两种部署模式:直接部署和分散部署。下面详细了解 ARC-20 的不同铸造方式及其优点。 +![dune](./images/atomical.png) +据 Dune 链上数据统计,截止2023 年 3 月 6 日, 巅峰期 Atomical 交易占比超过铭文市场交易的六成之多,是继Ordinal之外BTC生态采用度最高的协议。 + +## 协议详情 +Atomicals 协议使用原子交换的方案进行 Atomical 的铸造,并在交易输出环节融入了 Commit-Reveal 方案,以此来确保用户铸造 Atomical 过程的不可篡改性和隐私性。此外,它还在铸造过程中添加了唯一标识符来为 Atomical 的安全性和可追溯性提供保障。 + +### Deploy +去中心化部署是通过ticker、每铸币奖励、允许的总铸币数、起始块高度和元数据来初始化的 + +| 参数名 | 描述 | +|-------------|------------------------------------------------------| +| tick | 全局唯一的代币名称(ticker name) | +| per_mint_amt| 每次成功铸造时授予的代币数量。以 Satoshi 为单位。 | +| mint_count | 在额度耗尽之前允许的铸造总次数,达到后将成为“完全铸造”状态。 | +| start_height| 可以开始铸造的起始区块高度。可以设置为 0 或任何未来的区块高度。 | +| image | 代表代币的图像图标。文件名将出现在代币中。在引入文件时使用 "image.jpg" 或 "image.png" 并请谨慎重命名。| + + +### Mint +```js +npm run cli mint-dft + +Optional flags: +--satsbyte= +``` +去中心化的铸币功能mint-dft允许从start_height区块高度开始铸造tick + +所需参数: + +tick:全全局唯一的代币名称(ticker name) + +可选标志: + +--satsbyte=<数字> + +设置交易的每字节聪并覆盖默认值,用来加速 + +### Transform + +ARC20 代币传输的正常操作是所有输入值的总和应完全或干净地分配到可用输出中。如果没有足够的输出值,或者后续输出之一会导致过度分配(即:代币单位的通货膨胀),则剩余余额将被永久销毁或烧毁。 + +#### 完全分配 +使用 FIFO 规则将所有输入干净地分配给输出。 +原子 1932、7920、0542 是不可替代代币 (NFT),按先进先出顺序分配,同时跳过不可花费的输出 (OP_RETURN)。第一个输入 NFT 从输出 0 开始分配,然后每个后续 NFT 输入分配给下一个可用输出。同一 UTXO 输入中的多个 Atomical 按atomical_id 排序。由于“1932”在“7920”之前,因此它排在第一位。 +![alt text](./images/transfer1.png) + +#### 未完全分配 +在无法完全(或“干净”)分配输出的情况下,算法会尝试从输出 0 开始分配所有 ARC20 令牌,无论是否已分配另一个 ARC20。做出这一决定是为了在开发人员或钱包意外未能跟踪多个输入 ARC20 的情况下给予宽大处理 - 换句话说,将“尽最大努力”尝试进行补偿和分配。 +原子 1932、7920、0542 是不可替代代币 (NFT),按先进先出顺序分配,同时跳过不可花费的输出 (OP_RETURN)。如果它们无法“干净地分配”,如上面的示例中,第 5 个输出有 700 个单位(这对于 Atomical 0542 的 620 值来说太多了),则算法默认为“尽力而为”,从输出开始分配所有 ARC20 0。 +![alt text](./images/transfer2.png) \ No newline at end of file diff --git a/BTC/Application/ARC-20/images/atomical.png b/BTC/Application/ARC-20/images/atomical.png new file mode 100644 index 000000000..2386fc910 Binary files /dev/null and b/BTC/Application/ARC-20/images/atomical.png differ diff --git a/BTC/Application/ARC-20/images/transfer1.png b/BTC/Application/ARC-20/images/transfer1.png new file mode 100644 index 000000000..63d8da6c2 Binary files /dev/null and b/BTC/Application/ARC-20/images/transfer1.png differ diff --git a/BTC/Application/ARC-20/images/transfer2.png b/BTC/Application/ARC-20/images/transfer2.png new file mode 100644 index 000000000..7702330b8 Binary files /dev/null and b/BTC/Application/ARC-20/images/transfer2.png differ diff --git a/BTC/Application/BRC-20/README.md b/BTC/Application/BRC-20/README.md new file mode 100644 index 000000000..b5aa9e7ad --- /dev/null +++ b/BTC/Application/BRC-20/README.md @@ -0,0 +1,43 @@ +# BRC-20 简介 +## Ordinals +Ordinals是Satoshi比特币的最小单位,同下文聪)的一种编号方案,允许跟踪和传输单个聪。这些数字称为序数。聪按照开采的顺序进行编号,并以先进先出的方式从交易输入转移到交易输出。编号方案和转移方案都依赖于 order,编号方案取决于开采聪的顺序,转移方案取决于交易输入和输出的顺序。Ordinals协议允许在比特币的单个聪上“铸造”或附加数据(称为铭文),这意味着每个聪可以成为一个独特的、非同质化的资产。同时基于聪上携带的铭文我们可以发行同质化资产和非同质资产类似于以太坊上的ERC20和NFT,而 BRC-20 就是 Ordinals 协议知名度最高的资产发行方案。 + +## BRC-20 +2023 年 3 月 11 日,domo在Twitter上发起了一项实验,该实验基于Ordinal协议,并定义了一种新的Token标准:“BRC-20”。这个实验性的协议专注于在比特币网络上资产的铸造和转移,意外地打开了潘多拉魔盒,激发了人们多年来对于在比特币网络上发行资产的强烈兴趣。 +![dune](./images/dune.jpg) +据 Dune 链上数据统计,截止2023 年 12 月 3 日, 巅峰期 BRC-20 交易占比超过比特币网络交易的六成之多,是迄今为止BTC生态采用度最高的协议。Ordinal和BRC-20协议从技术层面来说并不是一个优秀的技术,但其是去掉智能合约的资产发行足够简单以及Fair Mint的特点,让用户更加容易参与进来。 +这次实验不仅点燃了市场的热情,还引发了一场广泛的“铭文潮流”,也就是在比特币网络上铸造和交易各种Token的潮流。接着,类似于BRC-20的铭文协议如雨后春笋般涌现,不仅在比特币网络上蓬勃发展,还迅速扩散到其他公链平台。这次实验中的一种Token——ordi,已经取得了显著的市场成就。截至目前,ordi的市值已经超过了10亿美元,成为了加密资产市场中的一颗新星,稳居市值排行榜前50位。这个成就不仅证明了BRC-20和类似协议的潜力,也显示了区块链技术在资产Token化领域的巨大应用前景。 +总的来说,domo的这次实验不仅是一个技术上的突破,也是一个市场和社区层面的重大事件。它不仅为比特币网络上的资产发行开辟了新天地,还为整个加密资产生态系统的发展注入了新的活力和创新。 +![brc20-experiment](./images/brc20-experiment.jpg) + +## 协议详情 +### Deploy +```js +{"p":"brc-20","op":"deploy","tick":"ordi","max":"21000000","lim":"1000"} +``` +| Key | Required? | Description | +|------|-----------|-----------------------------------------------------------------------------------------------| +| p | Yes | Protocol: Helps other systems identify and process BRC-20 events | +| op | Yes | Operation: Type of event (Deploy, Mint, Transfer) | +| tick | Yes | Ticker: 4 letter identifier of the BRC-20 | +| max | Yes | Max supply: set max supply of the BRC-20 | +| lim | No | Mint limit: If letting users mint to themselves, limit per ordinal (unisat not validate) | +| dec | No | Decimals: set decimal precision, default to 18 | + +### Mint +```js +{"p":"brc-20","op":"mint","tick":"ordi","amt":"100000"} +``` +| Key | Required? | Description | +|------|-----------|-------------------------------------------------------------------| +| p | Yes | Protocol: Helps other systems identify and process brc-20 events | +| op | Yes | Operation: Type of event (Deploy, Mint, Transfer) | +| tick | Yes | Ticker: 4 letter identifier of the brc-20 | +| amt | Yes | Amount to mint: States the amount of the brc-20 to mint. Has to be less than "lim" above if stated | + +### Transform +- 铸造transfer铭文 +```js +{"p":"brc-20","op":"transfer","tick":"ordi","amt":"10"} +``` +- 将transfer铭文通过PSBT的方法转移给receiver \ No newline at end of file diff --git a/BTC/Application/BRC-20/images/brc20-experiment.jpg b/BTC/Application/BRC-20/images/brc20-experiment.jpg new file mode 100644 index 000000000..d93b85739 Binary files /dev/null and b/BTC/Application/BRC-20/images/brc20-experiment.jpg differ diff --git a/BTC/Application/BRC-20/images/dune.jpg b/BTC/Application/BRC-20/images/dune.jpg new file mode 100644 index 000000000..b3717ba9f Binary files /dev/null and b/BTC/Application/BRC-20/images/dune.jpg differ diff --git a/BTC/Application/Runes/README.md b/BTC/Application/Runes/README.md new file mode 100644 index 000000000..a95c6e61e --- /dev/null +++ b/BTC/Application/Runes/README.md @@ -0,0 +1,104 @@ +# 背景 +## Ordinals +Ordinals 最早由 Casey (@rodarmor) 在2022年12月发布,该协议允许在比特币的最小单位聪上铭刻数据,包含文本、图片、音频、视频等数据信息,进而把NFT引入到比特币生态。而我们一直说的比特币铭文也是一段通过采用Ordinals 协议铭刻(Inscribe)在聪(Satoshis)上的元数据。 + +## BRC-20 +BRC-20 是由匿名开发者 @domodata 于2023年3月8日推出,是基于刚介绍的 Ordinals协议推出的协议。该协议通过将代币的名称、数量等信息用特定的 JSON 格式写入聪(Satoshi)中以实现代币的部署Deploy、铸造Mint和转账Transfer的功能。仿照以太坊 ERC-20 代币标准使用 BRC-20 命名,相当于基于 Ordinals 协议的代币发行协议。详细介绍参考 [BRC-20 协议](../BRC-20/README.md)。 + +## Runes +2023年9月1日 Casey 公开反对BRC20协议,并希望可以停止铸造 BRC-20。在9月26日,Casey Rodarmor 重新开发了一个名为 Runes 的协议作为 BRC-20 的替代品。该协议是一个基于 UTXO 的、能使比特币使用者具有使用良好体验的可替代代币协议。Casey 认为改良过后,能够降低制造大量垃圾 UTXO 现象的符文,是比先前实验性的 BRC-20 协议更好、更轻量简洁的资产发行方案。至少目前 BRC -20 的流行已经创造了大量的“垃圾”UTXO 。 + + +# Runes协议介绍 +符文协议允许比特币交易蚀刻、铸造和转移比特币原生数字商品。 + +## 符文石(RuneStone) +> 符文协议消息,称为符文石,存储在比特币交易输出中。 在区块 840,000(比特币第四次减半) 上激活, 早期区块中的符文石将被忽略。 + +符文石输出的脚本以`OP_RETURN`开头,然后是 `OP_13`,最后是零个或多个数据推送。这些推送的数据被串联起来并解码为128位整数序列,最后解析为符石,相关编解码逻辑见[ULEB128](./ULEB128.md)。 +一笔交易最多可以拥有一颗符文石。符文石可以蚀刻一个新的符文或者铸造一个现有的符文,并将符文从交易的输入传输到其输出。 +```js +struct Runestone { + edicts: Vec, + etching: Option, + mint: Option, + pointer: Option, +} +``` +- `edicts`:标识符文的转移信息,用于符文转账。 +- `etching`:标识符文的蚀刻信息,通过蚀刻创建新符文。 +- `mint`:存储符文 ID,用于符文铸造。 +- `pointer`:标识未分配的符文的默认转移位置,不设置则将剩余的未分配符文将转移到交易的第一个非OP_RETURN输出。 + +### 符文(Rune) +符文由 ID 标识,ID 包含蚀刻符文的区块以及该区块内蚀刻交易的索引,以文本形式表示为BLOCK:TX。例如,第 500 个区块的第 20 笔交易中铸造的符文 ID 为500:20。 + +### 蚀刻(Etching) +符文石中包含的蚀刻信息用于创建新符文 +```js +struct Etching { + divisibility: Option, + premine: Option, + rune: Option, + spacers: Option, + symbol: Option, + terms: Option, +} + +struct Rune(u128); + +struct Terms { + amount: Option, + cap: Option, + height: (Option, Option), + offset: (Option, Option), +} +``` +- `divisibility`:符文精度,标识符文数量中小数点后允许的位数。 +- `premine`:为自己分配被蚀刻的符文数量,用于预挖。 +- `rune`:符文名称,由字母 A 到 Z 组成,例如UNCOMMONGOODS。 +- `spacers`:符文分隔符,位域的第 N 个字段(从最低有效位开始)确定是否应在从符文名称左侧开始的第 N 个和第 N+1 个字符之间显示间隔符,举例如下 + +| Spacers | Display | +|---------|----------| +| 0b1 | A•AAA | +| 0b11 | A•A•AA | +| 0b10 | AA•AA | +| 0b111 | A•A•A•A | + +- `symbol`:符文货币符号的 Unicode 代码点,显示在该符文的金额之后。如果符文没有货币符号,¤则应使用通用货币字符。 +- `terms`:符文条款,铸币时需要满足的条件。 + - `amount`: 每个铸币交易收到的符文数量 + - `cap`: 允许的铸造次数 + - `height`: 铸造的起始和结束绝对区块高度 + - `offset`: 相对于符文被蚀刻的块的起始和结束块高度 + +### 铸造 +符文石中包含的mint信息用于铸造符文,铸币数量将添加到交易输入中未分配的符文中。这些符文可以使用Edict进行转移,否则将转移到第一个非OP_RETURN输出或由字段指定的输出Pointer。 + +### 转账 +符文石中包含的edict信息用于转移符文,符文石可以包含任意数量的法令,这些edict是按顺序处理的。 +```js +struct Edict { + id: RuneId, + amount: u128, + output: u32, +} +``` +- id:符文id。 +- amount:符文转移数量。 +- output:符文输出位置,对应vout的下标。 + +转移规则: +1. 优先处理符文石的edict,将输入中对应的符文转移到输出的output位置的UTXO上 +2. 如果有剩余的符文则会均匀分配到输出上 +3. 如果未分配的符文数量不能被非OP_RETURN输出的数量整除,多余的符文会分配给第一个非OP_RETURN的输出 + +如果符石中的任何edict的符文ID的block=0且tx>0,或者output大于交易输出的数量,则该符石是纪念碑。纪念碑中的法令不会被处理,所有输入的符文都会被烧毁。 + +## 纪念碑(Cenotaphs) +符石可能因多种原因而格式错误,包括符石中的非推送数据操作码OP_RETURN、无效的变体或无法识别的符石字段。畸形的符文石被称为**纪念碑**。 + +输入到纪念碑交易中的符文会被烧毁。在带有纪念碑的交易中蚀刻的符文被设置为不可铸造。带有纪念碑的交易中的铸币计入铸币上限,但铸造的符文会被烧毁。 + +纪念碑是一种升级机制,允许符文被赋予新的语义,从而改变符文的创建和传输方式,同时不会误导未升级的客户端这些符文的位置,因为未升级的客户端会看到这些符文已被烧毁。 \ No newline at end of file diff --git a/BTC/Application/Runes/ULEB128.md b/BTC/Application/Runes/ULEB128.md new file mode 100644 index 000000000..745c87556 --- /dev/null +++ b/BTC/Application/Runes/ULEB128.md @@ -0,0 +1,247 @@ +# 简介 + +ULEB128(Unsigned Little Endian Base 128)是一种编码方式,设计用于高效地表示无符号整数,尤其是在计算机科学和编程中。它采用变长编码方式,旨在减少存储和传输数据时的开销。 + +# 示例 + +## ULEB128 编码 + +ULEB128编码将无符号整数编码为一系列字节,其中每个字节除了最后一个字节外,最高位都被设置为1,表示还有更多的字节。 +整数从其最低有效位到最高有效位进行编码,逐字节处理,每次处理7位。处理的过程中,将7位数据放入字节的低7位,若还有更多数据待处理,则设置高位为1,否则设置为0。这种编码方式保证了较小的数值占用较少的空间。 +** 举例 ** +假设要编码整数 300(二进制表示为 10, 0101100): + +- 第一个字节中,低7位为 0101100(十进制的 44),最高位设置为 1(表示还有数据),因此第一个字节为 10101100。 +- 第二个字节仅包含剩余的 10,放在最低位,其余位填充为0,最高位为 0(表示这是最后一个字节),因此第二个字节为 00000010。 +- 最终编码为 0xD4 0x02。 + +## ULEB128 解码 + +ULEB128 解码需要观察每个字节的最高位(也称为继续位),在 ULEB128 编码中,每个字节的最高位(第8位)用于指示是否还有更多的字节需要读取。 + +- 如果这一位是 1,表示后续还有至少一个字节是这个数的一部分。 +- 如果这一位是 0,则表示这是最后一个字节。 + ** 举例 ** + 假设要解码十六进制 **cfa433** +- 第一个字节 cf(二进制:11001111),数据位:1001111(二进制),十进制值为 79。 +- 第二个字节 a4(二进制:10100100),数据位:0100100(二进制),十进制值为 36。 +- 第三个字节 33(二进制:00110011),数据位:0110011(二进制),十进制值为 51。 + +相加得到 79 + 36 _ 128 + 51 _ 128^2 = 840271 + +## 在Runes中应用 + +## 蚀刻 + +### 数据结构 + +```js +type Etching = { + divisibility?: U8; + premine?: U128; + rune?: Rune; + spacers?: U32; + symbol?: Symbol; + terms?: Terms; +}; + +type Rune = u128; + +type Terms = { + amount?: U128; + cap?: U128; + height?: { + start?: U64; + end?: U64; + }; + offset?: { + start?: U64; + end?: U64; + }; +}; +``` + +### 示例 + +| DOG•GO•TO•THE•MOON 蚀刻交易 +https://mempool.space/zh/tx/e79134080a83fe3e0e06ed6990c5a9b63b362313341745707a2bff7d788a1375 + +**1. Raw OP_RETURN** + +```js +OP_RETURN +OP_PUSHNUM_13 +OP_PUSHBYTES_33 02010487a1c3f0c0ebf7fb9d01010503d4040595e80706808084fea6dee1111601 +``` + +**2. ULEB128解码** + +```js +[ + { decimal: 2n, hex: '02' }, + { decimal: 1n, hex: '01' }, + { decimal: 4n, hex: '04' }, + { decimal: 11382812169668186247n, hex: '87a1c3f0c0ebf7fb9d01' }, + { decimal: 1n, hex: '01' }, + { decimal: 5n, hex: '05' }, + { decimal: 3n, hex: '03' }, + { decimal: 596n, hex: 'd404' }, + { decimal: 5n, hex: '05' }, + { decimal: 128021n, hex: '95e807' }, + { decimal: 6n, hex: '06' }, + { decimal: 10000000000000000n, hex: '808084fea6dee111' }, + { decimal: 22n, hex: '16' }, + { decimal: 1n, hex: '01' }, +]; +``` + +**3. 对照码表翻译** + +```js +{ + "edicts": [], + "etching": { + "divisibility": "5", + "premine": "10000000000000000", + "rune": "11382812169668186247", + "spacers": "596", + "symbol": "128021", + "turbo": false, + "terms": null + }, + "mint": null, + "pointer": "1", + "flags": "1", +} +``` + +## 铸造 + +### 数据结构 + +```js +type Mint = { + block: U64; + tx: U32; +} +``` + +### 示例 + +| GOLD•RUNE•STONE 铸造交易 +https://mempool.space/zh/tx/b4da683f34fa2a159f887012a67a14e56dbbf8e38e2da991be45869413544e0b + +**1. Raw OP_RETURN** + +```js +OP_RETURN +OP_PUSHNUM_13 +OP_PUSHBYTES_16 14cfa43314b80400cfa433b804e80700 +``` + +**2. ULEB128解码** + +```js +[ + { decimal: 20n, hex: '14' }, + { decimal: 840271n, hex: 'cfa433' }, + { decimal: 20n, hex: '14' }, + { decimal: 568n, hex: 'b804' }, + { decimal: 0n, hex: '00' }, + { decimal: 840271n, hex: 'cfa433' }, + { decimal: 568n, hex: 'b804' }, + { decimal: 1000n, hex: 'e807' }, + { decimal: 0n, hex: '00' }, +]; +``` + +**3. 对照码表翻译** + +```js +{ + "edicts": [ + { + "id": { + "block": "840271", + "tx": "568" + }, + "amount": "1000", + "output": "0" + } + ], + "etching": null, + "mint": { + "block": "840271", + "tx": "568" + }, + "pointer": null +} +``` + +## 转账 + +### 数据结构 + +```js +type Mint = { + block: U64; + tx: U32; +} +``` + +### 示例 + +| DOG•GO•TO•THE•MOON 转移交易 +https://mempool.space/zh/tx/966aff320562acd491458bded8fc9010590285aa3abd4801fe06192c242544ee + +**1. Raw OP_RETURN** + +```js +OP_RETURN +OP_PUSHNUM_13 +OP_PUSHBYTES_21 160b00c0a2330380ea8ed51f0b00008094ebdc030d +``` + +**2. ULEB128解码** + +```js +[ + { decimal: 22n, hex: '16' }, + { decimal: 11n, hex: '0b' }, + { decimal: 0n, hex: '00' }, + { decimal: 840000n, hex: 'c0a233' }, + { decimal: 3n, hex: '03' }, + { decimal: 8500000000n, hex: '80ea8ed51f' }, + { decimal: 11n, hex: '0b' }, + { decimal: 0n, hex: '00' }, + { decimal: 0n, hex: '00' }, + { decimal: 1000000000n, hex: '8094ebdc03' }, + { decimal: 13n, hex: '0d' }, +]; +``` + +**3. 对照码表翻译** + +```js +{ + "edicts": [ + { + "id": { + "block": "840000", + "tx": "3" + }, + "amount": "8500000000", + "output": "11" + }, + { + "id": { + "block": "840000", + "tx": "3" + }, + "amount": "1000000000", + "output": "13" + } + ], + "pointer": "11" +} +``` diff --git a/BTC/Basic/SegWit/README.md b/BTC/Basic/SegWit/README.md new file mode 100644 index 000000000..bf5464c4a --- /dev/null +++ b/BTC/Basic/SegWit/README.md @@ -0,0 +1,331 @@ +# 隔离见证 (SegWit) + +## 什么是隔离见证? + +隔离见证(Segregated Witness,简称SegWit)是比特币协议的一项重大升级,于2017年8月通过软分叉方式激活。这项技术通过将交易的签名数据(见证数据)与交易数据分离,解决了比特币网络中的一些关键问题,并为未来的扩展性改进奠定了基础。 + +隔离见证的名称直接反映了其核心概念:将交易的"见证"(witness,即签名数据)从交易的主要部分"隔离"(segregate)出来。这种结构上的变化不仅解决了技术问题,还为比特币网络带来了显著的性能和安全性提升。 + +## 隔离见证的工作原理 + +### 传统交易结构的问题 + +在SegWit之前,比特币交易的结构将交易数据和签名数据(见证数据)存储在同一区块内。这种设计存在几个问题: + +1. **交易延展性**:交易ID(txid)是根据整个交易数据(包括签名)计算的。由于签名数据可以在不改变交易有效性的情况下被修改,这就导致了交易ID可能在交易被确认前发生变化,称为"交易延展性"问题。 + +2. **区块空间效率低**:签名数据通常占据交易大小的很大一部分,但对于验证交易历史并不总是必需的。 + +### SegWit的解决方案 + +SegWit通过以下方式解决这些问题: + +1. **分离见证数据**:将签名数据(见证数据)从交易的主要部分移出,存储在交易结构的单独部分。 + +2. **新的交易ID计算方式**:引入了一个新的交易ID计算方式(wtxid),同时保留了向后兼容的txid计算方式。新的txid不包含签名数据,因此消除了交易延展性问题。 + +3. **区块权重计算**:引入了一个新的"区块权重"概念,使得见证数据在计算区块大小时的权重较低,从而有效增加了每个区块可以包含的交易数量。 + +## SegWit的主要优势 + +### 1. 解决交易延展性 + +通过将签名数据从交易ID计算中分离出来,SegWit彻底解决了交易延展性问题。这对于构建依赖于未确认交易的复杂交易链(如闪电网络)至关重要。 + +### 2. 增加区块容量 + +SegWit通过引入区块权重概念,使得每个区块可以包含更多的交易。理论上,SegWit可以将区块容量提高到约2.1MB到4MB,而不需要增加传统的1MB区块大小限制。 + +### 3. 降低交易费用 + +由于每个区块可以包含更多交易,网络拥堵情况得到缓解,从而降低了交易费用。使用SegWit地址的交易通常比传统地址的交易费用更低。 + +### 4. 为二层解决方案铺平道路 + +SegWit的实施为闪电网络等二层扩展解决方案的开发和部署创造了条件,这些解决方案可以显著提高比特币的交易吞吐量和用户体验。 + +### 5. 脚本版本控制 + +SegWit引入了脚本版本控制机制,使得未来可以更容易地引入新的脚本功能,如Taproot等高级功能。 + +## SegWit地址类型 + +SegWit引入了两种主要的地址类型: + +### 1. P2SH-P2WPKH(兼容地址) + +这种地址以"3"开头,与传统的P2SH地址外观相同。它是一种过渡性解决方案,允许旧钱包向SegWit地址发送交易,同时享受SegWit的部分好处。 + +### 2. P2WPKH(原生SegWit地址) + +这种地址以"bc1q"开头,使用Bech32编码格式。原生SegWit地址提供了SegWit的全部好处,包括更低的交易费用和更好的安全性。 + +## SegWit的采用情况 + +自2017年激活以来,SegWit的采用率稳步增长。截至2023年,超过80%的比特币交易使用了SegWit,这显著提高了网络的整体效率和容量。 + +### 采用率数据 + +| 年份 | 采用率 | +|------|--------| +| 2017 | ~10% | +| 2018 | ~30% | +| 2019 | ~50% | +| 2020 | ~65% | +| 2021 | ~75% | +| 2022 | ~80% | +| 2023 | ~85% | + +### 按地址类型分布 + +当前比特币网络中的地址类型分布大致如下: + +- 原生SegWit地址 (P2WPKH/P2WSH): ~45% +- 兼容SegWit地址 (P2SH-P2WPKH): ~15% +- Taproot地址 (P2TR): ~25% +- 传统地址 (P2PKH/P2SH): ~15% + +这一趋势表明,比特币生态系统正在逐步迁移到更高效的地址类型,特别是随着Taproot的激活,更多用户开始采用这一基于SegWit v1的新技术。 + +### 性能数据对比 + +不同地址类型的交易大小和费用对比(假设费率为10聪/字节): + +| 交易类型 | 传统地址 (P2PKH) | 兼容SegWit (P2SH-P2WPKH) | 原生SegWit (P2WPKH) | Taproot (P2TR) | +|---------|-----------------|------------------------|-------------------|----------------| +| 1输入1输出 | 192字节 / 1,920聪 | 132字节 / 1,320聪 | 109字节 / 1,090聪 | 98字节 / 980聪 | +| 2输入2输出 | 374字节 / 3,740聪 | 254字节 / 2,540聪 | 208字节 / 2,080聪 | 186字节 / 1,860聪 | + +这些数据显示,与传统地址相比: +- 原生SegWit地址可节省约45%的交易费用 +- 兼容SegWit地址可节省约30%的交易费用 +- Taproot地址可节省约50%的交易费用 + +### 区块容量提升 + +- 传统区块:最大1MB,约容纳2,000笔交易 +- SegWit区块:最大可达4MB,约容纳4,000-8,000笔交易 + +这种容量提升使得比特币网络的吞吐量从传统的3-7 TPS (每秒交易数) 提高到了7-14 TPS。 + +## SegWit的技术实现细节 + +### 交易序列化格式 + +SegWit引入了一种新的交易序列化格式,这是理解其工作原理的关键。下面比较传统交易和SegWit交易的序列化格式: + +#### 传统交易格式 +``` +[4字节] 版本 +[变长] 输入数量 +[输入列表] 每个输入包含: + [32字节] 上一笔交易ID + [4字节] 输出索引 + [变长] 脚本长度 + [变长] 脚本(包含签名数据) + [4字节] 序列号 +[变长] 输出数量 +[输出列表] 每个输出包含: + [8字节] 金额 + [变长] 脚本长度 + [变长] 脚本 +[4字节] 锁定时间 +``` + +#### SegWit交易格式 +``` +[4字节] 版本 +[1字节] 标记 (0x00) +[1字节] 标志 (0x01) +[变长] 输入数量 +[输入列表] 每个输入包含: + [32字节] 上一笔交易ID + [4字节] 输出索引 + [变长] 脚本长度 + [变长] 脚本(不包含签名数据) + [4字节] 序列号 +[变长] 输出数量 +[输出列表] 每个输出包含: + [8字节] 金额 + [变长] 脚本长度 + [变长] 脚本 +[见证数据] 每个输入的见证数据: + [变长] 见证数据项数量 + [变长] 见证数据(签名、公钥等) +[4字节] 锁定时间 +``` + +关键区别: +1. SegWit交易添加了标记(0x00)和标志(0x01)字节 +2. 签名数据从输入脚本移到了交易末尾的见证数据部分 +3. 交易ID计算不包括见证数据,解决了交易延展性问题 + +### 区块权重计算 + +SegWit引入了"区块权重 + +3. **HTLC实现**:闪电网络中的哈希时间锁定合约(HTLC)依赖于SegWit提供的脚本版本控制功能,使得复杂的条件支付成为可能。 + +4. **通道关闭效率**:当闪电网络通道关闭时,最终结算交易会广播到比特币区块链。使用SegWit可以降低这些交易的费用,提高结算效率。 + +### 实际应用示例 + +本示例代码中的`createLightningChannelFundingTx`函数展示了如何创建一个与闪电网络兼容的通道资金交易,这是建立闪电网络通道的第一步。 + +## 代码示例:创建SegWit地址和交易 + +代码示例文件:[example.js](./example.js) 和 [example-extended.js](./example-extended.js) + +这些示例文件包含以下功能: + +### 基础功能 + +1. **创建不同类型的SegWit地址**: + - P2WPKH(原生SegWit)地址 - 以bc1q开头 + - P2SH-P2WPKH(兼容SegWit)地址 - 以3开头 + - P2WSH(原生SegWit脚本哈希)地址 + +2. **构建SegWit交易**: + - 支持原生SegWit和兼容SegWit交易 + - 处理输入、输出和找零 + +3. **计算SegWit交易ID**: + - 计算传统txid(不包含见证数据) + - 计算wtxid(包含见证数据) + +4. **估算SegWit交易的大小和费用**: + - 根据输入输出数量和地址类型估算交易大小 + - 计算建议的交易费用 + +5. **验证SegWit地址**: + - 检查地址是否为有效的SegWit地址 + - 识别地址类型(原生SegWit、兼容SegWit或传统地址) + +### 高级功能 + +6. **批量生成SegWit地址**: + - 一次性生成多个SegWit地址 + - 支持不同类型的SegWit地址批量生成 + +7. **批量处理SegWit交易**: + - 处理多个输入和输出 + - 自动计算交易费用和找零 + +8. **创建SegWit多签名地址**: + - 支持m-of-n多签名方案 + - 支持原生P2WSH和兼容P2SH-P2WSH多签名地址 + +9. **创建闪电网络通道资金交易**: + - 创建与闪电网络兼容的2-of-2多签名SegWit地址 + - 构建通道资金交易 + +要使用这些示例,您需要安装bitcoinjs-lib库: + +```bash +npm install bitcoinjs-lib +``` + +## SegWit的最佳实践 + +### 地址选择 + +1. **优先使用原生SegWit地址(bc1开头)**: + - 提供最低的交易费用 + - 最佳的安全性和性能 + - 适用于支持Bech32地址格式的现代钱包和交易所 + +2. **兼容性考虑**: + - 如果需要与旧钱包或服务兼容,可以使用P2SH-P2WPKH地址(3开头) + - 虽然费用优势略低于原生SegWit,但仍优于传统地址 + +3. **多签名场景**: + - 对于多签名钱包,P2WSH(原生)或P2SH-P2WSH(兼容)提供了更高的安全性和更低的费用 + - 复杂脚本应优先考虑SegWit版本,以获得费用优势 + +### 交易构建 + +1. **费用估算**: + - 使用`estimateSegWitTransactionFee`函数准确估算交易费用 + - SegWit交易的费用计算与传统交易不同,正确估算可避免支付过高费用 + +2. **批量处理**: + - 当需要处理多个交易时,使用`batchSegWitTransaction`函数可以更有效地管理UTXO + - 批量处理可以优化交易费用和UTXO集合管理 + +3. **与闪电网络集成**: + - 使用`createLightningChannelFundingTx`函数创建与闪电网络兼容的通道资金交易 + - 确保通道资金交易使用正确的多签名脚本格式 + +## 实际应用场景 + +### 1. 交易所集成 + +交易所可以通过实现SegWit来显著降低提款交易的费用,同时提高交易处理速度: + +```javascript +// 交易所批量处理提款示例 +const withdrawals = [ + { address: 'bc1q...', amount: 1000000 }, // 用户A提款 + { address: 'bc1q...', amount: 2500000 }, // 用户B提款 + // 更多提款... +]; + +const tx = batchSegWitTransaction(availableUTXOs, withdrawals, exchangeKeyPair, exchangeChangeAddress, 'p2wpkh'); +// 广播交易... +``` + +### 2. 钱包应用 + +钱包应用可以提供多种地址类型选择,并解释每种类型的优缺点: + +```javascript +// 为用户生成不同类型的地址 +const addressOptions = { + legacy: bitcoin.payments.p2pkh({ pubkey: userKeyPair.publicKey, network }).address, + segwitCompatible: bitcoin.payments.p2sh({ + redeem: bitcoin.payments.p2wpkh({ pubkey: userKeyPair.publicKey, network }), + network + }).address, + segwitNative: bitcoin.payments.p2wpkh({ pubkey: userKeyPair.publicKey, network }).address +}; +``` + +### 3. 多签名钱包 + +企业和组织可以使用SegWit多签名地址来增强资金安全性: + +```javascript +// 创建3-of-5多签名企业钱包 +const corporateWallet = createSegWitMultisigAddress(3, 5, 'p2wsh'); +// 保存地址和赎回脚本信息... +``` + +### 4. 闪电网络节点 + +运行闪电网络节点的用户可以使用SegWit来创建通道资金交易: + +```javascript +// 开设新的闪电网络通道 +const channelFunding = createLightningChannelFundingTx( + selectedUTXO, + localNodePubkey, + remoteNodePubkey, + myChannelAmount, + theirChannelAmount, + myKeyPair, + estimatedFee +); +// 广播资金交易并等待确认... +``` + +## 结论 + +隔离见证是比特币历史上最重要的技术升级之一,它不仅解决了交易延展性等关键问题,还提高了网络的交易容量和效率,同时为闪电网络等创新解决方案铺平了道路。随着越来越多的用户和服务采用SegWit,比特币网络的性能和可用性将继续提高。 + +通过本示例代码,开发者可以轻松实现SegWit的各种功能,从基本的地址生成到复杂的多签名和闪电网络集成。这些工具为构建现代、高效的比特币应用提供了坚实的基础。 + +## 参考资料 + +1. [BIP 141: Segregated Witness](https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki) +2. [BIP 143: Transaction Signature Verification for Version 0 Witness Program](https://github.com/bitcoin/bips/blob/master/bip-0143.mediawiki) +3. [BIP 173: Base32 address format for native v0-16 witness outputs](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) diff --git a/BTC/Basic/SegWit/example-extended.js b/BTC/Basic/SegWit/example-extended.js new file mode 100644 index 000000000..be43ff535 --- /dev/null +++ b/BTC/Basic/SegWit/example-extended.js @@ -0,0 +1,874 @@ +/** + * SegWit (隔离见证) 扩展代码示例 + * + * 本文件包含与比特币隔离见证(SegWit)相关的JavaScript代码示例, + * 使用bitcoinjs-lib库演示如何创建SegWit地址和交易,以及高级功能。 + */ + +const bitcoin = require('bitcoinjs-lib'); +const network = bitcoin.networks.bitcoin; // 主网 + +/** + * 创建不同类型的SegWit地址 + */ +function createSegWitAddresses() { + // 创建密钥对 + const keyPair = bitcoin.ECPair.makeRandom({ network }); + const publicKey = keyPair.publicKey; + + // 1. 创建P2WPKH(原生SegWit)地址 - 以bc1q开头 + const p2wpkh = bitcoin.payments.p2wpkh({ + pubkey: publicKey, + network + }); + + // 2. 创建P2SH-P2WPKH(兼容SegWit)地址 - 以3开头 + const p2sh_p2wpkh = bitcoin.payments.p2sh({ + redeem: bitcoin.payments.p2wpkh({ pubkey: publicKey, network }), + network + }); + + // 3. 创建P2WSH(原生SegWit脚本哈希)地址 + // 创建一个2-of-3多签名赎回脚本 + const pubkeys = [ + bitcoin.ECPair.makeRandom({ network }).publicKey, + bitcoin.ECPair.makeRandom({ network }).publicKey, + bitcoin.ECPair.makeRandom({ network }).publicKey + ]; + + const p2ms = bitcoin.payments.p2ms({ + m: 2, // 需要2个签名 + pubkeys, + network + }); + + const p2wsh = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }); + + return { + privateKey: keyPair.privateKey.toString('hex'), + publicKey: publicKey.toString('hex'), + p2wpkh: { + address: p2wpkh.address, // 原生SegWit地址 + type: 'P2WPKH (Native SegWit)', + witnessProgram: p2wpkh.output.toString('hex') // 见证程序(witness program) + }, + p2sh_p2wpkh: { + address: p2sh_p2wpkh.address, // 兼容SegWit地址 + type: 'P2SH-P2WPKH (Compatible SegWit)', + redeemScript: p2sh_p2wpkh.redeem.output.toString('hex') // 赎回脚本 + }, + p2wsh: { + address: p2wsh.address, // 原生SegWit脚本哈希地址 + type: 'P2WSH (Native SegWit Script Hash)', + witnessScript: p2ms.output.toString('hex') // 见证脚本 + } + }; +} + +/** + * 构建SegWit交易 + * @param {Object} utxo - 未花费交易输出 + * @param {string} toAddress - 接收地址 + * @param {number} amount - 发送金额(聪) + * @param {number} fee - 交易费(聪) + * @param {Object} keyPair - 密钥对 + * @param {string} changeAddress - 找零地址 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh') + * @returns {string} 交易的十六进制表示 + */ +async function createSegWitTransaction(utxo, toAddress, amount, fee, keyPair, changeAddress, addressType = 'p2wpkh') { + const txb = new bitcoin.TransactionBuilder(network); + + // 添加输入(来自SegWit地址的UTXO) + txb.addInput(utxo.txid, utxo.vout); + + // 添加输出 + txb.addOutput(toAddress, amount); + + // 如果有找零,添加找零输出 + const change = utxo.value - amount - fee; + if (change > 0) { + txb.addOutput(changeAddress || utxo.address, change); + } + + // 根据地址类型签名交易 + if (addressType === 'p2wpkh') { + // 原生SegWit地址签名 + txb.sign(0, keyPair, null, null, utxo.value); + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit地址签名 + const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }); + const p2sh = bitcoin.payments.p2sh({ redeem: p2wpkh, network }); + txb.sign(0, keyPair, p2sh.redeem.output, null, utxo.value); + } + + // 构建并返回交易 + const tx = txb.build(); + return tx.toHex(); +} + +/** + * 计算SegWit交易的交易ID + * @param {string} txHex - 交易的十六进制表示 + * @returns {Object} 包含txid和wtxid的对象 + */ +function calculateSegWitTransactionId(txHex) { + const tx = bitcoin.Transaction.fromHex(txHex); + + // 计算传统txid(不包含见证数据) + const txid = tx.getId(); + + // 计算wtxid(包含见证数据) + const wtxid = tx.getHash(true).reverse().toString('hex'); + + return { + txid, + wtxid, + isSame: txid === wtxid + }; +} + +/** + * 估算SegWit交易的大小和费用 + * @param {number} inputCount - 输入数量 + * @param {number} outputCount - 输出数量 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh') + * @param {number} feeRate - 费率(聪/字节) + * @returns {Object} 包含大小和费用的对象 + */ +function estimateSegWitTransactionFee(inputCount, outputCount, addressType = 'p2wpkh', feeRate = 10) { + let txSize = 0; + + // 计算交易大小(近似值) + if (addressType === 'p2wpkh') { + // 原生SegWit (P2WPKH) 交易大小估算 + // 基本交易大小 + 输入大小 + 输出大小 + txSize = 10 + (inputCount * 67.75) + (outputCount * 31); + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit (P2SH-P2WPKH) 交易大小估算 + txSize = 10 + (inputCount * 91) + (outputCount * 31); + } else { + // 传统 (P2PKH) 交易大小估算 + txSize = 10 + (inputCount * 148) + (outputCount * 34); + } + + // 计算费用 + const fee = Math.ceil(txSize * feeRate); + + return { + estimatedSize: txSize, + estimatedFee: fee, + feeRate: feeRate, + // 添加不同地址类型的大小比较 + sizeComparison: { + p2pkh: 10 + (inputCount * 148) + (outputCount * 34), + p2sh_p2wpkh: 10 + (inputCount * 91) + (outputCount * 31), + p2wpkh: 10 + (inputCount * 67.75) + (outputCount * 31), + }, + // 添加不同地址类型的费用比较 + feeComparison: { + p2pkh: Math.ceil((10 + (inputCount * 148) + (outputCount * 34)) * feeRate), + p2sh_p2wpkh: Math.ceil((10 + (inputCount * 91) + (outputCount * 31)) * feeRate), + p2wpkh: Math.ceil((10 + (inputCount * 67.75) + (outputCount * 31)) * feeRate), + }, + // 计算节省的费用百分比 + savingsPercentage: { + p2wpkh_vs_p2pkh: Math.round((1 - ((10 + (inputCount * 67.75) + (outputCount * 31)) / (10 + (inputCount * 148) + (outputCount * 34)))) * 100), + p2sh_p2wpkh_vs_p2pkh: Math.round((1 - ((10 + (inputCount * 91) + (outputCount * 31)) / (10 + (inputCount * 148) + (outputCount * 34)))) * 100) + } + }; +} + +/** + * 验证地址是否为SegWit地址 + * @param {string} address - 比特币地址 + * @returns {Object} 包含验证结果的对象 + */ +function validateSegWitAddress(address) { + try { + // 尝试解析地址 + const result = bitcoin.address.fromBase58Check(address); + + // 检查是否为P2SH地址(可能是P2SH-P2WPKH) + if (result.version === network.scriptHash) { + return { + isValid: true, + type: 'P2SH (可能是P2SH-P2WPKH兼容SegWit)', + isSegWit: 'Compatible' + }; + } + + return { + isValid: true, + type: 'P2PKH (传统地址)', + isSegWit: false + }; + } catch (e) { + // 如果不是Base58地址,尝试Bech32 + try { + const result = bitcoin.address.fromBech32(address); + + if (result.version === 0) { + if (result.data.length === 20) { + return { + isValid: true, + type: 'P2WPKH (原生SegWit)', + isSegWit: 'Native' + }; + } else if (result.data.length === 32) { + return { + isValid: true, + type: 'P2WSH (原生SegWit脚本哈希)', + isSegWit: 'Native' + }; + } + } else if (result.version === 1) { + return { + isValid: true, + type: 'P2TR (Taproot)', + isSegWit: 'v1' + }; + } + + return { + isValid: true, + type: '未知的Bech32地址', + isSegWit: 'Unknown' + }; + } catch (e) { + return { + isValid: false, + type: '无效地址', + isSegWit: false + }; + } + } +} + +/** + * 批量生成SegWit地址 + * @param {number} count - 要生成的地址数量 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh', 'p2wsh') + * @returns {Array} 地址数组 + */ +function batchGenerateSegWitAddresses(count, addressType = 'p2wpkh') { + const addresses = []; + + for (let i = 0; i < count; i++) { + const keyPair = bitcoin.ECPair.makeRandom({ network }); + const publicKey = keyPair.publicKey; + let address; + + if (addressType === 'p2wpkh') { + // 原生SegWit地址 + address = bitcoin.payments.p2wpkh({ pubkey: publicKey, network }).address; + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit地址 + address = bitcoin.payments.p2sh({ + redeem: bitcoin.payments.p2wpkh({ pubkey: publicKey, network }), + network + }).address; + } else if (addressType === 'p2wsh') { + // 创建一个简单的P2WSH地址(单签名) + const p2ms = bitcoin.payments.p2ms({ + m: 1, + pubkeys: [publicKey], + network + }); + + address = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }).address; + } + + addresses.push({ + privateKey: keyPair.privateKey.toString('hex'), + publicKey: publicKey.toString('hex'), + address: address, + type: addressType + }); + } + + return addresses; +} + +/** + * 批量处理SegWit交易 + * @param {Array} utxos - 未花费交易输出数组 + * @param {Array} outputs - 输出数组,每个包含address和amount + * @param {Object} keyPair - 密钥对 + * @param {string} changeAddress - 找零地址 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh') + * @returns {string} 交易的十六进制表示 + */ +function batchSegWitTransaction(utxos, outputs, keyPair, changeAddress, addressType = 'p2wpkh') { + const txb = new bitcoin.TransactionBuilder(network); + + // 计算总输入金额 + const totalInput = utxos.reduce((sum, utxo) => sum + utxo.value, 0); + + // 计算总输出金额 + const totalOutput = outputs.reduce((sum, output) => sum + output.amount, 0); + + // 估算交易费用 + const feeEstimation = estimateSegWitTransactionFee(utxos.length, outputs.length + 1, addressType); + const fee = feeEstimation.estimatedFee; + + // 添加所有输入 + utxos.forEach(utxo => { + txb.addInput(utxo.txid, utxo.vout); + }); + + // 添加所有输出 + outputs.forEach(output => { + txb.addOutput(output.address, output.amount); + }); + + // 计算找零并添加找零输出 + const change = totalInput - totalOutput - fee; + if (change > 0) { + txb.addOutput(changeAddress, change); + } + + // 签名所有输入 + utxos.forEach((utxo, index) => { + if (addressType === 'p2wpkh') { + // 原生SegWit地址签名 + txb.sign(index, keyPair, null, null, utxo.value); + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit地址签名 + const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }); + const p2sh = bitcoin.payments.p2sh({ redeem: p2wpkh, network }); + txb.sign(index, keyPair, p2sh.redeem.output, null, utxo.value); + } + }); + + // 构建并返回交易 + const tx = txb.build(); + return { + txHex: tx.toHex(), + txid: tx.getId(), + fee: fee, + changeAmount: change > 0 ? change : 0 + }; +} + +/** + * 创建SegWit多签名地址 + * @param {number} m - 需要的签名数量 + * @param {number} n - 公钥总数 + * @param {string} addressType - 地址类型 ('p2wsh', 'p2sh-p2wsh') + * @returns {Object} 多签名地址信息 + */ +function createSegWitMultisigAddress(m, n, addressType = 'p2wsh') { + // 生成n个密钥对 + const keyPairs = []; + const pubkeys = []; + + for (let i = 0; i < n; i++) { + const keyPair = bitcoin.ECPair.makeRandom({ network }); + keyPairs.push(keyPair); + pubkeys.push(keyPair.publicKey); + } + + // 创建多签名赎回脚本 + const p2ms = bitcoin.payments.p2ms({ + m, + pubkeys, + network + }); + + let address, redeemScript, witnessScript; + + if (addressType === 'p2wsh') { + // 原生SegWit多签名地址 + const p2wsh = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }); + + address = p2wsh.address; + witnessScript = p2ms.output; + } else if (addressType === 'p2sh-p2wsh') { + // 兼容SegWit多签名地址 + const p2wsh = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }); + + const p2sh = bitcoin.payments.p2sh({ + redeem: p2wsh, + network + }); + + address = p2sh.address; + redeemScript = p2wsh.output; + witnessScript = p2ms.output; + } + + return { + address, + m, + n, + type: addressType, + pubkeys: pubkeys.map(pubkey => pubkey.toString('hex')), + privateKeys: keyPairs.map(kp => kp.privateKey.toString('hex')), + redeemScript: redeemScript ? redeemScript.toString('hex') : null, + witnessScript: witnessScript.toString('hex') + }; +} + +/** + * 创建闪电网络通道资金交易 + * @param {Object} utxo - 未花费交易输出 + * @param {Buffer} localPubkey - 本地节点公钥 + * @param {Buffer} remotePubkey - 远程节点公钥 + * @param {number} localAmount - 本地节点出资金额(聪) + * @param {number} remoteAmount - 远程节点出资金额(聪) + * @param {Object} keyPair - 本地节点密钥对 + * @param {number} fee - 交易费(聪) + * @returns {Object} 通道资金交易信息 + */ +function createLightningChannelFundingTx(utxo, localPubkey, remotePubkey, localAmount, remoteAmount, keyPair, fee) { + const txb = new bitcoin.TransactionBuilder(network); + + // 添加输入 + txb.addInput(utxo.txid, utxo.vout); + + // 创建2-of-2多签名脚本 + const p2ms = bitcoin.payments.p2ms({ + m: 2, + pubkeys: [localPubkey, remotePubkey].sort((a, b) => a.compare(b)), // BIP-69要求公钥排序 + network + }); + + // 创建P2WSH地址(闪电网络通道使用P2WSH) + const p2wsh = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }); + + // 添加通道资金输出 + const channelAmount = localAmount + remoteAmount; + txb.addOutput(p2wsh.address, channelAmount); + + // 计算找零 + const change = utxo.value - channelAmount - fee; + if (change > 0) { + // 创建找零地址(使用P2WPKH) + const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }); + txb.addOutput(p2wpkh.address, change); + } + + // 签名交易 + if (utxo.addressType === 'p2wpkh') { + txb.sign(0, keyPair, null, null, utxo.value); + } else if (utxo.addressType === 'p2sh-p2wpkh') { + const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }); + const p2sh = bitcoin.payments.p2sh({ redeem: p2wpkh, network }); + txb.sign(0, keyPair, p2sh.redeem.output, null, utxo.value); + } + + // 构建交易 + const tx = txb.build(); + + return { + txHex: tx.toHex(), + txid: tx.getId(), + channelAddress: p2wsh.address, + witnessScript: p2ms.output.toString('hex'), + localAmount, + remoteAmount, + totalAmount: channelAmount + }; +} + +/** + * 解析SegWit交易结构 + * @param {string} txHex - 交易的十六进制表示 + * @returns {Object} 解析后的交易结构 + */ +function parseSegWitTransaction(txHex) { + const tx = bitcoin.Transaction.fromHex(txHex); + + // 基本交易信息 + const result = { + txid: tx.getId(), + wtxid: tx.getHash(true).reverse().toString('hex'), + version: tx.version, + locktime: tx.locktime, + hasWitnesses: tx.hasWitnesses(), + virtualSize: tx.virtualSize(), + weight: tx.weight(), + byteLength: tx.byteLength(), + inputs: [], + outputs: [] + }; + + // 解析输入 + tx.ins.forEach((input, index) => { + const inputInfo = { + txid: Buffer.from(input.hash).reverse().toString('hex'), + vout: input.index, + sequence: input.sequence, + hasWitness: input.witness.length > 0, + scriptSig: input.script.toString('hex') + }; + + // 如果有见证数据,解析见证数据 + if (input.witness.length > 0) { + inputInfo.witness = input.witness.map(w => w.toString('hex')); + } + + result.inputs.push(inputInfo); + }); + + // 解析输出 + tx.outs.forEach((output, index) => { + const script = output.script; + let address = null; + let type = 'unknown'; + + // 尝试识别输出类型和地址 + try { + // 检查是否为P2PKH + if (bitcoin.payments.p2pkh({ output: script, network }).output) { + address = bitcoin.payments.p2pkh({ output: script, network }).address; + type = 'p2pkh'; + } + // 检查是否为P2SH + else if (bitcoin.payments.p2sh({ output: script, network }).output) { + address = bitcoin.payments.p2sh({ output: script, network }).address; + type = 'p2sh'; + } + // 检查是否为P2WPKH + else if (bitcoin.payments.p2wpkh({ output: script, network }).output) { + address = bitcoin.payments.p2wpkh({ output: script, network }).address; + type = 'p2wpkh'; + } + // 检查是否为P2WSH + else if (bitcoin.payments.p2wsh({ output: script, network }).output) { + address = bitcoin.payments.p2wsh({ output: script, network }).address; + type = 'p2wsh'; + } + } catch (e) { + // 无法识别的脚本类型 + } + + result.outputs.push({ + value: output.value, + scriptPubKey: script.toString('hex'), + type, + address + }); + }); + + return result; +} + +/** + * 比较SegWit与Taproot交易 + * @param {number} inputCount - 输入数量 + * @param {number} outputCount - 输出数量 + * @returns {Object} 比较结果 + */ +function compareSegWitWithTaproot(inputCount, outputCount) { + // 不同类型交易的大小估算(字节) + const sizes = { + p2pkh: 10 + (inputCount * 148) + (outputCount * 34), + p2sh_p2wpkh: 10 + (inputCount * 91) + (outputCount * 31), + p2wpkh: 10 + (inputCount * 67.75) + (outputCount * 31), + p2tr: 10 + (inputCount * 57.5) + (outputCount * 31) // Taproot (P2TR) + }; + + // 假设费率为10聪/字节 + const feeRate = 10; + + // 计算不同类型的费用 + const fees = { + p2pkh: Math.ceil(sizes.p2pkh * feeRate), + p2sh_p2wpkh: Math.ceil(sizes.p2sh_p2wpkh * feeRate), + p2wpkh: Math.ceil(sizes.p2wpkh * feeRate), + p2tr: Math.ceil(sizes.p2tr * feeRate) + }; + + // 计算相对于传统交易的节省百分比 + const savings = { + p2sh_p2wpkh_vs_p2pkh: Math.round((1 - (sizes.p2sh_p2wpkh / sizes.p2pkh)) * 100), + p2wpkh_vs_p2pkh: Math.round((1 - (sizes.p2wpkh / sizes.p2pkh)) * 100), + p2tr_vs_p2pkh: Math.round((1 - (sizes.p2tr / sizes.p2pkh)) * 100), + p2tr_vs_p2wpkh: Math.round((1 - (sizes.p2tr / sizes.p2wpkh)) * 100) + }; + + return { + transactionSizes: sizes, + fees, + savingsPercentage: savings, + comparison: { + inputCount, + outputCount, + feeRate, + notes: [ + "P2TR (Taproot) 提供了比 P2WPKH (SegWit) 更小的交易大小和更低的费用", + "Taproot 还提供了更好的隐私性和可扩展性", + "SegWit 是 Taproot 的基础,Taproot 是 SegWit v1" + ] + } + }; +} + +/** + * 获取SegWit采用率和性能数据 + * 注意:这里使用的是静态数据,实际应用中可以从API获取最新数据 + * @returns {Object} SegWit采用率和性能数据 + */ +function getSegWitAdoptionAndPerformanceData() { + // 静态数据,实际应用中可以从API获取最新数据 + return { + // SegWit采用率数据(截至2023年的近似值) + adoption: { + overallPercentage: 85, // 总体采用率 + byAddressType: { + p2sh_p2wpkh: 15, // 兼容SegWit地址采用率 + p2wpkh: 45, // 原生SegWit地址采用率 + p2tr: 25, // Taproot地址采用率 + legacy: 15 // 传统地址使用率 + }, + byYear: { + '2017': 10, + '2018': 30, + '2019': 50, + '2020': 65, + '2021': 75, + '2022': 80, + '2023': 85 + } + }, + // 性能数据 + performance: { + // 交易大小比较(字节) + transactionSize: { + // 1输入1输出的交易 + oneInOneOut: { + p2pkh: 192, // 传统地址 + p2sh_p2wpkh: 132, // 兼容SegWit + p2wpkh: 109, // 原生SegWit + p2tr: 98 // Taproot + }, + // 2输入2输出的交易 + twoInTwoOut: { + p2pkh: 374, + p2sh_p2wpkh: 254, + p2wpkh: 208, + p2tr: 186 + } + }, + // 交易费用比较(假设10聪/字节) + transactionFee: { + oneInOneOut: { + p2pkh: 1920, + p2sh_p2wpkh: 1320, + p2wpkh: 1090, + p2tr: 980 + }, + twoInTwoOut: { + p2pkh: 3740, + p2sh_p2wpkh: 2540, + p2wpkh: 2080, + p2tr: 1860 + } + }, + // 区块容量提升 + blockCapacity: { + legacy: '1MB(约2,000笔交易)', + withSegWit: '2.1-4MB(约4,000-8,000笔交易)' + }, + // 网络吞吐量(TPS) + throughput: { + legacy: '3-7 TPS', + withSegWit: '7-14 TPS' + } + }, + // 实际案例研究 + caseStudies: { + exchange: { + name: '某大型交易所', + before: { + avgFee: '15,000聪/交易', + dailyWithdrawals: 5000, + dailyFeeTotal: '0.75 BTC' + }, + after: { + avgFee: '6,000聪/交易', + dailyWithdrawals: 5000, + dailyFeeTotal: '0.3 BTC', + savings: '60%' + } + }, + wallet: { + name: '某热门钱包', + userAdoption: { + legacy: '15%', + segwitCompatible: '25%', + segwitNative: '45%', + taproot: '15%' + }, + avgFeeSavings: '55%' + } + } + }; +} + +/** + * 解释SegWit交易序列化格式 + * @returns {Object} SegWit交易序列化格式说明 + */ +function explainSegWitTransactionFormat() { + return { + format: { + legacy: [ + '4字节: 版本', + 'n个输入: [上一笔交易ID(32字节) + 输出索引(4字节) + 脚本长度(变长) + 脚本 + 序列号(4字节)]', + 'n个输出: [金额(8字节) + 脚本长度(变长) + 脚本]', + '4字节: 锁定时间' + ], + segwit: [ + '4字节: 版本', + '1字节: 标记(0x00)', + '1字节: 标志(0x01)', + 'n个输入: [上一笔交易ID(32字节) + 输出索引(4字节) + 脚本长度(变长) + 脚本 + 序列号(4字节)]', + 'n个输出: [金额(8字节) + 脚本长度(变长) + 脚本]', + 'n个见证数据: [见证数据数量(变长) + 见证数据]', + '4字节: 锁定时间' + ] + }, + differences: [ + 'SegWit交易添加了标记(0x00)和标志(0x01)字节', + 'SegWit交易将签名数据移到了交易的末尾(见证数据部分)', + 'SegWit交易的txid计算不包括见证数据,而wtxid包括见证数据', + 'SegWit交易引入了新的权重单位(weight units)来计算交易大小' + ], + weightCalculation: [ + '非见证字节的权重为4', + '见证字节的权重为1', + '区块权重限制为4,000,000单位(相当于传统的1MB区块大小)', + '最大区块大小可达到约4MB(如果全部是见证数据)' + ], + examples: { + p2wpkh: { + scriptPubKey: '0014{20字节公钥哈希}', + witnessData: '[签名, 公钥]' + }, + p2wsh: { + scriptPubKey: '0020{32字节脚本哈希}', + witnessData: '[签名1, 签名2, ..., 见证脚本]' + } + } + }; +} + +/** + * SegWit与Taproot的详细比较 + * @returns {Object} 比较结果 + */ +function compareSegWitAndTaproot() { + return { + overview: { + segwit: { + version: 'v0', + activationDate: '2017年8月', + bip: ['BIP141', 'BIP143', 'BIP144', 'BIP173'], + addressPrefix: ['bc1q (P2WPKH/P2WSH)'], + mainFeatures: ['交易延展性修复', '区块容量增加', '签名验证优化'] + }, + taproot: { + version: 'v1 (SegWit v1)', + activationDate: '2021年11月', + bip: ['BIP340', 'BIP341', 'BIP342'], + addressPrefix: ['bc1p (P2TR)'], + mainFeatures: ['Schnorr签名', '密钥聚合', 'MAST (默克尔抽象语法树)', '脚本增强'] + } + }, + technicalComparison: { + scriptExecution: { + segwit: '使用传统的CHECKSIG操作符验证签名', + taproot: '使用新的OP_CHECKSIGADD和Schnorr签名' + }, + privacyFeatures: { + segwit: '有限的隐私保护', + taproot: '增强的隐私保护(所有输出看起来相同,无法区分单签和多签)' + }, + multisigEfficiency: { + segwit: '每个签名都需要单独验证', + taproot: '使用密钥聚合,多个签名可以聚合为一个' + }, + scriptComplexity: { + segwit: '复杂脚本会增加交易大小', + taproot: '使用MAST,只有执行的脚本路径会被公开' + } + }, + performanceComparison: { + transactionSize: { + example: '2-of-3多签名交易', + segwit: '约222字节', + taproot: '约104字节', + improvement: '约53%' + }, + verificationSpeed: { + segwit: '基准', + taproot: '提高约2.5倍', + reason: 'Schnorr签名验证更快,批量验证更高效' + } + }, + evolutionPath: [ + 'SegWit (v0) 解决了交易延展性问题,为二层解决方案铺平道路', + 'Taproot (SegWit v1) 建立在SegWit的基础上,提供更高级的脚本功能和隐私保护', + '未来可能的SegWit v2将进一步扩展比特币的功能' + ] + }; +} + +// 导出函数 +module.exports = { + createSegWitAddresses, + createSegWitTransaction, + calculateSegWitTransactionId, + estimateSegWitTransactionFee, + validateSegWitAddress, + batchGenerateSegWitAddresses, + batchSegWitTransaction, + createSegWitMultisigAddress, + createLightningChannelFundingTx, + parseSegWitTransaction, + compareSegWitWithTaproot, + getSegWitAdoptionAndPerformanceData, + explainSegWitTransactionFormat, + compareSegWitAndTaproot +}; + +// 使用示例 +/* +// 创建SegWit地址 +const addresses = createSegWitAddresses(); +console.log('SegWit地址:', addresses); + +// 验证地址 +const addressValidation = validateSegWitAddress('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'); +console.log('地址验证结果:', addressValidation); + +// 估算交易费用 +const feeEstimation = estimateSegWitTransactionFee(2, 2, 'p2wpkh', 5); +console.log('费用估算:', feeEstimation); + +// 比较SegWit与Taproot +const comparison = compareSegWitWithTaproot(2, 2); +console.log('SegWit与Taproot比较:', comparison); + +// 获取SegWit采用率和性能数据 +const adoptionData = getSegWitAdoptionAndPerformanceData(); +console.log('SegWit采用率和性能数据:', adoptionData); +*/ \ No newline at end of file diff --git a/BTC/Basic/SegWit/example.js b/BTC/Basic/SegWit/example.js new file mode 100644 index 000000000..4746e82f3 --- /dev/null +++ b/BTC/Basic/SegWit/example.js @@ -0,0 +1,247 @@ +/** + * SegWit (隔离见证) 代码示例 + * + * 本文件包含与比特币隔离见证(SegWit)相关的JavaScript代码示例, + * 使用bitcoinjs-lib库演示如何创建SegWit地址和交易。 + */ + +const bitcoin = require('bitcoinjs-lib'); +const network = bitcoin.networks.bitcoin; // 主网 + +/** + * 创建不同类型的SegWit地址 + */ +function createSegWitAddresses() { + // 创建密钥对 + const keyPair = bitcoin.ECPair.makeRandom({ network }); + const publicKey = keyPair.publicKey; + + // 1. 创建P2WPKH(原生SegWit)地址 - 以bc1q开头 + const p2wpkh = bitcoin.payments.p2wpkh({ + pubkey: publicKey, + network + }); + + // 2. 创建P2SH-P2WPKH(兼容SegWit)地址 - 以3开头 + const p2sh_p2wpkh = bitcoin.payments.p2sh({ + redeem: bitcoin.payments.p2wpkh({ pubkey: publicKey, network }), + network + }); + + // 3. 创建P2WSH(原生SegWit脚本哈希)地址 + // 创建一个2-of-3多签名赎回脚本 + const pubkeys = [ + bitcoin.ECPair.makeRandom({ network }).publicKey, + bitcoin.ECPair.makeRandom({ network }).publicKey, + bitcoin.ECPair.makeRandom({ network }).publicKey + ]; + + const p2ms = bitcoin.payments.p2ms({ + m: 2, // 需要2个签名 + pubkeys, + network + }); + + const p2wsh = bitcoin.payments.p2wsh({ + redeem: p2ms, + network + }); + + return { + privateKey: keyPair.privateKey.toString('hex'), + publicKey: publicKey.toString('hex'), + p2wpkh: { + address: p2wpkh.address, // 原生SegWit地址 + type: 'P2WPKH (Native SegWit)' + }, + p2sh_p2wpkh: { + address: p2sh_p2wpkh.address, // 兼容SegWit地址 + type: 'P2SH-P2WPKH (Compatible SegWit)' + }, + p2wsh: { + address: p2wsh.address, // 原生SegWit脚本哈希地址 + type: 'P2WSH (Native SegWit Script Hash)' + } + }; +} + +/** + * 构建SegWit交易 + * @param {Object} utxo - 未花费交易输出 + * @param {string} toAddress - 接收地址 + * @param {number} amount - 发送金额(聪) + * @param {number} fee - 交易费(聪) + * @param {Object} keyPair - 密钥对 + * @param {string} changeAddress - 找零地址 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh') + * @returns {string} 交易的十六进制表示 + */ +async function createSegWitTransaction(utxo, toAddress, amount, fee, keyPair, changeAddress, addressType = 'p2wpkh') { + const txb = new bitcoin.TransactionBuilder(network); + + // 添加输入(来自SegWit地址的UTXO) + txb.addInput(utxo.txid, utxo.vout); + + // 添加输出 + txb.addOutput(toAddress, amount); + + // 如果有找零,添加找零输出 + const change = utxo.value - amount - fee; + if (change > 0) { + txb.addOutput(changeAddress || utxo.address, change); + } + + // 根据地址类型签名交易 + if (addressType === 'p2wpkh') { + // 原生SegWit地址签名 + txb.sign(0, keyPair, null, null, utxo.value); + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit地址签名 + const p2wpkh = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }); + const p2sh = bitcoin.payments.p2sh({ redeem: p2wpkh, network }); + txb.sign(0, keyPair, p2sh.redeem.output, null, utxo.value); + } + + // 构建并返回交易 + const tx = txb.build(); + return tx.toHex(); +} + +/** + * 计算SegWit交易的交易ID + * @param {string} txHex - 交易的十六进制表示 + * @returns {Object} 包含txid和wtxid的对象 + */ +function calculateSegWitTransactionId(txHex) { + const tx = bitcoin.Transaction.fromHex(txHex); + + // 计算传统txid(不包含见证数据) + const txid = tx.getId(); + + // 计算wtxid(包含见证数据) + const wtxid = tx.getHash(true).reverse().toString('hex'); + + return { + txid, + wtxid, + isSame: txid === wtxid + }; +} + +/** + * 估算SegWit交易的大小和费用 + * @param {number} inputCount - 输入数量 + * @param {number} outputCount - 输出数量 + * @param {string} addressType - 地址类型 ('p2wpkh', 'p2sh-p2wpkh') + * @param {number} feeRate - 费率(聪/字节) + * @returns {Object} 包含大小和费用的对象 + */ +function estimateSegWitTransactionFee(inputCount, outputCount, addressType = 'p2wpkh', feeRate = 10) { + let txSize = 0; + + // 计算交易大小(近似值) + if (addressType === 'p2wpkh') { + // 原生SegWit (P2WPKH) 交易大小估算 + // 基本交易大小 + 输入大小 + 输出大小 + txSize = 10 + (inputCount * 67.75) + (outputCount * 31); + } else if (addressType === 'p2sh-p2wpkh') { + // 兼容SegWit (P2SH-P2WPKH) 交易大小估算 + txSize = 10 + (inputCount * 91) + (outputCount * 31); + } else { + // 传统 (P2PKH) 交易大小估算 + txSize = 10 + (inputCount * 148) + (outputCount * 34); + } + + // 计算费用 + const fee = Math.ceil(txSize * feeRate); + + return { + estimatedSize: txSize, + estimatedFee: fee, + feeRate: feeRate + }; +} + +/** + * 验证地址是否为SegWit地址 + * @param {string} address - 比特币地址 + * @returns {Object} 包含验证结果的对象 + */ +function validateSegWitAddress(address) { + try { + // 尝试解析地址 + const result = bitcoin.address.fromBase58Check(address); + + // 检查是否为P2SH地址(可能是P2SH-P2WPKH) + if (result.version === network.scriptHash) { + return { + isValid: true, + type: 'P2SH (可能是P2SH-P2WPKH兼容SegWit)', + isSegWit: 'Compatible' + }; + } + + return { + isValid: true, + type: 'P2PKH (传统地址)', + isSegWit: false + }; + } catch (e) { + // 如果不是Base58地址,尝试Bech32 + try { + const result = bitcoin.address.fromBech32(address); + + if (result.version === 0) { + if (result.data.length === 20) { + return { + isValid: true, + type: 'P2WPKH (原生SegWit)', + isSegWit: 'Native' + }; + } else if (result.data.length === 32) { + return { + isValid: true, + type: 'P2WSH (原生SegWit脚本哈希)', + isSegWit: 'Native' + }; + } + } + + return { + isValid: true, + type: '未知的Bech32地址', + isSegWit: 'Unknown' + }; + } catch (e) { + return { + isValid: false, + type: '无效地址', + isSegWit: false + }; + } + } +} + +// 导出函数 +module.exports = { + createSegWitAddresses, + createSegWitTransaction, + calculateSegWitTransactionId, + estimateSegWitTransactionFee, + validateSegWitAddress +}; + +// 使用示例 +/* +// 创建SegWit地址 +const addresses = createSegWitAddresses(); +console.log('SegWit地址:', addresses); + +// 验证地址 +const addressValidation = validateSegWitAddress('bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq'); +console.log('地址验证结果:', addressValidation); + +// 估算交易费用 +const feeEstimation = estimateSegWitTransactionFee(2, 2, 'p2wpkh', 5); +console.log('费用估算:', feeEstimation); +*/ \ No newline at end of file diff --git a/BTC/Basic/Transaction/Fee Estimation.md b/BTC/Basic/Transaction/Fee Estimation.md new file mode 100644 index 000000000..f48463876 --- /dev/null +++ b/BTC/Basic/Transaction/Fee Estimation.md @@ -0,0 +1,31 @@ +在比特币的底层系统中,并没有对手续费做规定。也就是说,手续费并不是强制要收取的。在早期,由于比特币价格低,链上转账数目少,很多矿工并不在意用户是否支付了手续费(也叫矿工费),所以很多没有支付手续费的比特币也被矿工打包确认了。但随着比特币价格的快速上扬,链上转账数目越来越多,为了让自己的利益最大化,矿工开始优先打包有手续费的成交。现在,如果转账不支付手续费,基本上不会被矿工打包确认。 + + +影响交易费用的因素 + +*字节大小 + +比特币交易的大小以字节为单位,通常交易越大,费用也越高。交易的大小取决于输入和输出的数量。 + +比特币转账的字节大小跟转账的金额无关,跟 UTXO 的数量有关。举个例子,张三、李四分别给王五转 6BTC,如果张三用的是一个面额为 7BTC 的 UTXO,李四用的是七个面额都为 1BTC 的 UTXO,那么很显然,李四的这笔转账字节要大得多。 + +目前,主流的手续费标准是按照字节收费:每千字节收取 0.0001BTC 的手续费(不足一千字节的按照一千字节算)。 + +*网络拥堵情况 + +比特币网络的拥堵情况也会影响手续费。如果使用比特币链上转账的人很多,造成了比特币网络拥堵,而你想让自己的转账尽快确认,你就需要支付更高的手续费进行“插队”,提高被打包确认的优先级。当然,如果你并不着急,也不用因为比特币网络拥堵而提高转账的手续费。 + + +估算方法 + +1. 使用交易所或钱包:许多比特币钱包和交易所提供自动计算的建议费用。用户可以根据推荐的费用进行交易。 + +2. 利用在线工具:有很多在线工具和网站提供实时的比特币交易费用估算,通常会显示当前的平均费用和推荐费用, 例如: + +Mempool.space:(https://mempool.space/zh/)提供实时的 未确认交易和费用数据。 + +BTCscan:(https://btcscan.org/)显示当前区块链状态和推荐费用。 + +Blockchair: (https://blockchair.com/)提供详细的区块链分析和费用估算。 + + diff --git a/BTC/Basic/Transaction/Transaction Construction.md b/BTC/Basic/Transaction/Transaction Construction.md new file mode 100644 index 000000000..3f5ca2c96 --- /dev/null +++ b/BTC/Basic/Transaction/Transaction Construction.md @@ -0,0 +1,83 @@ +构建比特币交易的过程涉及多个步骤,以下是一个简化的步骤指南,帮助你理解如何在比特币网络上构建和发送交易。 + +### 1. 准备工作 + +- **钱包地址**:你需要一个比特币钱包地址(通常是由公钥生成的)用于接收比特币。 +- **私钥**:这是控制你钱包的密钥,必须保密。 +- **比特币余额**:确保你的钱包中有足够的比特币用于交易。 + +### 2. 创建交易 + +#### 交易基本结构 + +一笔比特币交易通常包含以下几个部分: + +- **输入(Inputs)**:引用之前的交易输出,表示你要花费的比特币。 +- **输出(Outputs)**:指定比特币的接收地址和金额 +- **交易金额**:你要发送的比特币数量 +- **手续费**:矿工费,用于激励矿工处理你的交易 + +#### 示例交易结构(JSON格式) + +```json +{ + "inputs": [ + { + "txid": "previous_transaction_id", + "vout": 0, + "scriptSig": "signature", + "sequence": 4294967295 + } + ], + "outputs": [ + { + "address": "recipient_address", + "amount": 0.01 + }, + { + "address": "change_address", + "amount": 0.009 + } + ], + "locktime": 0 +} +``` + +### 3. 签名交易 + +使用你的私钥对交易进行签名。这一步骤确保了交易的安全性和有效性。签名的算法通常是椭圆曲线数字签名算法(ECDSA) + +### 4. 广播交易 + +一旦交易被签名,你需要将其广播到比特币网络。这可以通过连接到比特币节点或使用第三方API来完成 + +### 5. 交易确认 + +交易被矿工打包到区块后,等待网络确认。通常需要六个确认才能认为交易是不可逆的。 + +### 6. 检查交易状态 + +你可以使用区块链浏览器来检查交易的状态,确认它是否已被矿工确认。 + +### 代码示例 + +以下是一个简单的Python示例,使用 `bitcoinlib` 库构建和发送比特币交易: + +```python +from bitcoinlib.wallets import Wallet + +# 创建或加载钱包 +wallet = Wallet('MyWallet') + +# 创建交易 +tx = wallet.send_to('recipient_address', amount=0.01) + +# 查看交易详情 +print(tx.info()) +``` + +### 注意事项 + +- 始终保持你的私钥安全。 +- 确保使用可靠的钱包软件。 +- 了解网络手续费的变化,选择合适的手续费以确保交易被及时处理。 diff --git a/BTC/Basic/Transaction/UTXO.md b/BTC/Basic/Transaction/UTXO.md new file mode 100644 index 000000000..835ecd976 --- /dev/null +++ b/BTC/Basic/Transaction/UTXO.md @@ -0,0 +1,29 @@ +UTXO(Unspent Transaction Output)是比特币交易的核心模型,代表未花费的交易输出。 + + +工作原理: + +每笔交易通过输入(引用并消耗之前的UTXO)和输出(生成新的UTXO)完成转账。 + +例如:当前用户A余额是1000元,如果用户A给用户B转100元,这笔转账会被记录成: + +交易1 用户A给用户B转账100元 + +交易2 用户A给用户A自己转账900元 (UTXO) + +这里的交易2虽然是一笔交易,但从功能上来说他担当了账户余额的作用,表示在完成这笔100元转账后A的账户上还剩余900元。 + + +特点: + +安全性高:UTXO模型通过验证每笔交易的输入,确保输入的UTXO是有效的且未被花费。这提高了交易的安全性,防止了双花攻击。 +双花攻击是指同一个比特币被花费两次。UTXO模型通过记录每个UTXO的状态,有效地防止了这种情况的发生 + +隐私性好:每个UTXO都是独立的,可以被多个交易分开使用。这使得交易难以被追踪,提高了用户的隐私性。 +例如,你可以将一个大额UTXO分成多个小额UTXO,用于不同的交易,从而混淆交易的来源和目的 + +可扩展性强:UTXO模型允许并行处理多个交易,提高了网络的可扩展性。每个节点只需要验证自己收到的UTXO,而不需要处理整个账户的余额。这使得比特币网络可以处理更多的交易,提高了网络的吞吐量 + + + + diff --git a/BTC/Basic/Transaction/UTXO.png b/BTC/Basic/Transaction/UTXO.png new file mode 100644 index 000000000..ab60fa974 Binary files /dev/null and b/BTC/Basic/Transaction/UTXO.png differ diff --git a/BTC/Basic/explorer/README.md b/BTC/Basic/explorer/README.md new file mode 100644 index 000000000..0eb90ad33 --- /dev/null +++ b/BTC/Basic/explorer/README.md @@ -0,0 +1,371 @@ +概述 + +区块链浏览器是一种用于查看和检索区块链上数据的在线工具,类似于传统互联网中的搜索引擎。它并非传统意义上的“浏览器”(如Chrome或Safari),而是专门为区块链设计的透明化数据查询工具,用于查询和展示区块链网络中的公开数据。其核心功能是解析并可视化分布式账本中的信息,例如交易记录、区块详情、地址余额、智能合约状态等。用户通过区块链浏览器可以实时监控链上活动,验证交易真实性,并分析网络运行状态。 + +以下是其要点: + +1.技术原理 + +1.1 区块链数据结构解析 + +区块链的本质是一个按时间顺序连接的链式数据结构,每个区块包含以下核心元素: + +-区块头(Block Header):存储区块的元数据,包括版本号、时间戳、前序区块哈希(Previous Hash)、默克尔根(Merkle Root)、难度值等 + +-交易列表(Transactions):记录该区块打包的所有交易信息,例如发送方、接收方、金额、Gas费用等 + +-哈希值(Block Hash):通过加密算法(如SHA-256)生成的唯一标识符,用于确保区块数据的不可篡改性 + +-区块链浏览器通过解析这些数据结构,将原始二进制或十六进制数据转换为可读的格式(如JSON或HTML),并在前端界面中展示 + + +1.2 节点交互与数据同步 + +区块链浏览器需要与网络中的节点(Node)建立连接以获取实时数据。节点分为全节点和轻节点: + +-全节点:存储完整的区块链数据,能够独立验证交易和区块的有效性 + +-轻节点:仅存储区块头信息,依赖其他节点提供交易细节 + +浏览器通常通过节点的RPC(Remote Procedure Call)接口或专用API获取数据。例如,以太坊的Web3.js库允许开发者与以太坊节点通信,查询账户余额或交易详情 + + +1.3 数据索引与存储优化 + +由于区块链数据量庞大(如比特币区块链已超过400GB),直接查询链上数据效率低下。因此,区块链浏览器通常采用以下优化技术: + +-建立索引数据库:将区块高度、交易哈希、地址等关键字段存入关系型数据库(如MySQL)或NoSQL数据库(如MongoDB),加速查询响应 + +-缓存机制:对高频访问的数据(如最新区块)进行缓存,减少重复计算 + +-分布式架构:采用微服务设计,将数据采集、处理和展示模块分离,提升系统扩展性 + + +1.4 前端与后端技术栈 + +-前端:使用React、Vue等框架构建交互式界面,结合图表库(如D3.js)展示交易趋势、网络算力等统计信息 + +-后端:采用Node.js、Python或Go语言开发API服务,处理数据查询请求并与区块链节点交互 + +-安全机制:通过HTTPS加密传输、防止SQL注入和跨站脚本(XSS)攻击,确保用户数据安全 + + + +2.核心功能 + +区块链浏览器的功能设计围绕链上数据的透明性和可追溯性展开,以下是其核心功能模块: + +2.1 区块与交易查询 + +-区块详情:展示区块高度、哈希值、时间戳、矿工地址、交易数量、Gas消耗等信息 + +-交易追踪:通过交易哈希(TxHash)查询交易状态(确认数)、输入输出地址、转账金额及手续费 + +-地址监控:查看特定地址的余额、交易历史记录及关联的智能合约 + + +2.2 实时数据展示 + +-最新区块列表:滚动显示最新生成的区块及其基础信息 + +-未确认交易池(Mempool):展示待打包交易的排队情况,帮助用户预估交易确认时间 + + +2.3 统计分析与可视化 + +-网络算力(Hash Rate):实时显示全网挖矿算力分布及变化趋势 + +-交易吞吐量:统计每秒交易数(TPS)及区块间隔时间 + +-代币分布:分析通证(Token)的持有者地址数量及持仓比例 + + +2.4 智能合约交互 + +-合约代码审计:展示智能合约的源代码及字节码,支持开发者验证合约逻辑 + +-事件日志(Event Logs):记录合约执行过程中触发的事件,便于调试和追踪 + +-ABI接口调用:允许用户通过浏览器直接与合约交互,执行查询或触发函数 + + +2.5 网络状态监控 + +-节点地理分布:地图可视化展示全球节点的地理位置 + +-协议版本检测:监控网络中不同客户端(如Geth、Parity)的版本兼容性 + +-分叉警报:实时检测硬分叉或软分叉事件,并提供链重组(Reorg)详情 + + + +3.核心特点 + +区块链浏览器的设计理念和技术实现赋予其以下显著特点: + +3.1 数据透明性与不可篡改性 + +-所有链上数据公开可查,任何人可通过地址、交易哈希等查询交易详情(如金额、时间戳、参与方地址,任何用户均可验证交易的真实性 + +-基于哈希指针和加密算法,确保历史数据无法被修改 + +-提供区块结构可视化展示,包括区块高度、哈希值、矿工奖励、打包交易数量等元数据 + +-实时显示网络全局数据:全网算力、交易手续费均值、未确认交易池规模、活跃地址数量等 + + +3.2 多链兼容性 + +-支持不同共识机制(如PoW、PoS、DPoS)的区块链,例如比特币、以太坊、波场等 + +-跨链浏览器(如Blockchair)可同时查询多条链的数据 + +-各公链浏览器存在协议级差异(如UTXO模型与账户模型的不同展示逻辑) + +-智能合约链支持ABI解析,可将字节码转化为可读函数调用 + +-特定功能定制化(如Filecoin浏览器包含存储订单生命周期追踪) + + +3.3 安全防护机制 + +-采用速率限制策略(如单个IP每分钟不超过120次请求) + +-部署交易流量异常检测系统,自动识别DDoS攻击模式 + +-关键查询实施人机验证(CAPTCHA),防止数据爬取滥用 + + +3.4 用户友好性 + +-提供地址标签、交易备注等个性化功能,降低普通用户的理解门槛 + +-支持多语言界面及移动端适配,提升访问便捷性 + + +3.5 功能完备性 + +-开放API接口供第三方应用调用,例如获取地址余额或生成交易二维码 + +-内置调试工具(如以太坊的Remix插件),简化智能合约开发流程 + +-支持12种以上查询维度:地址资产图谱、双花交易检测、富豪地址追踪、Gas消耗分析等 + +-集成链上分析工具:代币流向图谱、MEV交易监控、NFT元数据解析等进阶功能 + + +4.应用场景 + +-普通用户:确认转账到账、验证钱包地址有效性 + +-开发者:调试智能合约、监控合约事件日志 + +-研究者:分析链上活动(如NFT交易趋势、DeFi协议资金流动) + +-监管机构:追踪非法交易(如洗钱)或调查黑客事件 + +-交易验证:用户支付加密货币后,可通过浏览器确认交易是否成功上链 + +-链上审计:监管机构利用浏览器追踪资金流向,打击洗钱行为 + +-DApp开发:开发者分析热门合约的调用模式,优化产品设计 + +-市场分析:投资者通过统计图表评估网络活跃度,辅助投资决策 + + + +总结 + +区块链浏览器作为连接用户与区块链网络的桥梁,通过高效的数据解析和可视化技术,实现了链上信息的透明化访问。其技术架构融合了分布式系统、数据库优化和前端交互设计,核心功能覆盖了从基础查询到智能合约调试的全场景需求。随着区块链技术的普及,浏览器将进一步向跨链聚合、隐私保护(如零知识证明集成)和AI数据分析等方向演进,成为Web3生态不可或缺的基础设施。 + + + +下面以Mempool为例介绍常见区块链浏览器的具体内容和使用方式: + +Mempool.space 是一个开源的比特币区块链浏览器,提供了实时的区块链数据和交易信息,其核心功能与特性如下: + +1.核心定位 + +专注比特币内存池可视化,展示全网待确认交易池状态 + +提供链下交易动态追踪(区别于传统区块链浏览器侧重链上数据) + + +2. 核心功能模块 + +2.1交易池监控 + +-实时显示全网未确认交易数量(典型范围:3万-30万笔) + +-按交易费率(sat/vB)分层统计交易分布(如0-1 sat、1-5 sat等区间) + +-可视化交易池容量变化曲线(支持1小时/24小时/7天时间维度) + + +2.2费率预测 + +-智能计算不同确认优先级所需费率(10分钟/3小时/24小时确认对应的建议费率) + +-动态调整预测模型,考虑区块空间竞争强度与矿工打包策略 + + +2.3交易溯源 + +输入交易ID可查看其在内存池中的存活时间(最长滞留交易警示) + +展示交易在费率分层中的相对位置(前10%/50%等) + + +2.4监控网络状态 + +实时哈希率监测(单位:EH/s) + +区块间隔时间统计(最近10个区块平均出块时间) + +内存池交易总容量(按vMB和交易数量双维度展示) + + + +3. 技术实现特性 + +-部署全球监测节点网络(超30个节点覆盖主要矿池区域) + +-采用流数据处理架构,延迟控制在2秒内(对比常规浏览器5-10秒延迟) + +-构建交易传播路径图谱(可视化交易在节点间的广播过程) + + + +4. 特色数据分析 + +4.1矿工行为分析 + +-识别矿池交易打包偏好(如特定矿池的费率优先级) + +-统计空区块产生频率与关联矿池 + +4.2交易替换监控 + +-检测RBF(费用替代)交易对原始交易的替换情况 + +-标记CPFP(子为父付费)交易捆绑策略 + + + +5. 用户场景 + +-普通用户:优化交易费设置(避免超额支付或长时间滞留) + +交易所:监控提现交易状态(预估到账时间) + +开发者:调试交易广播策略(测试网络拥堵时的传播效率) + +研究人员:分析比特币网络健康度(内存池积压周期规律) + +该平台日均访问量超50万次(2024年数据),其提供的交易加速服务通过合作矿池实现优先打包,成功率可达92%。与同类工具(如mempool.observer)相比,其优势在于深度整合闪电网络数据,提供通道容量平衡状态的可视化分析。 + + + +以下是如何使用 Mempool.space 的详细教程: + +1.访问 Mempool.space + +打开浏览器,访问 [Mempool.space](https://mempool.space/) + + +2.主界面概览 + +打开 mempool.space 后,主界面分为几个核心区域: + +-顶部导航栏:包含搜索框、网络切换(比特币主网/测试网)、语言设置等 + +-实时手续费估算:显示当前不同优先级(高/中/低)交易的推荐手续费率(单位:sat/vB) + +-内存池交易列表:动态展示当前未确认交易的列表。每笔交易显示: + -手续费率(sat/vB) + -交易大小(KB) + -总手续费(BTC 或 satoshi) + -交易时间(多久前进入内存池) + +-最新区块:显示最新挖出的区块高度、包含的交易数量、矿工手续费等 + +-矿工信息:展示近期区块的矿工(矿池)分布统计 + + +3.查看区块信息 + +点击首页的区块高度链接,进入区块详情页面: + +-区块哈希:显示区块的哈希值 + +-时间戳:显示区块被挖出的时间 + +-交易数量:显示区块中包含的交易数量 + +-矿工奖励:显示矿工获得的奖励 + +-区块大小:显示区块的大小,点击任意区块高度,可查看该区块的详细信息: + -区块哈希、时间戳、矿工(矿池) + -区块内包含的交易数量及总手续费 + -区块大小、权重、Coinbase 交易(矿工奖励) + +-区块版本:显示区块的版本号 + + +4.查看交易信息 + +在首页或区块详情页面,点击任意交易哈希,进入交易详情页面: + +-交易哈希:显示交易的哈希值 + +-输入和输出:显示交易的输入和输出地址及金额 + +-交易费:显示交易的手续费 + +-确认状态:显示交易的确认状态和确认次数 + +-交易大小:显示交易的大小 + +-锁定时间:显示交易的锁定时间(如果有) + +-查看推荐手续费:在主界面中间的图表中,可以看到不同优先级(高/中/低)的手续费率(sat/vB)。图表横轴是时间,纵轴是手续费率,显示过去一段时间内的费率波动 + -快速确认(绿色):支付更高费率,交易可能在下一个区块被确认 + -中等确认(黄色):平衡费率,可能在1-6个区块内确认 + -经济模式(红色):最低费率,但可能需要等待更长时间 + +-调整手续费模式:点击图表右上角的「经济模式」或「加速模式」,可切换手续费计算逻辑(保守型或激进型) + + +5.使用搜索功能 +在页面顶部的搜索栏中输入区块哈希、交易哈希或比特币地址,按下回车键进行搜索: + +-搜索交易ID:在顶部搜索栏输入完整的交易哈希(Transaction Hash),即可查看该交易的详细信息,包括: + -确认状态(未确认/已确认的区块高度) + -输入/输出地址及金额 + -手续费(总手续费、手续费率 sat/vB) + -交易体积(vBytes)和权重(Weight) + +-区块哈希:显示对应区块的详细信息 + +-交易哈希:显示对应交易的详细信息 + +-比特币地址:输入比特币地址,可查看该地址的余额、交易历史记录(转入/转出)、UTXO(未花费的交易输出)等 + + +6.高级功能 + +-替换手续费(RBF)和子父手续费(CPFP): + -如果一笔未确认交易支持 RBF(Replace-By-Fee),可在交易详情页点击「IncreaseFee」重新广播更高手续费的交易。 + -如果交易有找零输出,可通过 CPFP(Child-Pays-For-Parent)创建子交易支付更高手续费,加速父交易确认。 + +-自建节点监控:Mempool.space 支持连接到自己的比特币全节点(需在设置中配置),实现私有化监控 + +-实时图表:在首页底部可以看到实时更新的图表,包括交易费率、内存池大小等 + +-API 接口:Mempool.space 提供了 API 接口,开发者可以使用这些接口获取区块链数据。可以在 [API 文档](https://mempool.space/docs/api) 中找到详细信息 + +-自定义设置:在页面右上角的设置图标中,可以调整显示语言、主题(浅色或深色)等个性化设置。 + + + +Reference: -[how-to-use-mempool-space-block-explorer](https://bitcoinbriefly.com/how-to-use-mempool-space-block-explorer/) diff --git a/BTC/Basic/explorer/imgs of mempool/1.Dashboard.png b/BTC/Basic/explorer/imgs of mempool/1.Dashboard.png new file mode 100644 index 000000000..2731280ea Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/1.Dashboard.png differ diff --git a/BTC/Basic/explorer/imgs of mempool/2.Accelerator dashboard.png b/BTC/Basic/explorer/imgs of mempool/2.Accelerator dashboard.png new file mode 100644 index 000000000..61fce9832 Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/2.Accelerator dashboard.png differ diff --git a/BTC/Basic/explorer/imgs of mempool/3.Mining dashboard.png b/BTC/Basic/explorer/imgs of mempool/3.Mining dashboard.png new file mode 100644 index 000000000..5ccae25e0 Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/3.Mining dashboard.png differ diff --git a/BTC/Basic/explorer/imgs of mempool/4.Lightning explorer.png b/BTC/Basic/explorer/imgs of mempool/4.Lightning explorer.png new file mode 100644 index 000000000..a760b8f12 Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/4.Lightning explorer.png differ diff --git a/BTC/Basic/explorer/imgs of mempool/5.Documentation.png b/BTC/Basic/explorer/imgs of mempool/5.Documentation.png new file mode 100644 index 000000000..1f7c17ec5 Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/5.Documentation.png differ diff --git a/BTC/Basic/explorer/imgs of mempool/6.Graphs.png b/BTC/Basic/explorer/imgs of mempool/6.Graphs.png new file mode 100644 index 000000000..8e7e822c8 Binary files /dev/null and b/BTC/Basic/explorer/imgs of mempool/6.Graphs.png differ diff --git a/BTC/Basic/hdwallet/README.md b/BTC/Basic/hdwallet/README.md new file mode 100644 index 000000000..b1562429c --- /dev/null +++ b/BTC/Basic/hdwallet/README.md @@ -0,0 +1,37 @@ +HD钱包,全称为分层确定性钱包(Hierarchical Deterministic Wallet),是一种通过单一的种子(Seed)生成和管理多个密钥对的数字钱包。这种结构使得用户只需备份一次种子,即可控制所有衍生出的私钥和公钥,极大地简化了密钥管理的复杂性。 + +**HD钱包的主要特点:** + +1. **分层结构:** HD钱包采用树状结构,根节点由主密钥(Master Key)组成,子节点为从主密钥派生出的子密钥。这种分层设计允许用户根据需要生成不同层级的密钥,方便管理和分配。 + +2. **确定性:** 通过相同的种子,HD钱包可以生成相同的密钥序列。这意味着只要备份了种子,就可以在任何时候恢复所有的密钥和地址。 + +3. **增强的隐私性:** HD钱包可以为每笔交易生成不同的地址,避免重复使用同一地址,从而提高交易的隐私性。 + +**HD钱包的工作原理:** + +- **种子生成:** 用户首先生成一个随机数作为种子,通常通过助记词(Mnemonic)表示。助记词是一组易于记忆的单词序列,用于表示种子。 + +- **主密钥派生:** 通过种子,使用特定的算法(如HMAC-SHA512)生成主私钥和主公钥。 + +- **子密钥派生:** 从主密钥可以派生出多个子密钥,每个子密钥又可以派生出自己的子密钥,形成树状结构。这种派生过程可以根据需要进行多层次的扩展。 + +**HD钱包的优势:** + +- **简化备份:** 用户只需备份一次种子或助记词,即可恢复所有的密钥和地址,避免了逐个备份每个私钥的麻烦。 + +- **灵活的密钥管理:** 分层结构允许用户根据不同的用途或账户生成不同的子密钥,方便管理。 + +- **增强的安全性:** 通过生成不同的地址,减少了地址关联性,提升了交易的隐私性和安全性。 + +**HD钱包的标准:** + +HD钱包的概念最早由BIP32提案提出,随后BIP39引入了助记词的标准,BIP44则定义了多币种、多账户的路径标准。这些标准共同构建了当前HD钱包的基础。 + +**注意事项:** + +- **妥善保管助记词:** 助记词是恢复钱包的唯一凭证,一旦丢失或泄露,可能导致资产无法找回或被盗。 + +- **定期备份:** 虽然HD钱包简化了备份过程,但仍需定期检查备份的有效性,确保在需要时能够成功恢复。 + +总的来说,HD钱包通过分层确定性的设计,提供了高效、安全且灵活的密钥管理方式,已成为当前数字货币钱包的主流选择。 \ No newline at end of file diff --git a/BTC/Basic/hdwallet/derive.md b/BTC/Basic/hdwallet/derive.md new file mode 100644 index 000000000..442c1585c --- /dev/null +++ b/BTC/Basic/hdwallet/derive.md @@ -0,0 +1,124 @@ +HD钱包(Hierarchical Deterministic Wallet)通过分层确定性结构生成和管理密钥对。其核心在于通过种子生成主密钥,然后通过分层推导生成多个子密钥。这种方式使得密钥管理变得简单、安全,用户只需备份种子即可恢复整个钱包。以下是HD钱包的详细技术细节和子密钥推导过程。 + +### 1. **HD钱包结构概述** +- **种子(Seed)**:HD钱包从一个随机生成的种子开始,该种子通过助记词(BIP39)表示。 +- **主密钥(Master Key)**:由种子生成,包含主私钥、主公钥和链码。 +- **链码(Chain Code)**:用于生成子密钥,是密钥派生过程中的关键成分。 +- **子密钥**:从主密钥派生而来,每个子密钥都有自己的私钥、公钥和链码。 + +### 2. **种子生成** +- **助记词**:助记词由熵(随机位数)通过哈希和校验生成。例如,一个128位的熵可以生成12个助记词。 +- **种子生成算法**: + - 助记词经过PBKDF2(Password-Based Key Derivation Function 2)算法与一个盐值(通常是 `mnemonic` + 密码短语)组合,生成512位种子。 + +### 3. **主密钥生成** +- 使用HMAC-SHA512算法,以种子作为输入,和常量字符串“Bitcoin seed”作为HMAC密钥来生成512位输出。 +- 输出前256位为主私钥(`m`),后256位为链码(`c`)。 + + **HMAC计算公式**: + ``` + I = HMAC-SHA512(key="Bitcoin seed", data=seed) + ``` + ``` + master_private_key = I[0:32] + master_chain_code = I[32:64] + ``` + +### 4. **子密钥推导过程** +子密钥推导是HD钱包中生成子密钥的核心过程,可以通过**标准派生**和**硬化派生**来实现。 + +#### a. **标准派生(Non-hardened derivation)** +- 使用父公钥和链码推导子公钥,公钥和链码可以生成下一级的公钥链,但无法推导出私钥。 +- 算法: + ``` + I = HMAC-SHA512(key=cpar, data=serP(Kpar) || ser32(i)) + ``` + - `cpar`:父链码。 + - `serP(Kpar)`:父公钥的序列化形式。 + - `ser32(i)`:索引值的32位表示。 + - `I` 分成两部分:`IL`(左半部分)和 `IR`(右半部分)。 + +- 子私钥计算公式: + ``` + ki = (IL + kpar) % n + ci = IR + ``` + - `ki`:子私钥。 + - `n`:椭圆曲线的阶。 + +#### b. **硬化派生(Hardened derivation)** +- 使用父私钥生成子私钥。硬化派生增加了安全性,不能从子公钥推导出父密钥。 +- 算法: + ``` + I = HMAC-SHA512(key=cpar, data=0x00 || ser256(kpar) || ser32(i)) + ``` + - `0x00` 前缀用于表示该派生使用的是私钥。 + - `kpar` 是父私钥。 + - `ci = IR` 是子链码。 + +- 子私钥计算公式: + ``` + ki = (IL + kpar) % n + ci = IR + ``` + +### 5. **路径表示** +BIP44引入了用于多币种和多账户的标准路径表示: +``` +m / purpose' / coin_type' / account' / change / address_index +``` +- **`purpose'`**:通常为44',表示使用BIP44规范。 +- **`coin_type'`**:用于区分不同的加密货币,比如0'代表比特币,60'代表以太坊。 +- **`account'`**:账户编号,用于分离不同的账户。 +- **`change`**:0表示外部地址,1表示找零地址。 +- **`address_index`**:地址在账户中的索引。 + +同时在BIP49和BIP84中也基于BIP44做了扩展,形成我们现在经常见到的BTC多个地址 + +#### Legacy地址 - BIP44 +![Legacy:BIP44](./imgs/hd-wallets-derivation-paths-bip44.png) + +#### P2SH地址 - BIP49 +![Legacy:BIP49](./imgs/hd-wallets-derivation-paths-bip49.png) + +#### P2WPKH地址 - BIP84 +![Legacy:BIP84](./imgs/hd-wallets-derivation-paths-bip84.png) + + +### 6. **ECC与HD钱包** +HD钱包使用椭圆曲线加密(Elliptic Curve Cryptography, ECC)来确保公钥和私钥的安全性。公钥由私钥通过椭圆曲线点乘生成。标准加密算法如 `secp256k1` 在HD钱包中被广泛使用。 + +**公钥生成公式**: +``` +P = k * G +``` +- `P` 是公钥,`k` 是私钥,`G` 是椭圆曲线的生成点。 + +### 7. **实现细节示例** +使用JavaScript库实现HD钱包的生成和子密钥推导: + +```javascript +const bip32 = require('bip32'); +const bip39 = require('bip39'); + +// 生成助记词和种子 +const mnemonic = bip39.generateMnemonic(); +const seed = bip39.mnemonicToSeedSync(mnemonic); + +// 从种子生成HD钱包根节点 +const root = bip32.fromSeed(seed); + +// 派生路径:m/44'/0'/0'/0/0 +const child = root.derivePath("m/44'/0'/0'/0/0"); + +console.log('助记词:', mnemonic); +console.log('子公钥:', child.publicKey.toString('hex')); +console.log('子私钥:', child.toWIF()); +``` + +### 8. **安全性与注意事项** +- **助记词备份**:确保助记词安全存储,一旦丢失或泄露,可能导致资产永久损失或被盗。 +- **硬化派生的使用**:硬化派生确保公钥无法推导出父级私钥,提高了安全性,建议在生成重要的子密钥时使用。 + +### **总结** +HD钱包通过分层结构和确定性算法,为用户提供了简单的密钥管理方式。其分层树结构和子密钥推导机制使得一个种子就能生成无限数量的私钥和公钥,极大地提高了用户体验和安全性。 \ No newline at end of file diff --git a/BTC/Basic/hdwallet/extendKeys.md b/BTC/Basic/hdwallet/extendKeys.md new file mode 100644 index 000000000..9102d4de8 --- /dev/null +++ b/BTC/Basic/hdwallet/extendKeys.md @@ -0,0 +1,104 @@ +HD钱包中的**扩展公钥(Extended Public Key, xPub)**和**扩展私钥(Extended Private Key, xPriv)**是BIP32标准的一部分,它们是用于派生子密钥和管理钱包的关键概念。以下是它们的详细技术介绍。 + +### 1. **扩展密钥的定义** +- **扩展私钥(xPriv)**:包含私钥和链码的信息,允许派生出子私钥和子公钥。 +- **扩展公钥(xPub)**:包含公钥和链码的信息,只能派生出子公钥,无法推导出私钥。 + +![extend keys](./imgs/hd-wallets-extended-keys.png) + +### 2. **扩展密钥的组成** +扩展密钥不仅包括公钥或私钥,还包括链码(Chain Code)、路径信息等,以支持分层确定性派生。扩展密钥的完整组成如下: + +- **公钥/私钥**:用于加密和签名的密钥。 +- **链码**:确保子密钥派生时的不可预测性,提供额外的随机性。 +- **深度(Depth)**:当前密钥的层级深度,根节点为0。 +- **父公钥指纹(Parent Fingerprint)**:标识父密钥,用于防止路径冲突。 +- **索引(Index)**:指示该密钥在父密钥下的派生索引。 +- **版本(Version)**:指示密钥类型(xPub 或 xPriv)。 +- **校验和**:用于验证密钥完整性。 + +### 3. **扩展密钥的编码格式** +扩展密钥通常以Base58Check格式进行编码,确保其易于人类读取和传输。Base58Check编码避免了易混淆的字符(如0和O,l和I)。编码后的扩展密钥通常以以下前缀开头: +- **xPub**:用于表示扩展公钥。 +- **xPriv**:用于表示扩展私钥。 + +#### **编码示例** +扩展密钥的编码格式如下: +``` +[version (4 bytes)][depth (1 byte)][parent fingerprint (4 bytes)][child number (4 bytes)] +[chain code (32 bytes)][key data (33 bytes)][checksum (4 bytes)] +``` + +### 4. **生成扩展私钥和扩展公钥** +#### a. **生成扩展私钥** +扩展私钥是通过HMAC-SHA512生成的。算法步骤如下: +- 生成主私钥和链码时,将种子输入HMAC-SHA512,并使用“Bitcoin seed”作为密钥。 +- 输出前32字节是私钥,后32字节是链码。 + +#### b. **生成扩展公钥** +从扩展私钥可以生成扩展公钥,通过椭圆曲线加密(ECC)运算将私钥转换为公钥。 + +**扩展公钥生成步骤**: +- 取扩展私钥的前32字节(私钥部分),并将其转换为公钥。 +- 保留链码和其他元数据。 + +### 5. **子密钥派生过程** +扩展密钥的强大之处在于,它们支持通过链码进行分层确定性派生,生成子密钥而不需要暴露父级的私钥。 + +#### a. **从扩展私钥派生子私钥** +扩展私钥可以派生子私钥和子公钥。 +- **算法**: + ``` + I = HMAC-SHA512(key=parent_chain_code, data=0x00 || parent_private_key || child_index) + ``` + - `I` 的前32字节用作派生的子私钥的一部分,后32字节用作新的子链码。 + - 子私钥公式:`child_private_key = (IL + parent_private_key) % n`。 + +#### b. **从扩展公钥派生子公钥** +扩展公钥只能派生子公钥,无法反推出私钥,确保了安全性。 +- **算法**: + ``` + I = HMAC-SHA512(key=parent_chain_code, data=parent_public_key || child_index) + ``` + - 子公钥通过公钥加法计算得出。 + - 子公钥公式:`child_public_key = G * IL + parent_public_key`(`G` 为椭圆曲线生成点)。 + + +![why-it-works](./imgs/hd-wallets-extended-keys-why-it-works.png) + +### 6. **硬化派生与标准派生** +- **硬化派生**(Hardened Derivation):只能通过扩展私钥派生,子公钥无法通过扩展公钥派生出来,增加了安全性。索引大于等于 `2^31` 的值用于硬化派生。 +- **标准派生**(Non-Hardened Derivation):可以通过扩展公钥派生出子公钥,索引小于 `2^31`。 + +### 7. **用途和安全性** +- **xPub的应用**:适用于公开应用,如钱包软件中用来显示和管理多个收款地址。通过扩展公钥,第三方可以生成新的地址而不接触私钥。 +- **xPriv的应用**:仅用于安全环境,绝不能公开,以防止密钥泄露。 + +**安全注意事项**: +- **保护扩展私钥**:xPriv的泄露意味着整个密钥树的私钥都处于危险中。 +- **使用硬化派生**:在可能被公开的路径中,建议使用硬化派生来确保私钥安全。 + +### 8. **示例代码** +以下是使用JavaScript库生成扩展密钥的示例代码: + +```javascript +const bip32 = require('bip32'); +const bip39 = require('bip39'); + +// 生成助记词和种子 +const mnemonic = bip39.generateMnemonic(); +const seed = bip39.mnemonicToSeedSync(mnemonic); + +// 生成根节点 +const root = bip32.fromSeed(seed); + +// 获取扩展公钥和扩展私钥 +const xPriv = root.toBase58(); +const xPub = root.neutered().toBase58(); + +console.log('扩展私钥 (xPriv):', xPriv); +console.log('扩展公钥 (xPub):', xPub); +``` + +### **总结** +扩展公钥(xPub)和扩展私钥(xPriv)是HD钱包中的核心概念,提供了派生和管理子密钥的能力。xPriv 可以派生子私钥和子公钥,而 xPub 只能派生子公钥。使用这些扩展密钥,用户和开发者可以实现灵活的密钥管理,同时保证密钥的安全性。 \ No newline at end of file diff --git a/BTC/Basic/hdwallet/imgs/entry-to-mnemonic.png b/BTC/Basic/hdwallet/imgs/entry-to-mnemonic.png new file mode 100644 index 000000000..6c910099d Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/entry-to-mnemonic.png differ diff --git a/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip44.png b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip44.png new file mode 100644 index 000000000..53548c84e Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip44.png differ diff --git a/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip49.png b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip49.png new file mode 100644 index 000000000..bd1db95d5 Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip49.png differ diff --git a/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip84.png b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip84.png new file mode 100644 index 000000000..fc6667196 Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/hd-wallets-derivation-paths-bip84.png differ diff --git a/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys-why-it-works.png b/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys-why-it-works.png new file mode 100644 index 000000000..79cb14a13 Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys-why-it-works.png differ diff --git a/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys.png b/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys.png new file mode 100644 index 000000000..4615602eb Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/hd-wallets-extended-keys.png differ diff --git a/BTC/Basic/hdwallet/imgs/mnemonic-to-seed.jpeg b/BTC/Basic/hdwallet/imgs/mnemonic-to-seed.jpeg new file mode 100644 index 000000000..664314fae Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/mnemonic-to-seed.jpeg differ diff --git a/BTC/Basic/hdwallet/imgs/seed-to-root.png b/BTC/Basic/hdwallet/imgs/seed-to-root.png new file mode 100644 index 000000000..dfdbb47d4 Binary files /dev/null and b/BTC/Basic/hdwallet/imgs/seed-to-root.png differ diff --git a/BTC/Basic/hdwallet/mnemonic.md b/BTC/Basic/hdwallet/mnemonic.md new file mode 100644 index 000000000..9d358a867 --- /dev/null +++ b/BTC/Basic/hdwallet/mnemonic.md @@ -0,0 +1,88 @@ +HD钱包中的助记词(Mnemonic Phrase)是一组人类可读的单词,用来表示随机生成的种子。助记词为用户提供了一个易于备份和恢复的钱包方式,极大地简化了复杂的密钥管理。以下是HD钱包助记词的详细技术原理: + +### 1. **助记词的定义和作用** +助记词是一串用来帮助用户记忆种子的单词序列。HD钱包使用助记词来生成用于派生密钥的种子,因此只要备份助记词,就可以恢复整个钱包的密钥树。 + +### 2. **助记词生成的步骤** +助记词生成过程基于BIP39标准,涉及以下步骤: + +#### a. **生成熵(Entropy)** +- **熵的定义**:熵是用于随机生成助记词的随机位序列。常见的熵长度有128位、160位、192位、224位和256位。 +- **例子**:假设熵为128位,它会生成12个单词的助记词。 + +#### b. **计算校验和(Checksum)** +- 将熵进行SHA-256哈希,取哈希结果的前 `ENT / 32` 位作为校验和,其中 `ENT` 是熵的位长度。 +- **例子**:如果熵是128位,则校验和为 `128 / 32 = 4` 位。 + +#### c. **组合熵和校验和** +- 将原始熵和校验和组合,形成一个新的位序列。例如,128位熵加上4位校验和形成132位序列。 + +#### d. **分割为11位块** +- 将132位的位序列分割为多个11位的块,每个块可以表示0到2047之间的一个数字。 +- 这些数字用于从一个2048个单词的字典(BIP39单词表)中查找对应的单词。 + + +![entry-to-mnemonic.png](./imgs/entry-to-mnemonic.png) + +### 3. **BIP39单词表** +- **固定单词表**:BIP39定义了一个包含2048个单词的标准单词表。这些单词具有以下特点: + - 每个单词都有明确的拼写,不易混淆。 + - 单词表的不同语言版本保持一致性,但使用的是本地语言词汇。 + +### 4. **种子生成** +助记词本身并不能直接用于密钥派生。助记词需要经过密码学处理生成一个种子,种子用来生成HD钱包的主私钥和链码。 + +#### a. **PBKDF2函数** +- 助记词通过PBKDF2-HMAC-SHA512算法与一个盐值组合,生成512位种子。 +- **盐值**:通常是 `mnemonic` 加上一个用户提供的密码短语(可选),增强了安全性。 +- **算法**: + ```text + seed = PBKDF2(mnemonic, "mnemonic" + passphrase, 2048, 64, HMAC-SHA512) + ``` + + +![mnemonic-to-seed.png](./imgs/mnemonic-to-seed.jpeg) + + +### 5. **助记词的恢复** +当用户输入助记词进行恢复时,钱包软件会执行以下步骤: +- 将助记词映射回原始熵和校验和。 +- 验证助记词是否有效(检查校验和)。 +- 使用PBKDF2函数将助记词和用户输入的密码短语(如果有)转换为种子。 +- 通过该种子生成HD钱包的主私钥和链码,从而恢复整个密钥树。 + + +![seed-to-root.png](./imgs/seed-to-root.png) + + +### 6. **助记词的优点** +- **易于记忆和备份**:助记词比纯随机的密钥更容易记住和存储。 +- **便于恢复**:只要用户保留助记词,就可以在任何支持BIP39的HD钱包中恢复整个钱包。 +- **增加安全性**:通过密码短语增强了助记词的安全性。如果助记词被泄露,攻击者仍然需要知道密码短语才能恢复钱包。 + +### 7. **助记词的安全注意事项** +- **备份和存储**:助记词应以离线方式备份,如写在纸上并存放在安全的地方。不要将助记词存储在联网设备上。 +- **密码短语**:使用一个复杂且不易猜测的密码短语可以大大提高安全性,即使助记词被盗,攻击者也无法轻易访问钱包。 +- **防止物理和电子威胁**:确保助记词的存储位置防范火灾、盗窃或电子攻击。 + +### 8. **技术示例** +以下是使用JavaScript库生成助记词和种子的示例代码: + +```javascript +const bip39 = require('bip39'); + +// 生成12个单词的助记词 +const mnemonic = bip39.generateMnemonic(); +console.log('助记词:', mnemonic); + +// 验证助记词是否合法 +const isValid = bip39.validateMnemonic(mnemonic); +console.log('助记词是否合法:', isValid); + +// 将助记词转换为种子 +const seed = bip39.mnemonicToSeedSync(mnemonic, '可选的密码短语'); +console.log('生成的种子:', seed.toString('hex')); +``` + +### **总结** +HD钱包的助记词系统提供了一种安全、便捷的方式来管理和恢复钱包。助记词通过熵、校验和、PBKDF2算法生成种子,从而衍生出一棵密钥树。理解助记词的原理有助于用户更好地保护自己的数字资产,同时也能帮助开发者实现符合BIP39标准的钱包应用。 \ No newline at end of file diff --git a/BTC/Basic/payment/P2PKH.md b/BTC/Basic/payment/P2PKH.md new file mode 100644 index 000000000..8a086dba0 --- /dev/null +++ b/BTC/Basic/payment/P2PKH.md @@ -0,0 +1,87 @@ +# 简介 + +[P2PKH(Pay-to-Public-Key-Hash)](../wallet/address.js#L42)是比特币网络中最常用的一种交易类型,设计用来将比特币支付到某个具体的公钥哈希,而不是直接到公钥本身。这种方式提供了更高的安全性和隐私保护。在P2PKH交易中,比特币被发送到一个地址,这个地址实际上是持有者公钥的哈希版本。这种地址通常以数字"1"开头。地址不仅简洁,而且通过哈希公钥,隐藏了公钥的实际内容,增加了隐私保护层。 + +# 工作过程 + +## ScriptPubKey(锁定脚本) + +P2PKH脚本模式包含一个公钥哈希,该哈希和以下操作码共同构成锁定脚本 + +```js +// 模版 +OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + +OP_DUP // 复制栈顶的元素 +OP_HASH160 // 弹出栈顶元素,计算其SHA-256散列,然后计算RIPEMD-160散列 +OP_PUSHBYTES_20 // 推送20字节的公钥哈希到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 公钥哈希 +OP_EQUALVERIFY // 比较栈顶元素是否匹配 +OP_CHECKSIG // 验证数字签名 + +``` + +## ScriptSig(解锁脚本) + +要解锁花费此脚本,上面公钥的所有者需要提供原始公钥以及的有效签名 + +```js +// 模版 + + +OP_PUSHBYTES_72 // 推送72字节到栈顶 +3045022100c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e02205aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a772401 // 签名数据 +OP_PUSHBYTES_33 // 推送33字节到栈顶 +03480b6822120e9936b43859d84c380583c3d0292409b21453ae962815090f8117 // 压缩公钥 +``` + +## 执行过程 + +1. 脚本合并,ScriptSig在前ScriptPubKey在后 + +```js + OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG +``` + +2. 栈内执行 + +- OP_DUP 从栈里取出公钥,复制并做HASH160推进栈顶 +- OP_EQUALVERIFY 对比上一步的计算结果和Public Key Hash +- OP_CHECKSIG 校验数字签名,如果通过锁定脚本合法可以花费对应UTXO,如果不通过交易失败 + +## 地址生成 + +P2PKH支付方式从公钥生成地址遵循以下详细步骤: + +### 步骤1: 计算公钥哈希 + +1. **计算公钥的SHA-256哈希值**:首先,对公钥进行SHA-256哈希运算。 +2. **计算RIPEMD-160哈希值**:然后,对SHA-256的结果再进行RIPEMD-160哈希运算。这两步哈希运算的结果称为公钥哈希(PKH)。 + +### 步骤2: 添加版本字节 + +- **添加版本字节**:在公钥哈希前添加一个版本字节(比特币主网络的P2PKH地址的版本是0x00, 测试网是0x6f)。这有助于钱包软件识别和处理不同类型的地址。 + +### 步骤3: 计算校验和 + +1. **双重SHA-256哈希**:对带有版本字节的公钥哈希进行两次SHA-256哈希运算。 +2. **取前四个字节**:从双重哈希的结果中取出前四个字节,这部分称为校验和。 + +### 步骤4: 生成地址 + +- **组合和Base58编码**:将版本字节和公钥哈希以及校验和组合在一起,整个结构为: + ```js + [version byte][public key hash][checksum] + ``` + 然后,对整个字节串进行Base58编码,以生成最终的P2PKH地址。 + +### 示例 + +假设有一个公钥,步骤如下: + +1. **公钥**: `022c3ee7cdb92394e32e82ec5bc8860c8888df6a9910537e90c75079726a2a8469` +2. **SHA-256哈希**:计算结果: `98a21cf747c0fcd80845afffa2260feb64aa7cc2b73ac681407b25229bad3bbc`。 +3. **RIPEMD-160哈希**:计算结果: `999ff7726530ed0d0a7eb3b7442c5143f643f638`。 +4. **添加版本字节**:`00` + [RIPEMD-160哈希结果]。 +5. **计算校验和**:对上述结果执行两次SHA-256,取前四个字节。 +6. **Base58编码**:将最终字节串转换为Base58编码:`1F1J22NAAgnNHXNojT7W8GfP9JSXXjTV8N` diff --git a/BTC/Basic/payment/P2SH-P2PKH.md b/BTC/Basic/payment/P2SH-P2PKH.md new file mode 100644 index 000000000..3ec7e608d --- /dev/null +++ b/BTC/Basic/payment/P2SH-P2PKH.md @@ -0,0 +1,113 @@ +# 简介 + +[P2SH-P2PKH(Pay to Script Hash - Pay to Public Key Hash)](../wallet/address.js#L43)是一种混合地址类型,结合了P2SH(支付到脚本哈希)和P2PKH(支付到公钥哈希)的特点。这种地址类型旨在增强比特币交易的灵活性和安全性。`P2SH`是在2012年通过比特币改进提案BIP 0016引入的,允许用户发送比特币到一个脚本的哈希值,而不是直接发送到公钥的哈希值。这样做的好处是可以隐藏脚本的具体细节,只有在花费比特币时才需要揭示。这对于实现更复杂的交易类型(如多重签名)非常有用。`P2SH-P2PKH`结合了`P2SH`和`P2PKH`的特性。在这种地址类型中,交易输出不是直接支付到公钥哈希,而是支付到一个包含`P2PKH`脚本的`P2SH`地址。`P2SH-P2PKH`地址通常以“3”开始,不同于传统的`P2PKH`地址,后者以“1”开始。这种地址类型是比特币地址方案中的一种进阶形式,适用于需要额外安全或复杂交易类型的用户。 + +# 工作过程 + +## ScriptPubKey(锁定脚本) + +在P2SH-P2PKH交易中,锁定脚本不直接包含传统的P2PKH脚本。相反,它包含了对应P2PKH脚本的哈希值。锁定脚本的形式如下: + +```js +// 模版 +OP_HASH160 OP_EQUAL +其中 +scriptHash = hash160(OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG) + +OP_HASH160 // 弹出栈顶元素,计算其SHA-256散列,然后计算RIPEMD-160散列 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 脚本哈希 +OP_EQUAL // 比较栈顶两个元素相等 +``` + +## ScriptSig(解锁脚本) + +要解锁花费此脚本,上面公钥的所有者需要提供公钥,有效签名以及原始脚本 + +```js +// 模版 + + +OP_PUSHBYTES_72 // 推送72字节到栈顶 +3045022100c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e02205aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a772401 // 签名数据 +OP_PUSHBYTES_33 // 推送33字节到栈顶 +03480b6822120e9936b43859d84c380583c3d0292409b21453ae962815090f8117 // 压缩公钥 +OP_PUSHBYTES_25 // 推送25字节到栈顶 +76a9148876d7c7a76e29c4c9d160c066fead1d2adfe5a788ac // 赎回脚本 +``` + +## 执行过程 + +1. 脚本合并,ScriptSig在前ScriptPubKey在后 + +```js + OP_HASH160 OP_EQUAL + +其中 +redeemScript = OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + +scriptHash = hash160(OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG) +``` + +2. 栈内执行 + +- 提取和验证`redeemScript`: + 首先,从`ScriptSig`中提取`redeemScript`。 + 然后,计算`redeemScript`的哈希值,并检查它是否与`ScriptPubKey`中的``相匹配。 + +- 执行`redeemScript`: + 如果`redeemScript`的哈希值验证通过,接下来的步骤是执行`redeemScript`本身。 + 这时,栈中应该已经有了签名``和公钥``。 + redeemScript首先复制公钥`OP_DUP`,计算公钥的哈希`OP_HASH160`,并与栈中的公钥哈希``进行比较`OP_EQUALVERIFY`。 + 如果公钥哈希匹配,最后一步是验证签名是否正确`OP_CHECKSIG`。这一步检查提供的签名是否是用相关的私钥对交易的其余部分进行了签名。 + +- 完成验证: + 如果以上步骤都成功,说明交易中的资金可以被花费,否则交易将被拒绝。 + +## 地址生成 + +P2SH-P2PKH地址生成遵循以下步骤,这些步骤与生成P2PKH地址的步骤相似,但涉及一些关键的不同之处,特别是在脚本的使用和版本字节的应用上。 + +### 步骤1: 创建并哈希化 `P2PKH` 脚本 + +1. **创建 `P2PKH` 脚本**: + - 构建一个典型的P2PKH脚本:`OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG`,其中``是公钥的RIPEMD-160哈希。 +2. **计算脚本的SHA-256哈希值**: + - 对整个脚本进行SHA-256哈希运算。 +3. **计算RIPEMD-160哈希值**: + - 接着,对SHA-256的结果再进行RIPEMD-160哈希运算。这个哈希值称为脚本哈希(Script Hash)。 + +### 步骤2: 添加版本字节 + +- **添加版本字节**: + - 在脚本哈希前添加版本字节(比特币主网络的P2SH地址的版本是0x05, 测试网是0xc4)。这有助于钱包软件识别和处理P2SH地址。 + +### 步骤3: 计算校验和 + +1. **双重SHA-256哈希**: + - 对带有版本字节的脚本哈希进行两次SHA-256哈希运算。 +2. **取前四个字节**: + - 从双重哈希的结果中取出前四个字节作为校验和。 + +### 步骤4: 生成地址 + +- **组合和Base58编码**: + - 将版本字节、脚本哈希以及校验和组合在一起,结构如下: + ```js + [version byte][script hash][checksum] + ``` + - 然后,对整个字节串进行Base58编码,生成最终的P2SH-P2PKH地址。 + +### 示例 + +假设有一个公钥,步骤如下: + +1. **公钥**: `04480b6822120e9022c3ee7cdb92394e32e82ec5bc8860c8888df6a9910537e90c75079726a2a8469936b43859d84c380583c3d0292409b21453ae962815090f8117883c2a3fd7571b12f34491809d48467dae4e2f162aef23de91e4532d0fc1e0c5` +2. **SHA-256哈希**:计算结果: `98a21cf747c0fcd80845afffa2260feb64aa7cc2b73ac681407b25229bad3bbc` +3. **RIPEMD-160哈希**:计算结果: `999ff7726530ed0d0a7eb3b7442c5143f643f638` +4. **创建并哈希化 P2PKH 脚本**: + 创建一个P2PKH脚本:OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG。 + 计算脚本哈希:将整个P2PKH脚本进行SHA-256哈希运算,然后再进行RIPEMD-160哈希运算,生成脚本哈希。 +5. **添加版本字节**:`05` + [RIPEMD-160哈希结果]。 +6. **计算校验和**:对上述结果执行两次SHA-256,取前四个字节。 +7. **Base58编码**:将最终字节串转换为Base58编码:`3NB2grHkCeer9o7Guvr6qCXCsDsjX3mTan` diff --git a/BTC/Basic/payment/P2TR.md b/BTC/Basic/payment/P2TR.md new file mode 100644 index 000000000..b457a6840 --- /dev/null +++ b/BTC/Basic/payment/P2TR.md @@ -0,0 +1,68 @@ +# 简介 + +[P2TR(Pay to Taproot)](../wallet/address.js#L45)是一种使用Taproot技术的比特币地址类型,由BIP 0341在2020年正式引入。Taproot是通过使用Schnorr签名和MAST(Merkelized Abstract Syntax Trees)来增强比特币的隐私性和效率。Taproot Output 是版本为 1 的隔离见证 Output,统一了这两种形式。P2TR 的 Output 的 scriptPubKey 字段是一样的,我们无法从 Output 的格式来得知这个 Output 是由 Schnorr 签名锁定(即 Key Path)还是由脚本锁定(即 Script Path),这样有更好的隐私。这种类型的地址支持更复杂的条件,同时在外部看起来与普通交易无异。P2TR地址通常使用Bech32m编码格式,以“bc1p”开始。 + +# 工作过程 + +## ScriptPubKey(锁定脚本) + +在P2TR交易中,锁定脚本包括: + +```js +// 模版 +OP_1 + + +OP_1 // 表示版本号,对于P2TR是1 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // tweaked-public-key +``` + +- `OP_1`:标识Taproot版本号,目前为1。 +- ``:是tweak公钥的X坐标,key path和script path在生成方式上不同,采用32字节的压缩格式。 + +## Witness(见证数据) + +解锁P2TR输出,需要在见证字段提供以下信息,具体取决于花费条件: + +```js +// 模版 +[signature] [control block] [script] + +01 // Witness 元素的个数 +40 // schnorr签名长度 +743bbb3df4e95df5e70c2a3e72dd9d05933a018ad1bbd4b700841824ed18bebbc54d1b4d03b252aaa5c373390c68ba119fdf70e0bab71694a4db0da3fe8fefcc // schnorr签名 +``` + +- `signature`:Schnorr签名。 +- `control block`:如果是通过脚本路径花费,包含与Taproot脚本路径相关的数据 +- `script`:如果是通过脚本路径花费,此处包含实际脚本。 + +## 执行过程 + +P2TR分为key path和script path,通过在花费 P2TR UTXO 时,Witness 中包含元素个数来区分,只包含一个元素签名的即为key path。签名算法可以参考[Schnorr](../signature/README.md#L105),P2TR的验签过称可以参考[taproot](https://aandds.com/blog/bitcoin-taproot.html) + +## 地址生成 + +P2TR地址包含key path和script path两种情况,目前常见的钱包支持基于用户公钥的key path地址,改地址的生成过程如下: + +### 步骤1: 获取用户公钥 + +获取用户公钥的`internalPubkey`坐标 `P` + $P = toXOnly(internalPubkey)$ + +### 步骤2: 计算扭曲公钥 + +$Q = P + t\*G = P + TaggedHash('TapTweak', P)G$ + +### 步骤3: Bech32m编码 + +使用Bech32m编码方案将曲公钥编码为一个P2TR地址。这种编码格式提供了比Bech32更好的错误校验能力。 + +### 示例 + +假设有一个公钥的X坐标,步骤如下: + +1. **公钥X坐标**: `2c3ee7cdb92394e32e82ec5bc8860c8888df6a9910537e90c75079726a2a8469` +2. **扭曲公钥X坐标**: `84d67b14669b9eccf5fa76ac48294527e44e829a4534f0e695061e5a1a5a5c20` +3. **Bech32m编码**:将扭曲公钥X坐标转换为Bech32m编码:`bc1psnt8k9rxnw0vea06w6kys229yljyaq56g560pe54qc095xj6tssq3fpwfp` diff --git a/BTC/Basic/payment/P2WPKH.md b/BTC/Basic/payment/P2WPKH.md new file mode 100644 index 000000000..f8884e9a6 --- /dev/null +++ b/BTC/Basic/payment/P2WPKH.md @@ -0,0 +1,71 @@ +# 简介 + +[P2WPKH(Pay to Witness Public Key Hash)](../wallet/address.js#L44)是一种新型地址格式,它是隔离见证(SegWit)的一部分,由比特币改进提案BIP 0141在2017年引入。这种地址类型主要目的是减小交易的大小,从而降低手续费,同时增加交易的修改抵抗力(malleability resistance)。`P2WPKH`简化了标准的`P2PKH`地址脚本,将签名和公钥信息从交易的脚本部分移至见证部分,这样做有助于更高效的签名验证和交易大小的减小。`P2WPKH`地址通常以“bc1”开始,使用Bech32编码格式,与传统的`P2PKH`和`P2SH`地址格式(分别以“1”和“3”开始)显著不同。 + +# 工作过程 + +## ScriptPubKey(锁定脚本) + +在P2WPKH交易中,锁定脚本变得非常简洁: + +```js +// 模版 +OP_0 + +OP_0 // 表示版本号,对于P2WPKH是0 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 公钥哈希 +``` + +- `OP_0`:表示版本号,对于P2WPKH是0。 +- ``:是公钥的SHA-256哈希后再进行RIPEMD-160哈希的结果,和传统P2PKH的处理方式相同。 + +## Witness(见证数据) + +为了解锁P2WPKH输出,需要在见证字段提供以下信息: + +```js +// 模版 + + +02 // 见证数据的数量 +48 // 第一个见证数据的长度72字节 +3045022100a5eec95c65d2dd679e8fdcc10668d5d51446f24d1557859cb543e570201257c6022011df04f803a08c97de213ddf211ad193045ff25e59857324a28656de1961351c01 // 签名数据 +21 // 第二个见证数据的长度33字节 +0295f97f41d0d523bddf39e77e16cc0dda2e56b9bd9fdea10133656635b2c28a39 // 压缩公钥 +``` + +## 执行过程 + +1. 脚本合并同P2PKH,使用Witness替换ScriptSig在前,ScriptPubKey在后 + +```js + OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG +``` + +2. 栈内执行通P2PKH + +- OP_DUP 从栈里取出公钥,复制并做HASH160推进栈顶 +- OP_EQUALVERIFY 对比上一步的计算结果和Public Key Hash +- OP_CHECKSIG 校验数字签名,如果通过锁定脚本合法可以花费对应UTXO,如果不通过交易失败 + +## 地址生成 + +P2WPKH地址的生成过程如下: + +### 步骤1: 计算公钥哈希 + +- 使用公钥生成哈希:首先对公钥进行SHA-256,然后进行RIPEMD-160哈希运算。 + +### 步骤2: Bech32编码 + +- 使用Bech32编码方案将公钥哈希编码为一个P2WPKH地址。这包括将数据与校验和一起编码,提供了更好的错误检测能力。 + +### 示例 + +假设有一个公钥,步骤如下: + +1. **公钥**: `022c3ee7cdb92394e32e82ec5bc8860c8888df6a9910537e90c75079726a2a8469` +2. **SHA-256哈希**:计算结果: `98a21cf747c0fcd80845afffa2260feb64aa7cc2b73ac681407b25229bad3bbc` +3. **RIPEMD-160哈希**:计算结果: `999ff7726530ed0d0a7eb3b7442c5143f643f638` +4. **Bech32编码**:将最终字节串转换为Bech32编码:`bc1qnx0lwun9xrks6zn7kwm5gtz3g0my8a3cqde85n` diff --git a/BTC/Basic/payment/README.md b/BTC/Basic/payment/README.md new file mode 100644 index 000000000..962955520 --- /dev/null +++ b/BTC/Basic/payment/README.md @@ -0,0 +1,38 @@ +# BTC地址 + +在比特币系统中,随着技术的发展和用户需求的变化,钱包现在支持多种不同类型的地址格式,每种格式都对应不同的技术标准和特点。这些地址格式包括传统的P2PKH(以1开头),P2SH(以3开头),以及更加现代的SegWit地址(通常以bc1q或bc1p开头)。进行交易时,我们需要为收款者创建一个交易输出,这个输出指定了收款方的地址和交易的金额。 + +# BTC地址到交易完成 + +下面以P2PKH(Pay-to-Public-Key-Hash)为例介绍从比特币收款地址到交易构建的详细步骤: + +1. 收款地址的获取和格式 + 收款方提供一个P2PKH类型的比特币地址,这种地址通常以数字1开始,例如 1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2。这个地址是经过编码的,通常使用Base58Check编码,其中包含了收款方的公钥哈希(public key hash)。 + +2. Base58Check解码 + 当付款方接收到一个比特币地址后,他们会使用Base58Check解码来提取地址中的公钥哈希。Base58Check编码不仅帮助减少字符混淆(移除了容易混淆的字符如0(零)、O(大写字母O)、I(大写字母i)和l(小写字母L)),还内嵌了一个错误检测机制。 + +3. 构建锁定脚本(ScriptPubKey) + 解码过程提取出的公钥哈希接着用来构建一个所谓的锁定脚本(ScriptPubKey),这个脚本是交易输出的一部分。对于P2PKH地址,锁定脚本的格式通常如下: + +```js +OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG +``` + +4. 构建交易 + 付款方将锁定脚本放置在新的交易输出中,并指定转账金额。这个输出现在会被添加到新的交易中。除此之外,交易还需要包含至少一个输入(来自付款方的一个或多个以前的交易输出),这些输入提供了足够的资金来覆盖转账金额和网络矿工费。 + +5. 签名和广播交易 + 一旦交易构建完毕,付款方需要用他们的私钥对交易进行签名,证明他们有权使用指定的输入资金。完成签名后,交易将被广播到比特币网络,网络的矿工们开始验证这个交易的合法性,如果合法,最终将其加入到区块链中,完成资金的转移。 + +# 常见支付方式 + +| 支付方式 | 全称 | 地址前缀 | 脚本类型 | 主要特点 | 示例地址 | +|----------|-------------------------|----------|----------|-------------------------------------------------|---------------| +| [P2PKH](./P2PKH.md) | Pay-to-Public-Key-Hash | 1 | P2PKH | 最常用,公钥哈希方式,隐私性好,地址以 "1" 开头 | 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa | +| [P2SH](./P2SH-P2PKH.md) | Pay-to-Script-Hash | 3 | P2SH | 支付到脚本的哈希值,支持复杂的脚本,地址以 "3" 开头 | 3J98t1WpEZ73CNmQviecrnyiWrnqRhWNLy | +| [P2WPKH](./P2WPKH.md) | Pay-to-Witness-Public-Key-Hash | bc1q | P2WPKH | 使用隔离见证(SegWit),更低交易费用,地址以 "bc1q" 开头 | bc1qar0srrr7xf6h4g1ks7zft6wz7x4n7pkjkcn6lq | +| P2WSH | Pay-to-Witness-Script-Hash | bc1q | P2WSH | 使用隔离见证,支持复杂脚本,地址以 "bc1q" 开头 | bc1qrp33g0q0s6fphxtww9g4ndzsd74ny3rps6m74dxg7mjsg5c0z9rhdj | +| [P2TR](./P2TR.md) | Pay-to-Taproot | bc1p | P2TR | 使用 Taproot 功能,优化脚本执行和隐私,地址以 "bc1p" 开头 | bc1p4gr63h6fp9hrkwpf4sjwx4s34a5w6b6ptfhl5k7vph3ykq6s5h7gx5m | + + diff --git a/BTC/Basic/signature/README.md b/BTC/Basic/signature/README.md new file mode 100644 index 000000000..570236925 --- /dev/null +++ b/BTC/Basic/signature/README.md @@ -0,0 +1,167 @@ +# 比特币中的数字签名 + +## ECDSA +比特币(BTC)在设计初期使用椭圆曲线数字签名算法(ECDSA)来保证交易的安全性。ECDSA在比特币中的应用提供了强大的安全性,保证交易不可篡改且可验证。它是确保比特币网络信任和安全的关键技术之一。 + +### 椭圆曲线密码学基础 +椭圆曲线定义:在比特币中,通常使用的是secp256k1椭圆曲线。这条曲线在一个有限域上定义,具有一定的形状,能够提供高强度的加密保护。 +公钥和私钥:私钥是一个随机选定的数,而公钥是由私钥通过椭圆曲线的数学运算得出的点。 + +### 生成签名的过程 +使用私钥创建签名:签名是使用交易发起者的私钥生成的。这个过程包括对交易的哈希值进行加密处理。 +签名组成:ECDSA签名由两部分组成,通常表示为(r, s)。 +r:是椭圆曲线点的x坐标。 +s:是对交易信息、私钥和一个随机数的数学运算的结果。 + +### 验证签名的过程 +使用公钥验证签名:接收方或网络节点使用发送方的公钥来验证签名。如果签名是有效的,这表明交易是由拥有相应私钥的人发起的,从而保证了交易的真实性和不可否认性。 +确保安全性:只有创建签名的私钥持有者才能生成有效的签名,而计算私钥本身几乎是不可能的,因为这需要在有限的时间内解决非常复杂的数学问题。 + +### 比特币中的应用 +交易认证:比特币交易使用ECDSA签名来验证交易的合法性。每笔交易都包括至少一个输入(来源资金)和一个输出(目的地资金)。 +防止篡改:ECDSA签名保证了一旦交易被签名,任何对交易内容的修改都会使签名失效,从而防止了交易的篡改。 + +椭圆曲线密码学提供了比传统的RSA算法更高的安全性,这意味着即使使用更短的密钥,也能提供同等甚至更高的安全性。 + +### 数学公式 +#### 密钥生成 (genKey) +1. 随机产生私钥 $d$,选点 $G$。 +2. 计算公钥 $Q = d \* G $ + +注意事项: $G$点阶数 $n$,但是根据椭圆曲线随机选点 $G$却是计算出来难点。 + +#### 加密 (encrypt) +1. 选择随机数r的点 $k = r \* G $,随机数r。 +2. 计算密文: $C_1 = M + r \* Q $, $C_2 = r \* G $ + +#### 解密 (decrypt) +1. $C_1 - d \* C_2 = M + r \* Q - r(d \* G) = M + r \* Q - r \* Q = M $ + +#### 签名 (sign) +1. 对消息m使用哈希算得摘要z,摘要 $z = hash(m)$ +2. 生成随机数 $k ∈ [1,n)$,计算点 $k = r \* G $ +3. 摘要 $z$, $R = k $,计算 $s = k^{-1}(z + rd) \mod n $,签名为 (r, s) +4. 计算 $s = k^{-1}(z + rd) \mod n $,签名 = (r, s) 即是进行授权协议 +5. 以上 $(r, s)$ 即为ECDSA签名 + +#### 验证 (verify) +使用公钥Q和消息m,对签名 $(r, s)$ 进行验证。 + +1. 验证 $r, s ∈ [1, n)$ +2. 计算 $z = hash(m)$ +3. 计算 $u_1 = z \* s^{-1} \mod n$ 和 $u_2 = r \* s^{-1} \mod n $ +4. 计算 $(x, y) = u_1 \* G + u_2 \* Q \mod n$ +5. 判断 $r == x$,若相等则验证签名正确 + +#### 恢复 (recover) +已知消息m和签名 $(r, s)$,恢复计算出公钥 $Q$ + +1. 验证 $r, s ∈ [1, n)$ +2. 计算 $R = (x, y)$,其中 $x = r, y + r, y + nr, y + 2nr, ...,$ 代入R到曲线方程计算得到R +3. 计算 $z = hash(m)$ +4. 计算 $u_1 = z \* r^{-1} \mod n$ 和 $u_2 = s \* r^{-1} \mod n$ +5. 计算公钥 $Q = (x', y') = u_1 \* G + u_2 \* R $ + +### 签名分析 +#### 签名内容 +对于使用ECDSA的比特币交易,签名通常包括两部分:r 和 s,每部分通常是32字节,但也可能因数字的大小而稍有变化。因此,一个典型的ECDSA签名大约是64字节,但当包括签名编码和额外的元数据(如签名哈希类型)时,长度可能会变长。 +#### 签名的具体长度 +具体到比特币的签名,它通常包括以下几个部分: +- r值:32字节 +- s值:32字节 +- 签名哈希类型(SIGHASH):通常是1字节 +此外,签名还可能包括序列化格式的前缀(如0x30),以及长度描述符,这些都会增加几个字节。 + +#### 签名案例 +```js +// 签名 +3045022100c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e02205aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a772401 +``` + +##### DER编码的ECDSA签名结构 +一个典型的ECDSA签名的DER编码格式如下: +- 0x30: 表示这是一个序列(SEQUENCE),后面跟随的是整个序列的长度。 +- 紧接着的第一个字节(或两个字节,取决于长度)是整个签名结构的长度。 +- 0x02: 表示一个整数(INTEGER)的开始,这是签名的第一部分,即r值。 +- 紧接着的一个字节(或两个字节)是r值的长度。 +- r值本身。 +- 另一个0x02,表示第二个整数的开始,这是签名的第二部分,即s值。 +- 紧接着的一个字节(或两个字节)是s值的长度。 +- s值本身。 +##### 分析具体内容 +1. 30: 序列开始。 +2. 45: 表示序列的长度(十进制的69字节)。 +3. 02: r值的整数开始。 +4. 21: r值的长度(十进制的33字节,包含前导0,因为r值开始于00,这通常用于表示正数以避免整数被误认为负数)。 +5. 00c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e: r值。 +6. 02: s值的整数开始。 +7. 20: s值的长度(十进制的32字节)。 +8. 5aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a7724: s值。 +9. 最后的01是签名的SIGHASH类型,表示这是一个标准的所有输出签名。 + +## Schnorr +比特币的Schnorr签名是一种相对较新的签名算法,它与传统的椭圆曲线数字签名算法(ECDSA)相比,提供了几个关键优势。在2020年的比特币协议升级中,Schnorr签名通过BIP340提案得到了引入。以下是Schnorr签名的详细介绍: + +### Schnorr签名概述 +发明者:Schnorr签名由Claus Schnorr提出。 +算法特性:Schnorr签名基于椭圆曲线密码学,与ECDSA使用相同的椭圆曲线。 +简洁性和效率:Schnorr签名比ECDSA更简洁、高效。它生成的签名更小,处理速度更快。 + +### Schnorr签名的优势 +线性性:Schnorr签名具有线性特性,使得多签名(multi-signature)操作更简单有效。这意味着可以将多个签名组合成一个单一签名,从而减少数据的大小和处理时间。 +隐私和安全性:Schnorr签名提升了隐私和安全性。它使得各种复杂的交易类型(如多签名交易)在区块链上看起来与普通交易无异,从而提高了隐私性。 +防止重放攻击:Schnorr签名包含额外的措施来防止重放攻击,这是ECDSA所缺乏的。 + +### 比特币中的应用 +简化多签名:Schnorr签名简化了比特币网络中的多签名交易处理,减少了数据量和验证所需的时间。 +批量验证:Schnorr签名支持批量验证,允许网络同时验证多个签名,提高了整体效率。 +Taproot升级:结合Schnorr签名的Taproot升级为比特币引入了更高的效率和隐私性。 + +### 签名过程 +私钥和公钥:与ECDSA一样,Schnorr签名使用一对私钥和公钥。 +签名生成:签名是使用私钥和交易的哈希值生成的。Schnorr签名的计算相对简单,它包括了一些线性数学运算。 + +### 全性和效率 +安全性:Schnorr签名被认为至少与ECDSA同等安全,有些专家认为其安全性更高。 +效率和可扩展性:签名的大小和验证的效率对于比特币网络的可扩展性至关重要。Schnorr签名在这方面表现优异。 + +Schnorr签名在比特币中的引入被视为一个重大进步,它提高了交易的隐私性、效率和可扩展性。随着时间的推移,预计Schnorr签名将在比特币网络中发挥越来越重要的作用。 + +### 数学公式 +#### 密钥生成 (genKey) +1. 在群的阶 $n$ 内随机选择一个私钥 $d$,通常从 $[1, n)$ 区间选择。 +2. 计算公钥 $Q = d \cdot G$,其中 $G$ 是椭圆曲线上的基点。 + +#### 签名 (sign) +1. 从 $[1, n)$ 区间内随机选取一个数 $k$。 +2. 计算 $r = (k \cdot G).x$(即 $k \cdot G$ 点的x坐标)。 +3. 计算签名 $s = (k + d \cdot \text{hash}(m)) \mod n$,这里 $\text{hash}(m)$ 是消息 $m$ 的哈希值。 +4. 签名结果是一个元组 $(r, s)$。 + +#### 验证 (verify) +1. 计算 $u1 = \text{hash}(m) \cdot s^{-1} \mod n$。 +2. 计算 $u2 = r \cdot s^{-1} \mod n$。 +3. 计算点 $R' = u1 \cdot G + u2 \cdot Q$。 +4. 验证 $r$ 是否等于 $R'$ 的x坐标,如果相等,则签名有效。 + +#### 恢复 (recover) +假设我们有一个有效的Schnorr签名 $(r, s)$ 和消息 $m$,以下是计算公钥的步骤: +1. 计算消息的哈希值 $e = \text{hash}(m)$。 +2. 计算签名 $s = k + e \cdot d$。 +3. 进行 $k \cdot G$ 运算得到 $s \cdot G = k \cdot G + e \cdot d \cdot G$ 即 $s \cdot G = R + e \cdot Q$。 +4. 最后,公钥 $Q = (s \cdot G - R) / e$ 计算出来。 +5. 其中 $r$ 是 $R$ 的x坐标,可以计算得到 $R$。 + + + + +## ECDSA VS Schnorr + +| 特性 | ECDSA | Schnorr | +|------------|-------------------------------------------|----------------------------------------------| +| 安全性 | 基于椭圆曲线离散对数问题的困难性。随机数重用或泄露会暴露私钥。 | 基于椭圆曲线离散对数问题的困难性。对随机数的选择不敏感,即使随机数可预测,也相对安全。 | +| 效率 | 签名和验证相对复杂,计算量大。 | 签名和验证过程更高效,特别是在批量操作时。 | +| 可组合性 | 无签名可组合性。 | 支持签名聚合,可将多个签名合并为一个。 | +| 签名大小 | 包含两个等长的整数`(r, s)`。 | 同样包含`(r, s)`对,但因可组合性,最终可能存储更少的签名数据。 | +| 隐私与可证明性 | 无额外隐私保护或可证明性。 | 签名可组合性可用于增强隐私和提供非交互式的多方协议。 | +| 实际应用 | 在众多标准和协议中广泛使用,如比特币和以太坊早期版本。 | 由于技术发展被越来越多的系统采纳,例如比特币的BIP 340提案。 | diff --git a/BTC/Basic/signature/ecdsa.js b/BTC/Basic/signature/ecdsa.js new file mode 100644 index 000000000..8d56540d3 --- /dev/null +++ b/BTC/Basic/signature/ecdsa.js @@ -0,0 +1,29 @@ +import ecpair from 'ecpair'; +import * as tinysecp from 'tiny-secp256k1'; +import crypto from 'crypto'; + +/// In this example, we first generate a new private key and corresponding public key. +/// We then create a simulated transaction hash (in a real application, this would be the actual hash of the transaction) and use the private key to sign this hash. +/// Finally, we verify that the signature is valid. + +const { ECPairFactory } = ecpair; +const ECPair = ECPairFactory(tinysecp); + +// Generate a new random private key +const keyPair = ECPair.makeRandom(); +const privateKey = keyPair.privateKey; +const publicKey = keyPair.publicKey; + +console.log('private key:', privateKey.toString('hex')); +console.log('public key:', publicKey.toString('hex')); + +// Create a hypothetical transaction hash, usually this will be the hash of the real transaction you want to sign +const txHash = crypto.randomBytes(32); + +// signature transaction +const signature = keyPair.sign(txHash); +console.log('signature:', signature.toString('hex')); + +// verify transaction +const isValid = keyPair.verify(txHash, signature); +console.log('signature is valid:', isValid); diff --git a/BTC/Basic/signature/ecdsaPSBT.js b/BTC/Basic/signature/ecdsaPSBT.js new file mode 100644 index 000000000..8b6d0e346 --- /dev/null +++ b/BTC/Basic/signature/ecdsaPSBT.js @@ -0,0 +1,46 @@ +import ecpair from 'ecpair'; +import * as tinysecp from 'tiny-secp256k1'; +import bitcoin from 'bitcoinjs-lib'; + +/// In this example, We get keyPair from WIF. +/// We then construct a PSBT with one input (which you're spending) and one output (where you're sending bitcoins). +/// The PSBT is signed using the private key. +/// Finally, we build the PSBT and print its hexadecimal representation. + +const { ECPairFactory } = ecpair; +const ECPair = ECPairFactory(tinysecp); + +// Get keyPair from WIF +const keyPair = ECPair.fromWIF('L2uPYXe17xSTqbCjZvL2DsyXPCbXspvcu5mHLDYUgzdUbZGSKrSr'); + +// Create a new PSBT with the first input of the transaction +let psbt = new bitcoin.Psbt() + .addInput({ + hash: '7d067b4a697a09d2c3cff7d4d9506c9955e93bff41bf82d439da7d030382bc3e', + index: 0, + nonWitnessUtxo: Buffer.from( + '0200000001f9f34e95b9d5c8abcd20fc5bd4a825d1517be62f0f775e5f36da944d9' + + '452e550000000006b483045022100c86e9a111afc90f64b4904bd609e9eaed80d48' + + 'ca17c162b1aca0a788ac3526f002207bb79b60d4fc6526329bf18a77135dc566020' + + '9e761da46e1c2f1152ec013215801210211755115eabf846720f5cb18f248666fec' + + '631e5e1e66009ce3710ceea5b1ad13ffffffff01905f0100000000001976a9148bb' + + 'c95d2709c71607c60ee3f097c1217482f518d88ac00000000', + 'hex' + ), + }) + .addOutput({ + address: '1KRMKfeZcmosxALVYESdPNez1AP1mEtywp', + value: 80000, + }); + +// Sign the first input with the key +psbt.signInput(0, keyPair); + +// Finalize the inputs +psbt.finalizeAllInputs(); + +// Extract the transaction +const rawTx = psbt.extractTransaction().toHex(); + +// Print the transaction +console.log(`Raw Transaction: ${rawTx}`); diff --git a/BTC/Basic/signature/ecdsaTransaction.js b/BTC/Basic/signature/ecdsaTransaction.js new file mode 100644 index 000000000..15359e2ba --- /dev/null +++ b/BTC/Basic/signature/ecdsaTransaction.js @@ -0,0 +1,42 @@ +import ecpair from 'ecpair'; +import * as tinysecp from 'tiny-secp256k1'; +import bitcoin from 'bitcoinjs-lib'; + +/// In this example, We create a new private key and its corresponding public key. +/// We then construct a transaction with one input (which you're spending) and one output (where you're sending bitcoins). +/// The transaction is signed using the private key. +/// Finally, we build the transaction and print its hexadecimal representation. + +const { ECPairFactory } = ecpair; +const ECPair = ECPairFactory(tinysecp); + +// Securely generate and store the private key. Here, we use a randomly generated private key for demonstration. +const keyPair = ECPair.makeRandom(); +const { address } = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey }); +const privateKey = keyPair.privateKey.toString('hex'); + +console.log(`Address: ${address}`); +console.log(`Private Key: ${privateKey}`); + +// Replace the following with a real transaction hash and the corresponding index of the output you want to spend. +const txHash = Buffer.from('c8c5b5a17a07c7cecdbdece070843fb074ae039400a26c27861927dab26631b5', 'hex'); // This should be a real transaction hash +const txId = 1; // Typically 0 or 1 + +// Create a new transaction builder +const transaction = new bitcoin.Transaction(); + +// Add the input (the transaction hash and index) +transaction.addInput(txHash, txId); + +// Add the output (recipient address and amount in satoshis) +transaction.addOutput(Buffer.alloc(0), 10000); // The amount you want to send, in satoshis + +// Sign the transaction with the private key of the input +const hash = transaction.hashForSignature(0, Buffer.from('001494fea8dd42d30e583fdf39537fb7e2ee0533e6b7', 'hex'), 0); +const signature = keyPair.sign(hash); +transaction.setInputScript(0, bitcoin.script.compile([signature, keyPair.publicKey])); + +// Build the transaction and get its hex representation +const tx = transaction.toHex(); + +console.log(`Transaction: ${tx}`); diff --git a/BTC/Basic/signature/package.json b/BTC/Basic/signature/package.json new file mode 100644 index 000000000..bf4ec8502 --- /dev/null +++ b/BTC/Basic/signature/package.json @@ -0,0 +1,17 @@ +{ + "name": "btc-wallet", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "bitcoinjs-lib": "^6.1.5", + "ecpair": "^2.1.0", + "tiny-secp256k1": "^2.2.3" + } +} diff --git a/BTC/Basic/signature/schnorr.js b/BTC/Basic/signature/schnorr.js new file mode 100644 index 000000000..e6f24db93 --- /dev/null +++ b/BTC/Basic/signature/schnorr.js @@ -0,0 +1,30 @@ +import ecpair from 'ecpair'; +import * as tinysecp from 'tiny-secp256k1'; +import crypto from 'crypto'; + +/// In this example, we first generate a new private key and corresponding public key. +/// We create a dummy transaction hash. In a real scenario, this would be the hash of your transaction data. +/// We generate a Schnorr signature using the private key and the transaction hash. +/// Finally, we verify that the signature is valid. + +const { ECPairFactory } = ecpair; +const ECPair = ECPairFactory(tinysecp); + +// Generate a new random private key +const keyPair = ECPair.makeRandom(); +const privateKey = keyPair.privateKey; +const publicKey = keyPair.publicKey; + +console.log('private key:', privateKey.toString('hex')); +console.log('public key:', publicKey.toString('hex')); + +// Create a hypothetical transaction hash, usually this will be the hash of the real transaction you want to sign +const txHash = crypto.randomBytes(32); + +// signature transaction +const signature = keyPair.signSchnorr(txHash); +console.log('Schnorr Signature:', signature.toString('hex')); + +// verify transaction +const isValid = keyPair.verifySchnorr(txHash, signature); +console.log('signature is valid:', isValid); diff --git a/BTC/Basic/tools/README.md b/BTC/Basic/tools/README.md new file mode 100644 index 000000000..d0668975e --- /dev/null +++ b/BTC/Basic/tools/README.md @@ -0,0 +1,26 @@ +# BTC工具目录 + +欢迎访问比特币工具目录!随着比特币和其他加密货币的流行,对于普通用户而言,理解其背后的技术变得越来越重要。本目录旨在提供一系列易于使用的工具,帮助您深入了解比特币的基本原理、操作和技术细节。 + + +## 可用工具 + +### [dust计算](./dust.md) + +- **描述**:在比特币网络中,“尘埃”(Dust)是一个专有术语,它指的是一种非常小的比特币金额,这种金额小到它的交易费用可能会超过这笔金额本身的价值。因此,从经济角度来看,发送这样一笔交易是不划算的。 +- **影响**:尘埃限制的存在主要是为了防止网络被大量的微小交易所拥堵,这些交易可能是无效的或试图进行“尘埃攻击”(发送大量的小额交易到多个地址,以试图追踪这些地址的所有者)。因此,比特币网络通过设置尘埃限制来保护网络不被这种小额交易滥用。 + +### [base58 编码/解码](./base58.md) + +- **描述**:Base58是一种二进制到文本的编码方式,主要用于编码比特币地址。 +- **使用方法**:Base58编码主要用于生成人类可读的公钥哈希(即比特币地址)和私钥的可导入格式。这样的格式不仅容易被人识别和处理,也方便在不同的应用和服务之间进行交易和管理。 + +### [Bech32 编码/解码](./bech32.md) + +- **描述**:Bech32 是一种字符编码方案,设计用于提高比特币地址的可读性和纠错能力。它是一种人类可读的编码方式,主要用于比特币隔离见证(SegWit)地址的表示。 +- **使用方法**:Bech32 编码用于生成比特币隔离见证地址(例如,P2WPKH 和 P2WSH 地址)。它采用了一个包含 32 个字符的字符集,使得地址既易于手动输入,又具有较强的错误检测能力。Bech32 地址以“bc1”开头,后跟若干字符,提供了更高的错误检测能力和更好的用户体验。 + +### [Bech32m 编码/解码](./bech32m.md) + +- **描述**:Bech32m 是 Bech32 的一种变体,专门用于 Taproot 地址的编码。它与 Bech32 在结构上类似,但引入了不同的错误检测机制,以增强对 Taproot 地址的支持。 +- **使用方法**:Bech32m 编码用于生成 Taproot 地址,这种地址以“bc1p”开头。Bech32m 提供了改进的错误检测能力,适合用于 Taproot 地址的使用。它在 Bech32 基础上增加了一些功能,确保 Taproot 地址具有更好的数据完整性和错误校验能力。 \ No newline at end of file diff --git a/BTC/Basic/tools/base58.md b/BTC/Basic/tools/base58.md new file mode 100644 index 000000000..f84aeb825 --- /dev/null +++ b/BTC/Basic/tools/base58.md @@ -0,0 +1,91 @@ +Base58 是一种用于将大数字转换为可读的文本格式的编码方案,广泛用于比特币以及其他多种加密货币的地址。与常见的 Base64 编码类似,Base58 是一种二进制到文本的编码,设计它的主要目的是为了减少混淆并增加地址的可读性。 + +### 特点 + +Base58 编码具有几个显著的特点,使其适合用于加密货币地址: + +1. **去除视觉上易混淆的字符**:Base58编码不使用数字"0",大写字母"O",大写字母"I",和小写字母"l",因为这些字符在视觉上容易与其他字符混淆。 +2. **无标点符号**:Base58不包含标点符号,这减少了在抄写或读取地址时出错的可能性。 +3. **编码效率**:Base58 编码是紧凑的,它使得编码的数据相对较短,便于分享和书写。 +4. **大小写敏感**:Base58是大小写敏感的,增加了编码的字符集,从而提高了每个字符的信息容量。 + +### Base58 字符集 + +Base58使用以下58个字符作为其字母表: + +``` +123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz +``` + +注意这里没有0, O, I, l,这是为了避免在读写时的混淆。 + +### 应用 + +在比特币和许多其他加密货币中,Base58编码主要用于生成人类可读的公钥哈希(即比特币地址)和私钥的可导入格式。这样的格式不仅容易被人识别和处理,也方便在不同的应用和服务之间进行交易和管理。 + +### 技术实现 + +Base58 编码涉及将大整数转换为一种基于58的数制系统。编码过程通常包括以下步骤: + +1. 将初始数据(例如,比特币地址的哈希值)转换为一个大整数。 +2. 将这个大整数重复除以58,同时记录每次除法的余数。 +3. 将余数用对应的Base58字符表示,直到整数部分为0。 +4. 将结果的字符反转,因为在计算过程中,第一个余数实际上对应最后一个Base58字符。 + +### 示例 + +##### 编码 + +```js +base10 = 123456789 + +123456789 % 58 = 19 <- remainder + 2128565 % 58 = 23 <- remainder + 36699 % 58 = 43 <- remainder + 632 % 58 = 52 <- remainder + 10 % 58 = 10 <- remainder + +base58 = [10][52][43][23][19] +base58 = BukQL +``` + +#### 解码 + +```js +base58 = BukQL + +L = 19 * 58^0 = 19 +Q = 23 * 58^1 = 1334 +k = 43 * 58^2 = 144652 +u = 52 * 58^3 = 10145824 +B = 10 * 58^4 = 113164960 + +base10 = 19 + 1334 + 144652 + 10145824 + 113164960 +base10 = 123456789 +``` + +### BTC中的应用 + +Base58 最初仅用于对BTC地址进行编码,在后来引入 WIF 私钥和扩展密钥时也使用Base58编码。 + +#### 前缀 + +在比特币中,在转换为 base58 之前,会向数据添加不同的前缀以影响结果的前导字符,这个前导字符有助于我们识别每个 base58 字符串代表什么。 + +| Hex Prefix | Base58首字符 | 类型 | 示例 | +| ---------- | ------------ | ------------ | --------- | +| 00 | 1 | 地址 (P2PKH) | 1mGqBH... | +| 05 | 3 | 地址 (P2SH) | 3JiUY4... | +| 80 | K, L, 或 5 | WIF私钥 | Lu38mr... | +| 0488ADE4 | xprv | 扩展私钥 | xprv9t... | +| 0488B21E | xpub | 扩展公钥 | xpub67... | + +#### base58 check + +Base58Check 编码是将某些数据编码为 base58 之前向某些数据添加校验和的缩写。 + +在BTC的base58编码时 + +1. 首先会对原始数据增加对应的prefix +2. 对上述结果执行两次SHA-256,取前四个字节做checkSum +3. 连接1和2的结果进行base58编码 diff --git a/BTC/Basic/tools/bech32.md b/BTC/Basic/tools/bech32.md new file mode 100644 index 000000000..74d733b46 --- /dev/null +++ b/BTC/Basic/tools/bech32.md @@ -0,0 +1,193 @@ +Bech32是一种编码格式,最初由Pieter Wuille等人在比特币改进提案[BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)中提出,主要用于比特币SegWit地址的编码方式。Bech32编码的目的是提供一种更友好的用户界面,并减少在抄写和输入时出现错误的风险。 + +### 核心特性 + +**1. 错误检测能力:** +Bech32地址包含一种错误检测代码,称为多项式校验码(PolyMod),可以检测并保护地址中最多4个错误的出现。 + +**2. 字符集:** +Bech32只使用小写字母和数字(除了1、b、i、o之外的小写字母和所有数字),从而避免了字母大小写的混淆和某些字母和数字之间的视觉相似性。 + +**3. 限制长度:** +一个Bech32编码的地址总是有一定的长度限制,比特币的SegWit地址最长为90个字符。 + +**4. 分隔符:** +Bech32地址中使用"1"作为分隔符来分开人类可读的部分(HRP,Human-readable part)和数据部分。 + +### 编码格式 + +Bech32地址的结构如下: + +\[ \text{HRP} + "1" + \text{数据编码} + \text{校验码} \] + +- **HRP(Human-readable part):** 这部分是地址的前缀,用来指示地址所用的网络,例如比特币主网的`bc`和测试网的`tb`。 +- **数据编码:** 使用的是一种叫做Base32的变种编码,将数据转换成32个字符集中的字符。 +- **校验码:** 是一组校验码字符,用于保护整个地址不受随机错误的影响。 + +Bech32是一种用于编码和解码比特币SegWit地址的格式,具体方法由[BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki)定义。编码和解码过程涉及多个步骤,包括数据的处理、转换以及校验。 + +在实际项目中可以使用JavaScript的常用库bech32实现的Bech32编码和解码。 +**Bech32编码示例** + +```js +const bech32 = require('bech32'); + +function encodeBech32(hrp, data) { + const words = bech32.toWords(Buffer.from(data)); + return bech32.encode(hrp, words); +} + +// 示例使用 +let hrp = 'bc'; +let data = '00112233445566778899aabbccddeeff'; // 假设这是要编码的数据 +let encoded = encodeBech32(hrp, data); +console.log('Encoded Bech32:', encoded); +``` + +**Bech32解码示例** + +```js +function decodeBech32(address) { + let decoded = bech32.decode(address); + decoded.data = Buffer.from(bech32.fromWords(decoded.words)).toString('hex'); + return decoded; +} + +// 使用之前编码的地址进行解码 +let decoded = decodeBech32(encoded); +console.log('Decoded Bech32:', decoded); +``` + +### Bech32编码过程 + +编码过程涉及以下步骤: + +1. **确定人类可读部分(HRP)和数据部分:** + + - HRP表示网络,比如比特币主网的`bc`,测试网的`tb`。 + - 数据部分包含经过编码的公钥或脚本哈希。 + +2. **将数据部分从8位字节转换为5位数组:** + + - Bech32使用Base32编码,这不同于传统的Base32。数据需要从其原始的8位字节形式(如在二进制文件中)转换为5位字节的数组。这种转换减少了数据的比特长度,并允许整个地址适应QR码等格式。 + +3. **计算校验码:** + + - 使用`PolyMod`算法计算出一个校验码,该算法可以提供错误检测功能。校验码计算依赖于HRP和转换后的数据。 + - 校验码有助于保护整个地址不受随机错误的影响。 + +4. **组合最终的Bech32地址:** + - 最终的Bech32地址由三部分组成:HRP、分隔符(`1`)、编码后的数据和校验码。 + - 示例:`bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4` + +### Bech32解码过程 + +解码过程涉及以下步骤: + +1. **验证地址的校验码:** + + - 使用相同的`PolyMod`算法验证地址中的校验码是否正确。如果校验失败,则地址有错误。 + +2. **分离HRP和编码数据:** + + - 从地址中分离出HRP和编码后的数据部分。这两部分由分隔符`1`分开。 + +3. **从5位数组转换回8位字节:** + + - 将从Bech32地址中提取的5位数组数据转换回原始的8位字节形式。这通常涉及二进制数据的重新分组。 + +4. **解析数据部分以获取原始的哈希或密钥信息:** + - 解码后的数据通常是某种形式的哈希值或公钥信息,这取决于具体的应用场景(如P2WPKH或P2WSH)。 + +`PolyMod`是一种特别设计用于Bech32编码系统中的多项式模运算算法。在Bech32地址格式中,`PolyMod`算法用于生成一个校验码,该校验码具有高错误检测能力,能够帮助确认地址在传输或书写过程中是否被错误修改。此算法是Bech32提案(BIP 173)的核心部分,对于保证地址的完整性和准确性至关重要。 + +### PolyMod算法的作用 + +在Bech32中,`PolyMod`算法的主要作用是计算一个校验码,这个校验码能够: + +- 检测到任何单一的错误。 +- 检测到任何相邻字符的交换。 +- 检测到最多四个错误的错误组合。 + +### PolyMod算法的实现步骤 + +`PolyMod`算法的计算可以分为以下几个步骤: + +1. **初始化**:设置一个初始变量`c`为1。 + +2. **处理HRP**:对于HRP(人类可读部分)中的每个字符,进行以下操作: + + - 将`c`向右移动5位。 + - 将字符的值与`c`进行异或(XOR)运算。 + - 对`c`进行一系列的模2多项式运算,通常这涉及到与几个固定的常数进行XOR运算,这些常数由Bech32规范定义。 + +3. **处理数据部分**:类似地处理数据部分中的每个5位值,包括: + + - 将`c`向右移动5位。 + - 将数据值与`c`进行异或运算。 + - 对`c`进行类似上述的模2多项式运算。 + +4. **生成校验码**:完成所有字符的处理后,将`c`与一个常数进行XOR运算,得到最终的校验码。这一步确保了校验码能够有效地反映整个地址的完整性。 + +** 示例代码 ** + +```js +function polymod(values) { + let generator = [0x3b6a57b2, 0x26508e6d, 0x1ea119fa, 0x3d4233dd, 0x2a1462b3]; + let chk = 1; + for (let value of values) { + let top = chk >> 25; + chk = ((chk & 0x1ffffff) << 5) ^ value; + for (let i = 0; i < 5; i++) { + if ((top >> i) & 1) { + chk ^= generator[i]; + } + } + } + return chk; +} + +function hrpExpand(hrp) { + let ret = []; + for (let p = 0; p < hrp.length; p++) { + ret.push(hrp.charCodeAt(p) >> 5); + } + ret.push(0); + for (let p = 0; p < hrp.length; p++) { + ret.push(hrp.charCodeAt(p) & 31); + } + return ret; +} + +function createChecksum(hrp, data) { + const values = hrpExpand(hrp).concat(data).concat([0, 0, 0, 0, 0, 0]); + const polymodValue = polymod(values) ^ 1; + let checksum = []; + for (let i = 0; i < 6; i++) { + checksum.push((polymodValue >> (5 * (5 - i))) & 31); + } + return checksum; +} + +// Example usage +let hrp = 'bc'; +let data = [2, 3, 4, 5, 6]; // Example data part (this should be your actual converted data) +let checksum = createChecksum(hrp, data); +console.log('Checksum:', checksum); +``` + +### 数学原理 + +`PolyMod`算法本质上是一个使用特定生成多项式的循环冗余校验(CRC)算法。这个生成多项式是经过选择的,能够最大化常见错误模式的检测能力,例如拼写错误、字符遗漏、错误插入等。 + +### 使用场景 + +Bech32地址主要用于比特币的SegWit交易,其中包括了P2WPKH(Pay to Witness Public Key Hash)和P2WSH(Pay to Witness Script Hash)类型的地址。这些地址类型通过减少交易大小来降低交易费用,同时提高交易的隐私性和效率。 + +### 优点 + +- **更高的错误检测能力:** Bech32的设计提供了强大的错误检测和纠正能力。 +- **用户友好:** 地址全小写,易于阅读和抄写。 +- **效率与兼容性:** 地址长度更短,适用于QR码等多种场景。 + +Bech32编码为比特币地址提供了一个更加安全和用户友好的格式,是比特币网络中SegWit技术的一个重要组成部分。 diff --git a/BTC/Basic/tools/bech32m.js b/BTC/Basic/tools/bech32m.js new file mode 100644 index 000000000..be7fd7e5e --- /dev/null +++ b/BTC/Basic/tools/bech32m.js @@ -0,0 +1,121 @@ +const CHARSET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'; + +// 将字符转换为数值 +function charToValue(char) { + const index = CHARSET.indexOf(char); + if (index === -1) { + throw new Error('Invalid character'); + } + return index; +} + +// 将数值转换为字符 +function valueToChar(value) { + return CHARSET[value]; +} + +// 多项式模数计算 Bech32 校验和 +function polymod(values) { + let checksum = 1; + for (let value of values) { + const top = checksum >> 25; + checksum = ((checksum & 0x1ffffff) << 5) ^ value; + for (let i = 0; i < 5; i++) { + if ((top >> i) & 1) { + checksum ^= (0x3b6a57b2 >> (5 * i)) & 0x1ffffff; + } + } + } + return checksum; +} + +// 扩展人类可读部分(HRP, Human-Readable Part)以帮助计算校验和 +function hrpExpand(hrp) { + const ret = []; + // 先将每个字符转换为其ASCII码除以32的余数 + for (let i = 0; i < hrp.length; i++) { + ret.push(hrp.charCodeAt(i) >> 5); + } + // 添加分隔符 + ret.push(0); + // 再将每个字符转换为其ASCII码的低5位 + for (let i = 0; i < hrp.length; i++) { + ret.push(hrp.charCodeAt(i) & 31); + } + return ret; +} + +// 计算校验和的最终值(Bech32m) +function createChecksum(hrp, data) { + const values = hrpExpand(hrp).concat(data).concat([0, 0, 0, 0, 0, 0]); + const polymodValue = polymod(values) ^ 0x2bc830a3; // Bech32m 标识多项式 + let result = []; + for (let i = 0; i < 6; ++i) { + result.push((polymodValue >> (5 * (5 - i))) & 31); + } + return result; +} + +// 验证校验和 +function verifyChecksum(hrp, data) { + const expandedHrp = hrpExpand(hrp); + const values = expandedHrp.concat(data); + return polymod(values) === 0x2bc830a3; // 对于 Bech32, 有效校验和会返回1, 对于 Bech32m 需要验证不同的常量 +} + +function convertBits(data, fromBits, toBits, pad = true) { + let acc = 0; + let bits = 0; + const ret = []; + const maxv = (1 << toBits) - 1; + for (let i = 0; i < data.length; ++i) { + let value = data[i]; + if (value < 0 || value >> fromBits !== 0) { + return null; + } + acc = (acc << fromBits) | value; + bits += fromBits; + while (bits >= toBits) { + bits -= toBits; + ret.push((acc >> bits) & maxv); + } + } + if (pad) { + if (bits > 0) { + ret.push((acc << (toBits - bits)) & maxv); + } + } else if (bits >= fromBits || (acc << (toBits - bits)) & maxv) { + return null; + } + return ret; +} + +function encodeBech32m(hrp, data) { + const combined = data.concat(createChecksum(hrp, data)); + let result = hrp + '1'; + for (let datum of combined) { + result += valueToChar(datum); + } + return result; +} + +function decodeBech32m(bech32mStr) { + const pos = bech32mStr.lastIndexOf('1'); + const hrp = bech32mStr.slice(0, pos); + const data = []; + for (let i = pos + 1; i < bech32mStr.length; ++i) { + data.push(charToValue(bech32mStr[i])); + } + if (!verifyChecksum(hrp, data)) { + throw new Error('Invalid checksum'); + } + return { hrp, data: data.slice(0, data.length - 6) }; +} + +const hrp = 'bc'; +const data = [15, 2, 20, 3, 5, 18]; // 随机示例数据 +const encoded = encodeBech32m(hrp, data); +console.log('Encoded:', encoded); + +const decoded = decodeBech32m(encoded); +console.log('Decoded:', decoded); diff --git a/BTC/Basic/tools/bech32m.md b/BTC/Basic/tools/bech32m.md new file mode 100644 index 000000000..7962fb6e9 --- /dev/null +++ b/BTC/Basic/tools/bech32m.md @@ -0,0 +1,325 @@ +# Bech32m + +`Bech32m` 是一种新的编码格式,用于比特币地址。它是 `Bech32` 格式的修改版本,主要用于支持 SegWit v1+ 的比特币地址(例如 Taproot 地址)。`Bech32m` 是为了解决原始 `Bech32` 编码中发现的一个错误而被提出和实现的。 + +## 简介 + +### 背景 + +`Bech32` 格式最初是在 [BIP 173](https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki) 中提出的,用于编码 SegWit(隔离见证)地址,这种格式的地址以 `bc1` 开头。然而,当 `Bech32` 用于新的 SegWit 版本时(即版本1及以上),由于错误检测机制存在问题,导致部分无效地址不会被正确地检测出来。 + +### Bech32m 的改进 + +为了解决这个问题,[BIP 350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki) 提出了 `Bech32m`,这是一个修改后的 `Bech32` 格式。它引入了一个新的校验和算法,提高了错误检测的能力,特别是适用于 SegWit v1 及更高版本的地址。这确保了编码的健壮性和安全性,尤其是在处理高版本的 SegWit 地址时。 + +### Bech32 与 Bech32m 的区别 + +主要区别在于校验和的计算方式。`Bech32` 使用的是一个固定的常数,而 `Bech32m` 使用了一个不同的常数来计算校验和。这一改变使得 `Bech32m` 能够更有效地捕捉到一些特定的错误,这些错误在原始的 `Bech32` 格式中可能无法检测到。 + +| 特性 | Bech32m | Bech32 | Base58 | +| -------------------- | ---------------------------- | -------------------------------- | ------------------------------ | +| **描述** | 改进的 SegWit 地址格式 | SegWit 地址格式 | 传统的比特币地址格式 | +| **BIP** | BIP 350 | BIP 173 | 无特定BIP,但参考 BIP 13/16 | +| **错误检测** | 改进的错误检测能力 | 强错误检测能力 | 较弱的错误检测能力 | +| **字符集** | 32字符集,不包括易混淆字符 | 32字符集,不包括易混淆字符 | 58字符集 | +| **地址前缀** | `bc1p` | `bc1` | `1` 或 `3` | +| **用途** | 支持 SegWit v1+ (如 Taproot) | 支持 SegWit v0 (P2WPKH 和 P2WSH) | 非 SegWit 和 SegWit P2SH | +| **校验和算法** | 修改的贝奇校验和算法 | 贝奇校验和算法 | Base58Check | +| **可读性和可扫描性** | 同 Bech32 | 更优的可读性和较低的打字错误率 | 较低的可读性和较高的打字错误率 | +| **推广程度** | Taproot更新后推广 | SegWit 地址的标准格式 | 比特币早期广泛使用 | + +### 格式和使用 + +- **格式**:`Bech32m` 地址的格式与 `Bech32` 相似,地址以 `bc1` 开头,随后是一个版本指示符,然后是编码的数据。 +- **使用**:自从 Bitcoin Core 0.21.1 版本开始支持 `Bech32m` 格式后,它被用于 Taproot 地址(即以 `bc1p` 开头的地址)。 + +## 编解码 + +在 JavaScript 中,使用 `bech32` 库来处理 `Bech32m` 的编码和解码同样非常直接。首先,你需要安装 `bech32` 库,它支持在 Node.js 环境中执行 `Bech32` 和 `Bech32m` 相关操作。 + +### 安装 `bech32` 库 + +在你的 Node.js 项目中,你可以通过 npm 或 yarn 来安装这个库: + +```bash +npm install bech32 +# 或者 +yarn add bech32 +``` + +### 编码示例 + +下面是如何将一组数据编码为 `Bech32m` 格式的示例: + +```javascript +const bech32 = require('bech32'); + +function encodeBech32m(data, hrp = 'bc') { + // 将数据从8位字节数组转换为5位数组 + const words = bech32.toWords(Buffer.from(data)); + + // 使用 bech32m 规范进行编码 + return bech32.encode(hrp, words, bech32.encodings.BECH32M); +} + +// 示例数据 +const data = [0x01, 0x02, 0x03, 0x04, 0x05]; + +// 编码 +const encoded = encodeBech32m(data); +console.log('Encoded Bech32m:', encoded); +``` + +### 解码示例 + +接下来是如何解码 `Bech32m` 格式的数据: + +```javascript +function decodeBech32m(bech32mStr) { + const decoded = bech32.decode(bech32mStr, bech32.encodings.BECH32M); + + // 将5位数组转换回8位字节 + const bytes = Buffer.from(bech32.fromWords(decoded.words)); + + return { + hrp: decoded.prefix, + data: bytes, + }; +} + +// 使用上面的编码结果进行解码 +const decoded = decodeBech32m(encoded); +console.log('Decoded data:', decoded.data); +``` + +## 编解码步骤 + +为了更深入理解 `Bech32m` 的编解码过程,让我们详细探讨其背后的数学和逻辑步骤。这种编码方式旨在提供更强的错误检测能力,并针对地址等用途进行优化。 + +### 核心组件和步骤 + +`Bech32m` 编解码涉及以下核心组件: + +1. **人类可读部分 (HRP)**:明确标识相关数据或网络的简短字符序列。 +2. **数据部分**:包括实际有效载荷和错误检测代码。 +3. **校验和算法**:生成和验证整个字符串的完整性。 + +### 编码过程 + +#### 1. 数据准备 + +将需要编码的数据(如公钥哈希)转换成一系列5位的数值,这是因为 `Bech32m` 的字符集能够表示从0到31的值,相比于完整的8位二进制表示,这种方式允许数据更有效地匹配到字符集。 + +**转换方法**:使用转换函数(如 `toWords`),将每个字节按位重新组合,从8位分组转换成5位分组。 + +#### 2. 计算校验和 + +`Bech32m` 使用一种多项式校验和算法,以确保传输的数据在传播过程中没有发生错误。这一算法基于BCH码,具体步骤如下: + +- **多项式定义**:使用特定的生成多项式进行计算,该多项式在设计时就考虑了捕获常见传输错误的需求。 +- **校验和的生成**:将HRP和数据部分一起,通过多项式算法生成一个32位的校验和。 + +#### 3. 结合数据 + +将转换后的数据与校验和结合,准备进行字符映射。 + +#### 4. 字符映射 + +使用 `Bech32m` 指定的字符集将数值转换为对应的字符,生成最终的编码字符串。字符集是一组32个字符,每个字符对应一个从0到31的值。 + +### 解码过程 + +解码是编码的逆过程,主要包括以下步骤: + +#### 1. 分离和验证 + +将输入的 `Bech32m` 字符串分解为HRP、数据部分和校验和。验证校验和以确认数据在传输过程中未被篡改或错误输入。 + +#### 2. 字符到数值的映射 + +将接收到的字符序列映射回相应的5位数值序列。 + +#### 3. 数据恢复 + +使用相同的位转换逻辑(反向操作 `fromWords`),将5位数值序列还原为原始的8位字节序列。 + +#### 4. 最终输出 + +提取数据,剔除校验和,返回原始数据和HRP。 + +## 拆解实现 + +### 1. 基础组件 + +首先,我们需要实现一些基础函数,包括多项式校验和计算和数据转换。 + +#### 多项式校验和 + +`Bech32m` 使用的多项式为 `x^5 + x^4 + x^3 + x^2 + 1`,我们需要一个函数来计算校验和: + +```javascript +const CHARSET = 'qpzry9x8gf2tvdw0s3jn54khce6mua7l'; + +// 将字符转换为数值 +function charToValue(char) { + const index = CHARSET.indexOf(char); + if (index === -1) { + throw new Error('Invalid character'); + } + return index; +} + +// 将数值转换为字符 +function valueToChar(value) { + return CHARSET[value]; +} + +// 多项式模数计算 Bech32 校验和 +function polymod(values) { + let checksum = 1; + for (let value of values) { + const top = checksum >> 25; + checksum = ((checksum & 0x1ffffff) << 5) ^ value; + for (let i = 0; i < 5; i++) { + if ((top >> i) & 1) { + checksum ^= (0x3b6a57b2 >> (5 * i)) & 0x1ffffff; + } + } + } + return checksum; +} + +// 扩展人类可读部分(HRP, Human-Readable Part)以帮助计算校验和 +function hrpExpand(hrp) { + const ret = []; + // 先将每个字符转换为其ASCII码除以32的余数 + for (let i = 0; i < hrp.length; i++) { + ret.push(hrp.charCodeAt(i) >> 5); + } + // 添加分隔符 + ret.push(0); + // 再将每个字符转换为其ASCII码的低5位 + for (let i = 0; i < hrp.length; i++) { + ret.push(hrp.charCodeAt(i) & 31); + } + return ret; +} + +// 计算校验和的最终值(Bech32m) +function createChecksum(hrp, data) { + const values = hrpExpand(hrp).concat(data).concat([0, 0, 0, 0, 0, 0]); + const polymodValue = polymod(values) ^ 0x2bc830a3; // Bech32m 标识多项式 + let result = []; + for (let i = 0; i < 6; ++i) { + result.push((polymodValue >> (5 * (5 - i))) & 31); + } + return result; +} + +// 验证校验和 +function verifyChecksum(hrp, data) { + const expandedHrp = hrpExpand(hrp); + const values = expandedHrp.concat(data); + return polymod(values) === 0x2bc830a3; // 对于 Bech32, 有效校验和会返回1, 对于 Bech32m 需要验证不同的常量 +} +``` + +#### 数据转换 + +使用5比特群(bits)的数据表示方式进行转换: + +```javascript +function convertBits(data, fromBits, toBits, pad = true) { + let acc = 0; + let bits = 0; + const ret = []; + const maxv = (1 << toBits) - 1; + for (let i = 0; i < data.length; ++i) { + let value = data[i]; + if (value < 0 || value >> fromBits !== 0) { + return null; + } + acc = (acc << fromBits) | value; + bits += fromBits; + while (bits >= toBits) { + bits -= toBits; + ret.push((acc >> bits) & maxv); + } + } + if (pad) { + if (bits > 0) { + ret.push((acc << (toBits - bits)) & maxv); + } + } else if (bits >= fromBits || (acc << (toBits - bits)) & maxv) { + return null; + } + return ret; +} +``` + +### 2. 编码和解码实现 + +接下来,使用上述基础组件实现编码和解码函数: + +#### 编码函数 + +```javascript +function encodeBech32m(hrp, data) { + const combined = data.concat(createChecksum(hrp, data)); + let result = hrp + '1'; + for (let datum of combined) { + result += valueToChar(datum); + } + return result; +} +``` + +#### 解码函数 + +```javascript +function decodeBech32m(bech32mStr) { + const pos = bech32mStr.lastIndexOf('1'); + const hrp = bech32mStr.slice(0, pos); + const data = []; + for (let i = pos + 1; i < bech32mStr.length; ++i) { + data.push(charToValue(bech32mStr[i])); + } + if (!verifyChecksum(hrp, data)) { + throw new Error('Invalid checksum'); + } + return { hrp, data: data.slice(0, data.length - 6) }; +} +``` + +### 3. 示例使用 + +```javascript +const hrp = 'bc'; +const data = [15, 2, 20, 3, 5, 18]; // 随机示例数据 +const encoded = encodeBech32m(hrp, data); +console.log('Encoded:', encoded); + +const decoded = decodeBech32m(encoded); +console.log('Decoded:', decoded); +``` + +这种方式将手动实现 `Bech32m` 编解码过程,展示了如何从基本原理开始构建此功能。 + +## 在BTC中的应用 + +#### SegWit 地址支持 + +- **SegWit v0 地址**:使用 `Bech32` 编码,这些地址以 `bc1q` 开头。 +- **SegWit v1+ 地址(包括 Taproot)**:使用 `Bech32m` 编码,这些地址以 `bc1p` 开头。 + +#### 优点 + +1. **更低的交易费用**:SegWit 地址允许比特币交易以更低的费用进行,因为它们更有效地利用区块空间。 +2. **增强的错误检测能力**:`Bech32m` 改进了校验和算法,提供了更强的错误检测能力,减少了地址输入错误的风险。 +3. **更好的用户体验**:地址全小写,易于手工抄写和阅读,减少了错误输入的机会。 + +#### Taproot 与 `Bech32m` + +Taproot 是比特币的一个重要升级,它引入了 Schnorr 签名和 Merklized Abstract Syntax Trees (MAST),增强了隐私、扩展性和效率。`Bech32m` 是支持 Taproot 地址的推荐编码方式,因为 Taproot 主要使用 SegWit v1。这种新的地址格式使得利用 Taproot 所提供的所有优势变得更加高效和安全。 + +`Bech32m` 格式的引入是比特币协议持续进化的一部分,它不仅提高了地址的错误校验能力,还通过支持如 Taproot 这样的先进特性,推动了整个网络向前发展。对于用户和开发者而言,了解并适应这种新的地址格式是非常重要的,它将帮助他们最大化比特币的潜力。 diff --git a/BTC/Basic/tools/dust.md b/BTC/Basic/tools/dust.md new file mode 100644 index 000000000..b9cda55ea --- /dev/null +++ b/BTC/Basic/tools/dust.md @@ -0,0 +1,216 @@ +在比特币网络中,“dust” 或 “尘埃交易”指的是非常小的比特币金额,其大小甚至不足以支付发送这笔金额所需的交易费。因为每笔比特币交易都需要支付矿工费以保证交易被网络确认,如果交易中的金额太小,不足以覆盖这笔费用,那么这笔金额实际上就变得无法使用。 + +# Dust 定义 + +参考bitcoin中的[定义](https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/policy/policy.cpp#L26-L63) + +> "Dust" is defined in terms of dustRelayFee, +> which has units satoshis-per-kilobyte. +> If you'd pay more in fees than the value of the output +> to spend something, then we consider it dust. +> A typical spendable non-segwit txout is 34 bytes big, and will +> need a CTxIn of at least 148 bytes to spend: +> so dust is a spendable txout less than +> 182*dustRelayFee/1000 (in satoshis). +> 546 satoshis at the default rate of 3000 sat/kvB. +> A typical spendable segwit P2WPKH txout is 31 bytes big, and will +> need a CTxIn of at least 67 bytes to spend: +> so dust is a spendable txout less than +> 98*dustRelayFee/1000 (in satoshis). +> 294 satoshis at the default rate of 3000 sat/kvB + +# 交易结构 + +![transaction](./images/transaction.png) + +# 常用地址的计算 + +## P2PKH - 546 + +### Output + +```js +Size = Amout + ScriptPubKey Size + ScriptPubKey = 8 + 1 + 25 = 34 +``` + +#### ScriptPubKey + +```js +// 模版 共25字节 +OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG + +OP_DUP // 复制栈顶的元素 +OP_HASH160 // 弹出栈顶元素,计算其SHA-256散列,然后计算RIPEMD-160散列 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 公钥哈希 +OP_EQUALVERIFY // 比较栈顶元素 +OP_CHECKSIG // 验证数字签名 +``` + +### Input + +```js +Size = TXID + VOUT + ScriptSig Size + ScriptSig + Sequence = 32 + 4 + 1 + 107 + 4 = 148 +``` + +#### ScriptSig + +```js +// 模版 共107字节 + + +OP_PUSHBYTES_72 // 推送72字节到栈顶 +3045022100c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e02205aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a772401 // 签名数据 +OP_PUSHBYTES_33 // 推送33字节到栈顶 +03480b6822120e9936b43859d84c380583c3d0292409b21453ae962815090f8117 // 压缩公钥 +``` + +### DUST + +```js +dust = (input + output) * feeRate = (34 + 148) * 3 = 546 +``` + +## P2SH-P2PKH - 540 1%⬇️ + +### Output + +```js +Size = Amout + ScriptPubKey Size + ScriptPubKey = 8 + 1 + 23 = 32 +``` + +#### ScriptPubKey + +```js +// 模版 共23字节 +OP_HASH160 OP_EQUAL +其中 +scriptHash = hash160(OP_DUP OP_HASH160 OP_EQUALVERIFY OP_CHECKSIG) + +OP_HASH160 // 弹出栈顶元素,计算其SHA-256散列,然后计算RIPEMD-160散列 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 脚本哈希 +OP_EQUAL // 比较栈顶两个元素相等 +``` + +### Input + +```js +Size = TXID + VOUT + ScriptSig Size + ScriptSig + Sequenc = 32 + 4 + 1 + 107 + 4 = 148 +``` + +#### ScriptSig + +```js +// 模版 共107字节 + + +OP_PUSHBYTES_72 // 推送72字节到栈顶 +3045022100c233c3a8a510e03ad18b0a24694ef00c78101bfd5ac075b8c1037952ce26e91e02205aa5f8f88f29bb4ad5808ebc12abfd26bd791256f367b04c6d955f01f28a772401 // 签名数据 +OP_PUSHBYTES_33 // 推送33字节到栈顶 +03480b6822120e9936b43859d84c380583c3d0292409b21453ae962815090f8117 // 压缩公钥 +``` + +### DUST + +```js +dust = (input + output) * feeRate = (32 + 148) * 3 = 540 +``` + +## P2WPKH - 294 46%⬇️ + +### Output + +```js +Size = Amout + ScriptPubKey Size + ScriptPubKey = 8 + 1 + 22 = 31 +``` + +#### ScriptPubKey + +```js +// 模版 共22字节 +OP_0 + +OP_0 // 表示版本号,对于P2WPKH是0 +OP_PUSHBYTES_20 // 推送20字节到栈顶 +18e1fad25b2983d5dbb2e2b96e3ce756a69b3bc2 // 公钥哈希 +``` + +### Input + +```js +Size = TXID + VOUT + Sequence + Witness/4 = 32 + 4 + 4 + 108/4 = 67 +``` + +#### ScriptSig + +``` +// 模版 共107字节 + + +02 // 见证数据的数量 +48 // 第一个见证数据的长度72字节 +3045022100a5eec95c65d2dd679e8fdcc10668d5d51446f24d1557859cb543e570201257c6022011df04f803a08c97de213ddf211ad193045ff25e59857324a28656de1961351c01 // 签名数据 +21 // 第二个见证数据的长度33字节 +0295f97f41d0d523bddf39e77e16cc0dda2e56b9bd9fdea10133656635b2c28a39 // 压缩公钥 +``` + +### DUST + +```js +dust = (input + output) * feeRate = (31 + 67) * 3 = 294 +``` + +## P2TR(key path) - 300 26.7%⬇️ + +### Output + +```js +Size = Amout + ScriptPubKey Size + ScriptPubKey = 8 + 1 + 34 = 43 +``` + +#### ScriptPubKey + +```js +// 模版 共22字节 +OP_1 + +OP_1 // 表示版本号,对于P2TR是1 +OP_PUSHBYTES_32 // 推送32字节到栈顶 +2c3ee7cdb92394e32e82ec5bc8860c8888df6a9910537e90c75079726a2a8469 // tweaked-public-key +``` + +### Input + +```js +Size = TXID + VOUT + Sequence + Witness/4 = 32 + 4 + 4 + 67/4 = 57 +``` + +#### ScriptSig + +```js +// 模版 共67字节 +[signature] [script] [control block] + +01 // Witness 元素的个数 +40 // schnorr签名长度 +743bbb3df4e95df5e70c2a3e72dd9d05933a018ad1bbd4b700841824ed18bebbc54d1b4d03b252aaa5c373390c68ba119fdf70e0bab71694a4db0da3fe8fefcc // schnorr签名 +00 // 签名类型 +``` + +### DUST + +```js +dust = (input + output) * feeRate = (43 + 57) * 3 = 300 +``` + +# 主流库的实现 + +## Bitcoin + +已经添加dust的计算[GetDustThreshold](https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/policy/policy.cpp#L26-L63) +同时在[IsStandardTx](https://github.com/bitcoin/bitcoin/blob/160d23677ad799cf9b493eaa923b2ac080c3fb8e/src/policy/policy.cpp#L70-L92)中会把包含小于dust的输出交易置为异常交易 + +## Bitcoinjs + +Bitcoinjs 将会在7.0.0中添加[dustAmountFromOutputScript](https://github.com/bitcoinjs/bitcoinjs-lib/pull/2010)的计算,不过计算逻辑只会通过是否是Witness返回546或294 diff --git a/BTC/Basic/tools/images/transaction.png b/BTC/Basic/tools/images/transaction.png new file mode 100644 index 000000000..f1f8d4a74 Binary files /dev/null and b/BTC/Basic/tools/images/transaction.png differ diff --git a/BTC/Basic/wallet/README.md b/BTC/Basic/wallet/README.md new file mode 100644 index 000000000..9a3ccb82d --- /dev/null +++ b/BTC/Basic/wallet/README.md @@ -0,0 +1,38 @@ +# 比特币地址生成脚本 +这个项目包含一个常见的 JavaScript 脚本,用于生成不同类型的比特币地址,包括 Legacy、Nested Segwit、Native Segwit 和 Taproot 地址。它使用 bitcoinjs-lib 库和 ecpair 以及 tiny-secp256k1 模块来创建地址。 + +# 功能 +生成四种类型的比特币地址: +- Legacy (P2PKH) +- Nested Segwit (P2SH-P2WPKH) +- Native Segwit (P2WPKH) +- Taproot (P2TR) + +# 环境设置 +安装 Node.js: 确保您的系统上安装了 Node.js。可以在 Node.js 官网下载并安装。 + +安装依赖: 项目依赖于 bitcoinjs-lib、ecpair 和 tiny-secp256k1。可以通过运行以下命令来安装这些依赖项: + +```js +npm install bitcoinjs-lib ecpair tiny-secp256k1 +``` +# 运行脚本 +在安装所有依赖后,您可以运行脚本来生成比特币地址。使用以下命令来运行脚本: + +```js +node <脚本文件名>.js +``` +替换 <脚本文件名> 为您的 JavaScript 文件名。 + +# 输出 +脚本将在控制台中输出以下格式的地址: + +```js +Legacy Address: 18RKdzEVDe6oCxrdeiipZGtKYWxTXmaxh3 +Nested Segwit Address: 385Q6vxTS5My1rZ7vs6jSonuQDB987o2p2 +Native Segwit Address: bc1qxwy6vyfedw67sdr754avqcgrnw9sfpzuqgde4d +Taproot Address: bc1pvc3cpr6c2eejzylks2cg9vhanqepk3hmd0ssn8etzmf2r7y4q40q77ljsl +``` + +生成的地址仅用于演示和教育目的。在生产环境中使用时,请确保理解相关的安全风险。 +Taproot 地址的支持可能取决于 bitcoinjs-lib 的版本。 diff --git a/BTC/Basic/wallet/address.js b/BTC/Basic/wallet/address.js new file mode 100644 index 000000000..284f5e437 --- /dev/null +++ b/BTC/Basic/wallet/address.js @@ -0,0 +1,45 @@ +import ecpair from 'ecpair'; +import * as tinysecp from 'tiny-secp256k1'; +import bitcoin from 'bitcoinjs-lib'; + +const { ECPairFactory } = ecpair; +const ECPair = ECPairFactory(tinysecp); +bitcoin.initEccLib(tinysecp); + +function toXOnly(pubKey) { + return pubKey.length === 32 ? pubKey : pubKey.slice(1, 33); +} + +function generateAddress(networkType, addressType) { + const network = bitcoin.networks[networkType]; + // 生成Bitcoin私钥和地址 + const keyPair = ECPair.makeRandom({ network }); + + let address; + switch (addressType) { + case 'legacy': + address = bitcoin.payments.p2pkh({ pubkey: keyPair.publicKey, network }).address; + break; + case 'nestedSegwit': + address = bitcoin.payments.p2sh({ + redeem: bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }), + network, + }).address; + break; + case 'nativeSegwit': + address = bitcoin.payments.p2wpkh({ pubkey: keyPair.publicKey, network }).address; + break; + case 'taproot': + const pubkey = toXOnly(keyPair.publicKey); + address = bitcoin.payments.p2tr({ pubkey, network }).address; + break; + default: + address = 'Invalid address type'; + } + return address; +} + +console.log('Legacy Address:', generateAddress('bitcoin', 'legacy')); +console.log('Nested Segwit Address:', generateAddress('bitcoin', 'nestedSegwit')); +console.log('Native Segwit Address:', generateAddress('bitcoin', 'nativeSegwit')); +console.log('Taproot Address:', generateAddress('bitcoin', 'taproot')); diff --git a/BTC/Basic/wallet/package.json b/BTC/Basic/wallet/package.json new file mode 100644 index 000000000..bf4ec8502 --- /dev/null +++ b/BTC/Basic/wallet/package.json @@ -0,0 +1,17 @@ +{ + "name": "btc-wallet", + "version": "1.0.0", + "description": "", + "main": "index.js", + "type": "module", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "bitcoinjs-lib": "^6.1.5", + "ecpair": "^2.1.0", + "tiny-secp256k1": "^2.2.3" + } +} diff --git a/BTC/README-EN.md b/BTC/README-EN.md new file mode 100644 index 000000000..2ed70e88e --- /dev/null +++ b/BTC/README-EN.md @@ -0,0 +1,125 @@ +# Bitcoin (BTC) + +This knowledge base aims to provide comprehensive information about Bitcoin (BTC) technology, covering basic functions, advanced applications, and various protocols and tools in the ecosystem. Whether you're a beginner or an experienced developer, this guide will help you better understand and use Bitcoin technology. + +## Introduction + +Bitcoin is the first decentralized digital currency based on blockchain technology, proposed by a person or team under the pseudonym "Satoshi Nakamoto" in 2008 and officially launched in 2009. It revolutionizes the traditional financial system by enabling trustless value transfer through cryptography and distributed networks. It serves as both a payment tool and investment vehicle, and is viewed as a social experiment redefining the boundaries of money and trust. + +Bitcoin combines cryptography, economics, and distributed systems, pioneering decentralized digital assets. Its value stems from technical reliability (censorship resistance, scarcity), social consensus (the "digital gold" narrative), and macro environment (fiat currency inflation, geopolitical conflicts). Despite facing scaling bottlenecks, energy controversies, and regulatory uncertainties, Bitcoin continues to drive financial system reform, becoming a core symbol of the blockchain revolution and redefining the future of money, trust, and value. + +## Core Technical Mechanisms + +-Blockchain and Decentralization +Transaction data is stored in a transparent distributed ledger (blockchain) maintained by global nodes without central control. Chain structure (blocks linked by hash values) and timestamp technology ensure data immutability. + +-Cryptography and Security +Uses SHA-256 hash algorithm and asymmetric encryption (public key addresses and private key signatures) to ensure transaction ownership and security. Proof of Work (PoW): Miners compete with computing power to verify transactions and generate new blocks, exchanging energy consumption for network security while receiving new coins as rewards. + +-Deflationary Model +Total supply capped at 21 million coins, with new coin issuance "halving" every four years, complete mining by 2140, scarcity comparable to gold. + +## Core Features and Innovations + +-Trustless +No need for bank or government endorsement, code rules drive system operation, users independently control assets (private key equals ownership). + +-Censorship Resistance and Globalization +Transactions unrestricted by borders, node network resistant to blocking, particularly suitable for cross-border payments and inflation hedging (e.g., El Salvador adopting as legal tender). + +-Pseudonymity +Users transact via encrypted addresses without direct identity binding, but on-chain records are publicly traceable, requiring mixing tools for enhanced privacy. + +-Irreversibility +Transactions once confirmed on blockchain cannot be reversed, reducing fraud risk but requiring careful operation (e.g., mistaken transfers cannot be recovered). + +-High Volatility +Market supply/demand, policy regulation and speculative sentiment cause dramatic price fluctuations, reaching $60,000 in 2021 and dropping to $16,000 in 2022. + +## Historical Evolution and Social Impact + +-Milestone Events + +2008 Whitepaper: Satoshi Nakamoto published "Bitcoin: A Peer-to-Peer Electronic Cash System", proposing decentralized currency vision. + +2010 First Physical Transaction: Programmer purchased 2 pizzas with 10,000 BTC (now worth hundreds of millions), initiating cryptocurrency practicality. + +2017 Fork and Scaling Controversy: Community disagreement led to Bitcoin fork into BTC (main chain) and BCH (Bitcoin Cash), exposing decentralized governance challenges. + +2021 Institutionalization: Tesla, MicroStrategy etc. included in balance sheets, Bitcoin futures ETF approved, promoting mainstream financial acceptance. + +-Application Scenario Expansion + +Payment Network: Lightning Network (Layer 2) enables small fast transactions, solving main chain low throughput (about 7 TPS) issue. + +Store of Value: Citizens in some countries (e.g., Argentina, Nigeria) use it as anti-inflation asset to hedge against fiat currency depreciation risk. + +Technical Derivative Ecosystem: Catalyzed innovations like smart contracts, DeFi (Decentralized Finance), NFTs, but Bitcoin itself remains focused on "digital gold" positioning. + +Through this knowledge base, you will learn Bitcoin's core functions, advanced features and ecosystem applications, helping you stay ahead in this rapidly developing field. + +## Task Status Legend: +⬜ Not Started ⌛ In Progress ✅ Completed + +## 1. Basic Functions + +### 1.1 Payment Addresses +Bitcoin address types and encoding methods: +- **P2PKH** (Pay to Public Key Hash) ✅ +- **P2SH-P2PKH** (Pay to Script Hash - Pay to Public Key Hash) ✅ +- **P2WPKH** (Pay to Witness Public Key Hash) ✅ +- **P2TR** (Pay to Taproot) ✅ +- **Base58 Encoding** ✅ +- **Bech32 Encoding** ✅ +- **Bech32m Encoding** ✅ + +### 1.2 Wallets +Bitcoin wallet types and characteristics: +- **Standard Wallets** ⌛ +- **Hierarchical Deterministic Wallets (HD Wallets)** ✅ + +### 1.3 Transactions +Bitcoin transaction knowledge: +- **UTXO Analysis** ⌛ +- **Coinbase Transactions** ⬜ +- **Transaction Construction** ⌛ +- **Fee Estimation** ⌛ +- **Signature Algorithms** ✅ + +### 1.4 Tools +Common tools in Bitcoin ecosystem: +- **Blockchain Explorers** ⌛ +- **Network Hashrate** ⬜ +- **API Services** ⬜ +- **Data Analysis Tools** ⬜ + +## 2. Advanced Functions + +### 2.1 PSBT (Partially Signed Bitcoin Transactions) +Introduction and usage of PSBT: +- **PSBT Protocol Introduction** ✅ +- **Creating and Parsing PSBT** ✅ +- **PSBT V2** ⬜ + +### 2.2 Taproot +Introduction and advantages of Taproot technology: +- **Schnorr Signatures** ✅ +- **MAST** (Merkelized Abstract Syntax Tree) ✅ +- **Privacy and Efficiency Improvements** ⬜ +- **Differences between Key Path and Script Path** ⬜ + +### 2.3 Multisignature Addresses +Usage and advantages of multisignature addresses: +- **Multisignature Introduction** ✅ +- **OP_CHECKMULTISIG** ✅ +- **OP_CHECKMULTISIGVERIFY** ✅ +- **OP_CHECKSIGADD** ✅ + +## 3. Ecosystem Applications +- **BRC20 Protocol Introduction** ✅ +- **ARC20 Protocol Introduction** ✅ +- **Runes Protocol Introduction** ✅ +- **Lightning Network Introduction** ⌛ +- **Lightning Network Core Logic** ⌛ +- **OP_CAT** ✅ +- **Babylon | BTC Staking** ⬜ \ No newline at end of file diff --git a/BTC/README-ES.md b/BTC/README-ES.md new file mode 100644 index 000000000..ba7ab380c --- /dev/null +++ b/BTC/README-ES.md @@ -0,0 +1,145 @@ +# Bitcoin (BTC) + +This repository aims to provide comprehensive information on Bitcoin (BTC) technology, covering its basic functions, advanced applications, and various protocols and tools in its ecosystem. Whether you are a beginner or an experienced developer, this guide will help you gain a deeper understanding and make efficient use of Bitcoin technology. + +## Introduction + +Bitcoin is the first decentralized digital currency based on blockchain technology, proposed by an individual or group using the pseudonym "Satoshi Nakamoto" in 2008 and officially launched in 2009. It disrupts traditional financial systems by enabling trustless value transfers through cryptography and a distributed network. It functions as a payment tool, an investment asset, and a social experiment that redefines the boundaries of money and trust. + +Bitcoin combines cryptography, economics, and distributed systems to pioneer decentralized digital assets. Its value stems from technical reliability (censorship resistance, scarcity), social consensus (the "digital gold" narrative), and macroeconomic conditions (fiat currency over-issuance, geopolitical conflicts). Despite challenges such as scalability bottlenecks, energy debates, and regulatory uncertainty, Bitcoin continues to drive financial innovation, becoming the core symbol of the blockchain revolution and redefining the future of money, trust, and value. + + +##Core Technical Mechanisms + +-Blockchain and Decentralization +Transaction data is stored on a transparent, distributed ledger (blockchain) maintained by a global network of nodes, with no central authority. A chain structure (blocks linked via hash values) and timestamping ensure data immutability. + +-Cryptography and Security +Uses the SHA-256 hashing algorithm and asymmetric encryption (public addresses and private key signatures) to secure transaction ownership and integrity. Proof of Work (PoW): Miners compete computationally to validate transactions and create new blocks, consuming energy to safeguard the network while earning newly minted coins as rewards. + +-Deflationary Model +Total supply capped at 21 million coins, with issuance halved every four years ("halving"), ending in 2140. Its scarcity mirrors that of gold. + + +##Key Features and Innovations + +-Trustless System +Operates without reliance on banks or governments, governed solely by code. Users fully control assets (ownership via private keys). + +-Censorship Resistance and Global Accessibility +Borderless transactions on a resilient network, ideal for cross-border payments and inflation hedging (e.g., Bitcoin’s adoption as legal tender in El Salvador). + +-Pseudonymity +Transactions use encrypted addresses, not tied to real-world identities, but on-chain records are publicly traceable. Privacy tools (e.g., coin mixers) enhance anonymity. + +-Irreversibility +Confirmed transactions cannot be reversed, reducing fraud but requiring caution (e.g., accidental transfers are permanent). + +-High Volatility +Prices fluctuate due to market demand, regulation, and speculation. Bitcoin peaked at 60,000 in 2021, then fell to16,000 in 2022. + + +##Historical Evolution and Societal Impact + +-Milestones + +2008 Whitepaper: Satoshi Nakamoto published Bitcoin: A Peer-to-Peer Electronic Cash System, outlining a decentralized currency vision. + +2010 First Real-World Transaction: A programmer paid 10,000 BTC for two pizzas (worth billions today), marking Bitcoin’s practical adoption. + +2017 Fork and Scaling Debate: Community disputes split Bitcoin into BTC (main chain) and BCH (Bitcoin Cash), exposing governance challenges in decentralized systems. + +2021 Institutional Adoption: Companies like Tesla and MicroStrategy added Bitcoin to their balance sheets, and Bitcoin futures ETFs gained approval, boosting mainstream acceptance. + +-Expanding Use Cases + +Payment Network: The Lightning Network (Layer 2) enables fast microtransactions, addressing the main chain’s low throughput (~7 transactions/second). + +Store of Value: Used in hyperinflationary economies (e.g., Argentina, Nigeria) to hedge against fiat currency collapse. + +Ecosystem Innovation: Spurred advancements like smart contracts, DeFi (decentralized finance), and NFTs, though Bitcoin remains focused on its "digital gold" role. + +This knowledge repository will guide you through Bitcoin's basic functionalities, advanced features, and ecosystem applications, helping you stay at the forefront of this rapidly evolving field. + +## Task Status Legend + +⬜ Not Started ⌛ In Progress ✅ Completed + +## 1. Basic Features + +### 1.1 Payment Addresses + +Types of Bitcoin addresses and their encoding: + +- **P2PKH** (Pay to Public Key Hash) ✅ +- **P2SH-P2PKH** (Pay to Script Hash - Pay to Public Key Hash) ✅ +- **P2WPKH** (Pay to Witness Public Key Hash) ✅ +- **P2TR** (Pay to Taproot) ✅ +- **Base58 Encoding** ✅ +- **Bech32 Encoding** ✅ +- **Bech32m Encoding** ✅ + +### 1.2 Wallets + +Types of Bitcoin wallets and their characteristics: + +- **Standard Wallets** ⌛ +- **HD Wallets (Hierarchical Deterministic Wallets)** ✅ + +### 1.3 Transactions + +Key knowledge about Bitcoin transactions: + +- **UTXO Analysis** ⬜ +- **Coinbase Transactions** ⬜ +- **Transaction Construction** ⬜ +- **Fee Estimation** ⬜ +- **Signature Algorithms** ✅ +- **Transaction Acceleration** ⬜ + +### 1.4 Tools + +Common tools in the Bitcoin ecosystem: + +- **Blockchain Explorers** ⌛ +- **Network Hash Rate Tools** ⬜ +- **API Services** ⬜ +- **Data Analysis Tools** ⬜ + +## 2. Advanced Features + +### 2.1 PSBT (Partially Signed Bitcoin Transaction) + +Introduction and usage of PSBT: + +- **PSBT Protocol Introduction** ✅ +- **Creating and Parsing PSBT** ✅ +- **PSBT V2** ⬜ + +### 2.2 Taproot + +Introduction to Taproot and its benefits: + +- **Schnorr Signatures** ✅ +- **MAST** (Merkelized Abstract Syntax Tree) ✅ +- **Privacy and Efficiency Improvements** ⬜ +- **Key Path vs. Script Path Differences** ⬜ + +### 2.3 Multisig Addresses + +Usage and advantages of multisig addresses: + +- **Multisig Address Introduction** ✅ +- **OP_CHECKMULTISIG** ✅ +- **OP_CHECKMULTISIGVERIFY** ✅ +- **OP_CHECKSIGADD** ✅ + +## 3. Ecosystem Applications + +- **BRC20 Protocol Overview** ✅ +- **ARC20 Protocol Overview** ✅ +- **Runes Protocol Overview** ✅ +- **Lightning Network Introduction** ⌛ +- **Core Logic of the Lightning Network** ⌛ +- **OP_CAT** ✅ +- **Babylon | BTC Staking** ⬜ diff --git a/BTC/README.md b/BTC/README.md new file mode 100644 index 000000000..475079afa --- /dev/null +++ b/BTC/README.md @@ -0,0 +1,127 @@ +# 比特币 (BTC) + +本知识库旨在提供有关比特币(BTC)技术的全面信息,涵盖基本功能、进阶应用以及生态系统中的各类协议和工具。无论您是初学者还是有经验的开发者,本指南都将帮助您更好地理解和使用比特币技术。 + +## 简介 + +比特币是首个基于区块链技术的去中心化数字货币,由化名“中本聪”的个人或团队于2008年提出,2009年正式运行。它颠覆传统金融体系,通过密码学与分布式网络实现无需信任第三方的价值转移,既是支付工具,也是投资标的,更被视为一场社会实验,重塑货币与信任的边界。 + +比特币融合密码学、经济学与分布式系统,开创了去中心化数字资产的先河。其价值源于技术可靠性(抗审查、稀缺性)、社会共识(“数字黄金”叙事)及宏观环境(法币超发、地缘冲突)。尽管面临扩容瓶颈、能源争议与监管不确定性,比特币仍持续推动金融体系变革,成为区块链革命的核心象征,重新定义货币、信任与价值的未来形态。 + + +##核心技术机制 + +-区块链与去中心化 +交易数据存储在公开透明的分布式账本(区块链)中,由全球节点共同维护,无中央机构控制。链式结构(区块通过哈希值串联)与时间戳技术确保数据不可篡改。 + +-密码学与安全 +使用SHA-256哈希算法和非对称加密(公钥地址与私钥签名),保障交易所有权和安全性。工作量证明(PoW):矿工通过算力竞争验证交易并生成新区块,消耗能源换取网络安全,同时新币作为奖励发行。 + +-通缩模型 +总量上限2100万枚,每四年“减半”新币发行量,2140年全部挖完,稀缺性类比黄金。 + +##核心特点与创新 + +-去信任化 +无需银行或政府背书,代码规则驱动系统运行,用户自主掌控资产(私钥即所有权)。 + +-抗审查与全球化 +交易不受国界限制,节点网络抗屏蔽,尤其适用于跨境支付与通胀国家避险(如萨尔瓦多定为法币)。 + +-伪匿名性 +用户通过加密地址交易,不直接绑定身份,但链上记录公开可追溯,需借助混币器等工具增强隐私。 + +-不可逆性 +交易一经区块链确认无法撤销,降低欺诈风险,但也要求用户谨慎操作(如误转账无法追回)。 + +-高波动性 +市场供需、政策监管与投机情绪导致价格剧烈波动,2021年曾突破6万美元,2022年跌至1.6万美元。 + +##历史演进与社会影响 + +-里程碑事件 + +2008年白皮书:中本聪发布《比特币:一种点对点的电子现金系统》,提出去中心化货币愿景。 + +2010年首笔实物交易:程序员用1万BTC购买2个披萨(现价值数亿美元),开启加密货币实用化。 + +2017年分叉与扩容争议:社区分歧导致比特币分叉为BTC(主链)与BCH(比特币现金),暴露去中心化治理难题。 + +2021年机构化:特斯拉、MicroStrategy等公司纳入资产负债表,比特币期货ETF获批,推动主流金融接纳。 + +-应用场景扩展 + +支付网络:闪电网络(Layer 2)实现小额快速交易,解决主链吞吐量低(约7笔/秒)问题。 + +价值存储:部分国家民众(如阿根廷、尼日利亚)将其作为抗通胀资产,对冲法币贬值风险。 + +技术衍生生态:催生智能合约、DeFi(去中心化金融)、NFT等创新,但比特币自身仍聚焦“数字黄金”定位。 +通过本知识库,您将学习比特币的核心功能、进阶特性以及生态系统应用,助您在这一快速发展的领域中保持领先。 + +## 任务状态图例: +⬜ 未开始 ⌛ 进行中 ✅ 已完成 + +## 1. 基本功能 + +### 1.1 支付地址 +比特币地址类型及编码方式: +- **P2PKH** (支付到公钥哈希) ✅ +- **P2SH-P2PKH** (支付到脚本哈希 - 支付到公钥哈希) ✅ +- **P2WPKH** (支付到见证公钥哈希) ✅ +- **P2TR** (支付到 Taproot) ✅ +- **Base58 编码** ✅ +- **Bech32 编码** ✅ +- **Bech32m 编码** ✅ + +### 1.2 钱包 +比特币钱包类型及其特性: +- **标准钱包** ⌛ +- **分层确定性钱包(HD 钱包)** ✅ + +### 1.3 交易 +比特币交易的相关知识: +- **UTXO解析** ⌛ +- **Coinbase交易** ⬜ +- **交易构建** ⌛ +- **费用估算** ⌛ +- **签名算法** ✅ + + +### 1.4 工具 +比特币生态系统中的常用工具: +- **区块链浏览器** ⌛ +- **全网算力** ⬜ +- **API 服务** ⬜ +- **数据分析工具** ⬜ + +## 2. 进阶功能 + +### 2.1 PSBT (部分签名比特币交易) +PSBT 的介绍和使用: +- **PSBT 协议简介** ✅ +- **创建和解析 PSBT** ✅ +- **PSBT V2** ⬜ + +### 2.2 Taproot +Taproot 技术的介绍及其优势: +- **施诺尔签名** ✅ +- **MAST** (Merkelized 抽象语法树) ✅ +- **隐私和效率改进** ⬜ +- **Key Path和Script Path的区别** ⬜ + +### 2.3 多重签名地址 +多重签名地址的使用及优势: +- **多重签名简介** ✅ +- **OP_CHECKMULTISIG** ✅ +- **OP_CHECKMULTISIGVERIFY** ✅ +- **OP_CHECKSIGADD** ✅ + +## 3. 生态系统应用 +- **BRC20 协议介绍** ✅ +- **ARC20 协议介绍** ✅ +- **Runes 协议介绍** ✅ +- **闪电网络简介** ⌛ +- **闪电网络核心逻辑** ⌛ +- **OP_CAT** ✅ +- **Babylon | BTC Staking** ⬜ + diff --git a/DappLearning-logo.png b/DappLearning-logo.png new file mode 100644 index 000000000..0d4499b18 Binary files /dev/null and b/DappLearning-logo.png differ diff --git a/DappLearning-logo.svg b/DappLearning-logo.svg new file mode 100644 index 000000000..cf80240af --- /dev/null +++ b/DappLearning-logo.svg @@ -0,0 +1 @@ +DappLearning \ No newline at end of file diff --git a/Example01-web3js-deploy/README.md b/Example01-web3js-deploy/README.md deleted file mode 100644 index cde791701..000000000 --- a/Example01-web3js-deploy/README.md +++ /dev/null @@ -1,39 +0,0 @@ -## 前言 -通过本样例代码,使开发者了解合约编译,部署的基本流程,并掌握基本的 web3js 接口使用方法 - -本样例发送交易到 Infura , 需要创建相应的 Infura Project, 可以参考如下资料进行创建 -https://ithelp.ithome.com.tw/articles/10202794 - - -## 代码逻辑 -1) 私钥获取 -新建sk.txt文件, 并填入私钥(metamask自行导出),然后代码自动从中读取 - -2) 编译合约 -使用 solc.compile 对合约进行编译 - -3) 部署合约 -调用 deployContract.deploy 方法构造 deploy 交易, 然后调用 signTransaction 方法进行签名, 之后发送交易。 -合约调用分两种,一种不改变区块链状态call, 一种改变区块链状态 transaction. - - -## 测试流程: -1) 安装依赖 -``` -npm install -``` - -2) 执行 index.js -``` -node index.js -``` - -## 参考文档 -- Web3js官方文档: - https://web3js.readthedocs.io/en/v1.2.11/getting-started.html -- 样例代码参考如下链接 - https://docs.moonbeam.network/getting-started/local-node/deploy-contract/ -- Web3js使用参考文档: - https://www.dappuniversity.com/articles/web3-js-intro -- 代码参考文档: - https://docs.moonbeam.network/getting-started/local-node/deploy-contract/ diff --git a/Example01-web3js-deploy/index.js b/Example01-web3js-deploy/index.js deleted file mode 100644 index dd5ab497c..000000000 --- a/Example01-web3js-deploy/index.js +++ /dev/null @@ -1,78 +0,0 @@ -let Web3 = require('web3'); -let solc = require("solc"); -let fs = require('fs'); - -// Get privatekey from sk.txt -const privatekey = fs.readFileSync("./sk.txt").toString().trim() - -// Load contract -const source = fs.readFileSync('Incrementer.sol','utf8'); - -// compile solidity -const input = { - language: 'Solidity', - sources: { - 'Incrementer.sol': { - content: source, - }, - }, - settings: { - outputSelection: { - '*': { - '*': ['*'], - }, - }, - }, -}; - -const tempFile = JSON.parse(solc.compile(JSON.stringify(input))); -const contractFile = tempFile.contracts['Incrementer.sol']['Incrementer']; - - -// Get bin & abi -const bytecode = contractFile.evm.bytecode.object; -const abi = contractFile.abi; - -// Create web3 with kovan provider -const web3 = new Web3('https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07'); - -// Create account from privatekey -const account = web3.eth.accounts.privateKeyToAccount(privatekey); -const account_from = { - privateKey: privatekey, - accountAddress: account.address, - }; - -/* - -- Deploy Contract -- -*/ -const Deploy = async () => { - - // Create contract instance - const deployContract = new web3.eth.Contract(abi); - - // Create Tx - const deployTx = deployContract.deploy({ - data: bytecode, - arguments: [5], - }); - - // Sign Tx - const deployTransaction = await web3.eth.accounts.signTransaction( - { - data: deployTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - - const deployReceipt = await web3.eth.sendSignedTransaction( - deployTransaction.rawTransaction - ); - console.log( - `Contract deployed at address: ${deployReceipt.contractAddress}` - ); -} - -Deploy(); \ No newline at end of file diff --git a/Example01-web3js-deploy/package.json b/Example01-web3js-deploy/package.json deleted file mode 100644 index 32aee31fe..000000000 --- a/Example01-web3js-deploy/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "Example01-deploy-contract", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "fs": "0.0.1-security", - "ganache-cli": "^6.12.2", - "solc": "^0.8.0", - "web3": "^1.3.5" - } -} diff --git a/Example02-web3js-transaction/README.md b/Example02-web3js-transaction/README.md deleted file mode 100644 index 4473046e2..000000000 --- a/Example02-web3js-transaction/README.md +++ /dev/null @@ -1,37 +0,0 @@ -## 前言 -通过本样例代码,开发者了解到如何对交易进行签名,发送,接收交易回执,验证交易执行结果。同时,样例也提供了事件监听的逻辑代码,开发者可以了解如何对一个事件进行一次或多次监听 - -## 代码逻辑 -1) 私钥获取 -新建sk.txt文件, 并填入私钥(metamask自行导出),然后代码自动从中读取 - -2) 编译合约 -编译合约的主逻辑在 compile.js 中。需要注意的是,这里使用的 solc 版本为 0.8.0 ,如果使用其他的 solc 版本,需要修改对应的代码 - -3) 部署合约 -调用 deployContract.deploy 方法构造 deploy 交易, 然后调用 signTransaction 方法进行签名, 之后发送交易。 -合约调用分两种,一种不改变区块链状态call, 一种改变区块链状态 transaction. - -4) 调用合约查询接口 -调用 incrementer.methods.getNumber() 接口查询合约的 number 变量值 - -5) 调用合约的修改接口 -调用 incrementer.methods.increment 接口增加合约的 number 变量值 - -## 测试流程 -1) 安装依赖 -``` -npm install -``` - -2) 执行 index.js 脚本 -``` -node index.js -``` - -## 参考文章 -代码参考文章如下 -https://docs.moonbeam.network/getting-started/local-node/deploy-contract/ - -Kovan 测试网无法使用 http 进行 event 监听,需要使用 web3socket, 可参考如下文章 -https://medium.com/blockcentric/listening-for-smart-contract-events-on-public-blockchains-fdb5a8ac8b9a \ No newline at end of file diff --git a/Example02-web3js-transaction/compile.js b/Example02-web3js-transaction/compile.js deleted file mode 100644 index b1158e4f2..000000000 --- a/Example02-web3js-transaction/compile.js +++ /dev/null @@ -1,28 +0,0 @@ -const fs = require('fs'); -const solc = require('solc'); - -// 以 utf8 方式加载合约 -const source = fs.readFileSync('Incrementer.sol','utf8'); - -// 编译合约 -const input = { - language: 'Solidity', - sources: { - 'Incrementer.sol': { - content: source, - }, - }, - settings: { - outputSelection: { - '*': { - '*': ['*'], - }, - }, - }, -}; - -const tempFile = JSON.parse(solc.compile(JSON.stringify(input))); -const contractFile = tempFile.contracts['Incrementer.sol']['Incrementer']; - -// 导出合约数据,可以使用 console 打印 contractFile 中的具体内容信息 -module.exports = contractFile; diff --git a/Example02-web3js-transaction/index.js b/Example02-web3js-transaction/index.js deleted file mode 100644 index 320683579..000000000 --- a/Example02-web3js-transaction/index.js +++ /dev/null @@ -1,242 +0,0 @@ -const Web3 = require('web3'); -const fs = require("fs"); -const contractFile = require('./compile'); - -const privatekey = fs.readFileSync("./sk.txt").toString().trim() - -/* - -- Define Provider -- -*/ -// Provider -const providerRPC = { - development: 'https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07', - moonbase: 'https://rpc.testnet.moonbeam.network', -}; -const web3 = new Web3(providerRPC.development); //Change to correct network - -// Create account with privatekey -const account = web3.eth.accounts.privateKeyToAccount(privatekey); -const account_from = { - privateKey: privatekey, - accountAddress: account.address, -}; - -// Get abi & bin -const bytecode = contractFile.evm.bytecode.object; -const abi = contractFile.abi; - -/* -* -* -* -- Verify Deployment -- -* - -*/ -const Trans = async () => { - console.log("============================ 1. Deploy Contract"); - console.log(`Attempting to deploy from account ${account.address}`); - - // Create Contract Instance - const deployContract = new web3.eth.Contract(abi); - - // Create Deployment Tx - const deployTx = deployContract.deploy({ - data: bytecode, - arguments: [5], - }); - - // Sign Tx - const createTransaction = await web3.eth.accounts.signTransaction( - { - data: deployTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - // Get Transaction Receipt - const createReceipt = await web3.eth.sendSignedTransaction( - createTransaction.rawTransaction - ); - console.log( - `Contract deployed at address: ${createReceipt.contractAddress}` - ); - - const deployedBlockNumber = createReceipt.blockNumber - - - /* - * - * - * - * -- Verify Interface of Increment -- - * - * - */ - // Create the contract with contract address - console.log() - console.log("============================ 2. Call Contract Interface getNumber"); - let incrementer = new web3.eth.Contract(abi, createReceipt.contractAddress); - - console.log(`Making a call to contract at address: ${createReceipt.contractAddress}`); - - let number = await incrementer.methods.getNumber().call(); - console.log(`The current number stored is: ${number}`); - - // Add 3 to Contract Public Variable - console.log() - console.log("============================ 3. Call Contract Interface increment"); - const _value = 3; - let incrementTx = incrementer.methods.increment(_value); - - // Sign with Pk - let incrementTransaction = await web3.eth.accounts.signTransaction( - { - to: createReceipt.contractAddress, - data: incrementTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - // Send Transactoin and Get TransactionHash - const incrementReceipt = await web3.eth.sendSignedTransaction( - incrementTransaction.rawTransaction - ); - console.log(`Tx successful with hash: ${incrementReceipt.transactionHash}`); - - number = await incrementer.methods.getNumber().call(); - console.log(`After increment, the current number stored is: ${number}`); - - - /* - * - * - * - * -- Verify Interface of Reset -- - * - * - */ - console.log() - console.log("============================ 4. Call Contract Interface reset"); - const resetTx = incrementer.methods.reset(); - - const resetTransaction = await web3.eth.accounts.signTransaction( - { - to: createReceipt.contractAddress, - data: resetTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - const resetcReceipt = await web3.eth.sendSignedTransaction( - resetTransaction.rawTransaction - ); - console.log(`Tx successful with hash: ${resetcReceipt.transactionHash}`); - number = await incrementer.methods.getNumber().call(); - console.log(`After reset, the current number stored is: ${number}`); - - - /* - * - * - * - * -- Listen to Event Increment -- - * - * - */ - console.log() - console.log("============================ 5. Listen to Events"); - console.log(" Listen to Increment Event only once && continuouslly") - - // kovan don't support http protocol to event listen, need to use websocket - // more details , please refer to https://medium.com/blockcentric/listening-for-smart-contract-events-on-public-blockchains-fdb5a8ac8b9a - const web3Socket = new Web3(new Web3.providers.WebsocketProvider("wss://kovan.infura.io/ws/v3/0aae8358bfe04803b8e75bb4755eaf07")); - incrementer = new web3Socket.eth.Contract(abi, createReceipt.contractAddress); - - // listen to Increment event only once - incrementer.once('Increment', (error,event) => { - console.log('I am a onetime event listner, I am going to die now') - }) - - // listen to Increment event continuouslly - incrementer.events.Increment(()=>{ - console.log('I am a longlive event listner, I get a event now') - }) - - for(let step = 0; step < 3; step++){ - incrementTransaction = await web3.eth.accounts.signTransaction( - { - to: createReceipt.contractAddress, - data: incrementTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - await web3.eth.sendSignedTransaction( - incrementTransaction.rawTransaction - ); - - if(step == 2){ - // clear all the listeners - web3Socket.eth.clearSubscriptions() - console.log("Clearing all the events listeners !!!!") - } - - } - - /* - * - * - * - * -- Get past events -- - * - * - */ - console.log() - console.log("============================ 6. Going to get past events") - const pastEvents = await incrementer.getPastEvents('Increment',{ - fromBlock: deployedBlockNumber, - toBlock: 'latest' - }) - - pastEvents.map((event) =>{ - console.log(event) - }) - - - /* - * - * - * - * -- Check Transaction Error -- - * - * - */ - console.log() - console.log("============================ 7. Check the transaction error") - incrementTx = incrementer.methods.increment(0); - incrementTransaction = await web3.eth.accounts.signTransaction( - { - to: createReceipt.contractAddress, - data: incrementTx.encodeABI(), - gas: 8000000, - }, - account_from.privateKey - ); - - const receipt = null - receipt = await web3.eth.sendSignedTransaction( - incrementTransaction.rawTransaction - ).on('error',console.error) - -}; - -Trans() - .then(() => process.exit(0)) - .catch(error => { - console.error(error); - process.exit(1); - }); diff --git a/Example02-web3js-transaction/package.json b/Example02-web3js-transaction/package.json deleted file mode 100644 index 4ba2fbef1..000000000 --- a/Example02-web3js-transaction/package.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "example02-send-signed-transaction", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "ethereumjs-tx": "^2.1.2", - "minimist": "^1.2.5", - "solc": "^0.8.0", - "web3": "^1.3.5" - } -} diff --git a/Example03-web3js-erc20/README.md b/Example03-web3js-erc20/README.md deleted file mode 100644 index 7e2baf967..000000000 --- a/Example03-web3js-erc20/README.md +++ /dev/null @@ -1,48 +0,0 @@ -## 前言 - -本样例演示了 ERC20 合约的基本调用, 让开发者了解 ERC20 合约的基本接口 - -## 代码逻辑 - -1. 私钥获取 - 为方便获取,在 sk.txt 中放入的私钥,然后代码自动从中读取 - -2. 编译合约 - 编译合约的主逻辑在 compile.js 中。需要注意的是,这里使用的 solc 版本为 0.8.0 ,如果使用其他的 solc 版本,需要修改对应的代码 - -3. 部署合约 - 调用 deployContract.deploy 方法构造 deploy 交易, 然后调用 signTransaction 方法进行签名, 之后发送交易。 - 合约调用分两种,一种不改变区块链状态 call, 一种改变区块链状态 transaction. - -4. 调用合约 - 调用 erc20Contract.methods.transfer 接口执行 erc20 合约的转账 - -## 测试流程 - -1. 创建私钥文件 -创建 sk.txt 文件, 并在其中放入 私钥 -账户需要在`Kovan`测试网上有一点余额,否则无法部署合约 - -2. 安装依赖 - -``` -npm install -``` - -3. 执行测试 - -``` -node index.js -``` - -## 参考文档 - -mocha 测试框架: -http://www.ruanyifeng.com/blog/2015/12/a-mocha-tutorial-of-examples.html -https://pcaaron.github.io/pages/fe/block/improve4.html#%E8%B7%91%E6%B5%8B%E8%AF%95 - -infura 不支持 sendTransaciton,只支持 sendRawTransaction: - -Infura 不会触发 eth_sendTransaction 方法,因为此方法需要 ethereum 节点中未被锁定的账户。我之前提供的示例也可以在 infura 中运行 :) - -https://ethereum.stackexchange.com/questions/70853/the-method-eth-sendtransaction-does-not-exist-is-not-available-on-infura diff --git a/Example03-web3js-erc20/compile.js b/Example03-web3js-erc20/compile.js deleted file mode 100644 index 23d2ca2db..000000000 --- a/Example03-web3js-erc20/compile.js +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs'); -const solc = require('solc'); - -// Get Path and Load Contract -const source = fs.readFileSync('SimpleToken.sol','utf8'); - -// Compile Contract -const input = { - language: 'Solidity', - sources: { - 'SimpleToken.sol': { - content: source, - }, - }, - settings: { - outputSelection: { - '*': { - '*': ['*'], - }, - }, - }, -}; - - -const tempFile = JSON.parse(solc.compile(JSON.stringify(input))); -const contractFile = tempFile.contracts['SimpleToken.sol']['SimpleToken']; - - -// Export Contract Data -module.exports = contractFile; diff --git a/Example03-web3js-erc20/index.js b/Example03-web3js-erc20/index.js deleted file mode 100644 index 89378f481..000000000 --- a/Example03-web3js-erc20/index.js +++ /dev/null @@ -1,104 +0,0 @@ -const Web3 = require('web3'); -const fs = require("fs"); -const contractFile = require('./compile'); - -const defaultNetwork = "kovan"; - -const privatekey = fs.readFileSync("./sk.txt").toString().trim() -/* - -- Define Provider & Variables -- -*/ -// Provider -const web3 = new Web3(new Web3.providers.HttpProvider('https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07')); - -const receiver = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" -//account -const account = web3.eth.accounts.privateKeyToAccount(privatekey); -const account_from = { - privateKey: account.privateKey, - accountaddress: account.address, -}; - -// sol ---> abi + bin -const bytecode = contractFile.evm.bytecode.object; -const abi = contractFile.abi; - -/* - -- Deploy Contract -- -*/ -const Trans = async () => { - console.log(`Attempting to deploy from account ${account_from.accountaddress}`); - web3.eth.getBlockNumber(function (error, result) { - console.log(result) - }) - // Create deploy Contract Instance - const deployContract = new web3.eth.Contract(abi); - -// method 1 - // Create Constructor Tx - const deployTx = deployContract.deploy({ - data: bytecode, - arguments: ["DAPPLEARNING","DAPP",0,10000000], - }); - - // Sign Transacation and Send - const deployTransaction = await web3.eth.accounts.signTransaction( - { - data: deployTx.encodeABI(), - gas: "8000000", - }, - account_from.privateKey - ); - - // Send Tx and Wait for Receipt - const deployReceipt = await web3.eth.sendSignedTransaction( - deployTransaction.rawTransaction - ); - console.log( - `Contract deployed at address: ${deployReceipt.contractAddress}` - ); - - // method 2 infura not support -// const deployTx2 = await deployContract.deploy({ -// data: bytecode, -// arguments: ["hello","Dapp",1,100000000], -// }).send({ -// from: '0x54A65DB20D7653CE509d3ee42656a8F138037d51', -// gas: 1500000, -// gasPrice: '30000000000000'}). -// then(function(newContractInstance){ -// console.log(newContractInstance.options.address) // instance with the new contract address -// }); - - const erc20Contract = new web3.eth.Contract(abi, deployReceipt.contractAddress); - - - //build the Tx - const transferTx = erc20Contract.methods.transfer(receiver,100000).encodeABI(); - - // Sign Tx with PK - const transferTransaction = await web3.eth.accounts.signTransaction( - { - to: deployReceipt.contractAddress, - data: transferTx, - gas: 8000000, - }, - account_from.privateKey - ); - - // Send Tx and Wait for Receipt - const transferReceipt = await web3.eth.sendSignedTransaction( - transferTransaction.rawTransaction - ); - - erc20Contract.methods.balanceOf(receiver).call().then((result)=>{ - console.log(`The balance of receiver is ${result}`); - }) -}; - -Trans() - .then(() => process.exit(0)) - .catch((error) => { - console.error(error); - process.exit(1); - }); \ No newline at end of file diff --git a/Example03-web3js-erc20/package.json b/Example03-web3js-erc20/package.json deleted file mode 100644 index b6195a297..000000000 --- a/Example03-web3js-erc20/package.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "name": "example02-send-signed-transaction", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "node ./node_modules/mocha/bin/mocha" - }, - "author": "", - "license": "ISC", - "dependencies": { - "chai": "^4.2.0", - "ethereumjs-tx": "^2.1.2", - "ethers": "^5.0.17", - "mocha": "^4.1.0", - "solc": "0.8.0", - "web3": "^1.3.5" - } -} diff --git a/Example04-web3js-truffle/README.md b/Example04-web3js-truffle/README.md deleted file mode 100644 index b093f6390..000000000 --- a/Example04-web3js-truffle/README.md +++ /dev/null @@ -1,80 +0,0 @@ -## Truffle 介绍 -Truffle是基于Solidity语言的一套开发框架,它简化了去中心化应用(Dapp)的构建和管理流程。本身是采用Javascript编写,支持智能合约的编译、部署和测试。 -- [Truffle 官网](https://www.trufflesuite.com/docs/truffle/quickstart) - -truffle开发框架提供了很多功能,简化了我们的开发、编译、部署与调试过程: - - - 内置了智能合约编译、链接、部署和二进制文件的管理 - - 方便快速开发的合约自动化测试 - - 方便扩展的、脚本化的部署与发布框架 - - 方便的网络管理功能。不论是公有网络还是私有网络 - - 基于erc190标准,使用EthPM & NPM进行依赖包管理 - - 内置控制台功能。项目构建后,可以直接在命令行调用输出结果,方便了开发调试 - - 可配的构建流程,支持持续集成。 - - 支持外部脚本的执行 - - -## 文件说明 -### 目录结构 - - contracts/: Solidity合约目录 - - - migrations/: 部署脚本文件目录 - - - test/: 测试脚本目录,参考 如何测试应用? - - - truffle-config.js: Truffle 配置文件 - -### 各文件作用 -1. contracts/SimpleToken.sol: 这是一个用 Solidity 编写的 erc20 代币 智能合约. -2. migrations/1_initial_migration.js: 这是一个部署脚本,用来部署 Migrations 合约,对应 Migrations.sol 文件。 -3. truffle-config.js (之前是 truffle.js): Truffle 配置文件, 用来设置网络信息,和其他项目相关的设置。当我们使用内建的默认的Truffle命令时,这个文件留空也是可以的。 - -## 测试流程 -1) 安装 truffle -``` -npm install -g truffle -``` - -2) 测试合约 -``` -truffle test -``` -这里,使用 "truffle test" 后,truffle 会启动内置的 test 网络,同时执行 测试 test 目录下的所有脚本,如果想单独测试某个脚本,可以 -执行 "truffle test ./test/simpletoken.js" - -3) 编译合约 -``` -truffle compile -``` - -执行成功后,会输出类似如下信息。从输出信息可以看到, truffle 会把 contracts 目录下的所有合约进行编译 -``` -Compiling .\contracts\SimpleToken.sol... - -Writing artifacts to .\build\contracts -``` - -4) 部署合约 - -在 truffle-config.js 里面,可以配置 truffle 使用的以太网络,其中就包括 truffle test 使用的 "test" 网络。 -这里,直接执行 truffle migrate 报没有找到 test 网络,因为 truffle 不会启动内置的 test 网络。所以这里我们使用 kovan 进行 truffle 合约部署 -``` -truffle migrate --network kovan -``` - -当多次执行 truffle migrate 的时候,可能会出 "Network update to date", 然后不执行合约部署的情况,这个时候需要执行如下的 truffle 命令 -``` -truffle migrate --network kovan --reset -``` - -## 在 infura 测试合约 -在 test 目录下存在 sol 和 js 类型的文件,truffle 支持这两种类型的测试文件。但目前测试发现,如果连接的测试网络为 infura ,则执行 -sol 的测试文件会报失败。所以,这里我们连接到 infura 进行测试时,只能使用 js 的测试文件。 - -- 修改 simpletoke.js - -修改 simpletoken.js 文件,把其中的 accounts[1] 修改为 "0x5DF22be367b95788Cd51C7dbdf7c7aB70fE856EE" ( 为例 ), 然后执行 -如下命令。执行过程可能比较慢,需要耐心等待一下。 -``` -truffle test ./test/simpletoken.js --network kovan -``` diff --git a/Example04-web3js-truffle/package.json b/Example04-web3js-truffle/package.json deleted file mode 100644 index 815f1eb51..000000000 --- a/Example04-web3js-truffle/package.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "name": "Example04-web3js-truffle", - "version": "1.0.0", - "description": "", - "main": "truffle-config.js", - "directories": { - "test": "test" - }, - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "keywords": [], - "author": "", - "license": "ISC", - "dependencies": { - "truffle": "^5.3.6", - "truffle-hdwallet-provider": "^1.0.17", - "web3": "^1.3.6" - } -} diff --git a/Example04-web3js-truffle/test/simpletoken.js b/Example04-web3js-truffle/test/simpletoken.js deleted file mode 100644 index d1347c4f9..000000000 --- a/Example04-web3js-truffle/test/simpletoken.js +++ /dev/null @@ -1,29 +0,0 @@ -const SimpleToken = artifacts.require('SimpleToken') - -contract('SimpleToken', (accounts) => { - it(`Should put 100000 to the ${accounts[0]}`, async () => { - const simpleTokenIns = await SimpleToken.deployed() - const balance = ( - await simpleTokenIns.balanceOf.call(accounts[0]) - ).toNumber() - - assert.equal( - balance, - 100000, - `the balance of ${accounts[0]} wasn not 100000` - ) - }) - - // change the a - it('Transfer 100 to other account', async () => { - const simpleTokenIns = await SimpleToken.deployed() - - const target = 0x5df22be367b95788cd51c7dbdf7c7ab70fe856ee - // transfer 100 to other account - await simpleTokenIns.transfer(target, 1000) - - // check the balance of target - const balance = (await simpleTokenIns.balanceOf.call(target)).toNumber() - assert.equal(balance, 1000, `the balance of ${target} wasn't 1000`) - }) -}) diff --git a/Example04-web3js-truffle/truffle-config.js b/Example04-web3js-truffle/truffle-config.js deleted file mode 100644 index 36c6cb557..000000000 --- a/Example04-web3js-truffle/truffle-config.js +++ /dev/null @@ -1,59 +0,0 @@ -const fs = require('fs') -const HDWalletProvider = require('truffle-hdwallet-provider') - -const mnemonic = fs.readFileSync('./sk.txt').toString().trim() - -module.exports = { - // Uncommenting the defaults below - // provides for an easier quick-start with Ganache. - // You can also follow this format for other networks; - // see - // for more details on how to specify configuration options! - // - compilers: { - solc: { - version: '0.8.0', - }, - }, - networks: { - // development: { - // host: "127.0.0.1", - // port: 7545, - // network_id: "*" - // }, - // test: { - // host: "127.0.0.1", - // port: 7545, - // network_id: "*" - // } - //}, - ropsten: { - provider: () => - new HDWalletProvider( - mnemonic, - 'https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07' - ), - network_id: '*', - gas: 3000000, - gasPrice: 10000000000, - }, - kovan: { - provider: () => - new HDWalletProvider( - mnemonic, - 'https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07' - ), - network_id: '*', - }, - rinkeby: { - provider: () => - new HDWalletProvider( - mnemonic, - 'https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07' - ), - network_id: '*', - gas: 3000000, - gasPrice: 10000000000, - }, - }, -} diff --git a/Example05-ethersjs-erc20/README.md b/Example05-ethersjs-erc20/README.md deleted file mode 100644 index b5250756f..000000000 --- a/Example05-ethersjs-erc20/README.md +++ /dev/null @@ -1,33 +0,0 @@ -## 前言 -本样例演示了使用 ethers.js 调用 ERC20 合约的开发流程 - -## 代码逻辑 -1) 私钥获取 -为方便获取,在 sk.txt 中放入的私钥,然后代码自动从中读取 - -2) ERC20 合约部署 -通过 deploy.js 进行部署,样例中链接的测试网为 Kovan, 对应需要使用有 Ether 的账户进行发送 - -3) 合约调用 -调用 erc20 的 transfer, balanceof 接口, 验证合约部署结果 - -4) 事件监听 -之后使用 providerContract.once 和 providerContract.on 对 Transfer 事件进行一次和多次的监听 - - -## 测试流程 -1) 安装依赖 -``` -npm install -``` - -2) 执行测试 -``` -node index.js -``` - -## 参考文档 -官方文档: https://docs.ethers.io/v4/api-providers.html - https://docs.ethers.io/v5/getting-started/#getting-started--contracts - 中文文档: https://learnblockchain.cn/docs/ethers.js/api-providers.html -http://zhaozhiming.github.io/blog/2018/04/25/how-to-use-ethers-dot-js/ diff --git a/Example05-ethersjs-erc20/compile.js b/Example05-ethersjs-erc20/compile.js deleted file mode 100644 index 1d9340de5..000000000 --- a/Example05-ethersjs-erc20/compile.js +++ /dev/null @@ -1,28 +0,0 @@ -const fs = require('fs') -const solc = require('solc') - -// Get Path and Load Contract -const source = fs.readFileSync('SimpleToken.sol', 'utf8') - -// Compile Contract -const input = { - language: 'Solidity', - sources: { - 'SimpleToken.sol': { - content: source, - }, - }, - settings: { - outputSelection: { - '*': { - '*': ['*'], - }, - }, - }, -} - -const tempFile = JSON.parse(solc.compile(JSON.stringify(input))) -const contractFile = tempFile.contracts['SimpleToken.sol']['SimpleToken'] - -// Export Contract Data -module.exports = contractFile diff --git a/Example05-ethersjs-erc20/hash.js b/Example05-ethersjs-erc20/hash.js deleted file mode 100644 index faf6d9f0d..000000000 --- a/Example05-ethersjs-erc20/hash.js +++ /dev/null @@ -1,133 +0,0 @@ -const ethers = require('ethers'); -const fs = require("fs"); -const contractFile = require('./compile'); -//var sleep = require('sleep'); - -const privatekey = fs.readFileSync("./sk.txt").toString().trim() - -/* - -- Define Provider & Variables -- -*/ -// Provider -const providerRPC = { - development: { - name: 'moonbeam-development', - rpc: 'http://localhost:8545', - chainId: 1281, - }, - moonbase: { - name: 'moonbase-alpha', - rpc: 'https://rpc.testnet.moonbeam.network', - chainId: 1287, - }, -}; -const provider = new ethers.providers.InfuraProvider('kovan'); //Change to correct network - -// Variables -const account_from = { - privateKey: privatekey, -}; - -const bytecode = contractFile.evm.bytecode.object; -const abi = contractFile.abi; - - -// hash test -console.log("&&&1: mint: ", ethers.utils.keccak256( ethers.utils.toUtf8Bytes("createAndInitializePoolIfNecessary(address,address,uint24,uint160)"))); -console.log("&&&1: increase: ", ethers.utils.keccak256( ethers.utils.toUtf8Bytes("mint((address,address,uint24,int24,int24,uint256,uint256,uint256,uint256,address,uint256))"))); -console.log("&&&1: muticall: ", ethers.utils.keccak256( ethers.utils.toUtf8Bytes("multicall(bytes[])"))); -console.log("&&&1: refund: ", ethers.utils.keccak256( ethers.utils.toUtf8Bytes("refundETH()"))); -// Create Wallet -let wallet = new ethers.Wallet(account_from.privateKey, provider); - -/* - -- Deploy Contract -- -*/ -// Create Contract Instance with Signer -//const deployContractIns = new ethers.ContractFactory(abi, bytecode, wallet); - -const Trans = async () => { - console.log("===============================1. Deploy Contract"); - console.log(`Attempting to deploy from account: ${wallet.address}`); - - // Send Tx (Initial Value set to 5) and Wait for Receipt - const deployedContract = await deployContractIns.deploy("hello","Dapp",1,100000000); - await deployedContract.deployed(); - - console.log(`Contract deployed at address: ${deployedContract.address}`); - - /* - -- Send Function -- - */ - // Create Contract Instance - console.log() - console.log("===============================2. Call Transaction Interface Of Contract"); - const transactionContract = new ethers.Contract(deployedContract.address, abi, wallet); - - console.log( - `Transfer 100000 to address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` - ); - - // Call Contract - const transferReceipt = await transactionContract.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",100000); - await transferReceipt.wait(); - - console.log(`Tx successful with hash: ${transferReceipt.hash}`); - - /* - -- Call Function -- - */ - // Create Contract Instance - console.log() - console.log("===============================3. Call Read Interface Of Contract"); - const providerContract = new ethers.Contract(deployedContract.address, abi, provider); - - // Call Contract - const balanceVal = await providerContract.balanceOf("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"); - - console.log(`balance of 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 is : ${balanceVal}`); - - - /* - -- Listen to Events -- - */ - console.log() - console.log("===============================4. Listen To Events"); - - // Listen to event once - providerContract.once("Transfer",(from, to, value) => { - console.log(`I am a once Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - - // Listen to events continuouslly - providerContract.on("Transfer",(from, to, value) => { - console.log(`I am a longlive Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - // Listen to events with filter - let topic = ethers.utils.id("Transfer(address,address,uint256)"); - let filter = { - address: deployedContract.address, - topics: [topic], - fromBlock: await provider.getBlockNumber() - } - - providerContract.on(filter,(from, to, value) => { - console.log(`I am a filter Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - for(let step = 0; step < 3; step++){ - let transferTransaction = await transactionContract.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",10); - await transferTransaction.wait(); - - if(step == 2){ - console.log("Going to remove all Listeners") - providerContract.removeAllListeners() - } - } - - -}; - -//Trans(); \ No newline at end of file diff --git a/Example05-ethersjs-erc20/index.js b/Example05-ethersjs-erc20/index.js deleted file mode 100644 index 61866d669..000000000 --- a/Example05-ethersjs-erc20/index.js +++ /dev/null @@ -1,128 +0,0 @@ -const ethers = require('ethers'); -const fs = require("fs"); -const contractFile = require('./compile'); -//var sleep = require('sleep'); - -const privatekey = fs.readFileSync("./sk.txt").toString().trim() - -/* - -- Define Provider & Variables -- -*/ -// Provider -const providerRPC = { - development: { - name: 'moonbeam-development', - rpc: 'http://localhost:8545', - chainId: 1281, - }, - moonbase: { - name: 'moonbase-alpha', - rpc: 'https://rpc.testnet.moonbeam.network', - chainId: 1287, - }, -}; -const provider = new ethers.providers.InfuraProvider('kovan'); //Change to correct network - -// Variables -const account_from = { - privateKey: privatekey, -}; - -const bytecode = contractFile.evm.bytecode.object; -const abi = contractFile.abi; - - -// Create Wallet -let wallet = new ethers.Wallet(account_from.privateKey, provider); - -/* - -- Deploy Contract -- -*/ -// Create Contract Instance with Signer -const deployContractIns = new ethers.ContractFactory(abi, bytecode, wallet); - -const Trans = async () => { - console.log("===============================1. Deploy Contract"); - console.log(`Attempting to deploy from account: ${wallet.address}`); - - // Send Tx (Initial Value set to 5) and Wait for Receipt - const deployedContract = await deployContractIns.deploy("hello","Dapp",1,100000000); - await deployedContract.deployed(); - - console.log(`Contract deployed at address: ${deployedContract.address}`); - - /* - -- Send Function -- - */ - // Create Contract Instance - console.log() - console.log("===============================2. Call Transaction Interface Of Contract"); - const transactionContract = new ethers.Contract(deployedContract.address, abi, wallet); - - console.log( - `Transfer 100000 to address: 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266` - ); - - // Call Contract - const transferReceipt = await transactionContract.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",100000); - await transferReceipt.wait(); - - console.log(`Tx successful with hash: ${transferReceipt.hash}`); - - /* - -- Call Function -- - */ - // Create Contract Instance - console.log() - console.log("===============================3. Call Read Interface Of Contract"); - const providerContract = new ethers.Contract(deployedContract.address, abi, provider); - - // Call Contract - const balanceVal = await providerContract.balanceOf("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266"); - - console.log(`balance of 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 is : ${balanceVal}`); - - - /* - -- Listen to Events -- - */ - console.log() - console.log("===============================4. Listen To Events"); - - // Listen to event once - providerContract.once("Transfer",(from, to, value) => { - console.log(`I am a once Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - - // Listen to events continuouslly - providerContract.on("Transfer",(from, to, value) => { - console.log(`I am a longlive Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - // Listen to events with filter - let topic = ethers.utils.id("Transfer(address,address,uint256)"); - let filter = { - address: deployedContract.address, - topics: [topic], - fromBlock: await provider.getBlockNumber() - } - - providerContract.on(filter,(from, to, value) => { - console.log(`I am a filter Event Listner, I have got an event Transfer, from: ${from} to: ${to} value: ${value}`) - }) - - for(let step = 0; step < 3; step++){ - let transferTransaction = await transactionContract.transfer("0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",10); - await transferTransaction.wait(); - - if(step == 2){ - console.log("Going to remove all Listeners") - providerContract.removeAllListeners() - } - } - - -}; - -Trans(); \ No newline at end of file diff --git a/Example05-ethersjs-erc20/package.json b/Example05-ethersjs-erc20/package.json deleted file mode 100644 index f666ed3fc..000000000 --- a/Example05-ethersjs-erc20/package.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "name": "example02-send-signed-transaction", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" - }, - "author": "", - "license": "ISC", - "dependencies": { - "ethereumjs-tx": "^2.1.2", - "ethers": "^5.1.4", - "minimist": "^1.2.5", - "solc": "0.8.0", - "web3": "^1.3.5" - } -} diff --git a/Example06-ethersjs-waffle/README.md b/Example06-ethersjs-waffle/README.md deleted file mode 100644 index 06f59acaf..000000000 --- a/Example06-ethersjs-waffle/README.md +++ /dev/null @@ -1,29 +0,0 @@ -## 前言 -Waffle 是一款适配 ehterjs 的智能合约测试库。本样例演示了使用 Waffle 进行测试的基本流程及使用方法 - -## 操作步骤 -- 1 安装依赖 -``` -yarn install -``` - -- 2 编译合约: -``` -yarn build -``` - -- 3 执行测试 -``` -yarn test -``` - -## 参考文档 -waffle 官方文档: -https://ethereum-waffle.readthedocs.io/en/latest/getting-started.html - -ehterjs 官方文档: -https://docs.ethers.io/v4/api-providers.html -https://docs.ethers.io/v5/getting-started/#getting-started--contracts - -中文文档: -https://learnblockchain.cn/docs/ethers.js/api-providers.html \ No newline at end of file diff --git a/Example06-ethersjs-waffle/index.js b/Example06-ethersjs-waffle/index.js deleted file mode 100644 index d22d35230..000000000 --- a/Example06-ethersjs-waffle/index.js +++ /dev/null @@ -1,55 +0,0 @@ -const fs = require("fs"); -const SimpleToken = require('./build/SimpleToken.json'); - -const { ethers } = require("ethers"); - - const privateKey = fs.readFileSync("./sk.txt").toString().trim() - - - // const web3 = new Web3.providers.HttpProvider('https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07'); - // let web3Provider = new ethers.providers.Web3Provider(web3) - - const web3Provider = new ethers.providers.InfuraProvider( "kovan","0aae8358bfe04803b8e75bb4755eaf07" ) - - const wallet = new ethers.Wallet(privateKey,web3Provider); - - let address = "0x54A65DB20D7653CE509d3ee42656a8F138037d51"; - - let bal; - - async function checkBalance() { - bal = await web3Provider.getBalance(address).then((balance) => { - - // balance is a BigNumber (in wei); format is as a sting (in ether) - let etherString = ethers.utils.formatEther(balance); - return etherString; - }); - console.log("balance: ", bal); - } - -checkBalance() - - let token; - async function deploy() { - - // 常见合约工厂实例 - const simpletoken = new ethers.ContractFactory(SimpleToken.abi, SimpleToken.bytecode, wallet); - token = await simpletoken.deploy("HEHE", "HH", 1, 100000000); - console.log(token.address); - - console.log(token.deployTransaction.hash); - - await token.deployed() - - let bal = await token.balanceOf(wallet.address); - console.log( bal); - - }; - -deploy(); - - - - - - diff --git a/Example06-ethersjs-waffle/package.json b/Example06-ethersjs-waffle/package.json deleted file mode 100644 index 557c40a56..000000000 --- a/Example06-ethersjs-waffle/package.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "name": "example05-send-signed-transaction", - "version": "1.0.0", - "description": "", - "main": "index.js", - "scripts": { - "build": "waffle", - "test": "export NODE_ENV=test && mocha --timeout 10000" - }, - "author": "", - "license": "ISC", - "dependencies": { - "chai": "^4.2.0", - "ethereum-waffle": "^3.3.0", - "ethereumjs-tx": "^2.1.2", - "ethers": "^5.1.4", - "minimist": "^1.2.5", - "mocha": "8.4.0", - "solc": "0.8.0", - "web3": "^1.3.5" - } -} diff --git a/Example06-ethersjs-waffle/test/Erc20Test.js b/Example06-ethersjs-waffle/test/Erc20Test.js deleted file mode 100644 index 04e5c0d52..000000000 --- a/Example06-ethersjs-waffle/test/Erc20Test.js +++ /dev/null @@ -1,55 +0,0 @@ -const { use, expect } = require("chai"); -const fs = require("fs"); -const {deployContract, MockProvider, solidity} = require('ethereum-waffle'); -const SimpleToken = require('../build/SimpleToken.json'); - -const { ethers } = require("ethers"); -const Web3 = require('web3'); - -use(solidity); - -describe('SimpleToken', () => { - const [wallet, walletTo] = new MockProvider().getWallets(); - let token; - - beforeEach(async () => { - token = await deployContract(wallet, SimpleToken, ["HEHE", "HH", 0, 100000000]); - }); - - // beforeEach(async () => { - // //token = await deployContract(wallet, SimpleToken, ["HEHE", "HH", 1, 100000000]); - // const simpletoken = new ethers.ContractFactory(SimpleToken.abi, SimpleToken.bytecode, wallet); - // token = await simpletoken.deploy( "HEHE", "HH", 1, 100000000); - // }); - - it('Assigns initial balance', async () => { - console.log("*****2"); - expect(await token.balanceOf(wallet.address)).to.equal(100000000); - - }); - - it('Transfer adds amount to destination account', async () => { - await token.transfer(walletTo.address, 7); - expect(await token.balanceOf(walletTo.address)).to.equal(7); - }); - - it('Transfer emits event', async () => { - await expect(token.transfer(walletTo.address, 7)) - .to.emit(token, 'Transfer') - .withArgs(wallet.address, walletTo.address, 7); - }); - - it('Can not transfer above the amount', async () => { - await expect(token.transfer(walletTo.address, 1007100000000)).to.be.reverted; - }); - - it('Calls totalSupply on SimpleToken contract', async () => { - await token.totalSupply(); - expect('totalSupply').to.be.calledOnContract(token); - }); - - it('Calls balanceOf with sender address on SimpleToken contract', async () => { - await token.balanceOf(wallet.address); - expect('balanceOf').to.be.calledOnContractWith(token, [wallet.address]); - }); -}); \ No newline at end of file diff --git a/Example06-ethersjs-waffle/yarn.lock b/Example06-ethersjs-waffle/yarn.lock deleted file mode 100644 index 32239b984..000000000 --- a/Example06-ethersjs-waffle/yarn.lock +++ /dev/null @@ -1,7336 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -"@ensdomains/ens@^0.4.4": - version "0.4.5" - resolved "https://registry.yarnpkg.com/@ensdomains/ens/-/ens-0.4.5.tgz#e0aebc005afdc066447c6e22feb4eda89a5edbfc" - integrity sha512-JSvpj1iNMFjK6K+uVl4unqMoa9rf5jopb8cya5UGBWz23Nw8hSNT7efgUx4BTlAPAgpNlEioUfeTyQ6J9ZvTVw== - dependencies: - bluebird "^3.5.2" - eth-ens-namehash "^2.0.8" - solc "^0.4.20" - testrpc "0.0.1" - web3-utils "^1.0.0-beta.31" - -"@ensdomains/resolver@^0.2.4": - version "0.2.4" - resolved "https://registry.yarnpkg.com/@ensdomains/resolver/-/resolver-0.2.4.tgz#c10fe28bf5efbf49bff4666d909aed0265efbc89" - integrity sha512-bvaTH34PMCbv6anRa9I/0zjLJgY4EuznbEMgbV77JBCQ9KNC46rzi0avuxpOfu+xDjPEtSFGqVEOr5GlUSGudA== - -"@ethereum-waffle/chai@^3.3.0": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/chai/-/chai-3.3.1.tgz#3f20b810d0fa516f19af93c50c3be1091333fa8e" - integrity sha512-+vepCjttfOzCSnmiVEmd1bR8ctA2wYVrtWa8bDLhnTpj91BIIHotNDTwpeq7fyjrOCIBTN3Ai8ACfjNoatc4OA== - dependencies: - "@ethereum-waffle/provider" "^3.3.1" - ethers "^5.0.0" - -"@ethereum-waffle/compiler@^3.3.0": - version "3.3.1" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/compiler/-/compiler-3.3.1.tgz#946128fd565aa4347075fd716dbd0f3f38189280" - integrity sha512-X/TeQugt94AQwXEdCjIQxcXYGawNulVBYEBE7nloj4wE/RBxNolXwjoVNjcS4kuiMMbKkdO0JkL5sn6ixx8bDg== - dependencies: - "@resolver-engine/imports" "^0.3.3" - "@resolver-engine/imports-fs" "^0.3.3" - "@typechain/ethers-v5" "^2.0.0" - "@types/mkdirp" "^0.5.2" - "@types/node-fetch" "^2.5.5" - ethers "^5.0.1" - mkdirp "^0.5.1" - node-fetch "^2.6.0" - solc "^0.6.3" - ts-generator "^0.1.1" - typechain "^3.0.0" - -"@ethereum-waffle/ens@^3.2.4": - version "3.2.4" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/ens/-/ens-3.2.4.tgz#c486be4879ea7107e1ff01b24851a5e44f5946ce" - integrity sha512-lkRVPCEkk7KOwH9MqFMB+gL0X8cZNsm+MnKpP9CNbAyhFos2sCDGcY8t6BA12KBK6pdMuuRXPxYL9WfPl9bqSQ== - dependencies: - "@ensdomains/ens" "^0.4.4" - "@ensdomains/resolver" "^0.2.4" - ethers "^5.0.1" - -"@ethereum-waffle/mock-contract@^3.2.2": - version "3.2.2" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/mock-contract/-/mock-contract-3.2.2.tgz#5749b03cbb4850150f81cf66151c4523eb7436f0" - integrity sha512-H60Cc5C7sYNU4LuPMSKDh8YIaN9/fkwEjznY78CEbOosO+lMlFYdA+5VZjeDGDuYKfsBqsocQdkj1CRyoi1KNw== - dependencies: - "@ethersproject/abi" "^5.0.1" - ethers "^5.0.1" - -"@ethereum-waffle/provider@^3.3.0", "@ethereum-waffle/provider@^3.3.1": - version "3.3.2" - resolved "https://registry.yarnpkg.com/@ethereum-waffle/provider/-/provider-3.3.2.tgz#33677baf6af5cbb087c3072d84f38c152968ebb1" - integrity sha512-ilz6cXK0ylSKCmZktTMpY4gjo0CN6rb86JfN7+RZYk6tKtZA6sXoOe95skWEQkGf1fZk7G817fTzLb0CmFDp1g== - dependencies: - "@ethereum-waffle/ens" "^3.2.4" - ethers "^5.0.1" - ganache-core "^2.13.2" - patch-package "^6.2.2" - postinstall-postinstall "^2.1.0" - -"@ethersproject/abi@5.0.0-beta.153": - version "5.0.0-beta.153" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.0-beta.153.tgz#43a37172b33794e4562999f6e2d555b7599a8eee" - integrity sha512-aXweZ1Z7vMNzJdLpR1CZUAIgnwjrZeUSvN9syCwlBaEBUFJmFY+HHnfuTI5vIhVs/mRkfJVrbEyl51JZQqyjAg== - dependencies: - "@ethersproject/address" ">=5.0.0-beta.128" - "@ethersproject/bignumber" ">=5.0.0-beta.130" - "@ethersproject/bytes" ">=5.0.0-beta.129" - "@ethersproject/constants" ">=5.0.0-beta.128" - "@ethersproject/hash" ">=5.0.0-beta.128" - "@ethersproject/keccak256" ">=5.0.0-beta.127" - "@ethersproject/logger" ">=5.0.0-beta.129" - "@ethersproject/properties" ">=5.0.0-beta.131" - "@ethersproject/strings" ">=5.0.0-beta.130" - -"@ethersproject/abi@5.0.7": - version "5.0.7" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.0.7.tgz#79e52452bd3ca2956d0e1c964207a58ad1a0ee7b" - integrity sha512-Cqktk+hSIckwP/W8O47Eef60VwmoSC/L3lY0+dIBhQPCNn9E4V7rwmm2aFrNRRDJfFlGuZ1khkQUOc3oBX+niw== - dependencies: - "@ethersproject/address" "^5.0.4" - "@ethersproject/bignumber" "^5.0.7" - "@ethersproject/bytes" "^5.0.4" - "@ethersproject/constants" "^5.0.4" - "@ethersproject/hash" "^5.0.4" - "@ethersproject/keccak256" "^5.0.3" - "@ethersproject/logger" "^5.0.5" - "@ethersproject/properties" "^5.0.3" - "@ethersproject/strings" "^5.0.4" - -"@ethersproject/abi@5.1.2", "@ethersproject/abi@^5.0.1", "@ethersproject/abi@^5.1.0": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@ethersproject/abi/-/abi-5.1.2.tgz#a8e75cd0455e6dc9e4861c3d1c22bbe436c1d775" - integrity sha512-uMhoQVPX0UtfzTpekYQSEUcJGDgsJ25ifz+SV6PDETWaUFhcR8RNgb1QPTASP13inW8r6iy0/Xdq9D5hK2pNvA== - dependencies: - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/hash" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - -"@ethersproject/abstract-provider@5.1.0", "@ethersproject/abstract-provider@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-provider/-/abstract-provider-5.1.0.tgz#1f24c56cda5524ef4ed3cfc562a01d6b6f8eeb0b" - integrity sha512-8dJUnT8VNvPwWhYIau4dwp7qe1g+KgdRm4XTWvjkI9gAT2zZa90WF5ApdZ3vl1r6NDmnn6vUVvyphClRZRteTQ== - dependencies: - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/networks" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/web" "^5.1.0" - -"@ethersproject/abstract-signer@5.1.0", "@ethersproject/abstract-signer@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/abstract-signer/-/abstract-signer-5.1.0.tgz#744c7a2d0ebe3cc0bc38294d0f53d5ca3f4e49e3" - integrity sha512-qQDMkjGZSSJSKl6AnfTgmz9FSnzq3iEoEbHTYwjDlEAv+LNP7zd4ixCcVWlWyk+2siud856M5CRhAmPdupeN9w== - dependencies: - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - -"@ethersproject/address@5.1.0", "@ethersproject/address@>=5.0.0-beta.128", "@ethersproject/address@^5.0.4", "@ethersproject/address@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/address/-/address-5.1.0.tgz#3854fd7ebcb6af7597de66f847c3345dae735b58" - integrity sha512-rfWQR12eHn2cpstCFS4RF7oGjfbkZb0oqep+BfrT+gWEGWG2IowJvIsacPOvzyS1jhNF4MQ4BS59B04Mbovteg== - dependencies: - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/rlp" "^5.1.0" - -"@ethersproject/base64@5.1.0", "@ethersproject/base64@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/base64/-/base64-5.1.0.tgz#27240c174d0a4e13f6eae87416fd876caf7f42b6" - integrity sha512-npD1bLvK4Bcxz+m4EMkx+F8Rd7CnqS9DYnhNu0/GlQBXhWjvfoAZzk5HJ0f1qeyp8d+A86PTuzLOGOXf4/CN8g== - dependencies: - "@ethersproject/bytes" "^5.1.0" - -"@ethersproject/basex@5.1.0", "@ethersproject/basex@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/basex/-/basex-5.1.0.tgz#80da2e86f9da0cb5ccd446b337364d791f6a131c" - integrity sha512-vBKr39bum7DDbOvkr1Sj19bRMEPA4FnST6Utt6xhDzI7o7L6QNkDn2yrCfP+hnvJGhZFKtLygWwqlTBZoBXYLg== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - -"@ethersproject/bignumber@5.1.1", "@ethersproject/bignumber@>=5.0.0-beta.130", "@ethersproject/bignumber@^5.0.7", "@ethersproject/bignumber@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/bignumber/-/bignumber-5.1.1.tgz#84812695253ccbc639117f7ac49ee1529b68e637" - integrity sha512-AVz5iqz7+70RIqoQTznsdJ6DOVBYciNlvO+AlQmPTB6ofCvoihI9bQdr6wljsX+d5W7Yc4nyvQvP4JMzg0Agig== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - bn.js "^4.4.0" - -"@ethersproject/bytes@5.1.0", "@ethersproject/bytes@>=5.0.0-beta.129", "@ethersproject/bytes@^5.0.4", "@ethersproject/bytes@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/bytes/-/bytes-5.1.0.tgz#55dfa9c4c21df1b1b538be3accb50fb76d5facfd" - integrity sha512-sGTxb+LVjFxJcJeUswAIK6ncgOrh3D8c192iEJd7mLr95V6du119rRfYT/b87WPkZ5I3gRBUYIYXtdgCWACe8g== - dependencies: - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/constants@5.1.0", "@ethersproject/constants@>=5.0.0-beta.128", "@ethersproject/constants@^5.0.4", "@ethersproject/constants@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/constants/-/constants-5.1.0.tgz#4e7da6367ea0e9be87585d8b09f3fccf384b1452" - integrity sha512-0/SuHrxc8R8k+JiLmJymxHJbojUDWBQqO+b+XFdwaP0jGzqC09YDy/CAlSZB6qHsBifY8X3I89HcK/oMqxRdBw== - dependencies: - "@ethersproject/bignumber" "^5.1.0" - -"@ethersproject/contracts@5.1.1": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/contracts/-/contracts-5.1.1.tgz#c66cb6d618fcbd73e20a6b808e8f768b2b781d0b" - integrity sha512-6WwktLJ0DFWU8pDkgH4IGttQHhQN4SnwKFu9h+QYVe48VGWtbDu4W8/q/7QA1u/HWlWMrKxqawPiZUJj0UMvOw== - dependencies: - "@ethersproject/abi" "^5.1.0" - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - -"@ethersproject/hash@5.1.0", "@ethersproject/hash@>=5.0.0-beta.128", "@ethersproject/hash@^5.0.4", "@ethersproject/hash@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hash/-/hash-5.1.0.tgz#40961d64837d57f580b7b055e0d74174876d891e" - integrity sha512-fNwry20yLLPpnRRwm3fBL+2ksgO+KMadxM44WJmRIoTKzy4269+rbq9KFoe2LTqq2CXJM2CE70beGaNrpuqflQ== - dependencies: - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - -"@ethersproject/hdnode@5.1.0", "@ethersproject/hdnode@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/hdnode/-/hdnode-5.1.0.tgz#2bf5c4048935136ce83e9242e1bd570afcc0bc83" - integrity sha512-obIWdlujloExPHWJGmhJO/sETOOo7SEb6qemV4f8kyFoXg+cJK+Ta9SvBrj7hsUK85n3LZeZJZRjjM7oez3Clg== - dependencies: - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/basex" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/pbkdf2" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/wordlists" "^5.1.0" - -"@ethersproject/json-wallets@5.1.0", "@ethersproject/json-wallets@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/json-wallets/-/json-wallets-5.1.0.tgz#bba7af2e520e8aea4d3829d80520db5d2e4fb8d2" - integrity sha512-00n2iBy27w8zrGZSiU762UOVuzCQZxUZxopsZC47++js6xUFuI74DHcJ5K/2pddlF1YBskvmMuboEu1geK8mnA== - dependencies: - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hdnode" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/pbkdf2" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - aes-js "3.0.0" - scrypt-js "3.0.1" - -"@ethersproject/keccak256@5.1.0", "@ethersproject/keccak256@>=5.0.0-beta.127", "@ethersproject/keccak256@^5.0.3", "@ethersproject/keccak256@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/keccak256/-/keccak256-5.1.0.tgz#fdcd88fb13bfef4271b225cdd8dec4d315c8e60e" - integrity sha512-vrTB1W6AEYoadww5c9UyVJ2YcSiyIUTNDRccZIgwTmFFoSHwBtcvG1hqy9RzJ1T0bMdATbM9Hfx2mJ6H0i7Hig== - dependencies: - "@ethersproject/bytes" "^5.1.0" - js-sha3 "0.5.7" - -"@ethersproject/logger@5.1.0", "@ethersproject/logger@>=5.0.0-beta.129", "@ethersproject/logger@^5.0.5", "@ethersproject/logger@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/logger/-/logger-5.1.0.tgz#4cdeeefac029373349d5818f39c31b82cc6d9bbf" - integrity sha512-wtUaD1lBX10HBXjjKV9VHCBnTdUaKQnQ2XSET1ezglqLdPdllNOIlLfhyCRqXm5xwcjExVI5ETokOYfjPtaAlw== - -"@ethersproject/networks@5.1.0", "@ethersproject/networks@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/networks/-/networks-5.1.0.tgz#f537290cb05aa6dc5e81e910926c04cfd5814bca" - integrity sha512-A/NIrIED/G/IgU1XUukOA3WcFRxn2I4O5GxsYGA5nFlIi+UZWdGojs85I1VXkR1gX9eFnDXzjE6OtbgZHjFhIA== - dependencies: - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/pbkdf2@5.1.0", "@ethersproject/pbkdf2@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/pbkdf2/-/pbkdf2-5.1.0.tgz#6b740a85dc780e879338af74856ca2c0d3b24d19" - integrity sha512-B8cUbHHTgs8OtgJIafrRcz/YPDobVd5Ru8gTnShOiM9EBuFpYHQpq3+8iQJ6pyczDu6HP/oc/njAsIBhwFZYew== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - -"@ethersproject/properties@5.1.0", "@ethersproject/properties@>=5.0.0-beta.131", "@ethersproject/properties@^5.0.3", "@ethersproject/properties@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/properties/-/properties-5.1.0.tgz#9484bd6def16595fc6e4bdc26f29dff4d3f6ac42" - integrity sha512-519KKTwgmH42AQL3+GFV3SX6khYEfHsvI6v8HYejlkigSDuqttdgVygFTDsGlofNFchhDwuclrxQnD5B0YLNMg== - dependencies: - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/providers@5.1.2": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@ethersproject/providers/-/providers-5.1.2.tgz#4e4459698903f911402fe91aa7544eb07f3921ed" - integrity sha512-GqsS8rd+eyd4eNkcNgzZ4l9IRULBPUZa7JPnv22k4MHflMobUseyhfbVnmoN5bVNNkOxjV1IPTw9i0sV1hwdpg== - dependencies: - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/basex" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/hash" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/networks" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/rlp" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/web" "^5.1.0" - bech32 "1.1.4" - ws "7.2.3" - -"@ethersproject/random@5.1.0", "@ethersproject/random@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/random/-/random-5.1.0.tgz#0bdff2554df03ebc5f75689614f2d58ea0d9a71f" - integrity sha512-+uuczLQZ4+no9cP6TCoCktXx0u2YbNaRT7lRkSt12d8263e702f0u+4JnnRO8Qmv5nylWJebnqCHzyxP+6mLqw== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/rlp@5.1.0", "@ethersproject/rlp@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/rlp/-/rlp-5.1.0.tgz#700f4f071c27fa298d3c1d637485fefe919dd084" - integrity sha512-vDTyHIwNPrecy55gKGZ47eJZhBm8LLBxihzi5ou+zrSvYTpkSTWRcKUlXFDFQVwfWB+P5PGyERAdiDEI76clxw== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/sha2@5.1.0", "@ethersproject/sha2@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/sha2/-/sha2-5.1.0.tgz#6ca42d1a26884b3e32ffa943fe6494af7211506c" - integrity sha512-+fNSeZRstOpdRJpdGUkRONFCaiAqWkc91zXgg76Nlp5ndBQE25Kk5yK8gCPG1aGnCrbariiPr5j9DmrYH78JCA== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - hash.js "1.1.3" - -"@ethersproject/signing-key@5.1.0", "@ethersproject/signing-key@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/signing-key/-/signing-key-5.1.0.tgz#6eddfbddb6826b597b9650e01acf817bf8991b9c" - integrity sha512-tE5LFlbmdObG8bY04NpuwPWSRPgEswfxweAI1sH7TbP0ml1elNfqcq7ii/3AvIN05i5U0Pkm3Tf8bramt8MmLw== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - bn.js "^4.4.0" - elliptic "6.5.4" - -"@ethersproject/solidity@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/solidity/-/solidity-5.1.0.tgz#095a9c75244edccb26c452c155736d363399b954" - integrity sha512-kPodsGyo9zg1g9XSXp1lGhFaezBAUUsAUB1Vf6OkppE5Wksg4Et+x3kG4m7J/uShDMP2upkJtHNsIBK2XkVpKQ== - dependencies: - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/sha2" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - -"@ethersproject/strings@5.1.0", "@ethersproject/strings@>=5.0.0-beta.130", "@ethersproject/strings@^5.0.4", "@ethersproject/strings@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/strings/-/strings-5.1.0.tgz#0f95a56c3c8c9d5510a06c241d818779750e2da5" - integrity sha512-perBZy0RrmmL0ejiFGUOlBVjMsUceqLut3OBP3zP96LhiJWWbS8u1NqQVgN4/Gyrbziuda66DxiQocXhsvx+Sw== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/transactions@5.1.1", "@ethersproject/transactions@^5.0.0-beta.135", "@ethersproject/transactions@^5.1.0": - version "5.1.1" - resolved "https://registry.yarnpkg.com/@ethersproject/transactions/-/transactions-5.1.1.tgz#5a6bbb25fb062c3cc75eb0db12faefcdd3870813" - integrity sha512-Nwgbp09ttIVN0OoUBatCXaHxR7grWPHbozJN8v7AXDLrl6nnOIBEMDh+yJTnosSQlFhcyjfTGGN+Mx6R8HdvMw== - dependencies: - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/rlp" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" - -"@ethersproject/units@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/units/-/units-5.1.0.tgz#b6ab3430ebc22adc3cb4839516496f167bee3ad5" - integrity sha512-isvJrx6qG0nKWfxsGORNjmOq/nh175fStfvRTA2xEKrGqx8JNJY83fswu4GkILowfriEM/eYpretfJnfzi7YhA== - dependencies: - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/constants" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - -"@ethersproject/wallet@5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wallet/-/wallet-5.1.0.tgz#134c5816eaeaa586beae9f9ff67891104a2c9a15" - integrity sha512-ULmUtiYQLTUS+y3DgkLzRhFEK10zMwmjOthnjiZxee3Q/MVwr3rnmuAnXIUZrPjna6hvUPnyRIdW5XuF0Ld0YQ== - dependencies: - "@ethersproject/abstract-provider" "^5.1.0" - "@ethersproject/abstract-signer" "^5.1.0" - "@ethersproject/address" "^5.1.0" - "@ethersproject/bignumber" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hash" "^5.1.0" - "@ethersproject/hdnode" "^5.1.0" - "@ethersproject/json-wallets" "^5.1.0" - "@ethersproject/keccak256" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/random" "^5.1.0" - "@ethersproject/signing-key" "^5.1.0" - "@ethersproject/transactions" "^5.1.0" - "@ethersproject/wordlists" "^5.1.0" - -"@ethersproject/web@5.1.0", "@ethersproject/web@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/web/-/web-5.1.0.tgz#ed56bbe4e3d9a8ffe3b2ed882da5c62d3551381b" - integrity sha512-LTeluWgTq04+RNqAkVhpydPcRZK/kKxD2Vy7PYGrAD27ABO9kTqTBKwiOuzTyAHKUQHfnvZbXmxBXJAGViSDcA== - dependencies: - "@ethersproject/base64" "^5.1.0" - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - -"@ethersproject/wordlists@5.1.0", "@ethersproject/wordlists@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@ethersproject/wordlists/-/wordlists-5.1.0.tgz#54eb9ef3a00babbff90ffe124e19c89e07e6aace" - integrity sha512-NsUCi/TpBb+oTFvMSccUkJGtp5o/84eOyqp5q5aBeiNBSLkYyw21znRn9mAmxZgySpxgruVgKbaapnYPgvctPQ== - dependencies: - "@ethersproject/bytes" "^5.1.0" - "@ethersproject/hash" "^5.1.0" - "@ethersproject/logger" "^5.1.0" - "@ethersproject/properties" "^5.1.0" - "@ethersproject/strings" "^5.1.0" - -"@resolver-engine/core@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/core/-/core-0.3.3.tgz#590f77d85d45bc7ecc4e06c654f41345db6ca967" - integrity sha512-eB8nEbKDJJBi5p5SrvrvILn4a0h42bKtbCTri3ZxCGt6UvoQyp7HnGOfki944bUjBSHKK3RvgfViHn+kqdXtnQ== - dependencies: - debug "^3.1.0" - is-url "^1.2.4" - request "^2.85.0" - -"@resolver-engine/fs@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/fs/-/fs-0.3.3.tgz#fbf83fa0c4f60154a82c817d2fe3f3b0c049a973" - integrity sha512-wQ9RhPUcny02Wm0IuJwYMyAG8fXVeKdmhm8xizNByD4ryZlx6PP6kRen+t/haF43cMfmaV7T3Cx6ChOdHEhFUQ== - dependencies: - "@resolver-engine/core" "^0.3.3" - debug "^3.1.0" - -"@resolver-engine/imports-fs@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports-fs/-/imports-fs-0.3.3.tgz#4085db4b8d3c03feb7a425fbfcf5325c0d1e6c1b" - integrity sha512-7Pjg/ZAZtxpeyCFlZR5zqYkz+Wdo84ugB5LApwriT8XFeQoLwGUj4tZFFvvCuxaNCcqZzCYbonJgmGObYBzyCA== - dependencies: - "@resolver-engine/fs" "^0.3.3" - "@resolver-engine/imports" "^0.3.3" - debug "^3.1.0" - -"@resolver-engine/imports@^0.3.3": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@resolver-engine/imports/-/imports-0.3.3.tgz#badfb513bb3ff3c1ee9fd56073e3144245588bcc" - integrity sha512-anHpS4wN4sRMwsAbMXhMfOD/y4a4Oo0Cw/5+rue7hSwGWsDOQaAU1ClK1OxjUC35/peazxEl8JaSRRS+Xb8t3Q== - dependencies: - "@resolver-engine/core" "^0.3.3" - debug "^3.1.0" - hosted-git-info "^2.6.0" - path-browserify "^1.0.0" - url "^0.11.0" - -"@sindresorhus/is@^0.14.0": - version "0.14.0" - resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea" - integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ== - -"@szmarczak/http-timer@^1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421" - integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA== - dependencies: - defer-to-connect "^1.0.1" - -"@typechain/ethers-v5@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@typechain/ethers-v5/-/ethers-v5-2.0.0.tgz#cd3ca1590240d587ca301f4c029b67bfccd08810" - integrity sha512-0xdCkyGOzdqh4h5JSf+zoWx85IusEjDcPIwNEHP8mrWSnCae4rvrqB+/gtpdNfX7zjlFlZiMeePn2r63EI3Lrw== - dependencies: - ethers "^5.0.2" - -"@types/bn.js@^4.11.3", "@types/bn.js@^4.11.5": - version "4.11.6" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.6.tgz#c306c70d9358aaea33cd4eda092a742b9505967c" - integrity sha512-pqr857jrp2kPuO9uRjZ3PwnJTjoQy+fcdxvBTvHm6dkmEL9q+hDD/2j/0ELOBPtPnS8LjCX0gI9nbl8lVkadpg== - dependencies: - "@types/node" "*" - -"@types/bn.js@^5.1.0": - version "5.1.0" - resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-5.1.0.tgz#32c5d271503a12653c62cf4d2b45e6eab8cebc68" - integrity sha512-QSSVYj7pYFN49kW77o2s9xTCwZ8F2xLbjLLSEVh8D2F4JUhZtPAGOFLTD+ffqksBx/u4cE/KImFjyhqCjn/LIA== - dependencies: - "@types/node" "*" - -"@types/mkdirp@^0.5.2": - version "0.5.2" - resolved "https://registry.yarnpkg.com/@types/mkdirp/-/mkdirp-0.5.2.tgz#503aacfe5cc2703d5484326b1b27efa67a339c1f" - integrity sha512-U5icWpv7YnZYGsN4/cmh3WD2onMY0aJIiTE6+51TwJCttdHvtCYmkBNOobHlXwrJRL0nkH9jH4kD+1FAdMN4Tg== - dependencies: - "@types/node" "*" - -"@types/node-fetch@^2.5.5": - version "2.5.10" - resolved "https://registry.yarnpkg.com/@types/node-fetch/-/node-fetch-2.5.10.tgz#9b4d4a0425562f9fcea70b12cb3fcdd946ca8132" - integrity sha512-IpkX0AasN44hgEad0gEF/V6EgR5n69VEqPEgnmoM8GsIGro3PowbWs4tR6IhxUTyPLpOn+fiGG6nrQhcmoCuIQ== - dependencies: - "@types/node" "*" - form-data "^3.0.0" - -"@types/node@*": - version "15.3.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-15.3.0.tgz#d6fed7d6bc6854306da3dea1af9f874b00783e26" - integrity sha512-8/bnjSZD86ZfpBsDlCIkNXIvm+h6wi9g7IqL+kmFkQ+Wvu3JrasgLElfiPgoo8V8vVfnEi0QVS12gbl94h9YsQ== - -"@types/node@^12.12.6": - version "12.20.13" - resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.13.tgz#e743bae112bd779ac9650f907197dd2caa7f0364" - integrity sha512-1x8W5OpxPq+T85OUsHRP6BqXeosKmeXRtjoF39STcdf/UWLqUsoehstZKOi0CunhVqHG17AyZgpj20eRVooK6A== - -"@types/pbkdf2@^3.0.0": - version "3.1.0" - resolved "https://registry.yarnpkg.com/@types/pbkdf2/-/pbkdf2-3.1.0.tgz#039a0e9b67da0cdc4ee5dab865caa6b267bb66b1" - integrity sha512-Cf63Rv7jCQ0LaL8tNXmEyqTHuIJxRdlS5vMh1mj5voN4+QFhVZnlZruezqpWYDiJ8UTzhP0VmeLXCmBk66YrMQ== - dependencies: - "@types/node" "*" - -"@types/prettier@^2.1.1": - version "2.2.3" - resolved "https://registry.yarnpkg.com/@types/prettier/-/prettier-2.2.3.tgz#ef65165aea2924c9359205bf748865b8881753c0" - integrity sha512-PijRCG/K3s3w1We6ynUKdxEc5AcuuH3NBmMDP8uvKVp6X43UY7NQlTzczakXP3DJR0F4dfNQIGjU2cUeRYs2AA== - -"@types/resolve@^0.0.8": - version "0.0.8" - resolved "https://registry.yarnpkg.com/@types/resolve/-/resolve-0.0.8.tgz#f26074d238e02659e323ce1a13d041eee280e194" - integrity sha512-auApPaJf3NPfe18hSoJkp8EbZzer2ISk7o8mCC3M9he/a04+gbMF97NkpD2S8riMGvm4BMRI59/SZQSaLTKpsQ== - dependencies: - "@types/node" "*" - -"@types/secp256k1@^4.0.1": - version "4.0.2" - resolved "https://registry.yarnpkg.com/@types/secp256k1/-/secp256k1-4.0.2.tgz#20c29a87149d980f64464e56539bf4810fdb5d1d" - integrity sha512-QMg+9v0bbNJ2peLuHRWxzmy0HRJIG6gFZNhaRSp7S3ggSbCCxiqQB2/ybvhXyhHOCequpNkrx7OavNhrWOsW0A== - dependencies: - "@types/node" "*" - -"@ungap/promise-all-settled@1.1.2": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz#aa58042711d6e3275dd37dc597e5d31e8c290a44" - integrity sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q== - -"@yarnpkg/lockfile@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@yarnpkg/lockfile/-/lockfile-1.1.0.tgz#e77a97fbd345b76d83245edcd17d393b1b41fb31" - integrity sha512-GpSwvyXOcOOlV70vbnzjj4fW5xW/FdUF6nQEt1ENy7m4ZCczi1+/buVUPAqmGfqznsORNFzUMjctTIp8a9tuCQ== - -abstract-leveldown@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-3.0.0.tgz#5cb89f958a44f526779d740d1440e743e0c30a57" - integrity sha512-KUWx9UWGQD12zsmLNj64/pndaz4iJh/Pj7nopgkfDG6RlCcbMZvT6+9l7dchK4idog2Is8VdC/PvNbFuFmalIQ== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@^2.4.1, abstract-leveldown@~2.7.1: - version "2.7.2" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.7.2.tgz#87a44d7ebebc341d59665204834c8b7e0932cc93" - integrity sha512-+OVvxH2rHVEhWLdbudP6p0+dNMXu8JA1CbhP19T8paTYAcX7oJ4OVjT+ZUVpv7mITxXHqDMej+GdqXBmXkw09w== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@^5.0.0, abstract-leveldown@~5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-5.0.0.tgz#f7128e1f86ccabf7d2893077ce5d06d798e386c6" - integrity sha512-5mU5P1gXtsMIXg65/rsYGsi93+MlogXZ9FA8JnwKurHQg64bfXwGYVdVdijNTVNOlAsuIiOwHdvFFD5JqCJQ7A== - dependencies: - xtend "~4.0.0" - -abstract-leveldown@~2.6.0: - version "2.6.3" - resolved "https://registry.yarnpkg.com/abstract-leveldown/-/abstract-leveldown-2.6.3.tgz#1c5e8c6a5ef965ae8c35dfb3a8770c476b82c4b8" - integrity sha512-2++wDf/DYqkPR3o5tbfdhF96EfMApo1GpPfzOsR/ZYXdkSmELlvOOEAl9iKkRsktMPHdGjO4rtkBpf2I7TiTeA== - dependencies: - xtend "~4.0.0" - -accepts@~1.3.7: - version "1.3.7" - resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.7.tgz#531bc726517a3b2b41f850021c6cc15eaab507cd" - integrity sha512-Il80Qs2WjYlJIBNzNkK6KYqlVMTbZLXgHx2oT0pU/fjRHyEp+PEfEPY0R3WCwAGVOtauxh1hOxNgIf5bv7dQpA== - dependencies: - mime-types "~2.1.24" - negotiator "0.6.2" - -aes-js@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d" - integrity sha1-4h3xCtbCBTKVvLuNq0Cwnb6ofk0= - -aes-js@^3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.1.2.tgz#db9aabde85d5caabbfc0d4f2a4446960f627146a" - integrity sha512-e5pEa2kBnBOgR4Y/p20pskXI74UEz7de8ZGVo58asOtvSVG5YAbJeELPZxOmt+Bnz3rX753YKhfIn4X4l1PPRQ== - -ajv@^6.12.3: - version "6.12.6" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" - integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== - dependencies: - fast-deep-equal "^3.1.1" - fast-json-stable-stringify "^2.0.0" - json-schema-traverse "^0.4.1" - uri-js "^4.2.2" - -ansi-colors@4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" - integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== - -ansi-regex@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" - integrity sha1-w7M6te42DYbg5ijwRorn7yfWVN8= - -ansi-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" - integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= - -ansi-regex@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" - integrity sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg== - -ansi-styles@^2.2.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" - integrity sha1-tDLdM1i2NM914eRmQ2gkBTPB3b4= - -ansi-styles@^3.2.1: - version "3.2.1" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" - integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== - dependencies: - color-convert "^1.9.0" - -ansi-styles@^4.0.0, ansi-styles@^4.1.0: - version "4.3.0" - resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937" - integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg== - dependencies: - color-convert "^2.0.1" - -anymatch@~3.1.1: - version "3.1.2" - resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716" - integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg== - dependencies: - normalize-path "^3.0.0" - picomatch "^2.0.4" - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -arr-diff@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520" - integrity sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA= - -arr-flatten@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1" - integrity sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg== - -arr-union@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4" - integrity sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ= - -array-back@^1.0.3, array-back@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-1.0.4.tgz#644ba7f095f7ffcf7c43b5f0dc39d3c1f03c063b" - integrity sha1-ZEun8JX3/898Q7Xw3DnTwfA8Bjs= - dependencies: - typical "^2.6.0" - -array-back@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/array-back/-/array-back-2.0.0.tgz#6877471d51ecc9c9bfa6136fb6c7d5fe69748022" - integrity sha512-eJv4pLLufP3g5kcZry0j6WXpIbzYw9GUB4mVJZno9wfwiBxbizTnHCw3VJb07cBihbFX48Y7oSrW9y+gt4glyw== - dependencies: - typical "^2.6.1" - -array-filter@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-1.0.0.tgz#baf79e62e6ef4c2a4c0b831232daffec251f9d83" - integrity sha1-uveeYubvTCpMC4MSMtr/7CUfnYM= - -array-flatten@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" - integrity sha1-ml9pkFGx5wczKPKgCJaLZOopVdI= - -array-unique@^0.3.2: - version "0.3.2" - resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" - integrity sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg= - -asn1.js@^5.2.0: - version "5.4.1" - resolved "https://registry.yarnpkg.com/asn1.js/-/asn1.js-5.4.1.tgz#11a980b84ebb91781ce35b0fdc2ee294e3783f07" - integrity sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA== - dependencies: - bn.js "^4.0.0" - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - safer-buffer "^2.1.0" - -asn1@~0.2.3: - version "0.2.4" - resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" - integrity sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg== - dependencies: - safer-buffer "~2.1.0" - -assert-plus@1.0.0, assert-plus@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" - integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU= - -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/assertion-error/-/assertion-error-1.1.0.tgz#e60b6b0e8f301bd97e5375215bda406c85118c0b" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - -assign-symbols@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367" - integrity sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c= - -async-eventemitter@^0.2.2: - version "0.2.4" - resolved "https://registry.yarnpkg.com/async-eventemitter/-/async-eventemitter-0.2.4.tgz#f5e7c8ca7d3e46aab9ec40a292baf686a0bafaca" - integrity sha512-pd20BwL7Yt1zwDFy+8MX8F1+WCT8aQeKj0kQnTrH9WaeRETlRamVhD0JtRPmrV4GfOJ2F9CvdQkZeZhnh2TuHw== - dependencies: - async "^2.4.0" - -async-limiter@~1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.1.tgz#dd379e94f0db8310b08291f9d64c3209766617fd" - integrity sha512-csOlWGAcRFJaI6m+F2WKdnMKr4HhdhFVBk0H/QbJFMCr+uO2kwohwXQPxw/9OCxp05r5ghVBFSyioixx3gfkNQ== - -async@2.6.2: - version "2.6.2" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.2.tgz#18330ea7e6e313887f5d2f2a904bac6fe4dd5381" - integrity sha512-H1qVYh1MYhEEFLsP97cVKqCGo7KfCyTt6uEWqsTBr9SO84oK9Uwbyd/yCW+6rKJLHksBNUVWZDAjfS+Ccx0Bbg== - dependencies: - lodash "^4.17.11" - -async@^1.4.2: - version "1.5.2" - resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" - integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= - -async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.1: - version "2.6.3" - resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" - integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== - dependencies: - lodash "^4.17.14" - -asynckit@^0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" - integrity sha1-x57Zf380y48robyXkLzDZkdLS3k= - -atob@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" - integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== - -available-typed-arrays@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.2.tgz#6b098ca9d8039079ee3f77f7b783c4480ba513f5" - integrity sha512-XWX3OX8Onv97LMk/ftVyBibpGwY5a8SmuxZPzeOxqmuEqUCOM9ZE+uIaD1VNJ5QnvU2UQusvmKbuM1FR8QWGfQ== - dependencies: - array-filter "^1.0.0" - -aws-sign2@~0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" - integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= - -aws4@^1.8.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.11.0.tgz#d61f46d83b2519250e2784daf5b09479a8b41c59" - integrity sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA== - -babel-code-frame@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.26.0.tgz#63fd43f7dc1e3bb7ce35947db8fe369a3f58c74b" - integrity sha1-Y/1D99weO7fONZR9uP42mj9Yx0s= - dependencies: - chalk "^1.1.3" - esutils "^2.0.2" - js-tokens "^3.0.2" - -babel-core@^6.0.14, babel-core@^6.26.0: - version "6.26.3" - resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207" - integrity sha512-6jyFLuDmeidKmUEb3NM+/yawG0M2bDZ9Z1qbZP59cyHLz8kYGKYwpJP0UwUKKUiTRNvxfLesJnTedqczP7cTDA== - dependencies: - babel-code-frame "^6.26.0" - babel-generator "^6.26.0" - babel-helpers "^6.24.1" - babel-messages "^6.23.0" - babel-register "^6.26.0" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - convert-source-map "^1.5.1" - debug "^2.6.9" - json5 "^0.5.1" - lodash "^4.17.4" - minimatch "^3.0.4" - path-is-absolute "^1.0.1" - private "^0.1.8" - slash "^1.0.0" - source-map "^0.5.7" - -babel-generator@^6.26.0: - version "6.26.1" - resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90" - integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA== - dependencies: - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - detect-indent "^4.0.0" - jsesc "^1.3.0" - lodash "^4.17.4" - source-map "^0.5.7" - trim-right "^1.0.1" - -babel-helper-builder-binary-assignment-operator-visitor@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-builder-binary-assignment-operator-visitor/-/babel-helper-builder-binary-assignment-operator-visitor-6.24.1.tgz#cce4517ada356f4220bcae8a02c2b346f9a56664" - integrity sha1-zORReto1b0IgvK6KAsKzRvmlZmQ= - dependencies: - babel-helper-explode-assignable-expression "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-call-delegate@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d" - integrity sha1-7Oaqzdx25Bw0YfiL/Fdb0Nqi340= - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-define-map@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-define-map/-/babel-helper-define-map-6.26.0.tgz#a5f56dab41a25f97ecb498c7ebaca9819f95be5f" - integrity sha1-pfVtq0GiX5fstJjH66ypgZ+Vvl8= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-explode-assignable-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-explode-assignable-expression/-/babel-helper-explode-assignable-expression-6.24.1.tgz#f25b82cf7dc10433c55f70592d5746400ac22caa" - integrity sha1-8luCz33BBDPFX3BZLVdGQArCLKo= - dependencies: - babel-runtime "^6.22.0" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-function-name@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" - integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk= - dependencies: - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-get-function-arity@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" - integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-hoist-variables@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-hoist-variables/-/babel-helper-hoist-variables-6.24.1.tgz#1ecb27689c9d25513eadbc9914a73f5408be7a76" - integrity sha1-HssnaJydJVE+rbyZFKc/VAi+enY= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-optimise-call-expression@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-optimise-call-expression/-/babel-helper-optimise-call-expression-6.24.1.tgz#f7a13427ba9f73f8f4fa993c54a97882d1244257" - integrity sha1-96E0J7qfc/j0+pk8VKl4gtEkQlc= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-helper-regex@^6.24.1: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-helper-regex/-/babel-helper-regex-6.26.0.tgz#325c59f902f82f24b74faceed0363954f6495e72" - integrity sha1-MlxZ+QL4LyS3T6zu0DY5VPZJXnI= - dependencies: - babel-runtime "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-helper-remap-async-to-generator@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-remap-async-to-generator/-/babel-helper-remap-async-to-generator-6.24.1.tgz#5ec581827ad723fecdd381f1c928390676e4551b" - integrity sha1-XsWBgnrXI/7N04HxySg5BnbkVRs= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helper-replace-supers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helper-replace-supers/-/babel-helper-replace-supers-6.24.1.tgz#bf6dbfe43938d17369a213ca8a8bf74b6a90ab1a" - integrity sha1-v22/5Dk40XNpohPKiov3S2qQqxo= - dependencies: - babel-helper-optimise-call-expression "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-helpers@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-helpers/-/babel-helpers-6.24.1.tgz#3471de9caec388e5c850e597e58a26ddf37602b2" - integrity sha1-NHHenK7DiOXIUOWX5Yom3fN2ArI= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-messages@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" - integrity sha1-8830cDhYA1sqKVHG7F7fbGLyYw4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-check-es2015-constants@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-check-es2015-constants/-/babel-plugin-check-es2015-constants-6.22.0.tgz#35157b101426fd2ffd3da3f75c7d1e91835bbf8a" - integrity sha1-NRV7EBQm/S/9PaP3XH0ekYNbv4o= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-syntax-async-functions@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95" - integrity sha1-ytnK0RkbWtY0vzCuCHI5HgZHvpU= - -babel-plugin-syntax-exponentiation-operator@^6.8.0: - version "6.13.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de" - integrity sha1-nufoM3KQ2pUoggGmpX9BcDF4MN4= - -babel-plugin-syntax-trailing-function-commas@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3" - integrity sha1-ugNgk3+NBuQBgKQ/4NVhb/9TLPM= - -babel-plugin-transform-async-to-generator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-async-to-generator/-/babel-plugin-transform-async-to-generator-6.24.1.tgz#6536e378aff6cb1d5517ac0e40eb3e9fc8d08761" - integrity sha1-ZTbjeK/2yx1VF6wOQOs+n8jQh2E= - dependencies: - babel-helper-remap-async-to-generator "^6.24.1" - babel-plugin-syntax-async-functions "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-arrow-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-arrow-functions/-/babel-plugin-transform-es2015-arrow-functions-6.22.0.tgz#452692cb711d5f79dc7f85e440ce41b9f244d221" - integrity sha1-RSaSy3EdX3ncf4XkQM5BufJE0iE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoped-functions@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoped-functions/-/babel-plugin-transform-es2015-block-scoped-functions-6.22.0.tgz#bbc51b49f964d70cb8d8e0b94e820246ce3a6141" - integrity sha1-u8UbSflk1wy42OC5ToICRs46YUE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-block-scoping@^6.23.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f" - integrity sha1-1w9SmcEwjQXBL0Y4E7CgnnOxiV8= - dependencies: - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - lodash "^4.17.4" - -babel-plugin-transform-es2015-classes@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db" - integrity sha1-WkxYpQyclGHlZLSyo7+ryXolhNs= - dependencies: - babel-helper-define-map "^6.24.1" - babel-helper-function-name "^6.24.1" - babel-helper-optimise-call-expression "^6.24.1" - babel-helper-replace-supers "^6.24.1" - babel-messages "^6.23.0" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-computed-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3" - integrity sha1-b+Ko0WiV1WNPTNmZttNICjCBWbM= - dependencies: - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-destructuring@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d" - integrity sha1-mXux8auWf2gtKwh2/jWNYOdlxW0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-duplicate-keys@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e" - integrity sha1-c+s9MQypaePvnskcU3QabxV2Qj4= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-for-of@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691" - integrity sha1-9HyVsrYT3x0+zC/bdXNiPHUkhpE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-function-name@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b" - integrity sha1-g0yJhTvDaxrw86TF26qU/Y6sqos= - dependencies: - babel-helper-function-name "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-literals/-/babel-plugin-transform-es2015-literals-6.22.0.tgz#4f54a02d6cd66cf915280019a31d31925377ca2e" - integrity sha1-T1SgLWzWbPkVKAAZox0xklN3yi4= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-modules-amd@^6.22.0, babel-plugin-transform-es2015-modules-amd@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-amd/-/babel-plugin-transform-es2015-modules-amd-6.24.1.tgz#3b3e54017239842d6d19c3011c4bd2f00a00d154" - integrity sha1-Oz5UAXI5hC1tGcMBHEvS8AoA0VQ= - dependencies: - babel-plugin-transform-es2015-modules-commonjs "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-es2015-modules-commonjs@^6.24.1: - version "6.26.2" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-commonjs/-/babel-plugin-transform-es2015-modules-commonjs-6.26.2.tgz#58a793863a9e7ca870bdc5a881117ffac27db6f3" - integrity sha512-CV9ROOHEdrjcwhIaJNBGMBCodN+1cfkwtM1SbUHmvyy35KGT7fohbpOxkE2uLz1o6odKK2Ck/tz47z+VqQfi9Q== - dependencies: - babel-plugin-transform-strict-mode "^6.24.1" - babel-runtime "^6.26.0" - babel-template "^6.26.0" - babel-types "^6.26.0" - -babel-plugin-transform-es2015-modules-systemjs@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23" - integrity sha1-/4mhQrkRmpBhlfXxBuzzBdlAfSM= - dependencies: - babel-helper-hoist-variables "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-modules-umd@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468" - integrity sha1-rJl+YoXNGO1hdq22B9YCNErThGg= - dependencies: - babel-plugin-transform-es2015-modules-amd "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - -babel-plugin-transform-es2015-object-super@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d" - integrity sha1-JM72muIcuDp/hgPa0CH1cusnj40= - dependencies: - babel-helper-replace-supers "^6.24.1" - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-parameters@^6.23.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b" - integrity sha1-V6w1GrScrxSpfNE7CfZv3wpiXys= - dependencies: - babel-helper-call-delegate "^6.24.1" - babel-helper-get-function-arity "^6.24.1" - babel-runtime "^6.22.0" - babel-template "^6.24.1" - babel-traverse "^6.24.1" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-shorthand-properties@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0" - integrity sha1-JPh11nIch2YbvZmkYi5R8U3jiqA= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-spread@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-spread/-/babel-plugin-transform-es2015-spread-6.22.0.tgz#d6d68a99f89aedc4536c81a542e8dd9f1746f8d1" - integrity sha1-1taKmfia7cRTbIGlQujdnxdG+NE= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-sticky-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc" - integrity sha1-AMHNsaynERLN8M9hJsLta0V8zbw= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-plugin-transform-es2015-template-literals@^6.22.0: - version "6.22.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-template-literals/-/babel-plugin-transform-es2015-template-literals-6.22.0.tgz#a84b3450f7e9f8f1f6839d6d687da84bb1236d8d" - integrity sha1-qEs0UPfp+PH2g51taH2oS7EjbY0= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-typeof-symbol@^6.23.0: - version "6.23.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372" - integrity sha1-3sCfHN3/lLUqxz1QXITfWdzOs3I= - dependencies: - babel-runtime "^6.22.0" - -babel-plugin-transform-es2015-unicode-regex@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9" - integrity sha1-04sS9C6nMj9yk4fxinxa4frrNek= - dependencies: - babel-helper-regex "^6.24.1" - babel-runtime "^6.22.0" - regexpu-core "^2.0.0" - -babel-plugin-transform-exponentiation-operator@^6.22.0: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-exponentiation-operator/-/babel-plugin-transform-exponentiation-operator-6.24.1.tgz#2ab0c9c7f3098fa48907772bb813fe41e8de3a0e" - integrity sha1-KrDJx/MJj6SJB3cruBP+QejeOg4= - dependencies: - babel-helper-builder-binary-assignment-operator-visitor "^6.24.1" - babel-plugin-syntax-exponentiation-operator "^6.8.0" - babel-runtime "^6.22.0" - -babel-plugin-transform-regenerator@^6.22.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f" - integrity sha1-4HA2lvveJ/Cj78rPi03KL3s6jy8= - dependencies: - regenerator-transform "^0.10.0" - -babel-plugin-transform-strict-mode@^6.24.1: - version "6.24.1" - resolved "https://registry.yarnpkg.com/babel-plugin-transform-strict-mode/-/babel-plugin-transform-strict-mode-6.24.1.tgz#d5faf7aa578a65bbe591cf5edae04a0c67020758" - integrity sha1-1fr3qleKZbvlkc9e2uBKDGcCB1g= - dependencies: - babel-runtime "^6.22.0" - babel-types "^6.24.1" - -babel-preset-env@^1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a" - integrity sha512-9OR2afuKDneX2/q2EurSftUYM0xGu4O2D9adAhVfADDhrYDaxXV0rBbevVYoY9n6nyX1PmQW/0jtpJvUNr9CHg== - dependencies: - babel-plugin-check-es2015-constants "^6.22.0" - babel-plugin-syntax-trailing-function-commas "^6.22.0" - babel-plugin-transform-async-to-generator "^6.22.0" - babel-plugin-transform-es2015-arrow-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoped-functions "^6.22.0" - babel-plugin-transform-es2015-block-scoping "^6.23.0" - babel-plugin-transform-es2015-classes "^6.23.0" - babel-plugin-transform-es2015-computed-properties "^6.22.0" - babel-plugin-transform-es2015-destructuring "^6.23.0" - babel-plugin-transform-es2015-duplicate-keys "^6.22.0" - babel-plugin-transform-es2015-for-of "^6.23.0" - babel-plugin-transform-es2015-function-name "^6.22.0" - babel-plugin-transform-es2015-literals "^6.22.0" - babel-plugin-transform-es2015-modules-amd "^6.22.0" - babel-plugin-transform-es2015-modules-commonjs "^6.23.0" - babel-plugin-transform-es2015-modules-systemjs "^6.23.0" - babel-plugin-transform-es2015-modules-umd "^6.23.0" - babel-plugin-transform-es2015-object-super "^6.22.0" - babel-plugin-transform-es2015-parameters "^6.23.0" - babel-plugin-transform-es2015-shorthand-properties "^6.22.0" - babel-plugin-transform-es2015-spread "^6.22.0" - babel-plugin-transform-es2015-sticky-regex "^6.22.0" - babel-plugin-transform-es2015-template-literals "^6.22.0" - babel-plugin-transform-es2015-typeof-symbol "^6.23.0" - babel-plugin-transform-es2015-unicode-regex "^6.22.0" - babel-plugin-transform-exponentiation-operator "^6.22.0" - babel-plugin-transform-regenerator "^6.22.0" - browserslist "^3.2.6" - invariant "^2.2.2" - semver "^5.3.0" - -babel-register@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-register/-/babel-register-6.26.0.tgz#6ed021173e2fcb486d7acb45c6009a856f647071" - integrity sha1-btAhFz4vy0htestFxgCahW9kcHE= - dependencies: - babel-core "^6.26.0" - babel-runtime "^6.26.0" - core-js "^2.5.0" - home-or-tmp "^2.0.0" - lodash "^4.17.4" - mkdirp "^0.5.1" - source-map-support "^0.4.15" - -babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe" - integrity sha1-llxwWGaOgrVde/4E/yM3vItWR/4= - dependencies: - core-js "^2.4.0" - regenerator-runtime "^0.11.0" - -babel-template@^6.24.1, babel-template@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.26.0.tgz#de03e2d16396b069f46dd9fff8521fb1a0e35e02" - integrity sha1-3gPi0WOWsGn0bdn/+FIfsaDjXgI= - dependencies: - babel-runtime "^6.26.0" - babel-traverse "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - lodash "^4.17.4" - -babel-traverse@^6.24.1, babel-traverse@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee" - integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4= - dependencies: - babel-code-frame "^6.26.0" - babel-messages "^6.23.0" - babel-runtime "^6.26.0" - babel-types "^6.26.0" - babylon "^6.18.0" - debug "^2.6.8" - globals "^9.18.0" - invariant "^2.2.2" - lodash "^4.17.4" - -babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0: - version "6.26.0" - resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497" - integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc= - dependencies: - babel-runtime "^6.26.0" - esutils "^2.0.2" - lodash "^4.17.4" - to-fast-properties "^1.0.3" - -babelify@^7.3.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/babelify/-/babelify-7.3.0.tgz#aa56aede7067fd7bd549666ee16dc285087e88e5" - integrity sha1-qlau3nBn/XvVSWZu4W3ChQh+iOU= - dependencies: - babel-core "^6.0.14" - object-assign "^4.0.0" - -babylon@^6.18.0: - version "6.18.0" - resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3" - integrity sha512-q/UEjfGJ2Cm3oKV71DJz9d25TPnq5rhBVL2Q4fA5wcC3jcrdn7+SssEybFIxwAvvP+YCsCYNKughoF33GxgycQ== - -backoff@^2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/backoff/-/backoff-2.5.0.tgz#f616eda9d3e4b66b8ca7fca79f695722c5f8e26f" - integrity sha1-9hbtqdPktmuMp/ynn2lXIsX44m8= - dependencies: - precond "0.2" - -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== - -base-x@^3.0.2, base-x@^3.0.8: - version "3.0.8" - resolved "https://registry.yarnpkg.com/base-x/-/base-x-3.0.8.tgz#1e1106c2537f0162e8b52474a557ebb09000018d" - integrity sha512-Rl/1AWP4J/zRrk54hhlxH4drNxPJXYUaKffODVI53/dAsV4t9fBxyxYKAVPU1XBHxYwOWP9h9H0hM2MVw4YfJA== - dependencies: - safe-buffer "^5.0.1" - -base64-js@^1.3.1: - version "1.5.1" - resolved "https://registry.yarnpkg.com/base64-js/-/base64-js-1.5.1.tgz#1b1b440160a5bf7ad40b650f095963481903930a" - integrity sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA== - -base@^0.11.1: - version "0.11.2" - resolved "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f" - integrity sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg== - dependencies: - cache-base "^1.0.1" - class-utils "^0.3.5" - component-emitter "^1.2.1" - define-property "^1.0.0" - isobject "^3.0.1" - mixin-deep "^1.2.0" - pascalcase "^0.1.1" - -bcrypt-pbkdf@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz#a4301d389b6a43f9b67ff3ca11a3f6637e360e9e" - integrity sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4= - dependencies: - tweetnacl "^0.14.3" - -bech32@1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/bech32/-/bech32-1.1.4.tgz#e38c9f37bf179b8eb16ae3a772b40c356d4832e9" - integrity sha512-s0IrSOzLlbvX7yp4WBfPITzpAU8sqQcpsmwXDiKwrG4r491vwCO/XpejasRNl0piBMe/DvP4Tz0mIS/X1DPJBQ== - -bignumber.js@^9.0.0: - version "9.0.1" - resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-9.0.1.tgz#8d7ba124c882bfd8e43260c67475518d0689e4e5" - integrity sha512-IdZR9mh6ahOBv/hYGiXyVuyCetmGJhtYkqLBpTStdhEGjegpPlUawydyaF3pbIOFynJTpllEs+NP+CS9jKFLjA== - -binary-extensions@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" - integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== - -bip39@2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235" - integrity sha512-xwIx/8JKoT2+IPJpFEfXoWdYwP7UVAoUxxLNfGCfVowaJE7yg1Y5B1BVPqlUNsBq5/nGwmFkwRJ8xDW4sX8OdA== - dependencies: - create-hash "^1.1.0" - pbkdf2 "^3.0.9" - randombytes "^2.0.1" - safe-buffer "^5.0.1" - unorm "^1.3.3" - -blakejs@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/blakejs/-/blakejs-1.1.0.tgz#69df92ef953aa88ca51a32df6ab1c54a155fc7a5" - integrity sha1-ad+S75U6qIylGjLfarHFShVfx6U= - -bluebird@^3.5.0, bluebird@^3.5.2: - version "3.7.2" - resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.7.2.tgz#9f229c15be272454ffa973ace0dbee79a1b0c36f" - integrity sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg== - -bn.js@4.11.6: - version "4.11.6" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215" - integrity sha1-UzRK2xRhehP26N0s4okF0cC6MhU= - -bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.10.0, bn.js@^4.11.0, bn.js@^4.11.1, bn.js@^4.11.6, bn.js@^4.11.8, bn.js@^4.11.9, bn.js@^4.4.0, bn.js@^4.8.0: - version "4.12.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.12.0.tgz#775b3f278efbb9718eec7361f483fb36fbbfea88" - integrity sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA== - -bn.js@^5.0.0, bn.js@^5.1.1, bn.js@^5.1.2: - version "5.2.0" - resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-5.2.0.tgz#358860674396c6997771a9d051fcc1b57d4ae002" - integrity sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw== - -body-parser@1.19.0, body-parser@^1.16.0: - version "1.19.0" - resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.19.0.tgz#96b2709e57c9c4e09a6fd66a8fd979844f69f08a" - integrity sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw== - dependencies: - bytes "3.1.0" - content-type "~1.0.4" - debug "2.6.9" - depd "~1.1.2" - http-errors "1.7.2" - iconv-lite "0.4.24" - on-finished "~2.3.0" - qs "6.7.0" - raw-body "2.4.0" - type-is "~1.6.17" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== - dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -braces@^2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" - integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== - dependencies: - arr-flatten "^1.1.0" - array-unique "^0.3.2" - extend-shallow "^2.0.1" - fill-range "^4.0.0" - isobject "^3.0.1" - repeat-element "^1.1.2" - snapdragon "^0.8.1" - snapdragon-node "^2.0.1" - split-string "^3.0.2" - to-regex "^3.0.1" - -braces@^3.0.1, braces@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107" - integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A== - dependencies: - fill-range "^7.0.1" - -brorand@^1.0.1, brorand@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" - integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= - -browser-stdout@1.3.1: - version "1.3.1" - resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" - integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== - -browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" - integrity sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA== - dependencies: - buffer-xor "^1.0.3" - cipher-base "^1.0.0" - create-hash "^1.1.0" - evp_bytestokey "^1.0.3" - inherits "^2.0.1" - safe-buffer "^5.0.1" - -browserify-cipher@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/browserify-cipher/-/browserify-cipher-1.0.1.tgz#8d6474c1b870bfdabcd3bcfcc1934a10e94f15f0" - integrity sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w== - dependencies: - browserify-aes "^1.0.4" - browserify-des "^1.0.0" - evp_bytestokey "^1.0.0" - -browserify-des@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/browserify-des/-/browserify-des-1.0.2.tgz#3af4f1f59839403572f1c66204375f7a7f703e9c" - integrity sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A== - dependencies: - cipher-base "^1.0.1" - des.js "^1.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -browserify-rsa@^4.0.0, browserify-rsa@^4.0.1: - version "4.1.0" - resolved "https://registry.yarnpkg.com/browserify-rsa/-/browserify-rsa-4.1.0.tgz#b2fd06b5b75ae297f7ce2dc651f918f5be158c8d" - integrity sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog== - dependencies: - bn.js "^5.0.0" - randombytes "^2.0.1" - -browserify-sign@^4.0.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/browserify-sign/-/browserify-sign-4.2.1.tgz#eaf4add46dd54be3bb3b36c0cf15abbeba7956c3" - integrity sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg== - dependencies: - bn.js "^5.1.1" - browserify-rsa "^4.0.1" - create-hash "^1.2.0" - create-hmac "^1.1.7" - elliptic "^6.5.3" - inherits "^2.0.4" - parse-asn1 "^5.1.5" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -browserslist@^3.2.6: - version "3.2.8" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6" - integrity sha512-WHVocJYavUwVgVViC0ORikPHQquXwVh939TaelZ4WDqpWgTX/FsGhl/+P4qBUAGcRvtOgDgC+xftNWWp2RUTAQ== - dependencies: - caniuse-lite "^1.0.30000844" - electron-to-chromium "^1.3.47" - -bs58@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/bs58/-/bs58-4.0.1.tgz#be161e76c354f6f788ae4071f63f34e8c4f0a42a" - integrity sha1-vhYedsNU9veIrkBx9j806MTwpCo= - dependencies: - base-x "^3.0.2" - -bs58check@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/bs58check/-/bs58check-2.1.2.tgz#53b018291228d82a5aa08e7d796fdafda54aebfc" - integrity sha512-0TS1jicxdU09dwJMNZtVAfzPi6Q6QeN0pM1Fkzrjn+XYHvzMKPU3pHVpva+769iNVSfIYWf7LJ6WR+BuuMf8cA== - dependencies: - bs58 "^4.0.0" - create-hash "^1.1.0" - safe-buffer "^5.1.2" - -buffer-from@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" - integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A== - -buffer-to-arraybuffer@^0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a" - integrity sha1-YGSkD6dutDxyOrqe+PbhIW0QURo= - -buffer-xor@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9" - integrity sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk= - -buffer-xor@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-2.0.2.tgz#34f7c64f04c777a1f8aac5e661273bb9dd320289" - integrity sha512-eHslX0bin3GB+Lx2p7lEYRShRewuNZL3fUl4qlVJGGiwoPGftmt8JQgk2Y9Ji5/01TnVDo33E5b5O3vUB1HdqQ== - dependencies: - safe-buffer "^5.1.1" - -buffer@^5.0.5, buffer@^5.2.1, buffer@^5.5.0, buffer@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.7.1.tgz#ba62e7c13133053582197160851a8f648e99eed0" - integrity sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ== - dependencies: - base64-js "^1.3.1" - ieee754 "^1.1.13" - -bufferutil@^4.0.1: - version "4.0.3" - resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.3.tgz#66724b756bed23cd7c28c4d306d7994f9943cc6b" - integrity sha512-yEYTwGndELGvfXsImMBLop58eaGW+YdONi1fNjTINSY98tmMmFijBG6WXgdkfuLNt4imzQNtIE+eBp1PVpMCSw== - dependencies: - node-gyp-build "^4.2.0" - -bytes@3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/bytes/-/bytes-3.1.0.tgz#f6cf7933a360e0588fa9fde85651cdc7f805d1f6" - integrity sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg== - -bytewise-core@^1.2.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/bytewise-core/-/bytewise-core-1.2.3.tgz#3fb410c7e91558eb1ab22a82834577aa6bd61d42" - integrity sha1-P7QQx+kVWOsasiqCg0V3qmvWHUI= - dependencies: - typewise-core "^1.2" - -bytewise@~1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/bytewise/-/bytewise-1.1.0.tgz#1d13cbff717ae7158094aa881b35d081b387253e" - integrity sha1-HRPL/3F65xWAlKqIGzXQgbOHJT4= - dependencies: - bytewise-core "^1.2.2" - typewise "^1.0.3" - -cache-base@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2" - integrity sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ== - dependencies: - collection-visit "^1.0.0" - component-emitter "^1.2.1" - get-value "^2.0.6" - has-value "^1.0.0" - isobject "^3.0.1" - set-value "^2.0.0" - to-object-path "^0.3.0" - union-value "^1.0.0" - unset-value "^1.0.0" - -cacheable-request@^6.0.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912" - integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg== - dependencies: - clone-response "^1.0.2" - get-stream "^5.1.0" - http-cache-semantics "^4.0.0" - keyv "^3.0.0" - lowercase-keys "^2.0.0" - normalize-url "^4.1.0" - responselike "^1.0.2" - -cachedown@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/cachedown/-/cachedown-1.0.0.tgz#d43f036e4510696b31246d7db31ebf0f7ac32d15" - integrity sha1-1D8DbkUQaWsxJG19sx6/D3rDLRU= - dependencies: - abstract-leveldown "^2.4.1" - lru-cache "^3.2.0" - -call-bind@^1.0.0, call-bind@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" - integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== - dependencies: - function-bind "^1.1.1" - get-intrinsic "^1.0.2" - -camelcase@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" - integrity sha1-MvxLn82vhF/N9+c7uXysImHwqwo= - -camelcase@^6.0.0: - version "6.2.0" - resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" - integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== - -caniuse-lite@^1.0.30000844: - version "1.0.30001228" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001228.tgz#bfdc5942cd3326fa51ee0b42fbef4da9d492a7fa" - integrity sha512-QQmLOGJ3DEgokHbMSA8cj2a+geXqmnpyOFT0lhQV6P3/YOJvGDEwoedcwxEQ30gJIwIIunHIicunJ2rzK5gB2A== - -caseless@~0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" - integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= - -chai@^4.2.0: - version "4.3.4" - resolved "https://registry.yarnpkg.com/chai/-/chai-4.3.4.tgz#b55e655b31e1eac7099be4c08c21964fce2e6c49" - integrity sha512-yS5H68VYOCtN1cjfwumDSuzn/9c+yza4f3reKXlE5rUg7SFcCEy90gJvydNgOYtblyf4Zi6jIWRnXOgErta0KA== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.2" - deep-eql "^3.0.1" - get-func-name "^2.0.0" - pathval "^1.1.1" - type-detect "^4.0.5" - -chalk@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98" - integrity sha1-qBFcVeSnAv5NFQq9OHKCKn4J/Jg= - dependencies: - ansi-styles "^2.2.1" - escape-string-regexp "^1.0.2" - has-ansi "^2.0.0" - strip-ansi "^3.0.0" - supports-color "^2.0.0" - -chalk@^2.4.1, chalk@^2.4.2: - version "2.4.2" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" - integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== - dependencies: - ansi-styles "^3.2.1" - escape-string-regexp "^1.0.5" - supports-color "^5.3.0" - -chalk@^4.0.0: - version "4.1.1" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.1.tgz#c80b3fab28bf6371e6863325eee67e618b77e6ad" - integrity sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - -check-error@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82" - integrity sha1-V00xLt2Iu13YkS6Sht1sCu1KrII= - -checkpoint-store@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06" - integrity sha1-BOTLUWuRQziTWB5tRgGnjpVS6gY= - dependencies: - functional-red-black-tree "^1.0.1" - -chokidar@3.5.1: - version "3.5.1" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.1.tgz#ee9ce7bbebd2b79f49f304799d5468e31e14e68a" - integrity sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw== - dependencies: - anymatch "~3.1.1" - braces "~3.0.2" - glob-parent "~5.1.0" - is-binary-path "~2.1.0" - is-glob "~4.0.1" - normalize-path "~3.0.0" - readdirp "~3.5.0" - optionalDependencies: - fsevents "~2.3.1" - -chownr@^1.1.1: - version "1.1.4" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.4.tgz#6fc9d7b42d32a583596337666e7d08084da2cc6b" - integrity sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg== - -ci-info@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-2.0.0.tgz#67a9e964be31a51e15e5010d58e6f12834002f46" - integrity sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ== - -cids@^0.7.1: - version "0.7.5" - resolved "https://registry.yarnpkg.com/cids/-/cids-0.7.5.tgz#60a08138a99bfb69b6be4ceb63bfef7a396b28b2" - integrity sha512-zT7mPeghoWAu+ppn8+BS1tQ5qGmbMfB4AregnQjA/qHY3GC1m1ptI9GkWNlgeu38r7CuRdXB47uY2XgAYt6QVA== - dependencies: - buffer "^5.5.0" - class-is "^1.1.0" - multibase "~0.6.0" - multicodec "^1.0.0" - multihashes "~0.4.15" - -cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/cipher-base/-/cipher-base-1.0.4.tgz#8760e4ecc272f4c363532f926d874aae2c1397de" - integrity sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -class-is@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/class-is/-/class-is-1.1.0.tgz#9d3c0fba0440d211d843cec3dedfa48055005825" - integrity sha512-rhjH9AG1fvabIDoGRVH587413LPjTZgmDF9fOFCbFJQV4yuocX1mHxxvXI4g3cGwbVY9wAYIoKlg1N79frJKQw== - -class-utils@^0.3.5: - version "0.3.6" - resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463" - integrity sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg== - dependencies: - arr-union "^3.1.0" - define-property "^0.2.5" - isobject "^3.0.0" - static-extend "^0.1.1" - -cliui@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" - integrity sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - wrap-ansi "^2.0.0" - -cliui@^7.0.2: - version "7.0.4" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f" - integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ== - dependencies: - string-width "^4.2.0" - strip-ansi "^6.0.0" - wrap-ansi "^7.0.0" - -clone-response@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b" - integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws= - dependencies: - mimic-response "^1.0.0" - -clone@2.1.2, clone@^2.0.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - -code-point-at@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" - integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= - -collection-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0" - integrity sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA= - dependencies: - map-visit "^1.0.0" - object-visit "^1.0.0" - -color-convert@^1.9.0: - version "1.9.3" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" - integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== - dependencies: - color-name "1.1.3" - -color-convert@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3" - integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ== - dependencies: - color-name "~1.1.4" - -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" - integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= - -color-name@~1.1.4: - version "1.1.4" - resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2" - integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== - -combined-stream@^1.0.6, combined-stream@^1.0.8, combined-stream@~1.0.6: - version "1.0.8" - resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f" - integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg== - dependencies: - delayed-stream "~1.0.0" - -command-exists@^1.2.8: - version "1.2.9" - resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.9.tgz#c50725af3808c8ab0260fd60b01fbfa25b954f69" - integrity sha512-LTQ/SGc+s0Xc0Fu5WaKnR0YiygZkm9eKFvyS+fRsU7/ZWFF8ykFM6Pc9aCVf1+xasOOZpO3BAVgVrKvsqKHV7w== - -command-line-args@^4.0.7: - version "4.0.7" - resolved "https://registry.yarnpkg.com/command-line-args/-/command-line-args-4.0.7.tgz#f8d1916ecb90e9e121eda6428e41300bfb64cc46" - integrity sha512-aUdPvQRAyBvQd2n7jXcsMDz68ckBJELXNzBybCHOibUWEg0mWTnaYCSRU8h9R+aNRSvDihJtssSRCiDRpLaezA== - dependencies: - array-back "^2.0.0" - find-replace "^1.0.3" - typical "^2.6.1" - -commander@3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" - integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== - -component-emitter@^1.2.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0" - integrity sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -concat-stream@^1.5.1: - version "1.6.2" - resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" - integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw== - dependencies: - buffer-from "^1.0.0" - inherits "^2.0.3" - readable-stream "^2.2.2" - typedarray "^0.0.6" - -content-disposition@0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/content-disposition/-/content-disposition-0.5.3.tgz#e130caf7e7279087c5616c2007d0485698984fbd" - integrity sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g== - dependencies: - safe-buffer "5.1.2" - -content-hash@^2.5.2: - version "2.5.2" - resolved "https://registry.yarnpkg.com/content-hash/-/content-hash-2.5.2.tgz#bbc2655e7c21f14fd3bfc7b7d4bfe6e454c9e211" - integrity sha512-FvIQKy0S1JaWV10sMsA7TRx8bpU+pqPkhbsfvOJAdjRXvYxEckAwQWGwtRjiaJfh+E0DvcWUGqcdjwMGFjsSdw== - dependencies: - cids "^0.7.1" - multicodec "^0.5.5" - multihashes "^0.4.15" - -content-type@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/content-type/-/content-type-1.0.4.tgz#e138cc75e040c727b1966fe5e5f8c9aee256fe3b" - integrity sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA== - -convert-source-map@^1.5.1: - version "1.7.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a2cb882d7f77d3490585e2ce6c524424a3a442" - integrity sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA== - dependencies: - safe-buffer "~5.1.1" - -cookie-signature@1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/cookie-signature/-/cookie-signature-1.0.6.tgz#e303a882b342cc3ee8ca513a79999734dab3ae2c" - integrity sha1-4wOogrNCzD7oylE6eZmXNNqzriw= - -cookie@0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/cookie/-/cookie-0.4.0.tgz#beb437e7022b3b6d49019d088665303ebe9c14ba" - integrity sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg== - -cookiejar@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/cookiejar/-/cookiejar-2.1.2.tgz#dd8a235530752f988f9a0844f3fc589e3111125c" - integrity sha512-Mw+adcfzPxcPeI+0WlvRrr/3lGVO0bD75SxX6811cxSh1Wbxx7xZBGK1eVtDf6si8rg2lhnUjsVLMFMfbRIuwA== - -copy-descriptor@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d" - integrity sha1-Z29us8OZl8LuGsOpJP1hJHSPV40= - -core-js-pure@^3.0.1: - version "3.12.1" - resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.12.1.tgz#934da8b9b7221e2a2443dc71dfa5bd77a7ea00b8" - integrity sha512-1cch+qads4JnDSWsvc7d6nzlKAippwjUlf6vykkTLW53VSV+NkE6muGBToAjEA8pG90cSfcud3JgVmW2ds5TaQ== - -core-js@^2.4.0, core-js@^2.5.0: - version "2.6.12" - resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.6.12.tgz#d9333dfa7b065e347cc5682219d6f690859cc2ec" - integrity sha512-Kb2wC0fvsWfQrgk8HU5lW6U/Lcs8+9aaYcy4ZFc6DDlo4nZ7n70dEgE5rtR0oG6ufKDUnrwfWL1mXR5ljDatrQ== - -core-util-is@1.0.2, core-util-is@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" - integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac= - -cors@^2.8.1: - version "2.8.5" - resolved "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29" - integrity sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g== - dependencies: - object-assign "^4" - vary "^1" - -create-ecdh@^4.0.0: - version "4.0.4" - resolved "https://registry.yarnpkg.com/create-ecdh/-/create-ecdh-4.0.4.tgz#d6e7f4bffa66736085a0762fd3a632684dabcc4e" - integrity sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A== - dependencies: - bn.js "^4.1.0" - elliptic "^6.5.3" - -create-hash@^1.1.0, create-hash@^1.1.2, create-hash@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/create-hash/-/create-hash-1.2.0.tgz#889078af11a63756bcfb59bd221996be3a9ef196" - integrity sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg== - dependencies: - cipher-base "^1.0.1" - inherits "^2.0.1" - md5.js "^1.3.4" - ripemd160 "^2.0.1" - sha.js "^2.4.0" - -create-hmac@^1.1.0, create-hmac@^1.1.4, create-hmac@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/create-hmac/-/create-hmac-1.1.7.tgz#69170c78b3ab957147b2b8b04572e47ead2243ff" - integrity sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg== - dependencies: - cipher-base "^1.0.3" - create-hash "^1.1.0" - inherits "^2.0.1" - ripemd160 "^2.0.0" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -cross-fetch@^2.1.0, cross-fetch@^2.1.1: - version "2.2.3" - resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e" - integrity sha512-PrWWNH3yL2NYIb/7WF/5vFG3DCQiXDOVf8k3ijatbrtnwNuhMWLC7YF7uqf53tbTFDzHIUD8oITw4Bxt8ST3Nw== - dependencies: - node-fetch "2.1.2" - whatwg-fetch "2.0.4" - -cross-spawn@^6.0.5: - version "6.0.5" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4" - integrity sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ== - dependencies: - nice-try "^1.0.4" - path-key "^2.0.1" - semver "^5.5.0" - shebang-command "^1.2.0" - which "^1.2.9" - -crypto-browserify@3.12.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" - integrity sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg== - dependencies: - browserify-cipher "^1.0.0" - browserify-sign "^4.0.0" - create-ecdh "^4.0.0" - create-hash "^1.1.0" - create-hmac "^1.1.0" - diffie-hellman "^5.0.0" - inherits "^2.0.1" - pbkdf2 "^3.0.3" - public-encrypt "^4.0.0" - randombytes "^2.0.0" - randomfill "^1.0.3" - -d@1, d@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.1.tgz#8698095372d58dbee346ffd0c7093f99f8f9eb5a" - integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== - dependencies: - es5-ext "^0.10.50" - type "^1.0.1" - -dashdash@^1.12.0: - version "1.14.1" - resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" - integrity sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA= - dependencies: - assert-plus "^1.0.0" - -debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8, debug@^2.6.9: - version "2.6.9" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" - integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== - dependencies: - ms "2.0.0" - -debug@3.2.6: - version "3.2.6" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" - integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== - dependencies: - ms "^2.1.1" - -debug@4.3.1, debug@^4.1.1: - version "4.3.1" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee" - integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ== - dependencies: - ms "2.1.2" - -debug@^3.1.0: - version "3.2.7" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" - integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== - dependencies: - ms "^2.1.1" - -decamelize@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" - integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= - -decamelize@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-4.0.0.tgz#aa472d7bf660eb15f3494efd531cab7f2a709837" - integrity sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ== - -decode-uri-component@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" - integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= - -decompress-response@^3.2.0, decompress-response@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3" - integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M= - dependencies: - mimic-response "^1.0.0" - -deep-eql@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/deep-eql/-/deep-eql-3.0.1.tgz#dfc9404400ad1c8fe023e7da1df1c147c4b444df" - integrity sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw== - dependencies: - type-detect "^4.0.0" - -deep-equal@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" - integrity sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g== - dependencies: - is-arguments "^1.0.4" - is-date-object "^1.0.1" - is-regex "^1.0.4" - object-is "^1.0.1" - object-keys "^1.1.1" - regexp.prototype.flags "^1.2.0" - -defer-to-connect@^1.0.1: - version "1.1.3" - resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591" - integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ== - -deferred-leveldown@~1.2.1: - version "1.2.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-1.2.2.tgz#3acd2e0b75d1669924bc0a4b642851131173e1eb" - integrity sha512-uukrWD2bguRtXilKt6cAWKyoXrTSMo5m7crUdLfWQmu8kIm88w3QZoUL+6nhpfKVmhHANER6Re3sKoNoZ3IKMA== - dependencies: - abstract-leveldown "~2.6.0" - -deferred-leveldown@~4.0.0: - version "4.0.2" - resolved "https://registry.yarnpkg.com/deferred-leveldown/-/deferred-leveldown-4.0.2.tgz#0b0570087827bf480a23494b398f04c128c19a20" - integrity sha512-5fMC8ek8alH16QiV0lTCis610D1Zt1+LA4MS4d63JgS32lrCjTFDUFz2ao09/j2I4Bqb5jL4FZYwu7Jz0XO1ww== - dependencies: - abstract-leveldown "~5.0.0" - inherits "^2.0.3" - -define-properties@^1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" - integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== - dependencies: - object-keys "^1.0.12" - -define-property@^0.2.5: - version "0.2.5" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116" - integrity sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY= - dependencies: - is-descriptor "^0.1.0" - -define-property@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6" - integrity sha1-dp66rz9KY6rTr56NMEybvnm/sOY= - dependencies: - is-descriptor "^1.0.0" - -define-property@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d" - integrity sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ== - dependencies: - is-descriptor "^1.0.2" - isobject "^3.0.1" - -defined@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" - integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= - -delayed-stream@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" - integrity sha1-3zrhmayt+31ECqrgsp4icrJOxhk= - -depd@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9" - integrity sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak= - -des.js@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/des.js/-/des.js-1.0.1.tgz#5382142e1bdc53f85d86d53e5f4aa7deb91e0843" - integrity sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA== - dependencies: - inherits "^2.0.1" - minimalistic-assert "^1.0.0" - -destroy@~1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80" - integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA= - -detect-indent@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208" - integrity sha1-920GQ1LN9Docts5hnE7jqUdd4gg= - dependencies: - repeating "^2.0.0" - -diff@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/diff/-/diff-5.0.0.tgz#7ed6ad76d859d030787ec35855f5b1daf31d852b" - integrity sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w== - -diffie-hellman@^5.0.0: - version "5.0.3" - resolved "https://registry.yarnpkg.com/diffie-hellman/-/diffie-hellman-5.0.3.tgz#40e8ee98f55a2149607146921c63e1ae5f3d2875" - integrity sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg== - dependencies: - bn.js "^4.1.0" - miller-rabin "^4.0.0" - randombytes "^2.0.0" - -dom-walk@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.2.tgz#0c548bef048f4d1f2a97249002236060daa3fd84" - integrity sha512-6QvTW9mrGeIegrFXdtQi9pk7O/nSK6lSdXW2eqUspN5LWD7UTji2Fqw5V2YLjBpHEoU9Xl/eUWNpDeZvoyOv2w== - -dotignore@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/dotignore/-/dotignore-0.1.2.tgz#f942f2200d28c3a76fbdd6f0ee9f3257c8a2e905" - integrity sha512-UGGGWfSauusaVJC+8fgV+NVvBXkCTmVv7sk6nojDZZvuOUNGUy0Zk4UpHQD6EDjS0jpBwcACvH4eofvyzBcRDw== - dependencies: - minimatch "^3.0.4" - -duplexer3@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2" - integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI= - -ecc-jsbn@~0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" - integrity sha1-OoOpBOVDUyh4dMVkt1SThoSamMk= - dependencies: - jsbn "~0.1.0" - safer-buffer "^2.1.0" - -ee-first@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d" - integrity sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0= - -electron-to-chromium@^1.3.47: - version "1.3.728" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.728.tgz#dbedd6373f595ae10a13d146b66bece4c1afa5bd" - integrity sha512-SHv4ziXruBpb1Nz4aTuqEHBYi/9GNCJMYIJgDEXrp/2V01nFXMNFUTli5Z85f5ivSkioLilQatqBYFB44wNJrA== - -elliptic@6.5.4, elliptic@^6.4.0, elliptic@^6.5.2, elliptic@^6.5.3: - version "6.5.4" - resolved "https://registry.yarnpkg.com/elliptic/-/elliptic-6.5.4.tgz#da37cebd31e79a1367e941b592ed1fbebd58abbb" - integrity sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ== - dependencies: - bn.js "^4.11.9" - brorand "^1.1.0" - hash.js "^1.0.0" - hmac-drbg "^1.0.1" - inherits "^2.0.4" - minimalistic-assert "^1.0.1" - minimalistic-crypto-utils "^1.0.1" - -emoji-regex@^8.0.0: - version "8.0.0" - resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" - integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== - -encodeurl@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59" - integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k= - -encoding-down@5.0.4, encoding-down@~5.0.0: - version "5.0.4" - resolved "https://registry.yarnpkg.com/encoding-down/-/encoding-down-5.0.4.tgz#1e477da8e9e9d0f7c8293d320044f8b2cd8e9614" - integrity sha512-8CIZLDcSKxgzT+zX8ZVfgNbu8Md2wq/iqa1Y7zyVR18QBEAc0Nmzuvj/N5ykSKpfGzjM8qxbaFntLPwnVoUhZw== - dependencies: - abstract-leveldown "^5.0.0" - inherits "^2.0.3" - level-codec "^9.0.0" - level-errors "^2.0.0" - xtend "^4.0.1" - -encoding@^0.1.11: - version "0.1.13" - resolved "https://registry.yarnpkg.com/encoding/-/encoding-0.1.13.tgz#56574afdd791f54a8e9b2785c0582a2d26210fa9" - integrity sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A== - dependencies: - iconv-lite "^0.6.2" - -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - -errno@~0.1.1: - version "0.1.8" - resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.8.tgz#8bb3e9c7d463be4976ff888f76b4809ebc2e811f" - integrity sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A== - dependencies: - prr "~1.0.1" - -error-ex@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.2.tgz#b4ac40648107fdcdcfae242f428bea8a14d4f1bf" - integrity sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g== - dependencies: - is-arrayish "^0.2.1" - -es-abstract@^1.18.0-next.1, es-abstract@^1.18.0-next.2: - version "1.18.0" - resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.18.0.tgz#ab80b359eecb7ede4c298000390bc5ac3ec7b5a4" - integrity sha512-LJzK7MrQa8TS0ja2w3YNLzUgJCGPdPOV1yVvezjNnS89D+VR08+Szt2mz3YB2Dck/+w5tfIq/RoUAFqJJGM2yw== - dependencies: - call-bind "^1.0.2" - es-to-primitive "^1.2.1" - function-bind "^1.1.1" - get-intrinsic "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.2" - is-callable "^1.2.3" - is-negative-zero "^2.0.1" - is-regex "^1.1.2" - is-string "^1.0.5" - object-inspect "^1.9.0" - object-keys "^1.1.1" - object.assign "^4.1.2" - string.prototype.trimend "^1.0.4" - string.prototype.trimstart "^1.0.4" - unbox-primitive "^1.0.0" - -es-to-primitive@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" - integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== - dependencies: - is-callable "^1.1.4" - is-date-object "^1.0.1" - is-symbol "^1.0.2" - -es5-ext@^0.10.35, es5-ext@^0.10.50: - version "0.10.53" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.53.tgz#93c5a3acfdbef275220ad72644ad02ee18368de1" - integrity sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q== - dependencies: - es6-iterator "~2.0.3" - es6-symbol "~3.1.3" - next-tick "~1.0.0" - -es6-iterator@~2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7" - integrity sha1-p96IkUGgWpSwhUQDstCg+/qY87c= - dependencies: - d "1" - es5-ext "^0.10.35" - es6-symbol "^3.1.1" - -es6-symbol@^3.1.1, es6-symbol@~3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.3.tgz#bad5d3c1bcdac28269f4cb331e431c78ac705d18" - integrity sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA== - dependencies: - d "^1.0.1" - ext "^1.1.2" - -escalade@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" - integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw== - -escape-html@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" - integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= - -escape-string-regexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34" - integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA== - -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" - integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= - -esutils@^2.0.2: - version "2.0.3" - resolved "https://registry.yarnpkg.com/esutils/-/esutils-2.0.3.tgz#74d2eb4de0b8da1293711910d50775b9b710ef64" - integrity sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g== - -etag@~1.8.1: - version "1.8.1" - resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887" - integrity sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc= - -eth-block-tracker@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/eth-block-tracker/-/eth-block-tracker-3.0.1.tgz#95cd5e763c7293e0b1b2790a2a39ac2ac188a5e1" - integrity sha512-WUVxWLuhMmsfenfZvFO5sbl1qFY2IqUlw/FPVmjjdElpqLsZtSG+wPe9Dz7W/sB6e80HgFKknOmKk2eNlznHug== - dependencies: - eth-query "^2.1.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.3" - ethjs-util "^0.1.3" - json-rpc-engine "^3.6.0" - pify "^2.3.0" - tape "^4.6.3" - -eth-ens-namehash@2.0.8, eth-ens-namehash@^2.0.8: - version "2.0.8" - resolved "https://registry.yarnpkg.com/eth-ens-namehash/-/eth-ens-namehash-2.0.8.tgz#229ac46eca86d52e0c991e7cb2aef83ff0f68bcf" - integrity sha1-IprEbsqG1S4MmR58sq74P/D2i88= - dependencies: - idna-uts46-hx "^2.3.1" - js-sha3 "^0.5.7" - -eth-json-rpc-infura@^3.1.0: - version "3.2.1" - resolved "https://registry.yarnpkg.com/eth-json-rpc-infura/-/eth-json-rpc-infura-3.2.1.tgz#26702a821067862b72d979c016fd611502c6057f" - integrity sha512-W7zR4DZvyTn23Bxc0EWsq4XGDdD63+XPUCEhV2zQvQGavDVC4ZpFDK4k99qN7bd7/fjj37+rxmuBOBeIqCA5Mw== - dependencies: - cross-fetch "^2.1.1" - eth-json-rpc-middleware "^1.5.0" - json-rpc-engine "^3.4.0" - json-rpc-error "^2.0.0" - -eth-json-rpc-middleware@^1.5.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/eth-json-rpc-middleware/-/eth-json-rpc-middleware-1.6.0.tgz#5c9d4c28f745ccb01630f0300ba945f4bef9593f" - integrity sha512-tDVCTlrUvdqHKqivYMjtFZsdD7TtpNLBCfKAcOpaVs7orBMS/A8HWro6dIzNtTZIR05FAbJ3bioFOnZpuCew9Q== - dependencies: - async "^2.5.0" - eth-query "^2.1.2" - eth-tx-summary "^3.1.2" - ethereumjs-block "^1.6.0" - ethereumjs-tx "^1.3.3" - ethereumjs-util "^5.1.2" - ethereumjs-vm "^2.1.0" - fetch-ponyfill "^4.0.0" - json-rpc-engine "^3.6.0" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - tape "^4.6.3" - -eth-lib@0.2.8: - version "0.2.8" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.2.8.tgz#b194058bef4b220ad12ea497431d6cb6aa0623c8" - integrity sha512-ArJ7x1WcWOlSpzdoTBX8vkwlkSQ85CjjifSZtV4co64vWxSV8geWfPI9x4SVYu3DSxnX4yWFVTtGL+j9DUFLNw== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - xhr-request-promise "^0.1.2" - -eth-lib@^0.1.26: - version "0.1.29" - resolved "https://registry.yarnpkg.com/eth-lib/-/eth-lib-0.1.29.tgz#0c11f5060d42da9f931eab6199084734f4dbd1d9" - integrity sha512-bfttrr3/7gG4E02HoWTDUcDDslN003OlOoBxk9virpAZQ1ja/jDgwkWB8QfJF7ojuEowrqy+lzp9VcJG7/k5bQ== - dependencies: - bn.js "^4.11.6" - elliptic "^6.4.0" - nano-json-stream-parser "^0.1.2" - servify "^0.1.12" - ws "^3.0.0" - xhr-request-promise "^0.1.2" - -eth-query@^2.0.2, eth-query@^2.1.0, eth-query@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/eth-query/-/eth-query-2.1.2.tgz#d6741d9000106b51510c72db92d6365456a6da5e" - integrity sha1-1nQdkAAQa1FRDHLbktY2VFam2l4= - dependencies: - json-rpc-random-id "^1.0.0" - xtend "^4.0.1" - -eth-sig-util@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-3.0.0.tgz#75133b3d7c20a5731af0690c385e184ab942b97e" - integrity sha512-4eFkMOhpGbTxBQ3AMzVf0haUX2uTur7DpWiHzWyTURa28BVJJtOkcb9Ok5TV0YvEPG61DODPW7ZUATbJTslioQ== - dependencies: - buffer "^5.2.1" - elliptic "^6.4.0" - ethereumjs-abi "0.6.5" - ethereumjs-util "^5.1.1" - tweetnacl "^1.0.0" - tweetnacl-util "^0.15.0" - -eth-sig-util@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/eth-sig-util/-/eth-sig-util-1.4.2.tgz#8d958202c7edbaae839707fba6f09ff327606210" - integrity sha1-jZWCAsftuq6Dlwf7pvCf8ydgYhA= - dependencies: - ethereumjs-abi "git+https://github.com/ethereumjs/ethereumjs-abi.git" - ethereumjs-util "^5.1.1" - -eth-tx-summary@^3.1.2: - version "3.2.4" - resolved "https://registry.yarnpkg.com/eth-tx-summary/-/eth-tx-summary-3.2.4.tgz#e10eb95eb57cdfe549bf29f97f1e4f1db679035c" - integrity sha512-NtlDnaVZah146Rm8HMRUNMgIwG/ED4jiqk0TME9zFheMl1jOp6jL1m0NKGjJwehXQ6ZKCPr16MTr+qspKpEXNg== - dependencies: - async "^2.1.2" - clone "^2.0.0" - concat-stream "^1.5.1" - end-of-stream "^1.1.0" - eth-query "^2.0.2" - ethereumjs-block "^1.4.1" - ethereumjs-tx "^1.1.1" - ethereumjs-util "^5.0.1" - ethereumjs-vm "^2.6.0" - through2 "^2.0.3" - -ethashjs@~0.0.7: - version "0.0.8" - resolved "https://registry.yarnpkg.com/ethashjs/-/ethashjs-0.0.8.tgz#227442f1bdee409a548fb04136e24c874f3aa6f9" - integrity sha512-/MSbf/r2/Ld8o0l15AymjOTlPqpN8Cr4ByUEA9GtR4x0yAh3TdtDzEg29zMjXCNPI7u6E5fOQdj/Cf9Tc7oVNw== - dependencies: - async "^2.1.2" - buffer-xor "^2.0.1" - ethereumjs-util "^7.0.2" - miller-rabin "^4.0.0" - -ethereum-bloom-filters@^1.0.6: - version "1.0.9" - resolved "https://registry.yarnpkg.com/ethereum-bloom-filters/-/ethereum-bloom-filters-1.0.9.tgz#4a59dead803af0c9e33834170bd7695df67061ec" - integrity sha512-GiK/RQkAkcVaEdxKVkPcG07PQ5vD7v2MFSHgZmBJSfMzNRHimntdBithsHAT89tAXnIpzVDWt8iaCD1DvkaxGg== - dependencies: - js-sha3 "^0.8.0" - -ethereum-common@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.2.0.tgz#13bf966131cce1eeade62a1b434249bb4cb120ca" - integrity sha512-XOnAR/3rntJgbCdGhqdaLIxDLWKLmsZOGhHdBKadEr6gEnJLH52k93Ou+TUdFaPN3hJc3isBZBal3U/XZ15abA== - -ethereum-common@^0.0.18: - version "0.0.18" - resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f" - integrity sha1-L9w1dvIykDNYl26znaeDIT/5Uj8= - -ethereum-cryptography@^0.1.3: - version "0.1.3" - resolved "https://registry.yarnpkg.com/ethereum-cryptography/-/ethereum-cryptography-0.1.3.tgz#8d6143cfc3d74bf79bbd8edecdf29e4ae20dd191" - integrity sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ== - dependencies: - "@types/pbkdf2" "^3.0.0" - "@types/secp256k1" "^4.0.1" - blakejs "^1.1.0" - browserify-aes "^1.2.0" - bs58check "^2.1.2" - create-hash "^1.2.0" - create-hmac "^1.1.7" - hash.js "^1.1.7" - keccak "^3.0.0" - pbkdf2 "^3.0.17" - randombytes "^2.1.0" - safe-buffer "^5.1.2" - scrypt-js "^3.0.0" - secp256k1 "^4.0.1" - setimmediate "^1.0.5" - -ethereum-waffle@^3.3.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/ethereum-waffle/-/ethereum-waffle-3.3.0.tgz#166a0cc1d3b2925f117b20ef0951b3fe72e38e79" - integrity sha512-4xm3RWAPCu5LlaVxYEg0tG3L7g5ovBw1GY/UebrzZ+OTx22vcPjI+bvelFlGBpkdnO5yOIFXjH2eK59tNAe9IA== - dependencies: - "@ethereum-waffle/chai" "^3.3.0" - "@ethereum-waffle/compiler" "^3.3.0" - "@ethereum-waffle/mock-contract" "^3.2.2" - "@ethereum-waffle/provider" "^3.3.0" - ethers "^5.0.1" - -ethereumjs-abi@0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241" - integrity sha1-WmN+8Wq0NHP6cqKa2QhxQFs/UkE= - dependencies: - bn.js "^4.10.0" - ethereumjs-util "^4.3.0" - -ethereumjs-abi@0.6.8: - version "0.6.8" - resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.8.tgz#71bc152db099f70e62f108b7cdfca1b362c6fcae" - integrity sha512-Tx0r/iXI6r+lRsdvkFDlut0N08jWMnKRZ6Gkq+Nmw75lZe4e6o3EkSnkaBP5NF6+m5PTGAr9JP43N3LyeoglsA== - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -"ethereumjs-abi@git+https://github.com/ethereumjs/ethereumjs-abi.git": - version "0.6.8" - resolved "git+https://github.com/ethereumjs/ethereumjs-abi.git#1a27c59c15ab1e95ee8e5c4ed6ad814c49cc439e" - dependencies: - bn.js "^4.11.8" - ethereumjs-util "^6.0.0" - -ethereumjs-account@3.0.0, ethereumjs-account@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-3.0.0.tgz#728f060c8e0c6e87f1e987f751d3da25422570a9" - integrity sha512-WP6BdscjiiPkQfF9PVfMcwx/rDvfZTjFKY0Uwc09zSQr9JfIVH87dYIJu0gNhBhpmovV4yq295fdllS925fnBA== - dependencies: - ethereumjs-util "^6.0.0" - rlp "^2.2.1" - safe-buffer "^5.1.1" - -ethereumjs-account@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/ethereumjs-account/-/ethereumjs-account-2.0.5.tgz#eeafc62de544cb07b0ee44b10f572c9c49e00a84" - integrity sha512-bgDojnXGjhMwo6eXQC0bY6UK2liSFUSMwwylOmQvZbSl/D7NXQ3+vrGO46ZeOgjGfxXmgIeVNDIiHw7fNZM4VA== - dependencies: - ethereumjs-util "^5.0.0" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-block@2.2.2, ethereumjs-block@^2.2.2, ethereumjs-block@~2.2.0, ethereumjs-block@~2.2.2: - version "2.2.2" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-2.2.2.tgz#c7654be7e22df489fda206139ecd63e2e9c04965" - integrity sha512-2p49ifhek3h2zeg/+da6XpdFR3GlqY3BIEiqxGF8j9aSRIgkb7M1Ky+yULBKJOu8PAZxfhsYA+HxUk2aCQp3vg== - dependencies: - async "^2.0.1" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.1" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0: - version "1.7.1" - resolved "https://registry.yarnpkg.com/ethereumjs-block/-/ethereumjs-block-1.7.1.tgz#78b88e6cc56de29a6b4884ee75379b6860333c3f" - integrity sha512-B+sSdtqm78fmKkBq78/QLKJbu/4Ts4P2KFISdgcuZUPDm9x+N7qgBPIIFUGbaakQh8bzuquiRVbdmvPKqbILRg== - dependencies: - async "^2.0.1" - ethereum-common "0.2.0" - ethereumjs-tx "^1.2.2" - ethereumjs-util "^5.0.0" - merkle-patricia-tree "^2.1.2" - -ethereumjs-blockchain@^4.0.3: - version "4.0.4" - resolved "https://registry.yarnpkg.com/ethereumjs-blockchain/-/ethereumjs-blockchain-4.0.4.tgz#30f2228dc35f6dcf94423692a6902604ae34960f" - integrity sha512-zCxaRMUOzzjvX78DTGiKjA+4h2/sF0OYL1QuPux0DHpyq8XiNoF5GYHtb++GUxVlMsMfZV7AVyzbtgcRdIcEPQ== - dependencies: - async "^2.6.1" - ethashjs "~0.0.7" - ethereumjs-block "~2.2.2" - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.1.0" - flow-stoplight "^1.0.0" - level-mem "^3.0.1" - lru-cache "^5.1.1" - rlp "^2.2.2" - semaphore "^1.1.0" - -ethereumjs-common@1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.0.tgz#d3e82fc7c47c0cef95047f431a99485abc9bb1cd" - integrity sha512-SZOjgK1356hIY7MRj3/ma5qtfr/4B5BL+G4rP/XSMYr2z1H5el4RX5GReYCKmQmYI/nSBmRnwrZ17IfHuG0viQ== - -ethereumjs-common@^1.1.0, ethereumjs-common@^1.3.2, ethereumjs-common@^1.5.0: - version "1.5.2" - resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-1.5.2.tgz#2065dbe9214e850f2e955a80e650cb6999066979" - integrity sha512-hTfZjwGX52GS2jcVO6E2sx4YuFnf0Fhp5ylo4pEPhEffNln7vS59Hr5sLnp3/QCazFLluuBZ+FZ6J5HTp0EqCA== - -ethereumjs-tx@2.1.2, ethereumjs-tx@^2.1.1, ethereumjs-tx@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-2.1.2.tgz#5dfe7688bf177b45c9a23f86cf9104d47ea35fed" - integrity sha512-zZEK1onCeiORb0wyCXUvg94Ve5It/K6GD1K+26KfFKodiBiS6d9lfCXlUKGBBdQ+bv7Day+JK0tj1K+BeNFRAw== - dependencies: - ethereumjs-common "^1.5.0" - ethereumjs-util "^6.0.0" - -ethereumjs-tx@^1.1.1, ethereumjs-tx@^1.2.0, ethereumjs-tx@^1.2.2, ethereumjs-tx@^1.3.3: - version "1.3.7" - resolved "https://registry.yarnpkg.com/ethereumjs-tx/-/ethereumjs-tx-1.3.7.tgz#88323a2d875b10549b8347e09f4862b546f3d89a" - integrity sha512-wvLMxzt1RPhAQ9Yi3/HKZTn0FZYpnsmQdbKYfUUpi4j1SEIcbkd9tndVjcPrufY3V7j2IebOpC00Zp2P/Ay2kA== - dependencies: - ethereum-common "^0.0.18" - ethereumjs-util "^5.0.0" - -ethereumjs-util@6.2.1, ethereumjs-util@^6.0.0, ethereumjs-util@^6.1.0, ethereumjs-util@^6.2.0: - version "6.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-6.2.1.tgz#fcb4e4dd5ceacb9d2305426ab1a5cd93e3163b69" - integrity sha512-W2Ktez4L01Vexijrm5EB6w7dg4n/TgpoYU4avuT5T3Vmnw/eCRtiBrJfQYS/DCSvDIOLn2k57GcHdeBcgVxAqw== - dependencies: - "@types/bn.js" "^4.11.3" - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.3" - -ethereumjs-util@^4.3.0: - version "4.5.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-4.5.1.tgz#f4bf9b3b515a484e3cc8781d61d9d980f7c83bd0" - integrity sha512-WrckOZ7uBnei4+AKimpuF1B3Fv25OmoRgmYCpGsP7u8PFxXAmAgiJSYT2kRWnt6fVIlKaQlZvuwXp7PIrmn3/w== - dependencies: - bn.js "^4.8.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - rlp "^2.0.0" - -ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2, ethereumjs-util@^5.1.3, ethereumjs-util@^5.1.5, ethereumjs-util@^5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.2.1.tgz#a833f0e5fca7e5b361384dc76301a721f537bf65" - integrity sha512-v3kT+7zdyCm1HIqWlLNrHGqHGLpGYIhjeHxQjnDXjLT2FyGJDsd3LWMYUo7pAFRrk86CR3nUJfhC81CCoJNNGQ== - dependencies: - bn.js "^4.11.0" - create-hash "^1.1.2" - elliptic "^6.5.2" - ethereum-cryptography "^0.1.3" - ethjs-util "^0.1.3" - rlp "^2.0.0" - safe-buffer "^5.1.1" - -ethereumjs-util@^7.0.2: - version "7.0.10" - resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-7.0.10.tgz#5fb7b69fa1fda0acc59634cf39d6b0291180fc1f" - integrity sha512-c/xThw6A+EAnej5Xk5kOzFzyoSnw0WX0tSlZ6pAsfGVvQj3TItaDg9b1+Fz1RJXA+y2YksKwQnuzgt1eY6LKzw== - dependencies: - "@types/bn.js" "^5.1.0" - bn.js "^5.1.2" - create-hash "^1.1.2" - ethereum-cryptography "^0.1.3" - ethjs-util "0.1.6" - rlp "^2.2.4" - -ethereumjs-vm@4.2.0: - version "4.2.0" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-4.2.0.tgz#e885e861424e373dbc556278f7259ff3fca5edab" - integrity sha512-X6qqZbsY33p5FTuZqCnQ4+lo957iUJMM6Mpa6bL4UW0dxM6WmDSHuI4j/zOp1E2TDKImBGCJA9QPfc08PaNubA== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - core-js-pure "^3.0.1" - ethereumjs-account "^3.0.0" - ethereumjs-block "^2.2.2" - ethereumjs-blockchain "^4.0.3" - ethereumjs-common "^1.5.0" - ethereumjs-tx "^2.1.2" - ethereumjs-util "^6.2.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.3.2" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - util.promisify "^1.0.0" - -ethereumjs-vm@^2.1.0, ethereumjs-vm@^2.3.4, ethereumjs-vm@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/ethereumjs-vm/-/ethereumjs-vm-2.6.0.tgz#76243ed8de031b408793ac33907fb3407fe400c6" - integrity sha512-r/XIUik/ynGbxS3y+mvGnbOKnuLo40V5Mj1J25+HEO63aWYREIqvWeRO/hnROlMBE5WoniQmPmhiaN0ctiHaXw== - dependencies: - async "^2.1.2" - async-eventemitter "^0.2.2" - ethereumjs-account "^2.0.3" - ethereumjs-block "~2.2.0" - ethereumjs-common "^1.1.0" - ethereumjs-util "^6.0.0" - fake-merkle-patricia-tree "^1.0.1" - functional-red-black-tree "^1.0.1" - merkle-patricia-tree "^2.3.2" - rustbn.js "~0.2.0" - safe-buffer "^5.1.1" - -ethereumjs-wallet@0.6.5: - version "0.6.5" - resolved "https://registry.yarnpkg.com/ethereumjs-wallet/-/ethereumjs-wallet-0.6.5.tgz#685e9091645cee230ad125c007658833991ed474" - integrity sha512-MDwjwB9VQVnpp/Dc1XzA6J1a3wgHQ4hSvA1uWNatdpOrtCbPVuQSKSyRnjLvS0a+KKMw2pvQ9Ybqpb3+eW8oNA== - dependencies: - aes-js "^3.1.1" - bs58check "^2.1.2" - ethereum-cryptography "^0.1.3" - ethereumjs-util "^6.0.0" - randombytes "^2.0.6" - safe-buffer "^5.1.2" - scryptsy "^1.2.1" - utf8 "^3.0.0" - uuid "^3.3.2" - -ethers@^5.0.0, ethers@^5.0.1, ethers@^5.0.2, ethers@^5.1.4: - version "5.1.4" - resolved "https://registry.yarnpkg.com/ethers/-/ethers-5.1.4.tgz#8ae973705ed962f8f41dc59693704002a38dd18b" - integrity sha512-EAPQ/fgGRu0PoR/VNFnHTMOtG/IZ0AItdW55C9T8ffmVu0rnyllZL404eBF66elJehOLz2kxnUrhXpE7TCpW7g== - dependencies: - "@ethersproject/abi" "5.1.2" - "@ethersproject/abstract-provider" "5.1.0" - "@ethersproject/abstract-signer" "5.1.0" - "@ethersproject/address" "5.1.0" - "@ethersproject/base64" "5.1.0" - "@ethersproject/basex" "5.1.0" - "@ethersproject/bignumber" "5.1.1" - "@ethersproject/bytes" "5.1.0" - "@ethersproject/constants" "5.1.0" - "@ethersproject/contracts" "5.1.1" - "@ethersproject/hash" "5.1.0" - "@ethersproject/hdnode" "5.1.0" - "@ethersproject/json-wallets" "5.1.0" - "@ethersproject/keccak256" "5.1.0" - "@ethersproject/logger" "5.1.0" - "@ethersproject/networks" "5.1.0" - "@ethersproject/pbkdf2" "5.1.0" - "@ethersproject/properties" "5.1.0" - "@ethersproject/providers" "5.1.2" - "@ethersproject/random" "5.1.0" - "@ethersproject/rlp" "5.1.0" - "@ethersproject/sha2" "5.1.0" - "@ethersproject/signing-key" "5.1.0" - "@ethersproject/solidity" "5.1.0" - "@ethersproject/strings" "5.1.0" - "@ethersproject/transactions" "5.1.1" - "@ethersproject/units" "5.1.0" - "@ethersproject/wallet" "5.1.0" - "@ethersproject/web" "5.1.0" - "@ethersproject/wordlists" "5.1.0" - -ethjs-unit@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-unit/-/ethjs-unit-0.1.6.tgz#c665921e476e87bce2a9d588a6fe0405b2c41699" - integrity sha1-xmWSHkduh7ziqdWIpv4EBbLEFpk= - dependencies: - bn.js "4.11.6" - number-to-bn "1.7.0" - -ethjs-util@0.1.6, ethjs-util@^0.1.3: - version "0.1.6" - resolved "https://registry.yarnpkg.com/ethjs-util/-/ethjs-util-0.1.6.tgz#f308b62f185f9fe6237132fb2a9818866a5cd536" - integrity sha512-CUnVOQq7gSpDHZVVrQW8ExxUETWrnrvXYvYz55wOU8Uj4VCgw56XC2B/fVqQN+f7gmrnRHSLVnFAwsCuNwji8w== - dependencies: - is-hex-prefixed "1.0.0" - strip-hex-prefix "1.0.0" - -eventemitter3@4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.4.tgz#b5463ace635a083d018bdc7c917b4c5f10a85384" - integrity sha512-rlaVLnVxtxvoyLsQQFBx53YmXHDxRIzzTLbdfxqi4yocpSjAxXwkU0cScM5JgSKMqEhrZpnvQ2D9gjylR0AimQ== - -events@^3.0.0: - version "3.3.0" - resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" - integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== - -evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02" - integrity sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA== - dependencies: - md5.js "^1.3.4" - safe-buffer "^5.1.1" - -expand-brackets@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622" - integrity sha1-t3c14xXOMPa27/D4OwQVGiJEliI= - dependencies: - debug "^2.3.3" - define-property "^0.2.5" - extend-shallow "^2.0.1" - posix-character-classes "^0.1.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -express@^4.14.0: - version "4.17.1" - resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" - integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== - dependencies: - accepts "~1.3.7" - array-flatten "1.1.1" - body-parser "1.19.0" - content-disposition "0.5.3" - content-type "~1.0.4" - cookie "0.4.0" - cookie-signature "1.0.6" - debug "2.6.9" - depd "~1.1.2" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - finalhandler "~1.1.2" - fresh "0.5.2" - merge-descriptors "1.0.1" - methods "~1.1.2" - on-finished "~2.3.0" - parseurl "~1.3.3" - path-to-regexp "0.1.7" - proxy-addr "~2.0.5" - qs "6.7.0" - range-parser "~1.2.1" - safe-buffer "5.1.2" - send "0.17.1" - serve-static "1.14.1" - setprototypeof "1.1.1" - statuses "~1.5.0" - type-is "~1.6.18" - utils-merge "1.0.1" - vary "~1.1.2" - -ext@^1.1.2: - version "1.4.0" - resolved "https://registry.yarnpkg.com/ext/-/ext-1.4.0.tgz#89ae7a07158f79d35517882904324077e4379244" - integrity sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A== - dependencies: - type "^2.0.0" - -extend-shallow@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f" - integrity sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8= - dependencies: - is-extendable "^0.1.0" - -extend-shallow@^3.0.0, extend-shallow@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8" - integrity sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg= - dependencies: - assign-symbols "^1.0.0" - is-extendable "^1.0.1" - -extend@~3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" - integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== - -extglob@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543" - integrity sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw== - dependencies: - array-unique "^0.3.2" - define-property "^1.0.0" - expand-brackets "^2.1.4" - extend-shallow "^2.0.1" - fragment-cache "^0.2.1" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -extsprintf@1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" - integrity sha1-lpGEQOMEGnpBT4xS48V06zw+HgU= - -extsprintf@^1.2.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" - integrity sha1-4mifjzVvrWLMplo6kcXfX5VRaS8= - -fake-merkle-patricia-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/fake-merkle-patricia-tree/-/fake-merkle-patricia-tree-1.0.1.tgz#4b8c3acfb520afadf9860b1f14cd8ce3402cddd3" - integrity sha1-S4w6z7Ugr635hgsfFM2M40As3dM= - dependencies: - checkpoint-store "^1.1.0" - -fast-deep-equal@^3.1.1: - version "3.1.3" - resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" - integrity sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q== - -fast-json-stable-stringify@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" - integrity sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw== - -fetch-ponyfill@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893" - integrity sha1-rjzl9zLGReq4fkroeTQUcJsjmJM= - dependencies: - node-fetch "~1.7.1" - -fill-range@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7" - integrity sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc= - dependencies: - extend-shallow "^2.0.1" - is-number "^3.0.0" - repeat-string "^1.6.1" - to-regex-range "^2.1.0" - -fill-range@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40" - integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ== - dependencies: - to-regex-range "^5.0.1" - -finalhandler@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d" - integrity sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA== - dependencies: - debug "2.6.9" - encodeurl "~1.0.2" - escape-html "~1.0.3" - on-finished "~2.3.0" - parseurl "~1.3.3" - statuses "~1.5.0" - unpipe "~1.0.0" - -find-replace@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/find-replace/-/find-replace-1.0.3.tgz#b88e7364d2d9c959559f388c66670d6130441fa0" - integrity sha1-uI5zZNLZyVlVnziMZmcNYTBEH6A= - dependencies: - array-back "^1.0.4" - test-value "^2.1.0" - -find-up@5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-5.0.0.tgz#4c92819ecb7083561e4f4a240a86be5198f536fc" - integrity sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng== - dependencies: - locate-path "^6.0.0" - path-exists "^4.0.0" - -find-up@^1.0.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" - integrity sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8= - dependencies: - path-exists "^2.0.0" - pinkie-promise "^2.0.0" - -find-yarn-workspace-root@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-1.2.1.tgz#40eb8e6e7c2502ddfaa2577c176f221422f860db" - integrity sha512-dVtfb0WuQG+8Ag2uWkbG79hOUzEsRrhBzgfn86g2sJPkzmcpGdghbNTfUKGTxymFrY/tLIodDzLoW9nOJ4FY8Q== - dependencies: - fs-extra "^4.0.3" - micromatch "^3.1.4" - -find-yarn-workspace-root@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/find-yarn-workspace-root/-/find-yarn-workspace-root-2.0.0.tgz#f47fb8d239c900eb78179aa81b66673eac88f7bd" - integrity sha512-1IMnbjt4KzsQfnhnzNd8wUEgXZ44IzZaZmnLYx7D5FZlaHt2gW20Cri8Q+E/t5tIj4+epTBub+2Zxu/vNILzqQ== - dependencies: - micromatch "^4.0.2" - -flat@^5.0.2: - version "5.0.2" - resolved "https://registry.yarnpkg.com/flat/-/flat-5.0.2.tgz#8ca6fe332069ffa9d324c327198c598259ceb241" - integrity sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ== - -flow-stoplight@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/flow-stoplight/-/flow-stoplight-1.0.0.tgz#4a292c5bcff8b39fa6cc0cb1a853d86f27eeff7b" - integrity sha1-SiksW8/4s5+mzAyxqFPYbyfu/3s= - -follow-redirects@^1.12.1: - version "1.14.1" - resolved "https://registry.nlark.com/follow-redirects/download/follow-redirects-1.14.1.tgz?cache=0&sync_timestamp=1620555300559&other_urls=https%3A%2F%2Fregistry.nlark.com%2Ffollow-redirects%2Fdownload%2Ffollow-redirects-1.14.1.tgz#d9114ded0a1cfdd334e164e6662ad02bfd91ff43" - integrity sha1-2RFN7Qoc/dM04WTmZirQK/2R/0M= - -for-each@^0.3.3, for-each@~0.3.3: - version "0.3.3" - resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" - integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== - dependencies: - is-callable "^1.1.3" - -for-in@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80" - integrity sha1-gQaNKVqBQuwKxybG4iAMMPttXoA= - -foreach@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99" - integrity sha1-C+4AUBiusmDQo6865ljdATbsG5k= - -forever-agent@~0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" - integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= - -form-data@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-3.0.1.tgz#ebd53791b78356a99af9a300d4282c4d5eb9755f" - integrity sha512-RHkBKtLWUVwd7SqRIvCZMEvAMoGUp0XU+seQiZejj0COz3RI3hWP4sCv3gZWWLjJTd7rGwcsF5eKZGii0r/hbg== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.8" - mime-types "^2.1.12" - -form-data@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.3.tgz#dcce52c05f644f298c6a7ab936bd724ceffbf3a6" - integrity sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ== - dependencies: - asynckit "^0.4.0" - combined-stream "^1.0.6" - mime-types "^2.1.12" - -forwarded@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84" - integrity sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ= - -fragment-cache@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19" - integrity sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk= - dependencies: - map-cache "^0.2.2" - -fresh@0.5.2: - version "0.5.2" - resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" - integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac= - -fs-extra@^0.30.0: - version "0.30.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-0.30.0.tgz#f233ffcc08d4da7d432daa449776989db1df93f0" - integrity sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A= - dependencies: - graceful-fs "^4.1.2" - jsonfile "^2.1.0" - klaw "^1.0.0" - path-is-absolute "^1.0.0" - rimraf "^2.2.8" - -fs-extra@^4.0.2, fs-extra@^4.0.3: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" - integrity sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-extra@^7.0.0, fs-extra@^7.0.1: - version "7.0.1" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9" - integrity sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw== - dependencies: - graceful-fs "^4.1.2" - jsonfile "^4.0.0" - universalify "^0.1.0" - -fs-minipass@^1.2.5: - version "1.2.7" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-1.2.7.tgz#ccff8570841e7fe4265693da88936c55aed7f7c7" - integrity sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA== - dependencies: - minipass "^2.6.0" - -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= - -fsevents@~2.3.1: - version "2.3.2" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a" - integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA== - -function-bind@^1.1.1, function-bind@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" - integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== - -functional-red-black-tree@^1.0.1, functional-red-black-tree@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc= - -ganache-core@^2.13.2: - version "2.13.2" - resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.13.2.tgz#27e6fc5417c10e6e76e2e646671869d7665814a3" - integrity sha512-tIF5cR+ANQz0+3pHWxHjIwHqFXcVo0Mb+kcsNhglNFALcYo49aQpnS9dqHartqPfMFjiHh/qFoD3mYK0d/qGgw== - dependencies: - abstract-leveldown "3.0.0" - async "2.6.2" - bip39 "2.5.0" - cachedown "1.0.0" - clone "2.1.2" - debug "3.2.6" - encoding-down "5.0.4" - eth-sig-util "3.0.0" - ethereumjs-abi "0.6.8" - ethereumjs-account "3.0.0" - ethereumjs-block "2.2.2" - ethereumjs-common "1.5.0" - ethereumjs-tx "2.1.2" - ethereumjs-util "6.2.1" - ethereumjs-vm "4.2.0" - heap "0.2.6" - keccak "3.0.1" - level-sublevel "6.6.4" - levelup "3.1.1" - lodash "4.17.20" - lru-cache "5.1.1" - merkle-patricia-tree "3.0.0" - patch-package "6.2.2" - seedrandom "3.0.1" - source-map-support "0.5.12" - tmp "0.1.0" - web3-provider-engine "14.2.1" - websocket "1.0.32" - optionalDependencies: - ethereumjs-wallet "0.6.5" - web3 "1.2.11" - -get-caller-file@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" - integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== - -get-caller-file@^2.0.5: - version "2.0.5" - resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" - integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== - -get-func-name@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" - integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= - -get-intrinsic@^1.0.2, get-intrinsic@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6" - integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q== - dependencies: - function-bind "^1.1.1" - has "^1.0.3" - has-symbols "^1.0.1" - -get-stream@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" - integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= - -get-stream@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" - integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== - dependencies: - pump "^3.0.0" - -get-stream@^5.1.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - -get-value@^2.0.3, get-value@^2.0.6: - version "2.0.6" - resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" - integrity sha1-3BXKHGcjh8p2vTesCjlbogQqLCg= - -getpass@^0.1.1: - version "0.1.7" - resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.7.tgz#5eff8e3e684d569ae4cb2b1282604e8ba62149fa" - integrity sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo= - dependencies: - assert-plus "^1.0.0" - -glob-parent@~5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" - integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow== - dependencies: - is-glob "^4.0.1" - -glob@7.1.6: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -glob@^7.1.2, glob@^7.1.3, glob@~7.1.6: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -global@~4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/global/-/global-4.4.0.tgz#3e7b105179006a323ed71aafca3e9c57a5cc6406" - integrity sha512-wv/LAoHdRE3BeTGz53FAamhGlPLhlssK45usmGFThIi4XqnBmjKQ16u+RNbP7WvigRZDxUsM0J3gcQ5yicaL0w== - dependencies: - min-document "^2.19.0" - process "^0.11.10" - -globals@^9.18.0: - version "9.18.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" - integrity sha512-S0nG3CLEQiY/ILxqtztTWH/3iRRdyBLw6KMDxnKMchrtbj2OFmehVh0WUCfW3DUrIgx/qFrJPICrq4Z4sTR9UQ== - -got@9.6.0: - version "9.6.0" - resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85" - integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q== - dependencies: - "@sindresorhus/is" "^0.14.0" - "@szmarczak/http-timer" "^1.1.2" - cacheable-request "^6.0.0" - decompress-response "^3.3.0" - duplexer3 "^0.1.4" - get-stream "^4.1.0" - lowercase-keys "^1.0.1" - mimic-response "^1.0.1" - p-cancelable "^1.0.0" - to-readable-stream "^1.0.0" - url-parse-lax "^3.0.0" - -got@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a" - integrity sha512-Y5WMo7xKKq1muPsxD+KmrR8DH5auG7fBdDVueZwETwV6VytKyU9OX/ddpq2/1hp1vIPvVb4T81dKQz3BivkNLw== - dependencies: - decompress-response "^3.2.0" - duplexer3 "^0.1.4" - get-stream "^3.0.0" - is-plain-obj "^1.1.0" - is-retry-allowed "^1.0.0" - is-stream "^1.0.0" - isurl "^1.0.0-alpha5" - lowercase-keys "^1.0.0" - p-cancelable "^0.3.0" - p-timeout "^1.1.1" - safe-buffer "^5.0.1" - timed-out "^4.0.0" - url-parse-lax "^1.0.0" - url-to-options "^1.0.1" - -graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - -growl@1.10.5: - version "1.10.5" - resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" - integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== - -har-schema@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" - integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= - -har-validator@~5.1.3: - version "5.1.5" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.5.tgz#1f0803b9f8cb20c0fa13822df1ecddb36bde1efd" - integrity sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w== - dependencies: - ajv "^6.12.3" - har-schema "^2.0.0" - -has-ansi@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/has-ansi/-/has-ansi-2.0.0.tgz#34f5049ce1ecdf2b0649af3ef24e45ed35416d91" - integrity sha1-NPUEnOHs3ysGSa8+8k5F7TVBbZE= - dependencies: - ansi-regex "^2.0.0" - -has-bigints@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.1.tgz#64fe6acb020673e3b78db035a5af69aa9d07b113" - integrity sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA== - -has-flag@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" - integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= - -has-flag@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" - integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== - -has-symbol-support-x@^1.4.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455" - integrity sha512-3ToOva++HaW+eCpgqZrCfN51IPB+7bJNVT6CUATzueB5Heb8o6Nam0V3HG5dlDvZU1Gn5QLcbahiKw/XVk5JJw== - -has-symbols@^1.0.1, has-symbols@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.2.tgz#165d3070c00309752a1236a479331e3ac56f1423" - integrity sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw== - -has-to-string-tag-x@^1.2.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/has-to-string-tag-x/-/has-to-string-tag-x-1.4.1.tgz#a045ab383d7b4b2012a00148ab0aa5f290044d4d" - integrity sha512-vdbKfmw+3LoOYVr+mtxHaX5a96+0f3DljYd8JOqvOLsf5mw2Otda2qCDT9qRqLAhrjyQ0h7ual5nOiASpsGNFw== - dependencies: - has-symbol-support-x "^1.4.1" - -has-value@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f" - integrity sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8= - dependencies: - get-value "^2.0.3" - has-values "^0.1.4" - isobject "^2.0.0" - -has-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177" - integrity sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc= - dependencies: - get-value "^2.0.6" - has-values "^1.0.0" - isobject "^3.0.0" - -has-values@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771" - integrity sha1-bWHeldkd/Km5oCCJrThL/49it3E= - -has-values@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f" - integrity sha1-lbC2P+whRmGab+V/51Yo1aOe/k8= - dependencies: - is-number "^3.0.0" - kind-of "^4.0.0" - -has@^1.0.3, has@~1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" - integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== - dependencies: - function-bind "^1.1.1" - -hash-base@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-3.1.0.tgz#55c381d9e06e1d2997a883b4a3fddfe7f0d3af33" - integrity sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA== - dependencies: - inherits "^2.0.4" - readable-stream "^3.6.0" - safe-buffer "^5.2.0" - -hash.js@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846" - integrity sha512-/UETyP0W22QILqS+6HowevwhEFJ3MBJnwTf75Qob9Wz9t0DPuisL8kW8YZMK62dHAKE1c1p+gY1TtOLY+USEHA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.0" - -hash.js@^1.0.0, hash.js@^1.0.3, hash.js@^1.1.7: - version "1.1.7" - resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.7.tgz#0babca538e8d4ee4a0f8988d68866537a003cf42" - integrity sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA== - dependencies: - inherits "^2.0.3" - minimalistic-assert "^1.0.1" - -he@1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" - integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== - -heap@0.2.6: - version "0.2.6" - resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac" - integrity sha1-CH4fELBGky/IWU3Z5tN4r8nR5aw= - -hmac-drbg@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1" - integrity sha1-0nRXAQJabHdabFRXk+1QL8DGSaE= - dependencies: - hash.js "^1.0.3" - minimalistic-assert "^1.0.0" - minimalistic-crypto-utils "^1.0.1" - -home-or-tmp@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8" - integrity sha1-42w/LSyufXRqhX440Y1fMqeILbg= - dependencies: - os-homedir "^1.0.0" - os-tmpdir "^1.0.1" - -hosted-git-info@^2.1.4, hosted-git-info@^2.6.0: - version "2.8.9" - resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.8.9.tgz#dffc0bf9a21c02209090f2aa69429e1414daf3f9" - integrity sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw== - -http-cache-semantics@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390" - integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ== - -http-errors@1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.2.tgz#4f5029cf13239f31036e5b2e55292bcfbcc85c8f" - integrity sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg== - dependencies: - depd "~1.1.2" - inherits "2.0.3" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-errors@~1.7.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.7.3.tgz#6c619e4f9c60308c38519498c14fbb10aacebb06" - integrity sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw== - dependencies: - depd "~1.1.2" - inherits "2.0.4" - setprototypeof "1.1.1" - statuses ">= 1.5.0 < 2" - toidentifier "1.0.0" - -http-https@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b" - integrity sha1-L5CN1fHbQGjAWM1ubUzjkskTOJs= - -http-signature@~1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1" - integrity sha1-muzZJRFHcvPZW2WmCruPfBj7rOE= - dependencies: - assert-plus "^1.0.0" - jsprim "^1.2.2" - sshpk "^1.7.0" - -iconv-lite@0.4.24: - version "0.4.24" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" - integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA== - dependencies: - safer-buffer ">= 2.1.2 < 3" - -iconv-lite@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.6.2.tgz#ce13d1875b0c3a674bd6a04b7f76b01b1b6ded01" - integrity sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ== - dependencies: - safer-buffer ">= 2.1.2 < 3.0.0" - -idna-uts46-hx@^2.3.1: - version "2.3.1" - resolved "https://registry.yarnpkg.com/idna-uts46-hx/-/idna-uts46-hx-2.3.1.tgz#a1dc5c4df37eee522bf66d969cc980e00e8711f9" - integrity sha512-PWoF9Keq6laYdIRwwCdhTPl60xRqAloYNMQLiyUnG42VjT53oW07BXIRM+NK7eQjzXjAk2gUvX9caRxlnF9TAA== - dependencies: - punycode "2.1.0" - -ieee754@^1.1.13: - version "1.2.1" - resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.2.1.tgz#8eb7a10a63fff25d15a57b001586d177d1b0d352" - integrity sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA== - -immediate@^3.2.3: - version "3.3.0" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.3.0.tgz#1aef225517836bcdf7f2a2de2600c79ff0269266" - integrity sha512-HR7EVodfFUdQCTIeySw+WDRFJlPcLOJbXfwwZ7Oom6tjsvZ3bOkCDJHehQC3nxJrv7+f9XecwazynjU8e4Vw3Q== - -immediate@~3.2.3: - version "3.2.3" - resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c" - integrity sha1-0UD6j2FGWb1lQSMwl92qwlzdmRw= - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= - dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2, inherits@2.0.4, inherits@^2.0.1, inherits@^2.0.3, inherits@^2.0.4, inherits@~2.0.1, inherits@~2.0.3, inherits@~2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -inherits@2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" - integrity sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4= - -invariant@^2.2.2: - version "2.2.4" - resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6" - integrity sha512-phJfQVBuaJM5raOpJjSfkiD6BpbCE4Ns//LaXl6wGYtUBY83nWS6Rf9tXm2e8VaK60JEjYldbPif/A2B1C2gNA== - dependencies: - loose-envify "^1.0.0" - -invert-kv@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" - integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= - -ipaddr.js@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" - integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== - -is-accessor-descriptor@^0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz#a9e12cb3ae8d876727eeef3843f8a0897b5c98d6" - integrity sha1-qeEss66Nh2cn7u84Q/igiXtcmNY= - dependencies: - kind-of "^3.0.2" - -is-accessor-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz#169c2f6d3df1f992618072365c9b0ea1f6878656" - integrity sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ== - dependencies: - kind-of "^6.0.0" - -is-arguments@^1.0.4: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-arguments/-/is-arguments-1.1.0.tgz#62353031dfbee07ceb34656a6bde59efecae8dd9" - integrity sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg== - dependencies: - call-bind "^1.0.0" - -is-arrayish@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" - integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= - -is-bigint@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.2.tgz#ffb381442503235ad245ea89e45b3dbff040ee5a" - integrity sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA== - -is-binary-path@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" - integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw== - dependencies: - binary-extensions "^2.0.0" - -is-boolean-object@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.1.tgz#3c0878f035cb821228d350d2e1e36719716a3de8" - integrity sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng== - dependencies: - call-bind "^1.0.2" - -is-buffer@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be" - integrity sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w== - -is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.3: - version "1.2.3" - resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.3.tgz#8b1e0500b73a1d76c70487636f368e519de8db8e" - integrity sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ== - -is-ci@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-2.0.0.tgz#6bc6334181810e04b5c22b3d589fdca55026404c" - integrity sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w== - dependencies: - ci-info "^2.0.0" - -is-core-module@^2.2.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.4.0.tgz#8e9fc8e15027b011418026e98f0e6f4d86305cc1" - integrity sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A== - dependencies: - has "^1.0.3" - -is-data-descriptor@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz#0b5ee648388e2c860282e793f1856fec3f301b56" - integrity sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y= - dependencies: - kind-of "^3.0.2" - -is-data-descriptor@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz#d84876321d0e7add03990406abbbbd36ba9268c7" - integrity sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ== - dependencies: - kind-of "^6.0.0" - -is-date-object@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.4.tgz#550cfcc03afada05eea3dd30981c7b09551f73e5" - integrity sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A== - -is-descriptor@^0.1.0: - version "0.1.6" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca" - integrity sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg== - dependencies: - is-accessor-descriptor "^0.1.6" - is-data-descriptor "^0.1.4" - kind-of "^5.0.0" - -is-descriptor@^1.0.0, is-descriptor@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.2.tgz#3b159746a66604b04f8c81524ba365c5f14d86ec" - integrity sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg== - dependencies: - is-accessor-descriptor "^1.0.0" - is-data-descriptor "^1.0.0" - kind-of "^6.0.2" - -is-docker@^2.0.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - -is-extendable@^0.1.0, is-extendable@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89" - integrity sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik= - -is-extendable@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4" - integrity sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA== - dependencies: - is-plain-object "^2.0.4" - -is-extglob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" - integrity sha1-qIwCU1eR8C7TfHahueqXc8gz+MI= - -is-finite@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.1.0.tgz#904135c77fb42c0641d6aa1bcdbc4daa8da082f3" - integrity sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w== - -is-fn@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fn/-/is-fn-1.0.0.tgz#9543d5de7bcf5b08a22ec8a20bae6e286d510d8c" - integrity sha1-lUPV3nvPWwiiLsiiC65uKG1RDYw= - -is-fullwidth-code-point@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" - integrity sha1-754xOG8DGn8NZDr4L95QxFfvAMs= - dependencies: - number-is-nan "^1.0.0" - -is-fullwidth-code-point@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz#a3b30a5c4f199183167aaab93beefae3ddfb654f" - integrity sha1-o7MKXE8ZkYMWeqq5O+764937ZU8= - -is-fullwidth-code-point@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d" - integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg== - -is-function@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.2.tgz#4f097f30abf6efadac9833b17ca5dc03f8144e08" - integrity sha512-lw7DUp0aWXYg+CBCN+JKkcE0Q2RayZnSvnZBlwgxHBQhqt5pZNVy4Ri7H9GmmXkdu7LUthszM+Tor1u/2iBcpQ== - -is-generator-function@^1.0.7: - version "1.0.9" - resolved "https://registry.yarnpkg.com/is-generator-function/-/is-generator-function-1.0.9.tgz#e5f82c2323673e7fcad3d12858c83c4039f6399c" - integrity sha512-ZJ34p1uvIfptHCN7sFTjGibB9/oBg17sHqzDLfuwhvmN/qLVvIQXRQ8licZQ35WJ8KuEQt/etnnzQFI9C9Ue/A== - -is-glob@^4.0.1, is-glob@~4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.1.tgz#7567dbe9f2f5e2467bc77ab83c4a29482407a5dc" - integrity sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg== - dependencies: - is-extglob "^2.1.1" - -is-hex-prefixed@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554" - integrity sha1-fY035q135dEnFIkTxXPggtd39VQ= - -is-negative-zero@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.1.tgz#3de746c18dda2319241a53675908d8f766f11c24" - integrity sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w== - -is-number-object@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.5.tgz#6edfaeed7950cff19afedce9fbfca9ee6dd289eb" - integrity sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw== - -is-number@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195" - integrity sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU= - dependencies: - kind-of "^3.0.2" - -is-number@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" - integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== - -is-object@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.2.tgz#a56552e1c665c9e950b4a025461da87e72f86fcf" - integrity sha512-2rRIahhZr2UWb45fIOuvZGpFtz0TyOZLf32KxBbSoUCeZR495zCKlWUKKUByk3geS2eAs7ZAABt0Y/Rx0GiQGA== - -is-plain-obj@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" - integrity sha1-caUMhCnfync8kqOQpKA7OfzVHT4= - -is-plain-obj@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" - integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== - -is-plain-object@^2.0.3, is-plain-object@^2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" - integrity sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og== - dependencies: - isobject "^3.0.1" - -is-regex@^1.0.4, is-regex@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.3.tgz#d029f9aff6448b93ebbe3f33dac71511fdcbef9f" - integrity sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ== - dependencies: - call-bind "^1.0.2" - has-symbols "^1.0.2" - -is-regex@~1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.5.tgz#39d589a358bf18967f726967120b8fc1aed74eae" - integrity sha512-vlKW17SNq44owv5AQR3Cq0bQPEb8+kF3UKZ2fiZNOWtztYE5i0CzCZxFDwO58qAOWtxdBRVO/V5Qin1wjCqFYQ== - dependencies: - has "^1.0.3" - -is-retry-allowed@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" - integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== - -is-stream@^1.0.0, is-stream@^1.0.1: - version "1.1.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44" - integrity sha1-EtSj3U5o4Lec6428hBc66A2RykQ= - -is-string@^1.0.5: - version "1.0.6" - resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.6.tgz#3fe5d5992fb0d93404f32584d4b0179a71b54a5f" - integrity sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w== - -is-symbol@^1.0.2, is-symbol@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" - integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== - dependencies: - has-symbols "^1.0.2" - -is-typed-array@^1.1.3: - version "1.1.5" - resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.5.tgz#f32e6e096455e329eb7b423862456aa213f0eb4e" - integrity sha512-S+GRDgJlR3PyEbsX/Fobd9cqpZBuvUS+8asRqYDMLCb2qMzt1oz5m5oxQCxOgUDxiWsOVNi4yaF+/uvdlHlYug== - dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.2" - es-abstract "^1.18.0-next.2" - foreach "^2.0.5" - has-symbols "^1.0.1" - -is-typedarray@^1.0.0, is-typedarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" - integrity sha1-5HnICFjfDBsR3dppQPlgEfzaSpo= - -is-url@^1.2.4: - version "1.2.4" - resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52" - integrity sha512-ITvGim8FhRiYe4IQ5uHSkj7pVaPDrCTkNd3yq3cV7iZAcJdHTUMPMEHcqSOy9xZ9qFenQCvi+2wjH9a1nXqHww== - -is-utf8@^0.2.0: - version "0.2.1" - resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" - integrity sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI= - -is-windows@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d" - integrity sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA== - -is-wsl@^2.1.1: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - -isarray@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" - integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= - -isarray@1.0.0, isarray@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" - integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE= - -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - -isobject@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89" - integrity sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk= - dependencies: - isarray "1.0.0" - -isobject@^3.0.0, isobject@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df" - integrity sha1-TkMekrEalzFjaqH5yNHMvP2reN8= - -isstream@~0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" - integrity sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo= - -isurl@^1.0.0-alpha5: - version "1.0.0" - resolved "https://registry.yarnpkg.com/isurl/-/isurl-1.0.0.tgz#b27f4f49f3cdaa3ea44a0a5b7f3462e6edc39d67" - integrity sha512-1P/yWsxPlDtn7QeRD+ULKQPaIaN6yF368GZ2vDfv0AL0NwpStafjWCDDdn0k8wgFMWpVAqG7oJhxHnlud42i9w== - dependencies: - has-to-string-tag-x "^1.2.0" - is-object "^1.0.1" - -js-sha3@0.5.7, js-sha3@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.7.tgz#0d4ffd8002d5333aabaf4a23eed2f6374c9f28e7" - integrity sha1-DU/9gALVMzqrr0oj7tL2N0yfKOc= - -js-sha3@0.8.0, js-sha3@^0.8.0: - version "0.8.0" - resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.8.0.tgz#b9b7a5da73afad7dedd0f8c463954cbde6818840" - integrity sha512-gF1cRrHhIzNfToc802P800N8PpXS+evLLXfsVpowqmAFR9uwbi89WvXg2QspOmXL8QL86J4T1EpFu+yUkwJY3Q== - -"js-tokens@^3.0.0 || ^4.0.0": - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" - integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== - -js-tokens@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" - integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= - -js-yaml@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.0.0.tgz#f426bc0ff4b4051926cd588c71113183409a121f" - integrity sha512-pqon0s+4ScYUvX30wxQi3PogGFAlUyH0awepWvwkj4jD4v+ova3RiYw8bmA6x2rDrEaj8i/oWKoRxpVNW+Re8Q== - dependencies: - argparse "^2.0.1" - -jsbn@~0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" - integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= - -jsesc@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b" - integrity sha1-RsP+yMGJKxKwgz25vHYiF226s0s= - -jsesc@~0.5.0: - version "0.5.0" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" - integrity sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0= - -json-buffer@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898" - integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg= - -json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0: - version "3.8.0" - resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9" - integrity sha512-6QNcvm2gFuuK4TKU1uwfH0Qd/cOSb9c1lls0gbnIhciktIUQJwz6NQNAW4B1KiGPenv7IKu97V222Yo1bNhGuA== - dependencies: - async "^2.0.1" - babel-preset-env "^1.7.0" - babelify "^7.3.0" - json-rpc-error "^2.0.0" - promise-to-callback "^1.0.0" - safe-event-emitter "^1.0.1" - -json-rpc-error@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02" - integrity sha1-p6+cICg4tekFxyUOVH8a/3cligI= - dependencies: - inherits "^2.0.1" - -json-rpc-random-id@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8" - integrity sha1-uknZat7RRE27jaPSA3SKy7zeyMg= - -json-schema-traverse@^0.4.1: - version "0.4.1" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" - integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== - -json-schema@0.2.3: - version "0.2.3" - resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" - integrity sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM= - -json-stable-stringify@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" - integrity sha1-mnWdOcXy/1A/1TAGRu1EX4jE+a8= - dependencies: - jsonify "~0.0.0" - -json-stringify-safe@~5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" - integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= - -json5@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821" - integrity sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE= - -jsonfile@^2.1.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-2.4.0.tgz#3736a2b428b87bbda0cc83b53fa3d633a35c2ae8" - integrity sha1-NzaitCi4e72gzIO1P6PWM6NcKug= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonfile@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb" - integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss= - optionalDependencies: - graceful-fs "^4.1.6" - -jsonify@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/jsonify/-/jsonify-0.0.0.tgz#2c74b6ee41d93ca51b7b5aaee8f503631d252a73" - integrity sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM= - -jsprim@^1.2.2: - version "1.4.1" - resolved "https://registry.yarnpkg.com/jsprim/-/jsprim-1.4.1.tgz#313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2" - integrity sha1-MT5mvB5cwG5Di8G3SZwuXFastqI= - dependencies: - assert-plus "1.0.0" - extsprintf "1.3.0" - json-schema "0.2.3" - verror "1.10.0" - -keccak@3.0.1, keccak@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/keccak/-/keccak-3.0.1.tgz#ae30a0e94dbe43414f741375cff6d64c8bea0bff" - integrity sha512-epq90L9jlFWCW7+pQa6JOnKn2Xgl2mtI664seYR6MHskvI9agt7AnDqmAlp9TqU4/caMYbA08Hi5DMZAl5zdkA== - dependencies: - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -keyv@^3.0.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9" - integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA== - dependencies: - json-buffer "3.0.0" - -kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64" - integrity sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ= - dependencies: - is-buffer "^1.1.5" - -kind-of@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57" - integrity sha1-IIE989cSkosgc3hpGkUGb65y3Vc= - dependencies: - is-buffer "^1.1.5" - -kind-of@^5.0.0: - version "5.1.0" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-5.1.0.tgz#729c91e2d857b7a419a1f9aa65685c4c33f5845d" - integrity sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw== - -kind-of@^6.0.0, kind-of@^6.0.2: - version "6.0.3" - resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd" - integrity sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw== - -klaw-sync@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/klaw-sync/-/klaw-sync-6.0.0.tgz#1fd2cfd56ebb6250181114f0a581167099c2b28c" - integrity sha512-nIeuVSzdCCs6TDPTqI8w1Yre34sSq7AkZ4B3sfOBbI2CgVSB4Du4aLQijFU2+lhAFCwt9+42Hel6lQNIv6AntQ== - dependencies: - graceful-fs "^4.1.11" - -klaw@^1.0.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/klaw/-/klaw-1.3.1.tgz#4088433b46b3b1ba259d78785d8e96f73ba02439" - integrity sha1-QIhDO0azsbolnXh4XY6W9zugJDk= - optionalDependencies: - graceful-fs "^4.1.9" - -lcid@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" - integrity sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU= - dependencies: - invert-kv "^1.0.0" - -level-codec@^9.0.0: - version "9.0.2" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.2.tgz#fd60df8c64786a80d44e63423096ffead63d8cbc" - integrity sha512-UyIwNb1lJBChJnGfjmO0OR+ezh2iVu1Kas3nvBS/BzGnx79dv6g7unpKIDNPMhfdTEGoc7mC8uAu51XEtX+FHQ== - dependencies: - buffer "^5.6.0" - -level-codec@~7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-7.0.1.tgz#341f22f907ce0f16763f24bddd681e395a0fb8a7" - integrity sha512-Ua/R9B9r3RasXdRmOtd+t9TCOEIIlts+TN/7XTT2unhDaL6sJn83S3rUyljbr6lVtw49N3/yA0HHjpV6Kzb2aQ== - -level-errors@^1.0.3: - version "1.1.2" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.1.2.tgz#4399c2f3d3ab87d0625f7e3676e2d807deff404d" - integrity sha512-Sw/IJwWbPKF5Ai4Wz60B52yj0zYeqzObLh8k1Tk88jVmD51cJSKWSYpRyhVIvFzZdvsPqlH5wfhp/yxdsaQH4w== - dependencies: - errno "~0.1.1" - -level-errors@^2.0.0, level-errors@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-2.0.1.tgz#2132a677bf4e679ce029f517c2f17432800c05c8" - integrity sha512-UVprBJXite4gPS+3VznfgDSU8PTRuVX0NXwoWW50KLxd2yw4Y1t2JUR5In1itQnudZqRMT9DlAM3Q//9NCjCFw== - dependencies: - errno "~0.1.1" - -level-errors@~1.0.3: - version "1.0.5" - resolved "https://registry.yarnpkg.com/level-errors/-/level-errors-1.0.5.tgz#83dbfb12f0b8a2516bdc9a31c4876038e227b859" - integrity sha512-/cLUpQduF6bNrWuAC4pwtUKA5t669pCsCi2XbmojG2tFeOr9j6ShtdDCtFFQO1DRt+EVZhx9gPzP9G2bUaG4ig== - dependencies: - errno "~0.1.1" - -level-iterator-stream@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-2.0.3.tgz#ccfff7c046dcf47955ae9a86f46dfa06a31688b4" - integrity sha512-I6Heg70nfF+e5Y3/qfthJFexhRw/Gi3bIymCoXAlijZdAcLaPuWSJs3KXyTYf23ID6g0o2QF62Yh+grOXY3Rig== - dependencies: - inherits "^2.0.1" - readable-stream "^2.0.5" - xtend "^4.0.0" - -level-iterator-stream@~1.3.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-1.3.1.tgz#e43b78b1a8143e6fa97a4f485eb8ea530352f2ed" - integrity sha1-5Dt4sagUPm+pek9IXrjqUwNS8u0= - dependencies: - inherits "^2.0.1" - level-errors "^1.0.3" - readable-stream "^1.0.33" - xtend "^4.0.0" - -level-iterator-stream@~3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/level-iterator-stream/-/level-iterator-stream-3.0.1.tgz#2c98a4f8820d87cdacab3132506815419077c730" - integrity sha512-nEIQvxEED9yRThxvOrq8Aqziy4EGzrxSZK+QzEFAVuJvQ8glfyZ96GB6BoI4sBbLfjMXm2w4vu3Tkcm9obcY0g== - dependencies: - inherits "^2.0.1" - readable-stream "^2.3.6" - xtend "^4.0.0" - -level-mem@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/level-mem/-/level-mem-3.0.1.tgz#7ce8cf256eac40f716eb6489654726247f5a89e5" - integrity sha512-LbtfK9+3Ug1UmvvhR2DqLqXiPW1OJ5jEh0a3m9ZgAipiwpSxGj/qaVVy54RG5vAQN1nCuXqjvprCuKSCxcJHBg== - dependencies: - level-packager "~4.0.0" - memdown "~3.0.0" - -level-packager@~4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/level-packager/-/level-packager-4.0.1.tgz#7e7d3016af005be0869bc5fa8de93d2a7f56ffe6" - integrity sha512-svCRKfYLn9/4CoFfi+d8krOtrp6RoX8+xm0Na5cgXMqSyRru0AnDYdLl+YI8u1FyS6gGZ94ILLZDE5dh2but3Q== - dependencies: - encoding-down "~5.0.0" - levelup "^3.0.0" - -level-post@^1.0.7: - version "1.0.7" - resolved "https://registry.yarnpkg.com/level-post/-/level-post-1.0.7.tgz#19ccca9441a7cc527879a0635000f06d5e8f27d0" - integrity sha512-PWYqG4Q00asOrLhX7BejSajByB4EmG2GaKHfj3h5UmmZ2duciXLPGYWIjBzLECFWUGOZWlm5B20h/n3Gs3HKew== - dependencies: - ltgt "^2.1.2" - -level-sublevel@6.6.4: - version "6.6.4" - resolved "https://registry.yarnpkg.com/level-sublevel/-/level-sublevel-6.6.4.tgz#f7844ae893919cd9d69ae19d7159499afd5352ba" - integrity sha512-pcCrTUOiO48+Kp6F1+UAzF/OtWqLcQVTVF39HLdZ3RO8XBoXt+XVPKZO1vVr1aUoxHZA9OtD2e1v7G+3S5KFDA== - dependencies: - bytewise "~1.1.0" - level-codec "^9.0.0" - level-errors "^2.0.0" - level-iterator-stream "^2.0.3" - ltgt "~2.1.1" - pull-defer "^0.2.2" - pull-level "^2.0.3" - pull-stream "^3.6.8" - typewiselite "~1.0.0" - xtend "~4.0.0" - -level-ws@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-0.0.0.tgz#372e512177924a00424b0b43aef2bb42496d228b" - integrity sha1-Ny5RIXeSSgBCSwtDrvK7QkltIos= - dependencies: - readable-stream "~1.0.15" - xtend "~2.1.1" - -level-ws@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/level-ws/-/level-ws-1.0.0.tgz#19a22d2d4ac57b18cc7c6ecc4bd23d899d8f603b" - integrity sha512-RXEfCmkd6WWFlArh3X8ONvQPm8jNpfA0s/36M4QzLqrLEIt1iJE9WBHLZ5vZJK6haMjJPJGJCQWfjMNnRcq/9Q== - dependencies: - inherits "^2.0.3" - readable-stream "^2.2.8" - xtend "^4.0.1" - -levelup@3.1.1, levelup@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-3.1.1.tgz#c2c0b3be2b4dc316647c53b42e2f559e232d2189" - integrity sha512-9N10xRkUU4dShSRRFTBdNaBxofz+PGaIZO962ckboJZiNmLuhVT6FZ6ZKAsICKfUBO76ySaYU6fJWX/jnj3Lcg== - dependencies: - deferred-leveldown "~4.0.0" - level-errors "~2.0.0" - level-iterator-stream "~3.0.0" - xtend "~4.0.0" - -levelup@^1.2.1: - version "1.3.9" - resolved "https://registry.yarnpkg.com/levelup/-/levelup-1.3.9.tgz#2dbcae845b2bb2b6bea84df334c475533bbd82ab" - integrity sha512-VVGHfKIlmw8w1XqpGOAGwq6sZm2WwWLmlDcULkKWQXEA5EopA8OBNJ2Ck2v6bdk8HeEZSbCSEgzXadyQFm76sQ== - dependencies: - deferred-leveldown "~1.2.1" - level-codec "~7.0.0" - level-errors "~1.0.3" - level-iterator-stream "~1.3.0" - prr "~1.0.1" - semver "~5.4.1" - xtend "~4.0.0" - -load-json-file@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" - integrity sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA= - dependencies: - graceful-fs "^4.1.2" - parse-json "^2.2.0" - pify "^2.0.0" - pinkie-promise "^2.0.0" - strip-bom "^2.0.0" - -locate-path@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-6.0.0.tgz#55321eb309febbc59c4801d931a72452a681d286" - integrity sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw== - dependencies: - p-locate "^5.0.0" - -lodash.assign@^4.0.3, lodash.assign@^4.0.6: - version "4.2.0" - resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7" - integrity sha1-DZnzzNem0mHRm9rrkkUAXShYCOc= - -lodash@4.17.20: - version "4.17.20" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.20.tgz#b44a9b6297bcb698f1c51a3545a2b3b368d59c52" - integrity sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA== - -lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.4: - version "4.17.21" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" - integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== - -log-symbols@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-4.0.0.tgz#69b3cc46d20f448eccdb75ea1fa733d9e821c920" - integrity sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA== - dependencies: - chalk "^4.0.0" - -looper@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/looper/-/looper-2.0.0.tgz#66cd0c774af3d4fedac53794f742db56da8f09ec" - integrity sha1-Zs0Md0rz1P7axTeU90LbVtqPCew= - -looper@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749" - integrity sha1-LvpUw7HLq6m5Su4uWRSwvlf7t0k= - -loose-envify@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" - integrity sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q== - dependencies: - js-tokens "^3.0.0 || ^4.0.0" - -lowercase-keys@^1.0.0, lowercase-keys@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f" - integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA== - -lowercase-keys@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479" - integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA== - -lru-cache@5.1.1, lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - -lru-cache@^3.2.0: - version "3.2.0" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee" - integrity sha1-cXibO39Tmb7IVl3aOKow0qCX7+4= - dependencies: - pseudomap "^1.0.1" - -ltgt@^2.1.2, ltgt@~2.2.0: - version "2.2.1" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.2.1.tgz#f35ca91c493f7b73da0e07495304f17b31f87ee5" - integrity sha1-81ypHEk/e3PaDgdJUwTxezH4fuU= - -ltgt@~2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34" - integrity sha1-EIUaBtmWS5cReEQcI8nlJpjuzjQ= - -map-cache@^0.2.2: - version "0.2.2" - resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" - integrity sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8= - -map-visit@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f" - integrity sha1-7Nyo8TFE5mDxtb1B8S80edmN+48= - dependencies: - object-visit "^1.0.0" - -md5.js@^1.3.4: - version "1.3.5" - resolved "https://registry.yarnpkg.com/md5.js/-/md5.js-1.3.5.tgz#b5d07b8e3216e3e27cd728d72f70d1e6a342005f" - integrity sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - safe-buffer "^5.1.2" - -media-typer@0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" - integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= - -memdown@^1.0.0: - version "1.4.1" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-1.4.1.tgz#b4e4e192174664ffbae41361aa500f3119efe215" - integrity sha1-tOThkhdGZP+65BNhqlAPMRnv4hU= - dependencies: - abstract-leveldown "~2.7.1" - functional-red-black-tree "^1.0.1" - immediate "^3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" - -memdown@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/memdown/-/memdown-3.0.0.tgz#93aca055d743b20efc37492e9e399784f2958309" - integrity sha512-tbV02LfZMWLcHcq4tw++NuqMO+FZX8tNJEiD2aNRm48ZZusVg5N8NART+dmBkepJVye986oixErf7jfXboMGMA== - dependencies: - abstract-leveldown "~5.0.0" - functional-red-black-tree "~1.0.1" - immediate "~3.2.3" - inherits "~2.0.1" - ltgt "~2.2.0" - safe-buffer "~5.1.1" - -memorystream@^0.3.1: - version "0.3.1" - resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2" - integrity sha1-htcJCzDORV1j+64S3aUaR93K+bI= - -merge-descriptors@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61" - integrity sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E= - -merkle-patricia-tree@3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-3.0.0.tgz#448d85415565df72febc33ca362b8b614f5a58f8" - integrity sha512-soRaMuNf/ILmw3KWbybaCjhx86EYeBbD8ph0edQCTed0JN/rxDt1EBN52Ajre3VyGo+91f8+/rfPIRQnnGMqmQ== - dependencies: - async "^2.6.1" - ethereumjs-util "^5.2.0" - level-mem "^3.0.1" - level-ws "^1.0.0" - readable-stream "^3.0.6" - rlp "^2.0.0" - semaphore ">=1.0.1" - -merkle-patricia-tree@^2.1.2, merkle-patricia-tree@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.2.tgz#982ca1b5a0fde00eed2f6aeed1f9152860b8208a" - integrity sha512-81PW5m8oz/pz3GvsAwbauj7Y00rqm81Tzad77tHBwU7pIAtN+TJnMSOJhxBKflSVYhptMMb9RskhqHqrSm1V+g== - dependencies: - async "^1.4.2" - ethereumjs-util "^5.0.0" - level-ws "0.0.0" - levelup "^1.2.1" - memdown "^1.0.0" - readable-stream "^2.0.0" - rlp "^2.0.0" - semaphore ">=1.0.1" - -methods@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee" - integrity sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4= - -micromatch@^3.1.4: - version "3.1.10" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" - integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - braces "^2.3.1" - define-property "^2.0.2" - extend-shallow "^3.0.2" - extglob "^2.0.4" - fragment-cache "^0.2.1" - kind-of "^6.0.2" - nanomatch "^1.2.9" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.2" - -micromatch@^4.0.2: - version "4.0.4" - resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-4.0.4.tgz#896d519dfe9db25fce94ceb7a500919bf881ebf9" - integrity sha512-pRmzw/XUcwXGpD9aI9q/0XOwLNygjETJ8y0ao0wdqprrzDa4YnxLcz7fQRZr8voh8V10kGhABbNcHVk5wHgWwg== - dependencies: - braces "^3.0.1" - picomatch "^2.2.3" - -miller-rabin@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/miller-rabin/-/miller-rabin-4.0.1.tgz#f080351c865b0dc562a8462966daa53543c78a4d" - integrity sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA== - dependencies: - bn.js "^4.0.0" - brorand "^1.0.1" - -mime-db@1.47.0: - version "1.47.0" - resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.47.0.tgz#8cb313e59965d3c05cfbf898915a267af46a335c" - integrity sha512-QBmA/G2y+IfeS4oktet3qRZ+P5kPhCKRXxXnQEudYqUaEioAU1/Lq2us3D/t1Jfo4hE9REQPrbB7K5sOczJVIw== - -mime-types@^2.1.12, mime-types@^2.1.16, mime-types@~2.1.19, mime-types@~2.1.24: - version "2.1.30" - resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.30.tgz#6e7be8b4c479825f85ed6326695db73f9305d62d" - integrity sha512-crmjA4bLtR8m9qLpHvgxSChT+XoSlZi8J4n/aIdn3z92e/U47Z0V/yl+Wh9W046GgFVAmoNR/fmdbZYcSSIUeg== - dependencies: - mime-db "1.47.0" - -mime@1.6.0: - version "1.6.0" - resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1" - integrity sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg== - -mimic-response@^1.0.0, mimic-response@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b" - integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ== - -min-document@^2.19.0: - version "2.19.0" - resolved "https://registry.yarnpkg.com/min-document/-/min-document-2.19.0.tgz#7bd282e3f5842ed295bb748cdd9f1ffa2c824685" - integrity sha1-e9KC4/WELtKVu3SM3Z8f+iyCRoU= - dependencies: - dom-walk "^0.1.0" - -minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" - integrity sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A== - -minimalistic-crypto-utils@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" - integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= - -minimatch@3.0.4, minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - -minimist@^1.2.0, minimist@^1.2.5, minimist@~1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" - integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== - -minipass@^2.6.0, minipass@^2.8.6, minipass@^2.9.0: - version "2.9.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.9.0.tgz#e713762e7d3e32fed803115cf93e04bca9fcc9a6" - integrity sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg== - dependencies: - safe-buffer "^5.1.2" - yallist "^3.0.0" - -minizlib@^1.2.1: - version "1.3.3" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.3.3.tgz#2290de96818a34c29551c8a8d301216bd65a861d" - integrity sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q== - dependencies: - minipass "^2.9.0" - -mixin-deep@^1.2.0: - version "1.3.2" - resolved "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566" - integrity sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA== - dependencies: - for-in "^1.0.2" - is-extendable "^1.0.1" - -mkdirp-promise@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/mkdirp-promise/-/mkdirp-promise-5.0.1.tgz#e9b8f68e552c68a9c1713b84883f7a1dd039b8a1" - integrity sha1-6bj2jlUsaKnBcTuEiD96HdA5uKE= - dependencies: - mkdirp "*" - -mkdirp@*: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -mkdirp@^0.5.0, mkdirp@^0.5.1: - version "0.5.5" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" - integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ== - dependencies: - minimist "^1.2.5" - -mocha@8.4.0: - version "8.4.0" - resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.4.0.tgz#677be88bf15980a3cae03a73e10a0fc3997f0cff" - integrity sha512-hJaO0mwDXmZS4ghXsvPVriOhsxQ7ofcpQdm8dE+jISUOKopitvnXFQmpRR7jd2K6VBG6E26gU3IAbXXGIbu4sQ== - dependencies: - "@ungap/promise-all-settled" "1.1.2" - ansi-colors "4.1.1" - browser-stdout "1.3.1" - chokidar "3.5.1" - debug "4.3.1" - diff "5.0.0" - escape-string-regexp "4.0.0" - find-up "5.0.0" - glob "7.1.6" - growl "1.10.5" - he "1.2.0" - js-yaml "4.0.0" - log-symbols "4.0.0" - minimatch "3.0.4" - ms "2.1.3" - nanoid "3.1.20" - serialize-javascript "5.0.1" - strip-json-comments "3.1.1" - supports-color "8.1.1" - which "2.0.2" - wide-align "1.1.3" - workerpool "6.1.0" - yargs "16.2.0" - yargs-parser "20.2.4" - yargs-unparser "2.0.0" - -mock-fs@^4.1.0: - version "4.14.0" - resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.14.0.tgz#ce5124d2c601421255985e6e94da80a7357b1b18" - integrity sha512-qYvlv/exQ4+svI3UOvPUpLDF0OMX5euvUH0Ny4N5QyRyhNdgAgUrVH3iUINSzEPLvx0kbo/Bp28GJKIqvE7URw== - -ms@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" - integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g= - -ms@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" - integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== - -ms@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" - integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== - -ms@2.1.3, ms@^2.1.1: - version "2.1.3" - resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" - integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== - -multibase@^0.7.0: - version "0.7.0" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.7.0.tgz#1adfc1c50abe05eefeb5091ac0c2728d6b84581b" - integrity sha512-TW8q03O0f6PNFTQDvh3xxH03c8CjGaaYrjkl9UQPG6rz53TQzzxJVCIWVjzcbN/Q5Y53Zd0IBQBMVktVgNx4Fg== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multibase@~0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/multibase/-/multibase-0.6.1.tgz#b76df6298536cc17b9f6a6db53ec88f85f8cc12b" - integrity sha512-pFfAwyTjbbQgNc3G7D48JkJxWtoJoBMaR4xQUOuB8RnCgRqaYmWNFeJTTvrJ2w51bjLq2zTby6Rqj9TQ9elSUw== - dependencies: - base-x "^3.0.8" - buffer "^5.5.0" - -multicodec@^0.5.5: - version "0.5.7" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-0.5.7.tgz#1fb3f9dd866a10a55d226e194abba2dcc1ee9ffd" - integrity sha512-PscoRxm3f+88fAtELwUnZxGDkduE2HD9Q6GHUOywQLjOGT/HAdhjLDYNZ1e7VR0s0TP0EwZ16LNUTFpoBGivOA== - dependencies: - varint "^5.0.0" - -multicodec@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/multicodec/-/multicodec-1.0.4.tgz#46ac064657c40380c28367c90304d8ed175a714f" - integrity sha512-NDd7FeS3QamVtbgfvu5h7fd1IlbaC4EQ0/pgU4zqE2vdHCmBGsUa0TiM8/TdSeG6BMPC92OOCf8F1ocE/Wkrrg== - dependencies: - buffer "^5.6.0" - varint "^5.0.0" - -multihashes@^0.4.15, multihashes@~0.4.15: - version "0.4.21" - resolved "https://registry.yarnpkg.com/multihashes/-/multihashes-0.4.21.tgz#dc02d525579f334a7909ade8a122dabb58ccfcb5" - integrity sha512-uVSvmeCWf36pU2nB4/1kzYZjsXD9vofZKpgudqkceYY5g2aZZXJ5r9lxuzoRLl1OAp28XljXsEJ/X/85ZsKmKw== - dependencies: - buffer "^5.5.0" - multibase "^0.7.0" - varint "^5.0.0" - -nano-json-stream-parser@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/nano-json-stream-parser/-/nano-json-stream-parser-0.1.2.tgz#0cc8f6d0e2b622b479c40d499c46d64b755c6f5f" - integrity sha1-DMj20OK2IrR5xA1JnEbWS3Vcb18= - -nanoid@3.1.20: - version "3.1.20" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.20.tgz#badc263c6b1dcf14b71efaa85f6ab4c1d6cfc788" - integrity sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw== - -nanomatch@^1.2.9: - version "1.2.13" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" - integrity sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA== - dependencies: - arr-diff "^4.0.0" - array-unique "^0.3.2" - define-property "^2.0.2" - extend-shallow "^3.0.2" - fragment-cache "^0.2.1" - is-windows "^1.0.2" - kind-of "^6.0.2" - object.pick "^1.3.0" - regex-not "^1.0.0" - snapdragon "^0.8.1" - to-regex "^3.0.1" - -negotiator@0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" - integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== - -next-tick@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c" - integrity sha1-yobR/ogoFpsBICCOPchCS524NCw= - -nice-try@^1.0.4: - version "1.0.5" - resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.5.tgz#a3378a7696ce7d223e88fc9b764bd7ef1089e366" - integrity sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ== - -node-addon-api@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-2.0.2.tgz#432cfa82962ce494b132e9d72a15b29f71ff5d32" - integrity sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA== - -node-fetch@2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5" - integrity sha1-q4hOjn5X44qUR1POxwb3iNF2i7U= - -node-fetch@^2.6.0: - version "2.6.1" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.1.tgz#045bd323631f76ed2e2b55573394416b639a0052" - integrity sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw== - -node-fetch@~1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef" - integrity sha512-NhZ4CsKx7cYm2vSrBAr2PvFOe6sWDf0UYLRqA6svUYg7+/TSfVAu49jYC4BvQ4Sms9SZgdqGBgroqfDhJdTyKQ== - dependencies: - encoding "^0.1.11" - is-stream "^1.0.1" - -node-gyp-build@^4.2.0: - version "4.2.3" - resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" - integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== - -normalize-package-data@^2.3.2: - version "2.5.0" - resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.5.0.tgz#e66db1838b200c1dfc233225d12cb36520e234a8" - integrity sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA== - dependencies: - hosted-git-info "^2.1.4" - resolve "^1.10.0" - semver "2 || 3 || 4 || 5" - validate-npm-package-license "^3.0.1" - -normalize-path@^3.0.0, normalize-path@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" - integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== - -normalize-url@^4.1.0: - version "4.5.0" - resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129" - integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ== - -number-is-nan@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" - integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= - -number-to-bn@1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/number-to-bn/-/number-to-bn-1.7.0.tgz#bb3623592f7e5f9e0030b1977bd41a0c53fe1ea0" - integrity sha1-uzYjWS9+X54AMLGXe9QaDFP+HqA= - dependencies: - bn.js "4.11.6" - strip-hex-prefix "1.0.0" - -oauth-sign@~0.9.0: - version "0.9.0" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" - integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== - -object-assign@^4, object-assign@^4.0.0, object-assign@^4.1.0, object-assign@^4.1.1: - version "4.1.1" - resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" - integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= - -object-copy@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c" - integrity sha1-fn2Fi3gb18mRpBupde04EnVOmYw= - dependencies: - copy-descriptor "^0.1.0" - define-property "^0.2.5" - kind-of "^3.0.3" - -object-inspect@^1.9.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== - -object-inspect@~1.7.0: - version "1.7.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.7.0.tgz#f4f6bd181ad77f006b5ece60bd0b6f398ff74a67" - integrity sha512-a7pEHdh1xKIAgTySUGgLMx/xwDZskN1Ud6egYYN3EdRW4ZMPNEDUTF+hwy2LUC+Bl+SyLXANnwz/jyh/qutKUw== - -object-is@^1.0.1: - version "1.1.5" - resolved "https://registry.yarnpkg.com/object-is/-/object-is-1.1.5.tgz#b9deeaa5fc7f1846a0faecdceec138e5778f53ac" - integrity sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -object-keys@^1.0.12, object-keys@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" - integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== - -object-keys@~0.4.0: - version "0.4.0" - resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-0.4.0.tgz#28a6aae7428dd2c3a92f3d95f21335dd204e0336" - integrity sha1-KKaq50KN0sOpLz2V8hM13SBOAzY= - -object-visit@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb" - integrity sha1-95xEk68MU3e1n+OdOV5BBC3QRbs= - dependencies: - isobject "^3.0.0" - -object.assign@^4.1.2: - version "4.1.2" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.2.tgz#0ed54a342eceb37b38ff76eb831a0e788cb63940" - integrity sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - has-symbols "^1.0.1" - object-keys "^1.1.1" - -object.getownpropertydescriptors@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.2.tgz#1bd63aeacf0d5d2d2f31b5e393b03a7c601a23f7" - integrity sha512-WtxeKSzfBjlzL+F9b7M7hewDzMwy+C8NRssHd1YrNlzHzIDrXcXiNOMrezdAEM4UXixgV+vvnyBeN7Rygl2ttQ== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - -object.pick@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747" - integrity sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c= - dependencies: - isobject "^3.0.1" - -oboe@2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.4.tgz#20c88cdb0c15371bb04119257d4fdd34b0aa49f6" - integrity sha1-IMiM2wwVNxuwQRklfU/dNLCqSfY= - dependencies: - http-https "^1.0.0" - -oboe@2.1.5: - version "2.1.5" - resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.5.tgz#5554284c543a2266d7a38f17e073821fbde393cd" - integrity sha1-VVQoTFQ6ImbXo48X4HOCH73jk80= - dependencies: - http-https "^1.0.0" - -on-finished@~2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947" - integrity sha1-IPEzZIGwg811M3mSoWlxqi2QaUc= - dependencies: - ee-first "1.1.1" - -once@^1.3.0, once@^1.3.1, once@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= - dependencies: - wrappy "1" - -open@^7.4.2: - version "7.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-7.4.2.tgz#b8147e26dcf3e426316c730089fd71edd29c2321" - integrity sha512-MVHddDVweXZF3awtlAS+6pgKLlm/JgxZ90+/NBurBoQctVOOB/zDdVjcyPzQ+0laDGbsWgrRkflI65sQeOgT9Q== - dependencies: - is-docker "^2.0.0" - is-wsl "^2.1.1" - -os-homedir@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-homedir/-/os-homedir-1.0.2.tgz#ffbc4988336e0e833de0c168c7ef152121aa7fb3" - integrity sha1-/7xJiDNuDoM94MFox+8VISGqf7M= - -os-locale@^1.4.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" - integrity sha1-IPnxeuKe00XoveWDsT0gCYA8FNk= - dependencies: - lcid "^1.0.0" - -os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" - integrity sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ= - -p-cancelable@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-0.3.0.tgz#b9e123800bcebb7ac13a479be195b507b98d30fa" - integrity sha512-RVbZPLso8+jFeq1MfNvgXtCRED2raz/dKpacfTNxsx6pLEpEomM7gah6VeHSYV3+vo0OAi4MkArtQcWWXuQoyw== - -p-cancelable@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc" - integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw== - -p-finally@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" - integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= - -p-limit@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-3.1.0.tgz#e1daccbe78d0d1388ca18c64fea38e3e57e3706b" - integrity sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ== - dependencies: - yocto-queue "^0.1.0" - -p-locate@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/p-locate/-/p-locate-5.0.0.tgz#83c8315c6785005e3bd021839411c9e110e6d834" - integrity sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw== - dependencies: - p-limit "^3.0.2" - -p-timeout@^1.1.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/p-timeout/-/p-timeout-1.2.1.tgz#5eb3b353b7fce99f101a1038880bb054ebbea386" - integrity sha1-XrOzU7f86Z8QGhA4iAuwVOu+o4Y= - dependencies: - p-finally "^1.0.0" - -parse-asn1@^5.0.0, parse-asn1@^5.1.5: - version "5.1.6" - resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.6.tgz#385080a3ec13cb62a62d39409cb3e88844cdaed4" - integrity sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw== - dependencies: - asn1.js "^5.2.0" - browserify-aes "^1.0.0" - evp_bytestokey "^1.0.0" - pbkdf2 "^3.0.3" - safe-buffer "^5.1.1" - -parse-headers@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/parse-headers/-/parse-headers-2.0.3.tgz#5e8e7512383d140ba02f0c7aa9f49b4399c92515" - integrity sha512-QhhZ+DCCit2Coi2vmAKbq5RGTRcQUOE2+REgv8vdyu7MnYx2eZztegqtTx99TZ86GTIwqiy3+4nQTWZ2tgmdCA== - -parse-json@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" - integrity sha1-9ID0BDTvgHQfhGkJn43qGPVaTck= - dependencies: - error-ex "^1.2.0" - -parseurl@~1.3.3: - version "1.3.3" - resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4" - integrity sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ== - -pascalcase@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14" - integrity sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ= - -patch-package@6.2.2: - version "6.2.2" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.2.2.tgz#71d170d650c65c26556f0d0fbbb48d92b6cc5f39" - integrity sha512-YqScVYkVcClUY0v8fF0kWOjDYopzIM8e3bj/RU1DPeEF14+dCGm6UeOYm4jvCyxqIEQ5/eJzmbWfDWnUleFNMg== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^1.2.1" - fs-extra "^7.0.1" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.0" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - -patch-package@^6.2.2: - version "6.4.7" - resolved "https://registry.yarnpkg.com/patch-package/-/patch-package-6.4.7.tgz#2282d53c397909a0d9ef92dae3fdeb558382b148" - integrity sha512-S0vh/ZEafZ17hbhgqdnpunKDfzHQibQizx9g8yEf5dcVk3KOflOfdufRXQX8CSEkyOQwuM/bNz1GwKvFj54kaQ== - dependencies: - "@yarnpkg/lockfile" "^1.1.0" - chalk "^2.4.2" - cross-spawn "^6.0.5" - find-yarn-workspace-root "^2.0.0" - fs-extra "^7.0.1" - is-ci "^2.0.0" - klaw-sync "^6.0.0" - minimist "^1.2.0" - open "^7.4.2" - rimraf "^2.6.3" - semver "^5.6.0" - slash "^2.0.0" - tmp "^0.0.33" - -path-browserify@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-1.0.1.tgz#d98454a9c3753d5790860f16f68867b9e46be1fd" - integrity sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g== - -path-exists@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" - integrity sha1-D+tsZPD8UY2adU3V77YscCJ2H0s= - dependencies: - pinkie-promise "^2.0.0" - -path-exists@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-4.0.0.tgz#513bdbe2d3b95d7762e8c1137efa195c6c61b5b3" - integrity sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w== - -path-is-absolute@^1.0.0, path-is-absolute@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= - -path-key@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-2.0.1.tgz#411cadb574c5a140d3a4b1910d40d80cc9f40b40" - integrity sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A= - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - -path-to-regexp@0.1.7: - version "0.1.7" - resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c" - integrity sha1-32BBeABfUi8V60SQ5yR6G/qmf4w= - -path-type@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" - integrity sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE= - dependencies: - graceful-fs "^4.1.2" - pify "^2.0.0" - pinkie-promise "^2.0.0" - -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - -pbkdf2@^3.0.17, pbkdf2@^3.0.3, pbkdf2@^3.0.9: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pbkdf2/-/pbkdf2-3.1.2.tgz#dd822aa0887580e52f1a039dc3eda108efae3075" - integrity sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA== - dependencies: - create-hash "^1.1.2" - create-hmac "^1.1.4" - ripemd160 "^2.0.1" - safe-buffer "^5.0.1" - sha.js "^2.4.8" - -performance-now@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b" - integrity sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns= - -picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.2.3.tgz#465547f359ccc206d3c48e46a1bcb89bf7ee619d" - integrity sha512-KpELjfwcCDUb9PeigTs2mBJzXUPzAuP2oPcA989He8Rte0+YUAjw1JVedDhuTKPkHjSYzMN3npC9luThGYEKdg== - -pify@^2.0.0, pify@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" - integrity sha1-7RQaasBDqEnqWISY59yosVMw6Qw= - -pinkie-promise@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" - integrity sha1-ITXW36ejWMBprJsXh3YogihFD/o= - dependencies: - pinkie "^2.0.0" - -pinkie@^2.0.0: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" - integrity sha1-clVrgM+g1IqXToDnckjoDtT3+HA= - -posix-character-classes@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" - integrity sha1-AerA/jta9xoqbAL+q7jB/vfgDqs= - -postinstall-postinstall@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/postinstall-postinstall/-/postinstall-postinstall-2.1.0.tgz#4f7f77441ef539d1512c40bd04c71b06a4704ca3" - integrity sha512-7hQX6ZlZXIoRiWNrbMQaLzUUfH+sSx39u8EJ9HYuDc1kLo9IXKWjM5RSquZN1ad5GnH8CGFM78fsAAQi3OKEEQ== - -precond@0.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/precond/-/precond-0.2.3.tgz#aa9591bcaa24923f1e0f4849d240f47efc1075ac" - integrity sha1-qpWRvKokkj8eD0hJ0kD0fvwQdaw= - -prepend-http@^1.0.1: - version "1.0.4" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc" - integrity sha1-1PRWKwzjaW5BrFLQ4ALlemNdxtw= - -prepend-http@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897" - integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc= - -prettier@^2.1.2: - version "2.3.0" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.3.0.tgz#b6a5bf1284026ae640f17f7ff5658a7567fc0d18" - integrity sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w== - -private@^0.1.6, private@^0.1.8: - version "0.1.8" - resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" - integrity sha512-VvivMrbvd2nKkiG38qjULzlc+4Vx4wm/whI9pQD35YrARNnhxeiRktSOhSukRLFNlzg6Br/cJPet5J/u19r/mg== - -process-nextick-args@~2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" - integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== - -process@^0.11.10: - version "0.11.10" - resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" - integrity sha1-czIwDoQBYb2j5podHZGn1LwW8YI= - -promise-to-callback@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/promise-to-callback/-/promise-to-callback-1.0.0.tgz#5d2a749010bfb67d963598fcd3960746a68feef7" - integrity sha1-XSp0kBC/tn2WNZj805YHRqaP7vc= - dependencies: - is-fn "^1.0.0" - set-immediate-shim "^1.0.1" - -proxy-addr@~2.0.5: - version "2.0.6" - resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.6.tgz#fdc2336505447d3f2f2c638ed272caf614bbb2bf" - integrity sha512-dh/frvCBVmSsDYzw6n926jv974gddhkFPfiN8hPOi30Wax25QZyZEGveluCgliBnqmuM+UJmBErbAUFIoDbjOw== - dependencies: - forwarded "~0.1.2" - ipaddr.js "1.9.1" - -prr@~1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476" - integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY= - -pseudomap@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3" - integrity sha1-8FKijacOYYkX7wqKw0wa5aaChrM= - -psl@^1.1.28: - version "1.8.0" - resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" - integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== - -public-encrypt@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.3.tgz#4fcc9d77a07e48ba7527e7cbe0de33d0701331e0" - integrity sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q== - dependencies: - bn.js "^4.1.0" - browserify-rsa "^4.0.0" - create-hash "^1.1.0" - parse-asn1 "^5.0.0" - randombytes "^2.0.1" - safe-buffer "^5.1.2" - -pull-cat@^1.1.9: - version "1.1.11" - resolved "https://registry.yarnpkg.com/pull-cat/-/pull-cat-1.1.11.tgz#b642dd1255da376a706b6db4fa962f5fdb74c31b" - integrity sha1-tkLdElXaN2pwa220+pYvX9t0wxs= - -pull-defer@^0.2.2: - version "0.2.3" - resolved "https://registry.yarnpkg.com/pull-defer/-/pull-defer-0.2.3.tgz#4ee09c6d9e227bede9938db80391c3dac489d113" - integrity sha512-/An3KE7mVjZCqNhZsr22k1Tx8MACnUnHZZNPSJ0S62td8JtYr/AiRG42Vz7Syu31SoTLUzVIe61jtT/pNdjVYA== - -pull-level@^2.0.3: - version "2.0.4" - resolved "https://registry.yarnpkg.com/pull-level/-/pull-level-2.0.4.tgz#4822e61757c10bdcc7cf4a03af04c92734c9afac" - integrity sha512-fW6pljDeUThpq5KXwKbRG3X7Ogk3vc75d5OQU/TvXXui65ykm+Bn+fiktg+MOx2jJ85cd+sheufPL+rw9QSVZg== - dependencies: - level-post "^1.0.7" - pull-cat "^1.1.9" - pull-live "^1.0.1" - pull-pushable "^2.0.0" - pull-stream "^3.4.0" - pull-window "^2.1.4" - stream-to-pull-stream "^1.7.1" - -pull-live@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/pull-live/-/pull-live-1.0.1.tgz#a4ecee01e330155e9124bbbcf4761f21b38f51f5" - integrity sha1-pOzuAeMwFV6RJLu89HYfIbOPUfU= - dependencies: - pull-cat "^1.1.9" - pull-stream "^3.4.0" - -pull-pushable@^2.0.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/pull-pushable/-/pull-pushable-2.2.0.tgz#5f2f3aed47ad86919f01b12a2e99d6f1bd776581" - integrity sha1-Xy867UethpGfAbEqLpnW8b13ZYE= - -pull-stream@^3.2.3, pull-stream@^3.4.0, pull-stream@^3.6.8: - version "3.6.14" - resolved "https://registry.yarnpkg.com/pull-stream/-/pull-stream-3.6.14.tgz#529dbd5b86131f4a5ed636fdf7f6af00781357ee" - integrity sha512-KIqdvpqHHaTUA2mCYcLG1ibEbu/LCKoJZsBWyv9lSYtPkJPBq8m3Hxa103xHi6D2thj5YXa0TqK3L3GUkwgnew== - -pull-window@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/pull-window/-/pull-window-2.1.4.tgz#fc3b86feebd1920c7ae297691e23f705f88552f0" - integrity sha1-/DuG/uvRkgx64pdpHiP3BfiFUvA= - dependencies: - looper "^2.0.0" - -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - -punycode@1.3.2: - version "1.3.2" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.3.2.tgz#9653a036fb7c1ee42342f2325cceefea3926c48d" - integrity sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0= - -punycode@2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d" - integrity sha1-X4Y+3Im5bbCQdLrXlHvwkFbKTn0= - -punycode@^2.1.0, punycode@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" - integrity sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A== - -qs@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc" - integrity sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ== - -qs@~6.5.2: - version "6.5.2" - resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" - integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== - -query-string@^5.0.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/query-string/-/query-string-5.1.1.tgz#a78c012b71c17e05f2e3fa2319dd330682efb3cb" - integrity sha512-gjWOsm2SoGlgLEdAGt7a6slVOk9mGiXmPFMqrEhLQ68rhQuBnpfs3+EmlvqKyxnCo9/PPlF+9MtY02S1aFg+Jw== - dependencies: - decode-uri-component "^0.2.0" - object-assign "^4.1.0" - strict-uri-encode "^1.0.0" - -querystring@0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620" - integrity sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA= - -randombytes@^2.0.0, randombytes@^2.0.1, randombytes@^2.0.5, randombytes@^2.0.6, randombytes@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" - integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== - dependencies: - safe-buffer "^5.1.0" - -randomfill@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/randomfill/-/randomfill-1.0.4.tgz#c92196fc86ab42be983f1bf31778224931d61458" - integrity sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw== - dependencies: - randombytes "^2.0.5" - safe-buffer "^5.1.0" - -range-parser@~1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" - integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== - -raw-body@2.4.0: - version "2.4.0" - resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.4.0.tgz#a1ce6fb9c9bc356ca52e89256ab59059e13d0332" - integrity sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q== - dependencies: - bytes "3.1.0" - http-errors "1.7.2" - iconv-lite "0.4.24" - unpipe "1.0.0" - -read-pkg-up@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" - integrity sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI= - dependencies: - find-up "^1.0.0" - read-pkg "^1.0.0" - -read-pkg@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" - integrity sha1-9f+qXs0pyzHAR0vKfXVra7KePyg= - dependencies: - load-json-file "^1.0.0" - normalize-package-data "^2.3.2" - path-type "^1.0.0" - -readable-stream@^1.0.33: - version "1.1.14" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" - integrity sha1-fPTFTvZI44EwhMY23SB54WbAgdk= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readable-stream@^2.0.0, readable-stream@^2.0.5, readable-stream@^2.2.2, readable-stream@^2.2.8, readable-stream@^2.2.9, readable-stream@^2.3.6, readable-stream@~2.3.6: - version "2.3.7" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" - integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.3" - isarray "~1.0.0" - process-nextick-args "~2.0.0" - safe-buffer "~5.1.1" - string_decoder "~1.1.1" - util-deprecate "~1.0.1" - -readable-stream@^3.0.6, readable-stream@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" - integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== - dependencies: - inherits "^2.0.3" - string_decoder "^1.1.1" - util-deprecate "^1.0.1" - -readable-stream@~1.0.15: - version "1.0.34" - resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" - integrity sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw= - dependencies: - core-util-is "~1.0.0" - inherits "~2.0.1" - isarray "0.0.1" - string_decoder "~0.10.x" - -readdirp@~3.5.0: - version "3.5.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.5.0.tgz#9ba74c019b15d365278d2e91bb8c48d7b4d42c9e" - integrity sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ== - dependencies: - picomatch "^2.2.1" - -regenerate@^1.2.1: - version "1.4.2" - resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" - integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== - -regenerator-runtime@^0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9" - integrity sha512-MguG95oij0fC3QV3URf4V2SDYGJhJnJGqvIIgdECeODCT98wSWDAJ94SSuVpYQUoTcGUIL6L4yNB7j1DFFHSBg== - -regenerator-transform@^0.10.0: - version "0.10.1" - resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd" - integrity sha512-PJepbvDbuK1xgIgnau7Y90cwaAmO/LCLMI2mPvaXq2heGMR3aWW5/BQvYrhJ8jgmQjXewXvBjzfqKcVOmhjZ6Q== - dependencies: - babel-runtime "^6.18.0" - babel-types "^6.19.0" - private "^0.1.6" - -regex-not@^1.0.0, regex-not@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c" - integrity sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A== - dependencies: - extend-shallow "^3.0.2" - safe-regex "^1.1.0" - -regexp.prototype.flags@^1.2.0: - version "1.3.1" - resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz#7ef352ae8d159e758c0eadca6f8fcb4eef07be26" - integrity sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -regexpu-core@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240" - integrity sha1-SdA4g3uNz4v6W5pCE5k45uoq4kA= - dependencies: - regenerate "^1.2.1" - regjsgen "^0.2.0" - regjsparser "^0.1.4" - -regjsgen@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/regjsgen/-/regjsgen-0.2.0.tgz#6c016adeac554f75823fe37ac05b92d5a4edb1f7" - integrity sha1-bAFq3qxVT3WCP+N6wFuS1aTtsfc= - -regjsparser@^0.1.4: - version "0.1.5" - resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.1.5.tgz#7ee8f84dc6fa792d3fd0ae228d24bd949ead205c" - integrity sha1-fuj4Tcb6eS0/0K4ijSS9lJ6tIFw= - dependencies: - jsesc "~0.5.0" - -repeat-element@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9" - integrity sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ== - -repeat-string@^1.6.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637" - integrity sha1-jcrkcOHIirwtYA//Sndihtp15jc= - -repeating@^2.0.0: - version "2.0.1" - resolved "https://registry.yarnpkg.com/repeating/-/repeating-2.0.1.tgz#5214c53a926d3552707527fbab415dbc08d06dda" - integrity sha1-UhTFOpJtNVJwdSf7q0FdvAjQbdo= - dependencies: - is-finite "^1.0.0" - -request@^2.79.0, request@^2.85.0: - version "2.88.2" - resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" - integrity sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.8.0" - caseless "~0.12.0" - combined-stream "~1.0.6" - extend "~3.0.2" - forever-agent "~0.6.1" - form-data "~2.3.2" - har-validator "~5.1.3" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.19" - oauth-sign "~0.9.0" - performance-now "^2.1.0" - qs "~6.5.2" - safe-buffer "^5.1.2" - tough-cookie "~2.5.0" - tunnel-agent "^0.6.0" - uuid "^3.3.2" - -require-directory@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" - integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= - -require-from-string@^1.1.0: - version "1.2.1" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-1.2.1.tgz#529c9ccef27380adfec9a2f965b649bbee636418" - integrity sha1-UpyczvJzgK3+yaL5ZbZJu+5jZBg= - -require-from-string@^2.0.0: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - -require-main-filename@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" - integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= - -resolve-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" - integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= - -resolve@^1.10.0, resolve@^1.8.1: - version "1.20.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" - integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A== - dependencies: - is-core-module "^2.2.0" - path-parse "^1.0.6" - -resolve@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -responselike@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" - integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec= - dependencies: - lowercase-keys "^1.0.0" - -resumer@~0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" - integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= - dependencies: - through "~2.3.4" - -ret@~0.1.10: - version "0.1.15" - resolved "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc" - integrity sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg== - -rimraf@^2.2.8, rimraf@^2.6.3: - version "2.7.1" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.7.1.tgz#35797f13a7fdadc566142c29d4f07ccad483e3ec" - integrity sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w== - dependencies: - glob "^7.1.3" - -ripemd160@^2.0.0, ripemd160@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" - integrity sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA== - dependencies: - hash-base "^3.0.0" - inherits "^2.0.1" - -rlp@^2.0.0, rlp@^2.2.1, rlp@^2.2.2, rlp@^2.2.3, rlp@^2.2.4: - version "2.2.6" - resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.2.6.tgz#c80ba6266ac7a483ef1e69e8e2f056656de2fb2c" - integrity sha512-HAfAmL6SDYNWPUOJNrM500x4Thn4PZsEy5pijPh40U9WfNk0z15hUYzO9xVIMAdIHdFtD8CBDHd75Td1g36Mjg== - dependencies: - bn.js "^4.11.1" - -rustbn.js@~0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca" - integrity sha512-4VlvkRUuCJvr2J6Y0ImW7NvTCriMi7ErOAqWk1y69vAdoNIzCF3yPmgeNzx+RQTLEDFq5sHfscn1MwHxP9hNfA== - -safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: - version "5.1.2" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" - integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g== - -safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@^5.1.2, safe-buffer@^5.2.0, safe-buffer@~5.2.0: - version "5.2.1" - resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" - integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== - -safe-event-emitter@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af" - integrity sha512-e1wFe99A91XYYxoQbcq2ZJUWurxEyP8vfz7A7vuUe1s95q8r5ebraVaA1BukYJcpM6V16ugWoD9vngi8Ccu5fg== - dependencies: - events "^3.0.0" - -safe-regex@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e" - integrity sha1-QKNmnzsHfR6UPURinhV91IAjvy4= - dependencies: - ret "~0.1.10" - -"safer-buffer@>= 2.1.2 < 3", "safer-buffer@>= 2.1.2 < 3.0.0", safer-buffer@^2.0.2, safer-buffer@^2.1.0, safer-buffer@~2.1.0: - version "2.1.2" - resolved "https://registry.yarnpkg.com/safer-buffer/-/safer-buffer-2.1.2.tgz#44fa161b0187b9549dd84bb91802f9bd8385cd6a" - integrity sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg== - -scrypt-js@3.0.1, scrypt-js@^3.0.0, scrypt-js@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/scrypt-js/-/scrypt-js-3.0.1.tgz#d314a57c2aef69d1ad98a138a21fe9eafa9ee312" - integrity sha512-cdwTTnqPu0Hyvf5in5asVdZocVDTNRmR7XEcJuIzMjJeSHybHl7vpB66AzwTaIg6CLSbtjcxc8fqcySfnTkccA== - -scryptsy@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/scryptsy/-/scryptsy-1.2.1.tgz#a3225fa4b2524f802700761e2855bdf3b2d92163" - integrity sha1-oyJfpLJST4AnAHYeKFW987LZIWM= - dependencies: - pbkdf2 "^3.0.3" - -secp256k1@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/secp256k1/-/secp256k1-4.0.2.tgz#15dd57d0f0b9fdb54ac1fa1694f40e5e9a54f4a1" - integrity sha512-UDar4sKvWAksIlfX3xIaQReADn+WFnHvbVujpcbr+9Sf/69odMwy2MUsz5CKLQgX9nsIyrjuxL2imVyoNHa3fg== - dependencies: - elliptic "^6.5.2" - node-addon-api "^2.0.0" - node-gyp-build "^4.2.0" - -seedrandom@3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/seedrandom/-/seedrandom-3.0.1.tgz#eb3dde015bcf55df05a233514e5df44ef9dce083" - integrity sha512-1/02Y/rUeU1CJBAGLebiC5Lbo5FnB22gQbIFFYTLkwvp1xdABZJH1sn4ZT1MzXmPpzv+Rf/Lu2NcsLJiK4rcDg== - -semaphore@>=1.0.1, semaphore@^1.0.3, semaphore@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa" - integrity sha512-O4OZEaNtkMd/K0i6js9SL+gqy0ZCBMgUvlSqHKi4IBdjhe7wB8pwztUk1BbZ1fmrvpwFrPbHzqd2w5pTcJH6LA== - -"semver@2 || 3 || 4 || 5", semver@^5.3.0, semver@^5.5.0, semver@^5.6.0: - version "5.7.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" - integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== - -semver@~5.4.1: - version "5.4.1" - resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e" - integrity sha512-WfG/X9+oATh81XtllIo/I8gOiY9EXRdv1cQdyykeXK17YcUW3EXUAi2To4pcH6nZtJPr7ZOpM5OMyWJZm+8Rsg== - -send@0.17.1: - version "0.17.1" - resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8" - integrity sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg== - dependencies: - debug "2.6.9" - depd "~1.1.2" - destroy "~1.0.4" - encodeurl "~1.0.2" - escape-html "~1.0.3" - etag "~1.8.1" - fresh "0.5.2" - http-errors "~1.7.2" - mime "1.6.0" - ms "2.1.1" - on-finished "~2.3.0" - range-parser "~1.2.1" - statuses "~1.5.0" - -serialize-javascript@5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-5.0.1.tgz#7886ec848049a462467a97d3d918ebb2aaf934f4" - integrity sha512-SaaNal9imEO737H2c05Og0/8LUXG7EnsZyMa8MzkmuHoELfT6txuj0cMqRj6zfPKnmQ1yasR4PCJc8x+M4JSPA== - dependencies: - randombytes "^2.1.0" - -serve-static@1.14.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" - integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== - dependencies: - encodeurl "~1.0.2" - escape-html "~1.0.3" - parseurl "~1.3.3" - send "0.17.1" - -servify@^0.1.12: - version "0.1.12" - resolved "https://registry.yarnpkg.com/servify/-/servify-0.1.12.tgz#142ab7bee1f1d033b66d0707086085b17c06db95" - integrity sha512-/xE6GvsKKqyo1BAY+KxOWXcLpPsUUyji7Qg3bVD7hh1eRze5bR1uYiuDA/k3Gof1s9BTzQZEJK8sNcNGFIzeWw== - dependencies: - body-parser "^1.16.0" - cors "^2.8.1" - express "^4.14.0" - request "^2.79.0" - xhr "^2.3.3" - -set-blocking@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" - integrity sha1-BF+XgtARrppoA93TgrJDkrPYkPc= - -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - integrity sha1-SysbJ+uAip+NzEgaWOXlb1mfP2E= - -set-value@^2.0.0, set-value@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b" - integrity sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw== - dependencies: - extend-shallow "^2.0.1" - is-extendable "^0.1.1" - is-plain-object "^2.0.3" - split-string "^3.0.1" - -setimmediate@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/setimmediate/-/setimmediate-1.0.5.tgz#290cbb232e306942d7d7ea9b83732ab7856f8285" - integrity sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU= - -setprototypeof@1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.1.tgz#7e95acb24aa92f5885e0abef5ba131330d4ae683" - integrity sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw== - -sha.js@^2.4.0, sha.js@^2.4.8: - version "2.4.11" - resolved "https://registry.yarnpkg.com/sha.js/-/sha.js-2.4.11.tgz#37a5cf0b81ecbc6943de109ba2960d1b26584ae7" - integrity sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ== - dependencies: - inherits "^2.0.1" - safe-buffer "^5.0.1" - -shebang-command@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" - integrity sha1-RKrGW2lbAzmJaMOfNj/uXer98eo= - dependencies: - shebang-regex "^1.0.0" - -shebang-regex@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" - integrity sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM= - -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^2.7.0: - version "2.8.1" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-2.8.1.tgz#0e22e91d4575d87620620bc91308d57a77f44b5d" - integrity sha512-lSSHRSw3mQNUGPAYRqo7xy9dhKmxFXIjLjp4KHpf99GEH2VH7C3AM+Qfx6du6jhfUi6Vm7XnbEVEf7Wb6N8jRw== - dependencies: - decompress-response "^3.3.0" - once "^1.3.1" - simple-concat "^1.0.0" - -slash@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" - integrity sha1-xB8vbDn8FtHNF61LXYlhFK5HDVU= - -slash@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/slash/-/slash-2.0.0.tgz#de552851a1759df3a8f206535442f5ec4ddeab44" - integrity sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A== - -snapdragon-node@^2.0.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b" - integrity sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw== - dependencies: - define-property "^1.0.0" - isobject "^3.0.0" - snapdragon-util "^3.0.1" - -snapdragon-util@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2" - integrity sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ== - dependencies: - kind-of "^3.2.0" - -snapdragon@^0.8.1: - version "0.8.2" - resolved "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d" - integrity sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg== - dependencies: - base "^0.11.1" - debug "^2.2.0" - define-property "^0.2.5" - extend-shallow "^2.0.1" - map-cache "^0.2.2" - source-map "^0.5.6" - source-map-resolve "^0.5.0" - use "^3.1.0" - -solc@0.8.0: - version "0.8.0" - resolved "https://registry.nlark.com/solc/download/solc-0.8.0.tgz#99828ebf4f61d298875936e8649ebe4a09f029f7" - integrity sha1-mYKOv09h0piHWTboZJ6+SgnwKfc= - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - follow-redirects "^1.12.1" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -solc@^0.4.20: - version "0.4.26" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.4.26.tgz#5390a62a99f40806b86258c737c1cf653cc35cb5" - integrity sha512-o+c6FpkiHd+HPjmjEVpQgH7fqZ14tJpXhho+/bQXlXbliLIS/xjXb42Vxh+qQY1WCSTMQ0+a5vR9vi0MfhU6mA== - dependencies: - fs-extra "^0.30.0" - memorystream "^0.3.1" - require-from-string "^1.1.0" - semver "^5.3.0" - yargs "^4.7.1" - -solc@^0.6.3: - version "0.6.12" - resolved "https://registry.yarnpkg.com/solc/-/solc-0.6.12.tgz#48ac854e0c729361b22a7483645077f58cba080e" - integrity sha512-Lm0Ql2G9Qc7yPP2Ba+WNmzw2jwsrd3u4PobHYlSOxaut3TtUbj9+5ZrT6f4DUpNPEoBaFUOEg9Op9C0mk7ge9g== - dependencies: - command-exists "^1.2.8" - commander "3.0.2" - fs-extra "^0.30.0" - js-sha3 "0.8.0" - memorystream "^0.3.1" - require-from-string "^2.0.0" - semver "^5.5.0" - tmp "0.0.33" - -source-map-resolve@^0.5.0: - version "0.5.3" - resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a" - integrity sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw== - dependencies: - atob "^2.1.2" - decode-uri-component "^0.2.0" - resolve-url "^0.2.1" - source-map-url "^0.4.0" - urix "^0.1.0" - -source-map-support@0.5.12: - version "0.5.12" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.12.tgz#b4f3b10d51857a5af0138d3ce8003b201613d599" - integrity sha512-4h2Pbvyy15EE02G+JOZpUCmqWJuqrs+sEkzewTm++BPi7Hvn/HwcqLAcNxYAyI0x13CpPPn+kMjl+hplXMHITQ== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - -source-map-support@^0.4.15: - version "0.4.18" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.4.18.tgz#0286a6de8be42641338594e97ccea75f0a2c585f" - integrity sha512-try0/JqxPLF9nOjvSta7tVondkP5dwgyLDjVoyMDlmjugT2lRZ1OfsrYTkCd2hkDnJTKRbO/Rl3orm8vlsUzbA== - dependencies: - source-map "^0.5.6" - -source-map-url@^0.4.0: - version "0.4.1" - resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" - integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== - -source-map@^0.5.6, source-map@^0.5.7: - version "0.5.7" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" - integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= - -source-map@^0.6.0: - version "0.6.1" - resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" - integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== - -spdx-correct@^3.0.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-3.1.1.tgz#dece81ac9c1e6713e5f7d1b6f17d468fa53d89a9" - integrity sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w== - dependencies: - spdx-expression-parse "^3.0.0" - spdx-license-ids "^3.0.0" - -spdx-exceptions@^2.1.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz#3f28ce1a77a00372683eade4a433183527a2163d" - integrity sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A== - -spdx-expression-parse@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz#cf70f50482eefdc98e3ce0a6833e4a53ceeba679" - integrity sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q== - dependencies: - spdx-exceptions "^2.1.0" - spdx-license-ids "^3.0.0" - -spdx-license-ids@^3.0.0: - version "3.0.8" - resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.8.tgz#eb1e97ad99b11bf3f82a3b71a0472dd9a00f2ecf" - integrity sha512-NDgA96EnaLSvtbM7trJj+t1LUR3pirkDCcz9nOUlPb5DMBGsH7oES6C3hs3j7R9oHEa1EMvReS/BUAIT5Tcr0g== - -split-string@^3.0.1, split-string@^3.0.2: - version "3.1.0" - resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2" - integrity sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw== - dependencies: - extend-shallow "^3.0.0" - -sshpk@^1.7.0: - version "1.16.1" - resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.16.1.tgz#fb661c0bef29b39db40769ee39fa70093d6f6877" - integrity sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg== - dependencies: - asn1 "~0.2.3" - assert-plus "^1.0.0" - bcrypt-pbkdf "^1.0.0" - dashdash "^1.12.0" - ecc-jsbn "~0.1.1" - getpass "^0.1.1" - jsbn "~0.1.0" - safer-buffer "^2.0.2" - tweetnacl "~0.14.0" - -static-extend@^0.1.1: - version "0.1.2" - resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6" - integrity sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY= - dependencies: - define-property "^0.2.5" - object-copy "^0.1.0" - -"statuses@>= 1.5.0 < 2", statuses@~1.5.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c" - integrity sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow= - -stream-to-pull-stream@^1.7.1: - version "1.7.3" - resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.3.tgz#4161aa2d2eb9964de60bfa1af7feaf917e874ece" - integrity sha512-6sNyqJpr5dIOQdgNy/xcDWwDuzAsAwVzhzrWlAPAQ7Lkjx/rv0wgvxEyKwTq6FmNd5rjTrELt/CLmaSw7crMGg== - dependencies: - looper "^3.0.0" - pull-stream "^3.2.3" - -strict-uri-encode@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713" - integrity sha1-J5siXfHVgrH1TmWt3UNS4Y+qBxM= - -string-width@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" - integrity sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M= - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - strip-ansi "^3.0.0" - -"string-width@^1.0.2 || 2": - version "2.1.1" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" - integrity sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw== - dependencies: - is-fullwidth-code-point "^2.0.0" - strip-ansi "^4.0.0" - -string-width@^4.1.0, string-width@^4.2.0: - version "4.2.2" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.2.tgz#dafd4f9559a7585cfba529c6a0a4f73488ebd4c5" - integrity sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.0" - -string.prototype.trim@~1.2.1: - version "1.2.4" - resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.4.tgz#6014689baf5efaf106ad031a5fa45157666ed1bd" - integrity sha512-hWCk/iqf7lp0/AgTF7/ddO1IWtSNPASjlzCicV5irAVdE1grjsneK26YG6xACMBEdCvO8fUST0UzDMh/2Qy+9Q== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - es-abstract "^1.18.0-next.2" - -string.prototype.trimend@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz#e75ae90c2942c63504686c18b287b4a0b1a45f80" - integrity sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string.prototype.trimstart@^1.0.4: - version "1.0.4" - resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz#b36399af4ab2999b4c9c648bd7a3fb2bb26feeed" - integrity sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw== - dependencies: - call-bind "^1.0.2" - define-properties "^1.1.3" - -string_decoder@^1.1.1: - version "1.3.0" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" - integrity sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA== - dependencies: - safe-buffer "~5.2.0" - -string_decoder@~0.10.x: - version "0.10.31" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" - integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= - -string_decoder@~1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" - integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg== - dependencies: - safe-buffer "~5.1.0" - -strip-ansi@^3.0.0, strip-ansi@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" - integrity sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8= - dependencies: - ansi-regex "^2.0.0" - -strip-ansi@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" - integrity sha1-qEeQIusaw2iocTibY1JixQXuNo8= - dependencies: - ansi-regex "^3.0.0" - -strip-ansi@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.0.tgz#0b1571dd7669ccd4f3e06e14ef1eed26225ae532" - integrity sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w== - dependencies: - ansi-regex "^5.0.0" - -strip-bom@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" - integrity sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4= - dependencies: - is-utf8 "^0.2.0" - -strip-hex-prefix@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/strip-hex-prefix/-/strip-hex-prefix-1.0.0.tgz#0c5f155fef1151373377de9dbb588da05500e36f" - integrity sha1-DF8VX+8RUTczd96du1iNoFUA428= - dependencies: - is-hex-prefixed "1.0.0" - -strip-json-comments@3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" - integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== - -supports-color@8.1.1: - version "8.1.1" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-8.1.1.tgz#cd6fc17e28500cff56c1b86c0a7fd4a54a73005c" - integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== - dependencies: - has-flag "^4.0.0" - -supports-color@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" - integrity sha1-U10EXOa2Nj+kARcIRimZXp3zJMc= - -supports-color@^5.3.0: - version "5.5.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" - integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== - dependencies: - has-flag "^3.0.0" - -supports-color@^7.1.0: - version "7.2.0" - resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" - integrity sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw== - dependencies: - has-flag "^4.0.0" - -swarm-js@^0.1.40: - version "0.1.40" - resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.40.tgz#b1bc7b6dcc76061f6c772203e004c11997e06b99" - integrity sha512-yqiOCEoA4/IShXkY3WKwP5PvZhmoOOD8clsKA7EEcRILMkTEYHCQ21HDCAcVpmIxZq4LyZvWeRJ6quIyHk1caA== - dependencies: - bluebird "^3.5.0" - buffer "^5.0.5" - eth-lib "^0.1.26" - fs-extra "^4.0.2" - got "^7.1.0" - mime-types "^2.1.16" - mkdirp-promise "^5.0.1" - mock-fs "^4.1.0" - setimmediate "^1.0.5" - tar "^4.0.2" - xhr-request "^1.0.1" - -tape@^4.6.3: - version "4.13.3" - resolved "https://registry.yarnpkg.com/tape/-/tape-4.13.3.tgz#51b3d91c83668c7a45b1a594b607dee0a0b46278" - integrity sha512-0/Y20PwRIUkQcTCSi4AASs+OANZZwqPKaipGCEwp10dQMipVvSZwUUCi01Y/OklIGyHKFhIcjock+DKnBfLAFw== - dependencies: - deep-equal "~1.1.1" - defined "~1.0.0" - dotignore "~0.1.2" - for-each "~0.3.3" - function-bind "~1.1.1" - glob "~7.1.6" - has "~1.0.3" - inherits "~2.0.4" - is-regex "~1.0.5" - minimist "~1.2.5" - object-inspect "~1.7.0" - resolve "~1.17.0" - resumer "~0.0.0" - string.prototype.trim "~1.2.1" - through "~2.3.8" - -tar@^4.0.2: - version "4.4.13" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.13.tgz#43b364bc52888d555298637b10d60790254ab525" - integrity sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA== - dependencies: - chownr "^1.1.1" - fs-minipass "^1.2.5" - minipass "^2.8.6" - minizlib "^1.2.1" - mkdirp "^0.5.0" - safe-buffer "^5.1.2" - yallist "^3.0.3" - -test-value@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/test-value/-/test-value-2.1.0.tgz#11da6ff670f3471a73b625ca4f3fdcf7bb748291" - integrity sha1-Edpv9nDzRxpztiXKTz/c97t0gpE= - dependencies: - array-back "^1.0.3" - typical "^2.6.0" - -testrpc@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/testrpc/-/testrpc-0.0.1.tgz#83e2195b1f5873aec7be1af8cbe6dcf39edb7aed" - integrity sha512-afH1hO+SQ/VPlmaLUFj2636QMeDvPCeQMc/9RBMW0IfjNe9gFD9Ra3ShqYkB7py0do1ZcCna/9acHyzTJ+GcNA== - -through2@^2.0.3: - version "2.0.5" - resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" - integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== - dependencies: - readable-stream "~2.3.6" - xtend "~4.0.1" - -through@~2.3.4, through@~2.3.8: - version "2.3.8" - resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" - integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= - -timed-out@^4.0.0, timed-out@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f" - integrity sha1-8y6srFoXW+ol1/q1Zas+2HQe9W8= - -tmp@0.0.33, tmp@^0.0.33: - version "0.0.33" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" - integrity sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw== - dependencies: - os-tmpdir "~1.0.2" - -tmp@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.1.0.tgz#ee434a4e22543082e294ba6201dcc6eafefa2877" - integrity sha512-J7Z2K08jbGcdA1kkQpJSqLF6T0tdQqpR2pnSUXsIchbPdTI9v3e85cLW0d6WDhwuAleOV71j2xWs8qMPfK7nKw== - dependencies: - rimraf "^2.6.3" - -to-fast-properties@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" - integrity sha1-uDVx+k2MJbguIxsG46MFXeTKGkc= - -to-object-path@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af" - integrity sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68= - dependencies: - kind-of "^3.0.2" - -to-readable-stream@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771" - integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q== - -to-regex-range@^2.1.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38" - integrity sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg= - dependencies: - is-number "^3.0.0" - repeat-string "^1.6.1" - -to-regex-range@^5.0.1: - version "5.0.1" - resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" - integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ== - dependencies: - is-number "^7.0.0" - -to-regex@^3.0.1, to-regex@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce" - integrity sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw== - dependencies: - define-property "^2.0.2" - extend-shallow "^3.0.2" - regex-not "^1.0.2" - safe-regex "^1.1.0" - -toidentifier@1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.0.tgz#7e1be3470f1e77948bc43d94a3c8f4d7752ba553" - integrity sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw== - -tough-cookie@~2.5.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.5.0.tgz#cd9fb2a0aa1d5a12b473bd9fb96fa3dcff65ade2" - integrity sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g== - dependencies: - psl "^1.1.28" - punycode "^2.1.1" - -trim-right@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" - integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= - -ts-essentials@^1.0.0: - version "1.0.4" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-1.0.4.tgz#ce3b5dade5f5d97cf69889c11bf7d2da8555b15a" - integrity sha512-q3N1xS4vZpRouhYHDPwO0bDW3EZ6SK9CrrDHxi/D6BPReSjpVgWIOpLS2o0gSBZm+7q/wyKp6RVM1AeeW7uyfQ== - -ts-essentials@^6.0.3: - version "6.0.7" - resolved "https://registry.yarnpkg.com/ts-essentials/-/ts-essentials-6.0.7.tgz#5f4880911b7581a873783740ce8b94da163d18a6" - integrity sha512-2E4HIIj4tQJlIHuATRHayv0EfMGK3ris/GRk1E3CFnsZzeNV+hUmelbaTZHLtXaZppM5oLhHRtO04gINC4Jusw== - -ts-generator@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/ts-generator/-/ts-generator-0.1.1.tgz#af46f2fb88a6db1f9785977e9590e7bcd79220ab" - integrity sha512-N+ahhZxTLYu1HNTQetwWcx3so8hcYbkKBHTr4b4/YgObFTIKkOSSsaa+nal12w8mfrJAyzJfETXawbNjSfP2gQ== - dependencies: - "@types/mkdirp" "^0.5.2" - "@types/prettier" "^2.1.1" - "@types/resolve" "^0.0.8" - chalk "^2.4.1" - glob "^7.1.2" - mkdirp "^0.5.1" - prettier "^2.1.2" - resolve "^1.8.1" - ts-essentials "^1.0.0" - -tunnel-agent@^0.6.0: - version "0.6.0" - resolved "https://registry.yarnpkg.com/tunnel-agent/-/tunnel-agent-0.6.0.tgz#27a5dea06b36b04a0a9966774b290868f0fc40fd" - integrity sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0= - dependencies: - safe-buffer "^5.0.1" - -tweetnacl-util@^0.15.0: - version "0.15.1" - resolved "https://registry.yarnpkg.com/tweetnacl-util/-/tweetnacl-util-0.15.1.tgz#b80fcdb5c97bcc508be18c44a4be50f022eea00b" - integrity sha512-RKJBIj8lySrShN4w6i/BonWp2Z/uxwC3h4y7xsRrpP59ZboCd0GpEVsOnMDYLMmKBpYhb5TgHzZXy7wTfYFBRw== - -tweetnacl@^0.14.3, tweetnacl@~0.14.0: - version "0.14.5" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" - integrity sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q= - -tweetnacl@^1.0.0: - version "1.0.3" - resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-1.0.3.tgz#ac0af71680458d8a6378d0d0d050ab1407d35596" - integrity sha512-6rt+RN7aOi1nGMyC4Xa5DdYiukl2UWCbcJft7YhxReBGQD7OAM8Pbxw6YMo4r2diNEA8FEmu32YOn9rhaiE5yw== - -type-detect@^4.0.0, type-detect@^4.0.5: - version "4.0.8" - resolved "https://registry.yarnpkg.com/type-detect/-/type-detect-4.0.8.tgz#7646fb5f18871cfbb7749e69bd39a6388eb7450c" - integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== - -type-is@~1.6.17, type-is@~1.6.18: - version "1.6.18" - resolved "https://registry.yarnpkg.com/type-is/-/type-is-1.6.18.tgz#4e552cd05df09467dcbc4ef739de89f2cf37c131" - integrity sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g== - dependencies: - media-typer "0.3.0" - mime-types "~2.1.24" - -type@^1.0.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/type/-/type-1.2.0.tgz#848dd7698dafa3e54a6c479e759c4bc3f18847a0" - integrity sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg== - -type@^2.0.0: - version "2.5.0" - resolved "https://registry.yarnpkg.com/type/-/type-2.5.0.tgz#0a2e78c2e77907b252abe5f298c1b01c63f0db3d" - integrity sha512-180WMDQaIMm3+7hGXWf12GtdniDEy7nYcyFMKJn/eZz/6tSLXrUN9V0wKSbMjej0I1WHWbpREDEKHtqPQa9NNw== - -typechain@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/typechain/-/typechain-3.0.0.tgz#d5a47700831f238e43f7429b987b4bb54849b92e" - integrity sha512-ft4KVmiN3zH4JUFu2WJBrwfHeDf772Tt2d8bssDTo/YcckKW2D+OwFrHXRC6hJvO3mHjFQTihoMV6fJOi0Hngg== - dependencies: - command-line-args "^4.0.7" - debug "^4.1.1" - fs-extra "^7.0.0" - js-sha3 "^0.8.0" - lodash "^4.17.15" - ts-essentials "^6.0.3" - ts-generator "^0.1.1" - -typedarray-to-buffer@^3.1.5: - version "3.1.5" - resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080" - integrity sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q== - dependencies: - is-typedarray "^1.0.0" - -typedarray@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" - integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= - -typewise-core@^1.2, typewise-core@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/typewise-core/-/typewise-core-1.2.0.tgz#97eb91805c7f55d2f941748fa50d315d991ef195" - integrity sha1-l+uRgFx/VdL5QXSPpQ0xXZke8ZU= - -typewise@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/typewise/-/typewise-1.0.3.tgz#1067936540af97937cc5dcf9922486e9fa284651" - integrity sha1-EGeTZUCvl5N8xdz5kiSG6fooRlE= - dependencies: - typewise-core "^1.2.0" - -typewiselite@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/typewiselite/-/typewiselite-1.0.0.tgz#c8882fa1bb1092c06005a97f34ef5c8508e3664e" - integrity sha1-yIgvobsQksBgBal/NO9chQjjZk4= - -typical@^2.6.0, typical@^2.6.1: - version "2.6.1" - resolved "https://registry.yarnpkg.com/typical/-/typical-2.6.1.tgz#5c080e5d661cbbe38259d2e70a3c7253e873881d" - integrity sha1-XAgOXWYcu+OCWdLnCjxyU+hziB0= - -ultron@~1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/ultron/-/ultron-1.1.1.tgz#9fe1536a10a664a65266a1e3ccf85fd36302bc9c" - integrity sha512-UIEXBNeYmKptWH6z8ZnqTeS8fV74zG0/eRU9VGkpzz+LIJNs8W/zM/L+7ctCkRrgbNnnR0xxw4bKOr0cW0N0Og== - -unbox-primitive@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.1.tgz#085e215625ec3162574dc8859abee78a59b14471" - integrity sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw== - dependencies: - function-bind "^1.1.1" - has-bigints "^1.0.1" - has-symbols "^1.0.2" - which-boxed-primitive "^1.0.2" - -underscore@1.12.1: - version "1.12.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.12.1.tgz#7bb8cc9b3d397e201cf8553336d262544ead829e" - integrity sha512-hEQt0+ZLDVUMhebKxL4x1BTtDY7bavVofhZ9KZ4aI26X9SRaE+Y3m83XUL1UP2jn8ynjndwCCpEHdUG+9pP1Tw== - -underscore@1.9.1: - version "1.9.1" - resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.9.1.tgz#06dce34a0e68a7babc29b365b8e74b8925203961" - integrity sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg== - -union-value@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847" - integrity sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg== - dependencies: - arr-union "^3.1.0" - get-value "^2.0.6" - is-extendable "^0.1.1" - set-value "^2.0.1" - -universalify@^0.1.0: - version "0.1.2" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66" - integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg== - -unorm@^1.3.3: - version "1.6.0" - resolved "https://registry.yarnpkg.com/unorm/-/unorm-1.6.0.tgz#029b289661fba714f1a9af439eb51d9b16c205af" - integrity sha512-b2/KCUlYZUeA7JFUuRJZPUtr4gZvBh7tavtv4fvk4+KV9pfGiR6CQAQAWl49ZpR3ts2dk4FYkP7EIgDJoiOLDA== - -unpipe@1.0.0, unpipe@~1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec" - integrity sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw= - -unset-value@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559" - integrity sha1-g3aHP30jNRef+x5vw6jtDfyKtVk= - dependencies: - has-value "^0.3.1" - isobject "^3.0.0" - -uri-js@^4.2.2: - version "4.4.1" - resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" - integrity sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg== - dependencies: - punycode "^2.1.0" - -urix@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72" - integrity sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI= - -url-parse-lax@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-1.0.0.tgz#7af8f303645e9bd79a272e7a14ac68bc0609da73" - integrity sha1-evjzA2Rem9eaJy56FKxovAYJ2nM= - dependencies: - prepend-http "^1.0.1" - -url-parse-lax@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c" - integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww= - dependencies: - prepend-http "^2.0.0" - -url-set-query@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339" - integrity sha1-AW6M/Xwg7gXK/neV6JK9BwL6ozk= - -url-to-options@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9" - integrity sha1-FQWgOiiaSMvXpDTvuu7FBV9WM6k= - -url@^0.11.0: - version "0.11.0" - resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1" - integrity sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE= - dependencies: - punycode "1.3.2" - querystring "0.2.0" - -use@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" - integrity sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ== - -utf-8-validate@^5.0.2: - version "5.0.5" - resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-5.0.5.tgz#dd32c2e82c72002dc9f02eb67ba6761f43456ca1" - integrity sha512-+pnxRYsS/axEpkrrEpzYfNZGXp0IjC/9RIxwM5gntY4Koi8SHmUGSfxfWqxZdRxrtaoVstuOzUp/rbs3JSPELQ== - dependencies: - node-gyp-build "^4.2.0" - -utf8@3.0.0, utf8@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1" - integrity sha512-E8VjFIQ/TyQgp+TZfS6l8yp/xWppSAHzidGiRrqe4bK4XP9pTRyKFgGJpO3SN7zdX4DeomTrwaseCHovfpFcqQ== - -util-deprecate@^1.0.1, util-deprecate@~1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" - integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= - -util.promisify@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/util.promisify/-/util.promisify-1.1.1.tgz#77832f57ced2c9478174149cae9b96e9918cd54b" - integrity sha512-/s3UsZUrIfa6xDhr7zZhnE9SLQ5RIXyYfiVnMMyMDzOc8WhWN4Nbh36H842OyurKbCDAesZOJaVyvmSl6fhGQw== - dependencies: - call-bind "^1.0.0" - define-properties "^1.1.3" - for-each "^0.3.3" - has-symbols "^1.0.1" - object.getownpropertydescriptors "^2.1.1" - -util@^0.12.0: - version "0.12.3" - resolved "https://registry.yarnpkg.com/util/-/util-0.12.3.tgz#971bb0292d2cc0c892dab7c6a5d37c2bec707888" - integrity sha512-I8XkoQwE+fPQEhy9v012V+TSdH2kp9ts29i20TaaDUXsg7x/onePbhFJUExBfv/2ay1ZOp/Vsm3nDlmnFGSAog== - dependencies: - inherits "^2.0.3" - is-arguments "^1.0.4" - is-generator-function "^1.0.7" - is-typed-array "^1.1.3" - safe-buffer "^5.1.2" - which-typed-array "^1.1.2" - -utils-merge@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713" - integrity sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM= - -uuid@3.3.2: - version "3.3.2" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131" - integrity sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA== - -uuid@^3.3.2: - version "3.4.0" - resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" - integrity sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A== - -validate-npm-package-license@^3.0.1: - version "3.0.4" - resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" - integrity sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew== - dependencies: - spdx-correct "^3.0.0" - spdx-expression-parse "^3.0.0" - -varint@^5.0.0: - version "5.0.2" - resolved "https://registry.yarnpkg.com/varint/-/varint-5.0.2.tgz#5b47f8a947eb668b848e034dcfa87d0ff8a7f7a4" - integrity sha512-lKxKYG6H03yCZUpAGOPOsMcGxd1RHCu1iKvEHYDPmTyq2HueGhD73ssNBqqQWfvYs04G9iUFRvmAVLW20Jw6ow== - -vary@^1, vary@~1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc" - integrity sha1-IpnwLG3tMNSllhsLn3RSShj2NPw= - -verror@1.10.0: - version "1.10.0" - resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400" - integrity sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA= - dependencies: - assert-plus "^1.0.0" - core-util-is "1.0.2" - extsprintf "^1.2.0" - -web3-bzz@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.2.11.tgz#41bc19a77444bd5365744596d778b811880f707f" - integrity sha512-XGpWUEElGypBjeFyUhTkiPXFbDVD6Nr/S5jznE3t8cWUA0FxRf1n3n/NuIZeb0H9RkN2Ctd/jNma/k8XGa3YKg== - dependencies: - "@types/node" "^12.12.6" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.9.1" - -web3-bzz@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-bzz/-/web3-bzz-1.3.6.tgz#95f370aecc3ff6ad07f057e6c0c916ef09b04dde" - integrity sha512-ibHdx1wkseujFejrtY7ZyC0QxQ4ATXjzcNUpaLrvM6AEae8prUiyT/OloG9FWDgFD2CPLwzKwfSQezYQlANNlw== - dependencies: - "@types/node" "^12.12.6" - got "9.6.0" - swarm-js "^0.1.40" - underscore "1.12.1" - -web3-core-helpers@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.2.11.tgz#84c681ed0b942c0203f3b324a245a127e8c67a99" - integrity sha512-PEPoAoZd5ME7UfbnCZBdzIerpe74GEvlwT4AjOmHeCVZoIFk7EqvOZDejJHt+feJA6kMVTdd0xzRNN295UhC1A== - dependencies: - underscore "1.9.1" - web3-eth-iban "1.2.11" - web3-utils "1.2.11" - -web3-core-helpers@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-helpers/-/web3-core-helpers-1.3.6.tgz#c478246a9abe4e5456acf42657dac2f7c330be74" - integrity sha512-nhtjA2ZbkppjlxTSwG0Ttu6FcPkVu1rCN5IFAOVpF/L0SEt+jy+O5l90+cjDq0jAYvlBwUwnbh2mR9hwDEJCNA== - dependencies: - underscore "1.12.1" - web3-eth-iban "1.3.6" - web3-utils "1.3.6" - -web3-core-method@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.2.11.tgz#f880137d1507a0124912bf052534f168b8d8fbb6" - integrity sha512-ff0q76Cde94HAxLDZ6DbdmKniYCQVtvuaYh+rtOUMB6kssa5FX0q3vPmixi7NPooFnbKmmZCM6NvXg4IreTPIw== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-utils "1.2.11" - -web3-core-method@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-method/-/web3-core-method-1.3.6.tgz#4b0334edd94b03dfec729d113c69a4eb6ebc68ae" - integrity sha512-RyegqVGxn0cyYW5yzAwkPlsSEynkdPiegd7RxgB4ak1eKk2Cv1q2x4C7D2sZjeeCEF+q6fOkVmo2OZNqS2iQxg== - dependencies: - "@ethersproject/transactions" "^5.0.0-beta.135" - underscore "1.12.1" - web3-core-helpers "1.3.6" - web3-core-promievent "1.3.6" - web3-core-subscriptions "1.3.6" - web3-utils "1.3.6" - -web3-core-promievent@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.2.11.tgz#51fe97ca0ddec2f99bf8c3306a7a8e4b094ea3cf" - integrity sha512-il4McoDa/Ox9Agh4kyfQ8Ak/9ABYpnF8poBLL33R/EnxLsJOGQG2nZhkJa3I067hocrPSjEdlPt/0bHXsln4qA== - dependencies: - eventemitter3 "4.0.4" - -web3-core-promievent@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-promievent/-/web3-core-promievent-1.3.6.tgz#6c27dc79de8f71b74f5d17acaf9aaf593d3cb0c9" - integrity sha512-Z+QzfyYDTXD5wJmZO5wwnRO8bAAHEItT1XNSPVb4J1CToV/I/SbF7CuF8Uzh2jns0Cm1109o666H7StFFvzVKw== - dependencies: - eventemitter3 "4.0.4" - -web3-core-requestmanager@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.2.11.tgz#fe6eb603fbaee18530293a91f8cf26d8ae28c45a" - integrity sha512-oFhBtLfOiIbmfl6T6gYjjj9igOvtyxJ+fjS+byRxiwFJyJ5BQOz4/9/17gWR1Cq74paTlI7vDGxYfuvfE/mKvA== - dependencies: - underscore "1.9.1" - web3-core-helpers "1.2.11" - web3-providers-http "1.2.11" - web3-providers-ipc "1.2.11" - web3-providers-ws "1.2.11" - -web3-core-requestmanager@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-requestmanager/-/web3-core-requestmanager-1.3.6.tgz#4fea269fe913fd4fca464b4f7c65cb94857b5b2a" - integrity sha512-2rIaeuqeo7QN1Eex7aXP0ZqeteJEPWXYFS/M3r3LXMiV8R4STQBKE+//dnHJXoo2ctzEB5cgd+7NaJM8S3gPyA== - dependencies: - underscore "1.12.1" - util "^0.12.0" - web3-core-helpers "1.3.6" - web3-providers-http "1.3.6" - web3-providers-ipc "1.3.6" - web3-providers-ws "1.3.6" - -web3-core-subscriptions@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.2.11.tgz#beca908fbfcb050c16f45f3f0f4c205e8505accd" - integrity sha512-qEF/OVqkCvQ7MPs1JylIZCZkin0aKK9lDxpAtQ1F8niEDGFqn7DT8E/vzbIa0GsOjL2fZjDhWJsaW+BSoAW1gg== - dependencies: - eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - -web3-core-subscriptions@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core-subscriptions/-/web3-core-subscriptions-1.3.6.tgz#ee24e7974d1d72ff6c992c599deba4ef9b308415" - integrity sha512-wi9Z9X5X75OKvxAg42GGIf81ttbNR2TxzkAsp1g+nnp5K8mBwgZvXrIsDuj7Z7gx72Y45mWJADCWjk/2vqNu8g== - dependencies: - eventemitter3 "4.0.4" - underscore "1.12.1" - web3-core-helpers "1.3.6" - -web3-core@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.2.11.tgz#1043cacc1becb80638453cc5b2a14be9050288a7" - integrity sha512-CN7MEYOY5ryo5iVleIWRE3a3cZqVaLlIbIzDPsvQRUfzYnvzZQRZBm9Mq+ttDi2STOOzc1MKylspz/o3yq/LjQ== - dependencies: - "@types/bn.js" "^4.11.5" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-requestmanager "1.2.11" - web3-utils "1.2.11" - -web3-core@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-core/-/web3-core-1.3.6.tgz#a6a761d1ff2f3ee462b8dab679229d2f8e267504" - integrity sha512-gkLDM4T1Sc0T+HZIwxrNrwPg0IfWI0oABSglP2X5ZbBAYVUeEATA0o92LWV8BeF+okvKXLK1Fek/p6axwM/h3Q== - dependencies: - "@types/bn.js" "^4.11.5" - "@types/node" "^12.12.6" - bignumber.js "^9.0.0" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-requestmanager "1.3.6" - web3-utils "1.3.6" - -web3-eth-abi@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.2.11.tgz#a887494e5d447c2926d557a3834edd66e17af9b0" - integrity sha512-PkRYc0+MjuLSgg03QVWqWlQivJqRwKItKtEpRUaxUAeLE7i/uU39gmzm2keHGcQXo3POXAbOnMqkDvOep89Crg== - dependencies: - "@ethersproject/abi" "5.0.0-beta.153" - underscore "1.9.1" - web3-utils "1.2.11" - -web3-eth-abi@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-abi/-/web3-eth-abi-1.3.6.tgz#4272ca48d817aa651bbf97b269f5ff10abc2b8a9" - integrity sha512-Or5cRnZu6WzgScpmbkvC6bfNxR26hqiKK4i8sMPFeTUABQcb/FU3pBj7huBLYbp9dH+P5W79D2MqwbWwjj9DoQ== - dependencies: - "@ethersproject/abi" "5.0.7" - underscore "1.12.1" - web3-utils "1.3.6" - -web3-eth-accounts@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.2.11.tgz#a9e3044da442d31903a7ce035a86d8fa33f90520" - integrity sha512-6FwPqEpCfKIh3nSSGeo3uBm2iFSnFJDfwL3oS9pyegRBXNsGRVpgiW63yhNzL0796StsvjHWwQnQHsZNxWAkGw== - dependencies: - crypto-browserify "3.12.0" - eth-lib "0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.9.1" - uuid "3.3.2" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" - -web3-eth-accounts@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-accounts/-/web3-eth-accounts-1.3.6.tgz#f9fcb50b28ee58090ab292a10d996155caa2b474" - integrity sha512-Ilr0hG6ONbCdSlVKffasCmNwftD5HsNpwyQASevocIQwHdTlvlwO0tb3oGYuajbKOaDzNTwXfz25bttAEoFCGA== - dependencies: - crypto-browserify "3.12.0" - eth-lib "0.2.8" - ethereumjs-common "^1.3.2" - ethereumjs-tx "^2.1.1" - scrypt-js "^3.0.1" - underscore "1.12.1" - uuid "3.3.2" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-utils "1.3.6" - -web3-eth-contract@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.2.11.tgz#917065902bc27ce89da9a1da26e62ef663663b90" - integrity sha512-MzYuI/Rq2o6gn7vCGcnQgco63isPNK5lMAan2E51AJLknjSLnOxwNY3gM8BcKoy4Z+v5Dv00a03Xuk78JowFow== - dependencies: - "@types/bn.js" "^4.11.5" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-promievent "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-utils "1.2.11" - -web3-eth-contract@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-contract/-/web3-eth-contract-1.3.6.tgz#cccf4d32dc56917fb6923e778498a9ba2a5ba866" - integrity sha512-8gDaRrLF2HCg+YEZN1ov0zN35vmtPnGf3h1DxmJQK5Wm2lRMLomz9rsWsuvig3UJMHqZAQKD7tOl3ocJocQsmA== - dependencies: - "@types/bn.js" "^4.11.5" - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-promievent "1.3.6" - web3-core-subscriptions "1.3.6" - web3-eth-abi "1.3.6" - web3-utils "1.3.6" - -web3-eth-ens@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.2.11.tgz#26d4d7f16d6cbcfff918e39832b939edc3162532" - integrity sha512-dbW7dXP6HqT1EAPvnniZVnmw6TmQEKF6/1KgAxbo8iBBYrVTMDGFQUUnZ+C4VETGrwwaqtX4L9d/FrQhZ6SUiA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-promievent "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-contract "1.2.11" - web3-utils "1.2.11" - -web3-eth-ens@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-ens/-/web3-eth-ens-1.3.6.tgz#0d28c5d4ea7b4462ef6c077545a77956a6cdf175" - integrity sha512-n27HNj7lpSkRxTgSx+Zo7cmKAgyg2ElFilaFlUu/X2CNH23lXfcPm2bWssivH9z0ndhg0OyR4AYFZqPaqDHkJA== - dependencies: - content-hash "^2.5.2" - eth-ens-namehash "2.0.8" - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-promievent "1.3.6" - web3-eth-abi "1.3.6" - web3-eth-contract "1.3.6" - web3-utils "1.3.6" - -web3-eth-iban@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.2.11.tgz#f5f73298305bc7392e2f188bf38a7362b42144ef" - integrity sha512-ozuVlZ5jwFC2hJY4+fH9pIcuH1xP0HEFhtWsR69u9uDIANHLPQQtWYmdj7xQ3p2YT4bQLq/axKhZi7EZVetmxQ== - dependencies: - bn.js "^4.11.9" - web3-utils "1.2.11" - -web3-eth-iban@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-iban/-/web3-eth-iban-1.3.6.tgz#0d6ba21fe78f190af8919e9cd5453882457209e0" - integrity sha512-nfMQaaLA/zsg5W4Oy/EJQbs8rSs1vBAX6b/35xzjYoutXlpHMQadujDx2RerTKhSHqFXSJeQAfE+2f6mdhYkRQ== - dependencies: - bn.js "^4.11.9" - web3-utils "1.3.6" - -web3-eth-personal@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.2.11.tgz#a38b3942a1d87a62070ce0622a941553c3d5aa70" - integrity sha512-42IzUtKq9iHZ8K9VN0vAI50iSU9tOA1V7XU2BhF/tb7We2iKBVdkley2fg26TxlOcKNEHm7o6HRtiiFsVK4Ifw== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-eth-personal@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth-personal/-/web3-eth-personal-1.3.6.tgz#226137916754c498f0284f22c55924c87a2efcf0" - integrity sha512-pOHU0+/h1RFRYoh1ehYBehRbcKWP4OSzd4F7mDljhHngv6W8ewMHrAN8O1ol9uysN2MuCdRE19qkRg5eNgvzFQ== - dependencies: - "@types/node" "^12.12.6" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-net "1.3.6" - web3-utils "1.3.6" - -web3-eth@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.2.11.tgz#4c81fcb6285b8caf544058fba3ae802968fdc793" - integrity sha512-REvxW1wJ58AgHPcXPJOL49d1K/dPmuw4LjPLBPStOVkQjzDTVmJEIsiLwn2YeuNDd4pfakBwT8L3bz1G1/wVsQ== - dependencies: - underscore "1.9.1" - web3-core "1.2.11" - web3-core-helpers "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-eth-abi "1.2.11" - web3-eth-accounts "1.2.11" - web3-eth-contract "1.2.11" - web3-eth-ens "1.2.11" - web3-eth-iban "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-utils "1.2.11" - -web3-eth@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-eth/-/web3-eth-1.3.6.tgz#2c650893d540a7a0eb1365dd5b2dca24ac919b7c" - integrity sha512-9+rnywRRpyX3C4hfsAQXPQh6vHh9XzQkgLxo3gyeXfbhbShUoq2gFVuy42vsRs//6JlsKdyZS7Z3hHPHz2wreA== - dependencies: - underscore "1.12.1" - web3-core "1.3.6" - web3-core-helpers "1.3.6" - web3-core-method "1.3.6" - web3-core-subscriptions "1.3.6" - web3-eth-abi "1.3.6" - web3-eth-accounts "1.3.6" - web3-eth-contract "1.3.6" - web3-eth-ens "1.3.6" - web3-eth-iban "1.3.6" - web3-eth-personal "1.3.6" - web3-net "1.3.6" - web3-utils "1.3.6" - -web3-net@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.2.11.tgz#eda68ef25e5cdb64c96c39085cdb74669aabbe1b" - integrity sha512-sjrSDj0pTfZouR5BSTItCuZ5K/oZPVdVciPQ6981PPPIwJJkCMeVjD7I4zO3qDPCnBjBSbWvVnLdwqUBPtHxyg== - dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-utils "1.2.11" - -web3-net@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-net/-/web3-net-1.3.6.tgz#a56492e2227475e38db29394f8bac305a2446e41" - integrity sha512-KhzU3wMQY/YYjyMiQzbaLPt2kut88Ncx2iqjy3nw28vRux3gVX0WOCk9EL/KVJBiAA/fK7VklTXvgy9dZnnipw== - dependencies: - web3-core "1.3.6" - web3-core-method "1.3.6" - web3-utils "1.3.6" - -web3-provider-engine@14.2.1: - version "14.2.1" - resolved "https://registry.yarnpkg.com/web3-provider-engine/-/web3-provider-engine-14.2.1.tgz#ef351578797bf170e08d529cb5b02f8751329b95" - integrity sha512-iSv31h2qXkr9vrL6UZDm4leZMc32SjWJFGOp/D92JXfcEboCqraZyuExDkpxKw8ziTufXieNM7LSXNHzszYdJw== - dependencies: - async "^2.5.0" - backoff "^2.5.0" - clone "^2.0.0" - cross-fetch "^2.1.0" - eth-block-tracker "^3.0.0" - eth-json-rpc-infura "^3.1.0" - eth-sig-util "^1.4.2" - ethereumjs-block "^1.2.2" - ethereumjs-tx "^1.2.0" - ethereumjs-util "^5.1.5" - ethereumjs-vm "^2.3.4" - json-rpc-error "^2.0.0" - json-stable-stringify "^1.0.1" - promise-to-callback "^1.0.0" - readable-stream "^2.2.9" - request "^2.85.0" - semaphore "^1.0.3" - ws "^5.1.1" - xhr "^2.2.0" - xtend "^4.0.1" - -web3-providers-http@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.2.11.tgz#1cd03442c61670572d40e4dcdf1faff8bd91e7c6" - integrity sha512-psh4hYGb1+ijWywfwpB2cvvOIMISlR44F/rJtYkRmQ5jMvG4FOCPlQJPiHQZo+2cc3HbktvvSJzIhkWQJdmvrA== - dependencies: - web3-core-helpers "1.2.11" - xhr2-cookies "1.1.0" - -web3-providers-http@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-http/-/web3-providers-http-1.3.6.tgz#36e8724a7424d52827819d53fd75dbf31f5422c2" - integrity sha512-OQkT32O1A06dISIdazpGLveZcOXhEo5cEX6QyiSQkiPk/cjzDrXMw4SKZOGQbbS1+0Vjizm1Hrp7O8Vp2D1M5Q== - dependencies: - web3-core-helpers "1.3.6" - xhr2-cookies "1.1.0" - -web3-providers-ipc@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.2.11.tgz#d16d6c9be1be6e0b4f4536c4acc16b0f4f27ef21" - integrity sha512-yhc7Y/k8hBV/KlELxynWjJDzmgDEDjIjBzXK+e0rHBsYEhdCNdIH5Psa456c+l0qTEU2YzycF8VAjYpWfPnBpQ== - dependencies: - oboe "2.1.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - -web3-providers-ipc@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-ipc/-/web3-providers-ipc-1.3.6.tgz#cef8d12c1ebb47adce5ebf597f553c623362cb4a" - integrity sha512-+TVsSd2sSVvVgHG4s6FXwwYPPT91boKKcRuEFXqEfAbUC5t52XOgmyc2LNiD9LzPhed65FbV4LqICpeYGUvSwA== - dependencies: - oboe "2.1.5" - underscore "1.12.1" - web3-core-helpers "1.3.6" - -web3-providers-ws@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.2.11.tgz#a1dfd6d9778d840561d9ec13dd453046451a96bb" - integrity sha512-ZxnjIY1Er8Ty+cE4migzr43zA/+72AF1myzsLaU5eVgdsfV7Jqx7Dix1hbevNZDKFlSoEyq/3j/jYalh3So1Zg== - dependencies: - eventemitter3 "4.0.4" - underscore "1.9.1" - web3-core-helpers "1.2.11" - websocket "^1.0.31" - -web3-providers-ws@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-providers-ws/-/web3-providers-ws-1.3.6.tgz#e1df617bc89d66165abdf2191da0014c505bfaac" - integrity sha512-bk7MnJf5or0Re2zKyhR3L3CjGululLCHXx4vlbc/drnaTARUVvi559OI5uLytc/1k5HKUUyENAxLvetz2G1dnQ== - dependencies: - eventemitter3 "4.0.4" - underscore "1.12.1" - web3-core-helpers "1.3.6" - websocket "^1.0.32" - -web3-shh@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.2.11.tgz#f5d086f9621c9a47e98d438010385b5f059fd88f" - integrity sha512-B3OrO3oG1L+bv3E1sTwCx66injW1A8hhwpknDUbV+sw3fehFazA06z9SGXUefuFI1kVs4q2vRi0n4oCcI4dZDg== - dependencies: - web3-core "1.2.11" - web3-core-method "1.2.11" - web3-core-subscriptions "1.2.11" - web3-net "1.2.11" - -web3-shh@1.3.6: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-shh/-/web3-shh-1.3.6.tgz#4e3486c7eca5cbdb87f88910948223a5b7ea6c20" - integrity sha512-9zRo415O0iBslxBnmu9OzYjNErzLnzOsy+IOvSpIreLYbbAw0XkDWxv3SfcpKnTIWIACBR4AYMIxmmyi5iB3jw== - dependencies: - web3-core "1.3.6" - web3-core-method "1.3.6" - web3-core-subscriptions "1.3.6" - web3-net "1.3.6" - -web3-utils@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.2.11.tgz#af1942aead3fb166ae851a985bed8ef2c2d95a82" - integrity sha512-3Tq09izhD+ThqHEaWYX4VOT7dNPdZiO+c/1QMA0s5X2lDFKK/xHJb7cyTRRVzN2LvlHbR7baS1tmQhSua51TcQ== - dependencies: - bn.js "^4.11.9" - eth-lib "0.2.8" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.9.1" - utf8 "3.0.0" - -web3-utils@1.3.6, web3-utils@^1.0.0-beta.31: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.3.6.tgz#390bc9fa3a7179746963cfaca55bb80ac4d8dc10" - integrity sha512-hHatFaQpkQgjGVER17gNx8u1qMyaXFZtM0y0XLGH1bzsjMPlkMPLRcYOrZ00rOPfTEuYFOdrpGOqZXVmGrMZRg== - dependencies: - bn.js "^4.11.9" - eth-lib "0.2.8" - ethereum-bloom-filters "^1.0.6" - ethjs-unit "0.1.6" - number-to-bn "1.7.0" - randombytes "^2.1.0" - underscore "1.12.1" - utf8 "3.0.0" - -web3@1.2.11: - version "1.2.11" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.2.11.tgz#50f458b2e8b11aa37302071c170ed61cff332975" - integrity sha512-mjQ8HeU41G6hgOYm1pmeH0mRAeNKJGnJEUzDMoerkpw7QUQT4exVREgF1MYPvL/z6vAshOXei25LE/t/Bxl8yQ== - dependencies: - web3-bzz "1.2.11" - web3-core "1.2.11" - web3-eth "1.2.11" - web3-eth-personal "1.2.11" - web3-net "1.2.11" - web3-shh "1.2.11" - web3-utils "1.2.11" - -web3@^1.3.5: - version "1.3.6" - resolved "https://registry.yarnpkg.com/web3/-/web3-1.3.6.tgz#599425461c3f9a8cbbefa70616438995f4a064cc" - integrity sha512-jEpPhnL6GDteifdVh7ulzlPrtVQeA30V9vnki9liYlUvLV82ZM7BNOQJiuzlDePuE+jZETZSP/0G/JlUVt6pOA== - dependencies: - web3-bzz "1.3.6" - web3-core "1.3.6" - web3-eth "1.3.6" - web3-eth-personal "1.3.6" - web3-net "1.3.6" - web3-shh "1.3.6" - web3-utils "1.3.6" - -websocket@1.0.32: - version "1.0.32" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.32.tgz#1f16ddab3a21a2d929dec1687ab21cfdc6d3dbb1" - integrity sha512-i4yhcllSP4wrpoPMU2N0TQ/q0O94LRG/eUQjEAamRltjQ1oT1PFFKOG4i877OlJgCG8rw6LrrowJp+TYCEWF7Q== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -websocket@^1.0.31, websocket@^1.0.32: - version "1.0.34" - resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.34.tgz#2bdc2602c08bf2c82253b730655c0ef7dcab3111" - integrity sha512-PRDso2sGwF6kM75QykIesBijKSVceR6jL2G8NGYyq2XrItNC2P5/qL5XeR056GhA+Ly7JMFvJb9I312mJfmqnQ== - dependencies: - bufferutil "^4.0.1" - debug "^2.2.0" - es5-ext "^0.10.50" - typedarray-to-buffer "^3.1.5" - utf-8-validate "^5.0.2" - yaeti "^0.0.6" - -whatwg-fetch@2.0.4: - version "2.0.4" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" - integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== - -which-boxed-primitive@^1.0.2: - version "1.0.2" - resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" - integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== - dependencies: - is-bigint "^1.0.1" - is-boolean-object "^1.1.0" - is-number-object "^1.0.4" - is-string "^1.0.5" - is-symbol "^1.0.3" - -which-module@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" - integrity sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8= - -which-typed-array@^1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" - integrity sha512-49E0SpUe90cjpoc7BOJwyPHRqSAd12c10Qm2amdEZrJPCY2NDxaW01zHITrem+rnETY3dwrbH3UUrUwagfCYDA== - dependencies: - available-typed-arrays "^1.0.2" - call-bind "^1.0.0" - es-abstract "^1.18.0-next.1" - foreach "^2.0.5" - function-bind "^1.1.1" - has-symbols "^1.0.1" - is-typed-array "^1.1.3" - -which@2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - -which@^1.2.9: - version "1.3.1" - resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" - integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== - dependencies: - isexe "^2.0.0" - -wide-align@1.1.3: - version "1.1.3" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" - integrity sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA== - dependencies: - string-width "^1.0.2 || 2" - -window-size@^0.2.0: - version "0.2.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075" - integrity sha1-tDFbtCFKPXBY6+7okuE/ok2YsHU= - -workerpool@6.1.0: - version "6.1.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.0.tgz#a8e038b4c94569596852de7a8ea4228eefdeb37b" - integrity sha512-toV7q9rWNYha963Pl/qyeZ6wG+3nnsyvolaNUS8+R5Wtw6qJPTxIlOP1ZSvcGhEJw+l3HMMmtiNo9Gl61G4GVg== - -wrap-ansi@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" - integrity sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU= - dependencies: - string-width "^1.0.1" - strip-ansi "^3.0.1" - -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -ws@7.2.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-7.2.3.tgz#a5411e1fb04d5ed0efee76d26d5c46d830c39b46" - integrity sha512-HTDl9G9hbkNDk98naoR/cHDws7+EyYMOdL1BmjsZXRUjf7d+MficC4B7HLUPlSiho0vg+CWKrGIt/VJBd1xunQ== - -ws@^3.0.0: - version "3.3.3" - resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2" - integrity sha512-nnWLa/NwZSt4KQJu51MYlCcSQ5g7INpOrOMt4XV8j4dqTXdmlUmSHQ8/oLC069ckre0fRsgfvsKwbTdtKLCDkA== - dependencies: - async-limiter "~1.0.0" - safe-buffer "~5.1.0" - ultron "~1.1.0" - -ws@^5.1.1: - version "5.2.2" - resolved "https://registry.yarnpkg.com/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f" - integrity sha512-jaHFD6PFv6UgoIVda6qZllptQsMlDEJkTQcybzzXDYM1XO9Y8em691FGMPmM46WGyLU4z9KMgQN+qrux/nhlHA== - dependencies: - async-limiter "~1.0.0" - -xhr-request-promise@^0.1.2: - version "0.1.3" - resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.3.tgz#2d5f4b16d8c6c893be97f1a62b0ed4cf3ca5f96c" - integrity sha512-YUBytBsuwgitWtdRzXDDkWAXzhdGB8bYm0sSzMPZT7Z2MBjMSTHFsyCT1yCRATY+XC69DUrQraRAEgcoCRaIPg== - dependencies: - xhr-request "^1.1.0" - -xhr-request@^1.0.1, xhr-request@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr-request/-/xhr-request-1.1.0.tgz#f4a7c1868b9f198723444d82dcae317643f2e2ed" - integrity sha512-Y7qzEaR3FDtL3fP30k9wO/e+FBnBByZeybKOhASsGP30NIkRAAkKD/sCnLvgEfAIEC1rcmK7YG8f4oEnIrrWzA== - dependencies: - buffer-to-arraybuffer "^0.0.5" - object-assign "^4.1.1" - query-string "^5.0.1" - simple-get "^2.7.0" - timed-out "^4.0.1" - url-set-query "^1.0.0" - xhr "^2.0.4" - -xhr2-cookies@1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/xhr2-cookies/-/xhr2-cookies-1.1.0.tgz#7d77449d0999197f155cb73b23df72505ed89d48" - integrity sha1-fXdEnQmZGX8VXLc7I99yUF7YnUg= - dependencies: - cookiejar "^2.1.1" - -xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3: - version "2.6.0" - resolved "https://registry.yarnpkg.com/xhr/-/xhr-2.6.0.tgz#b69d4395e792b4173d6b7df077f0fc5e4e2b249d" - integrity sha512-/eCGLb5rxjx5e3mF1A7s+pLlR6CGyqWN91fv1JgER5mVWg1MZmlhBvy9kjcsOdRk8RrIujotWyJamfyrp+WIcA== - dependencies: - global "~4.4.0" - is-function "^1.0.1" - parse-headers "^2.0.0" - xtend "^4.0.0" - -xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.0, xtend@~4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54" - integrity sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ== - -xtend@~2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/xtend/-/xtend-2.1.2.tgz#6efecc2a4dad8e6962c4901b337ce7ba87b5d28b" - integrity sha1-bv7MKk2tjmlixJAbM3znuoe10os= - dependencies: - object-keys "~0.4.0" - -y18n@^3.2.1: - version "3.2.2" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.2.tgz#85c901bd6470ce71fc4bb723ad209b70f7f28696" - integrity sha512-uGZHXkHnhF0XeeAPgnKfPv1bgKAYyVvmNL1xlKsPYZPaIHxGti2hHqvOCQv71XMsLxu1QjergkqogUnms5D3YQ== - -y18n@^5.0.5: - version "5.0.8" - resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" - integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== - -yaeti@^0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/yaeti/-/yaeti-0.0.6.tgz#f26f484d72684cf42bedfb76970aa1608fbf9577" - integrity sha1-8m9ITXJoTPQr7ft2lwqhYI+/lXc= - -yallist@^3.0.0, yallist@^3.0.2, yallist@^3.0.3: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - -yargs-parser@20.2.4: - version "20.2.4" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54" - integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA== - -yargs-parser@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4" - integrity sha1-hVaN488VD/SfpRgl8DqMiA3cxcQ= - dependencies: - camelcase "^3.0.0" - lodash.assign "^4.0.6" - -yargs-parser@^20.2.2: - version "20.2.7" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.7.tgz#61df85c113edfb5a7a4e36eb8aa60ef423cbc90a" - integrity sha512-FiNkvbeHzB/syOjIUxFDCnhSfzAL8R5vs40MgLFBorXACCOAEaWu0gRZl14vG8MR9AOJIZbmkjhusqBYZ3HTHw== - -yargs-unparser@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/yargs-unparser/-/yargs-unparser-2.0.0.tgz#f131f9226911ae5d9ad38c432fe809366c2325eb" - integrity sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA== - dependencies: - camelcase "^6.0.0" - decamelize "^4.0.0" - flat "^5.0.2" - is-plain-obj "^2.1.0" - -yargs@16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^4.7.1: - version "4.8.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-4.8.1.tgz#c0c42924ca4aaa6b0e6da1739dfb216439f9ddc0" - integrity sha1-wMQpJMpKqmsObaFznfshZDn53cA= - dependencies: - cliui "^3.2.0" - decamelize "^1.1.1" - get-caller-file "^1.0.1" - lodash.assign "^4.0.3" - os-locale "^1.4.0" - read-pkg-up "^1.0.1" - require-directory "^2.1.1" - require-main-filename "^1.0.1" - set-blocking "^2.0.0" - string-width "^1.0.1" - which-module "^1.0.0" - window-size "^0.2.0" - y18n "^3.2.1" - yargs-parser "^2.4.1" - -yocto-queue@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/yocto-queue/-/yocto-queue-0.1.0.tgz#0294eb3dee05028d31ee1a5fa2c556a6aaf10a1b" - integrity sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q== diff --git a/Example07-hardhat/README.md b/Example07-hardhat/README.md deleted file mode 100644 index 53c9fe06e..000000000 --- a/Example07-hardhat/README.md +++ /dev/null @@ -1,46 +0,0 @@ -## Hardhat 介绍 -Hardhat是一个编译、部署、测试和调试以太坊应用的开发环境。它可以帮助开发人员管理和自动化构建智能合约和dApps过程中固有的重复性任务,并围绕这一工作流程轻松引入更多功能。这意味着hardhat在最核心的地方是编译、运行和测试智能合约。 -Hardhat内置了Hardhat网络,这是一个专为开发设计的本地以太坊网络。主要功能有Solidity调试,跟踪调用堆栈、console.log()和交易失败时的明确错误信息提示等。 -Hardhat Runner是与Hardhat交互的CLI命令,是一个可扩展的任务运行器。它是围绕任务和插件的概念设计的。每次你从CLI运行Hardhat时,你都在运行一个任务。例如,npx hardhat compile运行的是内置的compile任务。任务可以调用其他任务,允许定义复杂的工作流程。用户和插件可以覆盖现有的任务,从而定制和扩展工作流程。 - -Hardhat的很多功能都来自于插件,而作为开发者,你可以自由选择想使用的插件。 - -- npx介绍 -https://www.ruanyifeng.com/blog/2019/02/npx.html -npx 想要解决的主要问题,就是调用项目内部安装的模块。 - -## 操作步骤 -- 1 创建项目: -``` -npx hardhat -``` - -- 2 编译合约 -``` - npx hardhat compile -``` - -- 3 跑测试:(内置节点为Hardhat Network) -``` - npx hardhat test -``` - -- 4 console.log调试合约: -合约引入: -``` -import "hardhat/console.sol"; -``` - -- 5 部署到测试网: - -hardhat.config.js 文件中添加一个network条目 - -``` -npx hardhat run scripts/deploy.js --network -``` - -## 参考文档 -hardhat官方文档: https://hardhat.org/guides/project-setup.html -hardhat中文文档: https://learnblockchain.cn/docs/hardhat/getting-started/ -https://rahulsethuram.medium.com/the-new-solidity-dev-stack-buidler-ethers-waffle-typescript-tutorial-f07917de48ae - diff --git a/Example07-hardhat/contracts/Greeter.sol b/Example07-hardhat/contracts/Greeter.sol deleted file mode 100644 index 51c10e6b1..000000000 --- a/Example07-hardhat/contracts/Greeter.sol +++ /dev/null @@ -1,23 +0,0 @@ -//SPDX-License-Identifier: Unlicense -pragma solidity ^0.8.0; - -import "hardhat/console.sol"; - - -contract Greeter { - string greeting; - - constructor(string memory _greeting) public { - console.log("Deploying a Greeter with greeting:", _greeting); - greeting = _greeting; - } - - function greet() public view returns (string memory) { - return greeting; - } - - function setGreeting(string memory _greeting) public { - console.log("Changing greeting from '%s' to '%s'", greeting, _greeting); - greeting = _greeting; - } -} \ No newline at end of file diff --git a/Example07-hardhat/hardhat.config.js b/Example07-hardhat/hardhat.config.js deleted file mode 100644 index 215555d35..000000000 --- a/Example07-hardhat/hardhat.config.js +++ /dev/null @@ -1,59 +0,0 @@ -require("@nomiclabs/hardhat-waffle"); -const fs = require("fs"); - -// This is a sample Hardhat task. To learn how to create your own go to -// https://hardhat.org/guides/create-task.html -task("accounts", "Prints the list of accounts", async () => { - const accounts = await ethers.getSigners(); - - for (const account of accounts) { - console.log(account.address); - } -}); - -function mnemonic() { - - return fs.readFileSync("./sk.txt").toString().trim(); - -} - -/** - * @type import('hardhat/config').HardhatUserConfig - */ -module.exports = { - solidity: "0.8.0", - networks: { - localhost: { - url: "http://localhost:8545", - //gasPrice: 125000000000,//you can adjust gasPrice locally to see how much it will cost on production - /* - notice no mnemonic here? it will just use account 0 of the hardhat node to deploy - (you can put in a mnemonic here to set the deployer locally) - */ - }, - rinkeby: { - url: "https://rinkeby.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work) - accounts: [ - mnemonic() - ], - }, - kovan: { - url: "https://kovan.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work) - accounts: [ - mnemonic() - ], - }, - mainnet: { - url: "https://mainnet.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work) - accounts: [ - mnemonic() - ], - }, - ropsten: { - url: "https://ropsten.infura.io/v3/0aae8358bfe04803b8e75bb4755eaf07", //<---- YOUR INFURA ID! (or it won't work) - accounts: [ - mnemonic() - ], - }, - } -}; \ No newline at end of file diff --git a/Example07-hardhat/package.json b/Example07-hardhat/package.json deleted file mode 100644 index 9dfd468cb..000000000 --- a/Example07-hardhat/package.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "name": "hardhat-project", - "devDependencies": { - "@nomiclabs/hardhat-ethers": "^2.0.2", - "@nomiclabs/hardhat-waffle": "^2.0.1", - "chai": "^4.3.4", - "ethereum-waffle": "^3.3.0", - "ethers": "^5.1.4", - "hardhat": "^2.2.1", - "sol-merger": "^3.1.0" - } -} diff --git a/Example07-hardhat/scripts/deploy.js b/Example07-hardhat/scripts/deploy.js deleted file mode 100644 index 591c2dc46..000000000 --- a/Example07-hardhat/scripts/deploy.js +++ /dev/null @@ -1,32 +0,0 @@ -// We require the Hardhat Runtime Environment explicitly here. This is optional -// but useful for running the script in a standalone fashion through `node + + diff --git a/basic/12-token-crowdfund/frontend/package.json b/basic/12-token-crowdfund/frontend/package.json new file mode 100644 index 000000000..42b7d6d88 --- /dev/null +++ b/basic/12-token-crowdfund/frontend/package.json @@ -0,0 +1,20 @@ +{ + "name": "frontend", + "version": "0.0.0", + "scripts": { + "dev": "vite", + "build": "vite build", + "serve": "vite preview" + }, + "dependencies": { + "bulma": "^0.9.3", + "ethers": "^6.12.1", + "react": "^17.0.0", + "react-dom": "^17.0.0" + }, + "devDependencies": { + "@rollup/plugin-json": "^4.1.0", + "@vitejs/plugin-react": "^1.0.0", + "vite": "^2.6.4" + } +} diff --git a/basic/12-token-crowdfund/frontend/src/App.css b/basic/12-token-crowdfund/frontend/src/App.css new file mode 100644 index 000000000..447146f2f --- /dev/null +++ b/basic/12-token-crowdfund/frontend/src/App.css @@ -0,0 +1,50 @@ + +.App { + text-align: center; + background: black; + min-height: 100vh; +} + +.App-logo { + height: 20vmin; + pointer-events: none; + padding: 20px 0; +} + +/* @media (prefers-reduced-motion: no-preference) { + .App-logo { + animation: App-logo-spin infinite 20s linear; + } +} */ + +.App-header { + /* background-color: #282c34; + min-height: 100vh; */ + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + font-size: calc(10px + 2vmin); + color: white; +} + +.App-link { + color: #61dafb; +} + +@keyframes App-logo-spin { + from { + transform: rotate(0deg); + } + to { + transform: rotate(360deg); + } +} + +button { + font-size: calc(10px + 2vmin); +} + +/* .modal-card-body .input{ + margin-bottom: 10px; +} */ \ No newline at end of file diff --git a/basic/12-token-crowdfund/frontend/src/App.jsx b/basic/12-token-crowdfund/frontend/src/App.jsx new file mode 100644 index 000000000..d19f20b66 --- /dev/null +++ b/basic/12-token-crowdfund/frontend/src/App.jsx @@ -0,0 +1,309 @@ +import { useState, useEffect, useRef } from 'react'; +import './App.css'; + +// We'll use ethers to interact with the Ethereum network and our contract +import { ethers } from 'ethers'; + +// We import the contract's artifacts and address here, as we are going to be +// using them with ethers +import crowdFundABI from './contracts/CrowdFunding.json'; +import projectABI from './contracts/Project.json'; + +// With this we can easily beautify our project, see more detail in https://bulma.io/ +import 'bulma/css/bulma.min.css'; + +// This is where our logo is, you can change it if you want :D +const logo = 'https://raw.githubusercontent.com/rebase-network/Dapp-Learning/755c0937d305a4e38e1665b99ebbaaf0995b6981/DappLearning-logo.svg'; + +// We had set these variable names in .env, and we get them by import.meta.env +const { VITE_INFURA_ID, VITE_PRIVATE_KEY, VITE_CONTRACT_ADDRESS } = import.meta.env; + +// In here we init web3Provider with infura network and set wallet to connect it +// if you prefer Matamask use lines 24 , 25 to replace lines 26, 27 +// +// const web3Provider = new ethers.providers.Web3Provider(window.ethereum); +// const wallet = web3Provider.getSigner(); +const web3Provider = new ethers.InfuraProvider('sepolia', VITE_INFURA_ID); +const wallet = new ethers.Wallet(VITE_PRIVATE_KEY, web3Provider); +// Get instance of our crowdFund contract +const instance = new ethers.Contract(VITE_CONTRACT_ADDRESS, crowdFundABI?.abi, wallet); +// In this component let us make a form element easier +// save us from duplicate works +// You can put any form element in children +function IptItem ({ label, children }) { + return ( +
+ +
{children}
+
+ ); +} + +// The ProjectItem is the key component of showing +// it has two props: +// 1. data is from each fund project +// 2. onFund can calling the function that let you can make fund to your favour project +function ProjectItem ({ data, onFund }) { + + // These are the variable we need from data + const { projectTitle, projectStarter, projectDesc, currentState, currentAmount, deadline, goalAmount } = data; + + // This can us get value from input element + const fundEl = useRef(null); + + // As it shows, loading state + const [loading, setLoading] = useState(false); + + // Depend on what currentState is there are three form: + // 0 => Ongoing + // 1 => Expired + // 2 => Completed + const resTag = () => { + if (currentState === 0) { + return Ongoing; + } else if (currentState === 2) { + return Completed; + } else { + return Expired; + } + }; + + // when this function has been called + // the component will be in loading state until the fund had been accept + // then set input to null value + // finish loading state waiting for next calling + const makeFund = async () => { + setLoading(true); + await onFund(fundEl.current.value); + fundEl.current.value = null; + setLoading(false); + }; + + return ( +
+ {/* This is for showing the basic info of project */} +
+
+
+

+ {resTag()} + {projectTitle} +

+

{projectDesc}

+
+
+ {/* The fund button warper, make sure this button can be seen when currentState value is 0 */} + {currentState === 0 && ( +
+
+
+ +
+ +
+
+ )} +
+ {/* Here is where the current amount and goal amount is, + also when currentState is 2 it means the project is reached the goal, + at this time current amount should be the same as goal amount so it can be hidden + */} +
+ {currentState !== 2 && `${ethers.formatEther(currentAmount)} ETH`} + {ethers.formatEther(goalAmount)} ETH +
+ {/* progress element makes the project fund progress more visualize */} + +
+
+
+ ); +} + +function App () { + + // This is the main part of project, + // saving the all state we need : + // loading is used when we start a new project + // showModal decide when the modle should pop up + // list saved all details of project + // projectCon save each contract instance of project + // projectInterval make sure the project list will properly update + // previousNum let us can check the previous project list length + const [loading, setLoading] = useState(false); + const [showModal, setShowModal] = useState(false); + const [list, setList] = useState([]); + const [projectCon, setProjectCon] = useState([]); + const [projectInterval, setProjectInterval] = useState(); + const [previousNum, setPreviousNum] = useState(); + + // these variables have same purpose get and modify corresponding input element value + const iptTitle = useRef(null); + const iptDesc = useRef(null); + const iptDur = useRef(null); + const iptAmount = useRef(null); + + // calling getProjects function + // this will only running once when project is init + useEffect(() => { + (async () => { + let res = await web3Provider.getBlockNumber(); + await getProjects(); + })(); + }, []); + + // every time when projectCon had changed, this will be running automatically + useEffect(() => { + if (!projectCon) return; + (async () => { + // because of projectCon is only save the contract of each project + // we also need use getDetails function to get detail ;) + let res = await Promise.all(projectCon.map((e) => e.getDetails())); + if (previousNum !== res.length) { + clearInterval(projectInterval); + } + setPreviousNum(res.length); + // save the deatails to list + setList(res); + if (projectCon.length === 0) return; + })(); + }, [projectCon]); + + // decide when modal should be showed + const switchModal = (isShow = false) => { + !isShow && clearIpt(); + setShowModal(isShow); + }; + + // this will calling crowdFund to get all projects addresses + // we can make returned addresses become contracts by use ethers.Contract + // and save them to projectCon + const getProjects = async () => { + let arr = await instance.returnAllProjects(); + console.log('updating...', projectABI?.abi); + setProjectCon(arr.map((e) => new ethers.Contract(e, projectABI?.abi, wallet))); + }; + + // clear all the input, the timing is when project start successfully + const clearIpt = () => { + [iptTitle, iptDesc, iptDur, iptAmount].map((e) => (e.current.value = null)); + }; + + const startProject = async () => { + try { + + // set confirm into loading state + setLoading(true); + + // get title, description and duration value + let res = [iptTitle, iptDesc, iptDur].map((e) => e.current.value); + + let amount; + // check input value whether is our needed + // if not make a alert and cease the function by throw a error + if (!(typeof (res[2] * 1) === 'number' && res[2] * 1 > 0)) { + alert('You have to input right duration'); + throw ''; + } + if (typeof (iptAmount.current.value * 1) === 'number' && iptAmount.current.value * 1 > 0) { + amount = ethers.parseEther(iptAmount.current.value); + } else { + alert('You have to input right amount'); + throw ''; + } + + // start the project, set a interval to update the list + let re = await instance.startProject(...res, ethers.parseEther(iptAmount.current.value)); + clearInterval(projectInterval); + setProjectInterval(setInterval(getProjects, 800)); + switchModal(false); + } catch (error) { + console.log(error); + } finally { + setLoading(false); + } + }; + + const makeFund = (contract, idx) => async (val) => { + // we will calling a payable method of contract + // thus we should set the value to declare how much fund we want supply + let overrides = { + value: ethers.parseEther(val), + }; + + // waiting for the transaction has been made + let tx = await contract.contribute(overrides); + + // wait for contract creation transaction to be mined + await tx.wait(); + + // after that we can get updated details, and replace old one with it + let res = await contract.getDetails(); + setList(list.map((e, index) => (idx === index ? res : e))); + }; + + return ( +
+
+ logo +
+
+ +
+ {/* show projects it will be a default project at first time */} +
+ Projects: + {list.map((e, idx) => ( + + ))} +
+ {/* this is modal, where user will input the info of the project they want to make */} +
+
+
+
+

Start your project

+ +
+
+
+ + + + +