This package has been deprecated

Author message:

This module is abandoned, do not use

tif

0.1.5 • Public • Published

TIF

TRAVIS NPM

js-standard-style

Bitcoin Transaction Interchange Format (TIF) decoding/encoding module.

Format

tx?[version=<int>][&locktime=<uint>][&anyonecanpay=1]
in?txId=<txid>&vout=<uint>[&script=<hex>][&sequence=<uint>][&prevtx=<hex>]
in?txId=<txid>&vout=<uint>&witness=<hex>&value=<satoshis>[&script=<hex>][&sequence=<uint>]
out?address=<address>[&value=<satoshis>]
out?script=<hex>[&value=<satoshis>]

Example

let tif = require('tif')
 
tif.encode({
  tx: {
    version: 2
  },
  outs: [
    {
      address: '1BgGZ9tcN4rm9KBzDn7KprQz87SZ26SAMH',
      value: 100000
    },
    {
      address: '1cMh228HTCiwS8ZsaakH8A8wze1JR5ZsP',
      value: 100000
    }
  ]
})

LICENSE MIT

Package Sidebar

Install

npm i tif

Weekly Downloads

2

Version

0.1.5

License

MIT

Unpacked Size

17.8 kB

Total Files

7

Last publish

Collaborators

  • junderw