Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/address.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ function Address(hash, version) {
this.version = version
}

// Import functions
Address.fromBase58Check = function(string) {
var payload = base58check.decode(string)
var version = payload.readUInt8(0)
Expand All @@ -43,7 +42,6 @@ Address.fromOutputScript = function(script, network) {
assert(false, type + ' has no matching Address')
}

// Export functions
Address.prototype.toBase58Check = function () {
var payload = new Buffer(21)
payload.writeUInt8(this.version, 0)
Expand Down
3 changes: 0 additions & 3 deletions src/ecpair.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ function ECPair(d, Q, options) {
this.network = options.network
}

// Public access to secp256k1 curve
ECPair.curve = ecurve.getCurveByName('secp256k1')

// Static constructors
Expand Down Expand Up @@ -103,7 +102,6 @@ ECPair.makeRandom = function(options) {
return new ECPair(d, null, options)
}

// Export functions
ECPair.prototype.toWIF = function() {
assert(this.d, 'Missing private key')

Expand All @@ -130,7 +128,6 @@ ECPair.prototype.getPublicKeyBuffer = function() {
return this.Q.getEncoded(this.compressed)
}

// ECC Operations
ECPair.prototype.sign = function(hash) {
assert(this.d, 'Missing private key')

Expand Down
2 changes: 0 additions & 2 deletions src/ecsignature.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ function ECSignature(r, s) {
this.s = s
}

// Import operations
ECSignature.parseCompact = function(buffer) {
assert.equal(buffer.length, 65, 'Invalid signature length')
var i = buffer.readUInt8(0) - 27
Expand Down Expand Up @@ -82,7 +81,6 @@ ECSignature.parseScriptSignature = function(buffer) {
}
}

// Export operations
ECSignature.prototype.toCompact = function(i, compressed) {
if (compressed) i += 4
i += 27
Expand Down
3 changes: 0 additions & 3 deletions src/raw_transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ RawTransaction.SIGHASH_NONE = 0x02
RawTransaction.SIGHASH_SINGLE = 0x03
RawTransaction.SIGHASH_ANYONECANPAY = 0x80

// Static constructors
RawTransaction.fromBuffer = function(buffer) {
var offset = 0
function readSlice(n) {
Expand Down Expand Up @@ -78,7 +77,6 @@ RawTransaction.fromHex = function(hex) {
return RawTransaction.fromBuffer(new Buffer(hex, 'hex'))
}

// Operations
RawTransaction.prototype.addInput = function(hash, index, sequence) {
if (sequence === undefined) sequence = RawTransaction.DEFAULT_SEQUENCE

Expand Down Expand Up @@ -190,7 +188,6 @@ RawTransaction.prototype.setInputScript = function(index, script) {
this.ins[index].script = script
}

// Export functions
RawTransaction.prototype.toBuffer = function () {
var txInSize = this.ins.reduce(function(a, x) {
return a + (40 + bufferutils.varIntSize(x.script.buffer.length) + x.script.buffer.length)
Expand Down
4 changes: 0 additions & 4 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ function Script(buffer, chunks) {
this.chunks = chunks
}

// Import operations
Script.fromASM = function(asm) {
var strChunks = asm.split(' ')

Expand Down Expand Up @@ -90,10 +89,8 @@ Script.fromHex = function(hex) {
return Script.fromBuffer(new Buffer(hex, 'hex'))
}

// Constants
Script.EMPTY = Script.fromChunks([])

// Operations
Script.prototype.getHash = function() {
return crypto.hash160(this.buffer)
}
Expand All @@ -105,7 +102,6 @@ Script.prototype.without = function(needle) {
}))
}

// Export operations
var reverseOps = []
for (var op in opcodes) {
var code = opcodes[op]
Expand Down
2 changes: 0 additions & 2 deletions src/transaction.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ function Transaction() {
this.tx = new RawTransaction()
}

// Static constructors
Transaction.fromRawTransaction = function(transaction) {
var txb = new Transaction()

Expand Down Expand Up @@ -106,7 +105,6 @@ Transaction.fromRawTransaction = function(transaction) {
return txb
}

// Operations
Transaction.prototype.addInput = function(prevTx, index, sequence, prevOutScript) {
var prevOutHash

Expand Down