open-index/open-npm huggingface dataset:
npm package: @midl/contracts
Description: Midl Contracts
Latest version: 1.0.12

Midl Contracts

This repository contains system's smart contracts of Midl

## Prerequisites

* **Node >= 20** (the repo is locked with Volta to `22.17.0`).  
* **Yarn or npm** for package management.  
* **A regtest bitcoin balance** (see next section).  

---

## Getting regtest bitcoin

Before you can deploy or test, you need a few testnet sats on **Midl regtest**.

1. **Use the faucet:** open <https://faucet.regtest.midl.xyz> and paste a regtest BTC address.  
2. **Or contact the Midl team:** ping `@midl_xyz` in the Telegram community and provide your address.

---

## Quick-start

```bash
pnpm install
# 2. Copy the env template and paste your credentials
cp .env.example .env
$EDITOR .env          

# 3. Deploy to Midl regtest or other network
pnpm hardhat deploy
npm package: @midl/core
Description: `@midl/core` provides the basic building blocks for interacting with Bitcoin and the MIDL Protocol. It includes utilities for creating and managing Bitcoin transactions, signing messages, and more.
Latest version: 3.1.0

## @midl/core

`@midl/core` provides the basic building blocks for interacting with Bitcoin and the MIDL Protocol. It includes utilities for creating and managing Bitcoin transactions, signing messages, and more.

### Features

- **Connect to any Bitcoin network** (mainnet, testnet, regtest, etc.)
- **Publish transactions** to the Bitcoin network
- **Sign PSBTs**
- **Sign messages** using BIP322 and ECDSA
- **Transfer Runes**
- **Etch runes** on the blockchain

### Installation

Install the package via your package manager of choice:

```bash
pnpm add @midl/core
```

### Documentation

For detailed documentation, please visit js.midl.xyz.
npm package: @midlajc/proxc
Description: PROXC client CLI for provisioning HTTPS tunnels over FRP
Latest version: 1.0.2

# @midlajc/proxc

CLI for exposing a local HTTP service through a PROXC server with automatic HTTPS provisioning.

Codebase: https://github.com/midlajc/proxc

## Requirements

- Node.js 18+
- npm
- Linux or macOS
- `tar` available on the system
- Access to a configured PROXC server

## Install

```bash
npm install -g @midlajc/proxc
```

## Initialize the Client

Run the interactive setup:

```bash
proxc config
```

You can also configure it non-interactively:

```bash
proxc config \
  --server-address yourdomain.com \
  --server-port 7000 \
  --auth-token your-token \
  --register-endpoint https://yourdomain.com/_proxc/register
```

This stores client configuration in `~/.proxc/config.json` and downloads the matching `frpc` binary into `~/.proxc/frpc`.

## Usage

Start a tunnel:

```bash
proxc <local_port> <subdomain>
```

Example:

```bash
proxc 3000 app
```

If the server is configured for `yourdomain.com`, the tunnel will be available at:

```text
https://app.yourdomain.com
```

Before starting the tunnel, the CLI calls the server registration endpoint to ensure HTTPS is provisioned for the requested subdomain.

## Commands

### `proxc config`

Initializes or updates the local client config.

Supported flags:

- `--server-address <domain>`
- `--server-port <port>`
- `--auth-token <token>`
- `--register-endpoint <url>`

### `proxc config show`

Prints the active client configuration as JSON.

### `proxc <local_port> <subdomain>`

Starts a tunnel from `127.0.0.1:<local_port>` to `<subdomain>.<server-address>`.

Subdomain rules:

- lowercase letters, numbers, and hyphens only
- no dots
- no leading or trailing hyphen

## Help

```bash
proxc --help
```

`proxc init` is still accepted as a backward-compatible alias for `proxc config`.

## Troubleshooting

If `proxc config` fails while downloading FRP:

- confirm outbound access to GitHub Releases
- confirm `tar` is installed
- rerun `proxc config`

If tunnel registration fails:

- confirm the `register-endpoint` is reachable
- confirm the auth token matches the server configuration
- confirm the requested subdomain is valid

If the CLI says config is missing:

```bash
proxc config
```

## Uninstall

```bash
npm uninstall -g @midlajc/proxc
rm -rf ~/.proxc ~/.cache/proxc
```

## Server Setup

Server configuration and install assets are available in the GitHub repo:

- Repo overview: https://github.com/midlajc/proxc#readme
- Server installer: https://github.com/midlajc/proxc/blob/master/server/install.sh
- Server files: https://github.com/midlajc/proxc/tree/master/server