Commit Graph

27 Commits

Author SHA1 Message Date
John Galt 4876337a55 utils: allow post-Layla token commitments 2026-05-14 20:19:07 +02:00
tomFlowee e18d78d30e Remove include 2026-05-07 10:37:09 +02:00
tomFlowee 54b4e531ef Remove unneeded text 2025-02-18 14:18:13 +01:00
tomFlowee fc60f8c396 Move fee calculation into the TransactionBuilder
This adds the feature to take a transaction that has no or very low fee
and telling the TransactionBuilder class to use a certain output to
pay needed fees from.

On the call to createTransaction money will be taken from the specified
output based on the specified fee-per-byte (default 1sat/byte).
2024-10-04 12:09:55 +02:00
tomFlowee efeb517cbd Add cashTokens API to TransactionBuilder
This allows adding, actually using the data for new transactions is
still missing.
2024-09-07 12:13:43 +02:00
tomFlowee bd4ea09582 Add docs and make p2sh API easier.
This makes the p2sh push method more sane, this takes a hash and as such
we should have a proper argument for that.
This also adds support for p2sh32.
2024-09-06 20:42:29 +02:00
tomFlowee 2983c8e7a0 Add txversion getter/setter 2024-03-13 17:02:19 +01:00
tomFlowee 4fe9d69e7b Use more specific define-guards 2024-01-24 21:03:58 +01:00
tomFlowee bc47a700a4 Refactor; wrap BufferPool in shared_ptr
As we moved most of the creation of a BufferPool to be via the
Streaming::pool() method, which uses a thread-local, it makes sense
to start cleaning up the design and make it more modern C++.
The above mentioned method would return a reference and you'd see
loads of places use `auto &pool =` which is less than ideal.

As the number of places where we actually instantiate a BufferPool
goes down, the usage of some sort of smart pointer makes more sense.

This now makes all APIs use BufferPool be wrapped in a shared_ptr.
2023-12-21 15:23:23 +01:00
tomFlowee 2d0aec2cd7 Rename file to match class it is in
This follows the coding style guideline that the file that contains a
class should follow the exact name of this (main) class.

key.{h|cpp} -> PrivateKey.{h|cpp}
2023-11-24 22:20:40 +01:00
tomFlowee 05bbba3cb3 Rename class CKey -> PrivateKey 2022-07-06 22:12:33 +02:00
tomFlowee c9af7cca4a Rename class CPubKey -> PublicKey 2022-07-06 21:56:34 +02:00
tomFlowee c33d54ed7d Rename class CKeyID -> KeyId 2022-07-06 21:52:47 +02:00
tomFlowee aef7366034 Implement BIP69 in TransactionBuilder
This adds support for the
 Lexicographical Indexing of Transaction Inputs and Outputs
anonimize concepts of transactions directly in the transaction builder.
2022-04-15 17:33:55 +02:00
tomFlowee 1b5ae89d31 [Refactor] rename FastTransaction.{h|cpp} -> Tx.* 2021-11-02 11:05:14 +01:00
tomFlowee f9a0050220 Update TransactionBuilder / signature type handling
The choice between Schnorr and ECDSA signatures is now per input instead
of once choice for the entire transaction.
2021-05-04 16:57:55 +02:00
tomFlowee 28af16d536 Add TransactionBuilder::pushOutputPay2Script() method
Code modified from snipped shared by user Sandurr on noise.cash.
2021-04-22 12:46:35 +02:00
tomFlowee ec5e563125 Make TransactionBuilder sign using Schnorr by default. 2021-04-19 16:09:42 +02:00
tomFlowee 41e0739e17 add op_group convenience method to transactionbuilder 2021-03-24 19:08:25 +01:00
TomZ b901745139 Add getters. 2020-10-23 22:33:33 +02:00
TomZ a56ff62c0d Add some useful TransactionBuilder API 2020-06-08 18:47:09 +02:00
TomZ 73bc9b78ad Pimpl transactionbuilder and install 2020-05-28 22:34:49 +02:00
TomZ 51dbc6163e Add a more generic API for outputscripts. 2019-10-09 19:36:29 +02:00
TomZ 2f5c02538c remove unfinished parts of TransactionBuilder 2019-03-28 20:23:51 +01:00
TomZ 6aa8b4a184 Update API for TransactionBuilder to do signing
Allow users to add a private key and other details while
building a transaction and then as we export the final transaction
we sign the input.
2019-03-13 23:07:00 +01:00
TomZ 7e7fe61081 Little bit of review for TransactionBuilder 2019-03-13 23:06:54 +01:00
TomZ c90ae87187 add TransactionBuilder 2019-03-13 23:06:47 +01:00