diff --git a/browser/proxysocket.js b/browser/proxysocket.js index 49df25127..c10034792 100644 --- a/browser/proxysocket.js +++ b/browser/proxysocket.js @@ -10,7 +10,7 @@ const assert = require('assert'); const EventEmitter = require('events'); const bsock = require('bsock'); const hash256 = require('bcrypto/lib/hash256'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferWriter = require('bufio/lib/writer'); function ProxySocket(uri) { if (!(this instanceof ProxySocket)) diff --git a/browser/wsproxy.js b/browser/wsproxy.js index 0d26e94aa..59122a291 100644 --- a/browser/wsproxy.js +++ b/browser/wsproxy.js @@ -6,7 +6,7 @@ const EventEmitter = require('events'); const bsock = require('bsock'); const hash256 = require('bcrypto/lib/hash256'); const IP = require('binet'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferWriter = require('bufio/lib/writer'); const TARGET = Buffer.from( '0000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff', diff --git a/lib/blockchain/chain.js b/lib/blockchain/chain.js index 223efad4d..21c524f50 100644 --- a/lib/blockchain/chain.js +++ b/lib/blockchain/chain.js @@ -12,7 +12,7 @@ const path = require('path'); const AsyncEmitter = require('bevent'); const Logger = require('blgr'); const {Lock} = require('bmutex'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Network = require('../protocol/network'); const ChainDB = require('./chaindb'); const common = require('./common'); diff --git a/lib/blockchain/chaindb.js b/lib/blockchain/chaindb.js index 1ff6840ce..b1ca9fbf1 100644 --- a/lib/blockchain/chaindb.js +++ b/lib/blockchain/chaindb.js @@ -9,10 +9,10 @@ const assert = require('assert'); const BDB = require('bdb'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Amount = require('../btc/amount'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Network = require('../protocol/network'); const CoinView = require('../coins/coinview'); const UndoCoins = require('../coins/undocoins'); diff --git a/lib/blockchain/chainentry.js b/lib/blockchain/chainentry.js index 8360471be..7c4105853 100644 --- a/lib/blockchain/chainentry.js +++ b/lib/blockchain/chainentry.js @@ -11,9 +11,9 @@ const assert = require('assert'); const BN = require('bcrypto/lib/bn'); const consensus = require('../protocol/consensus'); const hash256 = require('bcrypto/lib/hash256'); -const encoding = require('bbuf/lib/encoding'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Headers = require('../primitives/headers'); const InvItem = require('../primitives/invitem'); const ZERO = new BN(0); diff --git a/lib/coins/coinentry.js b/lib/coins/coinentry.js index 0f1220506..3d74e32b7 100644 --- a/lib/coins/coinentry.js +++ b/lib/coins/coinentry.js @@ -9,9 +9,9 @@ const assert = require('assert'); const Coin = require('../primitives/coin'); const Output = require('../primitives/output'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const compress = require('./compress'); /* diff --git a/lib/coins/compress.js b/lib/coins/compress.js index eba9b4094..fb6d900df 100644 --- a/lib/coins/compress.js +++ b/lib/coins/compress.js @@ -13,7 +13,7 @@ const assert = require('assert'); const secp256k1 = require('bcrypto/lib/secp256k1'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const consensus = require('../protocol/consensus'); /* diff --git a/lib/coins/undocoins.js b/lib/coins/undocoins.js index 2d8d7657e..8b862ee53 100644 --- a/lib/coins/undocoins.js +++ b/lib/coins/undocoins.js @@ -7,8 +7,8 @@ 'use strict'; const assert = require('assert'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const CoinEntry = require('../coins/coinentry'); /** diff --git a/lib/hd/mnemonic.js b/lib/hd/mnemonic.js index 9d3aafacd..bb708cfb2 100644 --- a/lib/hd/mnemonic.js +++ b/lib/hd/mnemonic.js @@ -12,9 +12,9 @@ const cleanse = require('bcrypto/lib/cleanse'); const random = require('bcrypto/lib/random'); const pbkdf2 = require('bcrypto/lib/pbkdf2'); const sha512 = require('bcrypto/lib/sha512'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); const wordlist = require('./wordlist'); const common = require('./common'); const nfkd = require('./nfkd'); diff --git a/lib/hd/private.js b/lib/hd/private.js index c48fe96ce..3c6961da2 100644 --- a/lib/hd/private.js +++ b/lib/hd/private.js @@ -13,10 +13,10 @@ const hash256 = require('bcrypto/lib/hash256'); const cleanse = require('bcrypto/lib/cleanse'); const random = require('bcrypto/lib/random'); const secp256k1 = require('bcrypto/lib/secp256k1'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); -const base58 = require('bstr/lib/base58'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); +const base58 = require('bstring/lib/base58'); const Network = require('../protocol/network'); const common = require('./common'); const Mnemonic = require('./mnemonic'); diff --git a/lib/hd/public.js b/lib/hd/public.js index d49992a7c..491f5db6b 100644 --- a/lib/hd/public.js +++ b/lib/hd/public.js @@ -13,10 +13,10 @@ const hash256 = require('bcrypto/lib/hash256'); const cleanse = require('bcrypto/lib/cleanse'); const secp256k1 = require('bcrypto/lib/secp256k1'); const Network = require('../protocol/network'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const base58 = require('bstr/lib/base58'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const base58 = require('bstring/lib/base58'); +const encoding = require('bufio/lib/encoding'); const common = require('./common'); /** diff --git a/lib/mempool/fees.js b/lib/mempool/fees.js index c7f2c6abd..10b2b3f71 100644 --- a/lib/mempool/fees.js +++ b/lib/mempool/fees.js @@ -12,9 +12,9 @@ const assert = require('assert'); const binary = require('../utils/binary'); const consensus = require('../protocol/consensus'); const policy = require('../protocol/policy'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const Logger = require('blgr'); /* diff --git a/lib/mempool/mempool.js b/lib/mempool/mempool.js index ecd6e091b..36a3bb25e 100644 --- a/lib/mempool/mempool.js +++ b/lib/mempool/mempool.js @@ -25,7 +25,7 @@ const Coin = require('../primitives/coin'); const TXMeta = require('../primitives/txmeta'); const MempoolEntry = require('./mempoolentry'); const Network = require('../protocol/network'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const layout = require('./layout'); const Fees = require('./fees'); const CoinView = require('../coins/coinview'); diff --git a/lib/mempool/mempoolentry.js b/lib/mempool/mempoolentry.js index 213c20a7b..242dfdaed 100644 --- a/lib/mempool/mempoolentry.js +++ b/lib/mempool/mempoolentry.js @@ -9,8 +9,8 @@ const policy = require('../protocol/policy'); const util = require('../utils/util'); const Script = require('../script/script'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const TX = require('../primitives/tx'); /** diff --git a/lib/mining/cpuminer.js b/lib/mining/cpuminer.js index a44c8c3d3..b6ee85992 100644 --- a/lib/mining/cpuminer.js +++ b/lib/mining/cpuminer.js @@ -10,7 +10,7 @@ const assert = require('assert'); const EventEmitter = require('events'); const {Lock} = require('bmutex'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const util = require('../utils/util'); const mine = require('./mine'); diff --git a/lib/mining/template.js b/lib/mining/template.js index 5dd585a37..5eb1dcfdf 100644 --- a/lib/mining/template.js +++ b/lib/mining/template.js @@ -10,7 +10,7 @@ const assert = require('assert'); const hash256 = require('bcrypto/lib/hash256'); const merkle = require('bcrypto/lib/merkle'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const StaticWriter = require('bufio/lib/staticwriter'); const Address = require('../primitives/address'); const TX = require('../primitives/tx'); const Block = require('../primitives/block'); @@ -18,7 +18,7 @@ const Input = require('../primitives/input'); const Output = require('../primitives/output'); const consensus = require('../protocol/consensus'); const policy = require('../protocol/policy'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const CoinView = require('../coins/coinview'); const Script = require('../script/script'); const common = require('./common'); diff --git a/lib/net/bip150.js b/lib/net/bip150.js index ba3207cb0..addc859ae 100644 --- a/lib/net/bip150.js +++ b/lib/net/bip150.js @@ -20,9 +20,9 @@ const hash160 = require('bcrypto/lib/hash160'); const hash256 = require('bcrypto/lib/hash256'); const random = require('bcrypto/lib/random'); const secp256k1 = require('bcrypto/lib/secp256k1'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); -const base58 = require('bstr/lib/base58'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); +const base58 = require('bstring/lib/base58'); const packets = require('./packets'); /** diff --git a/lib/net/bip151.js b/lib/net/bip151.js index 2439c7e84..a4ab932a3 100644 --- a/lib/net/bip151.js +++ b/lib/net/bip151.js @@ -24,9 +24,9 @@ const AEAD = require('bcrypto/lib/aead'); const hkdf = require('bcrypto/lib/hkdf'); const secp256k1 = require('bcrypto/lib/secp256k1'); const packets = require('./packets'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); const EncinitPacket = packets.EncinitPacket; const EncackPacket = packets.EncackPacket; diff --git a/lib/net/bip152.js b/lib/net/bip152.js index 8dcb6573c..79088f2dc 100644 --- a/lib/net/bip152.js +++ b/lib/net/bip152.js @@ -11,9 +11,9 @@ */ const assert = require('assert'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const consensus = require('../protocol/consensus'); const sha256 = require('bcrypto/lib/sha256'); const siphash256 = require('bcrypto/lib/siphash').siphash256; diff --git a/lib/net/packets.js b/lib/net/packets.js index 0f2d5b88b..4577f1fb0 100644 --- a/lib/net/packets.js +++ b/lib/net/packets.js @@ -22,9 +22,9 @@ const InvItem = require('../primitives/invitem'); const MemBlock = require('../primitives/memblock'); const MerkleBlock = require('../primitives/merkleblock'); const TX = require('../primitives/tx'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const DUMMY = Buffer.alloc(0); /** diff --git a/lib/net/peer.js b/lib/net/peer.js index 60eb0770e..552bac48b 100644 --- a/lib/net/peer.js +++ b/lib/net/peer.js @@ -13,7 +13,7 @@ const {Lock} = require('bmutex'); const {format} = require('util'); const tcp = require('btcp'); const Logger = require('blgr'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const RollingFilter = require('bfilter/lib/rolling'); const Parser = require('./parser'); const Framer = require('./framer'); diff --git a/lib/net/pool.js b/lib/net/pool.js index 8315404a5..2c86835d5 100644 --- a/lib/net/pool.js +++ b/lib/net/pool.js @@ -18,7 +18,7 @@ const socks = require('bsocks'); const BloomFilter = require('bfilter/lib/bloom'); const RollingFilter = require('bfilter/lib/rolling'); const secp256k1 = require('bcrypto/lib/secp256k1'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const util = require('../utils/util'); const common = require('./common'); const chainCommon = require('../blockchain/common'); diff --git a/lib/node/http.js b/lib/node/http.js index f4b191951..7530e315a 100644 --- a/lib/node/http.js +++ b/lib/node/http.js @@ -13,8 +13,8 @@ const {Server} = require('bweb'); const sha256 = require('bcrypto/lib/sha256'); const random = require('bcrypto/lib/random'); const ccmp = require('bcrypto/lib/ccmp'); -const encoding = require('bbuf/lib/encoding'); -const base58 = require('bstr/lib/base58'); +const encoding = require('bufio/lib/encoding'); +const base58 = require('bstring/lib/base58'); const BloomFilter = require('bfilter/lib/bloom'); const Validator = require('bval/lib/validator'); const util = require('../utils/util'); diff --git a/lib/node/rpc.js b/lib/node/rpc.js index 0aecc18c3..c96e1d86d 100644 --- a/lib/node/rpc.js +++ b/lib/node/rpc.js @@ -14,7 +14,7 @@ const hash160 = require('bcrypto/lib/hash160'); const hash256 = require('bcrypto/lib/hash256'); const ccmp = require('bcrypto/lib/ccmp'); const secp256k1 = require('bcrypto/lib/secp256k1'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Validator = require('bval/lib/validator'); const util = require('../utils/util'); const common = require('../blockchain/common'); diff --git a/lib/primitives/abstractblock.js b/lib/primitives/abstractblock.js index 6421ab037..d9a543bfe 100644 --- a/lib/primitives/abstractblock.js +++ b/lib/primitives/abstractblock.js @@ -9,10 +9,10 @@ const assert = require('assert'); const hash256 = require('bcrypto/lib/hash256'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const InvItem = require('./invitem'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const consensus = require('../protocol/consensus'); /** diff --git a/lib/primitives/address.js b/lib/primitives/address.js index c5e754aa7..d621a6745 100644 --- a/lib/primitives/address.js +++ b/lib/primitives/address.js @@ -9,14 +9,14 @@ const assert = require('assert'); const Network = require('../protocol/network'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const sha256 = require('bcrypto/lib/sha256'); const hash160 = require('bcrypto/lib/hash160'); const hash256 = require('bcrypto/lib/hash256'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const base58 = require('bstr/lib/base58'); -const bech32 = require('bstr/lib/bech32'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const base58 = require('bstring/lib/base58'); +const bech32 = require('bstring/lib/bech32'); /** * Represents an address. diff --git a/lib/primitives/block.js b/lib/primitives/block.js index 2a6cf2e5e..8489c6e15 100644 --- a/lib/primitives/block.js +++ b/lib/primitives/block.js @@ -9,13 +9,13 @@ const assert = require('assert'); const util = require('../utils/util'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const hash256 = require('bcrypto/lib/hash256'); const merkle = require('bcrypto/lib/merkle'); const consensus = require('../protocol/consensus'); const AbstractBlock = require('./abstractblock'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const TX = require('./tx'); const MerkleBlock = require('./merkleblock'); const Headers = require('./headers'); diff --git a/lib/primitives/coin.js b/lib/primitives/coin.js index d100eca9c..9e6f8a241 100644 --- a/lib/primitives/coin.js +++ b/lib/primitives/coin.js @@ -12,9 +12,9 @@ const Amount = require('../btc/amount'); const Output = require('./output'); const Script = require('../script/script'); const Network = require('../protocol/network'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); /** * Represents an unspent output. diff --git a/lib/primitives/headers.js b/lib/primitives/headers.js index 25d1e39fd..c37878b25 100644 --- a/lib/primitives/headers.js +++ b/lib/primitives/headers.js @@ -9,9 +9,9 @@ const util = require('../utils/util'); const AbstractBlock = require('./abstractblock'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); /** * Represents block headers obtained from the network via `headers`. diff --git a/lib/primitives/input.js b/lib/primitives/input.js index 2984e88b4..b0ec233b2 100644 --- a/lib/primitives/input.js +++ b/lib/primitives/input.js @@ -12,8 +12,8 @@ const Network = require('../protocol/network'); const Script = require('../script/script'); const Witness = require('../script/witness'); const Outpoint = require('./outpoint'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); /** * Represents a transaction input. diff --git a/lib/primitives/invitem.js b/lib/primitives/invitem.js index 793f39b68..fcdb532da 100644 --- a/lib/primitives/invitem.js +++ b/lib/primitives/invitem.js @@ -7,9 +7,9 @@ 'use strict'; -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); /** * Inv Item diff --git a/lib/primitives/keyring.js b/lib/primitives/keyring.js index 83ca091f1..a82667be9 100644 --- a/lib/primitives/keyring.js +++ b/lib/primitives/keyring.js @@ -8,13 +8,13 @@ 'use strict'; const assert = require('assert'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const hash160 = require('bcrypto/lib/hash160'); const hash256 = require('bcrypto/lib/hash256'); const Network = require('../protocol/network'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const base58 = require('bstr/lib/base58'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const base58 = require('bstring/lib/base58'); const Script = require('../script/script'); const Address = require('./address'); const Output = require('./output'); diff --git a/lib/primitives/memblock.js b/lib/primitives/memblock.js index 539b718fe..87628eafe 100644 --- a/lib/primitives/memblock.js +++ b/lib/primitives/memblock.js @@ -11,7 +11,7 @@ const AbstractBlock = require('./abstractblock'); const Block = require('./block'); const Headers = require('./headers'); const Script = require('../script/script'); -const BufferReader = require('bbuf/lib/reader'); +const BufferReader = require('bufio/lib/reader'); const DUMMY = Buffer.alloc(0); /** diff --git a/lib/primitives/merkleblock.js b/lib/primitives/merkleblock.js index 67abcdb27..388f96a24 100644 --- a/lib/primitives/merkleblock.js +++ b/lib/primitives/merkleblock.js @@ -9,9 +9,9 @@ const assert = require('assert'); const util = require('../utils/util'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const hash256 = require('bcrypto/lib/hash256'); const consensus = require('../protocol/consensus'); const AbstractBlock = require('./abstractblock'); diff --git a/lib/primitives/mtx.js b/lib/primitives/mtx.js index 32c0247e2..12c9bbb7a 100644 --- a/lib/primitives/mtx.js +++ b/lib/primitives/mtx.js @@ -16,7 +16,7 @@ const Coin = require('./coin'); const Outpoint = require('./outpoint'); const CoinView = require('../coins/coinview'); const Address = require('./address'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const consensus = require('../protocol/consensus'); const policy = require('../protocol/policy'); const Amount = require('../btc/amount'); diff --git a/lib/primitives/netaddress.js b/lib/primitives/netaddress.js index 8f26421e4..29e8cc07e 100644 --- a/lib/primitives/netaddress.js +++ b/lib/primitives/netaddress.js @@ -11,8 +11,8 @@ const common = require('../net/common'); const Network = require('../protocol/network'); const util = require('../utils/util'); const IP = require('binet'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); /** * Represents a network address. diff --git a/lib/primitives/outpoint.js b/lib/primitives/outpoint.js index f9068fdc1..b695bb7a8 100644 --- a/lib/primitives/outpoint.js +++ b/lib/primitives/outpoint.js @@ -7,9 +7,9 @@ 'use strict'; const assert = require('assert'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); /** * Represents a COutPoint. diff --git a/lib/primitives/output.js b/lib/primitives/output.js index cf0ff0536..62f36d553 100644 --- a/lib/primitives/output.js +++ b/lib/primitives/output.js @@ -12,8 +12,8 @@ const Amount = require('../btc/amount'); const Network = require('../protocol/network'); const Address = require('../primitives/address'); const Script = require('../script/script'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); const consensus = require('../protocol/consensus'); const policy = require('../protocol/policy'); diff --git a/lib/primitives/tx.js b/lib/primitives/tx.js index 0681301fc..cda6de41d 100644 --- a/lib/primitives/tx.js +++ b/lib/primitives/tx.js @@ -11,12 +11,12 @@ const assert = require('assert'); const hash256 = require('bcrypto/lib/hash256'); const secp256k1 = require('bcrypto/lib/secp256k1'); const util = require('../utils/util'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Amount = require('../btc/amount'); const Network = require('../protocol/network'); const Script = require('../script/script'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Input = require('./input'); const Output = require('./output'); const Outpoint = require('./outpoint'); diff --git a/lib/primitives/txmeta.js b/lib/primitives/txmeta.js index 1daa43bdf..b06d9e898 100644 --- a/lib/primitives/txmeta.js +++ b/lib/primitives/txmeta.js @@ -9,9 +9,9 @@ const assert = require('assert'); const util = require('../utils/util'); const TX = require('./tx'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); /** * An extended transaction object. diff --git a/lib/script/opcode.js b/lib/script/opcode.js index 813b8974e..c8300a93e 100644 --- a/lib/script/opcode.js +++ b/lib/script/opcode.js @@ -10,8 +10,8 @@ const assert = require('assert'); const ScriptNum = require('./scriptnum'); const common = require('./common'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const opcodes = common.opcodes; const opCache = []; diff --git a/lib/script/script.js b/lib/script/script.js index d5fe2c498..19ff09bad 100644 --- a/lib/script/script.js +++ b/lib/script/script.js @@ -17,16 +17,16 @@ const merkle = require('bcrypto/lib/merkle'); const secp256k1 = require('bcrypto/lib/secp256k1'); const consensus = require('../protocol/consensus'); const policy = require('../protocol/policy'); -const BufferWriter = require('bbuf/lib/writer'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferWriter = require('bufio/lib/writer'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Program = require('./program'); const Opcode = require('./opcode'); const Stack = require('./stack'); const ScriptError = require('./scripterror'); const ScriptNum = require('./scriptnum'); const common = require('./common'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Address = require('../primitives/address'); const opcodes = common.opcodes; const scriptTypes = common.types; diff --git a/lib/script/witness.js b/lib/script/witness.js index 5ff3e9821..5cebb7b7b 100644 --- a/lib/script/witness.js +++ b/lib/script/witness.js @@ -10,9 +10,9 @@ const assert = require('assert'); const Script = require('./script'); const common = require('./common'); -const encoding = require('bbuf/lib/encoding'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Address = require('../primitives/address'); const Stack = require('./stack'); const scriptTypes = common.types; diff --git a/lib/wallet/account.js b/lib/wallet/account.js index 7da9cd979..ae278bfe0 100644 --- a/lib/wallet/account.js +++ b/lib/wallet/account.js @@ -8,9 +8,9 @@ const assert = require('assert'); const binary = require('../utils/binary'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const Path = require('./path'); const common = require('./common'); const Script = require('../script/script'); diff --git a/lib/wallet/client.js b/lib/wallet/client.js index 1a555de0c..930a2fdb8 100644 --- a/lib/wallet/client.js +++ b/lib/wallet/client.js @@ -11,7 +11,7 @@ const assert = require('assert'); const {NodeClient} = require('bclient'); const TX = require('../primitives/tx'); const hash256 = require('bcrypto/lib/hash256'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const parsers = { 'block connect': (entry, txs) => parseBlock(entry, txs), diff --git a/lib/wallet/http.js b/lib/wallet/http.js index 984d7f3db..baf9bfb92 100644 --- a/lib/wallet/http.js +++ b/lib/wallet/http.js @@ -10,7 +10,7 @@ const assert = require('assert'); const path = require('path'); const {Server} = require('bweb'); -const base58 = require('bstr/lib/base58'); +const base58 = require('bstring/lib/base58'); const MTX = require('../primitives/mtx'); const Outpoint = require('../primitives/outpoint'); const Script = require('../script/script'); diff --git a/lib/wallet/masterkey.js b/lib/wallet/masterkey.js index 7fed59653..2d1456b43 100644 --- a/lib/wallet/masterkey.js +++ b/lib/wallet/masterkey.js @@ -14,9 +14,9 @@ const aes = require('bcrypto/lib/aes'); const sha256 = require('bcrypto/lib/sha256'); const pbkdf2 = require('bcrypto/lib/pbkdf2'); const scrypt = require('bcrypto/lib/scrypt'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const Network = require('../protocol/network'); const util = require('../utils/util'); const HD = require('../hd/hd'); diff --git a/lib/wallet/path.js b/lib/wallet/path.js index 717f83c05..660ae6f90 100644 --- a/lib/wallet/path.js +++ b/lib/wallet/path.js @@ -7,9 +7,9 @@ 'use strict'; const assert = require('assert'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); const Address = require('../primitives/address'); /** diff --git a/lib/wallet/records.js b/lib/wallet/records.js index c7f048c1f..d429bcfce 100644 --- a/lib/wallet/records.js +++ b/lib/wallet/records.js @@ -12,9 +12,9 @@ const assert = require('assert'); const util = require('../utils/util'); -const encoding = require('bbuf/lib/encoding'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const encoding = require('bufio/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const TX = require('../primitives/tx'); /** diff --git a/lib/wallet/rpc.js b/lib/wallet/rpc.js index e05e76a1a..228fe570c 100644 --- a/lib/wallet/rpc.js +++ b/lib/wallet/rpc.js @@ -12,7 +12,7 @@ const bweb = require('bweb'); const {Lock} = require('bmutex'); const fs = require('bfile'); const hash256 = require('bcrypto/lib/hash256'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Validator = require('bval/lib/validator'); const util = require('../utils/util'); const Amount = require('../btc/amount'); diff --git a/lib/wallet/txdb.js b/lib/wallet/txdb.js index 5732f2b1f..86ee90a19 100644 --- a/lib/wallet/txdb.js +++ b/lib/wallet/txdb.js @@ -9,15 +9,15 @@ const assert = require('assert'); const util = require('../utils/util'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); const Amount = require('../btc/amount'); const CoinView = require('../coins/coinview'); const Coin = require('../primitives/coin'); const Outpoint = require('../primitives/outpoint'); const records = require('./records'); const layout = require('./layout').txdb; -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const policy = require('../protocol/policy'); const TXRecord = records.TXRecord; diff --git a/lib/wallet/wallet.js b/lib/wallet/wallet.js index edec74cd0..cfb1e9033 100644 --- a/lib/wallet/wallet.js +++ b/lib/wallet/wallet.js @@ -10,13 +10,13 @@ const assert = require('assert'); const EventEmitter = require('events'); const {Lock} = require('bmutex'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const hash160 = require('bcrypto/lib/hash160'); const hash256 = require('bcrypto/lib/hash256'); const cleanse = require('bcrypto/lib/cleanse'); -const BufferReader = require('bbuf/lib/reader'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const base58 = require('bstr/lib/base58'); +const BufferReader = require('bufio/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const base58 = require('bstring/lib/base58'); const Network = require('../protocol/network'); const TXDB = require('./txdb'); const Path = require('./path'); diff --git a/lib/wallet/walletdb.js b/lib/wallet/walletdb.js index 3a6e9480f..08fbf65dd 100644 --- a/lib/wallet/walletdb.js +++ b/lib/wallet/walletdb.js @@ -14,11 +14,11 @@ const Lock = require('bmutex/lib/lock'); const MapLock = require('bmutex/lib/maplock'); const BDB = require('bdb'); const Logger = require('blgr'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const ccmp = require('bcrypto/lib/ccmp'); const aes = require('bcrypto/lib/aes'); const BloomFilter = require('bfilter/lib/bloom'); -const StaticWriter = require('bbuf/lib/staticwriter'); +const StaticWriter = require('bufio/lib/staticwriter'); const Network = require('../protocol/network'); const Path = require('./path'); const common = require('./common'); diff --git a/lib/workers/framer.js b/lib/workers/framer.js index 287af44d7..4a74509dc 100644 --- a/lib/workers/framer.js +++ b/lib/workers/framer.js @@ -7,7 +7,7 @@ 'use strict'; -const StaticWriter = require('bbuf/lib/staticwriter'); +const StaticWriter = require('bufio/lib/staticwriter'); /** * Framer diff --git a/lib/workers/packets.js b/lib/workers/packets.js index 1095b872f..57057c613 100644 --- a/lib/workers/packets.js +++ b/lib/workers/packets.js @@ -11,8 +11,8 @@ */ const assert = require('assert'); -const BufferReader = require('bbuf/lib/reader'); -const encoding = require('bbuf/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); +const encoding = require('bufio/lib/encoding'); const Script = require('../script/script'); const Witness = require('../script/witness'); const Output = require('../primitives/output'); diff --git a/migrate/chaindb0to1.js b/migrate/chaindb0to1.js index c38be8636..9f76c7079 100644 --- a/migrate/chaindb0to1.js +++ b/migrate/chaindb0to1.js @@ -2,7 +2,7 @@ const bcoin = require('../'); const assert = require('assert'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferWriter = require('bufio/lib/writer'); let file = process.argv[2]; assert(typeof file === 'string', 'Please pass in a database path.'); diff --git a/migrate/chaindb1to2.js b/migrate/chaindb1to2.js index 0526132fc..1a822225f 100644 --- a/migrate/chaindb1to2.js +++ b/migrate/chaindb1to2.js @@ -2,10 +2,10 @@ const assert = require('assert'); const BDB = require('bdb'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const networks = require('../lib/protocol/networks'); -const BufferWriter = require('bbuf/lib/writer'); -const BufferReader = require('bbuf/lib/reader'); +const BufferWriter = require('bufio/lib/writer'); +const BufferReader = require('bufio/lib/reader'); const OldCoins = require('./coins-old'); const Coins = require('../lib/coins/coins'); const UndoCoins = require('../lib/coins/undocoins'); diff --git a/migrate/chaindb2to3.js b/migrate/chaindb2to3.js index 415163581..d063eeb0c 100644 --- a/migrate/chaindb2to3.js +++ b/migrate/chaindb2to3.js @@ -17,11 +17,11 @@ if (process.argv.indexOf('-h') !== -1 const assert = require('assert'); const BDB = require('bdb'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const hash256 = require('bcrypto/lib/hash256'); const BN = require('bcrypto/lib/bn'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); const OldCoins = require('./coins/coins'); const OldUndoCoins = require('./coins/undocoins'); const CoinEntry = require('../lib/coins/coinentry'); diff --git a/migrate/coins-old.js b/migrate/coins-old.js index 5111d3cb2..39482dfad 100644 --- a/migrate/coins-old.js +++ b/migrate/coins-old.js @@ -10,11 +10,11 @@ const assert = require('assert'); const util = require('../lib/utils/util'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Coin = require('../lib/primitives/coin'); const Output = require('../lib/primitives/output'); -const BufferReader = require('bbuf/lib/reader'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferReader = require('bufio/lib/reader'); +const BufferWriter = require('bufio/lib/writer'); const {compress, decompress} = require('./compress-old'); /** diff --git a/migrate/ensure-tip-index.js b/migrate/ensure-tip-index.js index a22386da1..5bb6798b6 100644 --- a/migrate/ensure-tip-index.js +++ b/migrate/ensure-tip-index.js @@ -2,8 +2,8 @@ const assert = require('assert'); const BDB = require('bdb'); -const encoding = require('bbuf/lib/encoding'); -const BufferReader = require('bbuf/lib/reader'); +const encoding = require('bufio/lib/encoding'); +const BufferReader = require('bufio/lib/reader'); const hash256 = require('bcrypto/lib/hash256'); const BN = require('bcrypto/lib/bn'); const DUMMY = Buffer.from([0]); diff --git a/migrate/walletdb2to3.js b/migrate/walletdb2to3.js index f1e13c573..d378b6b7e 100644 --- a/migrate/walletdb2to3.js +++ b/migrate/walletdb2to3.js @@ -3,14 +3,14 @@ const assert = require('assert'); const bcoin = require('../'); const walletdb = require('../lib/wallet/walletdb'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Path = require('../lib/wallet/path'); const MasterKey = require('../lib/wallet/masterkey'); const Account = require('../lib/wallet/account'); const Wallet = require('../lib/wallet/wallet'); const KeyRing = require('../lib/primitives/keyring'); -const BufferReader = require('bbuf/lib/reader'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferReader = require('bufio/lib/reader'); +const BufferWriter = require('bufio/lib/writer'); const layout = walletdb.layout; let file = process.argv[2]; let batch; diff --git a/migrate/walletdb3to4.js b/migrate/walletdb3to4.js index c47d59fcc..5b8856f40 100644 --- a/migrate/walletdb3to4.js +++ b/migrate/walletdb3to4.js @@ -2,9 +2,9 @@ const assert = require('assert'); const bcoin = require('../'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const WalletDB = require('../lib/wallet/walletdb'); -const BufferReader = require('bbuf/lib/reader'); +const BufferReader = require('bufio/lib/reader'); const TX = require('../lib/primitives/tx'); const Coin = require('../lib/primitives/coin'); let file = process.argv[2]; diff --git a/migrate/walletdb5to6.js b/migrate/walletdb5to6.js index bd37de2ba..aecfbada7 100644 --- a/migrate/walletdb5to6.js +++ b/migrate/walletdb5to6.js @@ -2,9 +2,9 @@ const assert = require('assert'); const bcoin = require('../'); -const encoding = require('bbuf/lib/encoding'); -const BufferWriter = require('bbuf/lib/writer'); -const BufferReader = require('bbuf/lib/reader'); +const encoding = require('bufio/lib/encoding'); +const BufferWriter = require('bufio/lib/writer'); +const BufferReader = require('bufio/lib/reader'); let file = process.argv[2]; let batch; diff --git a/package.json b/package.json index 12c5ba8d7..fc52cafac 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,6 @@ "node": ">=7.6.0" }, "dependencies": { - "bbuf": "^0.0.1", "bclient": "^0.0.1", "bcfg": "^0.0.1", "bcrypto": "^0.0.1", @@ -38,8 +37,9 @@ "brq": "^0.0.1", "bsock": "^0.0.1", "bsocks": "^0.0.1", - "bstr": "^0.0.1", + "bstring": "^0.0.1", "btcp": "^0.0.1", + "bufio": "^0.0.1", "bupnp": "^0.0.1", "bval": "^0.0.1", "bweb": "^0.0.1", diff --git a/scripts/gen.js b/scripts/gen.js index 2d987e3bd..03a96ee73 100644 --- a/scripts/gen.js +++ b/scripts/gen.js @@ -1,7 +1,7 @@ 'use strict'; const consensus = require('../lib/protocol/consensus'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const TX = require('../lib/primitives/tx'); const Block = require('../lib/primitives/block'); const Script = require('../lib/script/script'); diff --git a/test/block-test.js b/test/block-test.js index e2638cca8..cc02f937c 100644 --- a/test/block-test.js +++ b/test/block-test.js @@ -10,7 +10,7 @@ const Block = require('../lib/primitives/block'); const MerkleBlock = require('../lib/primitives/merkleblock'); const consensus = require('../lib/protocol/consensus'); const Script = require('../lib/script/script'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const bip152 = require('../lib/net/bip152'); const CompactBlock = bip152.CompactBlock; const TXRequest = bip152.TXRequest; diff --git a/test/chain-test.js b/test/chain-test.js index 38d680350..7409d52a3 100644 --- a/test/chain-test.js +++ b/test/chain-test.js @@ -5,7 +5,7 @@ const assert = require('./util/assert'); const consensus = require('../lib/protocol/consensus'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Coin = require('../lib/primitives/coin'); const Script = require('../lib/script/script'); const Chain = require('../lib/blockchain/chain'); diff --git a/test/coins-test.js b/test/coins-test.js index c6b942de7..981b7adcf 100644 --- a/test/coins-test.js +++ b/test/coins-test.js @@ -9,8 +9,8 @@ const Input = require('../lib/primitives/input'); const Outpoint = require('../lib/primitives/outpoint'); const CoinView = require('../lib/coins/coinview'); const CoinEntry = require('../lib/coins/coinentry'); -const StaticWriter = require('bbuf/lib/staticwriter'); -const BufferReader = require('bbuf/lib/reader'); +const StaticWriter = require('bufio/lib/staticwriter'); +const BufferReader = require('bufio/lib/reader'); const common = require('./util/common'); const tx1 = common.readTX('tx1'); diff --git a/test/hd-test.js b/test/hd-test.js index 224e58a99..b42282d98 100644 --- a/test/hd-test.js +++ b/test/hd-test.js @@ -5,7 +5,7 @@ const assert = require('./util/assert'); const HD = require('../lib/hd'); -const base58 = require('bstr/lib/base58'); +const base58 = require('bstring/lib/base58'); const pbkdf2 = require('bcrypto/lib/pbkdf2'); const sha512 = require('bcrypto/lib/sha512'); const vectors = require('./data/hd.json'); diff --git a/test/http-test.js b/test/http-test.js index 332b8f9d2..d511867ed 100644 --- a/test/http-test.js +++ b/test/http-test.js @@ -5,7 +5,7 @@ const assert = require('./util/assert'); const consensus = require('../lib/protocol/consensus'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const Address = require('../lib/primitives/address'); const Script = require('../lib/script/script'); const Outpoint = require('../lib/primitives/outpoint'); diff --git a/test/input-test.js b/test/input-test.js index 788b019df..bffdd4377 100644 --- a/test/input-test.js +++ b/test/input-test.js @@ -4,10 +4,10 @@ 'use strict'; const Input = require('../lib/primitives/input'); -const BufferReader = require('bbuf/lib/reader'); +const BufferReader = require('bufio/lib/reader'); const assert = require('./util/assert'); const common = require('./util/common'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); // Take input rawbytes from the raw data format // p2pkh diff --git a/test/mempool-test.js b/test/mempool-test.js index b93147344..a1c0add34 100644 --- a/test/mempool-test.js +++ b/test/mempool-test.js @@ -4,7 +4,7 @@ 'use strict'; const assert = require('./util/assert'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const random = require('bcrypto/lib/random'); const MempoolEntry = require('../lib/mempool/mempoolentry'); const Mempool = require('../lib/mempool/mempool'); diff --git a/test/script-test.js b/test/script-test.js index 2547f376a..a12efcd85 100644 --- a/test/script-test.js +++ b/test/script-test.js @@ -9,7 +9,7 @@ const Witness = require('../lib/script/witness'); const Stack = require('../lib/script/stack'); const Opcode = require('../lib/script/opcode'); const TX = require('../lib/primitives/tx'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const {fromFloat} = require('../lib/utils/fixed'); const scripts = require('./data/script-tests.json'); diff --git a/test/tx-test.js b/test/tx-test.js index 81fd799bd..534421172 100644 --- a/test/tx-test.js +++ b/test/tx-test.js @@ -5,7 +5,7 @@ const {inspect} = require('util'); const assert = require('./util/assert'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const random = require('bcrypto/lib/random'); const consensus = require('../lib/protocol/consensus'); const TX = require('../lib/primitives/tx'); diff --git a/test/util/common.js b/test/util/common.js index 9ee50b3fc..f9e008aa3 100644 --- a/test/util/common.js +++ b/test/util/common.js @@ -10,8 +10,8 @@ const {CompactBlock} = require('../../lib/net/bip152'); const TX = require('../../lib/primitives/tx'); const Output = require('../../lib/primitives/output'); const CoinView = require('../../lib/coins/coinview'); -const BufferReader = require('bbuf/lib/reader'); -const BufferWriter = require('bbuf/lib/writer'); +const BufferReader = require('bufio/lib/reader'); +const BufferWriter = require('bufio/lib/writer'); const common = exports; diff --git a/test/utils-test.js b/test/utils-test.js index e3282b2f2..c8b96c6a8 100644 --- a/test/utils-test.js +++ b/test/utils-test.js @@ -5,8 +5,8 @@ const assert = require('./util/assert'); const {U64, I64} = require('n64'); -const base58 = require('bstr/lib/base58'); -const encoding = require('bbuf/lib/encoding'); +const base58 = require('bstring/lib/base58'); +const encoding = require('bufio/lib/encoding'); const Amount = require('../lib/btc/amount'); const Validator = require('bval/lib/validator'); const fixed = require('../lib/utils/fixed'); diff --git a/test/wallet-test.js b/test/wallet-test.js index d5e96dee9..68f68a146 100644 --- a/test/wallet-test.js +++ b/test/wallet-test.js @@ -6,7 +6,7 @@ const assert = require('./util/assert'); const consensus = require('../lib/protocol/consensus'); const util = require('../lib/utils/util'); -const encoding = require('bbuf/lib/encoding'); +const encoding = require('bufio/lib/encoding'); const hash256 = require('bcrypto/lib/hash256'); const random = require('bcrypto/lib/random'); const WalletDB = require('../lib/wallet/walletdb');