screw-amaury

1.0.2 • Public • Published

screw-amaury

Mitigations for Amaury minimal-encoding issues

The code is hosted on GitHub and the package is available through NPM.

Installation

npm i screw-amaury

Example Usage

const screw = require('screw-amaury')

// Convert stack elements to minimal encoding
const unscrewed1 = screw(Buffer.from('00'))
const unscrewed2 = screw(Buffer.from('01'))
const unscrewed3 = screw(Buffer.from('0f'))
const screwedBCH = screw(Buffer.from('deadbeef20181115'))

API

Table of Contents

index

Given a Buffer as an input, returns a minimally-encoded version as a hex string, plus any pushdata that may be required.

Parameters

  • buf NodeJS Buffer containing an intended Bitcoin script stack element

Returns String Minimally-encoded version, plus the correct opcodes required to push it with minimal encoding, if any, in hex string format.

License

The license for the code in this repository is the Open BSV License.

Package Sidebar

Install

npm i screw-amaury

Weekly Downloads

1

Version

1.0.2

License

Open BSV License

Unpacked Size

3.85 kB

Total Files

3

Last publish

Collaborators

  • tonesnotes
  • braydude
  • tyeverett