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
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
Braydon Fuller
b5ada707bd
Benchmarks for block serialization & 4x performance improvement.
10 years ago
Braydon Fuller
458abe069e
Fixed issue with handling invalid output scripts
- Changed toObject serialization to always use a hexa string for a script
- Updated inspect method to handle a null script
- Roundtrip toObject/fromObject with an invalid script
- Additional test coverage for Output
10 years ago
Patrick Nagurny
de078a40d3
If output.script is InvalidBuffer, return null instead of throwing error
10 years ago
Kirill Fomichev
346b2af446
delete writable for accessor property
10 years ago
Braydon Fuller
f8ea7e39cc
Included satoshis check during checked serialization.
10 years ago
Braydon Fuller
3d447ded79
Update bn.js to 2.0.4 to handle 53 bit precision number input.
10 years ago
Braydon Fuller
bcd4efb724
Added `checkState` for positive integer in Output satoshis
10 years ago
Manuel Araoz
b92fd915eb
increase coverage for Input and Output, fix some bugs
10 years ago
Esteban Ordano
614a228c79
Allow satoshis to be a string on output creation
10 years ago
Esteban Ordano
bdeac4e67d
Add inspect method to output
10 years ago
Yemel Jardi
e57d02c03c
Use define immutable helper
10 years ago
Braydon Fuller
bce28cd227
Fixed bug in IE11 that would cause MAX_MONEY verification test to fail.
10 years ago
Manuel Araoz
370f69df88
refactor BN and ECDSA
10 years ago
Esteban Ordano
9a73338c91
Add tests for changes to Transaction interface
10 years ago
Braydon Fuller
6f6d568661
Transaction: toNumber/fromNumber to set satoshis
10 years ago
Braydon Fuller
ad4bc9324f
Transaction: Use Script toString for transaction JSON output
10 years ago
Braydon Fuller
b544b0594d
Added test to check that Transaction fromJSON could initialize from toJSON, and fixed a bug.
10 years ago
Braydon Fuller
002eb3dcf5
Transaction: Added toObject method and changed toJSON to return a string
10 years ago
Esteban Ordano
5c974a8ef2
Refactor transaction to match new API
* Refactor transaction into a different subfolder
* Added a lot of tests for sighash and transaction serialization (from
reddit's and Ryan X. Charles' `fullnode`)
* Drop "only" from sighash tests and consolidate logs
10 years ago