![]() |
Bitcoin Core 32.99.0
P2P Digital Currency
|
Classes | |
| struct | BIP352Comparator |
| class | PrevoutsSummary |
| struct | SilentPaymentsDestination |
| class | SilentPaymentsLabel |
| struct | SilentPaymentsOutput |
| class | SilentPaymentsReceiver |
| A silent payments recipient's scanning identity. More... | |
Typedefs | |
| using | PubKey = std::variant< CPubKey, XOnlyPubKey > |
| using | LabelTweakMap = std::map< SilentPaymentsLabel, uint256, std::less<> > |
Enumerations | |
| enum class | PrevoutsSummaryError { MISSING_COIN , NOT_ELIGIBLE } |
| using bip352::LabelTweakMap = typedef std::map<SilentPaymentsLabel, uint256, std::less<> > |
| using bip352::PubKey = typedef std::variant<CPubKey, XOnlyPubKey> |
|
strong |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_decode_address | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_label_serialize_roundtrip | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_p2pkh_pubkey_extraction_with_checksig_in_scriptsig | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_preserves_requested_output_indexes | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_scan_skips_invalid_taproot_outputs | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_send_and_receive_test_vectors | ) |
| bip352::BOOST_AUTO_TEST_CASE | ( | bip352_skips_transactions_spending_unknown_segwit_versions | ) |
|
static |
Definition at line 229 of file bip352.cpp.
|
static |
Definition at line 411 of file bip352.cpp.
|
static |
Definition at line 419 of file bip352.cpp.
|
static |
Definition at line 311 of file bip352.cpp.
| util::Expected< SilentPaymentsDestination, std::string > bip352::DecodeSilentPaymentsAddress | ( | const std::string & | str, |
| const CChainParams & | params | ||
| ) |
Decode a BIP352 "sp1..." address. Returns the destination, or an error message on failure.
Definition at line 68 of file bip352.cpp.
| std::optional< std::map< size_t, WitnessV1Taproot > > bip352::GenerateSilentPaymentsTaprootDestinations | ( | const std::map< size_t, SilentPaymentsDestination > & | sp_dests, |
| const std::vector< CKey > & | plain_keys, | ||
| const std::vector< KeyPair > & | taproot_keys, | ||
| const COutPoint & | smallest_outpoint | ||
| ) |
Generate silent payments taproot destinations.
Given a set of silent payments destinations, generate the requested number of outputs. If a silent payment destination is repeated, this indicates multiple outputs are requested for the same recipient. The silent payment destinations are passed in a map where the key indicates their desired position in the final tx.vout array.
| sp_dests | The silent payments destinations. |
| plain_keys | The private keys for non-taproot inputs. |
| taproot_keys | The keypairs for taproot inputs. |
| smallest_outpoint | The smallest_outpoint from the transaction inputs. |
Definition at line 372 of file bip352.cpp.
Get the public key from an input.
Get the public key from a silent payments eligible input. This requires knowledge of the prevout scriptPubKey to determine the type of input and whether or not it is eligible for silent payments.
If the input is not eligible for silent payments, the input is skipped (indicated by returning a nullopt).
| txin | The transaction input. |
| spk | The scriptPubKey of the prevout. |
Definition at line 144 of file bip352.cpp.
| util::Expected< PrevoutsSummary, PrevoutsSummaryError > bip352::GetSilentPaymentsPrevoutsSummary | ( | const std::vector< CTxIn > & | vin, |
| const std::map< COutPoint, Coin > & | coins | ||
| ) |
Get silent payments public data from transaction inputs.
Get the necessary data from the transaction inputs to be able to scan the transaction outputs for silent payments outputs. This requires knowledge of the prevout scriptPubKey, which is passed via coins.
This function returns the public key sum and the input hash separately and is intended to be used by the wallet when scanning a transaction.
If there are no eligible inputs, or one of the inputs spends an unknown segwit version (i.e > 1), this transaction is not eligible to be scanned for silent payments outputs; see PrevoutsSummaryError.
| vin | The transaction inputs. |
| coins | The coins (potentially) spent in this transaction. |
Definition at line 274 of file bip352.cpp.
|
static |
Definition at line 402 of file bip352.cpp.
| CKey bip352::ParseHexToCKey | ( | std::string_view | hex | ) |
Definition at line 29 of file bip352_tests.cpp.