Skip to content

Instantly share code, notes, and snippets.

@dionyziz
Created May 1, 2019 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dionyziz/36f4428904b4684c03b672f35cd72b21 to your computer and use it in GitHub Desktop.
Save dionyziz/36f4428904b4684c03b672f35cd72b21 to your computer and use it in GitHub Desktop.
const chai = require('chai')
const chaiAsPromised = require('chai-as-promised')
async judge() {
expect(tx.isSane(), 'TX not sane')
.to.be.true
expect(tx.inputs.length, 'TX doesn\'t have 1 input')
.to.equal(1)
expect(tx.outputs[0].value, `TX doesn't pay ${SATOSHI_VALUE / SATOSHIS_IN_BTC} BTC`)
.to.equal(SATOSHI_VALUE)
expect(tx.outputs[0].getType(), 'Output is not p2pk')
.to.equal(PUBKEY)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment