open-index/open-npm huggingface dataset:
npm package: @lntools/bitcoin
Description: Bitcoin utilities
Author: Brian Mancini
Latest version: 0.6.0
Deprecated: Moved to @node-lightning/bitcoin

# @lntools/bitcoin

This package provides common Bitcoin functionality that would normally be in
a Bitcoin utility library such as:

- transaction parsing
- transaction building and signing

This module is designed to be a Bitcoin utility library without thirdparty
libraries. However, it currently has dependencies on pushdata-bitcoin and
bitcoin-ops.
npm package: @lntools/bitcoind
Description: Basic bitcoind JSONRPC and ZMQ client
Author: Brian Mancini
Latest version: 0.6.0
Deprecated: Moved to @node-lightning/bitcoind

# @lntools/bitcoind

This package provides connectivity to a bitcoind node by enabling RPC functions
and Zeromq streaming.

This package has an external dependency on the
[zeromq](https://www.npmjs.com/package/zeromq) package.

## Example Usage

You can connect to a bitcoind instance by providing rpc and zeromq options.

```typescript
const bitciondOptions = {
  host: "127.0.0.1",
  port: 8333,
  rpcuser: "user",
  rpcpassword: "pass",
  zmqpubrawtx: "tcp://127.0.0.1:18332"
  zmqpubrawblock: "tcp://127.0.0.1:18333";
}
const client = new BitcoindClient(bitcoindOptions);
```

You can subscribe to raw transactions and blocks emitted by zeromq:

```typescript
client.subscribeRawTx();
client.on("rawtx", (rawtx: Buffer) => {
  // deserialize and do something
});
```

```typescript
client.subscribeRawBlock();
client.on("rawblock", (rawblock: Buffer) => {
  // deserialize and do something
});
```

You can call RPC functions:

```typescript
// blockchain info
await client.getBlockchainInfo();

// returns the block hash for a height
await client.getBlockHash(0);

// returns a BlockSummary
await client.getBlock("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f");

// returns a Buffer
await client.getRawBlock("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f");

// returns a Transaction
await client.getTransaction("aa5f3068b53941915d82be382f2b35711305ec7d454a34ca69f8897510db7ab8");

// returns a Buffer
await client.getRawTransaction("aa5f3068b53941915d82be382f2b35711305ec7d454a34ca69f8897510db7ab8");

// returns a Utxo
await client.getUtxo("aa5f3068b53941915d82be382f2b35711305ec7d454a34ca69f8897510db7ab8", 0);
```
npm package: @lntools/buffer-cursor
Description: Buffer reader/writer utility 
Author: Brian Mancini
Latest version: 0.7.0
Deprecated: Moved to @node-lightning/bufio

# Buffer Cursor for simple reading/writing from a Buffer

[![CircleCI](https://circleci.com/gh/altangent/lntools/tree/master.svg?style=shield)](https://circleci.com/gh/altangent/lntools/tree/master)
[![codecov](https://codecov.io/gh/altangent/lntools/branch/master/graph/badge.svg)](https://codecov.io/gh/altangent/lntools)

Simplify reading and writing to buffers by internally maintaining the position. This library exposes a wrapper for a buffer that uses similar read and write methods to those found in the Node Buffer API. The library also includes
methods that assist with reading Bitcoin specific encodings such as `int64` and `varuint`. Large numbers
are returned as `BN.js` values.

Usage:

```bash
npm install @lntools/buffer-cursor
```

```javascript
const BufferCursor = require('@lntools/buffer-cursor');

let buffer = BufferCursor(Buffer.alloc(8));
buffer.writeUInt8(1);
buffer.writeUInt16BE(2);
buffer.writeUInt32BE(3);
buffer.writeBytes(Buffer.from([4]));
buffer.position = 0;
console.log(buffer.readUInt8());
console.log(buffer.readUInt16BE());
console.log(buffer.readUInt32BE());
console.log(buffer.readBytes());
```

## API

- `position: number` - the current buffer cursor position
- `eof: bool` - whether the current position is at the end of the buffer
- `buffer: Buffer` - the underlying buffer
- `lastReadBytes` - number of bytes last read from the buffer

- `readUInt8(): number` - reads 1 byte
- `readUInt16LE(): number` - reads 2 bytes as 16-bit little-endian unsigned integer
- `readUInt16BE(): number` - reads 2 bytes as 16-bit big-endian unsigned integer
- `readUInt32LE(): number` - reads 4 bytes as 32-bit little-endian unsigned integer
- `readUInt32BE(): number` - reads 4 bytes as 32-bit big-endian unsigned integer
- `readUInt64LE(): BN` - reads 8 bytes as 64-bit little-endian unsigned integer
- `readUInt64BE(): BN` - reads 8 bytes as 64-bit big-endian unsigned integer
- `readVarUint(): BN` - reads a variable length integer as defined in the Bitcoin protocol [docs](https://en.bitcoin.it/wiki/Protocol_documentation#Variable_length_integer)
- `readBytes([len]): Buffer` - reads the optionally specified number of bytes. If no length is supplied, it reads to the end of the buffer.

- `writeUInt8(number): undefined` - writes 1 byte
- `writeUInt16LE(number): undefined` - writes a number as a 16-bit little-endian unsigned integer
- `writeUInt16BE(number): undefined` - writes a number as a 16-bit big-endian unsigned integer
- `writeUInt32LE(number): undefined` - writes a number as a 32-bit little-endian unsigned integer
- `writeUInt32BE(number): undefined` - writes a number as a 32-bit big-endian unsigned integer
- `writeUInt64LE(number): undefined` - writes a number as a 64-bit little-endian unsigned integer
- `writeUInt64BE(number): undefined` - writes a number as a 64-bit big-endian unsigned integer
- `writeBytes(buffer): undefined` - writes the supplied buffer to the cursor buffer
npm package: @lntools/checksum
Description: Checksum library with CRC32C
Author: Brian Mancini
Latest version: 0.2.0
Deprecated: Moved to @node-lightning/checksum

# `@lntools/checksum`

Calculates a CRC32C checksum based on RFC3720.

## Usage

```
const { crc32c } = require('@lntools/checksum');
const checksum = crc32c(Buffer.from("hello")); // 2591144780
```
npm package: @lntools/crypto
Description: Crypto suite for LNTools
Author: Brian Mancini
Latest version: 0.10.0
Deprecated: Moved to @node-lightning/crypto

# @lntools/crypto

This packages uses the native Node.js crypto for all functionality except secp256k1. This package requires Node.js 10.17+.

This package provides cryptographic functions for use in LN Tools:

- sha256
- hash160
- hkdf
- secp256k1 ECDH
- secp256k1 private key generation
- secp256k1 public key derivation
- chacha20-poly1305 AEAD
npm package: @lntools/graph
Description: Lightning Network P2P Graph
Author: Brian Mancini
Latest version: 0.8.0
Deprecated: Moved to @node-lightning/graph

# @lntools/graph

This library constructs a graph as an adjacency list from P2P gossip messages.

This class includes the following types:

- [GraphManger](/lib/graph-manager.ts) - constructs a graph from gossip messages
- [Graph](/lib/graph.ts) - adjacency list representation of a graph
- [Node](/lib/node.ts) - vertex in the graph
- [Channel](/lib/channel.ts) - directional edge in the graph
- [ChannelSettings](/lib/channel-settings.ts) - one directional edge information

## Examples

Message from a gossip emitter (defined in @lntools/wire) will be used to
construct an adjacency list based graph.

```typescript
const graphManager = new GossipManager(gossipEmitter);

graphManager.on("node", (node: Node) => {
  //
});

graphManager.on("channel", (channel: Channel) => {
  //
});

graphManager.on("channel_update", (channel: Channel, settings: ChannelSettings) => {
  //
});
```

The following events are emitted for the corresponding gossip message:

**channel_announcement message**

- emits node event for node1 in channel
- emits node event for node2 in channel
- emits channel

**channel_update message**

- emits channel_update event

**node_announcement message**

- emits node event

### LND Serialization

You can serialize the graph instance in the same manner as the serialization
used in LND RPC calls.

```typescript
const serializer = new LndSerializer();
// to a plain-old JavaScript object
serializer.toObject(graph);

// to JSON
serializer.toJson(graph);
```
npm package: @lntools/logger
Description: Logging tool for LNTools applications
Author: Brian Mancini
Latest version: 0.10.0
Deprecated: Moved to @node-lightning/logger

# LNTools Logger

Logger for LNTools modules that supports multi-transport, multi-area+instance logging using standard `util.format` sprintf value formatting.

### Getting Started

```bash
npm install @lntools/logger
```

To use the module you will need to create an area logger and include an optional instance identifier:

```javascript
const { manager } = require("@lntools/logger");

const area = "TEST";
const instanceId = "12345678";
const log = manager.create(area, instanceId);
```

Then you can write `debug`, `info`, `warn`, and `error` messages by passing a message an a variadic number of values. You can pass text, values, sprintf syle strings, or a string and a list of values that will be appended to the end of the message.

```javascript
log.debug("test");
log.info("hello");
log.warn("i'm warning you");
log.error("something went bad");
log.error(new Error("booooom"));
log.info("some stuff %j", { ok: true, foo: "bar" });
log.info("some values", 1, 2, 3, 4);
log.info("using %s formatting", "sprintf");
```

The above message should look similar to:

```
2019-07-22T13:28:37.854Z [DBG] TEST 12345678: test
2019-07-22T13:28:37.855Z [INF] TEST 12345678: hello
2019-07-22T13:28:37.855Z [WRN] TEST 12345678: i'm warning you
2019-07-22T13:28:37.855Z [ERR] TEST 12345678: something went bad
2019-07-22T13:28:37.856Z [ERR] TEST 12345678: Error: booooom
    at Object.<anonymous> (/code/go/src/github.com/altangent/lntools/packages/logger/test.js:9:11)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:829:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:622:3)
2019-07-22T13:28:37.856Z [INF] TEST 12345678: some stuff {"ok":true,"foo":"bar"}
2019-07-22T13:28:37.856Z [INF] TEST 12345678: some values 1 2 3 4
2019-07-22T13:28:37.856Z [INF] TEST 12345678: using sprintf formatting
```

### Output

The default instance of the logger will output to:

-   `console`
-   `lntools.log` file located at the root of the application runtime
npm package: @lntools/wire
Description: Lightning Network Wire Protocol
Author: Brian Mancini
Latest version: 0.18.0
Deprecated: Moved to @node-lightning/wire

# `@lntools/wire`

This repository contains the wire protocol code for the Lightning Network and
includes the following functionality:

- Peer which manages a connection to a peer. This class allows sending and
  emitting message traffic. It also manages internal state for Ping/Pong message
  traffic. [/lib/peer.ts](lib/peer.ts)

- Messages defined in BOLT #1 - Base Protocol, BOLT #2 - Peer Protocol for
  Channel Management, and BOLT #7 P2P Node and Channel Discovery can be
  found in [/lib/messages](/lib/messages). This code includes the message
  types and serialization and deserialization methods for each message.

- P2P Node and Channel gossip management that can be found in
  [/lib/gossip](/lib/gossip). This code contains the
  [GossipManger](/lib/gossip/gossip-manager) which controls gossip for many
  peers. Gossip synchronization for a single peer is managed through
  [PeerGossipSynchronizer](/lib/gossip/peer-gossip-synchronizer).
npm package: @lntpay/sdk
Description: Official LNTPay SDK for Node.js
Latest version: 0.1.5

# @lntpay/sdk

Official LNTPay SDK for Node.js (TypeScript-first).

## Installation

```bash
npm install @lntpay/sdk
```

## Authentication

```ts
import LNTPay from "@lntpay/sdk";

const client = new LNTPay({
  apiKey: process.env.LNTPAY_API_KEY!
});
```

## Create a charge (BOLT11)

```ts
const charge = await client.charges.create({
  amount_sats: 2500,
  memo: "Coffee"
});

console.log(charge.bolt11);
```

## Create a withdrawal

```ts
const withdrawal = await client.withdrawals.create({
  amount: 5000,
  currency: "USD",
  description: "Refund"
});
```

## Webhook signature validation

```ts
import type { WebhookEvent } from "@lntpay/sdk";

const rawBody = req.body; // Buffer
const signatureHeader = req.headers["lntpay-signature"] as string;

const event = client.webhooks.constructEvent<WebhookEvent>(
  rawBody,
  signatureHeader,
  process.env.LNTPAY_WEBHOOK_SECRET!
);

console.log(event.type);
```

## Idempotency

```ts
await client.charges.create(
  { amount_sats: 1000 },
  { idempotencyKey: "charge-2026-02-02-0001" }
);
```

## Request options and retries

`RequestOptions` supports `retries` for GET requests only. POST retries are ignored.

```ts
const charge = await client.charges.retrieve("ch_123", { retries: 2 });
```

## Examples

Examples live in `/examples`.

```bash
export LNTPAY_API_KEY="..."
export LNTPAY_WEBHOOK_SECRET="..."
# optional
export LNTPAY_BASE_URL="https://api.lntpay.com"

npm install
npm run build
node examples/node-pay-per-request.mjs
```

Webhook receiver example:

```bash
node examples/webhook-receiver.mjs
```

## License

MIT
npm package: @lntvow/create
Description: Customizable command-line tool enabling quick scaffolding and management of project templates
Latest version: 1.2.2

<div>
<br>

```

   ██████╗██████╗ ███████╗ █████╗ ████████╗███████╗
  ██╔════╝██╔══██╗██╔════╝██╔══██╗╚══██╔══╝██╔════╝
  ██║     ██████╔╝█████╗  ███████║   ██║   █████╗
  ██║     ██╔══██╗██╔══╝  ██╔══██║   ██║   ██╔══╝
  ╚██████╗██║  ██║███████╗██║  ██║   ██║   ███████╗
   ╚═════╝╚═╝  ╚═╝╚══════╝╚═╝  ╚═╝   ╚═╝   ╚══════╝

```

</div>

> Customizable command-line tool enabling quick scaffolding and management of project templates

[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/create.svg?&logo=npm)](https://www.npmjs.com/package/@lntvow/create)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/create?&logo=npm)](https://www.npmjs.com/package/@lntvow/create)
npm package: @lntvow/dev
Description: Development environment dependencies package
Latest version: 5.8.0

<div>
<br>

```

  ██████╗ ███████╗██╗   ██╗
  ██╔══██╗██╔════╝██║   ██║
  ██║  ██║█████╗  ██║   ██║
  ██║  ██║██╔══╝  ╚██╗ ██╔╝
  ██████╔╝███████╗ ╚████╔╝
  ╚═════╝ ╚══════╝  ╚═══╝

```

</div>

> Development Environment Dependencies Package

[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/dev.svg?logo=npm)](https://www.npmjs.com/package/@lntvow/dev)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/dev?logo=npm)](https://www.npmjs.com/package/@lntvow/dev)
npm package: @lntvow/eslint-config
Description: Customizable eslint configuration
Latest version: 10.1.5

<div>
<br>

```

  ███████╗███████╗██╗     ██╗███╗   ██╗████████╗      ██████╗ ██████╗ ███╗   ██╗███████╗██╗ ██████╗
  ██╔════╝██╔════╝██║     ██║████╗  ██║╚══██╔══╝     ██╔════╝██╔═══██╗████╗  ██║██╔════╝██║██╔════╝
  █████╗  ███████╗██║     ██║██╔██╗ ██║   ██║        ██║     ██║   ██║██╔██╗ ██║█████╗  ██║██║  ███╗
  ██╔══╝  ╚════██║██║     ██║██║╚██╗██║   ██║        ██║     ██║   ██║██║╚██╗██║██╔══╝  ██║██║   ██║
  ███████╗███████║███████╗██║██║ ╚████║   ██║        ╚██████╗╚██████╔╝██║ ╚████║██║     ██║╚██████╔╝
  ╚══════╝╚══════╝╚══════╝╚═╝╚═╝  ╚═══╝   ╚═╝         ╚═════╝ ╚═════╝ ╚═╝  ╚═══╝╚═╝     ╚═╝ ╚═════╝

```

</div>

> Customizable eslint configuration

[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/eslint-config.svg?logo=npm)](https://www.npmjs.com/package/@lntvow/eslint-config)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/eslint-config?logo=npm)](https://www.npmjs.com/package/@lntvow/eslint-config)

## Usage

install @lntvow/eslint-config

```bash
pnpm install -D @lntvow/eslint-config eslint
```

create `eslint.config.mjs` in your project root

```js
// eslint.config.mjs
import { lntvow } from '@lntvow/eslint-config'

export default lntvow()
```

create `.prettierrc` in your project root, you can customize prettier rules as you want

```json
// .prettierrc
{
  "$schema": "https://json.schemastore.org/prettierrc",
  "printWidth": 120,
  "semi": false,
  "singleQuote": true,
  "arrowParens": "avoid",
  "trailingComma": "es5",
  "htmlWhitespaceSensitivity": "ignore",
  "quoteProps": "consistent"
}
```

## Plugins

Since flat config requires us to explicitly provide the plugin names (instead of the mandatory convention from npm package name), we renamed some plugins to make the overall scope more consistent and easier to write.

| New Prefix | Original Prefix        | Source Plugin                                                                              |
| ---------- | ---------------------- | ------------------------------------------------------------------------------------------ |
| `ts/*`     | `@typescript-eslint/*` | [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint) |
| `style/*`  | `@stylistic/*`         | [@stylistic/eslint-plugin](https://github.com/eslint-stylistic/eslint-stylistic)           |
| `import/*` | `import-lite/*`        | [eslint-plugin-import-lite](https://github.com/9romise/eslint-plugin-import-lite)          |
npm package: @lntvow/eslint-plugin
Description: Custom ESLint plugin with additional rules
Author: lntvow
Latest version: 10.1.5

<div>
<br>

```

  ███████╗███████╗██╗     ██╗███╗   ██╗████████╗      ██████╗ ██╗     ██╗   ██╗ ██████╗ ██╗███╗   ██╗
  ██╔════╝██╔════╝██║     ██║████╗  ██║╚══██╔══╝      ██╔══██╗██║     ██║   ██║██╔════╝ ██║████╗  ██║
  █████╗  ███████╗██║     ██║██╔██╗ ██║   ██║         ██████╔╝██║     ██║   ██║██║  ███╗██║██╔██╗ ██║
  ██╔══╝  ╚════██║██║     ██║██║╚██╗██║   ██║         ██╔═══╝ ██║     ██║   ██║██║   ██║██║██║╚██╗██║
  ███████╗███████║███████╗██║██║ ╚████║   ██║         ██║     ███████╗╚██████╔╝╚██████╔╝██║██║ ╚████║
  ╚══════╝╚══════╝╚══════╝╚═╝╚═╝  ╚═══╝   ╚═╝         ╚═╝     ╚══════╝ ╚═════╝  ╚═════╝ ╚═╝╚═╝  ╚═══╝

```

</div>

> Custom ESLint plugin with additional rules

[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/eslint-plugin.svg?logo=npm)](https://www.npmjs.com/package/@lntvow/eslint-plugin)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/eslint-plugin?logo=npm)](https://www.npmjs.com/package/@lntvow/eslint-plugin)
npm package: @lntvow/utils
Description: TypeScript utilities
Latest version: 5.1.3

<div>
<br>

```

  ██╗   ██╗████████╗██╗██╗     ███████╗
  ██║   ██║╚══██╔══╝██║██║     ██╔════╝
  ██║   ██║   ██║   ██║██║     ███████╗
  ██║   ██║   ██║   ██║██║     ╚════██║
  ╚██████╔╝   ██║   ██║███████╗███████║
   ╚═════╝    ╚═╝   ╚═╝╚══════╝╚══════╝

```

</div>

> TypeScript Utilities Collection

[![codecov](https://codecov.io/github/lntvow/utils/graph/badge.svg?token=HBPQRYRWB8)](https://codecov.io/github/lntvow/utils)
[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/utils.svg?logo=npm)](https://www.npmjs.com/package/@lntvow/utils)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/utils?logo=npm)](https://www.npmjs.com/package/@lntvow/utils)
npm package: @lntvow/vite-plugin
Description: Collection of custom vite plugins
Latest version: 1.3.2

<div>
<br>

```

  ██╗   ██╗██╗████████╗███████╗      ██████╗ ██╗     ██╗   ██╗ ██████╗ ██╗███╗   ██╗
  ██║   ██║██║╚══██╔══╝██╔════╝      ██╔══██╗██║     ██║   ██║██╔════╝ ██║████╗  ██║
  ██║   ██║██║   ██║   █████╗        ██████╔╝██║     ██║   ██║██║  ███╗██║██╔██╗ ██║
  ╚██╗ ██╔╝██║   ██║   ██╔══╝        ██╔═══╝ ██║     ██║   ██║██║   ██║██║██║╚██╗██║
   ╚████╔╝ ██║   ██║   ███████╗      ██║     ███████╗╚██████╔╝╚██████╔╝██║██║ ╚████║
    ╚═══╝  ╚═╝   ╚═╝   ╚══════╝      ╚═╝     ╚══════╝ ╚═════╝  ╚═════╝ ╚═╝╚═╝  ╚═══╝

```

</div>

> Collection of custom Vite plugins

[![TypeScript](https://img.shields.io/badge/TypeScript-Ready-brightgreen?logo=typescript)](https://www.typescriptlang.org/)
[![npm version](https://img.shields.io/npm/v/@lntvow/vite-plugin.svg?logo=npm)](https://www.npmjs.com/package/@lntvow/vite-plugin)
[![package size](https://img.shields.io/npm/unpacked-size/@lntvow/vite-plugin?logo=npm)](https://www.npmjs.com/package/@lntvow/vite-plugin)
npm package: @lnwu/normalize.css
Description: Li's specific normalize css
Author: lnwu
Latest version: 0.0.19

# normalize.css
[![CircleCI](https://circleci.com/gh/lnwu/normalize.css.svg?style=svg)](https://circleci.com/gh/lnwu/normalize.css)

My specific normalize css.

# Usage

yarn add @lnwu/normalize.css
npm package: @lnzyz/formula-edit
Description: react计算公式编辑器
Author: bo.liu@tongdun.cn
Latest version: 1.0.1

# @tntd/formula-edit

react计算公式编辑器

## Usage

### @tntd/formula-edit

安装

```sh
npm install --save-dev @tntd/formula-edit
```
使用

```
<FormulaEdit
    value='@hahahdsdhjbewdbu1#avg(,)andhhhhhhh' //传入组件自动转化成cnCode
    fieldList={testData} // @唤起
    regRxp="@[^\\+\\*\\/#%\\(\\),;\\!\\<\\>\\-=@]*" //中文转英文默认正则
    typeMap={{'OBJECT':{'displayName':'对象','color': 'blue'}}} // 下拉框 自定义展示类型和颜色
    methodList={methodList} // #唤起
    normalList={normalList} // 自定义无需校验关键词
    onChange={(enCode,data)=>{}} // 回调
    // defaultValue={defaultCode} // 初始化值 已去除该属性
    // readOnly={false} // 是否只读 默认false
    // lineNumber={true} // 是否显示列数 默认true
    // theme="night" // 主题 默认night
    // height={300} // 高度 默认300
/>
```

## fieldList 输入@符号才能调起
```
fieldList: [
    { name: "放款金额", value: "fkje"},
    { name: "实际放款金额", value: "sjfkje"},
    { name: "借款人姓名", value: "jkrxm"},
    { name: "借款人手机号", value: "jkrsjh"},
    { name: "借款人身份证", value: "jkrsfz"},
],
```
## methodList 输入#符号才能调起
```
methodList: [
    { name: "平均值", value: "平均值(,)", realValue: "avg" },
    { name: "最大值", value: "最大值(,)", realValue: "max" },
    { name: "最小值", value: "最小值(,)", realValue: "min" },
    { name: "求和", value: "求和(,)", realValue: "sum" }
],
```
## normalList 自定义无需校验关键词
```
normalList: [
    { name: "且", value: "and" },
    { name: "或", value: "or" }
],
```

## 编辑器效果
![Image text](https://github.com/bruceliu68/formulaEdit-react/blob/master/src/img/pic1.png)
![Image text](https://github.com/bruceliu68/formulaEdit-react/blob/master/src/img/pic2.png)

## props参数：
|    参数    | 类型    |  默认值   |  是否必填  | 说明         |
| :------:  | :-----: | :----:   | :------: | :----------: |
| defaultValue | string  |  无      |   非必填    | 初始化赋值  2.0已废弃   |
| value | string  |  无      |   非必填    | 赋值  传入组件自动转化成cnCode |
| height    | number  |  300     |   非必填  | 高度设置       |
| theme    | string  |  day     |   非必填  | 主题: 目前只支持两种：day，night |
| readOnly  | boolean |  false   |   非必填  | 设置只读       |
| lineNumber  | boolean |  false   |   非必填  | 设置行号       |
| typeMap | object   |  无      |   非必填  | 自定义变量类型和颜色       |
| isEndMark | boolean   |  false      |   非必填  | 是否需要@结束符       |
| fieldList | array   |  无      |   非必填  | 字段列表       |
| methodList | array   |  无      |   非必填  | 方法列表       |
| normalList | array   |  无      |   非必填  | 自定义关键词列表       |
| onChange  | function(enCode, obj)|  无      |   非必填    | enCode, obj(里面有cnCode)      |

## 支持ref对外暴露方法
|    方法    | 类型    | 说明         |
| :------:  | :-----: | :----------: |
| fullScreen() | function  | 全屏     |
| exitFullScreen() | function  | 退出全屏     |
| insertValue(value) | function  | 光标处插入值     |

## License
MIT