Commit graph

189 commits

Author SHA1 Message Date
rorp
b044b6400d
Implement Wallet.listTransactions() (#1744) 2020-08-05 07:21:12 -07:00
Ben Carman
7db465f222
Callbacks to appconfig (#1740)
* Node Callbacks to appconfig

* Move WalletCallbacks to WalletAppConfig

* Update Docs
2020-08-04 12:27:21 -05:00
rorp
c3b7629e51
Fix Postgres types (#1723)
* Fix Postgres types

* update DbManagementTest
2020-07-30 16:42:49 -05:00
Ben Carman
d6ce8dee0b
Move Node type of out Wallet API (#1708)
* Move Node type of out wallet api

* Remove extensions, add scaladocs
2020-07-29 05:57:48 -05:00
Ben Carman
96ebf2b6a4
Wallet API remove app config (#1706) 2020-07-28 15:19:10 -05:00
Nadav Kohen
436396773d
Fix All Loggers! (#1695)
* Fixed logging so that appenders are always started when logging is happening

* Started rolling policy so that file appenders could start in getLoggerImpl
2020-07-28 07:13:38 -05:00
Ben Carman
d5a0bcd51e
Wallet API, widen key manager definition, remove unlock functions (#1705) 2020-07-28 07:02:15 -05:00
Ben Carman
68608199ce
Wallet API move execution context (#1707) 2020-07-28 07:00:59 -05:00
Ben Carman
24f83d2802
Create HDWalletApi (#1693)
* Create HDWalletApi

* Rename createWallet to createHDWallet, add listDefaultAccountUtxos function

* Change return types to HDWalletApi

* Fix warning
2020-07-27 14:06:48 -05:00
Ben Carman
8102fde681
Move function defs from wallet api to wallet (#1694) 2020-07-25 16:37:48 -05:00
Ben Carman
c64a590d1a
Skip downloadBlocks if given an empty Vector (#1690) 2020-07-21 13:59:07 -05:00
Ben Carman
3a1f3d3497
Unreserve spent utxos (#1676) 2020-07-19 10:40:09 -05:00
Ben Carman
c6f1dcf6fe
Fix CoinSelector for KiloX fee rates (#1664) 2020-07-16 10:18:22 -05:00
Ben Carman
407c19bf01
Enforce unique outpoints for SpendingInfoDb (#1673) 2020-07-15 14:09:44 -05:00
Ben Carman
9ed795718f
Let Wallet find utxos by state (#1668) 2020-07-15 13:07:55 -05:00
Ben Carman
15ddc74c25
Random Coin Selection (#1663) 2020-07-14 10:12:05 -05:00
Ben Carman
c2fa7d7cc8
Address Tagging Attempt 2 (#1320)
* Address & UTXO tagging

* Fix docs

* Remove useless function, improve docs

* Fix rebase errors

* Rebase fixes

* Fix docs

* Fix small test errors

* Fix Postgres migration

* Fix postgres
2020-07-08 14:38:39 -05:00
Ben Carman
a2ce5e5a8c
Rework signing logic to take full funding transaction (#1560) 2020-06-25 16:10:36 -05:00
Ben Carman
021e21d61b
Rescan when UTXOs don't have associated transactions (#1562)
* Rescan for missing utxos

* Move to Wallet.start

* Start and stop wallet threads with wallet

* Fix warning
2020-06-25 07:58:10 -05:00
Ben Carman
fdb4026356
Formatting Fix (#1606) 2020-06-24 19:50:07 -05:00
Ben Carman
ea62374fc6
Fix WalletAppConfig.hasWallet for Postgres (#1576) 2020-06-24 14:05:43 -05:00
Ben Carman
102e5775f7
AppConfig Start Interface (#1598)
* AppConfig Start Interface

* Use StartStop interface
2020-06-21 09:33:43 -05:00
Scala Steward
e6d1471af0
Update scalafmt-core to 2.6.0 (#1579)
* Update scalafmt-core to 2.6.0

* Upgrade scalafmt, fix all formatting errors

* Scalafmt on 2.12

* fix test

* More fixes

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-19 10:38:12 -05:00
Nadav Kohen
a84543cff5
Pulled down dlc CLI code (#1589)
* Pulled down dlc CLI code (returns 400 Bad Request when called)

* Added decodeRawTransaction to server

* Moved decoderawtransaction to CoreRoutes

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-18 13:55:17 -05:00
Nadav Kohen
de048e448c
Refactored to allow support and disabling of RBF (#1588)
Co-authored-by: Ben Carman <benthecarman@live.com>
2020-06-18 13:23:14 -05:00
Ben Carman
e63061e9b9
Wallet callbacks (#1543)
* Wallet Callbacks

* Move noop to Callback

* Add docs

* Add tests for wallet callbacks

* Use BitcoinAddress instead of AddressDb, improve tests
2020-06-17 17:21:19 -05:00
Chris Stewart
1305e53f1a
2020 06 14 wallet root accounts (#1556)
* Implement unit test cases for initializing a wallet twice, and failing with an exception when we initialize a wallet with a different key-manager

* Use bip39PasswordOpt cached in the WalletUnitTest suite

* Turn off logging

* Run scalafmt

* Turn log level back to WARN

* Run scalafmt
2020-06-17 15:11:42 -05:00
Nadav Kohen
38a73de48f
Lots of misc. improvements from dlc branch (#1583) 2020-06-17 14:34:01 -05:00
Nadav Kohen
2b91c39616
Added compile scope scalafmtCheck to travis runs (#1563) 2020-06-16 15:16:43 -05:00
Chris Stewart
4ee234d999
2020 06 12 mv to appconfig (#1553)
* Move hasWallet() to WalletAppConfig

* Move helper methods to create data dstructures in a project to their respective AppConfig file
2020-06-16 12:49:32 -05:00
Nadav Kohen
6b1973264e
Fixed all walletTest threads not being closed (#1552) 2020-06-15 10:50:53 -05:00
Chris Stewart
9dea4254be
2020 06 09 addr invoice string factory (#1538)
* Implement StringFactory with Address and LnInvoice

* Address code review

* Run scalafmt
2020-06-11 10:44:12 -05:00
rorp
a9430c2d5a
PostgreSQL support (#1315) 2020-06-02 16:37:48 -05:00
Ben Carman
3e323ce18e
Fee Rate Api Support (#1470)
* Fee Rate Api Support

* FeeRateProvider Tests

* Rename folder

* Fix docs
2020-05-29 13:01:20 -05:00
Nadav Kohen
13884f5470
Rework Standard Finalizer (into pieces) (#1473)
* Made the standard non-interactive tx finalizer simple using composition of its (reusable) pieces

* Responded to code review and made minor improvements

* Fixed docs
2020-05-27 18:05:37 -05:00
Ben Carman
5d276d220f
Attempt to fix database locking errors in process tx test (#1477) 2020-05-27 15:26:49 -05:00
Ben Carman
5189673a62
Fix FeeUnit match not being exhaustive (#1472) 2020-05-27 06:06:06 -05:00
Chris Stewart
5508af57a2
Create a simplified version of the WalletApi.unmarkUTXOsAsReserved() that just takes in a tx and scans outpoints if they are in our wallet, also move the mark/unmark methods out of Wallet.scala and into UtxoHandling.scala (#1463) 2020-05-25 14:45:38 -05:00
Chris Stewart
0a35cdb6ef
Implement AppConfigFactory (#1462)
* Implement AppConfigFactory

* Fix docs
2020-05-25 14:43:37 -05:00
Ben Carman
d6978e01bb
Fix balance by account (#1457) 2020-05-22 06:40:23 -05:00
Ben Carman
a1b220a473
Add ability to unreserve utxos (#1458) 2020-05-22 06:29:11 -05:00
Nadav Kohen
fec601c8f5
TxBuilder Refactor (#1426)
* Refactored Transaction

Created RawTxBuilder

Created RawTxFinalizer as layer on top of RawTxBuilder

Introduced RawTxSigner and replaced TxBuilder!

Deleted TxBuilder!

* fixed things after rebase

* Made RawTxBuilder compatible with older versions of scala

* Began responding to review

* Made Finalizer take a Builder rather than the other way around

* Added composition for finalizers

* Ran scalafmt

* Updated txbuilder example documentation

* Moved tests from old TxBuilderTest files to relevant new test files

* Added scaladocs
2020-05-21 09:47:08 -05:00
Ben Carman
c811ccc62a
Add option to correctly use logback config (#1398)
* Logger now uses correct parent logger for all, names appenders correctly

* Set logback to true for tests, rename file

* Fix docs
2020-05-20 15:46:24 -05:00
Ben Carman
9172aa3206
Add ability to make OP_RETURN commitments (#1417) 2020-05-18 14:27:05 -05:00
Ben Carman
c4382cddb6
Wallet Send with coin selection algorithim (#1409) 2020-05-18 11:26:39 -05:00
Nadav Kohen
aee88684f2
InputInfo Refactor (#1400)
Added OutputReference and introduced public key computation on SPKs

Made InputInfo into an ADT

Made UTXOSpendingInfo use InputInfo

Replaced UTXOSpendingInfo with NewSpendingInfo and got non-test things compiling

Made aliases for (NewSpendingInfo/NewSpendingInfoFull/NewSpendingInfoSingle)[InputInfo]

Got rid of source code mention of UTXOSpendingInfo

sbt compile passes

tests compile

Fixed all coreTest tests

Renamed to UTXOInfo

Some cleanup

Moved redeem script and script witness accessors to companion object

Responded to code review

Added OutputReference and scaladocs

Moved p2pkhPreImageOpt downstream and generalized to hashPreImages

Fixed adding-spks.md

Fixed psbts.md and txbuilder.md

Renamed UTXOInfo

Apply renaming to docs
2020-05-15 11:14:15 -05:00
Ben Carman
11fb182c10
Fix Warning in TransactionDb (#1427) 2020-05-15 06:43:57 -05:00
Ben Carman
a9cd4450da
Add list unused addresses call (#1408) 2020-05-12 09:29:02 -05:00
Ben Carman
8f5c845a06
Add listFundedAddresses call (#1407) 2020-05-12 07:33:22 -05:00
Ben Carman
bf6d90acfb
Add listSpentAddresses call (#1406) 2020-05-12 07:24:52 -05:00