Braydon Fuller
cf5a760919
Add test for "Witness pay-to-compressed-pubkey (v0)"
Using this code in the test to get test data:
```
string TxHexStr(CTransaction tx)
{
CDataStream ssTx(SER_NETWORK, PROTOCOL_VERSION);
ssTx << tx;
std::string ssTxStr = ssTx.str();
return HexStr(ssTxStr);
}
std::cout << "scriptPubkey1: " + HexStr(scriptPubkey1) + "\n";
std::cout << "output1: " + TxHexStr(output1) + "\n";
```
From commit bitcoin core 0.13.0 commit: a402396dce64c42ea73535b7dde4a9164d430438
In the file: src/test/transaction_tests.cpp#L493
9 years ago
Braydon Fuller
ce9d092a10
input: moved getSatoshisBuffer to general input
9 years ago
Braydon Fuller
c6079e9556
script: interpreter witness program fixes
9 years ago
Thomas Kerin
1aa55790ae
Transaction.verifySignature(): no longer require satoshisBuffer param, can call Input method
9 years ago
Thomas Kerin
2b2ca0944a
Input: add getSatoshisBuffer method
9 years ago
Thomas Kerin
ad7785d3dd
Start of verification support
9 years ago
Braydon Fuller
ba54810df8
transaction: support nodejs 0.10.x for sighash witness
9 years ago
Braydon Fuller
95098e4dc0
transaction: transaction signing for nested p2sh witness
9 years ago
Braydon Fuller
93002249da
transaction: start to use new sighash for nested witness
9 years ago
Braydon Fuller
a8515ad81b
transaction: added new sighash for witness
9 years ago
Braydon Fuller
317d249758
input: added nested p2sh witness
9 years ago
Braydon Fuller
1e749e0055
transaction: refactor witness properties
9 years ago
Braydon Fuller
cccf07674a
transaction: calculate witness hash
9 years ago
Braydon Fuller
2384164ab8
transaction: start to implement segwit serialization
9 years ago
Thomas Kerin
2bfb4ceb9e
Transaction and block version are signed integers
8 years ago
Braydon Fuller
c0eec199ed
Transaction: Support pay-to-public-key previous outputs with #fromObject
9 years ago
Braydon Fuller
f1d19b438e
Transaction: Added replace-by-fee (RBF) support
- Useful for bidding transactions as described in: https://bitpay.com/chaindb.pdf
- Reference: nSequence-based opt-in: https://github.com/bitcoin/bitcoin/pull/6871
9 years ago
Kirill Fomichev
446760fec7
Fix Transaction.fromObject
9 years ago
Ruben de Vries
502026086c
updated _estimateSize for bare multisig input
9 years ago
Ruben de Vries
6e1e4e69c4
add function to parse list of signatures buffers into proper list of TransactionSignature objects
9 years ago
Ruben de Vries
af70e69588
add test for bare multisig
9 years ago
Ruben de Vries
4f99bf0882
add bare multisig support
9 years ago
Ruben de Vries
4e007e22be
make Sighash accessible
9 years ago
Ruben de Vries
ff0f9f6216
fixed wrong option name in jsdoc
9 years ago
Rob Riddle
5b08d72876
Fix typos in documentation
9 years ago
Kirill Fomichev
24ef291bed
allow Transaction.to take array
10 years ago
Esteban Ordano
19f3fe0de3
Using buffer-compare instead of copy&paste
10 years ago
Esteban Ordano
026f878e51
Add tests for bip69 from bitcoinjs
10 years ago
Esteban Ordano
fb65145ba7
Privacy improvement by sorting inputs and outputs
See BIP69 for more details:
https://github.com/bitcoin/bips/blob/master/bip-0069.mediawiki
10 years ago
Braydon Fuller
0e24e4c421
Return zero for coinbase transaction fee.
10 years ago
Zaki Manian
aa8e548800
To be effective within the current Bitcoin network, the inputs to a transaction
with an nLocktime must be not the standard max value.
We set the sequence number of 0 if the value is max.
Currently sequence numbers other than MAX_INT32 have no meaning in the Bitcoin protocol
but this may change in future BIPS
10 years ago
Braydon Fuller
a50fccef4d
Changes behavior of `toJSON` to work as expected with `JSON.stringify`
- see: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#toJSON%28%29_behavior
- Updates CONTRIBUTING with changes to Stardard Methods
- Aliases toJSON for toObject
- Removes all `fromJSON` methods, and many cases replaces with `fromObject`
- Constructors expect an object parsed via `JSON.parse` for JSON input
10 years ago
Braydon Fuller
e7c7a9ad89
Check for consistency if object argument includes a hash.
10 years ago
Braydon Fuller
74dee1fda7
Include hash in toObject/toJSON results.
10 years ago
Braydon Fuller
eb077eb3df
Added support for signing publickey inputs.
10 years ago
Braydon Fuller
d9047eebf0
Detect if scriptSig (input) or scriptPubKey (output) is previously known.
10 years ago
Braydon Fuller
3d1dc7aafe
Objects passed as arguments are unmodified.
10 years ago
Esteban Ordano
4280b993e0
Add CLTV (BIP65) support
10 years ago
Braydon Fuller
b5ada707bd
Benchmarks for block serialization & 4x performance improvement.
10 years ago
Ivan Socolsky
0e6aec1c94
allow configuration of fee per kb
10 years ago
Ivan Socolsky
d9d5a26085
fix computation of fee without change output
10 years ago
Kirill Fomichev
b9d52b79c8
fix Transaction.sortOutputs
10 years ago
Braydon Fuller
589d017a14
Refactored transaction.getSerializationError to be more concise.
- _hasMoreOutputThanInput() and _isInvalidSatoshis() merged with getSerializationError()
- _isFeeDifferent(), _isFeeTooLarge() and _isFeeTooSmall merged with _hasFeeError()
10 years ago
David de Kloet
0b6eaf0f1e
Call getUnspentValue() only once in getSerializationError().
10 years ago
David de Kloet
3ace170ac5
Ignore fee error when unspent output is actually negative, rather than already when the check for negative unspent output is disabled.
10 years ago
David de Kloet
ac2fbe2777
When disableMoreOutputThanInput is set for getSerializationError, also disable the fee checks as the concept of a fee is meaningless when unspent output value is negative. This also allows for removing the opts from buildSkipTest again and simplifying the skip test for disableMoreOutputThanInput.
10 years ago
David de Kloet
8c5b2c851b
When checking for transaction serialization errors, check the output amount before checking fee errors. Added a test for it and also improved buildSkipTest by specifying which error to expect and using it for some tests where it wasn't used yet.
10 years ago
David de Kloet
99d8ac1957
Remove an unnecessary space.
10 years ago
David de Kloet
3d9560c0c5
Don't break lines at 80 characters.
10 years ago
David de Kloet
8a8412f04a
Don't break lines at 80 characters.
10 years ago