Manuel Araoz
e331c4ea49
allow addresses to have surrounding whitespace in validation
10 years ago
Braydon Fuller
f034a71929
Network Fixes
- Fixed Address classification for a custom network
- Added ability to remove a custom network
- Increased test coverage for Address
10 years ago
Manuel Araoz
e0b1ca0e10
move some script logic from Address to Script
10 years ago
Manuel Araoz
62ea45a524
refactor Address<->Script relation
10 years ago
eordano
1a5780e35e
Script/Address: Add check for valid number of threshold needed
10 years ago
Esteban Ordano
41191a285f
Add alternative to create an Address
* When by error one has two instances of an address, an address
can't be instantiated from the other
10 years ago
Esteban Ordano
d053599fd2
Improve test coverage
10 years ago
Esteban Ordano
fe86abc093
Add `change` when serializing transaction
10 years ago
Braydon Fuller
8b505f0cfa
Fixed tests to handle a `defaultNetwork` change
- Updated tests to work for both 'testnet' and 'livenet' as the default network.
- Fixed a bug in Address where the network property was being set as a string.
- Fixed a bug in HDKeys to handle serialized keys when the defaultNetwork changed.
10 years ago
Esteban Ordano
d688222769
Add toAddress(network) functionality to scripts
10 years ago
Esteban Ordano
1ec4c7f512
Minor improvements on Address
* Update JSDocs
* Branch coverage 100%
* Removed duplicated test
* Updated names of tests
10 years ago
Esteban Ordano
5f5cf15241
Add capability to instantiate an Address from public keys and a threshold
10 years ago
Braydon Fuller
920f25b58e
Tests: Added bitcoind base58 key data and tests
10 years ago
Braydon Fuller
354c03987a
Address: Added toObject method and changed toJSON to return a string
10 years ago
Braydon Fuller
1858766627
Standardized toJSON, fromJSON, toString and fromString interfaces
10 years ago
Braydon Fuller
3b061b057f
Address: Added documentation and refactored to accept both a string and network object.
10 years ago
Esteban Ordano
1816ba197f
Add check functions to Address
10 years ago
Manuel Araoz
66e96e5fa4
make tests pass with Script refactor
10 years ago
Braydon Fuller
2cbcf7da1c
Tests: Check that an Address is using the defaultNetwork
10 years ago
Braydon Fuller
4adf1fcb14
Network: Replaced all instances of mainnet with livenet for consistency
10 years ago
Braydon Fuller
85ce140aeb
Keys: Renamed Privkey to PrivateKey and Pubkey to PublicKey
10 years ago
Braydon Fuller
35d0cbc5a6
Keys: Modified interface of Pubkey and Privkey so that an instance can be relied upon as valid.
10 years ago
Braydon Fuller
deb54c5a20
Address: Return new instance if `this` isn't already instantiated.
10 years ago
Braydon Fuller
9863b123c0
Address: Increase test coverage
10 years ago
Braydon Fuller
3c9cc23501
Address: Improved error messages and type, and added inspect prototype for console output.
10 years ago
Braydon Fuller
0df97a42fe
Address: Fix indentation, typos and simplify isValid
10 years ago
Braydon Fuller
90341f2ab6
Address: Modified interface so that any instance of Address can be assumed to be valid.
10 years ago
Manuel Araoz
a9d029341d
remove extras
10 years ago
Manuel Araoz
6f2913eed4
fix references
10 years ago
Ryan X. Charles
f17d604e44
Address().fromHashbuf() convenience method
...useful for when you have the pubkeyhash, but not the version byte.
10 years ago
Ryan X. Charles
ac85264a28
Address().fromBuffer(buf);
10 years ago
Ryan X. Charles
4a027e260a
Address().fromScript(script)
It is convenient to be able to derive an address directly from a script for
p2sh transactions.
10 years ago
Ryan X. Charles
6a26813955
p2sh -> scripthash
more appealing and memorable name
10 years ago
Ryan X. Charles
bdb8daaf07
remove redundant "test." from test names
11 years ago
Ryan X. Charles
356ddcfa4e
test invalid address
11 years ago
Ryan X. Charles
ac47796acd
.isValid() is more convenient than .validate()
11 years ago
Ryan X. Charles
6b7592d67b
add address validation convenience function
11 years ago
Ryan X. Charles
f52e679f93
refactor address - use "set" function
...intend for this to become standard throughout the lib
11 years ago
Ryan X. Charles
7c945cdc01
add "compressed" feature to pubkeys
...not just privkeys. since, of course, they can be compressed or uncompressed.
11 years ago
Ryan X. Charles
4cff6a41f4
remove "(classname): " from tests
...to reduce the burden on writing new code
11 years ago
Ryan X. Charles
9cc214cf06
capitalize classes in tests
11 years ago
Ryan X. Charles
a2512226f8
address convenience functions
11 years ago
Ryan X. Charles
3871e43dd8
make address more consistent with rest of lib
11 years ago
Ryan X. Charles
c00f1ebeea
standardize capitalization in test describes
11 years ago
Ryan X. Charles
862235e57e
initial commit
address, base58, base58check, hash all working with tests.
base58check code taken from bitcore.
11 years ago