diff --git a/typescript/src/lib/bitcoin/address.ts b/typescript/src/lib/bitcoin/address.ts index 3d5dd2594..08231f769 100644 --- a/typescript/src/lib/bitcoin/address.ts +++ b/typescript/src/lib/bitcoin/address.ts @@ -5,9 +5,9 @@ import { BitcoinNetwork, toBitcoinJsLibNetwork } from "./network" /** * Creates the Bitcoin address from the public key. Supports SegWit (P2WPKH) and * Legacy (P2PKH) formats. - * @param publicKey - Public key used to derive the Bitcoin address. - * @param bitcoinNetwork - Target Bitcoin network. - * @param witness - Flag to determine address format: true for SegWit (P2WPKH) + * @param publicKey Compressed public key used to derive the Bitcoin address. + * @param bitcoinNetwork Target Bitcoin network. + * @param witness Flag to determine address format: true for SegWit (P2WPKH) * and false for Legacy (P2PKH). Default is true. * @returns The derived Bitcoin address. */ diff --git a/typescript/src/lib/bitcoin/ecdsa-key.ts b/typescript/src/lib/bitcoin/ecdsa-key.ts index 214e59bf4..f622490be 100644 --- a/typescript/src/lib/bitcoin/ecdsa-key.ts +++ b/typescript/src/lib/bitcoin/ecdsa-key.ts @@ -57,6 +57,7 @@ export const BitcoinPublicKeyUtils = { /** * Creates a Bitcoin key pair based on the given private key. * @param privateKey Private key that should be used to create the key pair. + * Should be passed in the WIF format. * @param bitcoinNetwork Bitcoin network the given key pair is relevant for. * @returns Bitcoin key ring. */ diff --git a/typescript/src/lib/bitcoin/hash.ts b/typescript/src/lib/bitcoin/hash.ts index 018771f19..876e69888 100644 --- a/typescript/src/lib/bitcoin/hash.ts +++ b/typescript/src/lib/bitcoin/hash.ts @@ -2,8 +2,8 @@ import { BigNumber, utils } from "ethers" import { Hex } from "../utils" /** - * Computes the HASH160 for the given text. - * @param text - Text the HASH160 is computed for. + * Computes the HASH160 (i.e. RIPEMD160(SHA256(text))) for the given text. + * @param text Text the HASH160 is computed for. * @returns Hash as a 20-byte un-prefixed hex string. */ function computeHash160(text: string): string { @@ -17,7 +17,7 @@ function computeHash160(text: string): string { /** * Computes the double SHA256 for the given text. - * @param text - Text the double SHA256 is computed for. + * @param text Text the double SHA256 is computed for. * @returns Hash as a 32-byte un-prefixed hex string. * @dev Do not confuse it with computeSha256 which computes single SHA256. */ @@ -30,7 +30,7 @@ function computeHash256(text: Hex): Hex { /** * Converts a hash in hex string in little endian to a BigNumber. - * @param hash - Hash in hex-string format. + * @param hash Hash in hex-string format. * @returns BigNumber representation of the hash. */ function hashLEToBigNumber(hash: Hex): BigNumber { @@ -39,7 +39,7 @@ function hashLEToBigNumber(hash: Hex): BigNumber { /** * Computes the single SHA256 for the given text. - * @param text - Text the single SHA256 is computed for. + * @param text Text the single SHA256 is computed for. * @returns Hash as a 32-byte un-prefixed hex string. * @dev Do not confuse it with computeHash256 which computes double SHA256. */ diff --git a/typescript/src/lib/bitcoin/tx.ts b/typescript/src/lib/bitcoin/tx.ts index f068500b1..3593ddfe6 100644 --- a/typescript/src/lib/bitcoin/tx.ts +++ b/typescript/src/lib/bitcoin/tx.ts @@ -185,7 +185,7 @@ export function extractBitcoinRawTxVectors( /** * Converts Bitcoin specific locktime value to a number. The number represents - * either a block height or an Unix timestamp depending on the value. + * either a block height or a Unix timestamp, depending on the value. * * If the number is less than 500 000 000 it is a block height. * If the number is greater or equal 500 000 000 it is a Unix timestamp.