Fix compiler errors, tests, and scripts
This commit is contained in:
parent
e855bde3b3
commit
d684a6b2ef
60 changed files with 145 additions and 57 deletions
11
package.json
11
package.json
|
@ -2,7 +2,7 @@
|
|||
"name": "bitcoinjs-lib",
|
||||
"version": "4.0.2",
|
||||
"description": "Client-side Bitcoin JavaScript library",
|
||||
"main": "./src/index.js",
|
||||
"main": "./dist/src/index.js",
|
||||
"engines": {
|
||||
"node": ">=8.0.0"
|
||||
},
|
||||
|
@ -17,17 +17,18 @@
|
|||
"coverage-report": "nyc report --reporter=lcov",
|
||||
"coverage-html": "nyc report --reporter=html",
|
||||
"coverage": "nyc --check-coverage --branches 90 --functions 90 mocha",
|
||||
"integration": "mocha --timeout 50000 test/integration/",
|
||||
"integration": "npm run build && mocha --timeout 50000 test/integration/",
|
||||
"standard": "standard",
|
||||
"test": "npm run standard && npm run coverage",
|
||||
"unit": "mocha"
|
||||
"test": "npm run build && npm run standard && npm run coverage",
|
||||
"unit": "npm run build && mocha",
|
||||
"build": "tsc -p tsconfig.json"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/bitcoinjs/bitcoinjs-lib.git"
|
||||
},
|
||||
"files": [
|
||||
"src"
|
||||
"dist/src"
|
||||
],
|
||||
"dependencies": {
|
||||
"bech32": "^1.1.2",
|
||||
|
|
|
@ -95,3 +95,4 @@ module.exports = {
|
|||
toBech32: toBech32,
|
||||
toOutputScript: toOutputScript
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -175,3 +175,4 @@ Block.prototype.checkProofOfWork = function () {
|
|||
}
|
||||
|
||||
module.exports = Block
|
||||
export {}
|
||||
|
|
|
@ -27,3 +27,4 @@ module.exports = {
|
|||
readUInt64LE: readUInt64LE,
|
||||
writeUInt64LE: writeUInt64LE
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -68,3 +68,4 @@ module.exports = {
|
|||
witness: classifyWitness,
|
||||
types: types
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -27,3 +27,4 @@ module.exports = {
|
|||
sha1: sha1,
|
||||
sha256: sha256
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -104,3 +104,4 @@ module.exports = {
|
|||
fromPublicKey,
|
||||
fromWIF
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -14,3 +14,4 @@ module.exports = {
|
|||
payments: require('./payments'),
|
||||
script: script
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -36,3 +36,4 @@ module.exports = {
|
|||
wif: 0xef
|
||||
}
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -28,7 +28,10 @@ function p2data (a, opts) {
|
|||
}, a)
|
||||
|
||||
const network = a.network || BITCOIN_NETWORK
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
data: undefined
|
||||
}
|
||||
|
||||
lazy.prop(o, 'output', function () {
|
||||
if (!a.data) return
|
||||
|
@ -54,3 +57,4 @@ function p2data (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2data
|
||||
export {}
|
||||
|
|
|
@ -10,3 +10,4 @@ module.exports = { embed, p2ms, p2pk, p2pkh, p2sh, p2wpkh, p2wsh }
|
|||
|
||||
// TODO
|
||||
// witness commitment
|
||||
export {}
|
||||
|
|
|
@ -28,3 +28,4 @@ function value (f) {
|
|||
}
|
||||
|
||||
module.exports = { prop, value }
|
||||
export {}
|
||||
|
|
|
@ -42,7 +42,15 @@ function p2ms (a, opts) {
|
|||
}, a)
|
||||
|
||||
const network = a.network || BITCOIN_NETWORK
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
m: undefined,
|
||||
n: undefined,
|
||||
pubkeys: undefined,
|
||||
output: undefined,
|
||||
input: undefined,
|
||||
signatures: undefined,
|
||||
}
|
||||
|
||||
let chunks
|
||||
let decoded = false
|
||||
|
@ -129,7 +137,7 @@ function p2ms (a, opts) {
|
|||
if (a.input[0] !== OPS.OP_0) throw new TypeError('Input is invalid')
|
||||
if (o.signatures.length === 0 || !o.signatures.every(isAcceptableSignature)) throw new TypeError('Input has invalid signature(s)')
|
||||
|
||||
if (a.signatures && !stacksEqual(a.signatures.equals(o.signatures))) throw new TypeError('Signature mismatch')
|
||||
if (a.signatures && !stacksEqual(a.signatures.equals(o.signatures), undefined)) throw new TypeError('Signature mismatch')
|
||||
if (a.m !== undefined && a.m !== a.signatures.length) throw new TypeError('Signature count mismatch')
|
||||
}
|
||||
}
|
||||
|
@ -138,3 +146,4 @@ function p2ms (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2ms
|
||||
export {}
|
||||
|
|
|
@ -30,7 +30,12 @@ function p2pk (a, opts) {
|
|||
const _chunks = lazy.value(function () { return bscript.decompile(a.input) })
|
||||
|
||||
const network = a.network || BITCOIN_NETWORK
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
input: undefined,
|
||||
pubkey: undefined,
|
||||
signature: undefined,
|
||||
}
|
||||
|
||||
lazy.prop(o, 'output', function () {
|
||||
if (!a.pubkey) return
|
||||
|
@ -78,3 +83,4 @@ function p2pk (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2pk
|
||||
export {}
|
||||
|
|
|
@ -40,7 +40,12 @@ function p2pkh (a, opts) {
|
|||
const _chunks = lazy.value(function () { return bscript.decompile(a.input) })
|
||||
|
||||
const network = a.network || BITCOIN_NETWORK
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
hash: undefined,
|
||||
pubkey: undefined,
|
||||
input: undefined,
|
||||
}
|
||||
|
||||
lazy.prop(o, 'address', function () {
|
||||
if (!o.hash) return
|
||||
|
@ -135,3 +140,4 @@ function p2pkh (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2pkh
|
||||
export {}
|
||||
|
|
|
@ -50,7 +50,12 @@ function p2sh (a, opts) {
|
|||
network = (a.redeem && a.redeem.network) || BITCOIN_NETWORK
|
||||
}
|
||||
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
hash: undefined,
|
||||
redeem: undefined,
|
||||
input: undefined,
|
||||
}
|
||||
|
||||
const _address = lazy.value(function () {
|
||||
const payload = bs58check.decode(a.address)
|
||||
|
@ -191,3 +196,4 @@ function p2sh (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2sh
|
||||
export {}
|
||||
|
|
|
@ -46,7 +46,12 @@ function p2wpkh (a, opts) {
|
|||
})
|
||||
|
||||
const network = a.network || BITCOIN_NETWORK
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
hash: undefined,
|
||||
pubkey: undefined,
|
||||
witness: undefined,
|
||||
}
|
||||
|
||||
lazy.prop(o, 'address', function () {
|
||||
if (!o.hash) return
|
||||
|
@ -133,3 +138,4 @@ function p2wpkh (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2wpkh
|
||||
export {}
|
||||
|
|
|
@ -64,7 +64,12 @@ function p2wsh (a, opts) {
|
|||
network = (a.redeem && a.redeem.network) || BITCOIN_NETWORK
|
||||
}
|
||||
|
||||
const o = { network }
|
||||
const o = {
|
||||
network,
|
||||
hash: undefined,
|
||||
redeem: undefined,
|
||||
witness: undefined,
|
||||
}
|
||||
|
||||
lazy.prop(o, 'address', function () {
|
||||
if (!o.hash) return
|
||||
|
@ -178,3 +183,4 @@ function p2wsh (a, opts) {
|
|||
}
|
||||
|
||||
module.exports = p2wsh
|
||||
export {}
|
||||
|
|
|
@ -203,3 +203,4 @@ module.exports = {
|
|||
isPushOnly: isPushOnly,
|
||||
isDefinedHashType: isDefinedHashType
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -65,3 +65,4 @@ module.exports = {
|
|||
decode: decode,
|
||||
encode: encode
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -62,3 +62,4 @@ module.exports = {
|
|||
decode: decode,
|
||||
encode: encode
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -21,3 +21,4 @@ function check (script, allowIncomplete) {
|
|||
check.toJSON = function () { return 'multisig input' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -27,3 +27,4 @@ function check (script, allowIncomplete) {
|
|||
check.toJSON = function () { return 'multi-sig output' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -12,3 +12,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'null data output' }
|
||||
|
||||
module.exports = { output: { check: check } }
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -13,3 +13,4 @@ check.toJSON = function () { return 'pubKey input' }
|
|||
module.exports = {
|
||||
check: check
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -13,3 +13,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'pubKey output' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -12,3 +12,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'pubKeyHash input' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -16,3 +16,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'pubKeyHash output' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -46,3 +46,4 @@ function check (script, allowIncomplete) {
|
|||
check.toJSON = function () { return 'scriptHash input' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -14,3 +14,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'scriptHash output' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
module.exports = {
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -40,3 +40,4 @@ module.exports = {
|
|||
decode: decode,
|
||||
encode: encode
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -16,3 +16,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'witnessPubKeyHash input' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -15,3 +15,4 @@ check.toJSON = function () { return 'Witness pubKeyHash output' }
|
|||
module.exports = {
|
||||
check
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -2,3 +2,4 @@ module.exports = {
|
|||
input: require('./input'),
|
||||
output: require('./output')
|
||||
}
|
||||
export {}
|
||||
|
|
|
@ -37,3 +37,4 @@ function check (chunks, allowIncomplete) {
|
|||
check.toJSON = function () { return 'witnessScriptHash input' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -13,3 +13,4 @@ function check (script) {
|
|||
check.toJSON = function () { return 'Witness scriptHash output' }
|
||||
|
||||
module.exports = { check }
|
||||
export {}
|
||||
|
|
|
@ -138,7 +138,7 @@ Transaction.fromBuffer = function (buffer, __noStrict) {
|
|||
}
|
||||
|
||||
Transaction.fromHex = function (hex) {
|
||||
return Transaction.fromBuffer(Buffer.from(hex, 'hex'))
|
||||
return Transaction.fromBuffer(Buffer.from(hex, 'hex'), undefined)
|
||||
}
|
||||
|
||||
Transaction.isCoinbaseHash = function (buffer) {
|
||||
|
@ -490,3 +490,4 @@ Transaction.prototype.setWitness = function (index, witness) {
|
|||
}
|
||||
|
||||
module.exports = Transaction
|
||||
export {}
|
||||
|
|
|
@ -102,7 +102,7 @@ function expandInput (scriptSig, witnessStack, type, scriptPubKey) {
|
|||
const outputType = classify.output(redeem.output)
|
||||
let expanded
|
||||
if (outputType === SCRIPT_TYPES.P2WPKH) {
|
||||
expanded = expandInput(redeem.input, redeem.witness, outputType)
|
||||
expanded = expandInput(redeem.input, redeem.witness, outputType, undefined)
|
||||
} else {
|
||||
expanded = expandInput(bscript.compile(redeem.witness), [], outputType, redeem.output)
|
||||
}
|
||||
|
@ -473,7 +473,7 @@ TransactionBuilder.prototype.setVersion = function (version) {
|
|||
}
|
||||
|
||||
TransactionBuilder.fromTransaction = function (transaction, network) {
|
||||
const txb = new TransactionBuilder(network)
|
||||
const txb = new TransactionBuilder(network, undefined)
|
||||
|
||||
// Copy transaction fields
|
||||
txb.setVersion(transaction.version)
|
||||
|
@ -537,11 +537,17 @@ TransactionBuilder.prototype.__addInputUnsafe = function (txHash, vout, options)
|
|||
const prevTxOut = txHash.toString('hex') + ':' + vout
|
||||
if (this.__prevTxSet[prevTxOut] !== undefined) throw new Error('Duplicate TxOut: ' + prevTxOut)
|
||||
|
||||
let input = {}
|
||||
let input = {
|
||||
value: undefined,
|
||||
prevOutScript: undefined,
|
||||
pubkeys: undefined,
|
||||
signatures: undefined,
|
||||
prevOutType: undefined,
|
||||
}
|
||||
|
||||
// derive what we can from the scriptSig
|
||||
if (options.script !== undefined) {
|
||||
input = expandInput(options.script, options.witness || [])
|
||||
input = expandInput(options.script, options.witness || [], undefined, undefined)
|
||||
}
|
||||
|
||||
// if an input value was given, retain it
|
||||
|
@ -554,7 +560,7 @@ TransactionBuilder.prototype.__addInputUnsafe = function (txHash, vout, options)
|
|||
let prevOutType
|
||||
|
||||
if (!input.pubkeys && !input.signatures) {
|
||||
const expanded = expandOutput(options.prevOutScript)
|
||||
const expanded = expandOutput(options.prevOutScript, undefined)
|
||||
if (expanded.pubkeys) {
|
||||
input.pubkeys = expanded.pubkeys
|
||||
input.signatures = expanded.signatures
|
||||
|
@ -705,10 +711,10 @@ function signatureHashType (buffer) {
|
|||
}
|
||||
|
||||
TransactionBuilder.prototype.__canModifyInputs = function () {
|
||||
return this.__inputs.every(function (input) {
|
||||
return (this.__inputs || []).every(function (input) {
|
||||
if (!input.signatures) return true
|
||||
|
||||
return input.signatures.every(function (signature) {
|
||||
return (input.signatures || []).every(function (signature) {
|
||||
if (!signature) return true
|
||||
const hashType = signatureHashType(signature)
|
||||
|
||||
|
@ -775,3 +781,4 @@ TransactionBuilder.prototype.__overMaximumFees = function (bytes) {
|
|||
}
|
||||
|
||||
module.exports = TransactionBuilder
|
||||
export {}
|
||||
|
|
|
@ -47,3 +47,4 @@ for (var typeName in typeforce) {
|
|||
}
|
||||
|
||||
module.exports = types
|
||||
export {}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const baddress = require('../src/address')
|
||||
const bscript = require('../src/script')
|
||||
const baddress = require('../dist/src/address')
|
||||
const bscript = require('../dist/src/script')
|
||||
const fixtures = require('./fixtures/address.json')
|
||||
const NETWORKS = Object.assign({
|
||||
litecoin: {
|
||||
|
@ -14,7 +14,7 @@ const NETWORKS = Object.assign({
|
|||
scriptHash: 0x32,
|
||||
wif: 0xb0
|
||||
}
|
||||
}, require('../src/networks'))
|
||||
}, require('../dist/src/networks'))
|
||||
|
||||
describe('address', function () {
|
||||
describe('fromBase58Check', function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it, beforeEach } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const Block = require('../src/block')
|
||||
const Block = require('../dist/src/block')
|
||||
|
||||
const fixtures = require('./fixtures/block')
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bufferutils = require('../src/bufferutils')
|
||||
const bufferutils = require('../dist/src/bufferutils')
|
||||
|
||||
const fixtures = require('./fixtures/bufferutils.json')
|
||||
|
||||
|
|
|
@ -1,18 +1,18 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bscript = require('../src/script')
|
||||
const classify = require('../src/classify')
|
||||
const bscript = require('../dist/src/script')
|
||||
const classify = require('../dist/src/classify')
|
||||
|
||||
const fixtures = require('./fixtures/templates.json')
|
||||
|
||||
const multisig = require('../src/templates/multisig')
|
||||
const nullData = require('../src/templates/nulldata')
|
||||
const pubKey = require('../src/templates/pubkey')
|
||||
const pubKeyHash = require('../src/templates/pubkeyhash')
|
||||
const scriptHash = require('../src/templates/scripthash')
|
||||
const witnessPubKeyHash = require('../src/templates/witnesspubkeyhash')
|
||||
const witnessScriptHash = require('../src/templates/witnessscripthash')
|
||||
const witnessCommitment = require('../src/templates/witnesscommitment')
|
||||
const multisig = require('../dist/src/templates/multisig')
|
||||
const nullData = require('../dist/src/templates/nulldata')
|
||||
const pubKey = require('../dist/src/templates/pubkey')
|
||||
const pubKeyHash = require('../dist/src/templates/pubkeyhash')
|
||||
const scriptHash = require('../dist/src/templates/scripthash')
|
||||
const witnessPubKeyHash = require('../dist/src/templates/witnesspubkeyhash')
|
||||
const witnessScriptHash = require('../dist/src/templates/witnessscripthash')
|
||||
const witnessCommitment = require('../dist/src/templates/witnesscommitment')
|
||||
|
||||
const tmap = {
|
||||
pubKey,
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bcrypto = require('../src/crypto')
|
||||
const bcrypto = require('../dist/src/crypto')
|
||||
|
||||
const fixtures = require('./fixtures/crypto')
|
||||
|
||||
|
|
|
@ -5,12 +5,12 @@ const assert = require('assert')
|
|||
const proxyquire = require('proxyquire')
|
||||
const hoodwink = require('hoodwink')
|
||||
|
||||
const ECPair = require('../src/ecpair')
|
||||
const ECPair = require('../dist/src/ecpair')
|
||||
const tinysecp = require('tiny-secp256k1')
|
||||
|
||||
const fixtures = require('./fixtures/ecpair.json')
|
||||
|
||||
const NETWORKS = require('../src/networks')
|
||||
const NETWORKS = require('../dist/src/networks')
|
||||
const NETWORKS_LIST = [] // Object.values(NETWORKS)
|
||||
for (let networkName in NETWORKS) {
|
||||
NETWORKS_LIST.push(NETWORKS[networkName])
|
||||
|
@ -144,7 +144,7 @@ describe('ECPair', function () {
|
|||
describe('uses randombytes RNG', function () {
|
||||
it('generates a ECPair', function () {
|
||||
const stub = { randombytes: function () { return d } }
|
||||
const ProxiedECPair = proxyquire('../src/ecpair', stub)
|
||||
const ProxiedECPair = proxyquire('../dist/src/ecpair', stub)
|
||||
|
||||
const keyPair = ProxiedECPair.makeRandom()
|
||||
assert.strictEqual(keyPair.toWIF(), exWIF)
|
||||
|
|
|
@ -4,7 +4,7 @@ const u = require('./payments.utils')
|
|||
|
||||
;['embed', 'p2ms', 'p2pk', 'p2pkh', 'p2sh', 'p2wpkh', 'p2wsh'].forEach(function (p) {
|
||||
describe(p, function () {
|
||||
const fn = require('../src/payments/' + p)
|
||||
const fn = require('../dist/src/payments/' + p)
|
||||
const fixtures = require('./fixtures/' + p)
|
||||
|
||||
fixtures.valid.forEach(function (f, i) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const t = require('assert')
|
||||
const bscript = require('../src/script')
|
||||
const BNETWORKS = require('../src/networks')
|
||||
const bscript = require('../dist/src/script')
|
||||
const BNETWORKS = require('../dist/src/networks')
|
||||
|
||||
function tryHex (x) {
|
||||
if (Buffer.isBuffer(x)) return x.toString('hex')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bscript = require('../src/script')
|
||||
const bscript = require('../dist/src/script')
|
||||
const minimalData = require('minimaldata')
|
||||
|
||||
const fixtures = require('./fixtures/script.json')
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const scriptNumber = require('../src/script_number')
|
||||
const scriptNumber = require('../dist/src/script_number')
|
||||
const fixtures = require('./fixtures/script_number.json')
|
||||
|
||||
describe('script-number', function () {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bscriptSig = require('../src/script').signature
|
||||
const bscriptSig = require('../dist/src/script').signature
|
||||
const Buffer = require('safe-buffer').Buffer
|
||||
const fixtures = require('./fixtures/signature.json')
|
||||
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const { describe, it, beforeEach } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const bscript = require('../src/script')
|
||||
const bscript = require('../dist/src/script')
|
||||
const fixtures = require('./fixtures/transaction')
|
||||
const Transaction = require('../src/transaction')
|
||||
const Transaction = require('../dist/src/transaction')
|
||||
|
||||
describe('Transaction', function () {
|
||||
function fromRaw (raw, noWitness) {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
const { describe, it, beforeEach } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const baddress = require('../src/address')
|
||||
const bscript = require('../src/script')
|
||||
const payments = require('../src/payments')
|
||||
const baddress = require('../dist/src/address')
|
||||
const bscript = require('../dist/src/script')
|
||||
const payments = require('../dist/src/payments')
|
||||
|
||||
const ECPair = require('../src/ecpair')
|
||||
const Transaction = require('../src/transaction')
|
||||
const TransactionBuilder = require('../src/transaction_builder')
|
||||
const NETWORKS = require('../src/networks')
|
||||
const ECPair = require('../dist/src/ecpair')
|
||||
const Transaction = require('../dist/src/transaction')
|
||||
const TransactionBuilder = require('../dist/src/transaction_builder')
|
||||
const NETWORKS = require('../dist/src/networks')
|
||||
|
||||
const fixtures = require('./fixtures/transaction_builder')
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
const { describe, it } = require('mocha')
|
||||
const assert = require('assert')
|
||||
const types = require('../src/types')
|
||||
const types = require('../dist/src/types')
|
||||
const typeforce = require('typeforce')
|
||||
|
||||
describe('types', function () {
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
"src/**/*"
|
||||
],
|
||||
"exclude": [
|
||||
"**/*.spec.ts"
|
||||
"**/*.spec.ts",
|
||||
"node_modules/**/*"
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue