Commit Graph

403 Commits

Author SHA1 Message Date
Chris Stewart
33b2b50bb2 Add database configuration as a heading that can be hyper linked too (#1501) 2020-06-03 06:15:33 -05:00
rorp
823a392e98 PostgreSQL support (#1315) 2020-06-02 16:37:48 -05:00
Ben Carman
c10d5bc89b 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
bc5953b6c8 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
4871410306 Update docs pertaining to logging (#1471) 2020-05-26 15:33:27 -05:00
Nadav Kohen
4f2c8f73f1 CryptoContext Refactor (#1469)
* Moved logic to disable use of secp256k1 library into crypto project

* Fixed secp doc
2020-05-26 13:05:21 -05:00
Nadav Kohen
dfd3353cc4 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
99db9062ac 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
bfa9637156 Add DLC GUI Docs (#1438) 2020-05-18 19:04:31 -05:00
Nadav Kohen
4eb9980d6b 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
15b6b2376f Fix Oracle info in DLC doc (#1401) 2020-05-07 14:26:26 -05:00
Chris Stewart
d3b18137fd DLC code snippet clarification (#1393)
* Give the different outcome amounts a val for clarity in documentation, add a missing import, and change the hash being signed by the oracle to more descriptive of a specific event

* Fix missing amounts

* Clarify comment even more
2020-05-06 16:47:21 -05:00
Chris Stewart
83b6a74b18 Add rpcport configuration options in both bitcoin-s.conf and as a command line parameter (#1387)
Implement ability to specify rpcport with bitcoin-s-cli
2020-05-04 19:09:32 -05:00
Nadav Kohen
a503441619 Crypto Project Refactor (#1380)
* Added crypto project and decoupled BitcoinSLogger from NetworkElement

Decoupled BitcoinSLogger from Factory

Moved NetworkElement into crypto project

Moved Factory and BitcoinSUtil (renamed to BytesUtil) to crypto project

Moved MaskedToString to crypto project

Added BytesUtil to imports and cleaned up CryptoUtil.recoverPoint

Moved the rest of crypto stuff to the crypto project

Moved crypto tests to crypto-test project

* Added documentation for crypto project
2020-04-30 12:34:53 -05:00
Ben Carman
6d7685b76e Add wallet creation time for rescans (#1353)
* Add wallet creation time for rescans

* Fix docs

* Clean up and add test

* Remove account bday

* Fix compile issue and docs

* Add more chain handler tests

* Use Instant over Long, add docs

* Fix docs
2020-04-29 09:49:41 -05:00
Ben Carman
4234561db9 Remove Unlocked vs Locked Wallet distinction (#1379)
* Remove Unlocked vs Locked Wallet distinction

* Add back TODO comment
2020-04-28 13:58:14 -05:00
Chris Stewart
19db1b765a Remove compile for dlc.md as we don't have schnorr in master (#1378) 2020-04-26 21:04:16 -05:00
Chris Stewart
e02664b01a Add fixed dlc doc instructions (#1376) 2020-04-26 18:18:27 -05:00
Ben Carman
37c62369eb Batch processing compact filters (#1363)
* Batch processing compact filters

* Use one vector, rename param

* Fix compile issue on older versions

* Process sequentially
2020-04-26 09:34:41 -05:00
Chris Stewart
4c3f6f8e67 2020 04 08 multi db dao (#1355)
* Implement Slick's multi database support via our DAOs

WIP2 work on chain project

WIP make JdbcProfieComponent so we have a common JdbcProfile

WIP2

Clean up a few things

WIP got CRUDAutoInc compiling

Get closer to everything compiling in the chain project

Begin moving database code into JdbcProfileComponent

WIP source compiling

Get dbCommonsTest/ test cases passing

Get rest of tests compiling and passing

* Rebase onto master, fix conflicts

* Run scalafmt

* Run scalafmt again

* Cleanup a few compiler warnings by adding type annotations to thigns

* Explicitly cast tables where they are needed in the wallet project where we need TableQuery for foreignkey / joins in slick

* Redo definition of 'table' to use the profile.api.TableQuery in scope

* Rename all *Table.scala files to *Db.scala

* First crack at address ben's code review

* Fix docs compile issue

* Fixed casting (#30)

* Fixed AppConfig casting

* Fixed TableQuery casting in DbManagement subtypes

* Fixed casts in DAOs relating to internal types

* Address nadav's code review, move JdbcProfileComponent into it's own file

* Remove unused listTables() method

Co-authored-by: Nadav Kohen <nadavk25@gmail.com>
2020-04-25 11:28:58 -05:00
Ben Carman
3d26ad8f34 Rescan from account (#1348) 2020-04-24 09:37:12 -05:00
Ben Carman
39088475e3 Add sendrawtransaction CLI and Api commands 2020-04-21 13:14:02 -05:00
Chris Stewart
8f4702cce8 Add information on how to build libsecp256k1 to the secp README (#1318)
* Add information on how to build libsecp256k1 to the secp README

* Rebase and add link to internal docs
2020-04-20 12:25:31 -05:00
Nadav Kohen
c46a96b6e7 Update Secp256k1 (#1310)
* Rebased secp onto bitcoin-core's master (see https://github.com/bitcoin-s/secp256k1/pull/3) and built linux binaries

* Wrote a doc on adding to jni

* Built for website

* Added build instructions for other OSs

* Added table of contents using doctoc

* Edited .gitmodules

* Added windows binaries

* Updated secp branch

* Added osx binaries

* Added make check-java to doc

* Fixed typo
2020-04-14 15:42:58 -05:00
Chris Stewart
76a3edd0af 2020 04 02 get new address queue (#1299)
* WIP: Build queue for getnewaddress

* Implement background thread to process requests to getNewAddress so that we fix issue 1009 with it's async issues

* Run scalafmt

* Replace the mutable.ArrayBuffer in AddressHandling with ConcurrentLinkedQueue

* Put FundTransactionhandling.fundRawTransactionInternal's call to getNewChangeAddress() into the for expression so we don't generate an address when the funding of the transaction fails when selecting utxos

* Move thread initialization out of method

* Switch to using ArrayBlockingQueue, which will block thread with .take() so we don't need to loop constantly, add 'addressQueueSize' and 'addressQueueTimeout' configurations

* Update wallet-test/src/test/scala/org/bitcoins/wallet/AddressHandlingTest.scala

Co-Authored-By: rorp <rorp@users.noreply.github.com>

* Add error handling to return the failed future if the queue is full, add a unit test for when the queue is full

* Run scalafmt

* Rebase

* Add scaladoc for throwing an exception

* Run scalafmt again

Co-authored-by: rorp <rorp@users.noreply.github.com>
2020-04-10 14:19:39 -05:00
Ben Carman
891e6da11d GetAddress Wallet API call (#1287)
* GetAddress Wallet API call

* Add ability to get unfunded address

* Generate new address if no unfunded addresses

* Add test

* Add wallet get address documentation
2020-04-09 15:33:11 -05:00
Nadav Kohen
8ffd2d11ae Added Tables of Content to the bigger docs using doctoc, updated signing-transactions.md (#1319) 2020-04-08 16:51:37 -05:00
Ben Carman
b3250dcfba Update TxoState for transactions after they've been confirmed (#1178)
* Add onBlockHeadersReceived NodeCallback

* Add requiredConfirmations config option

* Update TxoState for transactions after they've been confirmed

* Response to review

* Fix compile issue
2020-04-08 16:51:17 -05:00
Nadav Kohen
ec0af42ce4 Removed SingleSigner abstraction and replaced with a simple signSingle method in SignerUtils (#1308) 2020-04-07 14:26:07 -05:00
Ben Carman
c2a0051411 Network specific filterHeaderBatchSize (#1286)
* Network specific filterHeaderBatchSize

* Catch correct exceptions

* Add filter-header-batch-size-regtest to example configs
2020-04-03 17:36:29 -05:00
Ben Carman
7326fd5035 Change NodeCallbacks to Future[Unit] s (#1206)
* Change NodeCallbacks to Future[Unit] s

* Fix compile issue

* Change try to future

* Change Future.sucessful(()) to FutureUtil.unit

* Callback failure handling, callback docs

* Create functions for executing callbacks, make merkleblock a future

* Convert MerkleBuffersTest to BitcoinSAsyncTest

* Fix compiler errors

* Reorder UpdateBloomFilter tests so that txFromWalletP is a success for both calls and the other test does not wait on the promise to complete
2020-04-03 08:57:41 -05:00
Nadav Kohen
c31a4a3f8a Constructed simple Bitcoin-S wallet GUI (#1285)
* Constructed simple Bitcoin-S wallet GUI

* Added note about bitcoin-s server in doc

* Removed wallet dep from gui

* Replaced lambdas with constructors for compatibility with scala 2.11

* Fixed after rebase
2020-03-31 14:30:24 -05:00
Chris Stewart
2f3c5c5541 Add new GPG key (#1263) 2020-03-23 09:46:56 -05:00
Chris Stewart
de46e74f1a Actually add all files for 0.3.0 on the website so they show up (#1256) 2020-03-19 07:32:02 -05:00
Chris Stewart
436b8d7733 Create v0.3.0 of the website (#1253)
* Create v0.3.0 of the website

* Add section on how to generate a new version
2020-03-18 18:48:05 -05:00
Chris Stewart
5b28aa6262 Add trusted peer caveat in node.md (#1250) 2020-03-18 10:11:26 -05:00
Chris Stewart
b9e21d32f2 Add a philsophy section on getting-started.md, add missing libraries (#1251) 2020-03-18 10:11:06 -05:00
Chris Stewart
a06bf3a22b 2020 03 17 secp256k1jni md (#1248)
* First draft secp256k1.md

Fix imports/names

Fix nits

* Address nadav's code review
2020-03-18 05:51:54 -05:00
Chris Stewart
3e618ec1f6 Add headings for both Node and cofiguration on the sidebar (#1241) 2020-03-15 15:52:58 -05:00
Chris Stewart
c30efd4919 Add testkit md (#1234)
* Add testkit md

* Address ben's code review

* Fix links
2020-03-15 12:39:43 -05:00
Chris Stewart
6a76f5c543 Add disclaimers to the wallet/key-manager around API breaking changes… (#1237)
* Add disclaimers to the wallet/key-manager around API breaking changes and limitations of the current iteration of the wallet

* Reword as Ben suggests
2020-03-15 12:39:01 -05:00
Chris Stewart
6964768292 2020 03 13 node md (#1229)
* Implement example of starting a neutrino node and example of adding a callback to node.md

Fix port number

* Clean up some names in the example

* Make sure we get the correct bitcoind binary with neutrino p2p support in the example
2020-03-14 08:49:39 -05:00
Chris Stewart
cd84e3483d 2020 03 06 wallet rescan test (#1218)
* Add wallet rescan tests

* Create FilterSync, which gives us an API inside of the chain project to sync filters with

Add another unit test to filter sync

Add more unit tests for ChainSync and FilterSync

Clean up some docs, remove some extra lines of code

Run scalafmt

Add filter-sync.md

Cleanup some nits

Add more information of how FilterSync.syncFilters() works

Add 'FilterWithHeaderHash' type so that we can actually validate/verify block headers that are being fed into the chain project

Run scalafmt, hide imports in filter-sync.md so code appears cleaner

Move implicits out of invisible block as it seems to cause errors

Make it so FilterSync processes filters in batches rather than fetching them all at once

Fix compile error

* WIP bitcoind implement ChainQueryApi

* rework fixtures to be able to support injecting ChainQueryApi implemented by bitcoind into our fixture infrastructure for creating wallets

* Fix rebase problem

* Implement getFiltersBetweenHeight() with ben's solution

* WIP Start implementing NodeApi against bitcoind

* Actually inject the bitcoind backed nodeApi into our fixture

* Get first rescan test working for rescanning the entire blockchain

* Implement test case for rescanning from a specific height

* Fix NeutrinoNodeWalletTest test case that uses a experimental version of bitcoind, for now i believe our experimental binary is on v18

* Add wallet-rescan.md, add helper method to WalletApi that allows you to clear out the wallet's utxos/addresses

* Add another log to try to debug CI

* Address code review

* Fix wrong ordering of deletion of tables in clearUtxosAndAddresses()

* reset logging level
2020-03-13 16:11:02 -05:00
Ben Carman
54f90f5fad Order website sidebar by project, fix capitalization (#1226) 2020-03-13 09:54:07 -05:00
Ben Carman
c8c3060371 Remove unused imports in docs 2020-03-12 17:30:59 -05:00
Ben Carman
74e2e79896 Fix error, add await to psbt doc (#1220) 2020-03-12 14:02:14 -05:00
Ben Carman
7ae559f878 Merge pull request #1202 from benthecarman/psbt-single-docs
Docs for PSBT signing with BitcoinUTXOSpendingInfoSingle
2020-03-12 09:55:35 -05:00
Nadav Kohen
a09e976d66 Added hash types to scriptsignature generators (#1219) 2020-03-11 22:25:21 -05:00
Ben Carman
381251b687 NodeApi doc (#1205)
* NodeApi doc

* Add example

* make imports invis, add example

* Fix invis imports
2020-03-11 11:07:30 -05:00
Ben Carman
c6bad80814 fix compile issues 2020-03-11 09:48:53 -05:00
Ben Carman
b1d037bff2 fix compile issue 2020-03-11 09:48:12 -05:00
Ben Carman
c535985d6f PSBT signing with BitcoinUTXOSpendingInfoSingle 2020-03-11 09:48:09 -05:00
Ben Carman
a70b03d08a ChainQueryApi doc (#1204)
* ChainQueryApi doc

* Add example

* make imports invis, add example

* Fix invis imports
2020-03-11 08:56:37 -05:00
Chris Stewart
4c9a22f1e1 2020 03 08 filter sync (#1209)
* Create FilterSync, which gives us an API inside of the chain project to sync filters with

Add another unit test to filter sync

Add more unit tests for ChainSync and FilterSync

Clean up some docs, remove some extra lines of code

Run scalafmt

Add filter-sync.md

Cleanup some nits

Add more information of how FilterSync.syncFilters() works

Add 'FilterWithHeaderHash' type so that we can actually validate/verify block headers that are being fed into the chain project

Run scalafmt, hide imports in filter-sync.md so code appears cleaner

Move implicits out of invisible block as it seems to cause errors

Make it so FilterSync processes filters in batches rather than fetching them all at once

Fix compile error

* Add comment about trust model

* Run scalafmt
2020-03-10 18:01:14 -05:00
Nadav Kohen
6ed12884ac Adding new SPK doc (#1208)
* Added a document explaining how to add new script types.

* built website

* Added a doc explaining the differences between full and single signing

* Added design philosophy section

* Responded to review

* mdoc now compiles the code within adding-spks.md, with some caveats surrounding sealed traits

* Added explanitory comment
2020-03-10 14:30:16 -05:00
Chris Stewart
65ddeb6798 Make imports in chain.md invisible (#1213)
* Make imports in chain.md invisible

* Hide imports in wallet.md

* Make all core module md files imports hidden

* Cleanup imports on rpc markdown docs

* Try and figure weird travis behavior

* Get rid of uneeded nest qualifiers on mdoc
2020-03-10 12:49:22 -05:00
Ben Carman
237e61cccc Fix typo in docs (#1203) 2020-03-06 09:24:06 -06:00
Chris Stewart
cb8770a73b Update eclair.md, also add code example (#1192) 2020-03-04 09:41:21 -06:00
Chris Stewart
7265105c66 Update website configuraiton.md with migrations information (#1189) 2020-03-04 09:40:50 -06:00
Nadav Kohen
cbefe389f5 Added a getting-setup markdown doc for the website (#1167)
* Added a getting-setup markdown doc for the website

* Responded to Ben's review

* Added testnet section

* Added DLC doc

* Got the website working locally

* Fixed linking

* Responded to review
2020-02-26 13:09:44 -07:00
Chris Stewart
03cfbc0803 2020 02 21 datadir configurable (#1156)
* Make it so that you can pass in the datadir from the command line

* Add example on website

* implement ben's solution
2020-02-24 09:50:40 -06:00
Chris Stewart
8ebb53647c Add section to contributing.md for when travis ci won't run for new contributors (#1135) 2020-02-19 06:51:28 -06:00
Ben Carman
347a033eae Example config on in documentation (#1069) 2020-01-27 07:04:53 -06:00
Nadav Kohen
48f775182b PSBT Support (#1031)
* PSBT Serialization/Deserialization (#917)

* PSBT Serialization and Deserialization

* Remove debug code

* Create PSBTParseResult, Add more psbt test cases, and various small nits

* PSBT version checking

* Remove PSBTHelper, give PSBTRecord and PSBTMap a fromBytes

* Fix compile issue, preserve ADT

* PSBT Combiner

* PSBT Updater

* Fix PSBT version number to be read as little endian

* Make function names more clear, add scaladoc, require not finalized

* Combiner scaladocs

* Test case from BIP

* Make compatible with older versions

* PSBT: Fix for EmptyWitness changes (#968)

* PSBTInputMap to UTXOSigningInfo

* Remove vars

* Add missing param

* Fix byteVectorOrdering for when x == y

* getUTXOSpendingInfo Tests

* Fix formatting errors

* Give conditional path default value

* formatting fix

* Fixed InputPSBTRecord.FinalizedScriptSig using asmBytes (#1004)

* Fixed PSBTTest after rebasing onto master

* PSBT Constructors and Extraction (#997)

* Added PSBT constructors

* Revived option to use signers in toUTXOSpendingInfo

* Added transaction extraction

* Responded to code review

* Added extraction test from BIP

* Added validation (option) to PSBT extraction

* Added property based test for PSBT.extractTransactionAndValidate

* Marked PSBT as new code for PropertyCheckConfiguration

* PSBT Finalizer (#1002)

* Added finalizing functionality to PSBTs

* Cleaned things up

* Added finalizer test, fails

* Check that PSBT is not already finalized when finalizing PSBT

* Added P2PKWithTimeout cases

* Formatting fix

* PSBT Generators (#1019)

* Introduced non-finalized constructor

* Added property based test comparing finalized and un-finalized construction, it currently fails due to EmptyScriptPubKey not being supported in various ways. Also fixed a ton of bugs!

* Fixed easy bugs relating to EmptyScriptPubKey, one is left

* Fixed the last bugs (multisig order and 0-of-n stuff) and now tests pass!

* Separated out direct finalized PSBT construction from non-finalized PSBT construction

* Translated construction work in tests into PSBT generators

* Added serialization symmetry test

* Made PSBT fee generation dependent on other generators to ensure low enough fees for signing

* Responded to code review

* Added scaladocs

* Fixed arbitraryPSBT to work with older scala versions

* Fixed PSBT compilation breakages from rebase

* Fixed test breakages from rebase

* Validate the PSBT unknown is not a known field

* Increase code coverage on PSBT tests

* Address review

* formatting

* Add error messages, rename function

* Psbt Signer (#1025)

* PSBT Signer

* Create addSignature function for PSBTs

* Use PartialSignature instead of Tuple

* Create extra util functions

* scaladoc and simplify case

* Formatting fix for psbt scaladocs

* Clean up code, add error messages, and scaladoc

* add type hints

* Change InputPSBTMap.fromUTXOSpendingInfo to use BitcoinSingleSigner

* optimize import

* Define separator byte for psbt map

* getRecords simplification

* remove braces, add error message

* PSBT stuff assigned to nkohen (#1035)

* Responded to psbt review assigned to me

* Moved separatorByte to a place where all can use it

* PSBT independent record calls (#1037)

* PSBT independent record calls

* move logic to super class

Co-authored-by: Nadav Kohen <nadavk25@gmail.com>

* Reworked PSBT finalization to return a Try[PSBT] rather than an Option[PSBT] (#1036)

* PSBT signer property based tests (#1038)

* PSBT property based tests

* Address review

* PSBT Combiner property based tests (#1039)

* PSBT Combiner property based tests

* Create pruneGlobal util function

* Switch to arbitrary gen

* Use BaseTransaction instead of Transaction

* Fix transaction witness to work from base transactions

* PSBTs response to Chris's review (#1046)

* PSBT chris's review

* Rename val, give master fingerprint a val

* Formatting fix

* Responded to code review from chris assigned to nkohen

* Split PSBT.scala into many files

* PSBT Docs (#1048)

* PSBT docs

* Fix compiler error, remove nesting

* PSBT output updater tests

* Validate psbt outputs

* Clean up code

* Remove P2WPKHWitnessV0 addition

* format

* PSBT Updater property based tests

* Move code to match block

* EmptyScriptWitness check

* Address nadav review

* Remove unnecessary code, make utxo adder better

* Move require and add error message

* Move require

* PSBT unit tests by Ben

* Change to EmptyScriptPubKey

* Added unit tests to increase code coverage

* responded to review

* Move PSBT unit test to separate file

* Make unknown generator only generate distinct records

* Use groupBy key instead of distinct

* use only first element

* Combine distinctness by key

Co-authored-by: Ben Carman <benthecarman@live.com>
2020-01-23 11:36:42 -07:00
Nadav Kohen
db6447d88a Single Signing (#1020)
* Introduced UTXOSpendingInfoSingle

* Implemented constructors for UTXOSpendingInfoSingle

* Introduced BitcoinSignerSingle

* Implemented SingleSigner

* Added property-based test for SingleSigner, it fails

* Fixed SignerTest :)

* Responded to code review

* Added scaladocs

* Fixed p2sh(p2wsh) signing

* Responded to code review and separated UTXOSpendingInfoSingle from UTXOSpendingInfoFull

* Fixed outputGen after rebase

* Fixed txbuilder.md to show this branch's changes
2020-01-15 10:00:55 -07:00
Chris Stewart
55f168f920 Implement abililty to use BIP39 password. This means this password ne… (#990)
* Implement abililty to use BIP39 password. This means this password needs to be password through our various projects to be able to correctly generate the key that controls the wallet. This also renames 'CreateKeyManagerApi' -> 'BIP39CreateKeymanagerApi' as the bip39 password is needed when creating the KeyManager

* Add bip39 password to BIP39KeyManager.fromParams(), fix mdocs

* Fix bug in unit test were whe weren't specifying password

* Fix rebase issues
2020-01-03 11:03:45 -06:00
rorp
93c02f02d0 Automated wallet recovery (#985)
* Automated wallet recovery

* responded to the PR comments

* some more changes

* fix docs

* cleanup
2020-01-02 13:18:41 -06:00
Chris Stewart
c3fb7c9a67 This creates a subtype BIP39KeyManager and moves all existing KeyMana… (#988)
* This creates a subtype BIP39KeyManager and moves all existing KeyManager functionality to that subtype. We leave a empty 'KeyManager' trait for now

* Fix website docs
2019-12-27 10:09:04 -06:00
Chris Stewart
24ff908240 Move initialization of wallet entropy into the key manager (#966)
* Move initialization of wallet entropy into the key manager

* Enable key-manager in ci, add coverage minimum

* Add coverage minimum for key manager, add KeyManagerParams, start adding KeyManager test harness

* Remove success cases on ADTs, start using Either

* fix import

* Get test coverage to 90%

* Add documentation for key-manager.md, add side bar for key-manager

* Fix wallet.md

* Make seedPath default to baseDatadir, so we don't have a unique seed for every network. Add more documentation

* Address code review

* Address code review from Ben

* Add missing import

* Add more tests for coverage
2019-12-26 19:12:08 -06:00
Chris Stewart
78176af1e4 Add server to sidebar.json so that it shows up (#981) 2019-12-22 10:47:15 -06:00
Chris Stewart
67eb7df235 2019 12 17 sign ext key (#959)
* Create ExtSign, use it on ExtPrivateKey

* Add documentation on how to Sign things with ExtSign

* Add ExtSign.sign for a bip32 path

* Make sign(bytes,path) not return a Future, add documentation

* Address nadav's code review

* Fix mdoc sign.md
2019-12-20 12:47:10 -06:00
Ben Carman
8241c8c2f8 Docs: update Security.md and fix edit button (#965) 2019-12-18 13:07:17 -06:00
Ben Carman
79a815a631 Update bitcoind docs to have correct versions 2019-12-17 08:47:08 -06:00
rorp
2c53a39fd1 Compute confirmations dynamically (#938)
* Compute confirmations dynamically
2019-12-14 12:06:22 -08:00
rorp
4acd1fbba9 Add a reference to ChainQueryApi to the wallet (#936)
* Add reference to ChainQueryApi to wallet
2019-12-10 14:22:33 -08:00
rorp
af70acb03b ChainQueryApi (#926)
* ChainQueryApi

* cleanup
2019-12-09 09:39:35 -06:00
rorp
cbd038b514 Neutrino Wallet: OnCompactFilter handler (#905)
* Neutrino Wallet: OnCompactFilter handler
2019-12-06 13:10:33 -08:00
Chris Stewart
f4e43ec4d8 2019 11 28 cli native image doc (#903)
* Add documentation about how the cli can be built with a native image

* Finish rest of documentation on building command line client for bitcoin-s

* Add missing akka actor on walletServer classpath, add plugins to be able to build the walletServer as a standalone jar

* Add server.md

* Rename walletServer -> appServer

* Address code review, add missing main class in server project

* Address code review
2019-12-04 07:25:03 -06:00
Chris Stewart
b9440384db Add documentation on env variable SBT_OPTS and add documentation about it (#914) 2019-12-03 19:01:34 -06:00
Nadav Kohen
f2081dfa46 OP_IF Signing (#827)
* Introduced ConditionalScriptPubKey

Some more progress

Added Conditional signing infrastracture, tests do not pass and there are no Conditional tests

Fixed tests!

* Redid calcLockTime and calcSequenceForInputs in TxBuilder (added Conditional support)

* Added ScriptGenerators for Conditional scripts, only one test to go!

* Fixed CLTV(Empty) tests

* Responded to code review

* responded to code review

* ScriptSignature only types Policy-compliant script signatures

* Fixed md doc
2019-11-05 18:48:50 -06:00
rorp
7e19a706de Make tests to not require pre-installed bitcoind (#766)
* Make tests to not require pre-installed bitcoind

* update docs
2019-10-01 06:19:11 -05:00
Chris Stewart
97472930d0 2019 09 27 logging refactor pt2 (#765)
* Remove AKKA_CONFIG that was preventing sane logging for akka, move db-commons reference.conf to testkit so we can control testkit applications, and then rename app/server/.../application.conf to reference.conf like good libraries should do

* Update contributing.md

* update a few more links inside of contributing.md

* Run scalafmt
2019-09-28 09:50:42 -05:00
Chris Stewart
f65f11aead Add akka logging documentation to our contributing.md (#764) 2019-09-27 10:56:16 -05:00
rorp
74a44d1c4d Initial BIP157 support (#695)
* WIP: Initial BIP157 support

* store block hash and hetgh along with its compact filter header

* download and parse block filters

* getcfilters/cfilter

* cfilter table

* rescan full filter chain

* improved rescan performance

* optimize compact headers download

* addressed the PR comments

* split SVP and Neutrino node implementations

* configurable filter batch sizes

* initial filter sync

* addressed comments

* chage filter table's primary key

* fix Golomb filter deserialization

* batch database inserts

* neutrino node test

* fixed node test

* addressed the PR comments

* serializers tests

* cleanup

* fix compilation errors

* fix unit tests

* increase test coverage

* enable NeutrinoNodeTest

* make scalafmt happy

* don't cache experimental binaries

* inclease test coverage

* fix unit tests

* more granular CI tests

* disable NeutrinoNodeTest

* refactor tests

* addressed comments

* test coveage

* fix formatting

* responded to the comments

* some more changes

* fix the build

* test coverage

* revert testnet3 config parameter

* minor changes

* cleanup
2019-09-25 13:18:51 -05:00
Torkel Rogstad
de39caf174 Add rudimentary docs for node, chain and wallet (#726) 2019-09-02 08:16:44 -05:00
Torkel Rogstad
8a58d7dde8 Make it possible to construct RPC client without ActorSystem (#725) 2019-08-30 15:12:18 -05:00
Torkel Rogstad
2f7fb05f96 Build and CI improvements (#710)
* Build and CI improvements

In this commit we:

1) Parallelize the Travis CI config, by splitting
    each project into its own Travis task
2) Download bitcoind binaries through sbt

* Use binaries downloaded by sbt task

* Make BitcoindRpcTestUtil work on Travis without bitcoind on PATH

* Add new downloadEclair task to sbt

* use sbt downloaded binaries in tests

* Fix Eclair and Bitcoind tests
2019-08-27 10:48:48 -05:00
Torkel Rogstad
c2f37335b8 Bump Scala versions (#697)
* Bump Scala versions

Support Scala 2.12.9
and 2.13.0.

To make this easier, we delete the `scripts` project. Everything
that was in here was covered by content on the website. We also
delete the `doc` folder, as that was a remnant from when `scripts`
was called `doc`.

* Crib uPickle akka-http support while we wait for publish

* Fix compiler warnings

* Add note on test logging to contribution guide

* Reduce duplication in Blockchain implementation

* Use Scala 2.12 for website

* Introduce compat package object for collections converters

* Fix Either compiler warnings

* Add sync-chain and create-wallet docs from deleted scripts

* Fix rebase goofup
2019-08-23 13:53:00 -05:00
Torkel Rogstad
a76f61f97c Add configurable logging to data directory (#640)
* Add logging to data directory

In this commit we add the ability for the node, chain
and wallet projects (+ the server) to log to the users
data directory instead of whatever directory the
binaries was launched from. This is inherently a bit
more complicated than our previous setup, because
we need to read the user directory before we can create
loggers. As a result of this, some files/methods were
moved around, so the relevant app config could be
found in scope.

We also  introduce several logging categories that can be
tuned individually through user configuration. These logggers
are exposed both as traits that give a field `logger`, or
as methods that return the required logger.

* Add datadir configuration to AppConfig

In this commit we add support for AppConfig to pick up
the data directory configuration file. We also add
a section to the contributing guide on how to tune
logging levels.

* Pass data directories explicitly for configuration
2019-08-01 06:01:56 -05:00
Torkel Rogstad
cee2665d49 Add note on how to build JAR files (#663) 2019-07-30 18:52:50 -05:00
Torkel Rogstad
eb3fbbb259 Add types for various bitcoind RPC exceptions
In protocol.h (Bitcoin Core) all RPC errors are enumerated. The
exceptions added here are copied directly from that file.
2019-07-16 12:20:24 +02:00
Torkel Rogstad
a71aecec52 Process outgoing transactions (#555)
* Split wallet functionality into multiple traits

In this commit we refactor LockedWallet into multiple traits
that provide functionality related to a subset of total wallet
functionality. This has the benefit of making it clear which
methods are helper methods that are only intended to be used
in a very specific setting, and which methods are part of the
internal wallet API that other parts of the wallet can use.

* Rework TransactionOutput and TransactionOutPoint to case classes

* Add extension methods for flattening lists of assertions

* Segregate confirmed and unconfirmed balance methods

* Add test for FutureUtil.sequentially

* Add trace logging of balance fetching

* Process outgoing TXOs

Move TX processing into separate trait, add internal API method

Unify DB representation of TXOs

    Prior to this commit we stored TXO information
    across diferent tables, with joins and tuples
    needed a bunch of places to keep track of
    everything we needed. In this commit we unify
    the tables, leaving us with only one table for
    TXOs.
2019-07-09 06:25:24 -05:00
cwaldron97
d18bd1ef44 New doc for Windows users (#572)
* new doc for windows Users

* Update docs/windows-users.md

Co-Authored-By: Torkel Rogstad <torkel@rogstad.io>

* Update docs/windows-users.md

Co-Authored-By: Torkel Rogstad <torkel@rogstad.io>

* additional changes to Windows guide. Need to figure out how to structure if I want to add to contributing instead

* Update windows-users.md
2019-07-08 15:01:23 -05:00
Torkel Rogstad
8fd9e0211c Add main method for running Mdoc
This allows working on the website without
opening sbt at all. bloop run docs -- --watch
compiles all Mdoc sources and outputs it into
the correct directory.
2019-07-03 16:04:17 +02:00
Torkel Rogstad
35b1d726fb Merge pull request #511 from torkelrogstad/2019-06-11-website-guides
Website guides on HD key and address generation
2019-06-11 18:06:13 +02:00
Torkel Rogstad
6e5ca0eeeb Add sections on generating addresses and expand HD section in website 2019-06-11 18:01:44 +02:00
Torkel Rogstad
6de0ba268e Bump P2P + crypto test coverage (#506)
* Rename P2P tests and move generators into correct package

* Add more tests for P2P messages

* Add note on coverage to contributing guide

* Replace network in P2P header with typed network

* Add more P2P tests

* Add more tests for ECPriv and ECPub
2019-06-11 10:01:46 -05:00
Torkel Rogstad
2815243e58 Docs: conditional Travis based on commit message 2019-06-03 11:18:19 +02:00
Torkel Rogstad
a19dc94bef Doc: Add stable and unstable version, try bitcoin-s script 2019-05-31 17:14:15 +02:00
Torkel Rogstad
b14a053bb6 Fix documentation for connecting to bitcoind 2019-05-31 17:14:08 +02:00
Torkel Rogstad
d3e6e4a65f Add Torkels PGP key to security.md (#483) 2019-05-29 05:26:28 -05:00
Torkel Rogstad
242f68cb42 Further specify how to publish website (#476) 2019-05-22 05:53:37 -05:00
Torkel Rogstad
6bc6378f96 WIP: Docusaurus website (#465)
* Docs: Introduce new Docusaurus-based website

This commit is the result of running
npx docusaurus-init, and nothing more.
Further changes will happen on top of
this, to make it easier to review changes
and update to newer versions of Docusaurus
in the future.

* WIP: Add Bitcoin-S website

Change the default Docusaurus template to a custom website. Goes
off of existing documentation, and moves it into the new docs and
website directories. Deletes some unused files, such as
BUILD_README.md

* Initial mdoc support

* Add Scaladoc to website

* Add SVG assets

* Change colors, flesh out pages, correct Scaladoc links

* Rename doc project to scripts, move security doc to website

* Add copy buttons to website code snippets

* Add doc and tasks for publishing website

* Refactor how paths get copied after generating Scaladocs

* Add Get Started button

* Replace bitcoin-s logo with white text

* Add Montserrat font for headers

* flesh out user showcase and landing page

* Change Scaladoc URL to bitcoins package
2019-05-14 18:05:14 -05:00