# ecash-minimaldata

> A module to check ecash policy: SCRIPT_VERIFY_MINIMALDATA

Latest version **1.0.4** (published 2022-12-13) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install ecash-minimaldata
pnpm add ecash-minimaldata
yarn add ecash-minimaldata
bun add ecash-minimaldata
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-12-13 |
| First published | 2022-12-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1304 |
| Author | Daniel Cousens |
| Maintainers | bytesofman |
| Keywords | minimal, push, BIP62, OP_0, OP_1, OP_PUSHDATA1, OP_PUSHDATA2, OP_PUSHDATA4, malleability, minimaldata, ecashjs-lib, ecash |

## Links

- npm: https://www.npmjs.com/package/ecash-minimaldata
- Repository: https://github.com/Bitcoin-ABC/bitcoin-abc
- Homepage: https://github.com/Bitcoin-ABC/bitcoin-abc/
- Issues: https://github.com/Bitcoin-ABC/bitcoin-abc/issues
- npm.io page: https://npm.io/package/ecash-minimaldata

## Dependencies (2)

- [ecash-ops](https://npm.io/package/ecash-ops.md) ^1.0.2
- [pushdata-ecash](https://npm.io/package/pushdata-ecash.md) ^1.0.1

## Recent versions

- 1.0.4 (latest) — 2022-12-13
- 1.0.3 — 2022-12-13
- 1.0.2 — 2022-12-12
- 1.0.1 — 2022-12-12

## README

# ecash-minimaldata

[![NPM Package](https://img.shields.io/npm/v/minimaldata.svg?style=flat-square)](https://www.npmjs.org/package/ecash-minimaldata)

Following BIP62.3, this module validates that a script uses only minimal data pushes.

## Example

```javascript
var minimaldata = require('ecash-minimaldata');

// OP_PUSHDATA4, 1 byte
var script = new Buffer('4e0100000000', 'hex');
console.log(minimaldata(script));
// => false

script = new Buffer('0101', 'hex');
console.log(minimaldata(script));
// => true
```

## LICENSE [MIT](LICENSE)

---
_Source: https://npm.io/package/ecash-minimaldata · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
