Matias Alejo Garcia
73a8c83b5e
add versionGuard tests
7 years ago
Matias Alejo Garcia
1f2e3a35ea
fix tests / error messages
7 years ago
Matias Alejo Garcia
4088499b54
updates to bn.js new api... umod = mod
7 years ago
Matias Alejo Garcia
b061bed17c
WIP: updates lodash, bn and elliptic
7 years ago
Jason Dreyzehner
024cbcdf88
test: update tests
8 years ago
Gabe Gattis
50e7d24a9c
fix tests
8 years ago
Braydon Fuller
559520abc3
Bitcoin core tests for witness uncompressed public keys
9 years ago
Braydon Fuller
2bc76b1570
Unit test coverage for script interpreter verifyWitnessProgram
9 years ago
Braydon Fuller
0007ffb8ed
Add unit tests for isWitnessProgram
9 years ago
Braydon Fuller
d40752ca94
Add more tests from bitcoin core
From commit bitcoin core 0.13.0 commit: a402396dce64c42ea73535b7dde4a9164d430438
In the file: src/test/transaction_tests.cpp
- pay-to-compressed publickey (v0)
- p2sh witness pay-to-compressed pubkey (v0)
- witness 2-of-2 multisig
- p2sh witness 2-of-2 multisig
9 years ago
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
42b3dc93d0
Switch segnet to testnet
9 years ago
Thomas Kerin
b0bbcb3dc7
test case of multisig|witness|p2sh
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
88aed87f91
script: added p2wsh and p2wpkh script identification methods
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
Gabe Gattis
7cdee7d1a5
remove hdkeycache
8 years ago
Gabe Gattis
d9c295b2d8
revert change to privateKey.toBuffer(). Change will be delayed until v1.0.0
8 years ago
Gabe Gattis
1b2c41978f
revert behavior of derive
8 years ago
Gabe Gattis
a9aeada69e
remove hdkeycache
8 years ago
Braydon Fuller
d32ae41adc
Change name of derive to deriveChild
This is to avoid any accidental upgrades to a bugfixed version without awareness of the change.
8 years ago
Thomas Kerin
2bfb4ceb9e
Transaction and block version are signed integers
8 years ago
Braydon Fuller
09d9e0291f
Throw error with invalid network
9 years ago
Braydon Fuller
e9d1237228
Add toBufferNoPadding method to private key
9 years ago
Braydon Fuller
d0e3f84104
Handle invalid public key derivation rather than throw error
9 years ago
Braydon Fuller
0906d988ca
Handle edge case that invalid private key is derived
9 years ago
Braydon Fuller
b79a9b274a
Fix implementation of hd derivation to be bip32 compliant
https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#child-key-derivation-ckd-functions
9 years ago
Kirill Fomichev
8f51d4884e
Fix PrivateKey.toBuffer
9 years ago
Filippo Merli
906b255c42
add tests for new method filteredTxsHash, all test passed
9 years ago
Ruben de Vries
b655659812
`Script.classify` should first check output types before checking input types.
9 years ago
Kirill Fomichev
3579305b5e
Fix K generator in ECDSA
9 years ago
Braydon Fuller
0c983c9c4a
Networks: Added regtest to networks
Brings better compatibility between "testnet" and "regtest". Services such as
Bitcore Wallet Service and wallets such as Copay that have "testnet" and not
"regtest" will be compatible with "regtest" if enabled in a Bitcore node. This
adds two new API methods to enable/disable regtest on the testnet network:
- `bitcore.Networks.enableRegtest()`
- `bitcore.Networks.disableRegtest()`
9 years ago
Kirill Fomichev
af4d9aef34
Fix Opcode.smallInt
9 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
Braydon Fuller
8f53fc8bc1
Transaction: Added tests for roundtrip with signatures.
9 years ago
Braydon Fuller
36b781d2eb
Script: Added test for `OP_1NEGATE` -> `-1` for ASM
9 years ago
Braydon Fuller
f84834f7a8
Script: Added comments to test with reference to the txid
9 years ago
Braydon Fuller
3c4f89b6c0
Script: Add test data for ASM with pushdata_1 opcode
9 years ago
Ed Bosher
c5a107961c
Set s mid point as hex rather than decimal (bn.js default)
9 years ago
Ruben de Vries
502026086c
updated _estimateSize for bare multisig input
9 years ago
Ruben de Vries
f9d9fa0622
add test for parsing list of signatures
9 years ago
Ruben de Vries
af70e69588
add test for bare multisig
9 years ago
Braydon Fuller
d3a8926bd9
Correct millis unit typo.
9 years ago