From b72af2e40b3f1787a8784888cdc1dc1193623ed6 Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Mon, 13 Oct 2014 12:52:32 +1100 Subject: [PATCH] doc: no section headers --- src/address.js | 2 -- src/ecpair.js | 3 --- src/ecsignature.js | 2 -- src/raw_transaction.js | 3 --- src/script.js | 4 ---- src/transaction.js | 2 -- 6 files changed, 16 deletions(-) diff --git a/src/address.js b/src/address.js index 124c0ef7b..07d1ad1fd 100644 --- a/src/address.js +++ b/src/address.js @@ -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) @@ -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) diff --git a/src/ecpair.js b/src/ecpair.js index 9708ca2fd..7599230cc 100644 --- a/src/ecpair.js +++ b/src/ecpair.js @@ -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 @@ -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') @@ -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') diff --git a/src/ecsignature.js b/src/ecsignature.js index 7b71c6183..0f7bb4ffe 100644 --- a/src/ecsignature.js +++ b/src/ecsignature.js @@ -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 @@ -82,7 +81,6 @@ ECSignature.parseScriptSignature = function(buffer) { } } -// Export operations ECSignature.prototype.toCompact = function(i, compressed) { if (compressed) i += 4 i += 27 diff --git a/src/raw_transaction.js b/src/raw_transaction.js index 2a62b805a..5fdf5f4e8 100644 --- a/src/raw_transaction.js +++ b/src/raw_transaction.js @@ -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) { @@ -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 @@ -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) diff --git a/src/script.js b/src/script.js index d3afc7061..8eeae45c7 100644 --- a/src/script.js +++ b/src/script.js @@ -12,7 +12,6 @@ function Script(buffer, chunks) { this.chunks = chunks } -// Import operations Script.fromASM = function(asm) { var strChunks = asm.split(' ') @@ -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) } @@ -105,7 +102,6 @@ Script.prototype.without = function(needle) { })) } -// Export operations var reverseOps = [] for (var op in opcodes) { var code = opcodes[op] diff --git a/src/transaction.js b/src/transaction.js index 1359f20f8..caa84c381 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -16,7 +16,6 @@ function Transaction() { this.tx = new RawTransaction() } -// Static constructors Transaction.fromRawTransaction = function(transaction) { var txb = new Transaction() @@ -106,7 +105,6 @@ Transaction.fromRawTransaction = function(transaction) { return txb } -// Operations Transaction.prototype.addInput = function(prevTx, index, sequence, prevOutScript) { var prevOutHash