UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
taproot.hpp File Reference
#include <array>
#include <cstdint>
#include <cstddef>
#include <vector>
#include "secp256k1/point.hpp"
#include "secp256k1/scalar.hpp"

Go to the source code of this file.

Classes

struct  secp256k1::TapSighashTxData
 

Namespaces

namespace  secp256k1
 

Functions

std::array< std::uint8_t, 32 > secp256k1::taproot_tweak_hash (const std::array< std::uint8_t, 32 > &internal_key_x, const std::uint8_t *merkle_root=nullptr, std::size_t merkle_root_len=0)
 
std::array< std::uint8_t, 32 > secp256k1::taproot_leaf_hash (const std::uint8_t *script, std::size_t script_len, std::uint8_t leaf_version=0xC0)
 
std::array< std::uint8_t, 32 > secp256k1::taproot_branch_hash (const std::array< std::uint8_t, 32 > &a, const std::array< std::uint8_t, 32 > &b)
 
std::pair< std::array< std::uint8_t, 32 >, int > secp256k1::taproot_output_key (const std::array< std::uint8_t, 32 > &internal_key_x, const std::uint8_t *merkle_root=nullptr, std::size_t merkle_root_len=0)
 
Scalar secp256k1::taproot_tweak_privkey (const Scalar &private_key, const std::uint8_t *merkle_root=nullptr, std::size_t merkle_root_len=0)
 
bool secp256k1::taproot_verify_commitment (const std::array< std::uint8_t, 32 > &output_key_x, int output_key_parity, const std::array< std::uint8_t, 32 > &internal_key_x, const std::uint8_t *merkle_root=nullptr, std::size_t merkle_root_len=0)
 
std::array< std::uint8_t, 32 > secp256k1::taproot_merkle_root_from_proof (const std::array< std::uint8_t, 32 > &leaf_hash, const std::vector< std::array< std::uint8_t, 32 > > &proof)
 
std::array< std::uint8_t, 32 > secp256k1::taproot_merkle_root (const std::vector< std::array< std::uint8_t, 32 > > &leaf_hashes)
 
std::array< std::uint8_t, 32 > secp256k1::tapscript_sighash (const TapSighashTxData &tx_data, std::size_t input_index, std::uint8_t hash_type, const std::array< std::uint8_t, 32 > &tapleaf_hash, std::uint8_t key_version, std::uint32_t code_separator_pos, const std::uint8_t *annex=nullptr, std::size_t annex_len=0) noexcept
 
std::array< std::uint8_t, 32 > secp256k1::taproot_keypath_sighash (const TapSighashTxData &tx_data, std::size_t input_index, std::uint8_t hash_type, const std::uint8_t *annex=nullptr, std::size_t annex_len=0) noexcept