Commit Graph

13 Commits

Author SHA1 Message Date
Ryan X. Charles
a7c8cf49b3 update fromPubKeys to use fromScript
This means fewer code-duplication. Also added another test for fromScript to
make sure it is thoroughly tested. Also pass through opts to createMultisig so
that you can choose to lot let it be sorted if you want.
2014-04-09 14:07:56 -03:00
Ryan X. Charles
ae14c4aaa0 new convenient interface for creating addresses
To create an address from a public key or script, you used to have to do the
hashing yourself, and find the version yourself. For example:

var hash = bitcore.util.sha256ripe160(pubkey);
var version = bitcore.networks['livenet'].addressVersion;
var addr = new Address(version, hash);

But with this interface, things are much simpler:

var addr = Address.fromPubKey(pubkey);

The new convenience methods are:

Address.fromPubKey (for regular pubkeyhash addresses)
Address.fromPubKeys (for p2sh multisig addresses)
Address.fromScript (for any p2sh address)
2014-04-09 13:11:24 -03:00
Manuel Araoz
71353426f6 network refactors 2014-04-07 18:31:17 -03:00
Manuel Araoz
3cd4e31c31 fix Address validation issue 2014-03-19 18:44:24 -03:00
Manuel Araoz
1324974c4d add isScript to Address 2014-03-19 16:20:41 -03:00
Matias Alejo Garcia
671d372c19 tx creation working. more tests needed 2014-03-15 03:27:06 -03:00
Manuel Araoz
13b1431c56 change default way of validating Addresses 2014-03-11 11:27:29 -03:00
Manuel Araoz
ad34fd191d starting Address idiom changes 2014-03-11 10:21:26 -03:00
Matias Alejo Garcia
c0c325dabd all classes working with soop and test passing 2014-03-05 16:11:16 -03:00
Manuel Araoz
ce321e42d0 remove use-strict 2014-02-06 16:36:49 -03:00
Manuel Araoz
0a6ddaffa3 EncodedData working in the browser 2014-02-05 18:15:10 -03:00
Stephen Pair
a642114fb5 refactoring of Address 2013-07-10 13:03:05 -04:00
Stephen Pair
56a20ef25d bunch of interim (broken) stuff 2013-07-09 14:45:52 -04:00