* Made the standard non-interactive tx finalizer simple using composition of its (reusable) pieces
* Responded to code review and made minor improvements
* Fixed docs
* 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
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
* 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
* 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
* 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
* 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>
* 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
* 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>
* GetAddress Wallet API call
* Add ability to get unfunded address
* Generate new address if no unfunded addresses
* Add test
* Add wallet get address documentation
* 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
* 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
* Add disclaimers to the wallet/key-manager around API breaking changes and limitations of the current iteration of the wallet
* Reword as Ben suggests
* 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
* 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
* 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
* 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
* 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
* 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
* 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>
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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
* 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.
* 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
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.
* 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
* 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