Skip to content

Commit

Permalink
docs: change 'bytes' by 'words' in native segwit parsing functions do…
Browse files Browse the repository at this point in the history
…cumentation
  • Loading branch information
Luisfc68 committed Jun 27, 2024
1 parent 16421da commit 6ba5f92
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions contracts/BtcUtils.sol
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,10 @@ library BtcUtils {
return destinationAddress;
}

/// @notice Parse a raw pay-to-witness-pubkey-hash output script to get the corresponding address bytes,
/// the resulting byte is only the data part of the bech32 encoding and doesn't include the HRP
/// @notice Parse a raw pay-to-witness-pubkey-hash output script to get the corresponding address words,
/// the resulting words are only the data part of the bech32 encoding and doesn't include the HRP
/// @param outputScript the fragment of the raw transaction containing the raw output script
/// @return The address generated using the pubkey hash
/// @return The address bech32 words generated using the pubkey hash
function parsePayToWitnessPubKeyHash(bytes calldata outputScript) public pure returns (bytes memory) {
require(isP2WPKHOutput(outputScript), "Script hasn't the required structure");
uint length = 1 + total5BitWords(HASH160_SIZE);
Expand All @@ -224,10 +224,10 @@ library BtcUtils {
return result;
}

/// @notice Parse a raw pay-to-witness-script-hash output script to get the corresponding address bytes,
/// the resulting byte is only the data part of the bech32 encoding and doesn't include the HRP
/// @notice Parse a raw pay-to-witness-script-hash output script to get the corresponding address words,
/// the resulting words are only the data part of the bech32 encoding and doesn't include the HRP
/// @param outputScript the fragment of the raw transaction containing the raw output script
/// @return The address generated using the script hash
/// @return The address bech32 words generated using the script hash
function parsePayToWitnessScriptHash(bytes calldata outputScript) public pure returns (bytes memory) {
require(isP2WSHOutput(outputScript), "Script hasn't the required structure");
uint length = 1 + total5BitWords(SHA256_SIZE);
Expand All @@ -240,10 +240,10 @@ library BtcUtils {
return result;
}

/// @notice Parse a raw pay-to-taproot output script to get the corresponding address bytes,
/// the resulting byte is only the data part of the bech32m encoding and doesn't include the HRP
/// @notice Parse a raw pay-to-taproot output script to get the corresponding address words,
/// the resulting words are only the data part of the bech32m encoding and doesn't include the HRP
/// @param outputScript the fragment of the raw transaction containing the raw output script
/// @return The address generated using the taproot pubkey hash
/// @return The address bech32m words generated using the taproot pubkey hash
function parsePayToTaproot(bytes calldata outputScript) public pure returns (bytes memory) {
require(isP2TROutput(outputScript), "Script hasn't the required structure");
uint length = 1 + total5BitWords(TAPROOT_PUBKEY_SIZE);
Expand Down

0 comments on commit 6ba5f92

Please sign in to comment.