Commit graph

40 commits

Author SHA1 Message Date
Dave Collins
c39e35318d Update for recent chainhash-related API changes. (#81)
This updates all code to make use of the new chainhash package since the
old wire.ShaHash type and related functions have been removed in favor
of the abstracted package.

Also, while here, rename all variables that included sha in their name
to include hash instead.
2016-08-08 14:16:04 -05:00
Josh Rickmar
ee3a86c44b Make listsinceblock block hash optional.
Before, calling ListSinceBlock(Async) would create an empty string
from the nil block hash.
2015-06-01 14:41:23 -04:00
Dave Collins
b046f36c72 Relicense to the btcsuite developers. 2015-05-01 12:03:51 -05:00
Dave Collins
dd8dc87577 Run goimports -w . 2015-05-01 10:54:58 -05:00
Dave Collins
ce9e8aa264 Update btcjson path import paths to new location. 2015-05-01 10:42:52 -05:00
Albert Puigsech Galicia
b1d5c1b9f6 Add account param on GetNewAddress 2015-04-27 00:44:16 +02:00
Javed Khan
04a3ed28f5 Added ImportAddress and ImportPubKey support. 2015-04-05 22:56:54 -05:00
Dave Collins
9ca93b30ad Update to make use of latest version of btcjson.
This commit contains several changes needed to update the client to use
the latest version of btcjson.  In addition, it contains a couple of other
minor changes along the way.

While the underlying changes are quite large, the public API of this
package is still the same, so caller should generally not have to update
their code due to that.  However, the underlying btcjson package API has
changed significantly.  Since this package hides the vast majority of that
from callers, it should not afffect them very much.  However, one area in
particular to watch out for is that the old btcjson.Error is now
btcjson.RPCError, so any callers doing any type assertions there will need
to update.

The following is a summary of the changes:

- The underlying btcjson significantly changed how commands work, so the
  internals of this package have been reworked to be based off of requests
  instead of the now non-existant btcjson.Cmd interface
- Update all call sites of btcjson.New<Foo>Cmd since they can no longer
  error or take varargs
- The ids for each request are part of the request now instead of the
  command to match the new btcjson model and are strict uint64s so type
  assertions are no longer needed (slightly improved efficiency)
- Remove the old temporary workaround for the getbalance command with an
  account of "*" since btcwallet has since been fixed
- Change all instances of JSONToAmount to btcutil.NewAmount since that
  function was removed in favor of btcutil.Amount
- Change all btcws invocations to btcjson since they have been combined
2015-04-05 22:56:39 -05:00
Dave Collins
d45f4c47a2 Update btcws path import paths to new location. 2015-02-19 13:08:29 -06:00
Dave Collins
23ab2bf329 Update btcjson path import paths to new location. 2015-02-19 12:00:51 -06:00
Dave Collins
7d4e1e17f0 Update btcnet path import paths to new location. 2015-02-05 23:39:15 -06:00
Dave Collins
ed821410cb Update btcwire path import paths to new location. 2015-02-05 15:50:03 -06:00
Javed Khan
20ff0689d8 Added async version for CreateNewAccount, RenameAccount 2015-01-23 17:32:22 +05:30
Dave Collins
64231158a0 Update btcjson import paths to new location. 2015-01-16 23:56:08 -06:00
Dave Collins
9e86f74c50 Update btcws import paths to new location. 2015-01-16 23:38:11 -06:00
Dave Collins
fccfbbb347 Update btcnet import paths to new location. 2015-01-16 17:36:51 -06:00
Dave Collins
c1df139e32 Update btcwire import paths to new location. 2015-01-16 15:28:53 -06:00
Javed Khan
132207cb3f Added CreateNewAccount, RenameAccount 2015-01-17 00:45:41 +05:30
Dave Collins
d5cbdf8492 Fix a couple of issues found by golint. 2015-01-15 18:09:18 -06:00
Dave Collins
3dfefc978f Update btcutil import paths to new location. 2015-01-15 10:41:20 -06:00
Dave Collins
c74bb4e087 Update license year to 2015. 2015-01-03 02:24:28 -06:00
Dave Collins
a8dda1fabf Add ListReceivedByAddress support.
This commit also fixes a couple of comment typos found while adding
support for ListReceivedByAddress.

Closes #20.
2014-10-26 17:16:28 -05:00
Javed Khan
331f25f506 compatiblity hack for blockchain.info getbalance 2014-09-10 21:22:09 +05:30
Dave Collins
a07dadb600 Add Move support.
This commit adds the Move, MoveAsync, MoveMinConf, MoveMinConfAsync,
MoveComment, and MoveCommentAsync functions for issuing the "move" RPC
with various optional parameters.

Closes #16.
2014-07-09 21:42:50 -05:00
Dave Collins
0e463baf95 goimports -w . 2014-07-02 19:34:05 -05:00
Josh Rickmar
130edaec65 Add ListLockUnspent support.
Closes #11.

ok @davecgh
2014-06-30 10:30:11 -05:00
Josh Rickmar
4c045cc1ec Add LockUnspent support.
Closes #10.

ok @davecgh
2014-06-30 10:30:10 -05:00
GeertJohan
f1bfb5dc1c Add ImportPrivKey versions with Label and Rescan arguments. 2014-06-28 23:34:38 -05:00
Dave Collins
67d570e660 Correct a few cases of address encoding.
There are certain RPCs where an address should be sent as the raw string
instead of the encoded bitcoin address since the RPC handler on the other
end expects "keys" instead of Bitcoin addresses.

For example, the multisignature RPCs addmultisigaddress and createmultisig
can work with pubkeys (compressed, uncompressed, or hybrid) as well as
Bitcoin addresses.

The original issue which prompted these changes was report by Paul Snow on
IRC.
2014-06-12 22:55:30 -05:00
Josh Rickmar
cfb46e2c43 Add getinfo support. 2014-06-11 16:38:54 -05:00
Josh Rickmar
1ec6dde39c Add custom/raw request/response support. 2014-06-11 16:38:54 -05:00
kargakis
a785ef6424 minor syntax fixes 2014-06-02 17:31:02 +03:00
Dave Collins
0c586634bd Update for recent btcutil API changes. 2014-05-27 17:03:09 -05:00
Dave Collins
6af13826ae Convert {Dump,Import}PrivKey to use new WIF type.
The btcutil package recently exposed a WIF type to provide more
functionality and simplify working with WIF strings.  This commit changes
the DumpPrivKey and ImportPrivKey RPCs to use the new WIF type.
2014-05-21 20:00:11 -05:00
Dave Collins
9d9c343247 Make nil pointer handling consistent across RPCs.
There are several RPCs which accept a pointer to a hash, transaction,
block, etc.  Previously not all RPCs handled being passed a nil pointer
consistently.

Closes #4.
2014-05-21 19:53:46 -05:00
Dave Collins
57738b1920 gofmt 2014-05-21 19:24:45 -05:00
Josh Rickmar
85886913b8 Implement Client methods for listunspent requests. 2014-05-12 16:43:30 -05:00
Dave Collins
80f9a8e5e2 Fix FutureWalletPassphraseChange.Receive comment. 2014-05-08 13:12:56 -05:00
GeertJohan
0cc22e1134 Make btcrpcclient use the new and consistent reply types. 2014-05-07 11:23:00 -05:00
Dave Collins
e3f130ade5 Initial commit. 2014-05-07 11:14:39 -05:00