Commit graph

10 commits

Author SHA1 Message Date
Dave Collins
2af3c8263a Add 2014 to copyright dates. 2014-01-08 23:46:05 -06:00
Josh Rickmar
58bae71f61 Implement Address interface.
Address is a generic interface for any type of "address" a
transaction can be sent to, including but not limited to
pay-to-pubkey, pay-to-pubkey-hash, and pay-to-script-hash.

This change implements Address and concrete types for P2PKH and P2SH
addresses with 100% test coverage.  Pay-to-pubkey support will be
added in the future.

This API is intended to replace the old EncodeAddress/DecodeAddress
functions which are now deprecated.
2014-01-03 11:10:25 -05:00
Francis Lam
13fec7735c Fixed comments and added tests for scriptHash encoding
Fixed bad comments on new scriptHash constants and encoding function.

Added encodeScriptHashTests to addrconvs_test.go to check correctness of
output.
2014-01-02 12:09:47 -05:00
Francis Lam
592d38d55f Added EncodeScriptHash for BIP-0013 compliance
Implemented address format for pay-to-script-hash
2014-01-02 00:25:00 -05:00
David Hill
ccb6557298 Add compression support to both EncodePrivateKey and DecodePrivateKey 2013-11-06 12:34:57 -05:00
David Hill
cefb048288 update EncodePrivateKey and DecodePrivateKey to take a btcnet parameter 2013-11-01 00:45:38 -04:00
David Hill
7e3c9c1aed Add two new functions: EncodePrivateKey and DecodePrivateKey
EncodePrivateKey encodes a raw private key into Wallet Import Format.
DecodePrivateKey decodes the WIF string to a raw private key.
2013-10-31 23:51:45 -04:00
Josh Rickmar
e433a02e4b Encode and decode addresses with a btcwire.BitcoinNet, not a byte.
While here, fix a couple of append() leaks.
2013-10-08 13:00:41 -04:00
Josh Rickmar
867149f470 Add missing license header and remove extra space. 2013-09-12 11:32:47 -04:00
Josh Rickmar
e4925b4abe Add functions to encode and decode payment addresses. 2013-09-12 11:20:34 -04:00